decocms 4.429.4 → 4.429.5

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 (352) hide show
  1. package/dist/client/assets/{AlertCircle-CsnluVGx.js → AlertCircle-CXwWyjWL.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C5NeH00U.js → AreaChart-CWnwFPGD.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-C0DFEkSG.js → ArrowLeft-DYnQbYxF.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-Cg3T6c8U.js → ArrowRight-C4e8QGnK.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BrWIe8FE.js → ArrowUp-BiYv-XbK.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-CxpQ2jZl.js → CartesianChart-BGE8uJq6.js} +1 -1
  7. package/dist/client/assets/{Check-Bt1XL9OZ.js → Check-C8M8v3vI.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-Bj2BODXk.js → CheckCircle-jESFBkr7.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-Bi1dRl0F.js → ChevronUp-Q2TBgNib.js} +1 -1
  10. package/dist/client/assets/{Copy01-lLzDCXmN.js → Copy01-CaF9W1F_.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-C_LphuIk.js → CreditCard01-Czi8bh9o.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CaPsIQcQ.js → DotsVertical-DyDeVQCx.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-CFw85c1d.js → ErrorBarContext-D4BkOvp5.js} +1 -1
  14. package/dist/client/assets/{Image01-FUpltNPw.js → Image01-CsDdVFAJ.js} +1 -1
  15. package/dist/client/assets/{Key01-CslrU_s2.js → Key01-D2FR3CbZ.js} +1 -1
  16. package/dist/client/assets/{Line-BphA32Yd.js → Line-BfgHJMc3.js} +1 -1
  17. package/dist/client/assets/{Link01-CKWZapoo.js → Link01-NjQr5iwv.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-3O41jdXy.js → LinkExternal01-CR1925bA.js} +1 -1
  19. package/dist/client/assets/{Monitor01-CB2SD1gN.js → Monitor01-50nhII2F.js} +1 -1
  20. package/dist/client/assets/{Palette-BVtHs2vU.js → Palette-AyH3xXYO.js} +1 -1
  21. package/dist/client/assets/{Plus-DJ-W3_cM.js → Plus-DP7AHtKt.js} +1 -1
  22. package/dist/client/assets/{SearchMd-B27FMXMV.js → SearchMd-D_KPqWqZ.js} +1 -1
  23. package/dist/client/assets/{Sector-CwkxI8qP.js → Sector-BR7_Ijx1.js} +1 -1
  24. package/dist/client/assets/{ShoppingBag01-BTl-krF7.js → ShoppingBag01-Dq4UD5Hm.js} +1 -1
  25. package/dist/client/assets/{Sun-CUnE0uf1.js → Sun-oSoDHq1v.js} +1 -1
  26. package/dist/client/assets/{Tool01-EwUUkOdA.js → Tool01-D2y7RTX1.js} +1 -1
  27. package/dist/client/assets/{Trash01-CvSUykct.js → Trash01-64yehlfB.js} +1 -1
  28. package/dist/client/assets/{Upload01-DWr4g8OT.js → Upload01-BvgQ3r-o.js} +1 -1
  29. package/dist/client/assets/{User01-DsrGZ98W.js → User01-CU3qbr5s.js} +1 -1
  30. package/dist/client/assets/{UserSquare-B8RPwEBF.js → UserSquare-nGw6lX43.js} +1 -1
  31. package/dist/client/assets/{Users01-65_1ZPG4.js → Users01-Lf2fvOej.js} +1 -1
  32. package/dist/client/assets/{X-Ccy7mqMZ.js → X-NPE_cXRR.js} +1 -1
  33. package/dist/client/assets/{XAxis-DP41Cjj9.js → XAxis-Drv4sXya.js} +1 -1
  34. package/dist/client/assets/{XClose-CTgT8nLL.js → XClose-CMTvfCel.js} +1 -1
  35. package/dist/client/assets/{ZoomOut-DKLrc0AX.js → ZoomOut-xQj4oorm.js} +1 -1
  36. package/dist/client/assets/{access-gate-CLQyj1tq.js → access-gate-DRBSlBtJ.js} +1 -1
  37. package/dist/client/assets/add-connection-dialog-DHl4H43e.js +1 -0
  38. package/dist/client/assets/{agent-analytics-C9Wxe5WJ.js → agent-analytics-RDv7d0ta.js} +1 -1
  39. package/dist/client/assets/agent-app-BMOs_YKU.js +1 -0
  40. package/dist/client/assets/{agent-assets-B0EEKaMD.js → agent-assets-QMTortLS.js} +1 -1
  41. package/dist/client/assets/{agent-automation-DMF4y0Om.js → agent-automation-kP7qIZSD.js} +1 -1
  42. package/dist/client/assets/{agent-automations-CvyiOCkB.js → agent-automations-D5AIE6G6.js} +1 -1
  43. package/dist/client/assets/{agent-connect-sources-BImgc7Bd.js → agent-connect-sources-1UnRN6mW.js} +1 -1
  44. package/dist/client/assets/agent-deck-9_2F3EG2.js +1 -0
  45. package/dist/client/assets/{agent-e2e-3f9yGWUZ.js → agent-e2e-DEc1NtfK.js} +1 -1
  46. package/dist/client/assets/{agent-experiments-D1O6cKwR.js → agent-experiments-D33dFCpI.js} +1 -1
  47. package/dist/client/assets/{agent-file-CSjOLC2Q.js → agent-file-DxlwynYZ.js} +1 -1
  48. package/dist/client/assets/{agent-git-Cv3j2qtb.js → agent-git-DVn4DsKt.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-DHLBLYo5.js → agent-hosting-CgiR8Ql4.js} +1 -1
  50. package/dist/client/assets/{agent-icon-B9NBzFRl.js → agent-icon-TQUkqPJj.js} +1 -1
  51. package/dist/client/assets/agent-library-BoJuDeBh.js +1 -0
  52. package/dist/client/assets/agent-library-file-Dyz9u3bt.js +1 -0
  53. package/dist/client/assets/{agent-monitor-B1BSWqcD.js → agent-monitor-DgcF05B9.js} +1 -1
  54. package/dist/client/assets/{agent-overview-DMjDaFOx.js → agent-overview-dLl0w1eM.js} +1 -1
  55. package/dist/client/assets/agent-settings-MQLrMTV8.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-CtaOvGD3.js → agent-site-editor-ITnkleU1.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-D4dXTr1f.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-C95AguXy.js → agent-site-editor-content-CNFJoRJD.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-BCmkz7Ty.js → agent-site-editor-preview-CNLkTYYB.js} +3 -3
  60. package/dist/client/assets/agent-view-CfCVRWZl.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-3xukNQiu.js → agent-view-guard-BbHyaShN.js} +1 -1
  62. package/dist/client/assets/{agents-list-DAaf4Mi5.js → agents-list-D9hihWFU.js} +1 -1
  63. package/dist/client/assets/{ai-providers-B5J9hlgx.js → ai-providers-oyOl9W3y.js} +1 -1
  64. package/dist/client/assets/{alert-CeGoXJox.js → alert-CokNymqA.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-nydIJdPH.js → alert-dialog-DeJgSFRZ.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-DciswvIy.js → analytics-sections-DDWh8YnS.js} +1 -1
  67. package/dist/client/assets/{api-keys-BAiXWtmH.js → api-keys-Ch7q_sOP.js} +1 -1
  68. package/dist/client/assets/api-keys-DLiRLY55.js +1 -0
  69. package/dist/client/assets/{app-editor-DP2IqOM6.js → app-editor-BhWLpri1.js} +1 -1
  70. package/dist/client/assets/{asset-utils-DHzPaDW1.js → asset-utils-BRk3fUR7.js} +1 -1
  71. package/dist/client/assets/{auth-DA7glj38.js → auth-BNR-bSJO.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-ByYjTbWh.js → auth-catchall-CJ0eRklU.js} +1 -1
  73. package/dist/client/assets/{auth-entry-CYA5MXOV.js → auth-entry-XcfUUozZ.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-Jnq9j5HW.js → auth-split-layout-mYNIGFvp.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-CDhCKuA8.js → authenticate-and-persist-oauth-CZrI0wkU.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-DB8v2PyO.js → automation-list-row-DfLOPauj.js} +1 -1
  77. package/dist/client/assets/{automation-runs-BPgX-uCi.js → automation-runs-RuvSYlk2.js} +1 -1
  78. package/dist/client/assets/{automations-siBOu-F5.js → automations-CQh_fULy.js} +1 -1
  79. package/dist/client/assets/{autosend-CPHdbo-0.js → autosend-h1h21hnM.js} +1 -1
  80. package/dist/client/assets/{avatar-CqsfnSHy.js → avatar-UFbMnkmr.js} +1 -1
  81. package/dist/client/assets/{badge-DAgPG-f0.js → badge-DzTxW-Ts.js} +1 -1
  82. package/dist/client/assets/{block-document-CjBjHCND.js → block-document-hxIwEIoN.js} +1 -1
  83. package/dist/client/assets/{blocks-preview-workspace-context-C31YGOfs.js → blocks-preview-workspace-context-DRl7lMaq.js} +1 -1
  84. package/dist/client/assets/{buckets-C3My6XtJ.js → buckets-B-CYwdgC.js} +1 -1
  85. package/dist/client/assets/{build-improve-prompt-doc-Do4e762u.js → build-improve-prompt-doc-DNmtsTJk.js} +1 -1
  86. package/dist/client/assets/{calendar-B7qg5owI.js → calendar-Bx26MiuJ.js} +1 -1
  87. package/dist/client/assets/{capability-load-error-1FL5H8Lu.js → capability-load-error-BWTOxRLG.js} +1 -1
  88. package/dist/client/assets/{category-editor-B57aQ27B.js → category-editor-DjdC64aL.js} +1 -1
  89. package/dist/client/assets/{chart-2dmUQZnn.js → chart-BxpZzVsr.js} +1 -1
  90. package/dist/client/assets/{chat-context-DlsYLkGJ.js → chat-context-DppIIhzA.js} +1 -1
  91. package/dist/client/assets/{chat-draft-BRjVow7g.js → chat-draft-DiJpqitX.js} +1 -1
  92. package/dist/client/assets/{checkbox-BTUE4SPp.js → checkbox-BGfnFNv1.js} +1 -1
  93. package/dist/client/assets/{choose-editor-CL5ENJjq.js → choose-editor-DHwWSJiW.js} +1 -1
  94. package/dist/client/assets/{claim-phase-copy-Bafau5vI.js → claim-phase-copy-BRgB3yX1.js} +1 -1
  95. package/dist/client/assets/{cli-auth-success--cIEBBck.js → cli-auth-success-BX3DQOO5.js} +1 -1
  96. package/dist/client/assets/{client-icons-Cq_yGfeD.js → client-icons-CYZ83j__.js} +1 -1
  97. package/dist/client/assets/{collapsible-B14ZTqF0.js → collapsible-C2j127TD.js} +1 -1
  98. package/dist/client/assets/{collection-detail-CjDKm-Ja.js → collection-detail-ehNX3PLY.js} +1 -1
  99. package/dist/client/assets/{collection-display-button-czskr6KY.js → collection-display-button-CwIm419d.js} +1 -1
  100. package/dist/client/assets/{collection-search-CfrCGB2I.js → collection-search-D_azi8Gq.js} +1 -1
  101. package/dist/client/assets/{collection-table-wrapper-BDBioyTK.js → collection-table-wrapper-DMU9yWMT.js} +1 -1
  102. package/dist/client/assets/{collection-tabs-DCEsfKpk.js → collection-tabs-C6N84gCC.js} +1 -1
  103. package/dist/client/assets/{combobox-CSMKu-4J.js → combobox--XWfS5lw.js} +1 -1
  104. package/dist/client/assets/{command-1GDLg60A.js → command-D1RoIxg2.js} +1 -1
  105. package/dist/client/assets/{companion-mcps-section-C_twJCDq.js → companion-mcps-section-Cs-LBxQr.js} +1 -1
  106. package/dist/client/assets/{config-9vd9dHPj.js → config-CMMAnMUF.js} +1 -1
  107. package/dist/client/assets/{connect-D4lU18ry.js → connect-DVE1Hnuy.js} +1 -1
  108. package/dist/client/assets/{connect-layout-SPr19DgY.js → connect-layout--NwWaqYw.js} +1 -1
  109. package/dist/client/assets/{connection-CO5JzyBf.js → connection-Ds6vwkGM.js} +1 -1
  110. package/dist/client/assets/{connection-card-BgD62s7i.js → connection-card-BPKFHpho.js} +1 -1
  111. package/dist/client/assets/{connection-detail-DnXBnw2I.js → connection-detail-BroJMnyc.js} +1 -1
  112. package/dist/client/assets/{connection-form-helpers-Ddtw1f6y.js → connection-form-helpers-C4OB4j_3.js} +1 -1
  113. package/dist/client/assets/{connections-BqkP75Y7.js → connections-DG2GlCvy.js} +1 -1
  114. package/dist/client/assets/{context-C4yaZPbY.js → context-BL1LKuLQ.js} +1 -1
  115. package/dist/client/assets/{context-menu-Cse8aI2i.js → context-menu-CBJP1RfU.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-BR0Vxj8W.js → create-organization-dialog-BQ0I0t_j.js} +1 -1
  117. package/dist/client/assets/{daily-pulse-FhqnjDwB.js → daily-pulse-Dpp9pCbq.js} +1 -1
  118. package/dist/client/assets/{decopilot-D_xEyFfg.js → decopilot-BRlhj2Gw.js} +1 -1
  119. package/dist/client/assets/{dialog-Bvq22AZH.js → dialog-Mg_Z3ES1.js} +1 -1
  120. package/dist/client/assets/{discover-ax70JDSI.js → discover-DCHf1gBE.js} +1 -1
  121. package/dist/client/assets/{domain-settings-BcZo-0Ge.js → domain-settings-CmoTC2Mj.js} +1 -1
  122. package/dist/client/assets/{download-app-dialog-dA0AkV4L.js → download-app-dialog-B7zcmkcH.js} +1 -1
  123. package/dist/client/assets/{drawer-XX6hq0xe.js → drawer-BIoKJwCW.js} +1 -1
  124. package/dist/client/assets/{editor-CeAQ3Rze.js → editor-JpZ1gWwV.js} +1 -1
  125. package/dist/client/assets/{empty-state-CdGiHDyj.js → empty-state-BayRP7H4.js} +1 -1
  126. package/dist/client/assets/{empty-state-CKjPjErp.js → empty-state-BmztM-Bo.js} +1 -1
  127. package/dist/client/assets/{extract-connection-data-C5i3LFcd.js → extract-connection-data-D5wjQBt3.js} +1 -1
  128. package/dist/client/assets/{feature-gate-Bz53dyQH.js → feature-gate-DvQXfI5S.js} +1 -1
  129. package/dist/client/assets/{feature-paywall-DXOmuGN9.js → feature-paywall-sc2LtOXc.js} +1 -1
  130. package/dist/client/assets/{file-explorer-CiHpmQeg.js → file-explorer-CqjD-skS.js} +1 -1
  131. package/dist/client/assets/{file-preview-D5cDixM_.js → file-preview-VfWoS2gk.js} +1 -1
  132. package/dist/client/assets/{file-share-button-BkuqjC-p.js → file-share-button-BGOzbmtb.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-DKJoVWit.js → file-type-icon-BhiPdwxi.js} +1 -1
  134. package/dist/client/assets/flat-project-wkNYEFlO.js +1 -0
  135. package/dist/client/assets/{folder-icon-DeJ_4vBF.js → folder-icon-DBIJdeY7.js} +1 -1
  136. package/dist/client/assets/{form-DeiW8V1T.js → form-BgAERq-t.js} +1 -1
  137. package/dist/client/assets/{gateway-client-uRieKdKv.js → gateway-client-CIbTMjGx.js} +1 -1
  138. package/dist/client/assets/{general-CU8ONF_3.js → general-BBuB4XlH.js} +1 -1
  139. package/dist/client/assets/{home-DzDH2rsn.js → home-C96-FMPc.js} +1 -1
  140. package/dist/client/assets/{icon-button-DB3NNAY8.js → icon-button-CWL5E4Ua.js} +1 -1
  141. package/dist/client/assets/{index-DaRlcMLg.js → index-2-Z1VD2F.js} +1 -1
  142. package/dist/client/assets/{index-v7dN0kvl.js → index-B0WfPFpv.js} +1 -1
  143. package/dist/client/assets/{index-C95CzY3C.js → index-B9dD9jj0.js} +4 -4
  144. package/dist/client/assets/{index-DnaVeM3s.js → index-BZOsa8jC.js} +1 -1
  145. package/dist/client/assets/{index-Bf-cXXgi.js → index-Bv71AEH5.js} +1 -1
  146. package/dist/client/assets/{index-_cYAL9g5.js → index-CORXJXSN.js} +1 -1
  147. package/dist/client/assets/{index-DHp7ZGYh.js → index-CpszPQp_.js} +1 -1
  148. package/dist/client/assets/{index-BV8ofAzV.js → index-DL-sDqTO.js} +1 -1
  149. package/dist/client/assets/{index-0Q1deNIS.js → index-DR9ob9os.js} +1 -1
  150. package/dist/client/assets/{index-D5dEpLnc.js → index-DWe-6mCD.js} +1 -1
  151. package/dist/client/assets/{index-BAMmb9m3.js → index-ROw_u5-U.js} +1 -1
  152. package/dist/client/assets/{index-C9xjia7y.js → index-RYaP6qX3.js} +3 -3
  153. package/dist/client/assets/{index-Drb30CpZ.js → index-r8TBLtcZ.js} +1 -1
  154. package/dist/client/assets/{index-redirect-DclOFuEc.js → index-redirect-DN5m0MeF.js} +1 -1
  155. package/dist/client/assets/{index-BpIX5zJy.js → index-v5QvptSB.js} +1 -1
  156. package/dist/client/assets/{index-CBzFtxdS.js → index-vYawqXRD.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-Cqc8H9Zl.js → infiniteQueryObserver-Ex2lNjjr.js} +1 -1
  158. package/dist/client/assets/{infra-billing-1OBJjuQ-.js → infra-billing-BvYXN3Z1.js} +1 -1
  159. package/dist/client/assets/{input-D0VdvVQu.js → input-BZloVZ72.js} +3 -3
  160. package/dist/client/assets/{input-CzYAG_im.js → input-BmzPGvUi.js} +1 -1
  161. package/dist/client/assets/{input-BfBrXJza.js → input-Cndqm_5O.js} +1 -1
  162. package/dist/client/assets/{integration-icon-w9_wzNNP.js → integration-icon-C5NBXdpz.js} +1 -1
  163. package/dist/client/assets/{label-DZ5OXqqj.js → label-DpahMcEo.js} +1 -1
  164. package/dist/client/assets/{last-preview-page-CWajJMK8.js → last-preview-page-Dfux_ulA.js} +1 -1
  165. package/dist/client/assets/{layout-9_q6a5YB.js → layout-C6k3EFd1.js} +1 -1
  166. package/dist/client/assets/{legacy-agents-deep-CLPL3Mpg.js → legacy-agents-deep-B_DiKZ0c.js} +1 -1
  167. package/dist/client/assets/{legacy-main-redirect-TVPN8oSv.js → legacy-main-redirect-BgIGaynA.js} +1 -1
  168. package/dist/client/assets/library-D6flTj5t.js +1 -0
  169. package/dist/client/assets/{library-tab-DJf8qPe0.js → library-tab-Bso2C2NG.js} +1 -1
  170. package/dist/client/assets/{login-ubx4IGz6.js → login-CXuSqosI.js} +1 -1
  171. package/dist/client/assets/{markdown-GDF3SJOy.js → markdown-D8U5yexH.js} +1 -1
  172. package/dist/client/assets/{mcp-app-renderer-BtXqphZ9.js → mcp-app-renderer-CWOIFfi6.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-Cb0VYgbB.js → mcp-oauth-DCDrWVc0.js} +1 -1
  174. package/dist/client/assets/{members-Bge8MTFI.js → members-BfRC0ceX.js} +1 -1
  175. package/dist/client/assets/{message-templates-qwkqPfKZ.js → message-templates-DgOMle6a.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-Dp6XKOO1.js → mini-report-page-BIktJNbh.js} +1 -1
  177. package/dist/client/assets/{mock-board-eEbVN77o.js → mock-board-DjQ6xrU_.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-DXiGiHeM.js → monaco-editor-BRUSLTLk.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-Bf7tQNvd.js → monitoring-stats-row-C4bB2YFf.js} +1 -1
  180. package/dist/client/assets/{multi-select-DYCju49A.js → multi-select-6bm7qEEn.js} +1 -1
  181. package/dist/client/assets/{mustache-CsZqlbfC.js → mustache-CAmcva4T.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-BVqw_nCp.js → new-project-dialog-BejzbVG2.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-DztIcMBf.js → oauth-callback-0bxicPCo.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-AHTcJ0zb.js → oauth-callback-ai-provider-D4kx59om.js} +1 -1
  185. package/dist/client/assets/{onboarding-CZE7_cx0.js → onboarding-C7mIZXvc.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-wUKP0KI1.js → openai-conversation-DYPzWsQc.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-DoS1B88-.js → optimistic-project-sidebar-views-DHo7EiTm.js} +1 -1
  188. package/dist/client/assets/{org-file-open-context-wUzs-3_m.js → org-file-open-context-CSDcMwBD.js} +1 -1
  189. package/dist/client/assets/{organization-choice-C1O1ljWb.js → organization-choice-BZ-4C5a6.js} +1 -1
  190. package/dist/client/assets/{orgs-D_--9-SG.js → orgs-DnEd_o3Y.js} +1 -1
  191. package/dist/client/assets/{page-seo-form-B2EYpR7K.js → page-seo-form-BjAunJ7T.js} +1 -1
  192. package/dist/client/assets/{pair-BlA_exbo.js → pair-o8Pcow3m.js} +1 -1
  193. package/dist/client/assets/{plan-ladder-k9eV0Dld.js → plan-ladder-COYrpP9N.js} +1 -1
  194. package/dist/client/assets/{popover-Dxmyu-b_.js → popover-D5s3M61L.js} +1 -1
  195. package/dist/client/assets/{post-calendar-BORBN9Sn.js → post-calendar-Cl-vAwk3.js} +1 -1
  196. package/dist/client/assets/{post-editor-BF1SoTKx.js → post-editor-D2HU9kfD.js} +1 -1
  197. package/dist/client/assets/{preview-content-BETQ4GLk.js → preview-content-B9bgsNRh.js} +1 -1
  198. package/dist/client/assets/{preview-dialog-sAmHyR0a.js → preview-dialog-CwQ43Y6v.js} +1 -1
  199. package/dist/client/assets/{profile-D5UUKV90.js → profile-BB1G47uY.js} +1 -1
  200. package/dist/client/assets/{project-app-view-CisH6g4D.js → project-app-view-DS-jWTJh.js} +1 -1
  201. package/dist/client/assets/{project-feed-CDpUTVHU.js → project-feed-Ceha3l-R.js} +1 -1
  202. package/dist/client/assets/{project-icon-Bo-jeNxy.js → project-icon-CmV-Y1UZ.js} +1 -1
  203. package/dist/client/assets/project-reports-M4OcQRnq.js +1 -0
  204. package/dist/client/assets/project-tasks-D2UK5JuX.js +1 -0
  205. package/dist/client/assets/{projects-C1D-1AdZ.js → projects-Cv5osXsD.js} +1 -1
  206. package/dist/client/assets/{projects-empty-state-CPkdHRjG.js → projects-empty-state-CaTjevnb.js} +1 -1
  207. package/dist/client/assets/{prompts-DRogfwCM.js → prompts-BgUtk3zC.js} +1 -1
  208. package/dist/client/assets/record-editor-C0G9mTGj.js +1 -0
  209. package/dist/client/assets/{redirect-editor-C4k0wpB3.js → redirect-editor-BpclUTIj.js} +1 -1
  210. package/dist/client/assets/{reports-ClKG3e_O.js → reports-CLznlgS5.js} +1 -1
  211. package/dist/client/assets/reports-cbjIbfxK.js +1 -0
  212. package/dist/client/assets/{reports-onboarding-Dq9y_yRB.js → reports-onboarding-BHCXUocU.js} +1 -1
  213. package/dist/client/assets/{reports-tab-B9xl5ktg.js → reports-tab-CoZHZlVb.js} +2 -2
  214. package/dist/client/assets/{repositories-BImrR5du.js → repositories-DoauYKeu.js} +1 -1
  215. package/dist/client/assets/{repository-binding-Czcp88Ek.js → repository-binding-DzrKIMc8.js} +1 -1
  216. package/dist/client/assets/{repository-import-picker-CULajLJp.js → repository-import-picker-CVP1mN_O.js} +1 -1
  217. package/dist/client/assets/{repository-picker-B-UdqnSa.js → repository-picker-BIkrH86Z.js} +1 -1
  218. package/dist/client/assets/{require-capability-CqMIdAS-.js → require-capability-CEGMzsiO.js} +1 -1
  219. package/dist/client/assets/{required-auth-layout-CbXz4N5t.js → required-auth-layout-BPzqc-yZ.js} +1 -1
  220. package/dist/client/assets/{reset-password-B1LiYTbr.js → reset-password-CC9lxhEO.js} +1 -1
  221. package/dist/client/assets/{resizable-7gm_IBrS.js → resizable-Ck9CN4S9.js} +1 -1
  222. package/dist/client/assets/{resolve-tab-icon-DTC7b4Bc.js → resolve-tab-icon-CgOUF0YA.js} +1 -1
  223. package/dist/client/assets/{review-settings-C5wsuE4d.js → review-settings-cCLUF68J.js} +1 -1
  224. package/dist/client/assets/{rich-text-link-control-CoTPcMfG.js → rich-text-link-control-RS2mJIfp.js} +1 -1
  225. package/dist/client/assets/{roles-CMFMpqfB.js → roles-DWD7cz1d.js} +1 -1
  226. package/dist/client/assets/{route-BuPz_ueu.js → route-CjKIfVgB.js} +1 -1
  227. package/dist/client/assets/{route-BusV7X7j.js → route-DI4K2hiz.js} +1 -1
  228. package/dist/client/assets/route-n8gaWLVb.js +1 -0
  229. package/dist/client/assets/{runnable-block-editor-Bou39s6j.js → runnable-block-editor-h-xGxUBS.js} +1 -1
  230. package/dist/client/assets/{sandbox-lifecycle-context-BJgEd1XY.js → sandbox-lifecycle-context-OPdARg4I.js} +1 -1
  231. package/dist/client/assets/{schema-ClJOB7M6.js → schema-BejaMrNT.js} +1 -1
  232. package/dist/client/assets/{scroll-area-xr5K9HEx.js → scroll-area-DjfgE2jb.js} +1 -1
  233. package/dist/client/assets/{search-input-DQYXD4BL.js → search-input-DviARBm2.js} +1 -1
  234. package/dist/client/assets/{search-toggle-gcLaltAJ.js → search-toggle-DvOTtKmA.js} +1 -1
  235. package/dist/client/assets/{secret-picker-BNTi35Xa.js → secret-picker-CuEw2DSI.js} +1 -1
  236. package/dist/client/assets/{secrets-CVSqY8p4.js → secrets-CoVAIKwE.js} +1 -1
  237. package/dist/client/assets/{sections-editor-DEZ5WUCt.js → sections-editor-CsNiIfgn.js} +1 -1
  238. package/dist/client/assets/{select-pVe0_Bqt.js → select-Cd1ykg-h.js} +1 -1
  239. package/dist/client/assets/{select-model-DwrumK80.js → select-model-a344Xqu_.js} +1 -1
  240. package/dist/client/assets/{seo-editor-BmdnbOsw.js → seo-editor-D4_b59uB.js} +1 -1
  241. package/dist/client/assets/{separator-BPAhL_Ij.js → separator-Ch977YA1.js} +1 -1
  242. package/dist/client/assets/{settings-tab-BIOZHtto.js → settings-tab-sWmscvB1.js} +1 -1
  243. package/dist/client/assets/{sheet-DD4zrgIp.js → sheet-lggFYx6M.js} +1 -1
  244. package/dist/client/assets/shell-layout-Bl8of89A.js +1 -0
  245. package/dist/client/assets/{skills-BXrtiv9s.js → skills-CzJ783Zp.js} +1 -1
  246. package/dist/client/assets/{sso-ua1OcLrx.js → sso-DKlO8_Lq.js} +1 -1
  247. package/dist/client/assets/{suggestion-DKqlkt9S.js → suggestion-K--t6EP5.js} +1 -1
  248. package/dist/client/assets/{switch-fa5Y0oMN.js → switch-BLWgY1pz.js} +1 -1
  249. package/dist/client/assets/{synced-repos-Cl-5WTlE.js → synced-repos-BnWEHPVF.js} +1 -1
  250. package/dist/client/assets/{tab-icon-glyph-CpVLHF8O.js → tab-icon-glyph-C_bZ6WrZ.js} +1 -1
  251. package/dist/client/assets/{table-BrephWG_.js → table-CufJwyXQ.js} +1 -1
  252. package/dist/client/assets/{tabs-DvOBS__-.js → tabs-C1zPDoUI.js} +1 -1
  253. package/dist/client/assets/{task-board-DC2or4R3.js → task-board-DlEJAtdm.js} +1 -1
  254. package/dist/client/assets/{task-route-BErEZvY5.js → task-route-z_uMrYh2.js} +1 -1
  255. package/dist/client/assets/{task-status-DlLNPIjB.js → task-status-DrVr4O9O.js} +1 -1
  256. package/dist/client/assets/{taskboard-analytics-BsaDZQbf.js → taskboard-analytics-BEIixlIh.js} +1 -1
  257. package/dist/client/assets/{tasks-CrNGIxtX.js → tasks-CpEABx-G.js} +1 -1
  258. package/dist/client/assets/tasks-l5i1Y6YC.js +1 -0
  259. package/dist/client/assets/{textarea-CAQNCfpp.js → textarea-r66bOcCD.js} +1 -1
  260. package/dist/client/assets/{thread-analytics-YipT0TYV.js → thread-analytics-BmowQF8I.js} +1 -1
  261. package/dist/client/assets/{thread-intent-C_0JzN_O.js → thread-intent-UQGFcX_y.js} +1 -1
  262. package/dist/client/assets/{thread-route-O3hSghFZ.js → thread-route-CVz2UKe8.js} +1 -1
  263. package/dist/client/assets/{thread-route-D30ezW1U.js → thread-route-CowkfwAl.js} +1 -1
  264. package/dist/client/assets/{thread-sheet-body-DD7ZVtVM.js → thread-sheet-body-CxW1uZ8Z.js} +1 -1
  265. package/dist/client/assets/{toggle-group-tCcvTcRv.js → toggle-group-BQtHqwCK.js} +1 -1
  266. package/dist/client/assets/{toolbar-icon-button-9n2J-wcp.js → toolbar-icon-button-B4QTn-IO.js} +1 -1
  267. package/dist/client/assets/{tooltip-DdjGQobT.js → tooltip-CM3YyNDC.js} +1 -1
  268. package/dist/client/assets/{track-HoeQbmP5.js → track-BqJ0I7ao.js} +1 -1
  269. package/dist/client/assets/{types-Ckn1MlKU.js → types-DyM6In73.js} +1 -1
  270. package/dist/client/assets/{usage-stats-rrSlTrKo.js → usage-stats-5Vc6zWOp.js} +1 -1
  271. package/dist/client/assets/{use-ai-providers-CKzmzfvw.js → use-ai-providers-C98JaJAU.js} +1 -1
  272. package/dist/client/assets/{use-automations-Djzogwmx.js → use-automations-CqbCGltu.js} +1 -1
  273. package/dist/client/assets/{use-autosave-BTs_Zvgi.js → use-autosave-tzZy_E8d.js} +1 -1
  274. package/dist/client/assets/{use-chat-layout-state-B6s2JkCt.js → use-chat-layout-state-BfZJHnkW.js} +1 -1
  275. package/dist/client/assets/{use-connect-companion-CoFLerH1.js → use-connect-companion-DfiphJ3V.js} +1 -1
  276. package/dist/client/assets/{use-connection-C-kBQ3D-.js → use-connection-BdSGHKJK.js} +1 -1
  277. package/dist/client/assets/{use-copy-Qg7bi8zx.js → use-copy-CiP5Vy7i.js} +1 -1
  278. package/dist/client/assets/{use-create-virtual-mcp-DEvwRMMK.js → use-create-virtual-mcp-CoU2LYN8.js} +1 -1
  279. package/dist/client/assets/{use-date-fns-locale-KEOSZSCW.js → use-date-fns-locale-BQIR67dY.js} +1 -1
  280. package/dist/client/assets/{use-debounced-autosave-M6eg3Y4O.js → use-debounced-autosave-6IETzqNZ.js} +1 -1
  281. package/dist/client/assets/{use-debounced-value-f1u1JXjY.js → use-debounced-value-DCYhoWzs.js} +1 -1
  282. package/dist/client/assets/{use-deco-credits-zES9MtHY.js → use-deco-credits-x58AfrXU.js} +1 -1
  283. package/dist/client/assets/{use-decopilot-events-CT-KDwdn.js → use-decopilot-events-BZQXzmAo.js} +1 -1
  284. package/dist/client/assets/{use-delete-connection-DZ7crG9-.js → use-delete-connection-CzvLG4mr.js} +1 -1
  285. package/dist/client/assets/{use-deployment-admin-BeTjWkAK.js → use-deployment-admin-BmH0eskZ.js} +1 -1
  286. package/dist/client/assets/{use-fast-preview-draft-url-COMCpHrX.js → use-fast-preview-draft-url-DFL8djh0.js} +1 -1
  287. package/dist/client/assets/{use-file-configs-pdZuotlv.js → use-file-configs-DRP3Y7X_.js} +1 -1
  288. package/dist/client/assets/{use-infinite-scroll-DnGD1R8b.js → use-infinite-scroll-BjVQV3DR.js} +1 -1
  289. package/dist/client/assets/{use-join-requests-BEGCihjr.js → use-join-requests-B6dqmlCQ.js} +1 -1
  290. package/dist/client/assets/{use-main-panel-tabs-Bpkxmz8h.js → use-main-panel-tabs-sy9nYCqA.js} +1 -1
  291. package/dist/client/assets/{use-mcp-auth-status-DLCr3Kqf.js → use-mcp-auth-status-Cjd2QrWU.js} +1 -1
  292. package/dist/client/assets/{use-mcp-client-BBZSxs6C.js → use-mcp-client-CqsHeShn.js} +1 -1
  293. package/dist/client/assets/{use-mcp-prompts-H_Vokl6u.js → use-mcp-prompts-D2YpCb1K.js} +1 -1
  294. package/dist/client/assets/{use-mcp-tools-Cg0wIfyk.js → use-mcp-tools-CHvaFbLg.js} +1 -1
  295. package/dist/client/assets/{use-members-DKCQ0oPO.js → use-members-BIhBY7mT.js} +1 -1
  296. package/dist/client/assets/{use-mobile-DbgNrrqI.js → use-mobile-3MM_rw4D.js} +1 -1
  297. package/dist/client/assets/{use-navigate-to-agent-Dun0QU31.js → use-navigate-to-agent-PjEm7mol.js} +1 -1
  298. package/dist/client/assets/use-new-blocks-editor-BAZ5qlTk.js +1 -0
  299. package/dist/client/assets/{use-open-billing-url-BmquHyqj.js → use-open-billing-url-CVEaCqtR.js} +1 -1
  300. package/dist/client/assets/{use-org-auth-client-6HmmNabp.js → use-org-auth-client-DM3Q5_fm.js} +1 -1
  301. package/dist/client/assets/{use-org-fs-CxttG7Pt.js → use-org-fs-DazA0BMP.js} +1 -1
  302. package/dist/client/assets/{use-org-repo-syncs-D5HIk-ZZ.js → use-org-repo-syncs-DGjVBBAK.js} +1 -1
  303. package/dist/client/assets/{use-org-sso-BX4qCh7f.js → use-org-sso-DGy0uwEN.js} +1 -1
  304. package/dist/client/assets/{use-organization-roles-DU2y95r1.js → use-organization-roles-Bjw-G0xx.js} +1 -1
  305. package/dist/client/assets/{use-organization-settings-xVkX8dA1.js → use-organization-settings-DbPbYeMx.js} +1 -1
  306. package/dist/client/assets/{use-panel-navigate-CApSLLZU.js → use-panel-navigate-DH6_TAsx.js} +1 -1
  307. package/dist/client/assets/{use-project-scope-Dyp4qS88.js → use-project-scope-Bgnjdhs7.js} +1 -1
  308. package/dist/client/assets/{use-releases-DEoc2p-o.js → use-releases-DQGDjOy5.js} +1 -1
  309. package/dist/client/assets/{use-reports-diagnostic-8Wf5_klp.js → use-reports-diagnostic-BASyyQU9.js} +1 -1
  310. package/dist/client/assets/{use-secrets-CUhYMZ9x.js → use-secrets-B41nk4LH.js} +1 -1
  311. package/dist/client/assets/{use-section-preview-base-yqXj5fei.js → use-section-preview-base-DKahorN-.js} +1 -1
  312. package/dist/client/assets/{use-session-runtime-CLgEdkpj.js → use-session-runtime-CsLaMszW.js} +1 -1
  313. package/dist/client/assets/{use-tags-CKb_jCnx.js → use-tags-BQ9peM4A.js} +1 -1
  314. package/dist/client/assets/{use-task-board-analytics-ColxOhDZ.js → use-task-board-analytics-Co6FjpoI.js} +1 -1
  315. package/dist/client/assets/{use-task-board-events-CbvOWdwS.js → use-task-board-events-BsviWCWn.js} +1 -1
  316. package/dist/client/assets/{use-task-metadata-BPDOVDpN.js → use-task-metadata-DvgRil5z.js} +1 -1
  317. package/dist/client/assets/{use-thread-analytics-BZ_Fi9zH.js → use-thread-analytics-Bf4bUeLT.js} +1 -1
  318. package/dist/client/assets/{use-thread-outputs-Dhes5ji5.js → use-thread-outputs-CvWfZHjR.js} +1 -1
  319. package/dist/client/assets/useInfiniteQuery-TQWsreUe.js +1 -0
  320. package/dist/client/assets/{useQueries-Dod3Msoc.js → useQueries-CIVnwtOu.js} +1 -1
  321. package/dist/client/assets/useSuspenseInfiniteQuery-DMyZCSsI.js +1 -0
  322. package/dist/client/assets/{users-D6Guq03K.js → users-2Adoo8D9.js} +1 -1
  323. package/dist/client/assets/{utils-p81_LpHp.js → utils-BeoNvR__.js} +1 -1
  324. package/dist/client/assets/{variant-calendar-Bl3Gfrjw.js → variant-calendar-C6HvphcB.js} +1 -1
  325. package/dist/client/assets/{variant-matcher-override-N87qA3jA.js → variant-matcher-override-De1zsqbc.js} +1 -1
  326. package/dist/client/assets/{view-mode-toggle-YzkFzhAw.js → view-mode-toggle-DtqPFP6s.js} +1 -1
  327. package/dist/client/assets/{virtual-mcp-C_6-jZH0.js → virtual-mcp-Cr9A-Wo0.js} +1 -1
  328. package/dist/client/index.html +1 -1
  329. package/dist/server/cli.js +3 -3
  330. package/dist/server/server.js +3 -3
  331. package/package.json +1 -1
  332. package/dist/client/assets/add-connection-dialog-BDmVVdAH.js +0 -1
  333. package/dist/client/assets/agent-app-Bz1gHurO.js +0 -1
  334. package/dist/client/assets/agent-deck-TlnGkppx.js +0 -1
  335. package/dist/client/assets/agent-library-DK5SHk03.js +0 -1
  336. package/dist/client/assets/agent-library-file-n_1fTyDg.js +0 -1
  337. package/dist/client/assets/agent-settings-ftLczm87.js +0 -1
  338. package/dist/client/assets/agent-site-editor-code-CGv8jkJ-.js +0 -2
  339. package/dist/client/assets/agent-view-DXgW378L.js +0 -1
  340. package/dist/client/assets/api-keys-B_z5NdV5.js +0 -1
  341. package/dist/client/assets/flat-project-fHTyql_b.js +0 -1
  342. package/dist/client/assets/library-Bfu2cwxp.js +0 -1
  343. package/dist/client/assets/project-reports-foqi6O3G.js +0 -1
  344. package/dist/client/assets/project-tasks-BxEPOlxu.js +0 -1
  345. package/dist/client/assets/record-editor-CICwwkmm.js +0 -1
  346. package/dist/client/assets/reports-BCTdFJMv.js +0 -1
  347. package/dist/client/assets/route-CZeuStCH.js +0 -1
  348. package/dist/client/assets/shell-layout-Cwzef2Ue.js +0 -1
  349. package/dist/client/assets/tasks-dS4cuBwI.js +0 -1
  350. package/dist/client/assets/use-new-blocks-editor-CLe9Kg_9.js +0 -1
  351. package/dist/client/assets/useInfiniteQuery-LLjBr47W.js +0 -1
  352. package/dist/client/assets/useSuspenseInfiniteQuery-ePGI4U5j.js +0 -1
@@ -1 +1 @@
1
- import{c as n,l as f,j as i,bg as N,bf as y,aw as S,bh as v,bi as $,bl as w,bk as C}from"./index-C95CzY3C.js";import{i as k}from"./X-Ccy7mqMZ.js";function E(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(C,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(R,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs(w,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none rounded-lg",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,O as a,E as b,P as c,_ as d};
1
+ import{c as n,l as f,j as i,bg as N,bf as y,aw as S,bh as v,bi as $,bl as w,bk as C}from"./index-B9dD9jj0.js";import{i as k}from"./X-NPE_cXRR.js";function E(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(C,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(R,{}),e[6]=m):m=e[6];const x=p==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",b=p==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs(w,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none rounded-lg",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,O as a,E as b,P as c,_ as d};
@@ -0,0 +1 @@
1
+ import{c as R,b as V,e as Qe,j as n,B as F,t as We,bP as he,a6 as Nt,a as Ke,y as Yt,D as _t,K as He,bQ as Qt,bR as Xt,V as Be,l as dt,aL as Zt,p as pt,bS as en,r as G,a4 as tn,a5 as re,d as At,X as ht,z as Pt,m as Ue,q as ut,ay as Ct,bT as nn,aE as sn,aJ as yt,x as on,bU as an,bV as rn,bW as ln,bX as cn,bY as dn,Z as un,u as mn,_ as fn,bZ as hn,b_ as gn,k as Et,b$ as lt,c0 as pn,c1 as yn,O as bn,c2 as xn}from"./index-B9dD9jj0.js";import{A as at}from"./avatar-UFbMnkmr.js";import{t as Ot}from"./Palette-AyH3xXYO.js";import{i as wn}from"./UserSquare-nGw6lX43.js";import{ar as Sn,I as vn,y as ct,a4 as jn,U as ie,C as kn,as as Tn,n as bt,g as Nn,m as _n,l as An,at as Pn,h as Cn}from"./agent-icon-TQUkqPJj.js";import{s as En}from"./XClose-CMTvfCel.js";import{D as On}from"./download-app-dialog-B7zcmkcH.js";import{a as In,u as Ln}from"./use-project-scope-Bgnjdhs7.js";import{u as It,a as $n}from"./use-panel-navigate-DH6_TAsx.js";import{i as le}from"./CheckCircle-jESFBkr7.js";import{i as ot}from"./Monitor01-50nhII2F.js";import{i as ce}from"./ZoomOut-xQj4oorm.js";import{c as Lt,d as $t,b as Dt,D as Rt,h as Dn,e as Rn}from"./dialog-Mg_Z3ES1.js";import{s as xt}from"./Plus-DP7AHtKt.js";import{a as Mn}from"./Tool01-D2y7RTX1.js";import{b as de,e as Je,d as Fn,C as zn,c as qn,a as Bn}from"./command-D1RoIxg2.js";import{I as Kn}from"./integration-icon-C5NBXdpz.js";import{P as Un}from"./project-icon-CmV-Y1UZ.js";import{a as Hn,m as Gn}from"./use-mcp-client-CqsHeShn.js";import{u as Jn,a as Vn,n as Wn}from"./new-project-dialog-BejzbVG2.js";import{S as Yn,u as Qn}from"./thread-intent-UQGFcX_y.js";import{u as Xn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Zn}from"./required-auth-layout-BPzqc-yZ.js";import{A as es}from"./autosend-h1h21hnM.js";import{u as ts,a as ns,b as ss,c as os}from"./thread-route-CowkfwAl.js";import{u as is}from"./use-org-sso-DGy0uwEN.js";function as(t){const e=R.c(49),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=V();let d;e[0]!==a||e[1]!==r?(d=async()=>{const m=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),P=await m.json();if(!m.ok||!P.success)throw new Error(P.error??r("common.autoDomainJoinScreen.joinError"));return P},e[0]=a,e[1]=r,e[2]=d):d=e[2];let f;e[3]!==a?(f=m=>{window.location.href=`/${m.slug??a}`},e[3]=a,e[4]=f):f=e[4];let h;e[5]!==r?(h=m=>{We.error(m instanceof Error?m.message:r("common.autoDomainJoinScreen.joinError"))},e[5]=r,e[6]=h):h=e[6];let w;e[7]!==d||e[8]!==f||e[9]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[7]=d,e[8]=f,e[9]=h,e[10]=w):w=e[10];const c=Qe(w),x=rs;let g;e[11]!==o||e[12]!==s?(g=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[11]=o,e[12]=s,e[13]=g):g=e[13];let y;e[14]!==s||e[15]!==r?(y=r("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=r,e[16]=y):y=e[16];let l;e[17]!==y?(l=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[17]=y,e[18]=l):l=e[18];let u;e[19]!==i||e[20]!==r?(u=r("common.autoDomainJoinScreen.joinDescription",{domain:i}),e[19]=i,e[20]=r,e[21]=u):u=e[21];let p;e[22]!==u?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[22]=u,e[23]=p):p=e[23];let b;e[24]!==l||e[25]!==p?(b=n.jsxs("div",{className:"space-y-2",children:[l,p]}),e[24]=l,e[25]=p,e[26]=b):b=e[26];let S;e[27]!==c?(S=()=>c.mutate(),e[27]=c,e[28]=S):S=e[28];let v;e[29]!==c.isPending||e[30]!==s||e[31]!==r?(v=c.isPending?r("common.autoDomainJoinScreen.joining"):r("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=r,e[32]=v):v=e[32];let N;e[33]!==c.isPending||e[34]!==S||e[35]!==v?(N=n.jsx(F,{onClick:S,disabled:c.isPending,children:v}),e[33]=c.isPending,e[34]=S,e[35]=v,e[36]=N):N=e[36];const A=c.isPending;let _;e[37]!==r?(_=r("common.goHome"),e[37]=r,e[38]=_):_=e[38];let j;e[39]!==c.isPending||e[40]!==_?(j=n.jsx(F,{variant:"ghost",onClick:x,disabled:A,children:_}),e[39]=c.isPending,e[40]=_,e[41]=j):j=e[41];let T;e[42]!==N||e[43]!==j?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,j]}),e[42]=N,e[43]=j,e[44]=T):T=e[44];let k;return e[45]!==b||e[46]!==T||e[47]!==g?(k=n.jsxs(he,{children:[g,b,T]}),e[45]=b,e[46]=T,e[47]=g,e[48]=k):k=e[48],k}function rs(){window.location.href="/"}function wt(t){const e=R.c(25),{orgSlug:s,orgName:a,reason:o}=t,i=V(),r=ls,d=o==="not-found",f=d?wn:Nt;let h;e[0]!==d||e[1]!==i?(h=i(d?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=d,e[1]=i,e[2]=h):h=e[2];const w=h;let c;e[3]!==d||e[4]!==a||e[5]!==s||e[6]!==i?(c=d?n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??s}),".",n.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=d,e[4]=a,e[5]=s,e[6]=i,e[7]=c):c=e[7];const x=c;let g;e[8]!==f?(g=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(f,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=f,e[9]=g):g=e[9];let y;e[10]!==w?(y=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=y):y=e[11];let l;e[12]!==x?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[12]=x,e[13]=l):l=e[13];let u;e[14]!==y||e[15]!==l?(u=n.jsxs("div",{className:"space-y-2",children:[y,l]}),e[14]=y,e[15]=l,e[16]=u):u=e[16];let p;e[17]!==i?(p=i("common.goHome"),e[17]=i,e[18]=p):p=e[18];let b;e[19]!==p?(b=n.jsx(F,{onClick:r,children:p}),e[19]=p,e[20]=b):b=e[20];let S;return e[21]!==g||e[22]!==u||e[23]!==b?(S=n.jsxs(he,{children:[g,u,b]}),e[21]=g,e[22]=u,e[23]=b,e[24]=S):S=e[24],S}function ls(){window.location.href="/"}function cs(t){const e=R.c(59),{invitationId:s,orgName:a,orgSlug:o,orgLogo:i}=t,r=V();let d;e[0]!==s?(d=async()=>{const E=await Ke.organization.acceptInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[0]=s,e[1]=d):d=e[1];let f;e[2]!==o?(f=()=>{Yt(),window.location.href=`/${o}`},e[2]=o,e[3]=f):f=e[3];let h;e[4]!==r?(h=E=>{We.error(E instanceof Error?E.message:r("common.pendingInviteScreen.failedToAccept"))},e[4]=r,e[5]=h):h=e[5];let w;e[6]!==d||e[7]!==f||e[8]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[6]=d,e[7]=f,e[8]=h,e[9]=w):w=e[9];const c=Qe(w);let x;e[10]!==s?(x=async()=>{const E=await Ke.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=x):x=e[11];let g,y;e[12]!==r?(g=()=>{We.success(r("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},y=E=>{We.error(E instanceof Error?E.message:r("common.pendingInviteScreen.failedToDecline"))},e[12]=r,e[13]=g,e[14]=y):(g=e[13],y=e[14]);let l;e[15]!==x||e[16]!==g||e[17]!==y?(l={mutationFn:x,onSuccess:g,onError:y},e[15]=x,e[16]=g,e[17]=y,e[18]=l):l=e[18];const u=Qe(l),p=c.isPending||u.isPending;let b;e[19]!==i||e[20]!==a?(b=i?n.jsx(at,{url:i,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Sn,{className:"h-6 w-6 text-primary"})}),e[19]=i,e[20]=a,e[21]=b):b=e[21];let S;e[22]!==a||e[23]!==r?(S=r("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=r,e[24]=S):S=e[24];let v;e[25]!==S?(v=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=v):v=e[26];let N;e[27]!==r?(N=r("common.pendingInviteScreen.acceptDescription"),e[27]=r,e[28]=N):N=e[28];let A;e[29]!==N?(A=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=A):A=e[30];let _;e[31]!==v||e[32]!==A?(_=n.jsxs("div",{className:"space-y-2",children:[v,A]}),e[31]=v,e[32]=A,e[33]=_):_=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let T;e[36]!==c.isPending||e[37]!==r?(T=c.isPending?r("common.pendingInviteScreen.acceptingButton"):r("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=r,e[38]=T):T=e[38];let k;e[39]!==p||e[40]!==j||e[41]!==T?(k=n.jsx(F,{onClick:j,disabled:p,children:T}),e[39]=p,e[40]=j,e[41]=T,e[42]=k):k=e[42];let m;e[43]!==u?(m=()=>u.mutate(),e[43]=u,e[44]=m):m=e[44];let P;e[45]!==u.isPending||e[46]!==r?(P=u.isPending?r("common.pendingInviteScreen.decliningButton"):r("common.pendingInviteScreen.declineButton"),e[45]=u.isPending,e[46]=r,e[47]=P):P=e[47];let O;e[48]!==p||e[49]!==m||e[50]!==P?(O=n.jsx(F,{variant:"ghost",onClick:m,disabled:p,children:P}),e[48]=p,e[49]=m,e[50]=P,e[51]=O):O=e[51];let C;e[52]!==k||e[53]!==O?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[k,O]}),e[52]=k,e[53]=O,e[54]=C):C=e[54];let I;return e[55]!==_||e[56]!==C||e[57]!==b?(I=n.jsxs(he,{children:[b,_,C]}),e[55]=_,e[56]=C,e[57]=b,e[58]=I):I=e[58],I}function ds(t){const e=R.c(23),{orgName:s,orgLogo:a}=t,o=V();let i;e[0]!==a||e[1]!==s?(i=a?n.jsx(at,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(vn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=s,e[2]=i):i=e[2];let r;e[3]!==o?(r=o("common.requestPendingScreen.title"),e[3]=o,e[4]=r):r=e[4];let d;e[5]!==r?(d=n.jsx("h3",{className:"text-lg font-medium",children:r}),e[5]=r,e[6]=d):d=e[6];let f;e[7]!==s||e[8]!==o?(f=o("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=o,e[9]=f):f=e[9];let h;e[10]!==f?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=h):h=e[11];let w;e[12]!==d||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[d,h]}),e[12]=d,e[13]=h,e[14]=w):w=e[14];let c;e[15]!==o?(c=o("common.goHome"),e[15]=o,e[16]=c):c=e[16];let x;e[17]!==c?(x=n.jsx(F,{variant:"ghost",onClick:us,children:c}),e[17]=c,e[18]=x):x=e[18];let g;return e[19]!==i||e[20]!==w||e[21]!==x?(g=n.jsxs(he,{children:[i,w,x]}),e[19]=i,e[20]=w,e[21]=x,e[22]=g):g=e[22],g}function us(){window.location.href="/"}function ms(t){const e=R.c(45),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=V();let d;e[0]!==a?(d=async()=>{const k=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),m=await k.json();if(!k.ok||!m.success)throw new Error(m.error??"Failed to request access");return m},e[0]=a,e[1]=d):d=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=hs,e[2]=f):f=e[2];let h;e[3]!==r?(h=k=>{We.error(k instanceof Error?k.message:r("common.requestToJoinScreen.failedToRequest"))},e[3]=r,e[4]=h):h=e[4];let w;e[5]!==d||e[6]!==h?(w={mutationFn:d,onSuccess:f,onError:h},e[5]=d,e[6]=h,e[7]=w):w=e[7];const c=Qe(w);let x;e[8]!==o||e[9]!==s?(x=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[8]=o,e[9]=s,e[10]=x):x=e[10];let g;e[11]!==s||e[12]!==r?(g=r("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=r,e[13]=g):g=e[13];let y;e[14]!==g?(y=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[14]=g,e[15]=y):y=e[15];let l;e[16]!==i||e[17]!==r?(l=r("common.requestToJoinScreen.description",{domain:i}),e[16]=i,e[17]=r,e[18]=l):l=e[18];let u;e[19]!==l?(u=n.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[19]=l,e[20]=u):u=e[20];let p;e[21]!==y||e[22]!==u?(p=n.jsxs("div",{className:"space-y-2",children:[y,u]}),e[21]=y,e[22]=u,e[23]=p):p=e[23];let b;e[24]!==c?(b=()=>c.mutate(),e[24]=c,e[25]=b):b=e[25];let S;e[26]!==c.isPending||e[27]!==r?(S=c.isPending?r("common.requestToJoinScreen.requesting"):r("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=r,e[28]=S):S=e[28];let v;e[29]!==c.isPending||e[30]!==b||e[31]!==S?(v=n.jsx(F,{onClick:b,disabled:c.isPending,children:S}),e[29]=c.isPending,e[30]=b,e[31]=S,e[32]=v):v=e[32];const N=c.isPending;let A;e[33]!==r?(A=r("common.goHome"),e[33]=r,e[34]=A):A=e[34];let _;e[35]!==c.isPending||e[36]!==A?(_=n.jsx(F,{variant:"ghost",onClick:fs,disabled:N,children:A}),e[35]=c.isPending,e[36]=A,e[37]=_):_=e[37];let j;e[38]!==v||e[39]!==_?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,_]}),e[38]=v,e[39]=_,e[40]=j):j=e[40];let T;return e[41]!==p||e[42]!==j||e[43]!==x?(T=n.jsxs(he,{children:[x,p,j]}),e[41]=p,e[42]=j,e[43]=x,e[44]=T):T=e[44],T}function fs(){window.location.href="/"}function hs(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function gs(t){const e=R.c(7);let s;e[0]!==t?(s=He.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const i=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!i.ok)throw new Error(`org-access-status failed (${i.status})`);return await i.json()},e[2]=t,e[3]=a):a=e[3];let o;return e[4]!==s||e[5]!==a?(o={queryKey:s,queryFn:a,refetchOnWindowFocus:!1},e[4]=s,e[5]=a,e[6]=o):o=e[6],_t(o)}function ps({orgSlug:t}){const{data:e}=gs(t);if(e.status!=="member"){Qt()?.org===t&&Xt();const s=localStorage.getItem(Be.lastOrgSlug())===t;if(s&&localStorage.removeItem(Be.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(wt,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(cs,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(as,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(ms,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(ds,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(wt,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Mt(t){const e=R.c(42),{ariaLabel:s,dismissLabel:a,eyebrow:o,title:i,description:r,icon:d,children:f,footerLeading:h,actions:w,onDismiss:c,tone:x}=t,g=x===void 0?"neutral":x,y=h||w;let l;e[0]!==g?(l=g==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=g,e[1]=l):l=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(En,{size:14}),e[2]=u):u=e[2];let p;e[3]!==a||e[4]!==c?(p=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:u}),e[3]=a,e[4]=c,e[5]=p):p=e[5];const b=d&&"flex items-start gap-3",S=f&&"pb-3";let v;e[6]!==b||e[7]!==S?(v=dt("p-4 pr-11",b,S),e[6]=b,e[7]=S,e[8]=v):v=e[8];let N;e[9]!==d?(N=d&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:d}),e[9]=d,e[10]=N):N=e[10];let A;e[11]!==o?(A=o&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[11]=o,e[12]=A):A=e[12];let _;e[13]!==i?(_=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:i}),e[13]=i,e[14]=_):_=e[14];let j;e[15]!==r?(j=r&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:r}),e[15]=r,e[16]=j):j=e[16];let T;e[17]!==_||e[18]!==j||e[19]!==A?(T=n.jsxs("div",{children:[A,_,j]}),e[17]=_,e[18]=j,e[19]=A,e[20]=T):T=e[20];let k;e[21]!==f?(k=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=k):k=e[22];let m;e[23]!==T||e[24]!==k?(m=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,k]}),e[23]=T,e[24]=k,e[25]=m):m=e[25];let P;e[26]!==m||e[27]!==v||e[28]!==N?(P=n.jsxs("div",{className:v,children:[N,m]}),e[26]=m,e[27]=v,e[28]=N,e[29]=P):P=e[29];let O;e[30]!==w||e[31]!==h||e[32]!==y||e[33]!==g?(O=y&&n.jsxs("div",{className:dt("flex items-center justify-between gap-3 px-4 py-2.5",g==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=y,e[33]=g,e[34]=O):O=e[34];let C;return e[35]!==s||e[36]!==P||e[37]!==O||e[38]!==l||e[39]!==p||e[40]!==g?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":g,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[l,p,P,O]}),e[35]=s,e[36]=P,e[37]=O,e[38]=l,e[39]=p,e[40]=g,e[41]=C):C=e[41],C}const ys={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function Ft(t){return`[data-tour="${ys[t]}"]`}const bs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function xs(t){return bs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ws(t,e){return xs(e).map(s=>({element:Ft(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const Ss=Ft("switcher"),vs=30;function zt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function js(t,e){return ws(t,e).filter(s=>typeof s.element=="string"&&zt(s.element))}function ks(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(s,{driver:a})=>{if(s.footerButtons.querySelector(".layout-tour-skip"))return;const o=document.createElement("button");o.type="button",o.className="driver-popover-footer-btn layout-tour-skip",o.textContent=t("layoutTour.skip"),o.addEventListener("click",()=>a.destroy()),s.footerButtons.insertBefore(o,s.footerButtons.firstChild)},onDestroyed:()=>{Ve=!1},steps:e}}let Ve=!1;async function Ts(){return(await Zt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function Ns(t,e){if(Ve)return;Ve=!0;let s=0;const a=()=>{if(!zt(Ss)&&s++<vs){requestAnimationFrame(a);return}const o=js(t,e);if(o.length===0){Ve=!1;return}Ts().then(i=>{i(ks(t,o)).drive()}).catch(()=>{Ve=!1})};a()}function _s(t){return t!=="off"}function ui(t){if(!t.hasSource)return[];const e=["site-editor"];return _s(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function qt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function mi(t){return t.reportsOnly&&!t.onReportAgent&&qt(t.tabId)}const As=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:ot,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:ct,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:jn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:pt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:ie,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:ot,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:ot,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:le,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:ce,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:ce,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:ie,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:en,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:ot,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:ie,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:le,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:ce,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:ie,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:le,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:ce,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:le,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:ie,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:ce,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:ie,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:le,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:ce,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:ie,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:le,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:ce,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:ie,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:le,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:pt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:ce,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:le,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:ie,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:ie,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:kn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Bt=As,it="studio.release-feed.v1",mt=new Set;let me="",fe={},ft=!1;function Ps(){if(ft)return me||"{}";try{return localStorage.getItem(it)??"{}"}catch{return me||"{}"}}function Kt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=Ps();return t!==me&&(me=t,fe=Kt(t)),fe}function Cs(t){mt.add(t);const e=s=>{if(!(s.key!==it&&s.key!==null)){try{const a=localStorage.getItem(it)??"{}",i={...Kt(a),...fe};fe=i,me=JSON.stringify(i)}catch{}t()}};return window.addEventListener("storage",e),()=>{mt.delete(t),window.removeEventListener("storage",e)}}function Es(t){fe=t,me=JSON.stringify(t);try{localStorage.setItem(it,me),ft=!1}catch{ft=!0}mt.forEach(e=>e())}function Os(){const t=R.c(7),e=G.useSyncExternalStore(Cs,St,St);let s;t[0]!==e?(s=f=>!!e[f],t[0]=e,t[1]=s):s=t[1];const a=s,o=Is;let i;t[2]!==e?(i=Bt.reduce((f,h)=>e[h.id]?f:f+1,0),t[2]=e,t[3]=i):i=t[3];const r=i;let d;return t[4]!==a||t[5]!==r?(d={isSeen:a,markSeen:o,unseenCount:r},t[4]=a,t[5]=r,t[6]=d):d=t[6],d}function Is(t){fe[t]||Es({...fe,[t]:{seenAt:new Date().toISOString()}})}const vt=new Map;function Ut(t){let e=vt.get(t);return e||(e={now:Date.now(),subscribers:new Set,intervalId:null},vt.set(t,e)),e}function Ls(t,e){const s=Ut(t);return s.subscribers.add(e),s.intervalId===null&&(s.intervalId=setInterval(()=>{s.now=Date.now();for(const a of s.subscribers)a()},t)),()=>{s.subscribers.delete(e),s.subscribers.size===0&&s.intervalId!==null&&(clearInterval(s.intervalId),s.intervalId=null)}}function $s(t){const e=R.c(4),s=t===void 0?6e4:t;let a;e[0]!==s?(a=()=>Ut(s).now,e[0]=s,e[1]=a):a=e[1];const o=a;let i;return e[2]!==s?(i=r=>Ls(s,r),e[2]=s,e[3]=i):i=e[3],G.useSyncExternalStore(i,o,o)}const Ds=720*60*60*1e3,Rs=10080*60*1e3;function Ms(t){const[e,s,a]=t.split("-").map(Number);return!e||!s||!a?new Date(t).getTime():new Date(e,s-1,a).getTime()}function Fs(t){const e=Bt[0];if(!e)return null;const s=Ms(e.date),a=t-s;return a<0||a>Ds?null:e}function zs(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function qs(t,e){const s=zs(t);return s===null?!1:e-s>=Rs}function Bs(){const t=R.c(53),e=V(),s=In(),a=tn(),o=It(),i=!!s,r=a===re.home&&!s;let d;t[0]!==o||t[1]!==i?(d=i&&!!o&&qt(o),t[0]=o,t[1]=i,t[2]=d):d=t[2];const f=d,{data:h}=Ke.useSession(),{isSeen:w,markSeen:c}=Os(),[x,g]=G.useState(!1),y=$s(6e4);let l,u,p;if(t[3]!==w||t[4]!==y||t[5]!==h?.user?.createdAt){p=Symbol.for("react.early_return_sentinel");e:{if(l=Fs(y),!l){p=null;break e}if(!qs(h?.user?.createdAt,y)){p=null;break e}u=w(l.id)}t[3]=w,t[4]=y,t[5]=h?.user?.createdAt,t[6]=l,t[7]=u,t[8]=p}else l=t[6],u=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;if(u)return null;let b;t[9]!==l.id||t[10]!==i||t[11]!==c||t[12]!==r||t[13]!==f||t[14]!==e?(b=()=>{c(l.id),Ns(e,{onOrgHome:r,inProject:i,onSiteEditor:f})},t[9]=l.id,t[10]=i,t[11]=c,t[12]=r,t[13]=f,t[14]=e,t[15]=b):b=t[15];const S=b;let v;t[16]!==e?(v=e("announcements.release.ariaLabel"),t[16]=e,t[17]=v):v=t[17];let N;t[18]!==e?(N=e("announcements.release.dismiss"),t[18]=e,t[19]=N):N=t[19];const A=l.eyebrow,_=l.title;let j;t[20]!==l.id||t[21]!==c?(j=()=>c(l.id),t[20]=l.id,t[21]=c,t[22]=j):j=t[22];let T;t[23]!==l.id||t[24]!==l.learnMoreHref||t[25]!==c||t[26]!==e?(T=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[23]=l.id,t[24]=l.learnMoreHref,t[25]=c,t[26]=e,t[27]=T):T=t[27];let k;t[28]!==l.cta||t[29]!==l.id||t[30]!==c||t[31]!==S?(k=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(F,{size:"sm",onClick:S,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>g(!0),children:l.cta.label}):null,t[28]=l.cta,t[29]=l.id,t[30]=c,t[31]=S,t[32]=k):k=t[32];let m;t[33]!==l.bullets?(m=l.bullets.map(Ks),t[33]=l.bullets,t[34]=m):m=t[34];let P;t[35]!==m?(P=n.jsx("ul",{className:"flex flex-col gap-3",children:m}),t[35]=m,t[36]=P):P=t[36];let O;t[37]!==l.id||t[38]!==c?(O=E=>{g(E),E||c(l.id)},t[37]=l.id,t[38]=c,t[39]=O):O=t[39];let C;t[40]!==x||t[41]!==O?(C=n.jsx(On,{open:x,onOpenChange:O}),t[40]=x,t[41]=O,t[42]=C):C=t[42];let I;return t[43]!==l.eyebrow||t[44]!==l.title||t[45]!==k||t[46]!==P||t[47]!==C||t[48]!==v||t[49]!==N||t[50]!==j||t[51]!==T?(I=n.jsxs(Mt,{ariaLabel:v,dismissLabel:N,eyebrow:A,title:_,onDismiss:j,footerLeading:T,actions:k,children:[P,C]}),t[43]=l.eyebrow,t[44]=l.title,t[45]=k,t[46]=P,t[47]=C,t[48]=v,t[49]=N,t[50]=j,t[51]=T,t[52]=I):I=t[52],I}function Ks(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Ht=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ue=Ht?"⌘":"Ctrl",J={commandPalette:{keys:[ue,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[ue,"["],description:"Back to previous"},focusChatInput:{keys:[ue,"L"],description:"Focus chat input"},saveAndFormat:{keys:[ue,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[ue,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[ue,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",ue,"S"],description:"New task"},toggleDaemon:{keys:[ue,"D"],description:"Toggle daemon logs"}},Us=[{label:"General",shortcuts:[J.commandPalette,J.keyboardShortcuts,J.back,J.newTask,J.toggleDaemon]},{label:"Editor",shortcuts:[J.saveAndFormat]},{label:"Chat",shortcuts:[J.focusChatInput,J.togglePlanMode,J.sendMessage,J.newLine]},{label:"Questions",shortcuts:[J.selectOption]},{label:"Monitoring",shortcuts:[J.applyFilter]}];function jt(t){return Ht?t.metaKey:t.ctrlKey}function Hs(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Gs(t){const e=R.c(11),{open:s,onOpenChange:a}=t,o=V();let i;e[0]!==o?(i=o("common.keyboardShortcutsDialog.title"),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==i?(r=n.jsx(Lt,{children:n.jsx($t,{children:i})}),e[2]=i,e[3]=r):r=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex flex-col gap-4",children:Us.map(Js)}),e[4]=d):d=e[4];let f;e[5]!==r?(f=n.jsxs(Dt,{className:"sm:max-w-md",children:[r,d]}),e[5]=r,e[6]=f):f=e[6];let h;return e[7]!==a||e[8]!==s||e[9]!==f?(h=n.jsx(Rt,{open:s,onOpenChange:a,children:f}),e[7]=a,e[8]=s,e[9]=f,e[10]=h):h=e[10],h}function Js(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Vs)})]},t.label)}function Vs(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Ws)})]},t.description)}function Ws(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const kt=8;function Ys(t){const{org:e}=ht(),s=Hn({connectionId:Pt,orgId:e.id,orgSlug:e.slug}),{data:a}=Ue({queryKey:He.globalSearch(e.id,t,kt),enabled:!!s&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!s)return[];try{return(await s.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:kt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Qs(t){const e=R.c(195),{open:s,onOpenChange:a}=t,o=V(),i=At(),{org:r}=ht(),{projects:d,hasProjects:f}=Ln(),[h,w]=G.useState(""),c=G.useDeferredValue(h),x=Ys(c);let g;e[0]!==a?(g=()=>{a(!1),w("")},e[0]=a,e[1]=g):g=e[1];const y=g;let l;e[2]!==y?(l=(q,Y)=>{ut("command_palette_used",{kind:Y}),q(),y()},e[2]=y,e[3]=l):l=e[3];const u=l;let p;e[4]!==i||e[5]!==r.id||e[6]!==r.slug?(p=q=>{if(q.type==="connection"){if(!q.slug){i({to:"/$org/settings/connections",params:{org:r.slug},search:{tab:"all"}});return}i({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:q.slug}});return}if(q.type==="task"){i({to:re.tasks,params:{org:r.slug,taskKey:q.key??void 0}});return}const Y=Ct(r.id).id;nn(i,sn({org:r.slug,agentId:q.virtual_mcp_id??Y,superAgentId:Y}),{search:()=>({thread:q.id}),replace:!1})},e[4]=i,e[5]=r.id,e[6]=r.slug,e[7]=p):p=e[7];const b=p;let S;e[8]!==h?(S=[h],e[8]=h,e[9]=S):S=e[9];const v=S;let N,A,_,j,T,k,m,P,O,C,I,E,M;if(e[10]!==y||e[11]!==u||e[12]!==f||e[13]!==x||e[14]!==i||e[15]!==a||e[16]!==s||e[17]!==b||e[18]!==r.slug||e[19]!==d||e[20]!==v||e[21]!==o||e[22]!==h){const q=x.filter(Zs),Y=x.filter(Xs);let Q;e[36]!==r.slug?(Q={org:r.slug},e[36]=r.slug,e[37]=Q):Q=e[37];const D=Q;let X;e[38]!==o?(X=o("sidebar.navDestinations.home"),e[38]=o,e[39]=X):X=e[39];let Ge;e[40]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(Nn,{"aria-hidden":"true"}),e[40]=Ge):Ge=e[40];let oe;e[41]!==D||e[42]!==X?(oe={key:"home",label:X,icon:Ge,to:re.home,params:D},e[41]=D,e[42]=X,e[43]=oe):oe=e[43];let K;e[44]!==o?(K=o("sidebar.navDestinations.reports"),e[44]=o,e[45]=K):K=e[45];let Z;e[46]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx(_n,{"aria-hidden":"true"}),e[46]=Z):Z=e[46];let ee;e[47]!==D||e[48]!==K?(ee={key:"reports",label:K,icon:Z,to:re.reports,params:D},e[47]=D,e[48]=K,e[49]=ee):ee=e[49];let te;e[50]!==o?(te=o("sidebar.navDestinations.tasks"),e[50]=o,e[51]=te):te=e[51];let ne;e[52]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(bt,{"aria-hidden":"true"}),e[52]=ne):ne=e[52];let U;e[53]!==r.slug?(U={org:r.slug,taskKey:void 0},e[53]=r.slug,e[54]=U):U=e[54];let H;e[55]!==te||e[56]!==U?(H={key:"tasks",label:te,icon:ne,to:re.tasks,params:U},e[55]=te,e[56]=U,e[57]=H):H=e[57];let se;e[58]!==o?(se=o("sidebar.navDestinations.library"),e[58]=o,e[59]=se):se=e[59];let ae;e[60]===Symbol.for("react.memo_cache_sentinel")?(ae=n.jsx(An,{"aria-hidden":"true"}),e[60]=ae):ae=e[60];let L;e[61]!==D||e[62]!==se?(L={key:"library",label:se,icon:ae,to:re.library,params:D},e[61]=D,e[62]=se,e[63]=L):L=e[63];let z;e[64]!==o?(z=o("sidebar.navDestinations.discover"),e[64]=o,e[65]=z):z=e[65];let Xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(Pn,{"aria-hidden":"true"}),e[66]=Xe):Xe=e[66];let ge;e[67]!==D||e[68]!==z?(ge={key:"discover",label:z,icon:Xe,to:re.discover,params:D},e[67]=D,e[68]=z,e[69]=ge):ge=e[69];let Ze;e[70]!==oe||e[71]!==ee||e[72]!==H||e[73]!==L||e[74]!==ge?(Ze=[oe,ee,H,L,ge],e[70]=oe,e[71]=ee,e[72]=H,e[73]=L,e[74]=ge,e[75]=Ze):Ze=e[75];const rt=Ze;A=Fn,j=s,e[76]!==y||e[77]!==a?(T=$=>$?a(!0):y(),e[76]=y,e[77]=a,e[78]=T):T=e[78],e[79]!==o?(k=o("commandPalette.title"),e[79]=o,e[80]=k):k=e[80],e[81]!==o?(m=o("commandPalette.description"),e[81]=o,e[82]=m):m=e[82];let pe;e[83]!==o?(pe=o("commandPalette.placeholder"),e[83]=o,e[84]=pe):pe=e[84];let ye;e[85]!==o?(ye=o("commandPalette.placeholder"),e[85]=o,e[86]=ye):ye=e[86],e[87]!==pe||e[88]!==ye||e[89]!==h?(P=n.jsx(zn,{placeholder:pe,"aria-label":ye,value:h,onValueChange:w}),e[87]=pe,e[88]=ye,e[89]=h,e[90]=P):P=e[90],N=qn;let be;e[91]!==o?(be=o("commandPalette.empty"),e[91]=o,e[92]=be):be=e[92],e[93]!==be?(O=n.jsx(Bn,{children:be}),e[93]=be,e[94]=O):O=e[94];let xe;e[95]!==o?(xe=o("commandPalette.goTo"),e[95]=o,e[96]=xe):xe=e[96];let we;e[97]!==rt||e[98]!==u||e[99]!==i?(we=rt.map($=>n.jsxs(de,{onSelect:()=>u(()=>i({to:$.to,params:$.params}),"destination"),children:[$.icon,n.jsx("span",{children:$.label})]},$.key)),e[97]=rt,e[98]=u,e[99]=i,e[100]=we):we=e[100],e[101]!==xe||e[102]!==we?(C=n.jsx(Je,{heading:xe,children:we}),e[101]=xe,e[102]=we,e[103]=C):C=e[103],e[104]!==u||e[105]!==f||e[106]!==i||e[107]!==r.slug||e[108]!==d||e[109]!==o?(I=f&&n.jsx(Je,{heading:o("commandPalette.projects"),children:d.map($=>n.jsxs(de,{value:`project ${$.title}`,onSelect:()=>u(()=>i({to:re.projects,params:{org:r.slug,agentId:$.id}}),"project"),children:[n.jsx(Un,{icon:$.icon,name:$.title,"aria-hidden":"true"}),n.jsx("span",{children:$.title})]},$.id))}),e[104]=u,e[105]=f,e[106]=i,e[107]=r.slug,e[108]=d,e[109]=o,e[110]=I):I=e[110];let Se;e[111]!==o?(Se=o("commandPalette.actions"),e[111]=o,e[112]=Se):Se=e[112];let ve;e[113]!==o?(ve=o("commandPalette.newProject"),e[113]=o,e[114]=ve):ve=e[114];let je;e[115]!==u||e[116]!==i||e[117]!==D?(je=()=>u(()=>i({to:re.home,params:D}),"new_project"),e[115]=u,e[116]=i,e[117]=D,e[118]=je):je=e[118];let et;e[119]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(xt,{"aria-hidden":"true"}),e[119]=et):et=e[119];let ke;e[120]!==o?(ke=o("commandPalette.newProject"),e[120]=o,e[121]=ke):ke=e[121];let Te;e[122]!==ke?(Te=n.jsx("span",{children:ke}),e[122]=ke,e[123]=Te):Te=e[123];let Ne;e[124]!==ve||e[125]!==je||e[126]!==Te?(Ne=n.jsxs(de,{value:ve,onSelect:je,children:[et,Te]}),e[124]=ve,e[125]=je,e[126]=Te,e[127]=Ne):Ne=e[127];let _e;e[128]!==o?(_e=o("commandPalette.inviteTeammate"),e[128]=o,e[129]=_e):_e=e[129];let Ae;e[130]!==u||e[131]!==i||e[132]!==D?(Ae=()=>u(()=>i({to:"/$org/settings/members",params:D}),"invite"),e[130]=u,e[131]=i,e[132]=D,e[133]=Ae):Ae=e[133];let tt;e[134]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(Cn,{"aria-hidden":"true"}),e[134]=tt):tt=e[134];let Pe;e[135]!==o?(Pe=o("commandPalette.inviteTeammate"),e[135]=o,e[136]=Pe):Pe=e[136];let Ce;e[137]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ce):Ce=e[138];let Ee;e[139]!==_e||e[140]!==Ae||e[141]!==Ce?(Ee=n.jsxs(de,{value:_e,onSelect:Ae,children:[tt,Ce]}),e[139]=_e,e[140]=Ae,e[141]=Ce,e[142]=Ee):Ee=e[142];let Oe;e[143]!==o?(Oe=o("commandPalette.addConnection"),e[143]=o,e[144]=Oe):Oe=e[144];let Ie;e[145]!==u||e[146]!==i||e[147]!==D?(Ie=()=>u(()=>i({to:"/$org/settings/connections",params:D,search:{tab:"all"}}),"add_connection"),e[145]=u,e[146]=i,e[147]=D,e[148]=Ie):Ie=e[148];let nt;e[149]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=nt):nt=e[149];let Le;e[150]!==o?(Le=o("commandPalette.addConnection"),e[150]=o,e[151]=Le):Le=e[151];let $e;e[152]!==Le?($e=n.jsx("span",{children:Le}),e[152]=Le,e[153]=$e):$e=e[153];let De;e[154]!==Oe||e[155]!==Ie||e[156]!==$e?(De=n.jsxs(de,{value:Oe,onSelect:Ie,children:[nt,$e]}),e[154]=Oe,e[155]=Ie,e[156]=$e,e[157]=De):De=e[157];let Re;e[158]!==o?(Re=o("commandPalette.settings"),e[158]=o,e[159]=Re):Re=e[159];let Me;e[160]!==u||e[161]!==i||e[162]!==D?(Me=()=>u(()=>i({to:"/$org/settings/general",params:D}),"settings"),e[160]=u,e[161]=i,e[162]=D,e[163]=Me):Me=e[163];let st;e[164]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(Mn,{"aria-hidden":"true"}),e[164]=st):st=e[164];let Fe;e[165]!==o?(Fe=o("commandPalette.settings"),e[165]=o,e[166]=Fe):Fe=e[166];let ze;e[167]!==Fe?(ze=n.jsx("span",{children:Fe}),e[167]=Fe,e[168]=ze):ze=e[168];let qe;e[169]!==Re||e[170]!==Me||e[171]!==ze?(qe=n.jsxs(de,{value:Re,onSelect:Me,children:[st,ze]}),e[169]=Re,e[170]=Me,e[171]=ze,e[172]=qe):qe=e[172],e[173]!==Se||e[174]!==Ne||e[175]!==Ee||e[176]!==De||e[177]!==qe?(E=n.jsxs(Je,{heading:Se,children:[Ne,Ee,De,qe]}),e[173]=Se,e[174]=Ne,e[175]=Ee,e[176]=De,e[177]=qe,e[178]=E):E=e[178],M=q.length>0&&n.jsx(Je,{heading:o("commandPalette.connections"),children:q.map($=>n.jsxs(de,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>b($),"connection"),children:[n.jsx(Kn,{icon:$.icon,name:$.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title})]},`connection:${$.id}`))}),_=Y.length>0&&n.jsx(Je,{heading:o("commandPalette.results"),children:Y.map($=>n.jsxs(de,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>b($),$.type),children:[$.type==="thread"?n.jsx(Tn,{"aria-hidden":"true"}):n.jsx(bt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title}),$.type==="task"&&$.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:$.key})]},`${$.type}:${$.id}`))}),e[10]=y,e[11]=u,e[12]=f,e[13]=x,e[14]=i,e[15]=a,e[16]=s,e[17]=b,e[18]=r.slug,e[19]=d,e[20]=v,e[21]=o,e[22]=h,e[23]=N,e[24]=A,e[25]=_,e[26]=j,e[27]=T,e[28]=k,e[29]=m,e[30]=P,e[31]=O,e[32]=C,e[33]=I,e[34]=E,e[35]=M}else N=e[23],A=e[24],_=e[25],j=e[26],T=e[27],k=e[28],m=e[29],P=e[30],O=e[31],C=e[32],I=e[33],E=e[34],M=e[35];let B;e[179]!==N||e[180]!==_||e[181]!==O||e[182]!==C||e[183]!==I||e[184]!==E||e[185]!==M?(B=n.jsxs(N,{children:[O,C,I,E,M,_]}),e[179]=N,e[180]=_,e[181]=O,e[182]=C,e[183]=I,e[184]=E,e[185]=M,e[186]=B):B=e[186];let W;return e[187]!==A||e[188]!==j||e[189]!==T||e[190]!==k||e[191]!==m||e[192]!==P||e[193]!==B?(W=n.jsxs(A,{open:j,onOpenChange:T,title:k,description:m,children:[P,B]}),e[187]=A,e[188]=j,e[189]=T,e[190]=k,e[191]=m,e[192]=P,e[193]=B,e[194]=W):W=e[194],W}function Xs(t){return t.type!=="connection"}function Zs(t){return t.type==="connection"}const Ye=new Yn(!1);function eo(){Ye.set(!0)}function to(){Ye.set(!1)}function no(){const t=R.c(2),e=G.useSyncExternalStore(Ye.subscribe,Ye.get);let s;return t[0]!==e?(s=[e,Ye.set],t[0]=e,t[1]=s):s=t[1],s}const so=300*1e3,oo=2;function io(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function ao(t,e){return t.count>=oo&&t.version!==null&&t.version!==e}function ro(){const t=R.c(43),e=V(),s=Xn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:co},t[0]=a):a=t[0];const o=Qe(a);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={queryKey:He.appVersionCheck(),queryFn:lo,refetchInterval:so,refetchIntervalInBackground:!0,staleTime:0},t[1]=i):i=t[1];const{data:r,dataUpdatedAt:d}=Ue(i),[f,h]=G.useState(0);let w;t[2]===Symbol.for("react.memo_cache_sentinel")?(w={version:null,count:0},t[2]=w):w=t[2];const[c,x]=G.useState(w);d!==f&&(h(d),x(B=>io(B,r,"4.429.5")));const[g,y]=G.useState(null),l=s;let u;t[3]!==s||t[4]!==o?(u=()=>window.location.reload(),t[3]=s,t[4]=o,t[5]=u):u=t[5];const p=u,b="announcements.version.refresh";if(!ao(c,g))return null;let S;t[6]!==e?(S=e("announcements.version.ariaLabel"),t[6]=e,t[7]=S):S=t[7];let v;t[8]!==e?(v=e("announcements.version.dismiss"),t[8]=e,t[9]=v):v=t[9];let N;t[10]!==e?(N=e("announcements.version.eyebrow"),t[10]=e,t[11]=N):N=t[11];let A;t[12]!==e?(A=e("announcements.version.title"),t[12]=e,t[13]=A):A=t[13];const _="announcements.version.description";let j;t[14]!==e||t[15]!==_?(j=e(_),t[14]=e,t[15]=_,t[16]=j):j=t[16];let T;t[17]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(yt,{size:16}),t[17]=T):T=t[17];let k;t[18]!==c.version?(k=()=>y(c.version),t[18]=c.version,t[19]=k):k=t[19];let m;t[20]!==e?(m=e("announcements.version.currentSession",{version:"4.429.5"}),t[20]=e,t[21]=m):m=t[21];let P;t[22]!==b||t[23]!==e?(P=e(b),t[22]=b,t[23]=e,t[24]=P):P=t[24];const O=l;let C;t[25]!==O?(C=dt(O),t[25]=O,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(yt,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let E;t[29]!==p||t[30]!==l||t[31]!==P||t[32]!==I?(E=n.jsxs(F,{size:"sm",disabled:l,onClick:p,children:[P,I]}),t[29]=p,t[30]=l,t[31]=P,t[32]=I,t[33]=E):E=t[33];let M;return t[34]!==k||t[35]!==m||t[36]!==E||t[37]!==S||t[38]!==v||t[39]!==N||t[40]!==A||t[41]!==j?(M=n.jsx(Mt,{ariaLabel:S,dismissLabel:v,eyebrow:N,title:A,description:j,icon:T,tone:"system",onDismiss:k,footerLeading:m,actions:E}),t[34]=k,t[35]=m,t[36]=E,t[37]=S,t[38]=v,t[39]=N,t[40]=A,t[41]=j,t[42]=M):M=t[42],M}async function lo(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function co(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function uo(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const mo=Date.parse("2026-07-21T00:00:00Z"),Tt=t=>uo(Be.ptBrAnnouncementSeen(t));function fo(){const t=R.c(35),e=V(),[s,a]=on(),{data:o,isPending:i}=Ke.useSession(),r=o?.user,d=r?.id,f=r?.createdAt,h=f!=null&&new Date(f).getTime()<mo,w=an()==="pt-BR",c=!i&&!!d&&h&&w&&s.language==="en"&&!Tt(d).has(),[x,g]=G.useState(!1),[y,l]=G.useState(!1);!x&&!i&&(g(!0),c&&d&&(Tt(d).mark(),a(go),l(!0),ut("pt_br_auto_switch_shown")));let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=W=>{ut("pt_br_auto_switch_closed",{action:W}),l(!1)},t[0]=u):u=t[0];const p=u;let b;t[1]!==a?(b=()=>{a(ho),p("switch-back")},t[1]=a,t[2]=b):b=t[2];const S=b;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=W=>!W&&p("dismiss"),t[3]=v):v=t[3];let N;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=N):N=t[4];let A;t[5]!==e?(A=e("announcements.ptBr.title"),t[5]=e,t[6]=A):A=t[6];let _;t[7]!==A?(_=n.jsx($t,{children:A}),t[7]=A,t[8]=_):_=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let T;t[11]!==j?(T=n.jsx(Dn,{children:j}),t[11]=j,t[12]=T):T=t[12];let k;t[13]!==_||t[14]!==T?(k=n.jsxs(Lt,{children:[_,T]}),t[13]=_,t[14]=T,t[15]=k):k=t[15];let m;t[16]!==e?(m=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=m):m=t[17];let P;t[18]!==S||t[19]!==m?(P=n.jsx(F,{variant:"outline",onClick:S,children:m}),t[18]=S,t[19]=m,t[20]=P):P=t[20];let O;t[21]===Symbol.for("react.memo_cache_sentinel")?(O=()=>p("ok"),t[21]=O):O=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let I;t[24]!==C?(I=n.jsx(F,{onClick:O,children:C}),t[24]=C,t[25]=I):I=t[25];let E;t[26]!==P||t[27]!==I?(E=n.jsxs(Rn,{children:[P,I]}),t[26]=P,t[27]=I,t[28]=E):E=t[28];let M;t[29]!==E||t[30]!==k?(M=n.jsxs(Dt,{className:"sm:max-w-md",children:[N,k,E]}),t[29]=E,t[30]=k,t[31]=M):M=t[31];let B;return t[32]!==y||t[33]!==M?(B=n.jsx(Rt,{open:y,onOpenChange:v,children:M}),t[32]=y,t[33]=M,t[34]=B):B=t[34],B}function ho(t){return{...t,language:"en"}}function go(t){return{...t,language:"pt-BR"}}function po(t){const e=rn(t);return typeof e=="string"?e:void 0}function yo(){return po("experiment-pipeline-check"),null}function bo(t){const e=R.c(1),{activeOrg:s}=t;if(!s)return null;ln(s.id,{name:s.name??void 0,slug:s.slug??void 0}),cn();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(yo,{}),e[0]=a):a=e[0],a}function xo(t){const{prev:e,virtualMcpId:s,decopilotId:a,savedLayout:o,opts:i,autosendValue:r}=t,d={mainpanel:void 0};s?d.virtualmcpid=s:e.virtualmcpid&&(d.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,w=(s??f)!==f;let c,x;return i?.panel?x=i.panel:o?(x=o.tab,o.sidepanel!==void 0&&(c=o.sidepanel),o.mainpanel!==void 0&&(d.mainpanel=o.mainpanel)):!w&&e.tabId&&!dn(e.tabId)&&(x=e.tabId),c!==void 0&&(d.sidepanel=c),i?.autosend&&(d.autosend=r),{tabId:x,search:d}}const Gt="studio:thread-layout:v4",wo=50;function Jt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function So(t,e,s,a=wo){const o=t.filter(([i])=>i!==e);for(o.push([e,Jt(s)]);o.length>a;)o.shift();return o}function gt(){try{const t=sessionStorage.getItem(Gt);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Vt(t){try{sessionStorage.setItem(Gt,JSON.stringify(t))}catch{}}function vo(t,e){t&&Vt(So(gt(),t,e))}function jo(t){if(!t)return null;const e=gt().find(([s])=>s===t);return e?Jt(e[1]):null}function fi(t){if(!t)return;const e=gt(),s=e.filter(([a])=>a!==t);s.length!==e.length&&Vt(s)}function Wt(t){return{queryKey:He.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function hi(t){const e=R.c(10);let s;e[0]!==t?(s=Wt(t),e[0]=t,e[1]=s):s=e[1];const a=Ue(s);let o;e[2]!==a.data?.prompts?(o=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=o):o=e[3];let i;e[4]!==a.data?.tiles?(i=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=i):i=e[5];let r;return e[6]!==a.isLoading||e[7]!==o||e[8]!==i?(r={isLoading:a.isLoading,prompts:o,tiles:i},e[6]=a.isLoading,e[7]=o,e[8]=i,e[9]=r):r=e[9],r}function ko(t){const e=R.c(31),{orgSlug:s,orgName:a,domain:o}=t,i=V();let r;e[0]!==s?(r=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=r):r=e[1];const d=r,f=To;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:n.jsx(Nt,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==i?(w=i("common.ssoRequiredScreen.title"),e[3]=i,e[4]=w):w=e[4];let c;e[5]!==w?(c=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=c):c=e[6];let x;e[7]!==o||e[8]!==a||e[9]!==i?(x=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",i("common.ssoRequiredScreen.requiresSsoAuth"),o?` ${i("common.ssoRequiredScreen.via",{domain:o})}`:"","."]}):i("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=o,e[8]=a,e[9]=i,e[10]=x):x=e[10];let g;e[11]!==x?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=g):g=e[12];let y;e[13]!==c||e[14]!==g?(y=n.jsxs("div",{className:"space-y-2",children:[c,g]}),e[13]=c,e[14]=g,e[15]=y):y=e[15];let l;e[16]!==i?(l=i("common.ssoRequiredScreen.signInWithSso"),e[16]=i,e[17]=l):l=e[17];let u;e[18]!==d||e[19]!==l?(u=n.jsx(F,{onClick:d,children:l}),e[18]=d,e[19]=l,e[20]=u):u=e[20];let p;e[21]!==i?(p=i("common.goBack"),e[21]=i,e[22]=p):p=e[22];let b;e[23]!==p?(b=n.jsx(F,{variant:"ghost",onClick:f,children:p}),e[23]=p,e[24]=b):b=e[24];let S;e[25]!==b||e[26]!==u?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[u,b]}),e[25]=b,e[26]=u,e[27]=S):S=e[27];let v;return e[28]!==S||e[29]!==y?(v=n.jsxs(he,{children:[h,y,S]}),e[28]=S,e[29]=y,e[30]=v):v=e[30],v}function To(){window.location.href="/"}function No(t){const e=R.c(27),{notice:s,orgSlug:a}=t,o=V();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(un,{className:"h-6 w-6 text-destructive"})}),e[0]=i):i=e[0];let r;e[1]!==s.title?(r=n.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=r):r=e[2];let d;e[3]!==s.message?(d=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.message}),e[3]=s.message,e[4]=d):d=e[4];let f;e[5]!==r||e[6]!==d?(f=n.jsxs("div",{className:"space-y-2",children:[r,d]}),e[5]=r,e[6]=d,e[7]=f):f=e[7];let h;e[8]!==s.ctaLabel||e[9]!==s.ctaUrl?(h=s.ctaUrl&&s.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,e[8]=s.ctaLabel,e[9]=s.ctaUrl,e[10]=h):h=e[10];const w=`/${encodeURIComponent(a)}/settings/infra-billing`;let c;e[11]!==o?(c=o("common.blockedOrgScreen.goToBilling"),e[11]=o,e[12]=c):c=e[12];let x;e[13]!==w||e[14]!==c?(x=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:w,children:c})}),e[13]=w,e[14]=c,e[15]=x):x=e[15];let g;e[16]!==o?(g=o("common.blockedOrgScreen.switchOrg"),e[16]=o,e[17]=g):g=e[17];let y;e[18]!==g?(y=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:g})}),e[18]=g,e[19]=y):y=e[19];let l;e[20]!==y||e[21]!==h||e[22]!==x?(l=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,x,y]}),e[20]=y,e[21]=h,e[22]=x,e[23]=l):l=e[23];let u;return e[24]!==l||e[25]!==f?(u=n.jsxs(he,{children:[i,f,l]}),e[24]=l,e[25]=f,e[26]=u):u=e[26],u}function _o(t){const e=R.c(8);let s;e[0]!==t?(s=He.orgNotice(t??""),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/${t}/notice`,{credentials:"include"});return r.ok?(await r.json()).notice??null:null},e[2]=t,e[3]=a):a=e[3];const o=!!t;let i;return e[4]!==s||e[5]!==a||e[6]!==o?(i={queryKey:s,queryFn:a,enabled:o,staleTime:6e4},e[4]=s,e[5]=a,e[6]=o,e[7]=i):i=e[7],Ue(i)}const Ao="/settings/infra-billing";function Po(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(Ao)}function Co(t){const e=R.c(7),{org:s,children:a}=t;let o;e[0]!==s.id||e[1]!==s.name?(o={id:s.id,organizationId:s.id,slug:"_org",name:s.name,ui:null},e[0]=s.id,e[1]=s.name,e[2]=o):o=e[2];const i=o;let r;return e[3]!==a||e[4]!==s||e[5]!==i?(r=n.jsx(xn,{org:s,project:i,children:a}),e[3]=a,e[4]=s,e[5]=i,e[6]=r):r=e[6],r}function Eo(){const t=At(),e=Qn(),{org:s}=ht(),a=mn({strict:!1}),o=It(),{openPanel:i,closePanel:r}=$n(),d=ts(),f=ns(),h=ss(),w=os(),c=(l,u=!0)=>t({to:".",search:l,replace:u}),x=()=>c(l=>({...l,sidepanel:!0})),g=(l,u,p)=>{const b=!!f&&f===l;f&&!b&&vo(f,{tab:o,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const S=b?null:jo(l),v=Ct(s.id).id,N=xo({prev:{virtualmcpid:d,tabId:o},virtualMcpId:u,decopilotId:v,savedLayout:S,opts:p,autosendValue:es});return w(l,()=>N.search,{virtualMcpId:u,view:{tabId:N.tabId}})};return{openSidePanel:x,setTaskId:g,createNewTask:async(l,u,p)=>{const b=crypto.randomUUID(),S=l??h;try{await e?.create({id:b,virtual_mcp_id:S,...u?{branch:u}:{}})}catch{}g(b,S,p)},openTab:i,closeTab:r}}const Oo=new Set(["/$org/","/$org/home"]);function Io(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Lo},t[0]=e):e=t[0],Et(e)}function Lo(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&Oo.has(e)}function $o(){const t=R.c(63);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=fn(e)?.params.org,[o,i]=G.useState(!1),[r,d]=no(),[f,h]=Jn(),w=hn(),c=Io(),x=a??"";let g;t[1]!==x?(g=Wt(x),t[1]=x,t[2]=g):g=t[2];const y=!!a&&c;let l;t[3]!==g||t[4]!==y?(l={...g,enabled:y},t[3]=g,t[4]=y,t[5]=l):l=t[5],Ue(l);const{data:u}=Ke.useSession(),p=u?.user?.id;let b;t[6]!==a||t[7]!==p?(b=a&&p?gn(p,a):null,t[6]=a,t[7]=p,t[8]=b):b=t[8];const S=b;let v,N;t[9]!==w?(v=()=>{const L=z=>{if(jt(z)&&z.code==="KeyK"){z.preventDefault(),eo();return}if(z.key==="?"&&!Hs(z.target)){z.preventDefault(),i(!0);return}jt(z)&&z.code==="BracketLeft"&&w.history.canGoBack()&&(z.preventDefault(),w.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},N=[w],t[9]=w,t[10]=v,t[11]=N):(v=t[10],N=t[11]),G.useEffect(v,N);let A;t[12]!==a?(A=He.activeOrganization(a),t[12]=a,t[13]=A):A=t[13];let _;t[14]!==a||t[15]!==p?(_=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Ke.organization.getFullOrganization({query:{organizationSlug:a}}).finally(Ro),z=lt(L);return L&&!z&&localStorage.setItem(Be.lastOrgSlug(),a),p&&L&&yn(p,a,L),L},t[14]=a,t[15]=p,t[16]=_):_=t[16];const j=S?S.data:void 0,T=S?.updatedAt;let k;t[17]!==j||t[18]!==T||t[19]!==A||t[20]!==_?(k={queryKey:A,queryFn:_,initialData:j,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=j,t[18]=T,t[19]=A,t[20]=_,t[21]=k):k=t[21];const{data:m}=_t(k),P=m?.id,O=m?.slug,{data:C}=is(P,O),I=!!C?.ssoRequired&&!C.authenticated,{data:E}=_o(O);let M;t[22]===Symbol.for("react.memo_cache_sentinel")?(M={select:Do},t[22]=M):M=t[22];const B=Et(M),W=E?.severity==="block"&&!Po(B),q=P??"",Y=O??"";let Q;t[23]!==q||t[24]!==Y?(Q=Gn({connectionId:Pt,orgId:q,orgSlug:Y}),t[23]=q,t[24]=Y,t[25]=Q):Q=t[25];const D=!!P&&!!O;let X;if(t[26]!==Q||t[27]!==D?(X={...Q,enabled:D},t[26]=Q,t[27]=D,t[28]=X):X=t[28],Ue(X),(!m||lt(m)||I||W)&&to(),!m){let L;return t[29]!==a?(L=n.jsx(ps,{orgSlug:a}),t[29]=a,t[30]=L):L=t[30],L}if(lt(m)){localStorage.getItem(Be.lastOrgSlug())===a&&localStorage.removeItem(Be.lastOrgSlug());let L;return t[31]!==m.name?(L=n.jsx(pn,{orgName:m.name}),t[31]=m.name,t[32]=L):L=t[32],L}if(W&&E){let L;return t[33]!==m.slug||t[34]!==E?(L=n.jsx(No,{notice:E,orgSlug:m.slug}),t[33]=m.slug,t[34]=E,t[35]=L):L=t[35],L}if(I){let L;return t[36]!==m.id||t[37]!==m.name||t[38]!==m.slug||t[39]!==C.domain?(L=n.jsx(ko,{orgId:m.id,orgSlug:m.slug,orgName:m.name,domain:C.domain}),t[36]=m.id,t[37]=m.name,t[38]=m.slug,t[39]=C.domain,t[40]=L):L=t[40],L}const oe=m.logo??null;let K;t[41]!==m||t[42]!==oe?(K={...m,logo:oe},t[41]=m,t[42]=oe,t[43]=K):K=t[43];let Z;t[44]!==m?(Z=n.jsx(bo,{activeOrg:m}),t[44]=m,t[45]=Z):Z=t[45];let ee;t[46]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(bn,{}),t[46]=ee):ee=t[46];let te;t[47]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Bs,{}),n.jsx(ro,{})]}),t[47]=te):te=t[47];let ne;t[48]!==r||t[49]!==d?(ne=r&&n.jsx(Qs,{open:r,onOpenChange:d}),t[48]=r,t[49]=d,t[50]=ne):ne=t[50];let U;t[51]!==f||t[52]!==h?(U=f&&n.jsx(Vn,{open:!0,onOpenChange:h,source:Wn()}),t[51]=f,t[52]=h,t[53]=U):U=t[53];let H;t[54]!==o?(H=n.jsx(Gs,{open:o,onOpenChange:i}),t[54]=o,t[55]=H):H=t[55];let se;t[56]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(fo,{}),t[56]=se):se=t[56];let ae;return t[57]!==K||t[58]!==Z||t[59]!==ne||t[60]!==U||t[61]!==H?(ae=n.jsxs(Co,{org:K,children:[Z,ee,te,ne,U,H,se]}),t[57]=K,t[58]=Z,t[59]=ne,t[60]=U,t[61]=H,t[62]=ae):ae=t[62],ae}function Do(t){return t.location.pathname}function Ro(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Mo(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Zn,{children:n.jsx($o,{})}),t[0]=e):e=t[0],e}const gi=Object.freeze(Object.defineProperty({__proto__:null,default:Mo,usePanelActions:Eo},Symbol.toStringTag,{value:"Module"}));export{J as K,ys as L,Eo as a,$s as b,jt as c,_s as d,hi as e,fi as f,gi as g,qt as i,eo as o,ui as r,mi as s,_o as u};
@@ -1 +1 @@
1
- import{b as ee,X as te,o as oe,r as T,j as t,B as Q,n as _,aS as ae,Z as ce,t as w,ao as de,c as se,l as me,I as ue,F as pe,H as ge,G as fe,K as q,e_ as he}from"./index-C95CzY3C.js";import{i as xe}from"./DotsVertical-CaPsIQcQ.js";import{i as ie,a as je}from"./ZoomOut-DKLrc0AX.js";import{s as ke}from"./Trash01-CvSUykct.js";import{i as ve}from"./Upload01-DWr4g8OT.js";import{S as ye}from"./search-input-DQYXD4BL.js";import{f as Se,e as be,b as we,A as Ce,a as De,d as Ne,c as Pe,g as Ee}from"./alert-dialog-nydIJdPH.js";import{E as Y}from"./empty-state-CKjPjErp.js";import{C as Ae}from"./collection-tabs-DCEsfKpk.js";import{S as Te,F as Me}from"./folder-icon-DeJ_4vBF.js";import{p as Ie,i as Oe,q as ze}from"./use-org-fs-CxttG7Pt.js";import{H as Z,d as Fe}from"./location-DBePU4bz.js";import{p as $e}from"./skill-md-ChfVs4uF.js";import"./SearchMd-B27FMXMV.js";import"./badge-DAgPG-f0.js";import"./dialog-Bvq22AZH.js";import"./X-Ccy7mqMZ.js";import"./markdown-GDF3SJOy.js";import"./Check-Bt1XL9OZ.js";import"./Copy01-lLzDCXmN.js";import"./Image01-FUpltNPw.js";import"./org-file-open-context-wUzs-3_m.js";import"./use-mobile-DbgNrrqI.js";import"./use-panel-navigate-CApSLLZU.js";import"./thread-route-D30ezW1U.js";import"./use-project-scope-Dyp4qS88.js";import"./repository-binding-Czcp88Ek.js";import"./use-mcp-client-BBZSxs6C.js";import"./auth-DA7glj38.js";import"./file-preview-D5cDixM_.js";import"./utils-p81_LpHp.js";import"./editor-CeAQ3Rze.js";import"./file-type-icon-DKJoVWit.js";const J=200,Re=new Set(["node_modules","__pycache__"]);function G(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function _e(s){return G(s).split("/").every(e=>!e.startsWith(".")&&!Re.has(e))}function Le(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Be(s,e){const l=new Map;for(const r of s){const c=G(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function Ke(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function He(s,e){const l=$e(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,source:"home",volume:Z,path:r,sandboxPath:`org/${Z}/${r}`}}const L="*";function B(s){return s.volume==="home"}function le(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:ie}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?de:je}}function qe(s){const e=se.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=ee(),{org:g}=te();let C;e[0]!==l.source||e[1]!==g.name?(C=le(l.source,g.name),e[0]=l.source,e[1]=g.name,e[2]=C):C=e[2];const{label:M,glyph:O}=C;let D;e[3]!==l?(D=B(l),e[3]=l,e[4]=D):D=e[4];const z=D,N=r?"opacity-60":"hover:bg-muted/50";let f;e[5]!==N?(f=me("relative transition-colors group overflow-hidden flex flex-col h-full",N),e[5]=N,e[6]=f):f=e[6];let d;e[7]!==l.name||e[8]!==c||e[9]!==r?(d=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=d):d=e[10];const P=z?"default":"system",F=!z;let h;e[11]!==O||e[12]!==P||e[13]!==F?(h=t.jsx(Me,{glyph:O,tone:P,readOnly:F,className:"size-8 shrink-0"}),e[11]=O,e[12]=P,e[13]=F,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==o?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ue,{children:[t.jsx(pe,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(xe,{size:16})})}),t.jsx(ge,{align:"end",children:t.jsxs(fe,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(ke,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==l.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=b):b=e[22];let k;e[23]!==l.description||e[24]!==o?(k=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=k):k=e[25];let m;e[26]!==k?(m=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=m):m=e[27];let v;e[28]!==b||e[29]!==m?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,m]}),e[28]=b,e[29]=m,e[30]=v):v=e[30];let u;e[31]!==j||e[32]!==v?(u=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=u):u=e[33];let y;e[34]!==M||e[35]!==r||e[36]!==o?(y=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=y):y=e[37];let p;e[38]!==y?(p=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=p):p=e[39];let S;e[40]!==u||e[41]!==p?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[u,p]}),e[40]=u,e[41]=p,e[42]=S):S=e[42];let I;return e[43]!==r||e[44]!==S||e[45]!==f||e[46]!==d?(I=t.jsxs(he,{"aria-busy":r,className:f,children:[d,S]}),e[43]=r,e[44]=S,e[45]=f,e[46]=d,e[47]=I):I=e[47],I}function V(s){const e=se.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function wt(){const s=ee(),{org:e}=te(),l=Ie(),{remove:r,upload:c}=Oe("home"),a=oe(),o=T.useRef(null),[g,C]=T.useState(""),[M,O]=T.useState(L),[D,z]=T.useState(!1),[N,f]=T.useState(null),[d,P]=T.useState(null),[F,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:q.slashSkills(e.id)}),a.invalidateQueries({queryKey:q.orgFsSkills(e.id)})},j=i=>a.setQueryData(q.slashSkills(e.id),n=>i(n??[]));async function b(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const E=n[0]?.webkitRelativePath??"";if(!E){w.error(s("settings.skills.importNeedsFolder"));return}const H=E.split("/")[0]??"",R=n.filter(_e),U=R.find(A=>G(A)==="SKILL.md");if(!U){w.error(s("settings.skills.importMissingSkillMd"));return}if(R.length>J){w.error(s("settings.skills.importTooManyFiles",{count:String(R.length),max:String(J)}));return}const $=Le(H),W=`skills/${$}`;let X=!1;z(!0);try{if(await ze(e.slug,"home",W)){w.error(s("settings.skills.importSlugTaken",{slug:$}));return}X=!0;const A=He($,await U.text());j(ne=>[A,...ne]),h(A.id),await Ke(Be(R,$),c.mutateAsync),w.success(s("settings.skills.importSuccess",{name:$}))}catch(A){X&&await r.mutateAsync(W).catch(()=>{}),w.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=g.toLowerCase(),m=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),u=new Map;for(const i of m)u.set(i.source,(u.get(i.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:m.length},...[...v].map(i=>({id:i,label:le(i,e.name).label,count:u.get(i)??0}))],p=v.has(M)?M:L,S=p===L?m:m.filter(i=>i.source===p),I=i=>f(Fe(i.volume,i.path)),K=async()=>{if(!d)return;const{id:i,path:n}=d;P(null),j(E=>E.filter(H=>H.id!==i));try{await r.mutateAsync(n),w.success(s("settings.skills.deleteSuccess"))}catch(E){w.error(E instanceof Error?E.message:s("settings.skills.deleteError"))}finally{x()}},re=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>o.current?.click(),children:[t.jsx(ve,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(_,{children:[t.jsx(_.Content,{children:t.jsx(_.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(_.Title,{actions:re,children:s("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(ye,{value:g,onChange:C,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(C(""),i.target.blur())}}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{b(i.target.files)}})]}),y.length>2&&t.jsx(Ae,{placement:"page",tabs:y,activeTab:p,onTabChange:O}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(i,n)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(i=>{const n=i.id===F;return t.jsx(qe,{entry:i,pending:n,onOpen:()=>I(i),onDelete:B(i)&&!n?()=>P(i):void 0},i.id)})})})]})})}),N&&t.jsx(Te,{skillPath:N,onClose:()=>f(null)},N),t.jsx(Se,{open:d!==null,onOpenChange:i=>!i&&P(null),children:t.jsxs(be,{children:[t.jsxs(we,{children:[t.jsx(Ce,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(De,{children:s("settings.skills.deleteDialogDescription",{name:d?.name??""})})]}),t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.cancel")}),t.jsx(Ee,{onClick:K,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.skills.deleteButton")})]})]})})]})}export{wt as default};
1
+ import{b as ee,X as te,o as oe,r as T,j as t,B as Q,n as _,aS as ae,Z as ce,t as w,ao as de,c as se,l as me,I as ue,F as pe,H as ge,G as fe,K as q,e_ as he}from"./index-B9dD9jj0.js";import{i as xe}from"./DotsVertical-DyDeVQCx.js";import{i as ie,a as je}from"./ZoomOut-xQj4oorm.js";import{s as ke}from"./Trash01-64yehlfB.js";import{i as ve}from"./Upload01-BvgQ3r-o.js";import{S as ye}from"./search-input-DviARBm2.js";import{f as Se,e as be,b as we,A as Ce,a as De,d as Ne,c as Pe,g as Ee}from"./alert-dialog-DeJgSFRZ.js";import{E as Y}from"./empty-state-BmztM-Bo.js";import{C as Ae}from"./collection-tabs-C6N84gCC.js";import{S as Te,F as Me}from"./folder-icon-DBIJdeY7.js";import{p as Ie,i as Oe,q as ze}from"./use-org-fs-DazA0BMP.js";import{H as Z,d as Fe}from"./location-DBePU4bz.js";import{p as $e}from"./skill-md-ChfVs4uF.js";import"./SearchMd-D_KPqWqZ.js";import"./badge-DzTxW-Ts.js";import"./dialog-Mg_Z3ES1.js";import"./X-NPE_cXRR.js";import"./markdown-D8U5yexH.js";import"./Check-C8M8v3vI.js";import"./Copy01-CaF9W1F_.js";import"./Image01-CsDdVFAJ.js";import"./org-file-open-context-CSDcMwBD.js";import"./use-mobile-3MM_rw4D.js";import"./use-panel-navigate-DH6_TAsx.js";import"./thread-route-CowkfwAl.js";import"./use-project-scope-Bgnjdhs7.js";import"./repository-binding-DzrKIMc8.js";import"./use-mcp-client-CqsHeShn.js";import"./auth-BNR-bSJO.js";import"./file-preview-VfWoS2gk.js";import"./utils-BeoNvR__.js";import"./editor-JpZ1gWwV.js";import"./file-type-icon-BhiPdwxi.js";const J=200,Re=new Set(["node_modules","__pycache__"]);function G(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function _e(s){return G(s).split("/").every(e=>!e.startsWith(".")&&!Re.has(e))}function Le(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Be(s,e){const l=new Map;for(const r of s){const c=G(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function Ke(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function He(s,e){const l=$e(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,source:"home",volume:Z,path:r,sandboxPath:`org/${Z}/${r}`}}const L="*";function B(s){return s.volume==="home"}function le(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:ie}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?de:je}}function qe(s){const e=se.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=ee(),{org:g}=te();let C;e[0]!==l.source||e[1]!==g.name?(C=le(l.source,g.name),e[0]=l.source,e[1]=g.name,e[2]=C):C=e[2];const{label:M,glyph:O}=C;let D;e[3]!==l?(D=B(l),e[3]=l,e[4]=D):D=e[4];const z=D,N=r?"opacity-60":"hover:bg-muted/50";let f;e[5]!==N?(f=me("relative transition-colors group overflow-hidden flex flex-col h-full",N),e[5]=N,e[6]=f):f=e[6];let d;e[7]!==l.name||e[8]!==c||e[9]!==r?(d=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=d):d=e[10];const P=z?"default":"system",F=!z;let h;e[11]!==O||e[12]!==P||e[13]!==F?(h=t.jsx(Me,{glyph:O,tone:P,readOnly:F,className:"size-8 shrink-0"}),e[11]=O,e[12]=P,e[13]=F,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==o?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ue,{children:[t.jsx(pe,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(xe,{size:16})})}),t.jsx(ge,{align:"end",children:t.jsxs(fe,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(ke,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==l.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=b):b=e[22];let k;e[23]!==l.description||e[24]!==o?(k=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=k):k=e[25];let m;e[26]!==k?(m=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=m):m=e[27];let v;e[28]!==b||e[29]!==m?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,m]}),e[28]=b,e[29]=m,e[30]=v):v=e[30];let u;e[31]!==j||e[32]!==v?(u=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=u):u=e[33];let y;e[34]!==M||e[35]!==r||e[36]!==o?(y=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=y):y=e[37];let p;e[38]!==y?(p=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=p):p=e[39];let S;e[40]!==u||e[41]!==p?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[u,p]}),e[40]=u,e[41]=p,e[42]=S):S=e[42];let I;return e[43]!==r||e[44]!==S||e[45]!==f||e[46]!==d?(I=t.jsxs(he,{"aria-busy":r,className:f,children:[d,S]}),e[43]=r,e[44]=S,e[45]=f,e[46]=d,e[47]=I):I=e[47],I}function V(s){const e=se.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function wt(){const s=ee(),{org:e}=te(),l=Ie(),{remove:r,upload:c}=Oe("home"),a=oe(),o=T.useRef(null),[g,C]=T.useState(""),[M,O]=T.useState(L),[D,z]=T.useState(!1),[N,f]=T.useState(null),[d,P]=T.useState(null),[F,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:q.slashSkills(e.id)}),a.invalidateQueries({queryKey:q.orgFsSkills(e.id)})},j=i=>a.setQueryData(q.slashSkills(e.id),n=>i(n??[]));async function b(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const E=n[0]?.webkitRelativePath??"";if(!E){w.error(s("settings.skills.importNeedsFolder"));return}const H=E.split("/")[0]??"",R=n.filter(_e),U=R.find(A=>G(A)==="SKILL.md");if(!U){w.error(s("settings.skills.importMissingSkillMd"));return}if(R.length>J){w.error(s("settings.skills.importTooManyFiles",{count:String(R.length),max:String(J)}));return}const $=Le(H),W=`skills/${$}`;let X=!1;z(!0);try{if(await ze(e.slug,"home",W)){w.error(s("settings.skills.importSlugTaken",{slug:$}));return}X=!0;const A=He($,await U.text());j(ne=>[A,...ne]),h(A.id),await Ke(Be(R,$),c.mutateAsync),w.success(s("settings.skills.importSuccess",{name:$}))}catch(A){X&&await r.mutateAsync(W).catch(()=>{}),w.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=g.toLowerCase(),m=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),u=new Map;for(const i of m)u.set(i.source,(u.get(i.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:m.length},...[...v].map(i=>({id:i,label:le(i,e.name).label,count:u.get(i)??0}))],p=v.has(M)?M:L,S=p===L?m:m.filter(i=>i.source===p),I=i=>f(Fe(i.volume,i.path)),K=async()=>{if(!d)return;const{id:i,path:n}=d;P(null),j(E=>E.filter(H=>H.id!==i));try{await r.mutateAsync(n),w.success(s("settings.skills.deleteSuccess"))}catch(E){w.error(E instanceof Error?E.message:s("settings.skills.deleteError"))}finally{x()}},re=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>o.current?.click(),children:[t.jsx(ve,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(_,{children:[t.jsx(_.Content,{children:t.jsx(_.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(_.Title,{actions:re,children:s("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(ye,{value:g,onChange:C,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(C(""),i.target.blur())}}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{b(i.target.files)}})]}),y.length>2&&t.jsx(Ae,{placement:"page",tabs:y,activeTab:p,onTabChange:O}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(i,n)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(i=>{const n=i.id===F;return t.jsx(qe,{entry:i,pending:n,onOpen:()=>I(i),onDelete:B(i)&&!n?()=>P(i):void 0},i.id)})})})]})})}),N&&t.jsx(Te,{skillPath:N,onClose:()=>f(null)},N),t.jsx(Se,{open:d!==null,onOpenChange:i=>!i&&P(null),children:t.jsxs(be,{children:[t.jsxs(we,{children:[t.jsx(Ce,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(De,{children:s("settings.skills.deleteDialogDescription",{name:d?.name??""})})]}),t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.cancel")}),t.jsx(Ee,{onClick:K,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.skills.deleteButton")})]})]})})]})}export{wt as default};
@@ -1 +1 @@
1
- import{b as B,X as L,r as v,j as e,n as x,fn as k,ec as E,ed as y,ee as a,fN as D,B as u,q as C,t as c,c as z}from"./index-C95CzY3C.js";import{D as T}from"./domain-settings-BcZo-0Ge.js";import{f as O,e as R,b as q,A as F,d as M,c as U,g as $}from"./alert-dialog-nydIJdPH.js";import{I as d}from"./input-BfBrXJza.js";import{S as H}from"./switch-fa5Y0oMN.js";import{a as X,b as G,c as J,d as K}from"./use-org-sso-BX4qCh7f.js";import{s as Q}from"./Trash01-CvSUykct.js";import{R as V}from"./require-capability-CqMIdAS-.js";import"./badge-DAgPG-f0.js";import"./select-pVe0_Bqt.js";import"./index-D5dEpLnc.js";import"./Check-Bt1XL9OZ.js";import"./ChevronUp-Bi1dRl0F.js";import"./access-gate-CLQyj1tq.js";import"./capability-load-error-1FL5H8Lu.js";function W(){const s=B(),{org:o}=L(),{data:f,isLoading:I}=X(o.id,o.slug),h=G(o.id,o.slug),S=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[P,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),I?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx(H,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(Q,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:P,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx($,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(V,{capability:"org:manage",area:"security",children:e.jsx(W,{})}),s[0]=o):o=s[0],o}export{ue as default};
1
+ import{b as B,X as L,r as v,j as e,n as x,fn as k,ec as E,ed as y,ee as a,fN as D,B as u,q as C,t as c,c as z}from"./index-B9dD9jj0.js";import{D as T}from"./domain-settings-CmoTC2Mj.js";import{f as O,e as R,b as q,A as F,d as M,c as U,g as $}from"./alert-dialog-DeJgSFRZ.js";import{I as d}from"./input-Cndqm_5O.js";import{S as H}from"./switch-BLWgY1pz.js";import{a as X,b as G,c as J,d as K}from"./use-org-sso-DGy0uwEN.js";import{s as Q}from"./Trash01-64yehlfB.js";import{R as V}from"./require-capability-CEGMzsiO.js";import"./badge-DzTxW-Ts.js";import"./select-Cd1ykg-h.js";import"./index-DWe-6mCD.js";import"./Check-C8M8v3vI.js";import"./ChevronUp-Q2TBgNib.js";import"./access-gate-DRBSlBtJ.js";import"./capability-load-error-BWTOxRLG.js";function W(){const s=B(),{org:o}=L(),{data:f,isLoading:I}=X(o.id,o.slug),h=G(o.id,o.slug),S=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[P,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),I?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx(H,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(Q,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:P,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx($,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(V,{capability:"org:manage",area:"security",children:e.jsx(W,{})}),s[0]=o):o=s[0],o}export{ue as default};
@@ -1,2 +1,2 @@
1
- import{o as Ye,j as Qe,h as ie,D as Ge,p as ze,q as Ze}from"./index-BpIX5zJy.js";import{r as p,eI as Je,eJ as we,eK as et,eL as j,eM as te,j as I,aR as tt,eN as nt,eO as ne,eP as ot,eQ as rt,eR as st,eS as it,eT as at,eU as lt,eV as Ce,eW as ct,c as X,D as ut,K as dt,eX as ft,eY as gt,eZ as mt,b as pt,l as vt,h as ht}from"./index-C95CzY3C.js";import{g as bt,d as xt}from"./gateway-client-uRieKdKv.js";import{A as yt}from"./agent-icon-B9NBzFRl.js";var Xn=Ye;var Rt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ae=Rt.join(","),Ie=typeof Element>"u",G=Ie?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!Ie&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},ee=function(e,t){var o;t===void 0&&(t=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),s=r===""||r==="true",i=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return i},St=function(e){var t,o=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return o===""||o==="true"},Et=function(e,t,o){if(ee(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ae));return t&&G.call(e,ae)&&r.unshift(e),r=r.filter(o),r},le=function(e,t,o){for(var r=[],s=Array.from(e);s.length;){var i=s.shift();if(!ee(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=le(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{var d=G.call(i,ae);d&&o.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!ee(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&g){var h=le(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||St(e))&&!Te(e)?0:e.tabIndex},wt=function(e,t){var o=Pe(e);return o<0&&t&&!Te(e)?0:o},Ct=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ae=function(e){return e.tagName==="INPUT"},It=function(e){return Ae(e)&&e.type==="hidden"},Tt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pt=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},At=function(e){if(!e.name)return!0;var t=e.form||J(e),o=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Pt(r,e.form);return!s||s===e},Nt=function(e){return Ae(e)&&e.type==="radio"},Dt=function(e){return Nt(e)&&!At(e)},Mt=function(e){var t,o=e&&J(e),r=(t=o)===null||t===void 0?void 0:t.host,s=!1;if(o&&o!==e){var i,a,l;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&r;){var c,d,u;o=J(r),r=(c=o)===null||c===void 0?void 0:c.host,s=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return s},ge=function(e){var t=e.getBoundingClientRect(),o=t.width,r=t.height;return o===0&&r===0},Ot=function(e,t){var o=t.displayCheck,r=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=G.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(G.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,d=J(e);if(c&&!c.shadowRoot&&r(c)===!0)return ge(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(Mt(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ge(e);return!1},Ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var r=t.children.item(o);if(r.tagName==="LEGEND")return G.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qt=function(e,t){return!(t.disabled||It(t)||Ot(t,e)||Tt(t)||Ft(t))},me=function(e,t){return!(Dt(t)||Pe(t)<0||!qt(e,t))},$t=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ne=function(e){var t=[],o=[];return e.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,l=wt(a,i),c=i?Ne(r.candidates):a;l===0?i?t.push.apply(t,c):t.push(a):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:c})}),o.sort(Ct).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},De=function(e,t){t=t||{};var o;return t.getShadowRoot?o=le([e],t.includeContainer,{filter:me.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$t}):o=Et(e,t.includeContainer,me.bind(null,t)),Ne(o)};function kt(){return/apple/i.test(navigator.vendor)}const pe="data-floating-ui-focusable";function _t(n){let e=n.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function ce(n,e){if(!n||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(n.contains(e))return!0;if(t&&Je(t)){let o=e;for(;o;){if(n===o)return!0;o=o.parentNode||o.host}}return!1}function Q(n){return"composedPath"in n?n.composedPath()[0]:n.target}function oe(n,e){if(e==null)return!1;if("composedPath"in n)return n.composedPath().includes(e);const t=n;return t.target!=null&&e.contains(t.target)}function Lt(n){return n.matches("html,body")}function z(n){return n?.ownerDocument||document}function jt(n){return n?n.hasAttribute(pe)?n:n.querySelector("["+pe+"]")||n:null}function Z(n,e,t){return t===void 0&&(t=!0),n.filter(r=>{var s;return r.parentId===e&&(!t||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Z(n,r.id,t)])}function Kt(n){return"nativeEvent"in n}var Bt=typeof document<"u",Ut=function(){},V=Bt?p.useLayoutEffect:Ut;const Vt={...we},Wt=Vt.useInsertionEffect,Xt=Wt||(n=>n());function W(n){const e=p.useRef(()=>{});return Xt(()=>{e.current=n}),p.useCallback(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(n,e){const t=De(n,Me()),o=t.length;if(o===0)return;const r=_t(z(n)),s=t.indexOf(r),i=s===-1?e===1?0:o-1:s+e;return t[i]}function Ht(n){return Oe(z(n).body,1)||n}function Yt(n){return Oe(z(n).body,-1)||n}function re(n,e){const t=e||n.currentTarget,o=n.relatedTarget;return!o||!ce(t,o)}function Qt(n){De(n,Me()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ve(n){n.querySelectorAll("[data-tabindex]").forEach(t=>{const o=t.dataset.tabindex;delete t.dataset.tabindex,o?t.setAttribute("tabindex",o):t.removeAttribute("tabindex")})}const Gt="data-floating-ui-focusable",he="active",be="selected",zt={...we};let xe=!1,Zt=0;const ye=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zt++;function Jt(){const[n,e]=p.useState(()=>xe?ye():void 0);return V(()=>{n==null&&e(ye())},[]),p.useEffect(()=>{xe=!0},[]),n}const en=zt.useId,ue=en||Jt;function tn(){const n=new Map;return{emit(e,t){var o;(o=n.get(e))==null||o.forEach(r=>r(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var o;(o=n.get(e))==null||o.delete(t)}}}const nn=p.createContext(null),on=p.createContext(null),Fe=()=>{var n;return((n=p.useContext(nn))==null?void 0:n.id)||null},qe=()=>p.useContext(on);function de(n){return"data-floating-ui-"+n}const rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Re=p.forwardRef(function(e,t){const[o,r]=p.useState();V(()=>{kt()&&r("button")},[]);const s={ref:t,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[de("focus-guard")]:"",style:rn};return I.jsx("span",{...e,...s})}),sn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$e=p.createContext(null),Se=de("portal");function an(n){n===void 0&&(n={});const{id:e,root:t}=n,o=ue(),r=cn(),[s,i]=p.useState(null),a=p.useRef(null);return V(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),V(()=>{if(!o||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(Se,""),l.appendChild(c),a.current=c,i(c)},[e,o]),V(()=>{if(t===null||!o||a.current)return;let l=t||r?.portalNode;l&&!it(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=o,d.setAttribute(Se,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[e,t,o,r]),s}function ln(n){const{children:e,id:t,root:o,preserveTabOrder:r=!0}=n,s=an({id:t,root:o}),[i,a]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=i?.modal,h=i?.open,y=!!i&&!i.modal&&i.open&&r&&!!(o||s);return p.useEffect(()=>{if(!s||!r||g)return;function m(f){s&&re(f)&&(f.type==="focusin"?ve:Qt)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,r,g]),p.useEffect(()=>{s&&(h||ve(s))},[h,s]),I.jsxs($e.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:s,setFocusManagerState:a}),[r,s]),children:[y&&s&&I.jsx(Re,{"data-type":"outside",ref:l,onFocus:m=>{if(re(m,s)){var f;(f=d.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Yt(x);b?.focus()}}}),y&&s&&I.jsx("span",{"aria-owns":s.id,style:sn}),s&&tt.createPortal(e,s),y&&s&&I.jsx(Re,{"data-type":"outside",ref:c,onFocus:m=>{if(re(m,s)){var f;(f=u.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Ht(x);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const cn=()=>p.useContext($e),un={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ee=n=>{var e,t;return{escapeKey:typeof n=="boolean"?n:(e=n?.escapeKey)!=null?e:!1,outsidePress:typeof n=="boolean"?n:(t=n?.outsidePress)!=null?t:!0}};function fn(n,e){e===void 0&&(e={});const{open:t,onOpenChange:o,elements:r,dataRef:s}=n,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=e,m=qe(),f=W(typeof l=="function"?l:()=>!1),x=typeof l=="function"?f:l,b=p.useRef(!1),{escapeKey:R,outsidePress:v}=Ee(h),{escapeKey:D,outsidePress:C}=Ee(y),O=p.useRef(!1),A=W(S=>{var E;if(!t||!i||!a||S.key!=="Escape"||O.current)return;const P=(E=s.current.floatingContext)==null?void 0:E.nodeId,M=m?Z(m.nodesRef.current,P):[];if(!R&&(S.stopPropagation(),M.length>0)){let w=!0;if(M.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}o(!1,Kt(S)?S.nativeEvent:S,"escape-key")}),F=W(S=>{var E;const P=()=>{var M;A(S),(M=Q(S))==null||M.removeEventListener("keydown",P)};(E=Q(S))==null||E.addEventListener("keydown",P)}),T=W(S=>{var E;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||P||typeof x=="function"&&!x(S))return;const w=Q(S),N="["+de("inert")+"]",q=z(r.floating).querySelectorAll(N);let L=j(w)?w:null;for(;L&&!ne(L);){const k=ot(L);if(ne(k)||!j(k))break;L=k}if(q.length&&j(w)&&!Lt(w)&&!ce(w,r.floating)&&Array.from(q).every(k=>!ce(L,k)))return;if(rt(w)&&K){const k=ne(w),B=st(w),Y=/auto|scroll/,Ke=k||Y.test(B.overflowX),Be=k||Y.test(B.overflowY),Ue=Ke&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Ve=Be&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,We=B.direction==="rtl",Xe=Ve&&(We?S.offsetX<=w.offsetWidth-w.clientWidth:S.offsetX>w.clientWidth),He=Ue&&S.offsetY>w.clientHeight;if(Xe||He)return}const U=(E=s.current.floatingContext)==null?void 0:E.nodeId,H=m&&Z(m.nodesRef.current,U).some(k=>{var B;return oe(S,(B=k.context)==null?void 0:B.elements.floating)});if(oe(S,r.floating)||oe(S,r.domReference)||H)return;const fe=m?Z(m.nodesRef.current,U):[];if(fe.length>0){let k=!0;if(fe.forEach(B=>{var Y;if((Y=B.context)!=null&&Y.open&&!B.context.dataRef.current.__outsidePressBubbles){k=!1;return}}),!k)return}o(!1,S,"outside-press")}),$=W(S=>{var E;const P=()=>{var M;T(S),(M=Q(S))==null||M.removeEventListener(c,P)};(E=Q(S))==null||E.addEventListener(c,P)});p.useEffect(()=>{if(!t||!i)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=v;let S=-1;function E(q){o(!1,q,"ancestor-scroll")}function P(){window.clearTimeout(S),O.current=!0}function M(){S=window.setTimeout(()=>{O.current=!1},nt()?5:0)}const w=z(r.floating);a&&(w.addEventListener("keydown",D?F:A,D),w.addEventListener("compositionstart",P),w.addEventListener("compositionend",M)),x&&w.addEventListener(c,C?$:T,C);let N=[];return g&&(j(r.domReference)&&(N=te(r.domReference)),j(r.floating)&&(N=N.concat(te(r.floating))),!j(r.reference)&&r.reference&&r.reference.contextElement&&(N=N.concat(te(r.reference.contextElement)))),N=N.filter(q=>{var L;return q!==((L=w.defaultView)==null?void 0:L.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",E,{passive:!0})}),()=>{a&&(w.removeEventListener("keydown",D?F:A,D),w.removeEventListener("compositionstart",P),w.removeEventListener("compositionend",M)),x&&w.removeEventListener(c,C?$:T,C),N.forEach(q=>{q.removeEventListener("scroll",E)}),window.clearTimeout(S)}},[s,r,a,x,c,t,o,g,i,R,v,A,D,F,T,C,$]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const _=p.useMemo(()=>({onKeyDown:A,...d&&{[un[u]]:S=>{o(!1,S.nativeEvent,"reference-press")},...u!=="click"&&{onClick(S){o(!1,S.nativeEvent,"reference-press")}}}}),[A,o,d,u]),K=p.useMemo(()=>{function S(E){E.button===0&&(b.current=!0)}return{onKeyDown:A,onMouseDown:S,onMouseUp:S,[dn[c]]:()=>{s.current.insideReactTree=!0}}},[A,c,s]);return p.useMemo(()=>i?{reference:_,floating:K}:{},[i,_,K])}function gn(n){const{open:e=!1,onOpenChange:t,elements:o}=n,r=ue(),s=p.useRef({}),[i]=p.useState(()=>tn()),a=Fe()!=null,[l,c]=p.useState(o.reference),d=W((h,y,m)=>{s.current.openEvent=h?y:void 0,i.emit("openchange",{open:h,event:y,reason:m,nested:a}),t?.(h,y,m)}),u=p.useMemo(()=>({setPositionReference:c}),[]),g=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:g,events:i,floatingId:r,refs:u}),[e,d,g,i,r,u])}function mn(n){n===void 0&&(n={});const{nodeId:e}=n,t=gn({...n,elements:{reference:null,floating:null,...n.elements}}),o=n.rootContext||t,r=o.elements,[s,i]=p.useState(null),[a,l]=p.useState(null),d=r?.domReference||s,u=p.useRef(null),g=qe();V(()=>{d&&(u.current=d)},[d]);const h=et({...n,elements:{...r,...a&&{reference:a}}}),y=p.useCallback(R=>{const v=j(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(v),h.refs.setReference(v)},[h.refs]),m=p.useCallback(R=>{(j(R)||R===null)&&(u.current=R,i(R)),(j(h.refs.reference.current)||h.refs.reference.current===null||R!==null&&!j(R))&&h.refs.setReference(R)},[h.refs]),f=p.useMemo(()=>({...h.refs,setReference:m,setPositionReference:y,domReference:u}),[h.refs,m,y]),x=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=p.useMemo(()=>({...h,...o,refs:f,elements:x,nodeId:e}),[h,f,x,e,o]);return V(()=>{o.dataRef.current.floatingContext=b;const R=g?.nodesRef.current.find(v=>v.id===e);R&&(R.context=b)}),p.useMemo(()=>({...h,context:b,refs:f,elements:x}),[h,f,x,b])}function se(n,e,t){const o=new Map,r=t==="item";let s=n;if(r&&n){const{[he]:i,[be]:a,...l}=n;s=l}return{...t==="floating"&&{tabIndex:-1,[Gt]:""},...s,...e.map(i=>{const a=i?i[t]:null;return typeof a=="function"?n?a(n):null:a}).concat(n).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(r&&[he,be].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof d=="function"){var u;(u=o.get(c))==null||u.push(d),i[c]=function(){for(var g,h=arguments.length,y=new Array(h),m=0;m<h;m++)y[m]=arguments[m];return(g=o.get(c))==null?void 0:g.map(f=>f(...y)).find(f=>f!==void 0)}}}else i[c]=d}),i),{})}}function pn(n){n===void 0&&(n=[]);const e=n.map(a=>a?.reference),t=n.map(a=>a?.floating),o=n.map(a=>a?.item),r=p.useCallback(a=>se(a,n,"reference"),e),s=p.useCallback(a=>se(a,n,"floating"),t),i=p.useCallback(a=>se(a,n,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(n,e){var t,o;e===void 0&&(e={});const{open:r,elements:s,floatingId:i}=n,{enabled:a=!0,role:l="dialog"}=e,c=ue(),d=((t=s.domReference)==null?void 0:t.id)||c,u=p.useMemo(()=>{var b;return((b=jt(s.floating))==null?void 0:b.id)||i},[s.floating,i]),g=(o=vn.get(l))!=null?o:l,y=Fe()!=null,m=p.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?u:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,u,y,r,d,l]),f=p.useMemo(()=>{const b={id:u,...g&&{role:g}};return g==="tooltip"||l==="label"?b:{...b,...g==="menu"&&{"aria-labelledby":d}}},[g,u,d,l]),x=p.useCallback(b=>{let{active:R,selected:v}=b;const D={role:"option",...R&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...D,"aria-selected":v}}return{}},[u,l]);return p.useMemo(()=>a?{reference:m,floating:f,item:x}:{},[a,m,f,x])}function bn(n){var e;const{char:t,allowSpaces:o,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,$position:a}=n,l=o&&!r,c=Ze(t),d=new RegExp(`\\s${c}$`),u=i?"^":"",g=r?"":c,h=l?new RegExp(`${u}${c}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${g}]*`,"gm"),y=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!y)return null;const m=a.pos-y.length,f=Array.from(y.matchAll(h)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const x=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${s?.join("")}\0]?$`).test(x);if(s!==null&&!b)return null;const R=m+f.index;let v=R+f[0].length;return l&&d.test(y.slice(v-1,v+1))&&(f[0]+=" ",v+=1),R<a.pos&&v>=a.pos?{range:{from:R,to:v},query:f[0].slice(t.length),text:f[0]}:null}function xn(n){return n.docChanged?n.steps.some(e=>{const t=e.slice;if(!t?.content)return!1;const o=t.content.textBetween(0,t.content.size,`
1
+ import{o as Ye,j as Qe,h as ie,D as Ge,p as ze,q as Ze}from"./index-v5QvptSB.js";import{r as p,eI as Je,eJ as we,eK as et,eL as j,eM as te,j as I,aR as tt,eN as nt,eO as ne,eP as ot,eQ as rt,eR as st,eS as it,eT as at,eU as lt,eV as Ce,eW as ct,c as X,D as ut,K as dt,eX as ft,eY as gt,eZ as mt,b as pt,l as vt,h as ht}from"./index-B9dD9jj0.js";import{g as bt,d as xt}from"./gateway-client-CIbTMjGx.js";import{A as yt}from"./agent-icon-TQUkqPJj.js";var Xn=Ye;var Rt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ae=Rt.join(","),Ie=typeof Element>"u",G=Ie?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!Ie&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},ee=function(e,t){var o;t===void 0&&(t=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),s=r===""||r==="true",i=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return i},St=function(e){var t,o=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return o===""||o==="true"},Et=function(e,t,o){if(ee(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ae));return t&&G.call(e,ae)&&r.unshift(e),r=r.filter(o),r},le=function(e,t,o){for(var r=[],s=Array.from(e);s.length;){var i=s.shift();if(!ee(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=le(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{var d=G.call(i,ae);d&&o.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!ee(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&g){var h=le(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||St(e))&&!Te(e)?0:e.tabIndex},wt=function(e,t){var o=Pe(e);return o<0&&t&&!Te(e)?0:o},Ct=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ae=function(e){return e.tagName==="INPUT"},It=function(e){return Ae(e)&&e.type==="hidden"},Tt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pt=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},At=function(e){if(!e.name)return!0;var t=e.form||J(e),o=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Pt(r,e.form);return!s||s===e},Nt=function(e){return Ae(e)&&e.type==="radio"},Dt=function(e){return Nt(e)&&!At(e)},Mt=function(e){var t,o=e&&J(e),r=(t=o)===null||t===void 0?void 0:t.host,s=!1;if(o&&o!==e){var i,a,l;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&r;){var c,d,u;o=J(r),r=(c=o)===null||c===void 0?void 0:c.host,s=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return s},ge=function(e){var t=e.getBoundingClientRect(),o=t.width,r=t.height;return o===0&&r===0},Ot=function(e,t){var o=t.displayCheck,r=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=G.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(G.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,d=J(e);if(c&&!c.shadowRoot&&r(c)===!0)return ge(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(Mt(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ge(e);return!1},Ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var r=t.children.item(o);if(r.tagName==="LEGEND")return G.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qt=function(e,t){return!(t.disabled||It(t)||Ot(t,e)||Tt(t)||Ft(t))},me=function(e,t){return!(Dt(t)||Pe(t)<0||!qt(e,t))},$t=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ne=function(e){var t=[],o=[];return e.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,l=wt(a,i),c=i?Ne(r.candidates):a;l===0?i?t.push.apply(t,c):t.push(a):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:c})}),o.sort(Ct).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},De=function(e,t){t=t||{};var o;return t.getShadowRoot?o=le([e],t.includeContainer,{filter:me.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$t}):o=Et(e,t.includeContainer,me.bind(null,t)),Ne(o)};function kt(){return/apple/i.test(navigator.vendor)}const pe="data-floating-ui-focusable";function _t(n){let e=n.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function ce(n,e){if(!n||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(n.contains(e))return!0;if(t&&Je(t)){let o=e;for(;o;){if(n===o)return!0;o=o.parentNode||o.host}}return!1}function Q(n){return"composedPath"in n?n.composedPath()[0]:n.target}function oe(n,e){if(e==null)return!1;if("composedPath"in n)return n.composedPath().includes(e);const t=n;return t.target!=null&&e.contains(t.target)}function Lt(n){return n.matches("html,body")}function z(n){return n?.ownerDocument||document}function jt(n){return n?n.hasAttribute(pe)?n:n.querySelector("["+pe+"]")||n:null}function Z(n,e,t){return t===void 0&&(t=!0),n.filter(r=>{var s;return r.parentId===e&&(!t||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Z(n,r.id,t)])}function Kt(n){return"nativeEvent"in n}var Bt=typeof document<"u",Ut=function(){},V=Bt?p.useLayoutEffect:Ut;const Vt={...we},Wt=Vt.useInsertionEffect,Xt=Wt||(n=>n());function W(n){const e=p.useRef(()=>{});return Xt(()=>{e.current=n}),p.useCallback(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(n,e){const t=De(n,Me()),o=t.length;if(o===0)return;const r=_t(z(n)),s=t.indexOf(r),i=s===-1?e===1?0:o-1:s+e;return t[i]}function Ht(n){return Oe(z(n).body,1)||n}function Yt(n){return Oe(z(n).body,-1)||n}function re(n,e){const t=e||n.currentTarget,o=n.relatedTarget;return!o||!ce(t,o)}function Qt(n){De(n,Me()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ve(n){n.querySelectorAll("[data-tabindex]").forEach(t=>{const o=t.dataset.tabindex;delete t.dataset.tabindex,o?t.setAttribute("tabindex",o):t.removeAttribute("tabindex")})}const Gt="data-floating-ui-focusable",he="active",be="selected",zt={...we};let xe=!1,Zt=0;const ye=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zt++;function Jt(){const[n,e]=p.useState(()=>xe?ye():void 0);return V(()=>{n==null&&e(ye())},[]),p.useEffect(()=>{xe=!0},[]),n}const en=zt.useId,ue=en||Jt;function tn(){const n=new Map;return{emit(e,t){var o;(o=n.get(e))==null||o.forEach(r=>r(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var o;(o=n.get(e))==null||o.delete(t)}}}const nn=p.createContext(null),on=p.createContext(null),Fe=()=>{var n;return((n=p.useContext(nn))==null?void 0:n.id)||null},qe=()=>p.useContext(on);function de(n){return"data-floating-ui-"+n}const rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Re=p.forwardRef(function(e,t){const[o,r]=p.useState();V(()=>{kt()&&r("button")},[]);const s={ref:t,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[de("focus-guard")]:"",style:rn};return I.jsx("span",{...e,...s})}),sn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$e=p.createContext(null),Se=de("portal");function an(n){n===void 0&&(n={});const{id:e,root:t}=n,o=ue(),r=cn(),[s,i]=p.useState(null),a=p.useRef(null);return V(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),V(()=>{if(!o||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(Se,""),l.appendChild(c),a.current=c,i(c)},[e,o]),V(()=>{if(t===null||!o||a.current)return;let l=t||r?.portalNode;l&&!it(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=o,d.setAttribute(Se,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[e,t,o,r]),s}function ln(n){const{children:e,id:t,root:o,preserveTabOrder:r=!0}=n,s=an({id:t,root:o}),[i,a]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=i?.modal,h=i?.open,y=!!i&&!i.modal&&i.open&&r&&!!(o||s);return p.useEffect(()=>{if(!s||!r||g)return;function m(f){s&&re(f)&&(f.type==="focusin"?ve:Qt)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,r,g]),p.useEffect(()=>{s&&(h||ve(s))},[h,s]),I.jsxs($e.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:s,setFocusManagerState:a}),[r,s]),children:[y&&s&&I.jsx(Re,{"data-type":"outside",ref:l,onFocus:m=>{if(re(m,s)){var f;(f=d.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Yt(x);b?.focus()}}}),y&&s&&I.jsx("span",{"aria-owns":s.id,style:sn}),s&&tt.createPortal(e,s),y&&s&&I.jsx(Re,{"data-type":"outside",ref:c,onFocus:m=>{if(re(m,s)){var f;(f=u.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Ht(x);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const cn=()=>p.useContext($e),un={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ee=n=>{var e,t;return{escapeKey:typeof n=="boolean"?n:(e=n?.escapeKey)!=null?e:!1,outsidePress:typeof n=="boolean"?n:(t=n?.outsidePress)!=null?t:!0}};function fn(n,e){e===void 0&&(e={});const{open:t,onOpenChange:o,elements:r,dataRef:s}=n,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=e,m=qe(),f=W(typeof l=="function"?l:()=>!1),x=typeof l=="function"?f:l,b=p.useRef(!1),{escapeKey:R,outsidePress:v}=Ee(h),{escapeKey:D,outsidePress:C}=Ee(y),O=p.useRef(!1),A=W(S=>{var E;if(!t||!i||!a||S.key!=="Escape"||O.current)return;const P=(E=s.current.floatingContext)==null?void 0:E.nodeId,M=m?Z(m.nodesRef.current,P):[];if(!R&&(S.stopPropagation(),M.length>0)){let w=!0;if(M.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}o(!1,Kt(S)?S.nativeEvent:S,"escape-key")}),F=W(S=>{var E;const P=()=>{var M;A(S),(M=Q(S))==null||M.removeEventListener("keydown",P)};(E=Q(S))==null||E.addEventListener("keydown",P)}),T=W(S=>{var E;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||P||typeof x=="function"&&!x(S))return;const w=Q(S),N="["+de("inert")+"]",q=z(r.floating).querySelectorAll(N);let L=j(w)?w:null;for(;L&&!ne(L);){const k=ot(L);if(ne(k)||!j(k))break;L=k}if(q.length&&j(w)&&!Lt(w)&&!ce(w,r.floating)&&Array.from(q).every(k=>!ce(L,k)))return;if(rt(w)&&K){const k=ne(w),B=st(w),Y=/auto|scroll/,Ke=k||Y.test(B.overflowX),Be=k||Y.test(B.overflowY),Ue=Ke&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Ve=Be&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,We=B.direction==="rtl",Xe=Ve&&(We?S.offsetX<=w.offsetWidth-w.clientWidth:S.offsetX>w.clientWidth),He=Ue&&S.offsetY>w.clientHeight;if(Xe||He)return}const U=(E=s.current.floatingContext)==null?void 0:E.nodeId,H=m&&Z(m.nodesRef.current,U).some(k=>{var B;return oe(S,(B=k.context)==null?void 0:B.elements.floating)});if(oe(S,r.floating)||oe(S,r.domReference)||H)return;const fe=m?Z(m.nodesRef.current,U):[];if(fe.length>0){let k=!0;if(fe.forEach(B=>{var Y;if((Y=B.context)!=null&&Y.open&&!B.context.dataRef.current.__outsidePressBubbles){k=!1;return}}),!k)return}o(!1,S,"outside-press")}),$=W(S=>{var E;const P=()=>{var M;T(S),(M=Q(S))==null||M.removeEventListener(c,P)};(E=Q(S))==null||E.addEventListener(c,P)});p.useEffect(()=>{if(!t||!i)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=v;let S=-1;function E(q){o(!1,q,"ancestor-scroll")}function P(){window.clearTimeout(S),O.current=!0}function M(){S=window.setTimeout(()=>{O.current=!1},nt()?5:0)}const w=z(r.floating);a&&(w.addEventListener("keydown",D?F:A,D),w.addEventListener("compositionstart",P),w.addEventListener("compositionend",M)),x&&w.addEventListener(c,C?$:T,C);let N=[];return g&&(j(r.domReference)&&(N=te(r.domReference)),j(r.floating)&&(N=N.concat(te(r.floating))),!j(r.reference)&&r.reference&&r.reference.contextElement&&(N=N.concat(te(r.reference.contextElement)))),N=N.filter(q=>{var L;return q!==((L=w.defaultView)==null?void 0:L.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",E,{passive:!0})}),()=>{a&&(w.removeEventListener("keydown",D?F:A,D),w.removeEventListener("compositionstart",P),w.removeEventListener("compositionend",M)),x&&w.removeEventListener(c,C?$:T,C),N.forEach(q=>{q.removeEventListener("scroll",E)}),window.clearTimeout(S)}},[s,r,a,x,c,t,o,g,i,R,v,A,D,F,T,C,$]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const _=p.useMemo(()=>({onKeyDown:A,...d&&{[un[u]]:S=>{o(!1,S.nativeEvent,"reference-press")},...u!=="click"&&{onClick(S){o(!1,S.nativeEvent,"reference-press")}}}}),[A,o,d,u]),K=p.useMemo(()=>{function S(E){E.button===0&&(b.current=!0)}return{onKeyDown:A,onMouseDown:S,onMouseUp:S,[dn[c]]:()=>{s.current.insideReactTree=!0}}},[A,c,s]);return p.useMemo(()=>i?{reference:_,floating:K}:{},[i,_,K])}function gn(n){const{open:e=!1,onOpenChange:t,elements:o}=n,r=ue(),s=p.useRef({}),[i]=p.useState(()=>tn()),a=Fe()!=null,[l,c]=p.useState(o.reference),d=W((h,y,m)=>{s.current.openEvent=h?y:void 0,i.emit("openchange",{open:h,event:y,reason:m,nested:a}),t?.(h,y,m)}),u=p.useMemo(()=>({setPositionReference:c}),[]),g=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:g,events:i,floatingId:r,refs:u}),[e,d,g,i,r,u])}function mn(n){n===void 0&&(n={});const{nodeId:e}=n,t=gn({...n,elements:{reference:null,floating:null,...n.elements}}),o=n.rootContext||t,r=o.elements,[s,i]=p.useState(null),[a,l]=p.useState(null),d=r?.domReference||s,u=p.useRef(null),g=qe();V(()=>{d&&(u.current=d)},[d]);const h=et({...n,elements:{...r,...a&&{reference:a}}}),y=p.useCallback(R=>{const v=j(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(v),h.refs.setReference(v)},[h.refs]),m=p.useCallback(R=>{(j(R)||R===null)&&(u.current=R,i(R)),(j(h.refs.reference.current)||h.refs.reference.current===null||R!==null&&!j(R))&&h.refs.setReference(R)},[h.refs]),f=p.useMemo(()=>({...h.refs,setReference:m,setPositionReference:y,domReference:u}),[h.refs,m,y]),x=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=p.useMemo(()=>({...h,...o,refs:f,elements:x,nodeId:e}),[h,f,x,e,o]);return V(()=>{o.dataRef.current.floatingContext=b;const R=g?.nodesRef.current.find(v=>v.id===e);R&&(R.context=b)}),p.useMemo(()=>({...h,context:b,refs:f,elements:x}),[h,f,x,b])}function se(n,e,t){const o=new Map,r=t==="item";let s=n;if(r&&n){const{[he]:i,[be]:a,...l}=n;s=l}return{...t==="floating"&&{tabIndex:-1,[Gt]:""},...s,...e.map(i=>{const a=i?i[t]:null;return typeof a=="function"?n?a(n):null:a}).concat(n).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(r&&[he,be].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof d=="function"){var u;(u=o.get(c))==null||u.push(d),i[c]=function(){for(var g,h=arguments.length,y=new Array(h),m=0;m<h;m++)y[m]=arguments[m];return(g=o.get(c))==null?void 0:g.map(f=>f(...y)).find(f=>f!==void 0)}}}else i[c]=d}),i),{})}}function pn(n){n===void 0&&(n=[]);const e=n.map(a=>a?.reference),t=n.map(a=>a?.floating),o=n.map(a=>a?.item),r=p.useCallback(a=>se(a,n,"reference"),e),s=p.useCallback(a=>se(a,n,"floating"),t),i=p.useCallback(a=>se(a,n,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(n,e){var t,o;e===void 0&&(e={});const{open:r,elements:s,floatingId:i}=n,{enabled:a=!0,role:l="dialog"}=e,c=ue(),d=((t=s.domReference)==null?void 0:t.id)||c,u=p.useMemo(()=>{var b;return((b=jt(s.floating))==null?void 0:b.id)||i},[s.floating,i]),g=(o=vn.get(l))!=null?o:l,y=Fe()!=null,m=p.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?u:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,u,y,r,d,l]),f=p.useMemo(()=>{const b={id:u,...g&&{role:g}};return g==="tooltip"||l==="label"?b:{...b,...g==="menu"&&{"aria-labelledby":d}}},[g,u,d,l]),x=p.useCallback(b=>{let{active:R,selected:v}=b;const D={role:"option",...R&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...D,"aria-selected":v}}return{}},[u,l]);return p.useMemo(()=>a?{reference:m,floating:f,item:x}:{},[a,m,f,x])}function bn(n){var e;const{char:t,allowSpaces:o,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,$position:a}=n,l=o&&!r,c=Ze(t),d=new RegExp(`\\s${c}$`),u=i?"^":"",g=r?"":c,h=l?new RegExp(`${u}${c}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${g}]*`,"gm"),y=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!y)return null;const m=a.pos-y.length,f=Array.from(y.matchAll(h)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const x=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${s?.join("")}\0]?$`).test(x);if(s!==null&&!b)return null;const R=m+f.index;let v=R+f[0].length;return l&&d.test(y.slice(v-1,v+1))&&(f[0]+=" ",v+=1),R<a.pos&&v>=a.pos?{range:{from:R,to:v},query:f[0].slice(t.length),text:f[0]}:null}function xn(n){return n.docChanged?n.steps.some(e=>{const t=e.slice;if(!t?.content)return!1;const o=t.content.textBetween(0,t.content.size,`
2
2
  `);return/\s/.test(o)}):!1}function yn(n){return()=>{const e=n.state.selection.$anchor.pos,{top:t,right:o,bottom:r,left:s}=n.view.coordsAtPos(e);try{return new DOMRect(s,t,o-s,r-t)}catch{return null}}}function Rn(n,e,t,o){return t?()=>{const r=o.getState(n.state),s=r?.decorationId,i=e.dom.querySelector(`[data-decoration-id="${s}"]`);return i?.getBoundingClientRect()||null}:yn(n)}function Sn({match:n,dismissedRange:e,state:t,transaction:o,editor:r,shouldResetDismissed:s,effectiveAllowSpaces:i}){return s?.({editor:r,state:t,range:e,match:n,transaction:o,allowSpaces:i})?!1:i?n.range.from===e.from:n.range.from===e.from&&!xn(o)}function En({view:n,pluginKeyRef:e}){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}function wn({pluginKey:n,decorationTag:e,decorationClass:t,decorationContent:o,decorationEmptyClass:r,renderer:s,dispatchExit:i}){return{handleKeyDown(a,l){var c;const d=n.getState(a.state);if(!d.active)return!1;if(l.key==="Escape"||l.key==="Esc"){var u;return s==null||(u=s.onKeyDown)===null||u===void 0||u.call(s,{view:a,event:l,range:d.range}),i(a),!0}return(s==null||(c=s.onKeyDown)===null||c===void 0?void 0:c.call(s,{view:a,event:l,range:d.range}))||!1},decorations(a){const{active:l,range:c,decorationId:d,query:u}=n.getState(a);if(!l)return null;const g=!u?.length,h=[t];return g&&h.push(r),Ge.create(a.doc,[ze.inline(c.from,c.to,{nodeName:e,class:h.join(" "),"data-decoration-id":d||void 0,"data-decoration-content":o})])}}}function Cn({editor:n,char:e,effectiveAllowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,findSuggestionMatch:i,allow:a,shouldShow:l,shouldKeepDismissed:c,pluginKey:d}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,g,h,y){const{isEditable:m}=n,{composing:f}=n.view,{selection:x}=u,{empty:b,from:R}=x,v={...g},D=u.getMeta(d);if(D&&D.exit)return v.active=!1,v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null,v.dismissedRange=g.active?{...g.range}:g.dismissedRange,v;if(v.composing=f,u.docChanged&&v.dismissedRange!==null&&(v.dismissedRange={from:u.mapping.map(v.dismissedRange.from),to:u.mapping.map(v.dismissedRange.to)}),m&&(b||n.view.composing)){(R<g.range.from||R>g.range.to)&&!f&&!g.composing&&(v.active=!1);const C=i({char:e,allowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:x.$from}),O=`id_${Math.floor(Math.random()*4294967295)}`;C&&a({editor:n,state:y,range:C.range,isActive:g.active})&&(!l||l({editor:n,range:C.range,query:C.query,text:C.text,transaction:u}))?(v.dismissedRange!==null&&!c({match:C,dismissedRange:v.dismissedRange,state:y,transaction:u})&&(v.dismissedRange=null),v.dismissedRange===null?(v.active=!0,v.decorationId=g.decorationId||O,v.range=C.range,v.query=C.query,v.text=C.text):v.active=!1):(C||(v.dismissedRange=null),v.active=!1)}else v.active=!1;return v.active||(v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null),v}}}function In({editor:n,items:e}){let t=null,o=null,r=null;const s=()=>{o!==null&&(clearTimeout(o),o=null),r?.(),r=null},i=c=>new Promise(d=>{r=d,o=setTimeout(()=>{o=null;const u=r;r=null,u?.()},c)}),a=()=>{t?.abort(),s(),t=null};return{abort:a,fetch:async(c,d)=>{a(),t=new AbortController;const u=t;if(d>0&&await i(d),t!==u||u.signal.aborted)return{status:"aborted"};try{const g=await e({editor:n,query:c,signal:u.signal});return t!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:g}}catch{return t!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function Tn({placement:n,offset:e,flip:t,floatingUi:o}){var r,s,i,a;const l=[at({mainAxis:(r=e.mainAxis)!==null&&r!==void 0?r:4,crossAxis:(s=e.crossAxis)!==null&&s!==void 0?s:0})];return t&&l.push(lt()),!(o==null||(i=o.middleware)===null||i===void 0)&&i.length&&l.push(...o.middleware),{placement:n,strategy:(a=o?.strategy)!==null&&a!==void 0?a:"absolute",middleware:l}}function Pn(n){if(n instanceof HTMLElement)return n;if(typeof n=="string")try{const e=document.querySelector(n);if(e)return e}catch{return document.body}return document.body}function An({getReferenceRect:n,contextElement:e,config:t,container:o,dismissOnOutsideClick:r,dismiss:s}){return(i,a={})=>{const l={getBoundingClientRect:()=>{var y;return(y=n())!==null&&y!==void 0?y:new DOMRect},contextElement:e};let c=!1;const d=!i.isConnected;d&&Pn(o).appendChild(i),a.onPosition||(i.style.visibility="hidden",i.style.width="max-content");const g=Ce(l,i,()=>{ct(l,i,{placement:t.placement,strategy:t.strategy,middleware:t.middleware}).then(({x:y,y:m,placement:f,strategy:x})=>{if(a.onPosition){a.onPosition({x:y,y:m,placement:f,strategy:x});return}Object.assign(i.style,{position:x,left:`${y}px`,top:`${m}px`}),c||(c=!0,i.style.visibility="")})},a.autoUpdate);let h;return r&&(h=y=>{const m=y.target;!(m instanceof Node)||i.contains(m)||e.contains(m)||s()},document.addEventListener("pointerdown",h,!0)),()=>{g(),h&&document.removeEventListener("pointerdown",h,!0),d&&i.remove()}}}function Nn({editor:n,pluginKey:e,items:t,renderer:o,minQueryLength:r,debounce:s,initialItems:i,placement:a,offset:l,container:c,flip:d,floatingUi:u,dismissOnOutsideClick:g,command:h,clientRectFor:y,dispatchExit:m}){let f;const x=In({editor:n,items:t}),b=Tn({placement:a,offset:l,flip:d,floatingUi:u});function R(v,D){switch(v){case"started":var C;o==null||(C=o.onStart)===null||C===void 0||C.call(o,D);break;case"updated":var O;o==null||(O=o.onUpdate)===null||O===void 0||O.call(o,D);break;case"stopped":var A;o==null||(A=o.onExit)===null||A===void 0||A.call(o,D)}}return{update:async(v,D)=>{var C,O;const A=e.getState(D),F=e.getState(v.state);if(!A||!F)return;let T=null;const $=A.query!==F.query,_=A.text!==F.text,K=A.range.from!==F.range.from||A.range.to!==F.range.to,S=$||_||K;if(!A.active&&F.active)T="started";else if(A.active&&!F.active)T="stopped";else if(F.active&&S)T="updated";else return;const E=T==="stopped"?A:F,P=v.dom.querySelector(`[data-decoration-id="${E.decorationId}"]`),M=y(v,P),w=r===0||(E.query?E.query.length>=r:!1),N=(T==="started"||T==="updated")&&w;if(f={editor:n,range:E.range,query:E.query||"",text:E.text||"",items:i??[],command:U=>h({editor:n,range:E.range,props:U}),decorationNode:P,clientRect:M,loading:N,placement:a,offset:{mainAxis:(C=l.mainAxis)!==null&&C!==void 0?C:4,crossAxis:(O=l.crossAxis)!==null&&O!==void 0?O:0},container:c,flip:d,floatingUi:b,mount:An({getReferenceRect:M,contextElement:v.dom,config:b,container:c,dismissOnOutsideClick:g,dismiss:()=>m(n.view)})},T==="started"){var q;o==null||(q=o.onBeforeStart)===null||q===void 0||q.call(o,f)}if(T==="updated"){var L;o==null||(L=o.onBeforeUpdate)===null||L===void 0||L.call(o,f)}if(T==="started"&&R(T,f),T==="started"||T==="updated")if(!N)x.abort(),f={...f,items:i??[],loading:!1};else{f={...f,items:i??[],loading:!0},T="updated",R(T,f);const U=await x.fetch(E.query||"",s);if(U.status==="aborted")return;const H=e.getState(v.state);if(!H?.active){x.abort();return}f=U.status==="resolved"?{...f,items:U.items,loading:!1}:{...f,loading:!1}}if(T==="stopped"){x.abort(),R(T,f),f=void 0;return}T==="updated"&&R(T,f)},destroy:()=>{var v;x.abort(),f&&(o==null||(v=o.onExit)===null||v===void 0||v.call(o,f))}}}const ke=new ie("suggestion");function _e({pluginKey:n=ke,editor:e,char:t="@",allowSpaces:o=!1,allowToIncludeChar:r=!1,allowedPrefixes:s=[" "],startOfLine:i=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:u=()=>null,items:g=()=>[],minQueryLength:h=0,debounce:y=0,initialItems:m,placement:f="bottom-start",offset:x={},container:b,flip:R=!0,floatingUi:v,dismissOnOutsideClick:D=!0,render:C=()=>({}),allow:O=()=>!0,findSuggestionMatch:A=bn,shouldShow:F,shouldResetDismissed:T}){const $=C?.(),_=o&&!r,K=(P,M)=>Rn(e,P,M,n);function S(P){return Sn({...P,editor:e,shouldResetDismissed:T,effectiveAllowSpaces:_})}const E=P=>En({view:P,pluginKeyRef:n});return new Qe({key:n,view:()=>Nn({editor:e,pluginKey:n,items:g,renderer:$,minQueryLength:h,debounce:y,initialItems:m,placement:f,offset:x,container:b,flip:R,floatingUi:v,dismissOnOutsideClick:D,command:u,clientRectFor:K,dispatchExit:E}),state:Cn({editor:e,char:t,effectiveAllowSpaces:_,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,findSuggestionMatch:A,allow:O,shouldShow:F,shouldKeepDismissed:S,pluginKey:n}),props:wn({pluginKey:n,decorationTag:a,decorationClass:l,decorationContent:c,decorationEmptyClass:d,renderer:$,dispatchExit:E})})}function Hn(n,e=ke){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}var Yn=_e;function Dn(n){const e=X.c(17),{editor:t,query:o,items:r,onSelect:s,onClose:i}=n,[a,l]=p.useState(0),c=p.useRef(r),d=p.useRef(a),u=p.useRef(s),g=p.useRef(i),h=p.useDeferredValue(o),[y,m]=p.useState(h);y!==h&&(m(h),l(0)),a>=r.length&&r.length>0&&l(0);let f,x;e[0]!==r?(f=()=>{c.current=r},x=[r],e[0]=r,e[1]=f,e[2]=x):(f=e[1],x=e[2]),p.useEffect(f,x);let b,R;e[3]!==a?(b=()=>{d.current=a},R=[a],e[3]=a,e[4]=b,e[5]=R):(b=e[4],R=e[5]),p.useEffect(b,R);let v,D;e[6]!==s?(v=()=>{u.current=s},D=[s],e[6]=s,e[7]=v,e[8]=D):(v=e[7],D=e[8]),p.useEffect(v,D);let C,O;e[9]!==i?(C=()=>{g.current=i},O=[i],e[9]=i,e[10]=C,e[11]=O):(C=e[10],O=e[11]),p.useEffect(C,O);let A,F;e[12]!==t?(F=()=>{if(t?.isDestroyed)return;let _;try{_=t.view.dom}catch{return}if(!_)return;const K=E=>{const P=c.current;if(!P.length)return!1;const M=()=>l(N=>(N+1)%P.length),w=()=>l(N=>(N-1+P.length)%P.length);switch(E.key){case"ArrowUp":return E.preventDefault(),w(),!0;case"ArrowDown":return E.preventDefault(),M(),!0;case"Tab":return E.preventDefault(),E.shiftKey?w():M(),!0;case"Home":return E.preventDefault(),l(0),!0;case"End":return E.preventDefault(),l(P.length-1),!0;case"Enter":{if(E.isComposing)return!1;E.preventDefault();const N=d.current;return N!==-1&&P[N]&&u.current?.(P[N],N),!0}case"Escape":return E.preventDefault(),g.current?.(),!0;default:return!1}},S=E=>{K(E)};return _.addEventListener("keydown",S,!0),()=>{_?.removeEventListener("keydown",S,!0)}},A=[t],e[12]=t,e[13]=A,e[14]=F):(A=e[13],F=e[14]),p.useEffect(F,A);const T=r.length?a:void 0;let $;return e[15]!==T?($={selectedIndex:T,setSelectedIndex:l},e[15]=T,e[16]=$):$=e[16],$}function Mn(n,e){switch(e.type){case"SET_SELECTED_ITEM":return{...n,selectedItem:e.payload};case"ON_START":return{...n,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...n,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return n}}const Le=p.createContext(void 0);function je(){const n=p.useContext(Le);if(!n)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return n}function On(n){const e=X.c(16),{editor:t,char:o,pluginKey:r,allow:s,onOpenChange:i}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=a):a=e[0];const[l,c]=p.useReducer(Mn,a);let d;e[1]!==i?(d=m=>{i?.(m)},e[1]=i,e[2]=d):d=e[2];const u=p.useEffectEvent(d);let g;e[3]!==o||e[4]!==s||e[5]!==t||e[6]!==u||e[7]!==r?(g=()=>{if(t?.isDestroyed)return;const m=r instanceof ie?r:new ie(r);t.state.plugins.find(b=>b.spec.key===m)&&t.unregisterPlugin(m);const x=_e({pluginKey:m,editor:t,char:o,allow(b){const R=t.state.doc.resolve(b.range.from);for(let v=R.depth;v>0;v--)if(R.node(v).type.name==="image")return!1;return!(s&&!s(b))},command(){},render:()=>({onStart:b=>{c({type:"ON_START",payload:{element:b.decorationNode??null,query:b.query,range:b.range}}),u(!0)},onUpdate:b=>{c({type:"ON_UPDATE",payload:{element:b.decorationNode??null,query:b.query,range:b.range}})},onKeyDown:b=>b.event.key==="Escape"?(c({type:"ON_EXIT"}),!0):!1,onExit:()=>{c({type:"ON_EXIT"}),u(!1)}}),items:Fn});return t.registerPlugin(x),()=>{t?.isDestroyed||t.unregisterPlugin(m)}},e[3]=o,e[4]=s,e[5]=t,e[6]=u,e[7]=r,e[8]=g):g=e[8];let h;e[9]!==o||e[10]!==s||e[11]!==t||e[12]!==r?(h=[t,r,o,c,s],e[9]=o,e[10]=s,e[11]=t,e[12]=r,e[13]=h):h=e[13],p.useEffect(g,h);let y;return e[14]!==l?(y={state:l,dispatch:c},e[14]=l,e[15]=y):y=e[15],y}function Fn(){return[]}function qn({editor:n,queryKey:e,queryFn:t,onSelect:o}){const{state:r,dispatch:s}=je(),i=p.useDeferredValue(r.query),{data:a}=ut({queryKey:dt.suggestionItems(e,r.open,i),queryFn:()=>r.open?t({query:i}):[]}),l=()=>{s({type:"ON_EXIT"})},c=async(u,g)=>{if(!(r.selectedItem!==null||!r.range)){s({type:"SET_SELECTED_ITEM",payload:u});try{const{view:h}=n,m=h.state.selection.$to.nodeAfter?.text?.startsWith(" "),f=r.range?{...r.range}:{from:0,to:0};m&&r.range&&(f.to+=1),await o({range:f,item:u})===!1?s({type:"SET_SELECTED_ITEM",payload:null}):l()}catch{l()}}},{selectedIndex:d}=Dn({editor:n,query:i,items:a,onSelect:c,onClose:l});return{selectedItem:r.selectedItem,items:a,selectedIndex:d,close:l,onSelect:c}}function $n({children:n}){const{state:e,dispatch:t}=je(),{open:o,element:r}=e,s=()=>{t({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:l}=mn({placement:"bottom-start",open:o,onOpenChange:g=>{g||s()},elements:{reference:r},middleware:[ft(10),gt(),mt()],whileElementsMounted:Ce}),c=fn(l,{outsidePress:g=>!(g.target instanceof Element&&g.target.closest(".ProseMirror"))}),d=hn(l,{role:"listbox"}),{getFloatingProps:u}=pn([c,d]);return o?I.jsx(ln,{children:I.jsx("div",{ref:i.setFloating,style:a,...u(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-md outline-hidden overflow-hidden",children:n})}):null}const kn=n=>{const e=X.c(17),{item:t,isSelected:o,onSelect:r,isLoading:s,ref:i,renderItem:a}=n;let l;if(e[0]!==t){const x=bt(t._meta);l=t.title||xt(t.name,x),e[0]=t,e[1]=l}else l=e[1];const c=l,d=t.description||null,u=t.icon,g=o&&"bg-accent text-accent-foreground",h=s&&"pointer-events-none opacity-50";let y;e[2]!==g||e[3]!==h?(y=vt("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",g,h),e[2]=g,e[3]=h,e[4]=y):y=e[4];let m;e[5]!==d||e[6]!==u||e[7]!==s||e[8]!==t||e[9]!==c||e[10]!==a?(m=a?a(t):I.jsxs(I.Fragment,{children:[u!==void 0&&I.jsx(yt,{icon:u,name:c,size:"xs",className:"mr-2"}),I.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[I.jsxs("div",{className:"flex items-center justify-between gap-2",children:[I.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),s&&I.jsx(ht,{size:"xs"})]}),d&&I.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:d})]}),t.drillable&&I.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"})]}),e[5]=d,e[6]=u,e[7]=s,e[8]=t,e[9]=c,e[10]=a,e[11]=m):m=e[11];let f;return e[12]!==r||e[13]!==i||e[14]!==y||e[15]!==m?(f=I.jsx("div",{ref:i,onClick:r,className:y,children:m}),e[12]=r,e[13]=i,e[14]=y,e[15]=m,e[16]=f):f=e[16],f},_n=n=>{const e=X.c(24),{editor:t,queryKey:o,queryFn:r,onSelect:s,renderItem:i,emptyLabel:a}=n,l=pt();let c;e[0]!==t||e[1]!==s||e[2]!==r||e[3]!==o?(c={editor:t,queryKey:o,queryFn:r,onSelect:s},e[0]=t,e[1]=s,e[2]=r,e[3]=o,e[4]=c):c=e[4];const{items:d,selectedIndex:u,onSelect:g,selectedItem:h}=qn(c);if(!d.length){let x;e[5]!==a||e[6]!==l?(x=a??l("chat.mention.noItemsFound"),e[5]=a,e[6]=l,e[7]=x):x=e[7];let b;return e[8]!==x?(b=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-md p-3 text-sm",children:x}),e[8]=x,e[9]=b):b=e[9],b}let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[10]=y):y=e[10];let m;if(e[11]!==g||e[12]!==d||e[13]!==i||e[14]!==u||e[15]!==h?.name){let x;e[17]!==g||e[18]!==i||e[19]!==u||e[20]!==h?.name?(x=(b,R)=>I.jsx(kn,{item:b,isSelected:R===u,ref:R===u?Kn:void 0,onSelect:()=>g(b,R),isLoading:h?.name===b.name,renderItem:i},`${b.kind??"item"}:${b.name}`),e[17]=g,e[18]=i,e[19]=u,e[20]=h?.name,e[21]=x):x=e[21],m=d.map(x),e[11]=g,e[12]=d,e[13]=i,e[14]=u,e[15]=h?.name,e[16]=m}else m=e[16];let f;return e[22]!==m?(f=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:y,children:I.jsx("div",{className:"p-1",children:m})}),e[22]=m,e[23]=f):f=e[23],f};function Ln(){const n=X.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=I.jsx("div",{className:"p-1",children:[...Array(3)].map(jn)}),n[0]=e):e=n[0],e}function jn(n,e){return I.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[I.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),I.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function Qn(n){const e=X.c(20),{editor:t,char:o,pluginKey:r,queryKey:s,queryFn:i,onSelect:a,allow:l,onOpenChange:c,renderItem:d,emptyLabel:u}=n;let g;e[0]!==l||e[1]!==o||e[2]!==t||e[3]!==c||e[4]!==r?(g={editor:t,char:o,pluginKey:r,allow:l,onOpenChange:c},e[0]=l,e[1]=o,e[2]=t,e[3]=c,e[4]=r,e[5]=g):g=e[5];const{state:h,dispatch:y}=On(g);let m;e[6]!==y||e[7]!==h?(m={state:h,dispatch:y},e[6]=y,e[7]=h,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=I.jsx(Ln,{}),e[9]=f):f=e[9];let x;e[10]!==t||e[11]!==u||e[12]!==a||e[13]!==i||e[14]!==s||e[15]!==d?(x=I.jsx($n,{children:I.jsx(p.Suspense,{fallback:f,children:I.jsx(_n,{editor:t,queryKey:s,queryFn:i,onSelect:a,renderItem:d,emptyLabel:u})})}),e[10]=t,e[11]=u,e[12]=a,e[13]=i,e[14]=s,e[15]=d,e[16]=x):x=e[16];let b;return e[17]!==m||e[18]!==x?(b=I.jsx(Le.Provider,{value:m,children:x}),e[17]=m,e[18]=x,e[19]=b):b=e[19],b}function Kn(n){n&&n.scrollIntoView({block:"center",behavior:"smooth"})}export{Qn as S,Yn as a,Hn as e,Xn as s};
@@ -1 +1 @@
1
- import{r as c,j as i,bo as C,bm as y,br as T,bp as I,by as M,bJ as H,bF as z,c as A,l as g}from"./index-C95CzY3C.js";var m="Switch",[U]=z(m),[q,F]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=F(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function J(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{J as S};
1
+ import{r as c,j as i,bo as C,bm as y,br as T,bp as I,by as M,bJ as H,bF as z,c as A,l as g}from"./index-B9dD9jj0.js";var m="Switch",[U]=z(m),[q,F]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=F(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function J(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{J as S};
@@ -1 +1 @@
1
- import{c as se,j as s,fH as he,b as ue,r as ae,B as te,ao as ge,l as je,t as ce,aS as be}from"./index-C95CzY3C.js";import{s as xe}from"./Plus-DJ-W3_cM.js";import{A as Re,a as ve,b as Se,c as De,g as Ne,d as _e,e as Ce,f as Pe}from"./alert-dialog-nydIJdPH.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-Bvq22AZH.js";import{I as Ie}from"./input-BfBrXJza.js";import{u as $e,a as Fe,R as Te}from"./repository-picker-B-UdqnSa.js";import{u as He,b as Be,c as Ge}from"./use-org-repo-syncs-D5HIk-ZZ.js";import{t as qe}from"./format-time-CjIPQhCN.js";import{R as Le}from"./require-capability-CqMIdAS-.js";import"./X-Ccy7mqMZ.js";import"./ArrowLeft-C0DFEkSG.js";import"./LinkExternal01-3O41jdXy.js";import"./tooltip-DdjGQobT.js";import"./index-D5dEpLnc.js";import"./label-DZ5OXqqj.js";import"./useInfiniteQuery-LLjBr47W.js";import"./infiniteQueryObserver-Cqc8H9Zl.js";import"./collection-search-CfrCGB2I.js";import"./SearchMd-B27FMXMV.js";import"./ShoppingBag01-BTl-krF7.js";import"./avatar-CqsfnSHy.js";import"./User01-DsrGZ98W.js";import"./use-debounced-value-f1u1JXjY.js";import"./use-organization-settings-xVkX8dA1.js";import"./schema-ClJOB7M6.js";import"./task-board-DC2or4R3.js";import"./differenceInSeconds-C3x8sHUj.js";import"./access-gate-CLQyj1tq.js";import"./capability-load-error-1FL5H8Lu.js";function Ve(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Je(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:qe(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ke(e){const t=se.c(38),{config:i,onRemove:l}=e,o=ue();let u;t[0]!==i||t[1]!==o?(u=Je(i,o),t[0]=i,t[1]=o,t[2]=u):u=t[2];const m=u,r=$e();let f;t[3]!==i.repositoryId||t[4]!==r.data?(f=r.data?.find(C=>C.id===i.repositoryId),t[3]=i.repositoryId,t[4]=r.data,t[5]=f):f=t[5];const n=f;let g;t[6]!==n?(g=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:n?s.jsx(Fe,{provider:n.provider,size:16,className:"text-muted-foreground"}):s.jsx(ge,{size:16,className:"text-muted-foreground"})}),t[6]=n,t[7]=g):g=t[7];const c=n?.path??`${i.repoOwner}/${i.repoName}`;let d;t[8]!==c?(d=s.jsx("span",{className:"font-medium text-sm truncate",children:c}),t[8]=c,t[9]=d):d=t[9];let p;t[10]!==i.ref?(p=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",i.ref]}),t[10]=i.ref,t[11]=p):p=t[11];let S;t[12]!==d||t[13]!==p?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[d,p]}),t[12]=d,t[13]=p,t[14]=S):S=t[14];const _=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==_?(D=je("text-xs mt-0.5 truncate",_),t[15]=_,t[16]=D):D=t[16];let b;t[17]!==i.volume||t[18]!==o?(b=o("settings.syncedRepos.rowSubtitle",{volume:i.volume}),t[17]=i.volume,t[18]=o,t[19]=b):b=t[19];let R;t[20]!==m.label||t[21]!==b||t[22]!==D?(R=s.jsxs("p",{className:D,children:[b," ·"," ",m.label]}),t[20]=m.label,t[21]=b,t[22]=D,t[23]=R):R=t[23];let x;t[24]!==R||t[25]!==S?(x=s.jsxs("div",{className:"min-w-0",children:[S,R]}),t[24]=R,t[25]=S,t[26]=x):x=t[26];let y;t[27]!==x||t[28]!==g?(y=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[g,x]}),t[27]=x,t[28]=g,t[29]=y):y=t[29];let h;t[30]!==o?(h=o("settings.syncedRepos.remove"),t[30]=o,t[31]=h):h=t[31];let j;t[32]!==l||t[33]!==h?(j=s.jsx(te,{variant:"outline",size:"sm",onClick:l,children:h}),t[32]=l,t[33]=h,t[34]=j):j=t[34];let N;return t[35]!==y||t[36]!==j?(N=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[y,j]}),t[35]=y,t[36]=j,t[37]=N):N=t[37],N}function Me(e){const t=se.c(21),{onAdd:i}=e,l=ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ge,{size:20,className:"text-muted-foreground"})}),t[0]=o):o=t[0];let u;t[1]!==l?(u=l("settings.syncedRepos.emptyTitle"),t[1]=l,t[2]=u):u=t[2];let m;t[3]!==u?(m=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=m):m=t[4];let r;t[5]!==l?(r=l("settings.syncedRepos.emptyDescription"),t[5]=l,t[6]=r):r=t[6];let f;t[7]!==r?(f=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:r}),t[7]=r,t[8]=f):f=t[8];let n;t[9]!==m||t[10]!==f?(n=s.jsxs("div",{children:[m,f]}),t[9]=m,t[10]=f,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(xe,{size:14}),t[12]=g):g=t[12];let c;t[13]!==l?(c=l("settings.syncedRepos.addRepo"),t[13]=l,t[14]=c):c=t[14];let d;t[15]!==i||t[16]!==c?(d=s.jsxs(te,{onClick:i,size:"sm",className:"mt-2",children:[g,c]}),t[15]=i,t[16]=c,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Qe(){const e=se.c(107),t=ue(),i=He(),l=Be(),o=Ge(),[u,m]=ae.useState(!1),[r,f]=ae.useState(null),[n,g]=ae.useState(""),[c,d]=ae.useState(null);let p;e[0]!==l||e[1]!==r||e[2]!==t||e[3]!==n?(p=function(){!r||!n.trim()||l.mutate({repositoryId:r.id,volume:n.trim()},{onSuccess:v=>{f(null),ce.success(t("settings.syncedRepos.created",{volume:v.volume}))},onError:v=>{ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed"))}})},e[0]=l,e[1]=r,e[2]=t,e[3]=n,e[4]=p):p=e[4];const S=p;let _;e[5]!==c||e[6]!==o||e[7]!==t?(_=function(){c&&o.mutate(c.id,{onSuccess:()=>ce.success(t("settings.syncedRepos.removed")),onError:v=>ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=c,e[6]=o,e[7]=t,e[8]=_):_=e[8];const D=_;if(i.isPending){let a;return e[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(be,{className:"h-32 w-full"}),e[9]=a):a=e[9],a}let b;e[10]!==i.data?(b=i.data??[],e[10]=i.data,e[11]=b):b=e[11];const R=b;let x;e[12]!==t?(x=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=x):x=e[13];let y;e[14]!==x?(y=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[14]=x,e[15]=y):y=e[15];let h;e[16]!==R||e[17]!==t?(h=R.length===0?s.jsx(Me,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(te,{onClick:()=>m(!0),size:"sm",children:[s.jsx(xe,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:R.map(a=>s.jsx(Ke,{config:a,onRemove:()=>d(a)},a.id))})]}),e[16]=R,e[17]=t,e[18]=h):h=e[18];let j;e[19]!==t?(j=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=j):j=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=a=>{const{repository:v}=a;m(!1),f(v),g(Ve(v.path.split("/").at(-1)??v.path))},e[21]=N):N=e[21];let C;e[22]!==u||e[23]!==j?(C=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=C):C=e[24];const de=r!==null;let le;e[25]===Symbol.for("react.memo_cache_sentinel")?(le=a=>{a||f(null)},e[25]=le):le=e[25];let P;e[26]!==t?(P=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=P):P=e[27];let A;e[28]!==P?(A=s.jsx(Ae,{children:P}),e[28]=P,e[29]=A):A=e[29];const me=r?r.path:"";let k;e[30]!==t||e[31]!==me?(k=t("settings.syncedRepos.nameDialogDescription",{repo:me}),e[30]=t,e[31]=me,e[32]=k):k=e[32];let w;e[33]!==k?(w=s.jsx(ke,{children:k}),e[33]=k,e[34]=w):w=e[34];let z;e[35]!==A||e[36]!==w?(z=s.jsxs(we,{children:[A,w]}),e[35]=A,e[36]=w,e[37]=z):z=e[37];let ie;e[38]===Symbol.for("react.memo_cache_sentinel")?(ie=a=>g(a.target.value),e[38]=ie):ie=e[38];let E;e[39]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=E):E=e[40];let O;e[41]!==E||e[42]!==n?(O=s.jsx(Ie,{value:n,onChange:ie,placeholder:E,autoFocus:!0}),e[41]=E,e[42]=n,e[43]=O):O=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f(null),e[44]=ne):ne=e[44];const ye=l.isPending;let I;e[45]!==t?(I=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=I):I=e[46];let $;e[47]!==l.isPending||e[48]!==I?($=s.jsx(te,{variant:"outline",onClick:ne,disabled:ye,children:I}),e[47]=l.isPending,e[48]=I,e[49]=$):$=e[49];let F;e[50]!==l.isPending||e[51]!==n?(F=!n.trim()||l.isPending,e[50]=l.isPending,e[51]=n,e[52]=F):F=e[52];let T;e[53]!==l.isPending||e[54]!==t?(T=l.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=l.isPending,e[54]=t,e[55]=T):T=e[55];let H;e[56]!==S||e[57]!==F||e[58]!==T?(H=s.jsx(te,{disabled:F,onClick:S,children:T}),e[56]=S,e[57]=F,e[58]=T,e[59]=H):H=e[59];let B;e[60]!==$||e[61]!==H?(B=s.jsxs(ze,{children:[$,H]}),e[60]=$,e[61]=H,e[62]=B):B=e[62];let G;e[63]!==z||e[64]!==O||e[65]!==B?(G=s.jsxs(Ee,{className:"sm:max-w-sm",children:[z,O,B]}),e[63]=z,e[64]=O,e[65]=B,e[66]=G):G=e[66];let q;e[67]!==G||e[68]!==de?(q=s.jsx(Oe,{open:de,onOpenChange:le,children:G}),e[67]=G,e[68]=de,e[69]=q):q=e[69];const fe=c!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=a=>{a||d(null)},e[70]=oe):oe=e[70];const pe=c?.volume??"";let L;e[71]!==t||e[72]!==pe?(L=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(Re,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==t?(J=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=J):J=e[77];let K;e[78]!==J?(K=s.jsx(ve,{children:J}),e[78]=J,e[79]=K):K=e[79];let M;e[80]!==V||e[81]!==K?(M=s.jsxs(Se,{children:[V,K]}),e[80]=V,e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==Q?(U=s.jsx(De,{children:Q}),e[85]=Q,e[86]=U):U=e[86];let W;e[87]!==t?(W=t("settings.syncedRepos.remove"),e[87]=t,e[88]=W):W=e[88];let X;e[89]!==D||e[90]!==W?(X=s.jsx(Ne,{onClick:D,children:W}),e[89]=D,e[90]=W,e[91]=X):X=e[91];let Y;e[92]!==U||e[93]!==X?(Y=s.jsxs(_e,{children:[U,X]}),e[92]=U,e[93]=X,e[94]=Y):Y=e[94];let Z;e[95]!==M||e[96]!==Y?(Z=s.jsxs(Ce,{children:[M,Y]}),e[95]=M,e[96]=Y,e[97]=Z):Z=e[97];let ee;e[98]!==fe||e[99]!==Z?(ee=s.jsx(Pe,{open:fe,onOpenChange:oe,children:Z}),e[98]=fe,e[99]=Z,e[100]=ee):ee=e[100];let re;return e[101]!==q||e[102]!==y||e[103]!==ee||e[104]!==h||e[105]!==C?(re=s.jsxs(s.Fragment,{children:[y,h,C,q,ee]}),e[101]=q,e[102]=y,e[103]=ee,e[104]=h,e[105]=C,e[106]=re):re=e[106],re}function Ue(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(he,{group:"storage",children:s.jsx(Qe,{})}),e[0]=t):t=e[0],t}function Nt(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Le,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{Nt as default};
1
+ import{c as se,j as s,fH as he,b as ue,r as ae,B as te,ao as ge,l as je,t as ce,aS as be}from"./index-B9dD9jj0.js";import{s as xe}from"./Plus-DP7AHtKt.js";import{A as Re,a as ve,b as Se,c as De,g as Ne,d as _e,e as Ce,f as Pe}from"./alert-dialog-DeJgSFRZ.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-Mg_Z3ES1.js";import{I as Ie}from"./input-Cndqm_5O.js";import{u as $e,a as Fe,R as Te}from"./repository-picker-BIkrH86Z.js";import{u as He,b as Be,c as Ge}from"./use-org-repo-syncs-DGjVBBAK.js";import{t as qe}from"./format-time-CjIPQhCN.js";import{R as Le}from"./require-capability-CEGMzsiO.js";import"./X-NPE_cXRR.js";import"./ArrowLeft-DYnQbYxF.js";import"./LinkExternal01-CR1925bA.js";import"./tooltip-CM3YyNDC.js";import"./index-DWe-6mCD.js";import"./label-DpahMcEo.js";import"./useInfiniteQuery-TQWsreUe.js";import"./infiniteQueryObserver-Ex2lNjjr.js";import"./collection-search-D_azi8Gq.js";import"./SearchMd-D_KPqWqZ.js";import"./ShoppingBag01-Dq4UD5Hm.js";import"./avatar-UFbMnkmr.js";import"./User01-CU3qbr5s.js";import"./use-debounced-value-DCYhoWzs.js";import"./use-organization-settings-DbPbYeMx.js";import"./schema-BejaMrNT.js";import"./task-board-DlEJAtdm.js";import"./differenceInSeconds-C3x8sHUj.js";import"./access-gate-DRBSlBtJ.js";import"./capability-load-error-BWTOxRLG.js";function Ve(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Je(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:qe(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ke(e){const t=se.c(38),{config:i,onRemove:l}=e,o=ue();let u;t[0]!==i||t[1]!==o?(u=Je(i,o),t[0]=i,t[1]=o,t[2]=u):u=t[2];const m=u,r=$e();let f;t[3]!==i.repositoryId||t[4]!==r.data?(f=r.data?.find(C=>C.id===i.repositoryId),t[3]=i.repositoryId,t[4]=r.data,t[5]=f):f=t[5];const n=f;let g;t[6]!==n?(g=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:n?s.jsx(Fe,{provider:n.provider,size:16,className:"text-muted-foreground"}):s.jsx(ge,{size:16,className:"text-muted-foreground"})}),t[6]=n,t[7]=g):g=t[7];const c=n?.path??`${i.repoOwner}/${i.repoName}`;let d;t[8]!==c?(d=s.jsx("span",{className:"font-medium text-sm truncate",children:c}),t[8]=c,t[9]=d):d=t[9];let p;t[10]!==i.ref?(p=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",i.ref]}),t[10]=i.ref,t[11]=p):p=t[11];let S;t[12]!==d||t[13]!==p?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[d,p]}),t[12]=d,t[13]=p,t[14]=S):S=t[14];const _=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==_?(D=je("text-xs mt-0.5 truncate",_),t[15]=_,t[16]=D):D=t[16];let b;t[17]!==i.volume||t[18]!==o?(b=o("settings.syncedRepos.rowSubtitle",{volume:i.volume}),t[17]=i.volume,t[18]=o,t[19]=b):b=t[19];let R;t[20]!==m.label||t[21]!==b||t[22]!==D?(R=s.jsxs("p",{className:D,children:[b," ·"," ",m.label]}),t[20]=m.label,t[21]=b,t[22]=D,t[23]=R):R=t[23];let x;t[24]!==R||t[25]!==S?(x=s.jsxs("div",{className:"min-w-0",children:[S,R]}),t[24]=R,t[25]=S,t[26]=x):x=t[26];let y;t[27]!==x||t[28]!==g?(y=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[g,x]}),t[27]=x,t[28]=g,t[29]=y):y=t[29];let h;t[30]!==o?(h=o("settings.syncedRepos.remove"),t[30]=o,t[31]=h):h=t[31];let j;t[32]!==l||t[33]!==h?(j=s.jsx(te,{variant:"outline",size:"sm",onClick:l,children:h}),t[32]=l,t[33]=h,t[34]=j):j=t[34];let N;return t[35]!==y||t[36]!==j?(N=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[y,j]}),t[35]=y,t[36]=j,t[37]=N):N=t[37],N}function Me(e){const t=se.c(21),{onAdd:i}=e,l=ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ge,{size:20,className:"text-muted-foreground"})}),t[0]=o):o=t[0];let u;t[1]!==l?(u=l("settings.syncedRepos.emptyTitle"),t[1]=l,t[2]=u):u=t[2];let m;t[3]!==u?(m=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=m):m=t[4];let r;t[5]!==l?(r=l("settings.syncedRepos.emptyDescription"),t[5]=l,t[6]=r):r=t[6];let f;t[7]!==r?(f=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:r}),t[7]=r,t[8]=f):f=t[8];let n;t[9]!==m||t[10]!==f?(n=s.jsxs("div",{children:[m,f]}),t[9]=m,t[10]=f,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(xe,{size:14}),t[12]=g):g=t[12];let c;t[13]!==l?(c=l("settings.syncedRepos.addRepo"),t[13]=l,t[14]=c):c=t[14];let d;t[15]!==i||t[16]!==c?(d=s.jsxs(te,{onClick:i,size:"sm",className:"mt-2",children:[g,c]}),t[15]=i,t[16]=c,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Qe(){const e=se.c(107),t=ue(),i=He(),l=Be(),o=Ge(),[u,m]=ae.useState(!1),[r,f]=ae.useState(null),[n,g]=ae.useState(""),[c,d]=ae.useState(null);let p;e[0]!==l||e[1]!==r||e[2]!==t||e[3]!==n?(p=function(){!r||!n.trim()||l.mutate({repositoryId:r.id,volume:n.trim()},{onSuccess:v=>{f(null),ce.success(t("settings.syncedRepos.created",{volume:v.volume}))},onError:v=>{ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed"))}})},e[0]=l,e[1]=r,e[2]=t,e[3]=n,e[4]=p):p=e[4];const S=p;let _;e[5]!==c||e[6]!==o||e[7]!==t?(_=function(){c&&o.mutate(c.id,{onSuccess:()=>ce.success(t("settings.syncedRepos.removed")),onError:v=>ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=c,e[6]=o,e[7]=t,e[8]=_):_=e[8];const D=_;if(i.isPending){let a;return e[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(be,{className:"h-32 w-full"}),e[9]=a):a=e[9],a}let b;e[10]!==i.data?(b=i.data??[],e[10]=i.data,e[11]=b):b=e[11];const R=b;let x;e[12]!==t?(x=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=x):x=e[13];let y;e[14]!==x?(y=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[14]=x,e[15]=y):y=e[15];let h;e[16]!==R||e[17]!==t?(h=R.length===0?s.jsx(Me,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(te,{onClick:()=>m(!0),size:"sm",children:[s.jsx(xe,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:R.map(a=>s.jsx(Ke,{config:a,onRemove:()=>d(a)},a.id))})]}),e[16]=R,e[17]=t,e[18]=h):h=e[18];let j;e[19]!==t?(j=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=j):j=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=a=>{const{repository:v}=a;m(!1),f(v),g(Ve(v.path.split("/").at(-1)??v.path))},e[21]=N):N=e[21];let C;e[22]!==u||e[23]!==j?(C=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=C):C=e[24];const de=r!==null;let le;e[25]===Symbol.for("react.memo_cache_sentinel")?(le=a=>{a||f(null)},e[25]=le):le=e[25];let P;e[26]!==t?(P=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=P):P=e[27];let A;e[28]!==P?(A=s.jsx(Ae,{children:P}),e[28]=P,e[29]=A):A=e[29];const me=r?r.path:"";let k;e[30]!==t||e[31]!==me?(k=t("settings.syncedRepos.nameDialogDescription",{repo:me}),e[30]=t,e[31]=me,e[32]=k):k=e[32];let w;e[33]!==k?(w=s.jsx(ke,{children:k}),e[33]=k,e[34]=w):w=e[34];let z;e[35]!==A||e[36]!==w?(z=s.jsxs(we,{children:[A,w]}),e[35]=A,e[36]=w,e[37]=z):z=e[37];let ie;e[38]===Symbol.for("react.memo_cache_sentinel")?(ie=a=>g(a.target.value),e[38]=ie):ie=e[38];let E;e[39]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=E):E=e[40];let O;e[41]!==E||e[42]!==n?(O=s.jsx(Ie,{value:n,onChange:ie,placeholder:E,autoFocus:!0}),e[41]=E,e[42]=n,e[43]=O):O=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f(null),e[44]=ne):ne=e[44];const ye=l.isPending;let I;e[45]!==t?(I=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=I):I=e[46];let $;e[47]!==l.isPending||e[48]!==I?($=s.jsx(te,{variant:"outline",onClick:ne,disabled:ye,children:I}),e[47]=l.isPending,e[48]=I,e[49]=$):$=e[49];let F;e[50]!==l.isPending||e[51]!==n?(F=!n.trim()||l.isPending,e[50]=l.isPending,e[51]=n,e[52]=F):F=e[52];let T;e[53]!==l.isPending||e[54]!==t?(T=l.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=l.isPending,e[54]=t,e[55]=T):T=e[55];let H;e[56]!==S||e[57]!==F||e[58]!==T?(H=s.jsx(te,{disabled:F,onClick:S,children:T}),e[56]=S,e[57]=F,e[58]=T,e[59]=H):H=e[59];let B;e[60]!==$||e[61]!==H?(B=s.jsxs(ze,{children:[$,H]}),e[60]=$,e[61]=H,e[62]=B):B=e[62];let G;e[63]!==z||e[64]!==O||e[65]!==B?(G=s.jsxs(Ee,{className:"sm:max-w-sm",children:[z,O,B]}),e[63]=z,e[64]=O,e[65]=B,e[66]=G):G=e[66];let q;e[67]!==G||e[68]!==de?(q=s.jsx(Oe,{open:de,onOpenChange:le,children:G}),e[67]=G,e[68]=de,e[69]=q):q=e[69];const fe=c!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=a=>{a||d(null)},e[70]=oe):oe=e[70];const pe=c?.volume??"";let L;e[71]!==t||e[72]!==pe?(L=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(Re,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==t?(J=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=J):J=e[77];let K;e[78]!==J?(K=s.jsx(ve,{children:J}),e[78]=J,e[79]=K):K=e[79];let M;e[80]!==V||e[81]!==K?(M=s.jsxs(Se,{children:[V,K]}),e[80]=V,e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==Q?(U=s.jsx(De,{children:Q}),e[85]=Q,e[86]=U):U=e[86];let W;e[87]!==t?(W=t("settings.syncedRepos.remove"),e[87]=t,e[88]=W):W=e[88];let X;e[89]!==D||e[90]!==W?(X=s.jsx(Ne,{onClick:D,children:W}),e[89]=D,e[90]=W,e[91]=X):X=e[91];let Y;e[92]!==U||e[93]!==X?(Y=s.jsxs(_e,{children:[U,X]}),e[92]=U,e[93]=X,e[94]=Y):Y=e[94];let Z;e[95]!==M||e[96]!==Y?(Z=s.jsxs(Ce,{children:[M,Y]}),e[95]=M,e[96]=Y,e[97]=Z):Z=e[97];let ee;e[98]!==fe||e[99]!==Z?(ee=s.jsx(Pe,{open:fe,onOpenChange:oe,children:Z}),e[98]=fe,e[99]=Z,e[100]=ee):ee=e[100];let re;return e[101]!==q||e[102]!==y||e[103]!==ee||e[104]!==h||e[105]!==C?(re=s.jsxs(s.Fragment,{children:[y,h,C,q,ee]}),e[101]=q,e[102]=y,e[103]=ee,e[104]=h,e[105]=C,e[106]=re):re=e[106],re}function Ue(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(he,{group:"storage",children:s.jsx(Qe,{})}),e[0]=t):t=e[0],t}function Nt(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Le,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{Nt as default};
@@ -1 +1 @@
1
- import{c as a,l as f,j as i}from"./index-C95CzY3C.js";import{a as p}from"./ZoomOut-DKLrc0AX.js";function j(m){const s=a.c(10),{icon:o,className:l}=m,e=l===void 0?"size-4":l;if(o.kind==="component"){const{Component:c}=o;let t;return s[0]!==c||s[1]!==e?(t=i.jsx(c,{className:e}),s[0]=c,s[1]=e,s[2]=t):t=s[2],t}if(o.kind==="url"){const c=o.src;let t;s[3]!==e?(t=f(e,"rounded-sm object-cover"),s[3]=e,s[4]=t):t=s[4];let r;return s[5]!==o.src||s[6]!==t?(r=i.jsx("img",{src:c,alt:"",className:t}),s[5]=o.src,s[6]=t,s[7]=r):r=s[7],r}let n;return s[8]!==e?(n=i.jsx(p,{className:e}),s[8]=e,s[9]=n):n=s[9],n}export{j as T};
1
+ import{c as a,l as f,j as i}from"./index-B9dD9jj0.js";import{a as p}from"./ZoomOut-xQj4oorm.js";function j(m){const s=a.c(10),{icon:o,className:l}=m,e=l===void 0?"size-4":l;if(o.kind==="component"){const{Component:c}=o;let t;return s[0]!==c||s[1]!==e?(t=i.jsx(c,{className:e}),s[0]=c,s[1]=e,s[2]=t):t=s[2],t}if(o.kind==="url"){const c=o.src;let t;s[3]!==e?(t=f(e,"rounded-sm object-cover"),s[3]=e,s[4]=t):t=s[4];let r;return s[5]!==o.src||s[6]!==t?(r=i.jsx("img",{src:c,alt:"",className:t}),s[5]=o.src,s[6]=t,s[7]=r):r=s[7],r}let n;return s[8]!==e?(n=i.jsx(p,{className:e}),s[8]=e,s[9]=n):n=s[9],n}export{j as T};
@@ -1 +1 @@
1
- import{c,l as i,j as r}from"./index-C95CzY3C.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{m as T,f as a,p as b,x as c,b as d,d as e};
1
+ import{c,l as i,j as r}from"./index-B9dD9jj0.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{m as T,f as a,p as b,x as c,b as d,d as e};
@@ -1 +1 @@
1
- import{r as v,j as d,et as k,bo as p,bp as T,ev as F,dc as M,bq as P,br as S,bn as V,eu as y,bF as D,c as x,l as g}from"./index-C95CzY3C.js";var m="Tabs",[G]=D(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(F,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(M,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,q=_,B=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(q,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(B,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,O as b,U as c};
1
+ import{r as v,j as d,et as k,bo as p,bp as T,ev as F,dc as M,bq as P,br as S,bn as V,eu as y,bF as D,c as x,l as g}from"./index-B9dD9jj0.js";var m="Tabs",[G]=D(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(F,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(M,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,q=_,B=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(q,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(B,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,O as b,U as c};