decocms 4.446.1 → 4.447.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/dist/client/assets/{AlertCircle-CQA_p2Cp.js → AlertCircle-O5yKT_wD.js} +1 -1
  2. package/dist/client/assets/{AreaChart-94A56lku.js → AreaChart-DOBe6b77.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-Dl_7c8AB.js → ArrowLeft-Bgwvgp7N.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-0DU20WU2.js → ArrowUp-BcguyIxa.js} +1 -1
  5. package/dist/client/assets/{Building02-CsHqQGTj.js → Building02-DXskyQyV.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-OVjYagl6.js → CartesianChart-Dxs56jW8.js} +1 -1
  7. package/dist/client/assets/{Check-Bo3qSXwJ.js → Check-BwZg9K6a.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BCxvtn62.js → CheckCircle-B8nBZ9lR.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-Ds84QUAn.js → ChevronUp-XuQjQLoK.js} +1 -1
  10. package/dist/client/assets/{Copy01-QNdLW2v3.js → Copy01-YmLU_wow.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-D1KkCG7o.js → CreditCard01-CwEdzwSq.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Dyi1_2jC.js → DotsVertical-DEYhHh-q.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-Dckliguf.js → ErrorBarContext-CoXkTI3v.js} +1 -1
  14. package/dist/client/assets/{Image01-0Rs0fG3a.js → Image01-DFTuvWJV.js} +1 -1
  15. package/dist/client/assets/{Key01-DvlZjbjO.js → Key01-CW5AmBXO.js} +1 -1
  16. package/dist/client/assets/{Line-BZPiXXVf.js → Line-w53GBlC_.js} +1 -1
  17. package/dist/client/assets/{Link01-3DcN1bgm.js → Link01-rblrB3OI.js} +1 -1
  18. package/dist/client/assets/{LinkBroken01-8QjnprbC.js → LinkBroken01-cRHkOCv3.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-CLN31q0P.js → LinkExternal01-DMr7xmMD.js} +1 -1
  20. package/dist/client/assets/{Monitor01-C0xXEFc5.js → Monitor01-DRRgoSgd.js} +1 -1
  21. package/dist/client/assets/{Palette-CaoJ793n.js → Palette-BLSfhg5D.js} +1 -1
  22. package/dist/client/assets/{Plus-DUwLVLW_.js → Plus-B7fu2HeJ.js} +1 -1
  23. package/dist/client/assets/{SearchMd-BiNHdvMf.js → SearchMd-DpRsJH0P.js} +1 -1
  24. package/dist/client/assets/{Sector-DrcdpRCF.js → Sector-DUcOKKda.js} +1 -1
  25. package/dist/client/assets/{ShoppingBag01-BlgcPhxp.js → ShoppingBag01-Bn_Ml-RN.js} +1 -1
  26. package/dist/client/assets/{Sun-aSGS3XrK.js → Sun-JyTPOz6f.js} +1 -1
  27. package/dist/client/assets/{Tool01-BuLiX0jy.js → Tool01-TfY7iJsP.js} +1 -1
  28. package/dist/client/assets/{Trash01-DtMJF0U3.js → Trash01-DBoWC6W0.js} +1 -1
  29. package/dist/client/assets/{Upload01-C2lcKrsy.js → Upload01-oBIhuFXz.js} +1 -1
  30. package/dist/client/assets/{User01-DmaMR1Ca.js → User01-DlDKGoyi.js} +1 -1
  31. package/dist/client/assets/{UserSquare-B0WZmX6s.js → UserSquare-Cij4gM7j.js} +1 -1
  32. package/dist/client/assets/{Users01-C8SJUk8C.js → Users01-B0qqt-bB.js} +1 -1
  33. package/dist/client/assets/{X-BO04Dn0R.js → X-B1izQ1KV.js} +1 -1
  34. package/dist/client/assets/{XAxis-DjkUxR47.js → XAxis-CxP14qz_.js} +1 -1
  35. package/dist/client/assets/{XClose-DwKTRWak.js → XClose-B1wwChfA.js} +1 -1
  36. package/dist/client/assets/{ZoomOut-hhnEYknp.js → ZoomOut-Cy6sSJWj.js} +1 -1
  37. package/dist/client/assets/{access-gate-g4Ol-Lnp.js → access-gate-DvGFBZwA.js} +1 -1
  38. package/dist/client/assets/{add-connection-dialog-BB1INtAa.js → add-connection-dialog-1TbuXfcy.js} +1 -1
  39. package/dist/client/assets/{agent-analytics-UbMmc2xM.js → agent-analytics-CVvlpC2h.js} +1 -1
  40. package/dist/client/assets/agent-app-CdSOzSAf.js +1 -0
  41. package/dist/client/assets/{agent-assets-DFJmMVeP.js → agent-assets-dT4w7KXp.js} +1 -1
  42. package/dist/client/assets/{agent-automation-gh60EKv-.js → agent-automation-QQcgGJrd.js} +1 -1
  43. package/dist/client/assets/{agent-automations-Cyb-cCIs.js → agent-automations-DYCzMC9n.js} +1 -1
  44. package/dist/client/assets/{agent-connect-sources-C93dhycr.js → agent-connect-sources-BH2pAvk9.js} +1 -1
  45. package/dist/client/assets/agent-deck-CepgSTaG.js +1 -0
  46. package/dist/client/assets/{agent-e2e-CRjvTqPc.js → agent-e2e-CE4P7SOm.js} +1 -1
  47. package/dist/client/assets/{agent-experiments-Od-fEEVw.js → agent-experiments-Cvf_GoyJ.js} +1 -1
  48. package/dist/client/assets/{agent-file-Uip3fQYD.js → agent-file-2ITxF0Ae.js} +1 -1
  49. package/dist/client/assets/{agent-git-BJ3uVxrR.js → agent-git-CaE7XjIB.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-Cpk5ThRL.js → agent-hosting-JmwTdK6y.js} +1 -1
  51. package/dist/client/assets/{agent-icon-C8zn459s.js → agent-icon-DebFssce.js} +1 -1
  52. package/dist/client/assets/agent-library-DszZ1exI.js +1 -0
  53. package/dist/client/assets/agent-library-file-B9vfOl4A.js +1 -0
  54. package/dist/client/assets/{agent-monitor-DKWpCvbH.js → agent-monitor-IbBmqvCt.js} +1 -1
  55. package/dist/client/assets/{agent-overview-C0CBjtgK.js → agent-overview-BwNdPBpC.js} +1 -1
  56. package/dist/client/assets/agent-settings-Cui7mNtr.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-C9GivBz_.js → agent-site-editor-C8eLBttq.js} +1 -1
  58. package/dist/client/assets/agent-site-editor-code-Y8Sm7eAb.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-CGWvdS7C.js → agent-site-editor-content--b4gLs1h.js} +3 -3
  60. package/dist/client/assets/{agent-site-editor-preview-TbwhHm-5.js → agent-site-editor-preview-BZZnLQZf.js} +3 -3
  61. package/dist/client/assets/agent-view-BOncsgwo.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-CYaQjfk2.js → agent-view-guard-B4uVbmma.js} +1 -1
  63. package/dist/client/assets/{agents-list-BhjRlvRY.js → agents-list-CwdDMmy-.js} +1 -1
  64. package/dist/client/assets/{ai-providers-UcNEAf_J.js → ai-providers-D2O1ixBz.js} +1 -1
  65. package/dist/client/assets/{alert-DwmQ7qtd.js → alert-CqDdaXWn.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-zI-mFpSQ.js → alert-dialog-BaW-BGF4.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-rNV5HZ50.js → analytics-sections-D61Wwl8L.js} +1 -1
  68. package/dist/client/assets/api-keys-DQSpTJNt.js +1 -0
  69. package/dist/client/assets/{api-keys-sSvDZG99.js → api-keys-wNYNv40Y.js} +1 -1
  70. package/dist/client/assets/app-editor-BS446zS8.js +1 -0
  71. package/dist/client/assets/{asset-utils-C3FMP3nb.js → asset-utils-D3olPYx7.js} +1 -1
  72. package/dist/client/assets/{auth-DQuDCDTH.js → auth-CABZOlQ0.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-BTTBnKvo.js → auth-catchall-qhf0Gqyx.js} +1 -1
  74. package/dist/client/assets/{auth-entry-XM1FbOYg.js → auth-entry-nJBLD0Y2.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-mHJ8Mnv8.js → auth-split-layout-P-3F6VoK.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth--Ui7uUW3.js → authenticate-and-persist-oauth-DBd5KhOF.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-Cph_qNFz.js → automation-list-row-B2m3VUdV.js} +1 -1
  78. package/dist/client/assets/{automation-runs-Bk7987tn.js → automation-runs-BGWmky8f.js} +1 -1
  79. package/dist/client/assets/{automations-BusQTRzA.js → automations-C4fgolau.js} +1 -1
  80. package/dist/client/assets/{autosend-B7xOxZCV.js → autosend-BkG_BHpj.js} +1 -1
  81. package/dist/client/assets/{avatar-BxSXBdTP.js → avatar-C70_Ki0z.js} +1 -1
  82. package/dist/client/assets/{badge-Bkod8faG.js → badge-D10nU5hm.js} +1 -1
  83. package/dist/client/assets/{block-document-CFi5j69X.js → block-document-D3BljOLs.js} +1 -1
  84. package/dist/client/assets/{blocks-preview-workspace-context-CNAK__es.js → blocks-preview-workspace-context-DDuiEZgT.js} +1 -1
  85. package/dist/client/assets/{buckets-8h9eIrQM.js → buckets-B2U9XBuC.js} +1 -1
  86. package/dist/client/assets/{build-improve-prompt-doc-BbWygkjj.js → build-improve-prompt-doc-Cjucl5Ml.js} +1 -1
  87. package/dist/client/assets/{calendar-BL2c1BVO.js → calendar-BF7zRWf5.js} +1 -1
  88. package/dist/client/assets/{capability-load-error-AIgwu68M.js → capability-load-error-CI6r2eSt.js} +1 -1
  89. package/dist/client/assets/{category-editor-By6DtwpQ.js → category-editor-BPgoNKbj.js} +1 -1
  90. package/dist/client/assets/{chart-NHKhTpOL.js → chart-BkrO3MsD.js} +1 -1
  91. package/dist/client/assets/{chat-context-CvEgaFCN.js → chat-context-Crr9YCN0.js} +1 -1
  92. package/dist/client/assets/{chat-draft-jBRWjVIJ.js → chat-draft-BkkmQZdS.js} +1 -1
  93. package/dist/client/assets/{checkbox-DM1zG_bR.js → checkbox-CAXlLvHp.js} +1 -1
  94. package/dist/client/assets/{choose-editor-DXMPbOcS.js → choose-editor-CXZPe8wI.js} +1 -1
  95. package/dist/client/assets/{claim-phase-copy-DOJxxCtG.js → claim-phase-copy-DZ3Yirir.js} +1 -1
  96. package/dist/client/assets/{cli-auth-success-RzErssq7.js → cli-auth-success-BVdFv3bm.js} +1 -1
  97. package/dist/client/assets/{client-icons-CpN46V1K.js → client-icons-DrzfFqzQ.js} +1 -1
  98. package/dist/client/assets/{collapsible-DckFjvhZ.js → collapsible-CKOvtNeB.js} +1 -1
  99. package/dist/client/assets/{collection-detail-BhrjxRoz.js → collection-detail-DnoqLlcG.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-B4IWBje6.js → collection-display-button-bxkLloWp.js} +1 -1
  101. package/dist/client/assets/{collection-search-Cp0gVUrY.js → collection-search-DZ1wZYuR.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-Bww62NEV.js → collection-table-wrapper-DjNNBLdq.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-DujOg3C7.js → collection-tabs-Y0ynVKEj.js} +1 -1
  104. package/dist/client/assets/{column-rules-DjRlzWHk.js → column-rules-DQX2ptJC.js} +1 -1
  105. package/dist/client/assets/{combobox-2qhSjEFr.js → combobox-DfBcz1Tb.js} +1 -1
  106. package/dist/client/assets/{command-ZBxh5GnQ.js → command-BUcXz1jA.js} +1 -1
  107. package/dist/client/assets/{companion-mcps-section-CDnsqeV6.js → companion-mcps-section-DbjKMv-Y.js} +1 -1
  108. package/dist/client/assets/{config-DK92N2N0.js → config-DaCobjNE.js} +1 -1
  109. package/dist/client/assets/{connect-lp3YwtIU.js → connect-CPjoHilW.js} +1 -1
  110. package/dist/client/assets/{connect-layout-BmKB0MQt.js → connect-layout-K_gPt_sp.js} +1 -1
  111. package/dist/client/assets/{connection-Bw7PTYac.js → connection-D4h25APd.js} +1 -1
  112. package/dist/client/assets/{connection-card-BE5DxUWL.js → connection-card-XwOnt1f0.js} +1 -1
  113. package/dist/client/assets/{connection-detail-D4H16vJ0.js → connection-detail-D4tkjBck.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-B0fzrlcU.js → connection-form-helpers-MMq14fzZ.js} +1 -1
  115. package/dist/client/assets/{connections-D_QAyydr.js → connections-BzC5bqYg.js} +1 -1
  116. package/dist/client/assets/{context-0yOwY8Xe.js → context-0fIuzLTM.js} +1 -1
  117. package/dist/client/assets/{context-menu-CzHrYgyK.js → context-menu-Bl0G1UDO.js} +1 -1
  118. package/dist/client/assets/{create-organization-dialog-uaygtZt_.js → create-organization-dialog-CFcjJ3cx.js} +1 -1
  119. package/dist/client/assets/{daily-pulse-DQNDzVjv.js → daily-pulse-Dus-woVV.js} +1 -1
  120. package/dist/client/assets/{decopilot-BdkjG-bD.js → decopilot-4kqD0JAa.js} +1 -1
  121. package/dist/client/assets/{device-hint-D3ZO4Iw7.js → device-hint-BcqeJvfC.js} +1 -1
  122. package/dist/client/assets/{dialog-DC6TmMkf.js → dialog-C_zHR8DK.js} +1 -1
  123. package/dist/client/assets/{discover-BLKvCoGk.js → discover-Djz6Veha.js} +1 -1
  124. package/dist/client/assets/{domain-settings-BVxXQdaO.js → domain-settings-CFO7Yfbv.js} +1 -1
  125. package/dist/client/assets/{download-app-dialog-CEx38Fcv.js → download-app-dialog-UTCmHANJ.js} +1 -1
  126. package/dist/client/assets/{drawer-BUMMA5sr.js → drawer-CeyU31cS.js} +1 -1
  127. package/dist/client/assets/{editor-CJUNgGBw.js → editor-DEzZHfDd.js} +1 -1
  128. package/dist/client/assets/{empty-state-ftdhK3Qw.js → empty-state-2X05DwZp.js} +1 -1
  129. package/dist/client/assets/{empty-state-CDvZ4pSZ.js → empty-state-BrxgsLHG.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-VVSQT7HS.js → extract-connection-data-DZSiJSCE.js} +1 -1
  131. package/dist/client/assets/{feature-gate-BYR6DKao.js → feature-gate-BweFNKr3.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-Pv-riKE7.js → feature-paywall-DCy88YOr.js} +1 -1
  133. package/dist/client/assets/{file-explorer-BpCZxL2W.js → file-explorer-E1QpuooZ.js} +1 -1
  134. package/dist/client/assets/{file-preview-C_Ah7YRc.js → file-preview-BFYm2Ebl.js} +1 -1
  135. package/dist/client/assets/{file-share-button-C8uAgffH.js → file-share-button-BNECzHpC.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-CQEUNMAM.js → file-type-icon-D0M-S9U1.js} +1 -1
  137. package/dist/client/assets/flat-project-Y-2R_KpZ.js +1 -0
  138. package/dist/client/assets/{folder-icon-B1vzKX5d.js → folder-icon-CSGYfuW8.js} +1 -1
  139. package/dist/client/assets/{form-R8MW_Gtw.js → form-BGxoVGvb.js} +1 -1
  140. package/dist/client/assets/{gateway-client-Dv4XJFUM.js → gateway-client-DqqeM3yS.js} +1 -1
  141. package/dist/client/assets/{general-CtUtUhHu.js → general--Lx4oqfC.js} +1 -1
  142. package/dist/client/assets/{home-DV_eNq6b.js → home-DyM_cAvs.js} +1 -1
  143. package/dist/client/assets/{icon-button-Blj1QpLb.js → icon-button-BAAffUhi.js} +1 -1
  144. package/dist/client/assets/{index-Bpt0MDIX.js → index-BVzkdynM.js} +1 -1
  145. package/dist/client/assets/{index-XL6-vv-o.js → index-B_Hj8ygS.js} +1 -1
  146. package/dist/client/assets/{index-CE-LgiHP.js → index-BxML1xBj.js} +1 -1
  147. package/dist/client/assets/{index--FVWSK_c.js → index-CJflvpaj.js} +1 -1
  148. package/dist/client/assets/{index-CM8cxFEW.js → index-CcuAAQfR.js} +1 -1
  149. package/dist/client/assets/{index-Ck6X-2qm.js → index-CpFVLV3H.js} +1 -1
  150. package/dist/client/assets/{index-CZDhy56e.js → index-CpuEtEqc.js} +3 -3
  151. package/dist/client/assets/{index-CwSrznSB.js → index-D-s3ZvIF.js} +1 -1
  152. package/dist/client/assets/{index-BE867Qee.js → index-D3VyLkC3.js} +3 -3
  153. package/dist/client/assets/{index-6OICj4ln.js → index-DXhMSpJ7.js} +1 -1
  154. package/dist/client/assets/{index-CaSLW3R8.js → index-Djpcf0g3.js} +1 -1
  155. package/dist/client/assets/{index-MmpnLDGH.js → index-Dn333xYc.js} +1 -1
  156. package/dist/client/assets/{index-BcuaxK20.js → index-Dyzblr5g.js} +1 -1
  157. package/dist/client/assets/{index-0M4CmMBW.js → index-GgUtI-aH.js} +1 -1
  158. package/dist/client/assets/{index-redirect-BdJPlstn.js → index-redirect-C1AnjHYu.js} +1 -1
  159. package/dist/client/assets/{index-Cvm8dv5Z.js → index-szJAEvQa.js} +1 -1
  160. package/dist/client/assets/{infiniteQueryObserver-B0NvduwT.js → infiniteQueryObserver-rGQ-BvZd.js} +1 -1
  161. package/dist/client/assets/{infra-billing-Ks9T1Sq9.js → infra-billing-a2nqEasz.js} +1 -1
  162. package/dist/client/assets/{input-DWWEe804.js → input-B-l5PYzO.js} +1 -1
  163. package/dist/client/assets/{input-CmcPYdOc.js → input-CQAdPV6U.js} +1 -1
  164. package/dist/client/assets/{input-BUuO9CZI.js → input-DJjbA9M9.js} +3 -3
  165. package/dist/client/assets/{integration-icon-aoXYYKdZ.js → integration-icon-Bo3BUxvM.js} +1 -1
  166. package/dist/client/assets/{label-CpTis3ZF.js → label-UBdu3ctU.js} +1 -1
  167. package/dist/client/assets/{layout-BmpAxoQw.js → layout-BtmKdLdk.js} +1 -1
  168. package/dist/client/assets/{legacy-agents-deep-dsUZ1M1k.js → legacy-agents-deep-YQnPtFe_.js} +1 -1
  169. package/dist/client/assets/{legacy-main-redirect-BSs4XNwX.js → legacy-main-redirect-CAZhbTVo.js} +1 -1
  170. package/dist/client/assets/library-CX4cu6RN.js +1 -0
  171. package/dist/client/assets/{library-tab-Bx_O7czI.js → library-tab-Cw6l7YjS.js} +1 -1
  172. package/dist/client/assets/{login-Bs8ZDJgZ.js → login-RaQgedvb.js} +1 -1
  173. package/dist/client/assets/{markdown-Bmw63uOU.js → markdown-DgNX2G8Y.js} +1 -1
  174. package/dist/client/assets/{mcp-app-renderer-fAGsYxUD.js → mcp-app-renderer-Gi8nuIVZ.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-DOvgIVsQ.js → mcp-oauth-ax5kWWJK.js} +1 -1
  176. package/dist/client/assets/{members-cQXKvPTX.js → members-C_--iBrh.js} +1 -1
  177. package/dist/client/assets/{memory-C9LPerZ9.js → memory-wojZsd5w.js} +1 -1
  178. package/dist/client/assets/{message-templates-s_ZoUf0b.js → message-templates-DbJIQtFs.js} +1 -1
  179. package/dist/client/assets/{mini-report-page-BpUKaSbF.js → mini-report-page-U0-aZ9Hl.js} +1 -1
  180. package/dist/client/assets/{mock-board-GWZVcMrh.js → mock-board-YpCRnBGe.js} +1 -1
  181. package/dist/client/assets/{monaco-editor-CQc-iURz.js → monaco-editor-Cs1rDRDm.js} +1 -1
  182. package/dist/client/assets/{monitoring-stats-row-CIORylAm.js → monitoring-stats-row-CcTNMb-i.js} +1 -1
  183. package/dist/client/assets/{multi-select-DgYPzhCT.js → multi-select-CWb2Oi6x.js} +1 -1
  184. package/dist/client/assets/{mustache-CSxb2mPF.js → mustache-CWsYDxkA.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-QzgehZk_.js → new-project-dialog-BWolKWvl.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-xEhmpXdh.js → oauth-callback-Ld01h9Tj.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-D3V_oXs6.js → oauth-callback-ai-provider-BGdom6cI.js} +1 -1
  188. package/dist/client/assets/{onboarding-CBuQm5u4.js → onboarding-D_NwiA9X.js} +1 -1
  189. package/dist/client/assets/{openai-conversation-BC7ip1oe.js → openai-conversation-DB4k1EYC.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-BRgs7fHb.js → optimistic-project-sidebar-views-DhsliVvJ.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-hWHGVIMb.js → org-file-open-context-kIKkchjb.js} +1 -1
  192. package/dist/client/assets/{organization-choice-BRq-jJ2y.js → organization-choice-DGTPCWDh.js} +1 -1
  193. package/dist/client/assets/{orgs-EVoggyaK.js → orgs-C5MsSx08.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-Bj5T5rN8.js → page-seo-form-CW2BoQ-K.js} +1 -1
  195. package/dist/client/assets/{pair-DKzXjxOb.js → pair-qre124N2.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-BtE6OACw.js → plan-ladder-B1XIg6KA.js} +1 -1
  197. package/dist/client/assets/{popover-CabOm1Wu.js → popover-DmsBpt35.js} +1 -1
  198. package/dist/client/assets/{post-calendar-w0VgMnGf.js → post-calendar-DOVsx0im.js} +1 -1
  199. package/dist/client/assets/{post-editor-B82uurtc.js → post-editor-D82mbe-R.js} +1 -1
  200. package/dist/client/assets/{preview-content-CN_ZoH0s.js → preview-content-CPFw8Bau.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-DXrNofiq.js → preview-dialog-UaHza9Kp.js} +1 -1
  202. package/dist/client/assets/{profile-ZDdV7Sjt.js → profile-CMD3mJV4.js} +1 -1
  203. package/dist/client/assets/{project-app-view-Cd6lCir_.js → project-app-view-3CpE9pa5.js} +1 -1
  204. package/dist/client/assets/{project-feed-DKk1GtFx.js → project-feed-C4PTy6zU.js} +1 -1
  205. package/dist/client/assets/{project-icon-CeJwJwGP.js → project-icon-BlCsNLWV.js} +1 -1
  206. package/dist/client/assets/project-reports-C7tLohpM.js +1 -0
  207. package/dist/client/assets/project-tasks-mAIHHtBX.js +1 -0
  208. package/dist/client/assets/{projects-B2Tngpmc.js → projects-DnKzaVrl.js} +1 -1
  209. package/dist/client/assets/{projects-empty-state-BZB9j08t.js → projects-empty-state-Sx3HMMRD.js} +1 -1
  210. package/dist/client/assets/{prompts-DNtPf-Uo.js → prompts-iLYOGVAY.js} +1 -1
  211. package/dist/client/assets/record-editor-oL03Wyei.js +1 -0
  212. package/dist/client/assets/{redirect-editor-79Kd-396.js → redirect-editor-D_mpcVqR.js} +1 -1
  213. package/dist/client/assets/{reports-k2lgDaV5.js → reports-CnA1uxk8.js} +1 -1
  214. package/dist/client/assets/reports-DPqSriQT.js +1 -0
  215. package/dist/client/assets/{reports-onboarding-azHAAu-G.js → reports-onboarding-Wd1uDWK4.js} +1 -1
  216. package/dist/client/assets/{reports-tab-CdMrxIwA.js → reports-tab-586SqbUE.js} +2 -2
  217. package/dist/client/assets/{repositories-hjUQ2loa.js → repositories-DjuvrwKG.js} +1 -1
  218. package/dist/client/assets/{repository-binding-kLfd1JPC.js → repository-binding-qP9N-2MJ.js} +1 -1
  219. package/dist/client/assets/{repository-import-picker-C4bVjDlN.js → repository-import-picker-BxSMVAOp.js} +1 -1
  220. package/dist/client/assets/{repository-picker-CSvuMd3o.js → repository-picker-DXcVdbPo.js} +1 -1
  221. package/dist/client/assets/{require-capability-tQig_059.js → require-capability-Btgp_M9F.js} +1 -1
  222. package/dist/client/assets/{required-auth-layout-CVAQQhe-.js → required-auth-layout-BXGj5Xuz.js} +1 -1
  223. package/dist/client/assets/{reset-password-D34LCqZt.js → reset-password-DNvbhWv1.js} +1 -1
  224. package/dist/client/assets/{resizable-DncVAUZ5.js → resizable-p0Iz3mjy.js} +1 -1
  225. package/dist/client/assets/{resolve-tab-icon-1rWgS1Jh.js → resolve-tab-icon-BRRLdzHa.js} +1 -1
  226. package/dist/client/assets/{review-settings-D_4cx7Vi.js → review-settings-DL4Naz6f.js} +1 -1
  227. package/dist/client/assets/{rich-text-link-control-BWM1Qfc8.js → rich-text-link-control-BAQED-eE.js} +1 -1
  228. package/dist/client/assets/{roles-3KA0vrRL.js → roles-BKGa4A-8.js} +1 -1
  229. package/dist/client/assets/route-DRz2-z88.js +1 -0
  230. package/dist/client/assets/{route-Dnh3EpsD.js → route-DzBhuQmI.js} +1 -1
  231. package/dist/client/assets/route-uDEu1bUn.js +1 -0
  232. package/dist/client/assets/{runnable-block-editor-DjjqZBfa.js → runnable-block-editor-PtJtt2DC.js} +1 -1
  233. package/dist/client/assets/{sandbox-lifecycle-context-BlOR06Zw.js → sandbox-lifecycle-context-BrfabpuG.js} +1 -1
  234. package/dist/client/assets/{schema-CaBw1j44.js → schema-BWuVZGwp.js} +1 -1
  235. package/dist/client/assets/{scroll-area-BlYZotDi.js → scroll-area-m_BjZQNd.js} +1 -1
  236. package/dist/client/assets/{search-input-B5un_Cd7.js → search-input-B9M1xiUR.js} +1 -1
  237. package/dist/client/assets/{search-toggle-DgedUVLj.js → search-toggle-s-q01VSg.js} +1 -1
  238. package/dist/client/assets/{secret-picker-CtZnmzu1.js → secret-picker-BTuH8aWz.js} +1 -1
  239. package/dist/client/assets/{secrets-CSt6RJDc.js → secrets-1V4jZN7g.js} +1 -1
  240. package/dist/client/assets/{sections-editor-BW7HMRFS.js → sections-editor-DX4ixTgg.js} +1 -1
  241. package/dist/client/assets/{select-CYYv9Vtn.js → select-DC4TM20D.js} +1 -1
  242. package/dist/client/assets/{select-model-BMFiXFaW.js → select-model-BWaa2-GY.js} +1 -1
  243. package/dist/client/assets/{seo-editor-BqY8Ur2i.js → seo-editor-Bd3OOjX4.js} +1 -1
  244. package/dist/client/assets/{separator-Cl4FYhEq.js → separator-BEoe11dP.js} +1 -1
  245. package/dist/client/assets/{settings-tab-CLqtPJZG.js → settings-tab-73EvDId-.js} +1 -1
  246. package/dist/client/assets/{sheet-CmXNGCBA.js → sheet-gL2l7oL0.js} +1 -1
  247. package/dist/client/assets/{shell-layout-D2P6ouzP.js → shell-layout-CBc-iFqB.js} +1 -1
  248. package/dist/client/assets/{skills-C1v0xaAk.js → skills-CELE5LtE.js} +1 -1
  249. package/dist/client/assets/{sso-BthSYQ1g.js → sso-CxZR0IHJ.js} +1 -1
  250. package/dist/client/assets/{suggestion-DRMbopje.js → suggestion-Ules5agL.js} +1 -1
  251. package/dist/client/assets/{switch-B6KzjFhw.js → switch-CL5hy8vw.js} +1 -1
  252. package/dist/client/assets/{synced-repos-CnPrjVSO.js → synced-repos-BHKre5im.js} +1 -1
  253. package/dist/client/assets/{tab-icon-glyph-B6O2AOCF.js → tab-icon-glyph-DR0rQ-bV.js} +1 -1
  254. package/dist/client/assets/{table-BHDtYz9k.js → table-WwEBhzp_.js} +1 -1
  255. package/dist/client/assets/{tabs-CfLMYw89.js → tabs-WFH6vPjH.js} +1 -1
  256. package/dist/client/assets/{task-board-C7HcCxeg.js → task-board-CVGH6XO_.js} +1 -1
  257. package/dist/client/assets/{task-route-bn2URA0q.js → task-route-D36p4AYB.js} +1 -1
  258. package/dist/client/assets/{task-status-C4kf54Sm.js → task-status-CLw5rySP.js} +1 -1
  259. package/dist/client/assets/{taskboard-analytics-B2xD2xvd.js → taskboard-analytics-DjMTJmAz.js} +1 -1
  260. package/dist/client/assets/tasks-C-PeRfKF.js +1 -0
  261. package/dist/client/assets/{tasks-OZpkcyom.js → tasks-CNLTzE3N.js} +1 -1
  262. package/dist/client/assets/{textarea-D_VH3s7x.js → textarea-CoQK2oyP.js} +1 -1
  263. package/dist/client/assets/{thread-analytics-U5yFfcuN.js → thread-analytics-Dyt69XfV.js} +1 -1
  264. package/dist/client/assets/{thread-button-BHZP_s0g.js → thread-button-CXr1OWYY.js} +1 -1
  265. package/dist/client/assets/{thread-intent-tToQ_3Cn.js → thread-intent-CXrPEeI-.js} +1 -1
  266. package/dist/client/assets/{thread-route-CUOWsTdF.js → thread-route-CPId0Ds_.js} +1 -1
  267. package/dist/client/assets/{thread-route-Bzzi_5mF.js → thread-route-DKA9bRvS.js} +1 -1
  268. package/dist/client/assets/{thread-sheet-body-B0QtugED.js → thread-sheet-body-DbO-EyYS.js} +1 -1
  269. package/dist/client/assets/{toggle-group-BrWdayuI.js → toggle-group-CHfaqw3y.js} +1 -1
  270. package/dist/client/assets/{toolbar-icon-button-Dn4ZIc9O.js → toolbar-icon-button-CJrzg1xS.js} +1 -1
  271. package/dist/client/assets/{tooltip-2Ew10_I0.js → tooltip-BUwCxmad.js} +1 -1
  272. package/dist/client/assets/{track-DH05wicf.js → track-QsSY_R6p.js} +1 -1
  273. package/dist/client/assets/{types-DSEqfHk2.js → types-BM02pFks.js} +1 -1
  274. package/dist/client/assets/{usage-stats-y5sLQYFP.js → usage-stats-BZmwl_hY.js} +1 -1
  275. package/dist/client/assets/{use-ai-providers-jnOy5tNY.js → use-ai-providers-OUZLuzjk.js} +1 -1
  276. package/dist/client/assets/{use-automations-CZEM3KgU.js → use-automations-kRvu1WBi.js} +1 -1
  277. package/dist/client/assets/{use-autosave-Bk6osCzP.js → use-autosave-BknRtqMo.js} +1 -1
  278. package/dist/client/assets/{use-chat-layout-state-BbJD-IRs.js → use-chat-layout-state-PWimkJCw.js} +1 -1
  279. package/dist/client/assets/{use-clock-tick-BY0qK7ow.js → use-clock-tick-DK1jMfPk.js} +1 -1
  280. package/dist/client/assets/{use-connect-companion-D6e9vX_L.js → use-connect-companion-BE7rc0a7.js} +1 -1
  281. package/dist/client/assets/{use-connection-x3pfvWpW.js → use-connection-CDTsUGCD.js} +1 -1
  282. package/dist/client/assets/{use-copy-CJPO8CYZ.js → use-copy-4XQ35auE.js} +1 -1
  283. package/dist/client/assets/{use-create-virtual-mcp-BDos_868.js → use-create-virtual-mcp-Cr7lRENh.js} +1 -1
  284. package/dist/client/assets/{use-date-fns-locale-vNVrC6Qj.js → use-date-fns-locale-DSD5AxHp.js} +1 -1
  285. package/dist/client/assets/{use-debounced-autosave-zy5tN1OH.js → use-debounced-autosave-BmsH_WeG.js} +1 -1
  286. package/dist/client/assets/{use-debounced-value-Cjq6wHlM.js → use-debounced-value-Ddzynl8d.js} +1 -1
  287. package/dist/client/assets/{use-deco-credits-BBnccG_w.js → use-deco-credits-BWRF6eDW.js} +1 -1
  288. package/dist/client/assets/{use-decopilot-events-CCMkDtUe.js → use-decopilot-events-Coi59geF.js} +1 -1
  289. package/dist/client/assets/{use-delete-connection-C6BGGvaV.js → use-delete-connection-BAe608Tj.js} +1 -1
  290. package/dist/client/assets/{use-deployment-admin-CrwlatSG.js → use-deployment-admin-C9A5ryiv.js} +1 -1
  291. package/dist/client/assets/{use-fast-preview-draft-url-Z9tq3pqw.js → use-fast-preview-draft-url-D95FFIvg.js} +1 -1
  292. package/dist/client/assets/{use-file-configs-D6BnOxCa.js → use-file-configs-FESoyyAp.js} +1 -1
  293. package/dist/client/assets/{use-infinite-scroll-Cj7K2rNB.js → use-infinite-scroll-BOW8hicV.js} +1 -1
  294. package/dist/client/assets/{use-join-requests-8kDr2sOv.js → use-join-requests-DtLE0NgC.js} +1 -1
  295. package/dist/client/assets/{use-main-panel-tabs-CAIlwMdR.js → use-main-panel-tabs-Bc5UEnVE.js} +1 -1
  296. package/dist/client/assets/{use-mcp-auth-status-DaNrG9Qa.js → use-mcp-auth-status-DrjGrcBP.js} +1 -1
  297. package/dist/client/assets/{use-mcp-client-BGKUmMJU.js → use-mcp-client-DjhhnAr3.js} +1 -1
  298. package/dist/client/assets/{use-mcp-prompts-Brgv7p5b.js → use-mcp-prompts-CPGSJM8z.js} +1 -1
  299. package/dist/client/assets/{use-mcp-tools-D65vA86V.js → use-mcp-tools-CPwk0yw5.js} +1 -1
  300. package/dist/client/assets/{use-members-BiMQcnAS.js → use-members-CgpU7zdW.js} +1 -1
  301. package/dist/client/assets/{use-mobile-avjkwF6P.js → use-mobile-Dd6KUtd1.js} +1 -1
  302. package/dist/client/assets/{use-navigate-to-agent-DT6SP7we.js → use-navigate-to-agent-Bbk9KV3t.js} +1 -1
  303. package/dist/client/assets/use-new-blocks-editor-DdfQbotf.js +1 -0
  304. package/dist/client/assets/{use-open-billing-url-D3-Evs3P.js → use-open-billing-url-C5p05V2D.js} +1 -1
  305. package/dist/client/assets/{use-org-auth-client-C0kfn4Hh.js → use-org-auth-client-CGnd_KU_.js} +1 -1
  306. package/dist/client/assets/{use-org-fs-Bb3mK6Hx.js → use-org-fs-Cif2PgGI.js} +1 -1
  307. package/dist/client/assets/{use-org-repo-syncs-BaPlgvkL.js → use-org-repo-syncs-Cf0jwZet.js} +1 -1
  308. package/dist/client/assets/{use-org-sso-D0ubLH8o.js → use-org-sso-DnQOloxF.js} +1 -1
  309. package/dist/client/assets/{use-organization-roles-BjapmWnU.js → use-organization-roles-BarJOEKw.js} +1 -1
  310. package/dist/client/assets/{use-organization-settings-b1uEqEl7.js → use-organization-settings-DSuZT_-Z.js} +1 -1
  311. package/dist/client/assets/{use-panel-navigate-DM9oBo_y.js → use-panel-navigate-pf_bvwna.js} +1 -1
  312. package/dist/client/assets/{use-project-scope-CdG18ZwV.js → use-project-scope-B9gl4G0G.js} +1 -1
  313. package/dist/client/assets/{use-releases-BY6Ey7qp.js → use-releases-Cqzas87I.js} +1 -1
  314. package/dist/client/assets/{use-reports-diagnostic-Cea-ZR7h.js → use-reports-diagnostic-C9WXsFaU.js} +1 -1
  315. package/dist/client/assets/{use-secrets-BuVtrCbN.js → use-secrets-DWoy_Ekl.js} +1 -1
  316. package/dist/client/assets/{use-section-preview-base-BL5_n6HI.js → use-section-preview-base-B4B91XeI.js} +1 -1
  317. package/dist/client/assets/{use-session-runtime-BqNS_uzd.js → use-session-runtime-BtoYTkvM.js} +1 -1
  318. package/dist/client/assets/{use-tags-OZ8EdmaG.js → use-tags-oDh30HSX.js} +1 -1
  319. package/dist/client/assets/{use-task-board-analytics-DD0mNFO7.js → use-task-board-analytics-B-_ejdir.js} +1 -1
  320. package/dist/client/assets/{use-task-board-events-DEqI3Q6Z.js → use-task-board-events-D5YUKNR3.js} +1 -1
  321. package/dist/client/assets/{use-task-metadata-BZ9jc8IS.js → use-task-metadata-EBJAZAt5.js} +1 -1
  322. package/dist/client/assets/{use-thread-analytics-C_Ib4AtX.js → use-thread-analytics-23H9Sh0m.js} +1 -1
  323. package/dist/client/assets/{use-thread-outputs-BEYgt-Dh.js → use-thread-outputs-CzHRXoWD.js} +1 -1
  324. package/dist/client/assets/useInfiniteQuery-BzCTPJtn.js +1 -0
  325. package/dist/client/assets/{useQueries-BBJ9drAO.js → useQueries-OOmL0OlS.js} +1 -1
  326. package/dist/client/assets/useSuspenseInfiniteQuery-Cx1jk_4I.js +1 -0
  327. package/dist/client/assets/{users-C0Q7tPX9.js → users-CSGmi7SW.js} +1 -1
  328. package/dist/client/assets/{utils-BawmeI6v.js → utils-R-urxMSv.js} +1 -1
  329. package/dist/client/assets/{variant-calendar-B3kfwaT1.js → variant-calendar-V9WH2c0X.js} +1 -1
  330. package/dist/client/assets/{variant-matcher-override-D5KXYhON.js → variant-matcher-override-Be69fnd9.js} +1 -1
  331. package/dist/client/assets/{view-mode-toggle-DSgKza5v.js → view-mode-toggle-hxQ2HfnS.js} +1 -1
  332. package/dist/client/assets/{virtual-mcp-Biy9WvuX.js → virtual-mcp-B4NgbGmF.js} +1 -1
  333. package/dist/client/index.html +1 -1
  334. package/dist/server/cli.js +1 -1
  335. package/dist/server/server.js +1 -1
  336. package/package.json +1 -1
  337. package/dist/client/assets/agent-app-qbb5JA2r.js +0 -1
  338. package/dist/client/assets/agent-deck-CqgjLBSE.js +0 -1
  339. package/dist/client/assets/agent-library-CSTO-y-t.js +0 -1
  340. package/dist/client/assets/agent-library-file-Df58itl6.js +0 -1
  341. package/dist/client/assets/agent-settings-Cgq30tNP.js +0 -1
  342. package/dist/client/assets/agent-site-editor-code-CFdjiowh.js +0 -2
  343. package/dist/client/assets/agent-view-DFwQL9ld.js +0 -1
  344. package/dist/client/assets/api-keys-vTb1XbGG.js +0 -1
  345. package/dist/client/assets/app-editor-CuHZFDnk.js +0 -1
  346. package/dist/client/assets/flat-project-BZORVBKb.js +0 -1
  347. package/dist/client/assets/library-CdGzPeek.js +0 -1
  348. package/dist/client/assets/project-reports-R5pejKr0.js +0 -1
  349. package/dist/client/assets/project-tasks-xxw_xxBg.js +0 -1
  350. package/dist/client/assets/record-editor-DdM0Ufnd.js +0 -1
  351. package/dist/client/assets/reports-B2qbOUEG.js +0 -1
  352. package/dist/client/assets/route-9df-A80E.js +0 -1
  353. package/dist/client/assets/route-B_mbIWRZ.js +0 -1
  354. package/dist/client/assets/tasks-Lw-J8js3.js +0 -1
  355. package/dist/client/assets/use-new-blocks-editor-BlVQ71Up.js +0 -1
  356. package/dist/client/assets/useInfiniteQuery-B0OQsDiL.js +0 -1
  357. package/dist/client/assets/useSuspenseInfiniteQuery-BjRsbalC.js +0 -1
@@ -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-CwSrznSB.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-BE867Qee.js";import{g as bt,d as xt}from"./gateway-client-Dv4XJFUM.js";import{A as yt}from"./agent-icon-C8zn459s.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-D-s3ZvIF.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-D3VyLkC3.js";import{g as bt,d as xt}from"./gateway-client-DqqeM3yS.js";import{A as yt}from"./agent-icon-DebFssce.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-BE867Qee.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-D3VyLkC3.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-BE867Qee.js";import{s as xe}from"./Plus-DUwLVLW_.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-zI-mFpSQ.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-DC6TmMkf.js";import{I as Ie}from"./input-DWWEe804.js";import{u as $e,a as Fe,R as Te}from"./repository-picker-CSvuMd3o.js";import{u as He,b as Be,c as Ge}from"./use-org-repo-syncs-BaPlgvkL.js";import{t as qe}from"./format-time-CjIPQhCN.js";import{R as Le}from"./require-capability-tQig_059.js";import"./X-BO04Dn0R.js";import"./ArrowLeft-Dl_7c8AB.js";import"./LinkExternal01-CLN31q0P.js";import"./tooltip-2Ew10_I0.js";import"./index-6OICj4ln.js";import"./label-CpTis3ZF.js";import"./useInfiniteQuery-B0OQsDiL.js";import"./infiniteQueryObserver-B0NvduwT.js";import"./collection-search-Cp0gVUrY.js";import"./SearchMd-BiNHdvMf.js";import"./ShoppingBag01-BlgcPhxp.js";import"./avatar-BxSXBdTP.js";import"./User01-DmaMR1Ca.js";import"./use-debounced-value-Cjq6wHlM.js";import"./use-organization-settings-b1uEqEl7.js";import"./schema-CaBw1j44.js";import"./task-board-C7HcCxeg.js";import"./differenceInSeconds-C3x8sHUj.js";import"./access-gate-g4Ol-Lnp.js";import"./capability-load-error-AIgwu68M.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-D3VyLkC3.js";import{s as xe}from"./Plus-B7fu2HeJ.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-BaW-BGF4.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-C_zHR8DK.js";import{I as Ie}from"./input-B-l5PYzO.js";import{u as $e,a as Fe,R as Te}from"./repository-picker-DXcVdbPo.js";import{u as He,b as Be,c as Ge}from"./use-org-repo-syncs-Cf0jwZet.js";import{t as qe}from"./format-time-CjIPQhCN.js";import{R as Le}from"./require-capability-Btgp_M9F.js";import"./X-B1izQ1KV.js";import"./ArrowLeft-Bgwvgp7N.js";import"./LinkExternal01-DMr7xmMD.js";import"./tooltip-BUwCxmad.js";import"./index-DXhMSpJ7.js";import"./label-UBdu3ctU.js";import"./useInfiniteQuery-BzCTPJtn.js";import"./infiniteQueryObserver-rGQ-BvZd.js";import"./collection-search-DZ1wZYuR.js";import"./SearchMd-DpRsJH0P.js";import"./ShoppingBag01-Bn_Ml-RN.js";import"./avatar-C70_Ki0z.js";import"./User01-DlDKGoyi.js";import"./use-debounced-value-Ddzynl8d.js";import"./use-organization-settings-DSuZT_-Z.js";import"./schema-BWuVZGwp.js";import"./task-board-CVGH6XO_.js";import"./differenceInSeconds-C3x8sHUj.js";import"./access-gate-DvGFBZwA.js";import"./capability-load-error-CI6r2eSt.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-BE867Qee.js";import{a as p}from"./ZoomOut-hhnEYknp.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-D3VyLkC3.js";import{a as p}from"./ZoomOut-Cy6sSJWj.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-BE867Qee.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-D3VyLkC3.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-BE867Qee.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-D3VyLkC3.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 +1 @@
1
- import{o as i}from"./schema-CaBw1j44.js";const l="super-agent",o=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=o[0];function A(e){return o[e%o.length]??c}function p(e){return e.createdBy==="system"}const w="chore",_=["reviewer"],d={reviewer:"Reviewer"},E=["QA Agent","Code Reviewer"];function R(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:i(e,"reviewer_enabled")}const D=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],S={queue:"todo"},L=["approved","merged","post_deploy_validation"];function u(e,t){return e?[d[t],...E].some(r=>e.startsWith(`${r}:`)):!1}function g(e){return e.reviewerEnabled||!e.hasPullRequest?!1:!e.threadTitles.some(t=>_.some(r=>u(t,r)))}function f(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=f(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const s=a.data??{};if(s.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&s.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function m(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const b="task-board.item.updated",h="task-board.rules.updated",N="task-board.item.deleted",O="task-board.item.prs.updated",C=4e3;export{D as C,w as D,S as L,_ as R,l as S,b as T,N as a,O as b,h as c,c as d,L as e,m as f,u as g,g as h,p as i,C as j,A as n,R as r};
1
+ import{o as i}from"./schema-BWuVZGwp.js";const l="super-agent",o=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=o[0];function A(e){return o[e%o.length]??c}function p(e){return e.createdBy==="system"}const w="chore",_=["reviewer"],d={reviewer:"Reviewer"},E=["QA Agent","Code Reviewer"];function R(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:i(e,"reviewer_enabled")}const D=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],S={queue:"todo"},L=["approved","merged","post_deploy_validation"];function u(e,t){return e?[d[t],...E].some(r=>e.startsWith(`${r}:`)):!1}function g(e){return e.reviewerEnabled||!e.hasPullRequest?!1:!e.threadTitles.some(t=>_.some(r=>u(t,r)))}function f(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=f(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const s=a.data??{};if(s.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&s.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function m(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const b="task-board.item.updated",h="task-board.rules.updated",N="task-board.item.deleted",O="task-board.item.prs.updated",C=4e3;export{D as C,w as D,S as L,_ as R,l as S,b as T,N as a,O as b,h as c,c as d,L as e,m as f,u as g,g as h,p as i,C as j,A as n,R as r};
@@ -1 +1 @@
1
- import{p as D,d as E}from"./repository-binding-kLfd1JPC.js";import{S as R}from"./task-board-C7HcCxeg.js";const S=4,b="TASK";function v(e){return e.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,S)||b}function w(e,t){return t==null?null:`${v(e)}-${String(t).padStart(2,"0")}`}const M=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function y(e){const t=M.exec(e.trim())?.[1];return t===void 0?null:Number(t)}const j="__no_repo__";function i(e){return(e??"").trim().toLowerCase()}function P(e,t){const r=(e.created_at??"").localeCompare(t.created_at??"");return r!==0?r:e.id.localeCompare(t.id)}function C(e){return e.projects.length===1?e.projects[0]?.title??e.repo??e.id:e.repo??e.id}function G(e,t=[]){const r=new Map,n=new Map,s=[],a=o=>{const u=i(o),c=r.get(u);if(c)return c;const l={id:u,kind:"repo",repo:o.trim(),title:o.trim(),projects:[]};return r.set(u,l),l};for(const o of e){const u=D(o);if(u){const l=a(u);l.projects.push(o),n.set(o.id,l);continue}const c={id:o.id,kind:"project",repo:null,title:o.title,projects:[o]};s.push(c),n.set(o.id,c)}for(const o of t){const u=(o??"").trim();u&&!n.has(u)&&a(u)}for(const o of r.values())o.projects.sort(P),o.title=C(o);const p=[...r.values()].filter(o=>o.projects.length>0),T=[...r.values()].filter(o=>o.projects.length===0),f=(o,u)=>o.title.localeCompare(u.title),g=[...[...p,...s].sort(f),...T.sort(f)];return{entries:g,byId:new Map(g.map(o=>[o.id,o])),byRepo:r,byProject:n}}function d(e,t){for(const s of e.threads??[]){const a=s.virtualMcpId?t.byProject.get(s.virtualMcpId):void 0;if(a)return a}const r=t.byProject.get((e.repo??"").trim());if(r)return r;const n=i(e.repo);return(n?t.byRepo.get(n):void 0)??null}function m(e,t){const r=d(e,t);if(!r)return[];if(r.projects.length<=1)return r.projects;for(const s of e.threads??[]){const a=s.virtualMcpId?r.projects.find(p=>p.id===s.virtualMcpId):void 0;if(a)return[a]}const n=r.projects.find(s=>s.id===e.repo?.trim());return n?[n]:r.projects}function Y(e,t,r){return e.filter(n=>m(n,t).some(s=>s.id===r))}function z(e,t){const r=m(e,t);return r.length===1?r[0]??null:null}function h(e,t){return t.byId.get(e)??t.byRepo.get(i(e))??t.byProject.get(e)}function _(e,t,r){if(t===null)return!0;if(t===j)return d(e,r)===null;const n=h(t,r);return n?n.repo&&i(e.repo)===i(n.repo)?!0:d(e,r)===n:t.includes("/")?i(e.repo)===i(t):!0}function X(e,t){return e===null?!1:e===j?!0:!!h(e,t)||e.includes("/")}function q(e,t,r){return t===null?null:_(e,t,r)?t:null}function H(e){return e.entries.filter(t=>t.repo!==null&&(t.projects.length===0||t.projects.some(r=>E(r).status!=="detached")))}const L="__unassigned__",J={assignee:null,priority:null,due:null,tags:[],project:null,search:""},A=864e5;function I(e,t){const r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate()}function k(e,t){const r=e.trim();return r===""?!1:t!=null&&y(r)===t}function N(e,t){return e.assigneeId===t?!0:e.assigneeId===R&&e.assignedBy===t}function W(e,t,r){const n=t.search.trim().toLowerCase();if(n!==""&&!`${e.title} ${e.description??""}`.toLowerCase().includes(n)&&!k(n,e.keySeq))return!1;if(t.assignee!==null){if(t.assignee===L){if(e.assigneeId!==null)return!1}else if(!N(e,t.assignee))return!1}if(t.priority!==null&&e.priority!==t.priority)return!1;if(t.due!==null)if(t.due==="none"){if(e.dueDate)return!1}else{if(!e.dueDate)return!1;const s=new Date(e.dueDate).getTime(),a=Date.now();if(t.due==="overdue"&&s>=a||t.due==="today"&&!I(s,a)||t.due==="week"&&(s<a||s>a+7*A))return!1}if(t.tags.length>0){const s=e.tags.map(a=>a.id);if(!t.tags.some(a=>s.includes(a)))return!1}return!!_(e,t.project,r)}const F={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"},Z=Object.keys(F);function Q(e){return F[e]}function $(e,t){return w(e,t.keySeq)??t.id}function V(e,t,r){const n=encodeURIComponent(e),s=encodeURIComponent($(e,t));return r?`/${n}/projects/${encodeURIComponent(r)}/tasks/${s}`:`/${n}/tasks/${s}`}function x(e,t){const r=t?.trim();if(r)return e.find(n=>k(r,n.keySeq))??e.find(n=>n.id===r)}const K=/^board_[\w-]+$/,B=64;function ee(e){const t=e.trim();return t.length>B?null:y(t)!==null||K.test(t)?t:null}export{Z as D,J as E,j as N,L as U,$ as a,G as b,z as c,Y as d,d as e,h as f,V as g,X as h,Q as i,W as j,x as k,q as l,ee as m,m as p,H as s,w as t};
1
+ import{p as D,d as E}from"./repository-binding-qP9N-2MJ.js";import{S as R}from"./task-board-CVGH6XO_.js";const S=4,b="TASK";function v(e){return e.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,S)||b}function w(e,t){return t==null?null:`${v(e)}-${String(t).padStart(2,"0")}`}const M=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function y(e){const t=M.exec(e.trim())?.[1];return t===void 0?null:Number(t)}const j="__no_repo__";function i(e){return(e??"").trim().toLowerCase()}function P(e,t){const r=(e.created_at??"").localeCompare(t.created_at??"");return r!==0?r:e.id.localeCompare(t.id)}function C(e){return e.projects.length===1?e.projects[0]?.title??e.repo??e.id:e.repo??e.id}function G(e,t=[]){const r=new Map,n=new Map,s=[],a=o=>{const u=i(o),c=r.get(u);if(c)return c;const l={id:u,kind:"repo",repo:o.trim(),title:o.trim(),projects:[]};return r.set(u,l),l};for(const o of e){const u=D(o);if(u){const l=a(u);l.projects.push(o),n.set(o.id,l);continue}const c={id:o.id,kind:"project",repo:null,title:o.title,projects:[o]};s.push(c),n.set(o.id,c)}for(const o of t){const u=(o??"").trim();u&&!n.has(u)&&a(u)}for(const o of r.values())o.projects.sort(P),o.title=C(o);const p=[...r.values()].filter(o=>o.projects.length>0),T=[...r.values()].filter(o=>o.projects.length===0),f=(o,u)=>o.title.localeCompare(u.title),g=[...[...p,...s].sort(f),...T.sort(f)];return{entries:g,byId:new Map(g.map(o=>[o.id,o])),byRepo:r,byProject:n}}function d(e,t){for(const s of e.threads??[]){const a=s.virtualMcpId?t.byProject.get(s.virtualMcpId):void 0;if(a)return a}const r=t.byProject.get((e.repo??"").trim());if(r)return r;const n=i(e.repo);return(n?t.byRepo.get(n):void 0)??null}function m(e,t){const r=d(e,t);if(!r)return[];if(r.projects.length<=1)return r.projects;for(const s of e.threads??[]){const a=s.virtualMcpId?r.projects.find(p=>p.id===s.virtualMcpId):void 0;if(a)return[a]}const n=r.projects.find(s=>s.id===e.repo?.trim());return n?[n]:r.projects}function Y(e,t,r){return e.filter(n=>m(n,t).some(s=>s.id===r))}function z(e,t){const r=m(e,t);return r.length===1?r[0]??null:null}function h(e,t){return t.byId.get(e)??t.byRepo.get(i(e))??t.byProject.get(e)}function _(e,t,r){if(t===null)return!0;if(t===j)return d(e,r)===null;const n=h(t,r);return n?n.repo&&i(e.repo)===i(n.repo)?!0:d(e,r)===n:t.includes("/")?i(e.repo)===i(t):!0}function X(e,t){return e===null?!1:e===j?!0:!!h(e,t)||e.includes("/")}function q(e,t,r){return t===null?null:_(e,t,r)?t:null}function H(e){return e.entries.filter(t=>t.repo!==null&&(t.projects.length===0||t.projects.some(r=>E(r).status!=="detached")))}const L="__unassigned__",J={assignee:null,priority:null,due:null,tags:[],project:null,search:""},A=864e5;function I(e,t){const r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate()}function k(e,t){const r=e.trim();return r===""?!1:t!=null&&y(r)===t}function N(e,t){return e.assigneeId===t?!0:e.assigneeId===R&&e.assignedBy===t}function W(e,t,r){const n=t.search.trim().toLowerCase();if(n!==""&&!`${e.title} ${e.description??""}`.toLowerCase().includes(n)&&!k(n,e.keySeq))return!1;if(t.assignee!==null){if(t.assignee===L){if(e.assigneeId!==null)return!1}else if(!N(e,t.assignee))return!1}if(t.priority!==null&&e.priority!==t.priority)return!1;if(t.due!==null)if(t.due==="none"){if(e.dueDate)return!1}else{if(!e.dueDate)return!1;const s=new Date(e.dueDate).getTime(),a=Date.now();if(t.due==="overdue"&&s>=a||t.due==="today"&&!I(s,a)||t.due==="week"&&(s<a||s>a+7*A))return!1}if(t.tags.length>0){const s=e.tags.map(a=>a.id);if(!t.tags.some(a=>s.includes(a)))return!1}return!!_(e,t.project,r)}const F={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"},Z=Object.keys(F);function Q(e){return F[e]}function $(e,t){return w(e,t.keySeq)??t.id}function V(e,t,r){const n=encodeURIComponent(e),s=encodeURIComponent($(e,t));return r?`/${n}/projects/${encodeURIComponent(r)}/tasks/${s}`:`/${n}/tasks/${s}`}function x(e,t){const r=t?.trim();if(r)return e.find(n=>k(r,n.keySeq))??e.find(n=>n.id===r)}const K=/^board_[\w-]+$/,B=64;function ee(e){const t=e.trim();return t.length>B?null:y(t)!==null||K.test(t)?t:null}export{Z as D,J as E,j as N,L as U,$ as a,G as b,z as c,Y as d,d as e,h as f,V as g,X as h,Q as i,W as j,x as k,q as l,ee as m,m as p,H as s,w as t};
@@ -1 +1 @@
1
- import{i as n}from"./AlertCircle-CQA_p2Cp.js";import{i as r}from"./CheckCircle-BCxvtn62.js";import{d2 as i}from"./index-BE867Qee.js";import{a$ as s,b0 as l,x as m}from"./agent-icon-C8zn459s.js";const a={requires_action:{labelKey:"common.taskStatus.requiresAction",icon:n,iconClassName:"text-warning",labelColor:"text-warning"},failed:{labelKey:"common.taskStatus.failed",icon:m,iconClassName:"text-destructive",labelColor:"text-destructive"},expired:{labelKey:"common.taskStatus.expired",icon:l,iconClassName:"text-warning",labelColor:"text-warning"},in_progress:{labelKey:"common.taskStatus.inProgress",icon:s,iconClassName:"text-primary",labelColor:"text-primary"},completed:{labelKey:"common.taskStatus.completed",icon:r,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},o={labelKey:"common.taskStatus.unknown",icon:i,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function c(e){return e in a}function C(e){if(e===null)return o;const t=e??"completed";return c(t)?a[t]:o}export{a as S,C as g};
1
+ import{i as n}from"./AlertCircle-O5yKT_wD.js";import{i as r}from"./CheckCircle-B8nBZ9lR.js";import{d2 as i}from"./index-D3VyLkC3.js";import{a$ as s,b0 as l,x as m}from"./agent-icon-DebFssce.js";const a={requires_action:{labelKey:"common.taskStatus.requiresAction",icon:n,iconClassName:"text-warning",labelColor:"text-warning"},failed:{labelKey:"common.taskStatus.failed",icon:m,iconClassName:"text-destructive",labelColor:"text-destructive"},expired:{labelKey:"common.taskStatus.expired",icon:l,iconClassName:"text-warning",labelColor:"text-warning"},in_progress:{labelKey:"common.taskStatus.inProgress",icon:s,iconClassName:"text-primary",labelColor:"text-primary"},completed:{labelKey:"common.taskStatus.completed",icon:r,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},o={labelKey:"common.taskStatus.unknown",icon:i,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function c(e){return e in a}function C(e){if(e===null)return o;const t=e??"completed";return c(t)?a[t]:o}export{a as S,C as g};
@@ -1 +1 @@
1
- import{c as M,b as q,f as J,r as P,j as r,B as W,L as X,h as Z}from"./index-BE867Qee.js";import{C as tt}from"./index-CM8cxFEW.js";import{S as et}from"./analytics-sections-rNV5HZ50.js";import{u as rt,A as G,a as st}from"./use-task-board-analytics-DD0mNFO7.js";import{C as at}from"./combobox-2qhSjEFr.js";import{c as it,b as ot,a as lt,d as mt,S as nt}from"./select-CYYv9Vtn.js";import{T as pt,a as ct,c as ft,b as dt}from"./tabs-CfLMYw89.js";import"./use-mobile-avjkwF6P.js";import"./thread-button-BHZP_s0g.js";import"./agent-icon-C8zn459s.js";import"./AlertCircle-CQA_p2Cp.js";import"./Tool01-BuLiX0jy.js";import"./ArrowUp-0DU20WU2.js";import"./ArrowLeft-Dl_7c8AB.js";import"./LinkBroken01-8QjnprbC.js";import"./ShoppingBag01-BlgcPhxp.js";import"./ZoomOut-hhnEYknp.js";import"./Building02-CsHqQGTj.js";import"./CheckCircle-BCxvtn62.js";import"./Check-Bo3qSXwJ.js";import"./ChevronUp-Ds84QUAn.js";import"./UserSquare-B0WZmX6s.js";import"./Copy01-QNdLW2v3.js";import"./CreditCard01-D1KkCG7o.js";import"./DotsVertical-Dyi1_2jC.js";import"./Image01-0Rs0fG3a.js";import"./Palette-CaoJ793n.js";import"./XClose-DwKTRWak.js";import"./Key01-DvlZjbjO.js";import"./Link01-3DcN1bgm.js";import"./LinkExternal01-CLN31q0P.js";import"./Monitor01-C0xXEFc5.js";import"./Sun-aSGS3XrK.js";import"./Plus-DUwLVLW_.js";import"./SearchMd-BiNHdvMf.js";import"./Trash01-DtMJF0U3.js";import"./Upload01-C2lcKrsy.js";import"./User01-DmaMR1Ca.js";import"./Users01-C8SJUk8C.js";import"./X-BO04Dn0R.js";import"./use-chat-layout-state-BbJD-IRs.js";import"./use-file-configs-D6BnOxCa.js";import"./use-organization-settings-b1uEqEl7.js";import"./schema-CaBw1j44.js";import"./task-board-C7HcCxeg.js";import"./site-slug-DebpOoQq.js";import"./thread-route-Bzzi_5mF.js";import"./use-panel-navigate-DM9oBo_y.js";import"./use-project-scope-CdG18ZwV.js";import"./repository-binding-kLfd1JPC.js";import"./use-mcp-client-BGKUmMJU.js";import"./auth-DQuDCDTH.js";import"./thread-intent-tToQ_3Cn.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./sheet-CmXNGCBA.js";import"./tooltip-2Ew10_I0.js";import"./index-6OICj4ln.js";import"./toolbar-icon-button-Dn4ZIc9O.js";import"./shell-layout-D2P6ouzP.js";import"./avatar-BxSXBdTP.js";import"./download-app-dialog-CEx38Fcv.js";import"./dialog-DC6TmMkf.js";import"./use-clock-tick-BY0qK7ow.js";import"./command-ZBxh5GnQ.js";import"./index-CaSLW3R8.js";import"./integration-icon-aoXYYKdZ.js";import"./project-icon-CeJwJwGP.js";import"./new-project-dialog-QzgehZk_.js";import"./input-DWWEe804.js";import"./label-CpTis3ZF.js";import"./repository-import-picker-C4bVjDlN.js";import"./use-navigate-to-agent-DT6SP7we.js";import"./repository-picker-CSvuMd3o.js";import"./useInfiniteQuery-B0OQsDiL.js";import"./infiniteQueryObserver-B0NvduwT.js";import"./collection-search-Cp0gVUrY.js";import"./use-debounced-value-Cjq6wHlM.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-CVAQQhe-.js";import"./autosend-B7xOxZCV.js";import"./use-org-sso-D0ubLH8o.js";import"./resizable-DncVAUZ5.js";import"./icon-button-Blj1QpLb.js";import"./chart-NHKhTpOL.js";import"./index--FVWSK_c.js";import"./CartesianChart-OVjYagl6.js";import"./table-BHDtYz9k.js";import"./Line-BZPiXXVf.js";import"./ErrorBarContext-Dckliguf.js";import"./Sector-DrcdpRCF.js";import"./XAxis-DjkUxR47.js";import"./popover-CabOm1Wu.js";const ut=[7,30,90],xt={TASK_BOARD_DELIVERY:"taskBoard.analytics.tabDelivery",TASK_BOARD_STUCK:"taskBoard.analytics.tabStuck",TASK_BOARD_COST:"taskBoard.analytics.tabCost",TASK_BOARD_QUALITY:"taskBoard.analytics.tabQuality",TASK_BOARD_ERRORS:"taskBoard.analytics.tabErrors",TASK_BOARD_TENANTS:"taskBoard.analytics.tabTenants"};function gt(t){const e=M.c(18),{tool:a,org:f,from:d,to:K}=t,o=q();let x;e[0]!==d||e[1]!==f||e[2]!==K?(x={org:f,from:d,to:K},e[0]=d,e[1]=f,e[2]=K,e[3]=x):x=e[3];const{data:i,isLoading:Q,error:m}=st(a,x);if(Q){let l;return e[4]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(Z,{className:"size-5 text-muted-foreground"})}),e[4]=l):l=e[4],l}if(m){let l;return e[5]!==m.message?(l=r.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:m.message}),e[5]=m.message,e[6]=l):l=e[6],l}if(!i)return null;let n;e[7]!==i.sections?(n=i.sections.map(St),e[7]=i.sections,e[8]=n):n=e[8];let c;e[9]!==i.range.from||e[10]!==i.range.to||e[11]!==o?(c=o("taskBoard.analytics.rangeFootnote",{from:i.range.from.slice(0,10),to:i.range.to.slice(0,10)}),e[9]=i.range.from,e[10]=i.range.to,e[11]=o,e[12]=c):c=e[12];let p;e[13]!==c?(p=r.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[13]=c,e[14]=p):p=e[14];let u;return e[15]!==n||e[16]!==p?(u=r.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[n,p]}),e[15]=n,e[16]=p,e[17]=u):u=e[17],u}function St(t){return r.jsx(et,{section:t,threadLinks:!0},t.title)}function ir(){const t=M.c(75),e=q(),a=J({strict:!1}).org??"",f=rt(),[d,K]=P.useState(30),[o,x]=P.useState(a),[i,Q]=P.useState("TASK_BOARD_DELIVERY"),[m]=P.useState(yt);let n;t[0]!==m?(n=new Date(m).toISOString(),t[0]=m,t[1]=n):n=t[1];const c=n;let p;t[2]!==d||t[3]!==m?(p=new Date(m-d*864e5).toISOString(),t[2]=d,t[3]=m,t[4]=p):p=t[4];const u=p,l=f.data?.isTaskBoardAdmin??!1;let g;t[5]!==e?(g=e("taskBoard.analytics.orgCurrent"),t[5]=e,t[6]=g):g=t[6];let S;t[7]!==a||t[8]!==g?(S={value:a,label:g},t[7]=a,t[8]=g,t[9]=S):S=t[9];let h;t[10]!==e?(h=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=h):h=t[11];let y;t[12]!==h?(y={value:"all",label:h},t[12]=h,t[13]=y):y=t[13];let I;if(t[14]!==f.data?.orgs||t[15]!==a||t[16]!==S||t[17]!==y){let s;t[19]!==a?(s=H=>H.slug!==a,t[19]=a,t[20]=s):s=t[20],I=[S,y,...(f.data?.orgs??[]).filter(s).map(ht)],t[14]=f.data?.orgs,t[15]=a,t[16]=S,t[17]=y,t[18]=I}else I=t[18];const U=I;let b;t[21]!==e?(b=e("taskBoard.analytics.title"),t[21]=e,t[22]=b):b=t[22];let B;t[23]!==b?(B=r.jsx("h1",{className:"text-xl font-medium text-foreground",children:b}),t[23]=b,t[24]=B):B=t[24];let A;t[25]!==l||t[26]!==o||t[27]!==U||t[28]!==e?(A=l&&r.jsx(at,{options:U,value:o,onChange:x,width:"w-[240px]",searchPlaceholder:e("taskBoard.analytics.orgSearch"),emptyMessage:e("taskBoard.analytics.orgEmpty")}),t[25]=l,t[26]=o,t[27]=U,t[28]=e,t[29]=A):A=t[29];const F=String(d);let V;t[30]===Symbol.for("react.memo_cache_sentinel")?(V=s=>K(Number(s)),t[30]=V):V=t[30];let Y;t[31]===Symbol.for("react.memo_cache_sentinel")?(Y=r.jsx(ot,{className:"w-[140px]",size:"sm",children:r.jsx(lt,{})}),t[31]=Y):Y=t[31];let T;t[32]!==e?(T=ut.map(s=>r.jsx(it,{value:String(s),children:e("taskBoard.analytics.rangeDays",{days:String(s)})},s)),t[32]=e,t[33]=T):T=t[33];let j;t[34]!==T?(j=r.jsx(mt,{children:T}),t[34]=T,t[35]=j):j=t[35];let k;t[36]!==F||t[37]!==j?(k=r.jsxs(nt,{value:F,onValueChange:V,children:[Y,j]}),t[36]=F,t[37]=j,t[38]=k):k=t[38];let _;t[39]!==a?(_={org:a},t[39]=a,t[40]=_):_=t[40];let v;t[41]!==e?(v=e("taskBoard.analytics.backToBoard"),t[41]=e,t[42]=v):v=t[42];let N;t[43]!==_||t[44]!==v?(N=r.jsx(W,{size:"sm",variant:"outline",asChild:!0,children:r.jsx(X,{to:"/$org/tasks/{-$taskKey}",params:_,children:v})}),t[43]=_,t[44]=v,t[45]=N):N=t[45];let O;t[46]!==k||t[47]!==N||t[48]!==A?(O=r.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[A,k,N]}),t[46]=k,t[47]=N,t[48]=A,t[49]=O):O=t[49];let C;t[50]!==O||t[51]!==B?(C=r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[B,O]}),t[50]=O,t[51]=B,t[52]=C):C=t[52];let D;t[53]!==o||t[54]!==a||t[55]!==e?(D=o!==a&&r.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:o==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:o})}),t[53]=o,t[54]=a,t[55]=e,t[56]=D):D=t[56];let $;t[57]===Symbol.for("react.memo_cache_sentinel")?($=s=>Q(s),t[57]=$):$=t[57];let R;t[58]!==e?(R=G.map(s=>r.jsx(pt,{value:s,children:e(xt[s])},s)),t[58]=e,t[59]=R):R=t[59];let E;t[60]!==R?(E=r.jsx(ct,{children:R}),t[60]=R,t[61]=E):E=t[61];let w;t[62]!==u||t[63]!==o||t[64]!==i||t[65]!==c?(w=G.map(s=>r.jsx(ft,{value:s,children:i===s&&r.jsx(gt,{tool:s,org:o,from:u,to:c})},s)),t[62]=u,t[63]=o,t[64]=i,t[65]=c,t[66]=w):w=t[66];let L;t[67]!==E||t[68]!==w||t[69]!==i?(L=r.jsxs(dt,{value:i,onValueChange:$,children:[E,w]}),t[67]=E,t[68]=w,t[69]=i,t[70]=L):L=t[70];let z;return t[71]!==C||t[72]!==D||t[73]!==L?(z=r.jsx(tt.Content,{children:r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:r.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[C,D,L]})})}),t[71]=C,t[72]=D,t[73]=L,t[74]=z):z=t[74],z}function ht(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function yt(){return Date.now()}export{ir as default};
1
+ import{c as M,b as q,f as J,r as P,j as r,B as W,L as X,h as Z}from"./index-D3VyLkC3.js";import{C as tt}from"./index-CcuAAQfR.js";import{S as et}from"./analytics-sections-D61Wwl8L.js";import{u as rt,A as G,a as st}from"./use-task-board-analytics-B-_ejdir.js";import{C as at}from"./combobox-DfBcz1Tb.js";import{c as it,b as ot,a as lt,d as mt,S as nt}from"./select-DC4TM20D.js";import{T as pt,a as ct,c as ft,b as dt}from"./tabs-WFH6vPjH.js";import"./use-mobile-Dd6KUtd1.js";import"./thread-button-CXr1OWYY.js";import"./agent-icon-DebFssce.js";import"./AlertCircle-O5yKT_wD.js";import"./Tool01-TfY7iJsP.js";import"./ArrowUp-BcguyIxa.js";import"./ArrowLeft-Bgwvgp7N.js";import"./LinkBroken01-cRHkOCv3.js";import"./ShoppingBag01-Bn_Ml-RN.js";import"./ZoomOut-Cy6sSJWj.js";import"./Building02-DXskyQyV.js";import"./CheckCircle-B8nBZ9lR.js";import"./Check-BwZg9K6a.js";import"./ChevronUp-XuQjQLoK.js";import"./UserSquare-Cij4gM7j.js";import"./Copy01-YmLU_wow.js";import"./CreditCard01-CwEdzwSq.js";import"./DotsVertical-DEYhHh-q.js";import"./Image01-DFTuvWJV.js";import"./Palette-BLSfhg5D.js";import"./XClose-B1wwChfA.js";import"./Key01-CW5AmBXO.js";import"./Link01-rblrB3OI.js";import"./LinkExternal01-DMr7xmMD.js";import"./Monitor01-DRRgoSgd.js";import"./Sun-JyTPOz6f.js";import"./Plus-B7fu2HeJ.js";import"./SearchMd-DpRsJH0P.js";import"./Trash01-DBoWC6W0.js";import"./Upload01-oBIhuFXz.js";import"./User01-DlDKGoyi.js";import"./Users01-B0qqt-bB.js";import"./X-B1izQ1KV.js";import"./use-chat-layout-state-PWimkJCw.js";import"./use-file-configs-FESoyyAp.js";import"./use-organization-settings-DSuZT_-Z.js";import"./schema-BWuVZGwp.js";import"./task-board-CVGH6XO_.js";import"./site-slug-DebpOoQq.js";import"./thread-route-DKA9bRvS.js";import"./use-panel-navigate-pf_bvwna.js";import"./use-project-scope-B9gl4G0G.js";import"./repository-binding-qP9N-2MJ.js";import"./use-mcp-client-DjhhnAr3.js";import"./auth-CABZOlQ0.js";import"./thread-intent-CXrPEeI-.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./sheet-gL2l7oL0.js";import"./tooltip-BUwCxmad.js";import"./index-DXhMSpJ7.js";import"./toolbar-icon-button-CJrzg1xS.js";import"./shell-layout-CBc-iFqB.js";import"./avatar-C70_Ki0z.js";import"./download-app-dialog-UTCmHANJ.js";import"./dialog-C_zHR8DK.js";import"./use-clock-tick-DK1jMfPk.js";import"./command-BUcXz1jA.js";import"./index-Djpcf0g3.js";import"./integration-icon-Bo3BUxvM.js";import"./project-icon-BlCsNLWV.js";import"./new-project-dialog-BWolKWvl.js";import"./input-B-l5PYzO.js";import"./label-UBdu3ctU.js";import"./repository-import-picker-BxSMVAOp.js";import"./use-navigate-to-agent-Bbk9KV3t.js";import"./repository-picker-DXcVdbPo.js";import"./useInfiniteQuery-BzCTPJtn.js";import"./infiniteQueryObserver-rGQ-BvZd.js";import"./collection-search-DZ1wZYuR.js";import"./use-debounced-value-Ddzynl8d.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-BXGj5Xuz.js";import"./autosend-BkG_BHpj.js";import"./use-org-sso-DnQOloxF.js";import"./resizable-p0Iz3mjy.js";import"./icon-button-BAAffUhi.js";import"./chart-BkrO3MsD.js";import"./index-CJflvpaj.js";import"./CartesianChart-Dxs56jW8.js";import"./table-WwEBhzp_.js";import"./Line-w53GBlC_.js";import"./ErrorBarContext-CoXkTI3v.js";import"./Sector-DUcOKKda.js";import"./XAxis-CxP14qz_.js";import"./popover-DmsBpt35.js";const ut=[7,30,90],xt={TASK_BOARD_DELIVERY:"taskBoard.analytics.tabDelivery",TASK_BOARD_STUCK:"taskBoard.analytics.tabStuck",TASK_BOARD_COST:"taskBoard.analytics.tabCost",TASK_BOARD_QUALITY:"taskBoard.analytics.tabQuality",TASK_BOARD_ERRORS:"taskBoard.analytics.tabErrors",TASK_BOARD_TENANTS:"taskBoard.analytics.tabTenants"};function gt(t){const e=M.c(18),{tool:a,org:f,from:d,to:K}=t,o=q();let x;e[0]!==d||e[1]!==f||e[2]!==K?(x={org:f,from:d,to:K},e[0]=d,e[1]=f,e[2]=K,e[3]=x):x=e[3];const{data:i,isLoading:Q,error:m}=st(a,x);if(Q){let l;return e[4]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:"flex justify-center py-12",children:r.jsx(Z,{className:"size-5 text-muted-foreground"})}),e[4]=l):l=e[4],l}if(m){let l;return e[5]!==m.message?(l=r.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:m.message}),e[5]=m.message,e[6]=l):l=e[6],l}if(!i)return null;let n;e[7]!==i.sections?(n=i.sections.map(St),e[7]=i.sections,e[8]=n):n=e[8];let c;e[9]!==i.range.from||e[10]!==i.range.to||e[11]!==o?(c=o("taskBoard.analytics.rangeFootnote",{from:i.range.from.slice(0,10),to:i.range.to.slice(0,10)}),e[9]=i.range.from,e[10]=i.range.to,e[11]=o,e[12]=c):c=e[12];let p;e[13]!==c?(p=r.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[13]=c,e[14]=p):p=e[14];let u;return e[15]!==n||e[16]!==p?(u=r.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[n,p]}),e[15]=n,e[16]=p,e[17]=u):u=e[17],u}function St(t){return r.jsx(et,{section:t,threadLinks:!0},t.title)}function ir(){const t=M.c(75),e=q(),a=J({strict:!1}).org??"",f=rt(),[d,K]=P.useState(30),[o,x]=P.useState(a),[i,Q]=P.useState("TASK_BOARD_DELIVERY"),[m]=P.useState(yt);let n;t[0]!==m?(n=new Date(m).toISOString(),t[0]=m,t[1]=n):n=t[1];const c=n;let p;t[2]!==d||t[3]!==m?(p=new Date(m-d*864e5).toISOString(),t[2]=d,t[3]=m,t[4]=p):p=t[4];const u=p,l=f.data?.isTaskBoardAdmin??!1;let g;t[5]!==e?(g=e("taskBoard.analytics.orgCurrent"),t[5]=e,t[6]=g):g=t[6];let S;t[7]!==a||t[8]!==g?(S={value:a,label:g},t[7]=a,t[8]=g,t[9]=S):S=t[9];let h;t[10]!==e?(h=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=h):h=t[11];let y;t[12]!==h?(y={value:"all",label:h},t[12]=h,t[13]=y):y=t[13];let I;if(t[14]!==f.data?.orgs||t[15]!==a||t[16]!==S||t[17]!==y){let s;t[19]!==a?(s=H=>H.slug!==a,t[19]=a,t[20]=s):s=t[20],I=[S,y,...(f.data?.orgs??[]).filter(s).map(ht)],t[14]=f.data?.orgs,t[15]=a,t[16]=S,t[17]=y,t[18]=I}else I=t[18];const U=I;let b;t[21]!==e?(b=e("taskBoard.analytics.title"),t[21]=e,t[22]=b):b=t[22];let B;t[23]!==b?(B=r.jsx("h1",{className:"text-xl font-medium text-foreground",children:b}),t[23]=b,t[24]=B):B=t[24];let A;t[25]!==l||t[26]!==o||t[27]!==U||t[28]!==e?(A=l&&r.jsx(at,{options:U,value:o,onChange:x,width:"w-[240px]",searchPlaceholder:e("taskBoard.analytics.orgSearch"),emptyMessage:e("taskBoard.analytics.orgEmpty")}),t[25]=l,t[26]=o,t[27]=U,t[28]=e,t[29]=A):A=t[29];const F=String(d);let V;t[30]===Symbol.for("react.memo_cache_sentinel")?(V=s=>K(Number(s)),t[30]=V):V=t[30];let Y;t[31]===Symbol.for("react.memo_cache_sentinel")?(Y=r.jsx(ot,{className:"w-[140px]",size:"sm",children:r.jsx(lt,{})}),t[31]=Y):Y=t[31];let T;t[32]!==e?(T=ut.map(s=>r.jsx(it,{value:String(s),children:e("taskBoard.analytics.rangeDays",{days:String(s)})},s)),t[32]=e,t[33]=T):T=t[33];let j;t[34]!==T?(j=r.jsx(mt,{children:T}),t[34]=T,t[35]=j):j=t[35];let k;t[36]!==F||t[37]!==j?(k=r.jsxs(nt,{value:F,onValueChange:V,children:[Y,j]}),t[36]=F,t[37]=j,t[38]=k):k=t[38];let _;t[39]!==a?(_={org:a},t[39]=a,t[40]=_):_=t[40];let v;t[41]!==e?(v=e("taskBoard.analytics.backToBoard"),t[41]=e,t[42]=v):v=t[42];let N;t[43]!==_||t[44]!==v?(N=r.jsx(W,{size:"sm",variant:"outline",asChild:!0,children:r.jsx(X,{to:"/$org/tasks/{-$taskKey}",params:_,children:v})}),t[43]=_,t[44]=v,t[45]=N):N=t[45];let O;t[46]!==k||t[47]!==N||t[48]!==A?(O=r.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[A,k,N]}),t[46]=k,t[47]=N,t[48]=A,t[49]=O):O=t[49];let C;t[50]!==O||t[51]!==B?(C=r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[B,O]}),t[50]=O,t[51]=B,t[52]=C):C=t[52];let D;t[53]!==o||t[54]!==a||t[55]!==e?(D=o!==a&&r.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:o==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:o})}),t[53]=o,t[54]=a,t[55]=e,t[56]=D):D=t[56];let $;t[57]===Symbol.for("react.memo_cache_sentinel")?($=s=>Q(s),t[57]=$):$=t[57];let R;t[58]!==e?(R=G.map(s=>r.jsx(pt,{value:s,children:e(xt[s])},s)),t[58]=e,t[59]=R):R=t[59];let E;t[60]!==R?(E=r.jsx(ct,{children:R}),t[60]=R,t[61]=E):E=t[61];let w;t[62]!==u||t[63]!==o||t[64]!==i||t[65]!==c?(w=G.map(s=>r.jsx(ft,{value:s,children:i===s&&r.jsx(gt,{tool:s,org:o,from:u,to:c})},s)),t[62]=u,t[63]=o,t[64]=i,t[65]=c,t[66]=w):w=t[66];let L;t[67]!==E||t[68]!==w||t[69]!==i?(L=r.jsxs(dt,{value:i,onValueChange:$,children:[E,w]}),t[67]=E,t[68]=w,t[69]=i,t[70]=L):L=t[70];let z;return t[71]!==C||t[72]!==D||t[73]!==L?(z=r.jsx(tt.Content,{children:r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:r.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[C,D,L]})})}),t[71]=C,t[72]=D,t[73]=L,t[74]=z):z=t[74],z}function ht(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function yt(){return Date.now()}export{ir as default};
@@ -0,0 +1 @@
1
+ import{c as l,X as n,j as r,K as f}from"./index-D3VyLkC3.js";import{C as d}from"./index-CcuAAQfR.js";import{T as u}from"./index-CpuEtEqc.js";import{F as x}from"./feature-gate-BweFNKr3.js";import{m as h,P as j}from"./mock-board-YpCRnBGe.js";import"./use-mobile-Dd6KUtd1.js";import"./thread-button-CXr1OWYY.js";import"./agent-icon-DebFssce.js";import"./AlertCircle-O5yKT_wD.js";import"./Tool01-TfY7iJsP.js";import"./ArrowUp-BcguyIxa.js";import"./ArrowLeft-Bgwvgp7N.js";import"./LinkBroken01-cRHkOCv3.js";import"./ShoppingBag01-Bn_Ml-RN.js";import"./ZoomOut-Cy6sSJWj.js";import"./Building02-DXskyQyV.js";import"./CheckCircle-B8nBZ9lR.js";import"./Check-BwZg9K6a.js";import"./ChevronUp-XuQjQLoK.js";import"./UserSquare-Cij4gM7j.js";import"./Copy01-YmLU_wow.js";import"./CreditCard01-CwEdzwSq.js";import"./DotsVertical-DEYhHh-q.js";import"./Image01-DFTuvWJV.js";import"./Palette-BLSfhg5D.js";import"./XClose-B1wwChfA.js";import"./Key01-CW5AmBXO.js";import"./Link01-rblrB3OI.js";import"./LinkExternal01-DMr7xmMD.js";import"./Monitor01-DRRgoSgd.js";import"./Sun-JyTPOz6f.js";import"./Plus-B7fu2HeJ.js";import"./SearchMd-DpRsJH0P.js";import"./Trash01-DBoWC6W0.js";import"./Upload01-oBIhuFXz.js";import"./User01-DlDKGoyi.js";import"./Users01-B0qqt-bB.js";import"./X-B1izQ1KV.js";import"./use-chat-layout-state-PWimkJCw.js";import"./use-file-configs-FESoyyAp.js";import"./use-organization-settings-DSuZT_-Z.js";import"./schema-BWuVZGwp.js";import"./task-board-CVGH6XO_.js";import"./site-slug-DebpOoQq.js";import"./thread-route-DKA9bRvS.js";import"./use-panel-navigate-pf_bvwna.js";import"./use-project-scope-B9gl4G0G.js";import"./repository-binding-qP9N-2MJ.js";import"./use-mcp-client-DjhhnAr3.js";import"./auth-CABZOlQ0.js";import"./thread-intent-CXrPEeI-.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./sheet-gL2l7oL0.js";import"./tooltip-BUwCxmad.js";import"./index-DXhMSpJ7.js";import"./toolbar-icon-button-CJrzg1xS.js";import"./shell-layout-CBc-iFqB.js";import"./avatar-C70_Ki0z.js";import"./download-app-dialog-UTCmHANJ.js";import"./dialog-C_zHR8DK.js";import"./use-clock-tick-DK1jMfPk.js";import"./command-BUcXz1jA.js";import"./index-Djpcf0g3.js";import"./integration-icon-Bo3BUxvM.js";import"./project-icon-BlCsNLWV.js";import"./new-project-dialog-BWolKWvl.js";import"./input-B-l5PYzO.js";import"./label-UBdu3ctU.js";import"./repository-import-picker-BxSMVAOp.js";import"./use-navigate-to-agent-Bbk9KV3t.js";import"./repository-picker-DXcVdbPo.js";import"./useInfiniteQuery-BzCTPJtn.js";import"./infiniteQueryObserver-rGQ-BvZd.js";import"./collection-search-DZ1wZYuR.js";import"./use-debounced-value-Ddzynl8d.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-BXGj5Xuz.js";import"./autosend-BkG_BHpj.js";import"./use-org-sso-DnQOloxF.js";import"./resizable-p0Iz3mjy.js";import"./icon-button-BAAffUhi.js";import"./rich-text-link-control-BAQED-eE.js";import"./use-task-board-analytics-B-_ejdir.js";import"./combobox-DfBcz1Tb.js";import"./popover-DmsBpt35.js";import"./index-D-s3ZvIF.js";import"./gateway-client-DqqeM3yS.js";import"./form-BGxoVGvb.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-kIKkchjb.js";import"./suggestion-Ules5agL.js";import"./column-rules-DQX2ptJC.js";import"./badge-D10nU5hm.js";import"./switch-CL5hy8vw.js";import"./textarea-CoQK2oyP.js";import"./use-org-fs-Cif2PgGI.js";import"./get-initials-D-f_fDFw.js";import"./search-toggle-s-q01VSg.js";import"./config-DaCobjNE.js";import"./use-task-board-events-D5YUKNR3.js";import"./use-decopilot-events-Coi59geF.js";import"./use-members-CgpU7zdW.js";import"./use-org-auth-client-CGnd_KU_.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-tags-oDh30HSX.js";import"./task-route-D36p4AYB.js";import"./calendar-BF7zRWf5.js";import"./alert-CqDdaXWn.js";import"./collapsible-CKOvtNeB.js";import"./use-copy-4XQ35auE.js";import"./markdown-DgNX2G8Y.js";import"./location-DPIrGNp7.js";import"./index-BxML1xBj.js";import"./index-B_Hj8ygS.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-connection-CDTsUGCD.js";import"./github-repo-scope-ByTYKy_L.js";import"./thread-sheet-body-DbO-EyYS.js";import"./useSuspenseInfiniteQuery-Cx1jk_4I.js";import"./pair-qre124N2.js";import"./usage-stats-BZmwl_hY.js";import"./chat-context-Crr9YCN0.js";import"./use-ai-providers-OUZLuzjk.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Gi8nuIVZ.js";import"./types-BM02pFks.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./tool-namespace-DmnQIdtF.js";import"./use-mcp-prompts-CPGSJM8z.js";import"./use-thread-outputs-CzHRXoWD.js";import"./file-type-icon-D0M-S9U1.js";import"./use-infinite-scroll-BOW8hicV.js";import"./task-status-CLw5rySP.js";import"./use-open-billing-url-C5p05V2D.js";import"./chat-draft-BkkmQZdS.js";import"./separator-BEoe11dP.js";import"./feature-paywall-DCy88YOr.js";import"./plan-ladder-B1XIg6KA.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(u,{})}),t[0]=o):o=t[0],o}function Vo(){const t=l.c(8),{locator:o}=n();let m;t[0]!==o?(m=c=>c.setQueryData(f.taskBoardItems(o),h()),t[0]=o,t[1]=m):m=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let i;t[3]!==m?(i=r.jsx(j,{seed:m,children:p}),t[3]=m,t[4]=i):i=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==i?(s=r.jsx(d.Content,{children:r.jsx(x,{feature:"kanban",backdrop:i,children:e})}),t[6]=i,t[7]=s):s=t[7],s}export{Vo as default};
@@ -1,4 +1,4 @@
1
- import{c as w,j as n,X as Y,a2 as Z,K as ee,m as ue,o as je,e as pe,b as B,r as U,aS as he,B as q,t as J,ed as fe,ee as X,ec as ye,n as me,fn as Te,s as Ne,l as Ae,L as Re}from"./index-BE867Qee.js";import{C as xe}from"./checkbox-DM1zG_bR.js";import{I as de}from"./input-DWWEe804.js";import{T as ve}from"./textarea-D_VH3s7x.js";import{i as ke}from"./Check-Bo3qSXwJ.js";import{i as Ie}from"./Tool01-BuLiX0jy.js";import{i as $e}from"./Sun-aSGS3XrK.js";import{s as Ee}from"./Plus-DUwLVLW_.js";import{s as Le}from"./Trash01-DtMJF0U3.js";import{C as Ke}from"./combobox-2qhSjEFr.js";import{M as De}from"./multi-select-DgYPzhCT.js";import{d as Fe,c as ze,b as Oe,a as Ue,S as Be}from"./select-CYYv9Vtn.js";import{S as Me}from"./switch-B6KzjFhw.js";import{a as Je,T as qe}from"./input-CmcPYdOc.js";import{p as He}from"./skill-md-ChfVs4uF.js";import{A as Ve,a as We,b as Ge,c as Qe,g as Ye,d as Ze,e as Xe,f as et}from"./alert-dialog-zI-mFpSQ.js";import{R as tt,A as st}from"./review-settings-D_4cx7Vi.js";import{j as it}from"./task-board-C7HcCxeg.js";import{b as lt,c as nt,S as rt}from"./column-rules-DjRlzWHk.js";import{R as at}from"./require-capability-tQig_059.js";import"./command-ZBxh5GnQ.js";import"./index-CaSLW3R8.js";import"./dialog-DC6TmMkf.js";import"./X-BO04Dn0R.js";import"./SearchMd-BiNHdvMf.js";import"./popover-CabOm1Wu.js";import"./badge-Bkod8faG.js";import"./ChevronUp-Ds84QUAn.js";import"./index-6OICj4ln.js";import"./suggestion-DRMbopje.js";import"./index-CwSrznSB.js";import"./gateway-client-Dv4XJFUM.js";import"./form-R8MW_Gtw.js";import"./label-CpTis3ZF.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-hWHGVIMb.js";import"./use-mobile-avjkwF6P.js";import"./use-panel-navigate-DM9oBo_y.js";import"./thread-route-Bzzi_5mF.js";import"./use-project-scope-CdG18ZwV.js";import"./repository-binding-kLfd1JPC.js";import"./use-mcp-client-BGKUmMJU.js";import"./auth-DQuDCDTH.js";import"./tooltip-2Ew10_I0.js";import"./agent-icon-C8zn459s.js";import"./AlertCircle-CQA_p2Cp.js";import"./ArrowUp-0DU20WU2.js";import"./ArrowLeft-Dl_7c8AB.js";import"./LinkBroken01-8QjnprbC.js";import"./ShoppingBag01-BlgcPhxp.js";import"./ZoomOut-hhnEYknp.js";import"./Building02-CsHqQGTj.js";import"./CheckCircle-BCxvtn62.js";import"./UserSquare-B0WZmX6s.js";import"./Copy01-QNdLW2v3.js";import"./CreditCard01-D1KkCG7o.js";import"./DotsVertical-Dyi1_2jC.js";import"./Image01-0Rs0fG3a.js";import"./Palette-CaoJ793n.js";import"./XClose-DwKTRWak.js";import"./Key01-DvlZjbjO.js";import"./Link01-3DcN1bgm.js";import"./LinkExternal01-CLN31q0P.js";import"./Monitor01-C0xXEFc5.js";import"./Upload01-C2lcKrsy.js";import"./User01-DmaMR1Ca.js";import"./Users01-C8SJUk8C.js";import"./chat-context-CvEgaFCN.js";import"./autosend-B7xOxZCV.js";import"./thread-intent-tToQ_3Cn.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-CCMkDtUe.js";import"./use-ai-providers-jnOy5tNY.js";import"./location-DPIrGNp7.js";import"./use-organization-settings-b1uEqEl7.js";import"./schema-CaBw1j44.js";import"./decopilot-BdkjG-bD.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BxSXBdTP.js";import"./download-app-dialog-CEx38Fcv.js";import"./use-mcp-prompts-Brgv7p5b.js";import"./use-org-fs-Bb3mK6Hx.js";import"./use-new-blocks-editor-BlVQ71Up.js";import"./use-connection-x3pfvWpW.js";import"./icon-button-Blj1QpLb.js";import"./sheet-CmXNGCBA.js";import"./access-gate-g4Ol-Lnp.js";import"./capability-load-error-AIgwu68M.js";const ot=/^([A-Za-z][A-Za-z0-9_]*-\d+)$/;function ct(t){const e=t.trim();if(e==="")return null;const s=/(?:\/(?:browse|issues)\/|[?&]selectedIssue=)([A-Za-z][A-Za-z0-9_]*-\d+)/.exec(e)?.[1]??e.split(/[?#]/)[0]??"",i=ot.exec(s);return i?.[1]?i[1].toUpperCase():null}function _e(t){const e=[],r=[],s=new Set;for(const i of t.split(/[\n,;]+/)){const l=i.trim();if(l==="")continue;const a=ct(l);if(!a){r.push(l);continue}s.has(a)||(s.add(a),e.push(a))}return{keys:e,invalid:r}}function mt(t){return{type:"doc",content:t.split(`
1
+ import{c as w,j as n,X as Y,a2 as Z,K as ee,m as ue,o as je,e as pe,b as B,r as U,aS as he,B as q,t as J,ed as fe,ee as X,ec as ye,n as me,fn as Te,s as Ne,l as Ae,L as Re}from"./index-D3VyLkC3.js";import{C as xe}from"./checkbox-CAXlLvHp.js";import{I as de}from"./input-B-l5PYzO.js";import{T as ve}from"./textarea-CoQK2oyP.js";import{i as ke}from"./Check-BwZg9K6a.js";import{i as Ie}from"./Tool01-TfY7iJsP.js";import{i as $e}from"./Sun-JyTPOz6f.js";import{s as Ee}from"./Plus-B7fu2HeJ.js";import{s as Le}from"./Trash01-DBoWC6W0.js";import{C as Ke}from"./combobox-DfBcz1Tb.js";import{M as De}from"./multi-select-CWb2Oi6x.js";import{d as Fe,c as ze,b as Oe,a as Ue,S as Be}from"./select-DC4TM20D.js";import{S as Me}from"./switch-CL5hy8vw.js";import{a as Je,T as qe}from"./input-CQAdPV6U.js";import{p as He}from"./skill-md-ChfVs4uF.js";import{A as Ve,a as We,b as Ge,c as Qe,g as Ye,d as Ze,e as Xe,f as et}from"./alert-dialog-BaW-BGF4.js";import{R as tt,A as st}from"./review-settings-DL4Naz6f.js";import{j as it}from"./task-board-CVGH6XO_.js";import{b as lt,c as nt,S as rt}from"./column-rules-DQX2ptJC.js";import{R as at}from"./require-capability-Btgp_M9F.js";import"./command-BUcXz1jA.js";import"./index-Djpcf0g3.js";import"./dialog-C_zHR8DK.js";import"./X-B1izQ1KV.js";import"./SearchMd-DpRsJH0P.js";import"./popover-DmsBpt35.js";import"./badge-D10nU5hm.js";import"./ChevronUp-XuQjQLoK.js";import"./index-DXhMSpJ7.js";import"./suggestion-Ules5agL.js";import"./index-D-s3ZvIF.js";import"./gateway-client-DqqeM3yS.js";import"./form-BGxoVGvb.js";import"./label-UBdu3ctU.js";import"./utils-CVEq3hMx.js";import"./org-file-open-context-kIKkchjb.js";import"./use-mobile-Dd6KUtd1.js";import"./use-panel-navigate-pf_bvwna.js";import"./thread-route-DKA9bRvS.js";import"./use-project-scope-B9gl4G0G.js";import"./repository-binding-qP9N-2MJ.js";import"./use-mcp-client-DjhhnAr3.js";import"./auth-CABZOlQ0.js";import"./tooltip-BUwCxmad.js";import"./agent-icon-DebFssce.js";import"./AlertCircle-O5yKT_wD.js";import"./ArrowUp-BcguyIxa.js";import"./ArrowLeft-Bgwvgp7N.js";import"./LinkBroken01-cRHkOCv3.js";import"./ShoppingBag01-Bn_Ml-RN.js";import"./ZoomOut-Cy6sSJWj.js";import"./Building02-DXskyQyV.js";import"./CheckCircle-B8nBZ9lR.js";import"./UserSquare-Cij4gM7j.js";import"./Copy01-YmLU_wow.js";import"./CreditCard01-CwEdzwSq.js";import"./DotsVertical-DEYhHh-q.js";import"./Image01-DFTuvWJV.js";import"./Palette-BLSfhg5D.js";import"./XClose-B1wwChfA.js";import"./Key01-CW5AmBXO.js";import"./Link01-rblrB3OI.js";import"./LinkExternal01-DMr7xmMD.js";import"./Monitor01-DRRgoSgd.js";import"./Upload01-oBIhuFXz.js";import"./User01-DlDKGoyi.js";import"./Users01-B0qqt-bB.js";import"./chat-context-Crr9YCN0.js";import"./autosend-BkG_BHpj.js";import"./thread-intent-CXrPEeI-.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-Coi59geF.js";import"./use-ai-providers-OUZLuzjk.js";import"./location-DPIrGNp7.js";import"./use-organization-settings-DSuZT_-Z.js";import"./schema-BWuVZGwp.js";import"./decopilot-4kqD0JAa.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-C70_Ki0z.js";import"./download-app-dialog-UTCmHANJ.js";import"./use-mcp-prompts-CPGSJM8z.js";import"./use-org-fs-Cif2PgGI.js";import"./use-new-blocks-editor-DdfQbotf.js";import"./use-connection-CDTsUGCD.js";import"./icon-button-BAAffUhi.js";import"./sheet-gL2l7oL0.js";import"./access-gate-DvGFBZwA.js";import"./capability-load-error-CI6r2eSt.js";const ot=/^([A-Za-z][A-Za-z0-9_]*-\d+)$/;function ct(t){const e=t.trim();if(e==="")return null;const s=/(?:\/(?:browse|issues)\/|[?&]selectedIssue=)([A-Za-z][A-Za-z0-9_]*-\d+)/.exec(e)?.[1]??e.split(/[?#]/)[0]??"",i=ot.exec(s);return i?.[1]?i[1].toUpperCase():null}function _e(t){const e=[],r=[],s=new Set;for(const i of t.split(/[\n,;]+/)){const l=i.trim();if(l==="")continue;const a=ct(l);if(!a){r.push(l);continue}s.has(a)||(s.add(a),e.push(a))}return{keys:e,invalid:r}}function mt(t){return{type:"doc",content:t.split(`
2
2
  `).map(e=>({type:"paragraph",...e===""?{}:{content:[{type:"text",text:e}]}}))}}const ft=new Set(["paragraph","heading","codeBlock","listItem"]);function dt(t){return(t.files??[]).filter(r=>r.content?.trim()).map(r=>r.relPath==="SKILL.md"?He(r.content).body.trim():`${r.relPath}:
3
3
  ${r.content.trim()}`).join(`
4
4
 
@@ -1 +1 @@
1
- import{c as o,l,j as n}from"./index-BE867Qee.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-[var(--studio-control-radius,var(--radius-xl))] bg-[var(--studio-input-background)] px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
1
+ import{c as o,l,j as n}from"./index-D3VyLkC3.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-[var(--studio-control-radius,var(--radius-xl))] bg-[var(--studio-input-background)] px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
@@ -1 +1 @@
1
- import{c as U,b as ee,f as ge,r as z,j as s,h as je,X as pe,c2 as Se,z as ye}from"./index-BE867Qee.js";import{C as se}from"./index-CM8cxFEW.js";import{S as be}from"./analytics-sections-rNV5HZ50.js";import{u as ve,a as Ne,b as Te}from"./use-thread-analytics-C_Ib4AtX.js";import{B as Ce}from"./badge-Bkod8faG.js";import{C as _e}from"./combobox-2qhSjEFr.js";import{S as ae,b as oe,a as ne,d as ce,c as Z}from"./select-CYYv9Vtn.js";import{e as Ae,a as we,b as fe,T as V,d as ke,c as K}from"./table-BHDtYz9k.js";import{T as le,a as Le,c as re,b as Ee}from"./tabs-CfLMYw89.js";import{c as Re,S as Ie,a as $e,b as Be}from"./sheet-CmXNGCBA.js";import{T as De}from"./thread-sheet-body-B0QtugED.js";import{u as Oe}from"./use-connection-x3pfvWpW.js";import{u as Pe}from"./use-mcp-client-BGKUmMJU.js";import{b as He}from"./repository-binding-kLfd1JPC.js";import"./use-mobile-avjkwF6P.js";import"./thread-button-BHZP_s0g.js";import"./agent-icon-C8zn459s.js";import"./AlertCircle-CQA_p2Cp.js";import"./Tool01-BuLiX0jy.js";import"./ArrowUp-0DU20WU2.js";import"./ArrowLeft-Dl_7c8AB.js";import"./LinkBroken01-8QjnprbC.js";import"./ShoppingBag01-BlgcPhxp.js";import"./ZoomOut-hhnEYknp.js";import"./Building02-CsHqQGTj.js";import"./CheckCircle-BCxvtn62.js";import"./Check-Bo3qSXwJ.js";import"./ChevronUp-Ds84QUAn.js";import"./UserSquare-B0WZmX6s.js";import"./Copy01-QNdLW2v3.js";import"./CreditCard01-D1KkCG7o.js";import"./DotsVertical-Dyi1_2jC.js";import"./Image01-0Rs0fG3a.js";import"./Palette-CaoJ793n.js";import"./XClose-DwKTRWak.js";import"./Key01-DvlZjbjO.js";import"./Link01-3DcN1bgm.js";import"./LinkExternal01-CLN31q0P.js";import"./Monitor01-C0xXEFc5.js";import"./Sun-aSGS3XrK.js";import"./Plus-DUwLVLW_.js";import"./SearchMd-BiNHdvMf.js";import"./Trash01-DtMJF0U3.js";import"./Upload01-C2lcKrsy.js";import"./User01-DmaMR1Ca.js";import"./Users01-C8SJUk8C.js";import"./X-BO04Dn0R.js";import"./use-chat-layout-state-BbJD-IRs.js";import"./use-file-configs-D6BnOxCa.js";import"./use-organization-settings-b1uEqEl7.js";import"./schema-CaBw1j44.js";import"./task-board-C7HcCxeg.js";import"./site-slug-DebpOoQq.js";import"./thread-route-Bzzi_5mF.js";import"./use-panel-navigate-DM9oBo_y.js";import"./use-project-scope-CdG18ZwV.js";import"./thread-intent-tToQ_3Cn.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-2Ew10_I0.js";import"./index-6OICj4ln.js";import"./toolbar-icon-button-Dn4ZIc9O.js";import"./shell-layout-D2P6ouzP.js";import"./avatar-BxSXBdTP.js";import"./download-app-dialog-CEx38Fcv.js";import"./dialog-DC6TmMkf.js";import"./use-clock-tick-BY0qK7ow.js";import"./command-ZBxh5GnQ.js";import"./index-CaSLW3R8.js";import"./integration-icon-aoXYYKdZ.js";import"./project-icon-CeJwJwGP.js";import"./new-project-dialog-QzgehZk_.js";import"./input-DWWEe804.js";import"./label-CpTis3ZF.js";import"./repository-import-picker-C4bVjDlN.js";import"./use-navigate-to-agent-DT6SP7we.js";import"./repository-picker-CSvuMd3o.js";import"./useInfiniteQuery-B0OQsDiL.js";import"./infiniteQueryObserver-B0NvduwT.js";import"./collection-search-Cp0gVUrY.js";import"./use-debounced-value-Cjq6wHlM.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-CVAQQhe-.js";import"./autosend-B7xOxZCV.js";import"./use-org-sso-D0ubLH8o.js";import"./resizable-DncVAUZ5.js";import"./icon-button-Blj1QpLb.js";import"./chart-NHKhTpOL.js";import"./index--FVWSK_c.js";import"./CartesianChart-OVjYagl6.js";import"./Line-BZPiXXVf.js";import"./ErrorBarContext-Dckliguf.js";import"./Sector-DrcdpRCF.js";import"./XAxis-DjkUxR47.js";import"./popover-CabOm1Wu.js";import"./useSuspenseInfiniteQuery-BjRsbalC.js";import"./pair-DKzXjxOb.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-DckFjvhZ.js";import"./use-copy-CJPO8CYZ.js";import"./usage-stats-y5sLQYFP.js";import"./markdown-Bmw63uOU.js";import"./location-DPIrGNp7.js";import"./org-file-open-context-hWHGVIMb.js";import"./use-decopilot-events-CCMkDtUe.js";import"./chat-context-CvEgaFCN.js";import"./use-ai-providers-jnOy5tNY.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-fAGsYxUD.js";import"./types-DSEqfHk2.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-Dv4XJFUM.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./use-mcp-prompts-Brgv7p5b.js";import"./index-CwSrznSB.js";import"./form-R8MW_Gtw.js";import"./use-thread-outputs-BEYgt-Dh.js";import"./file-type-icon-CQEUNMAM.js";import"./use-infinite-scroll-Cj7K2rNB.js";import"./task-status-C4kf54Sm.js";import"./auth-DQuDCDTH.js";const Ve=[1,7,30,90],Ke=["in_progress","requires_action","failed","completed"],Ue=["chat","automation","task"],Q="any",me={in_progress:"thread.analytics.statusRunning",requires_action:"thread.analytics.statusWaiting",failed:"thread.analytics.statusFailed",completed:"thread.analytics.statusCompleted"},xe={chat:"thread.analytics.kindChat",automation:"thread.analytics.kindAutomation",task:"thread.analytics.kindTask"},ze={in_progress:"default",requires_action:"warning",failed:"destructive",completed:"secondary"};function de(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function he(t){const e=U.c(2),{message:l}=t;let r;return e[0]!==l?(r=s.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:l}),e[0]=l,e[1]=r):r=e[1],r}function ie(t){const e=U.c(9),{label:l,value:r}=t;let i;e[0]!==l?(i=s.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1];let m;e[2]!==r?(m=r.toLocaleString(),e[2]=r,e[3]=m):m=e[3];let o;e[4]!==m?(o=s.jsx("div",{className:"mt-1 text-2xl font-medium text-foreground tabular-nums",children:m}),e[4]=m,e[5]=o):o=e[5];let c;return e[6]!==i||e[7]!==o?(c=s.jsxs("div",{className:"rounded-lg border border-border p-4",children:[i,o]}),e[6]=i,e[7]=o,e[8]=c):c=e[8],c}function Fe(t){const e=U.c(56),{thread:l,onOpen:r}=t,i=ee(),m=l.status;let o;e[0]!==l.updatedAt?(o=new Date(l.updatedAt).toLocaleString(),e[0]=l.updatedAt,e[1]=o):o=e[1];let c;e[2]!==o?(c=s.jsx(K,{className:"whitespace-nowrap text-sm tabular-nums text-muted-foreground",children:o}),e[2]=o,e[3]=c):c=e[3];let a;e[4]!==l.orgSlug?(a=s.jsx(K,{className:"text-sm",children:l.orgSlug}),e[4]=l.orgSlug,e[5]=a):a=e[5];let u;e[6]!==r||e[7]!==l?(u=()=>r(l),e[6]=r,e[7]=l,e[8]=u):u=e[8];let n;e[9]!==i||e[10]!==l.title?(n=l.title||i("thread.analytics.untitled"),e[9]=i,e[10]=l.title,e[11]=n):n=e[11];let x;e[12]!==u||e[13]!==n?(x=s.jsx("button",{type:"button",onClick:u,className:"block max-w-full truncate text-left text-foreground underline-offset-2 hover:underline",children:n}),e[12]=u,e[13]=n,e[14]=x):x=e[14];let d;e[15]!==l.failureReason||e[16]!==l.lastError||e[17]!==l.status?(d=l.status==="failed"&&(l.lastError||l.failureReason)&&s.jsx("div",{className:"truncate text-xs text-destructive",children:l.lastError??l.failureReason}),e[15]=l.failureReason,e[16]=l.lastError,e[17]=l.status,e[18]=d):d=e[18];let h;e[19]!==x||e[20]!==d?(h=s.jsxs(K,{className:"max-w-sm text-sm",children:[x,d]}),e[19]=x,e[20]=d,e[21]=h):h=e[21];const g=xe[l.kind];let p;e[22]!==i||e[23]!==g?(p=i(g),e[22]=i,e[23]=g,e[24]=p):p=e[24];let w;e[25]!==p?(w=s.jsx(K,{className:"text-sm",children:p}),e[25]=p,e[26]=w):w=e[26];const k=ze[m]??"outline";let j;e[27]!==m||e[28]!==i||e[29]!==l.status?(j=me[m]?i(me[m]):l.status,e[27]=m,e[28]=i,e[29]=l.status,e[30]=j):j=e[30];let T;e[31]!==k||e[32]!==j?(T=s.jsx(K,{children:s.jsx(Ce,{variant:k,children:j})}),e[31]=k,e[32]=j,e[33]=T):T=e[33];const L=l.userEmail??l.userName??"—";let S;e[34]!==L?(S=s.jsx(K,{className:"max-w-48 truncate text-sm",children:L}),e[34]=L,e[35]=S):S=e[35];let y;e[36]!==l.agent?(y=s.jsx(K,{className:"max-w-48 truncate text-sm",children:l.agent}),e[36]=l.agent,e[37]=y):y=e[37];let C;e[38]!==l.usd?(C=l.usd===null?"—":`$${l.usd.toFixed(2)}`,e[38]=l.usd,e[39]=C):C=e[39];let b;e[40]!==C?(b=s.jsx(K,{className:"text-sm tabular-nums",children:C}),e[40]=C,e[41]=b):b=e[41];let v;e[42]!==l.tokens?(v=l.tokens===null?"—":l.tokens.toLocaleString(),e[42]=l.tokens,e[43]=v):v=e[43];let N;e[44]!==v?(N=s.jsx(K,{className:"text-sm tabular-nums",children:v}),e[44]=v,e[45]=N):N=e[45];let _;return e[46]!==w||e[47]!==T||e[48]!==S||e[49]!==y||e[50]!==b||e[51]!==c||e[52]!==N||e[53]!==a||e[54]!==h?(_=s.jsxs(fe,{children:[c,a,h,w,T,S,y,b,N]}),e[46]=w,e[47]=T,e[48]=S,e[49]=y,e[50]=b,e[51]=c,e[52]=N,e[53]=a,e[54]=h,e[55]=_):_=e[55],_}function Ye(t){const e=U.c(51),{org:l}=t,r=ee(),[i,m]=z.useState(Q),[o,c]=z.useState(Q),a=i===Q?void 0:i,u=o===Q?void 0:o;let n;e[0]!==l||e[1]!==a||e[2]!==u?(n={org:l,status:a,kind:u,limit:150},e[0]=l,e[1]=a,e[2]=u,e[3]=n):n=e[3];const x=n,{data:d,isLoading:h,error:g}=Ne(x,!0),[p,w]=z.useState(null);let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(oe,{className:"w-[180px]",size:"sm",children:s.jsx(ne,{})}),e[4]=k):k=e[4];let j;e[5]!==r?(j=r("thread.analytics.anyStatus"),e[5]=r,e[6]=j):j=e[6];let T;e[7]!==j?(T=s.jsx(Z,{value:Q,children:j}),e[7]=j,e[8]=T):T=e[8];let L;e[9]!==r?(L=Ke.map(A=>s.jsx(Z,{value:A,children:r(me[A])},A)),e[9]=r,e[10]=L):L=e[10];let S;e[11]!==T||e[12]!==L?(S=s.jsxs(ce,{children:[T,L]}),e[11]=T,e[12]=L,e[13]=S):S=e[13];let y;e[14]!==i||e[15]!==S?(y=s.jsxs(ae,{value:i,onValueChange:m,children:[k,S]}),e[14]=i,e[15]=S,e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(oe,{className:"w-[180px]",size:"sm",children:s.jsx(ne,{})}),e[17]=C):C=e[17];let b;e[18]!==r?(b=r("thread.analytics.anyKind"),e[18]=r,e[19]=b):b=e[19];let v;e[20]!==b?(v=s.jsx(Z,{value:Q,children:b}),e[20]=b,e[21]=v):v=e[21];let N;e[22]!==r?(N=Ue.map(A=>s.jsx(Z,{value:A,children:r(xe[A])},A)),e[22]=r,e[23]=N):N=e[23];let _;e[24]!==v||e[25]!==N?(_=s.jsxs(ce,{children:[v,N]}),e[24]=v,e[25]=N,e[26]=_):_=e[26];let E;e[27]!==o||e[28]!==_?(E=s.jsxs(ae,{value:o,onValueChange:c,children:[C,_]}),e[27]=o,e[28]=_,e[29]=E):E=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("span",{className:"size-2 rounded-full bg-success"}),e[30]=D):D=e[30];let O;e[31]!==r?(O=r("thread.analytics.liveHint"),e[31]=r,e[32]=O):O=e[32];let R;e[33]!==O?(R=s.jsxs("span",{className:"ml-auto flex items-center gap-2 text-xs text-muted-foreground",children:[D,O]}),e[33]=O,e[34]=R):R=e[34];let I;e[35]!==E||e[36]!==R||e[37]!==y?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y,E,R]}),e[35]=E,e[36]=R,e[37]=y,e[38]=I):I=e[38];let $;e[39]!==d||e[40]!==g||e[41]!==h||e[42]!==r?($=h?s.jsx(de,{}):g?s.jsx(he,{message:g.message}):d?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[s.jsx(ie,{label:r("thread.analytics.countRunning"),value:d.counts.running}),s.jsx(ie,{label:r("thread.analytics.countWaiting"),value:d.counts.waiting}),s.jsx(ie,{label:r("thread.analytics.countFailedHour"),value:d.counts.failedLastHour})]}),d.threads.length===0?s.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-muted-foreground",children:r("thread.analytics.empty")}):s.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:s.jsxs(Ae,{children:[s.jsx(we,{children:s.jsxs(fe,{children:[s.jsx(V,{children:r("thread.analytics.colUpdated")}),s.jsx(V,{children:r("thread.analytics.colOrg")}),s.jsx(V,{children:r("thread.analytics.colChat")}),s.jsx(V,{children:r("thread.analytics.colKind")}),s.jsx(V,{children:r("thread.analytics.colStatus")}),s.jsx(V,{children:r("thread.analytics.colUser")}),s.jsx(V,{children:r("thread.analytics.colAgent")}),s.jsx(V,{children:r("thread.analytics.colCost")}),s.jsx(V,{children:r("thread.analytics.colTokens")})]})}),s.jsx(ke,{children:d.threads.map(A=>s.jsx(Fe,{thread:A,onOpen:w},A.id))})]})})]}):null,e[39]=d,e[40]=g,e[41]=h,e[42]=r,e[43]=$):$=e[43];let P;e[44]===Symbol.for("react.memo_cache_sentinel")?(P=()=>w(null),e[44]=P):P=e[44];let B;e[45]!==p?(B=s.jsx(qe,{thread:p,onClose:P}),e[45]=p,e[46]=B):B=e[46];let H;return e[47]!==I||e[48]!==$||e[49]!==B?(H=s.jsxs("div",{className:"flex flex-col gap-6 py-6",children:[I,$,B]}),e[47]=I,e[48]=$,e[49]=B,e[50]=H):H=e[50],H}function Me(t){const e=U.c(14),{thread:l}=t,{org:r,locator:i}=pe();let m;e[0]!==r.id||e[1]!==r.slug?(m={connectionId:ye,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=m):m=e[2];const o=Pe(m),c=Oe(),a=He();let u;e[3]!==l.createdAt||e[4]!==l.id||e[5]!==l.status||e[6]!==l.title?(u={id:l.id,title:l.title,status:l.status,created_at:l.createdAt},e[3]=l.createdAt,e[4]=l.id,e[5]=l.status,e[6]=l.title,e[7]=u):u=e[7];let n;return e[8]!==o||e[9]!==c||e[10]!==i||e[11]!==u||e[12]!==a?(n=s.jsx(De,{thread:u,client:o,locator:i,connections:c,virtualMcps:a,members:void 0,meta:!1}),e[8]=o,e[9]=c,e[10]=i,e[11]=u,e[12]=a,e[13]=n):n=e[13],n}function qe(t){const e=U.c(12),{thread:l,onClose:r}=t,i=ee(),{project:m}=pe(),o=!!l;let c;e[0]!==r?(c=x=>!x&&r(),e[0]=r,e[1]=c):c=e[1];let a;e[2]!==m||e[3]!==i||e[4]!==l?(a=l&&s.jsx(Se,{org:{id:l.orgId,name:l.orgSlug,slug:l.orgSlug,logo:null},project:m,children:s.jsx(z.Suspense,{fallback:s.jsx(Re,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:s.jsx(Ie,{className:"truncate text-sm leading-snug",children:l.title||i("thread.analytics.untitled")})}),children:s.jsx(Me,{thread:l})})}),e[2]=m,e[3]=i,e[4]=l,e[5]=a):a=e[5];let u;e[6]!==a?(u=s.jsx($e,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:a}),e[6]=a,e[7]=u):u=e[7];let n;return e[8]!==o||e[9]!==c||e[10]!==u?(n=s.jsx(Be,{open:o,onOpenChange:c,children:u}),e[8]=o,e[9]=c,e[10]=u,e[11]=n):n=e[11],n}function ue(t){const e=U.c(16),{tool:l,org:r,from:i,to:m}=t,o=ee();let c;e[0]!==i||e[1]!==r||e[2]!==m?(c={org:r,from:i,to:m},e[0]=i,e[1]=r,e[2]=m,e[3]=c):c=e[3];const{data:a,isLoading:u,error:n}=Te(l,c);if(u){let p;return e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(de,{}),e[4]=p):p=e[4],p}if(n){let p;return e[5]!==n.message?(p=s.jsx(he,{message:n.message}),e[5]=n.message,e[6]=p):p=e[6],p}if(!a)return null;let x;e[7]!==a.sections?(x=a.sections.map(Ge),e[7]=a.sections,e[8]=x):x=e[8];let d;e[9]!==o?(d=o("thread.analytics.costFootnote"),e[9]=o,e[10]=d):d=e[10];let h;e[11]!==d?(h=s.jsx("p",{className:"text-xs text-muted-foreground",children:d}),e[11]=d,e[12]=h):h=e[12];let g;return e[13]!==x||e[14]!==h?(g=s.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[x,h]}),e[13]=x,e[14]=h,e[15]=g):g=e[15],g}function Ge(t){return s.jsx(be,{section:t,threadLinks:!0},t.title)}function ul(){const t=U.c(99),e=ee(),l=ge({strict:!1}).org??"",r=ve(),[i,m]=z.useState("all"),[o,c]=z.useState(7),[a,u]=z.useState("live"),[n]=z.useState(Xe);let x;t[0]!==n?(x=new Date(n).toISOString(),t[0]=n,t[1]=x):x=t[1];const d=x;let h;t[2]!==o||t[3]!==n?(h=new Date(n-o*864e5).toISOString(),t[2]=o,t[3]=n,t[4]=h):h=t[4];const g=h;if(r.isLoading){let f;return t[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(se.Content,{children:s.jsx(de,{})}),t[5]=f):f=t[5],f}if(!r.data?.isAdmin){let f;t[6]!==e?(f=e("thread.analytics.notAdmin"),t[6]=e,t[7]=f):f=t[7];let J;return t[8]!==f?(J=s.jsx(se.Content,{children:s.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:f})}),t[8]=f,t[9]=J):J=t[9],J}let p;t[10]!==e?(p=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=p):p=t[11];let w;t[12]!==p?(w={value:"all",label:p},t[12]=p,t[13]=w):w=t[13];let k;t[14]!==e?(k=e("taskBoard.analytics.orgCurrent"),t[14]=e,t[15]=k):k=t[15];let j;t[16]!==l||t[17]!==k?(j={value:l,label:k},t[16]=l,t[17]=k,t[18]=j):j=t[18];let T;if(t[19]!==r.data.orgs||t[20]!==l||t[21]!==w||t[22]!==j){let f;t[24]!==l?(f=J=>J.slug!==l,t[24]=l,t[25]=f):f=t[25],T=[w,j,...r.data.orgs.filter(f).map(We)],t[19]=r.data.orgs,t[20]=l,t[21]=w,t[22]=j,t[23]=T}else T=t[23];const L=T;let S;t[26]!==e?(S=e("thread.analytics.title"),t[26]=e,t[27]=S):S=t[27];let y;t[28]!==S?(y=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:S}),t[28]=S,t[29]=y):y=t[29];let C;t[30]!==e?(C=e("taskBoard.analytics.orgSearch"),t[30]=e,t[31]=C):C=t[31];let b;t[32]!==e?(b=e("taskBoard.analytics.orgEmpty"),t[32]=e,t[33]=b):b=t[33];let v;t[34]!==i||t[35]!==L||t[36]!==b||t[37]!==C?(v=s.jsx(_e,{options:L,value:i,onChange:m,width:"w-[240px]",searchPlaceholder:C,emptyMessage:b}),t[34]=i,t[35]=L,t[36]=b,t[37]=C,t[38]=v):v=t[38];let N;t[39]!==o||t[40]!==e||t[41]!==a?(N=a!=="live"&&s.jsxs(ae,{value:String(o),onValueChange:f=>c(Number(f)),children:[s.jsx(oe,{className:"w-[140px]",size:"sm",children:s.jsx(ne,{})}),s.jsx(ce,{children:Ve.map(f=>s.jsx(Z,{value:String(f),children:e("taskBoard.analytics.rangeDays",{days:String(f)})},f))})]}),t[39]=o,t[40]=e,t[41]=a,t[42]=N):N=t[42];let _;t[43]!==v||t[44]!==N?(_=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[v,N]}),t[43]=v,t[44]=N,t[45]=_):_=t[45];let E;t[46]!==_||t[47]!==y?(E=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y,_]}),t[46]=_,t[47]=y,t[48]=E):E=t[48];let D;t[49]!==i||t[50]!==l||t[51]!==e?(D=i!==l&&s.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:i==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:i})}),t[49]=i,t[50]=l,t[51]=e,t[52]=D):D=t[52];let O;t[53]===Symbol.for("react.memo_cache_sentinel")?(O=f=>u(f),t[53]=O):O=t[53];let R;t[54]!==e?(R=e("thread.analytics.tabLive"),t[54]=e,t[55]=R):R=t[55];let I;t[56]!==R?(I=s.jsx(le,{value:"live",children:R}),t[56]=R,t[57]=I):I=t[57];let $;t[58]!==e?($=e("thread.analytics.tabUsage"),t[58]=e,t[59]=$):$=t[59];let P;t[60]!==$?(P=s.jsx(le,{value:"usage",children:$}),t[60]=$,t[61]=P):P=t[61];let B;t[62]!==e?(B=e("thread.analytics.tabErrors"),t[62]=e,t[63]=B):B=t[63];let H;t[64]!==B?(H=s.jsx(le,{value:"errors",children:B}),t[64]=B,t[65]=H):H=t[65];let A;t[66]!==I||t[67]!==P||t[68]!==H?(A=s.jsxs(Le,{children:[I,P,H]}),t[66]=I,t[67]=P,t[68]=H,t[69]=A):A=t[69];let F;t[70]!==i||t[71]!==a?(F=a==="live"&&s.jsx(Ye,{org:i}),t[70]=i,t[71]=a,t[72]=F):F=t[72];let Y;t[73]!==F?(Y=s.jsx(re,{value:"live",children:F}),t[73]=F,t[74]=Y):Y=t[74];let M;t[75]!==g||t[76]!==i||t[77]!==a||t[78]!==d?(M=a==="usage"&&s.jsx(ue,{tool:"THREAD_ANALYTICS_USAGE",org:i,from:g,to:d}),t[75]=g,t[76]=i,t[77]=a,t[78]=d,t[79]=M):M=t[79];let q;t[80]!==M?(q=s.jsx(re,{value:"usage",children:M}),t[80]=M,t[81]=q):q=t[81];let G;t[82]!==g||t[83]!==i||t[84]!==a||t[85]!==d?(G=a==="errors"&&s.jsx(ue,{tool:"THREAD_ANALYTICS_ERRORS",org:i,from:g,to:d}),t[82]=g,t[83]=i,t[84]=a,t[85]=d,t[86]=G):G=t[86];let W;t[87]!==G?(W=s.jsx(re,{value:"errors",children:G}),t[87]=G,t[88]=W):W=t[88];let X;t[89]!==A||t[90]!==Y||t[91]!==q||t[92]!==W||t[93]!==a?(X=s.jsxs(Ee,{value:a,onValueChange:O,children:[A,Y,q,W]}),t[89]=A,t[90]=Y,t[91]=q,t[92]=W,t[93]=a,t[94]=X):X=t[94];let te;return t[95]!==E||t[96]!==D||t[97]!==X?(te=s.jsx(se.Content,{children:s.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[E,D,X]})})}),t[95]=E,t[96]=D,t[97]=X,t[98]=te):te=t[98],te}function We(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function Xe(){return Date.now()}export{ul as default};
1
+ import{c as U,b as ee,f as ge,r as z,j as s,h as je,X as pe,c2 as Se,z as ye}from"./index-D3VyLkC3.js";import{C as se}from"./index-CcuAAQfR.js";import{S as be}from"./analytics-sections-D61Wwl8L.js";import{u as ve,a as Ne,b as Te}from"./use-thread-analytics-23H9Sh0m.js";import{B as Ce}from"./badge-D10nU5hm.js";import{C as _e}from"./combobox-DfBcz1Tb.js";import{S as ae,b as oe,a as ne,d as ce,c as Z}from"./select-DC4TM20D.js";import{e as Ae,a as we,b as fe,T as V,d as ke,c as K}from"./table-WwEBhzp_.js";import{T as le,a as Le,c as re,b as Ee}from"./tabs-WFH6vPjH.js";import{c as Re,S as Ie,a as $e,b as Be}from"./sheet-gL2l7oL0.js";import{T as De}from"./thread-sheet-body-DbO-EyYS.js";import{u as Oe}from"./use-connection-CDTsUGCD.js";import{u as Pe}from"./use-mcp-client-DjhhnAr3.js";import{b as He}from"./repository-binding-qP9N-2MJ.js";import"./use-mobile-Dd6KUtd1.js";import"./thread-button-CXr1OWYY.js";import"./agent-icon-DebFssce.js";import"./AlertCircle-O5yKT_wD.js";import"./Tool01-TfY7iJsP.js";import"./ArrowUp-BcguyIxa.js";import"./ArrowLeft-Bgwvgp7N.js";import"./LinkBroken01-cRHkOCv3.js";import"./ShoppingBag01-Bn_Ml-RN.js";import"./ZoomOut-Cy6sSJWj.js";import"./Building02-DXskyQyV.js";import"./CheckCircle-B8nBZ9lR.js";import"./Check-BwZg9K6a.js";import"./ChevronUp-XuQjQLoK.js";import"./UserSquare-Cij4gM7j.js";import"./Copy01-YmLU_wow.js";import"./CreditCard01-CwEdzwSq.js";import"./DotsVertical-DEYhHh-q.js";import"./Image01-DFTuvWJV.js";import"./Palette-BLSfhg5D.js";import"./XClose-B1wwChfA.js";import"./Key01-CW5AmBXO.js";import"./Link01-rblrB3OI.js";import"./LinkExternal01-DMr7xmMD.js";import"./Monitor01-DRRgoSgd.js";import"./Sun-JyTPOz6f.js";import"./Plus-B7fu2HeJ.js";import"./SearchMd-DpRsJH0P.js";import"./Trash01-DBoWC6W0.js";import"./Upload01-oBIhuFXz.js";import"./User01-DlDKGoyi.js";import"./Users01-B0qqt-bB.js";import"./X-B1izQ1KV.js";import"./use-chat-layout-state-PWimkJCw.js";import"./use-file-configs-FESoyyAp.js";import"./use-organization-settings-DSuZT_-Z.js";import"./schema-BWuVZGwp.js";import"./task-board-CVGH6XO_.js";import"./site-slug-DebpOoQq.js";import"./thread-route-DKA9bRvS.js";import"./use-panel-navigate-pf_bvwna.js";import"./use-project-scope-B9gl4G0G.js";import"./thread-intent-CXrPEeI-.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-BUwCxmad.js";import"./index-DXhMSpJ7.js";import"./toolbar-icon-button-CJrzg1xS.js";import"./shell-layout-CBc-iFqB.js";import"./avatar-C70_Ki0z.js";import"./download-app-dialog-UTCmHANJ.js";import"./dialog-C_zHR8DK.js";import"./use-clock-tick-DK1jMfPk.js";import"./command-BUcXz1jA.js";import"./index-Djpcf0g3.js";import"./integration-icon-Bo3BUxvM.js";import"./project-icon-BlCsNLWV.js";import"./new-project-dialog-BWolKWvl.js";import"./input-B-l5PYzO.js";import"./label-UBdu3ctU.js";import"./repository-import-picker-BxSMVAOp.js";import"./use-navigate-to-agent-Bbk9KV3t.js";import"./repository-picker-DXcVdbPo.js";import"./useInfiniteQuery-BzCTPJtn.js";import"./infiniteQueryObserver-rGQ-BvZd.js";import"./collection-search-DZ1wZYuR.js";import"./use-debounced-value-Ddzynl8d.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-BXGj5Xuz.js";import"./autosend-BkG_BHpj.js";import"./use-org-sso-DnQOloxF.js";import"./resizable-p0Iz3mjy.js";import"./icon-button-BAAffUhi.js";import"./chart-BkrO3MsD.js";import"./index-CJflvpaj.js";import"./CartesianChart-Dxs56jW8.js";import"./Line-w53GBlC_.js";import"./ErrorBarContext-CoXkTI3v.js";import"./Sector-DUcOKKda.js";import"./XAxis-CxP14qz_.js";import"./popover-DmsBpt35.js";import"./useSuspenseInfiniteQuery-Cx1jk_4I.js";import"./pair-qre124N2.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-CKOvtNeB.js";import"./use-copy-4XQ35auE.js";import"./usage-stats-BZmwl_hY.js";import"./markdown-DgNX2G8Y.js";import"./location-DPIrGNp7.js";import"./org-file-open-context-kIKkchjb.js";import"./use-decopilot-events-Coi59geF.js";import"./chat-context-Crr9YCN0.js";import"./use-ai-providers-OUZLuzjk.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Gi8nuIVZ.js";import"./types-BM02pFks.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-DqqeM3yS.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./use-mcp-prompts-CPGSJM8z.js";import"./index-D-s3ZvIF.js";import"./form-BGxoVGvb.js";import"./use-thread-outputs-CzHRXoWD.js";import"./file-type-icon-D0M-S9U1.js";import"./use-infinite-scroll-BOW8hicV.js";import"./task-status-CLw5rySP.js";import"./auth-CABZOlQ0.js";const Ve=[1,7,30,90],Ke=["in_progress","requires_action","failed","completed"],Ue=["chat","automation","task"],Q="any",me={in_progress:"thread.analytics.statusRunning",requires_action:"thread.analytics.statusWaiting",failed:"thread.analytics.statusFailed",completed:"thread.analytics.statusCompleted"},xe={chat:"thread.analytics.kindChat",automation:"thread.analytics.kindAutomation",task:"thread.analytics.kindTask"},ze={in_progress:"default",requires_action:"warning",failed:"destructive",completed:"secondary"};function de(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function he(t){const e=U.c(2),{message:l}=t;let r;return e[0]!==l?(r=s.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:l}),e[0]=l,e[1]=r):r=e[1],r}function ie(t){const e=U.c(9),{label:l,value:r}=t;let i;e[0]!==l?(i=s.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1];let m;e[2]!==r?(m=r.toLocaleString(),e[2]=r,e[3]=m):m=e[3];let o;e[4]!==m?(o=s.jsx("div",{className:"mt-1 text-2xl font-medium text-foreground tabular-nums",children:m}),e[4]=m,e[5]=o):o=e[5];let c;return e[6]!==i||e[7]!==o?(c=s.jsxs("div",{className:"rounded-lg border border-border p-4",children:[i,o]}),e[6]=i,e[7]=o,e[8]=c):c=e[8],c}function Fe(t){const e=U.c(56),{thread:l,onOpen:r}=t,i=ee(),m=l.status;let o;e[0]!==l.updatedAt?(o=new Date(l.updatedAt).toLocaleString(),e[0]=l.updatedAt,e[1]=o):o=e[1];let c;e[2]!==o?(c=s.jsx(K,{className:"whitespace-nowrap text-sm tabular-nums text-muted-foreground",children:o}),e[2]=o,e[3]=c):c=e[3];let a;e[4]!==l.orgSlug?(a=s.jsx(K,{className:"text-sm",children:l.orgSlug}),e[4]=l.orgSlug,e[5]=a):a=e[5];let u;e[6]!==r||e[7]!==l?(u=()=>r(l),e[6]=r,e[7]=l,e[8]=u):u=e[8];let n;e[9]!==i||e[10]!==l.title?(n=l.title||i("thread.analytics.untitled"),e[9]=i,e[10]=l.title,e[11]=n):n=e[11];let x;e[12]!==u||e[13]!==n?(x=s.jsx("button",{type:"button",onClick:u,className:"block max-w-full truncate text-left text-foreground underline-offset-2 hover:underline",children:n}),e[12]=u,e[13]=n,e[14]=x):x=e[14];let d;e[15]!==l.failureReason||e[16]!==l.lastError||e[17]!==l.status?(d=l.status==="failed"&&(l.lastError||l.failureReason)&&s.jsx("div",{className:"truncate text-xs text-destructive",children:l.lastError??l.failureReason}),e[15]=l.failureReason,e[16]=l.lastError,e[17]=l.status,e[18]=d):d=e[18];let h;e[19]!==x||e[20]!==d?(h=s.jsxs(K,{className:"max-w-sm text-sm",children:[x,d]}),e[19]=x,e[20]=d,e[21]=h):h=e[21];const g=xe[l.kind];let p;e[22]!==i||e[23]!==g?(p=i(g),e[22]=i,e[23]=g,e[24]=p):p=e[24];let w;e[25]!==p?(w=s.jsx(K,{className:"text-sm",children:p}),e[25]=p,e[26]=w):w=e[26];const k=ze[m]??"outline";let j;e[27]!==m||e[28]!==i||e[29]!==l.status?(j=me[m]?i(me[m]):l.status,e[27]=m,e[28]=i,e[29]=l.status,e[30]=j):j=e[30];let T;e[31]!==k||e[32]!==j?(T=s.jsx(K,{children:s.jsx(Ce,{variant:k,children:j})}),e[31]=k,e[32]=j,e[33]=T):T=e[33];const L=l.userEmail??l.userName??"—";let S;e[34]!==L?(S=s.jsx(K,{className:"max-w-48 truncate text-sm",children:L}),e[34]=L,e[35]=S):S=e[35];let y;e[36]!==l.agent?(y=s.jsx(K,{className:"max-w-48 truncate text-sm",children:l.agent}),e[36]=l.agent,e[37]=y):y=e[37];let C;e[38]!==l.usd?(C=l.usd===null?"—":`$${l.usd.toFixed(2)}`,e[38]=l.usd,e[39]=C):C=e[39];let b;e[40]!==C?(b=s.jsx(K,{className:"text-sm tabular-nums",children:C}),e[40]=C,e[41]=b):b=e[41];let v;e[42]!==l.tokens?(v=l.tokens===null?"—":l.tokens.toLocaleString(),e[42]=l.tokens,e[43]=v):v=e[43];let N;e[44]!==v?(N=s.jsx(K,{className:"text-sm tabular-nums",children:v}),e[44]=v,e[45]=N):N=e[45];let _;return e[46]!==w||e[47]!==T||e[48]!==S||e[49]!==y||e[50]!==b||e[51]!==c||e[52]!==N||e[53]!==a||e[54]!==h?(_=s.jsxs(fe,{children:[c,a,h,w,T,S,y,b,N]}),e[46]=w,e[47]=T,e[48]=S,e[49]=y,e[50]=b,e[51]=c,e[52]=N,e[53]=a,e[54]=h,e[55]=_):_=e[55],_}function Ye(t){const e=U.c(51),{org:l}=t,r=ee(),[i,m]=z.useState(Q),[o,c]=z.useState(Q),a=i===Q?void 0:i,u=o===Q?void 0:o;let n;e[0]!==l||e[1]!==a||e[2]!==u?(n={org:l,status:a,kind:u,limit:150},e[0]=l,e[1]=a,e[2]=u,e[3]=n):n=e[3];const x=n,{data:d,isLoading:h,error:g}=Ne(x,!0),[p,w]=z.useState(null);let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(oe,{className:"w-[180px]",size:"sm",children:s.jsx(ne,{})}),e[4]=k):k=e[4];let j;e[5]!==r?(j=r("thread.analytics.anyStatus"),e[5]=r,e[6]=j):j=e[6];let T;e[7]!==j?(T=s.jsx(Z,{value:Q,children:j}),e[7]=j,e[8]=T):T=e[8];let L;e[9]!==r?(L=Ke.map(A=>s.jsx(Z,{value:A,children:r(me[A])},A)),e[9]=r,e[10]=L):L=e[10];let S;e[11]!==T||e[12]!==L?(S=s.jsxs(ce,{children:[T,L]}),e[11]=T,e[12]=L,e[13]=S):S=e[13];let y;e[14]!==i||e[15]!==S?(y=s.jsxs(ae,{value:i,onValueChange:m,children:[k,S]}),e[14]=i,e[15]=S,e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(oe,{className:"w-[180px]",size:"sm",children:s.jsx(ne,{})}),e[17]=C):C=e[17];let b;e[18]!==r?(b=r("thread.analytics.anyKind"),e[18]=r,e[19]=b):b=e[19];let v;e[20]!==b?(v=s.jsx(Z,{value:Q,children:b}),e[20]=b,e[21]=v):v=e[21];let N;e[22]!==r?(N=Ue.map(A=>s.jsx(Z,{value:A,children:r(xe[A])},A)),e[22]=r,e[23]=N):N=e[23];let _;e[24]!==v||e[25]!==N?(_=s.jsxs(ce,{children:[v,N]}),e[24]=v,e[25]=N,e[26]=_):_=e[26];let E;e[27]!==o||e[28]!==_?(E=s.jsxs(ae,{value:o,onValueChange:c,children:[C,_]}),e[27]=o,e[28]=_,e[29]=E):E=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("span",{className:"size-2 rounded-full bg-success"}),e[30]=D):D=e[30];let O;e[31]!==r?(O=r("thread.analytics.liveHint"),e[31]=r,e[32]=O):O=e[32];let R;e[33]!==O?(R=s.jsxs("span",{className:"ml-auto flex items-center gap-2 text-xs text-muted-foreground",children:[D,O]}),e[33]=O,e[34]=R):R=e[34];let I;e[35]!==E||e[36]!==R||e[37]!==y?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y,E,R]}),e[35]=E,e[36]=R,e[37]=y,e[38]=I):I=e[38];let $;e[39]!==d||e[40]!==g||e[41]!==h||e[42]!==r?($=h?s.jsx(de,{}):g?s.jsx(he,{message:g.message}):d?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[s.jsx(ie,{label:r("thread.analytics.countRunning"),value:d.counts.running}),s.jsx(ie,{label:r("thread.analytics.countWaiting"),value:d.counts.waiting}),s.jsx(ie,{label:r("thread.analytics.countFailedHour"),value:d.counts.failedLastHour})]}),d.threads.length===0?s.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-muted-foreground",children:r("thread.analytics.empty")}):s.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:s.jsxs(Ae,{children:[s.jsx(we,{children:s.jsxs(fe,{children:[s.jsx(V,{children:r("thread.analytics.colUpdated")}),s.jsx(V,{children:r("thread.analytics.colOrg")}),s.jsx(V,{children:r("thread.analytics.colChat")}),s.jsx(V,{children:r("thread.analytics.colKind")}),s.jsx(V,{children:r("thread.analytics.colStatus")}),s.jsx(V,{children:r("thread.analytics.colUser")}),s.jsx(V,{children:r("thread.analytics.colAgent")}),s.jsx(V,{children:r("thread.analytics.colCost")}),s.jsx(V,{children:r("thread.analytics.colTokens")})]})}),s.jsx(ke,{children:d.threads.map(A=>s.jsx(Fe,{thread:A,onOpen:w},A.id))})]})})]}):null,e[39]=d,e[40]=g,e[41]=h,e[42]=r,e[43]=$):$=e[43];let P;e[44]===Symbol.for("react.memo_cache_sentinel")?(P=()=>w(null),e[44]=P):P=e[44];let B;e[45]!==p?(B=s.jsx(qe,{thread:p,onClose:P}),e[45]=p,e[46]=B):B=e[46];let H;return e[47]!==I||e[48]!==$||e[49]!==B?(H=s.jsxs("div",{className:"flex flex-col gap-6 py-6",children:[I,$,B]}),e[47]=I,e[48]=$,e[49]=B,e[50]=H):H=e[50],H}function Me(t){const e=U.c(14),{thread:l}=t,{org:r,locator:i}=pe();let m;e[0]!==r.id||e[1]!==r.slug?(m={connectionId:ye,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=m):m=e[2];const o=Pe(m),c=Oe(),a=He();let u;e[3]!==l.createdAt||e[4]!==l.id||e[5]!==l.status||e[6]!==l.title?(u={id:l.id,title:l.title,status:l.status,created_at:l.createdAt},e[3]=l.createdAt,e[4]=l.id,e[5]=l.status,e[6]=l.title,e[7]=u):u=e[7];let n;return e[8]!==o||e[9]!==c||e[10]!==i||e[11]!==u||e[12]!==a?(n=s.jsx(De,{thread:u,client:o,locator:i,connections:c,virtualMcps:a,members:void 0,meta:!1}),e[8]=o,e[9]=c,e[10]=i,e[11]=u,e[12]=a,e[13]=n):n=e[13],n}function qe(t){const e=U.c(12),{thread:l,onClose:r}=t,i=ee(),{project:m}=pe(),o=!!l;let c;e[0]!==r?(c=x=>!x&&r(),e[0]=r,e[1]=c):c=e[1];let a;e[2]!==m||e[3]!==i||e[4]!==l?(a=l&&s.jsx(Se,{org:{id:l.orgId,name:l.orgSlug,slug:l.orgSlug,logo:null},project:m,children:s.jsx(z.Suspense,{fallback:s.jsx(Re,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:s.jsx(Ie,{className:"truncate text-sm leading-snug",children:l.title||i("thread.analytics.untitled")})}),children:s.jsx(Me,{thread:l})})}),e[2]=m,e[3]=i,e[4]=l,e[5]=a):a=e[5];let u;e[6]!==a?(u=s.jsx($e,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:a}),e[6]=a,e[7]=u):u=e[7];let n;return e[8]!==o||e[9]!==c||e[10]!==u?(n=s.jsx(Be,{open:o,onOpenChange:c,children:u}),e[8]=o,e[9]=c,e[10]=u,e[11]=n):n=e[11],n}function ue(t){const e=U.c(16),{tool:l,org:r,from:i,to:m}=t,o=ee();let c;e[0]!==i||e[1]!==r||e[2]!==m?(c={org:r,from:i,to:m},e[0]=i,e[1]=r,e[2]=m,e[3]=c):c=e[3];const{data:a,isLoading:u,error:n}=Te(l,c);if(u){let p;return e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(de,{}),e[4]=p):p=e[4],p}if(n){let p;return e[5]!==n.message?(p=s.jsx(he,{message:n.message}),e[5]=n.message,e[6]=p):p=e[6],p}if(!a)return null;let x;e[7]!==a.sections?(x=a.sections.map(Ge),e[7]=a.sections,e[8]=x):x=e[8];let d;e[9]!==o?(d=o("thread.analytics.costFootnote"),e[9]=o,e[10]=d):d=e[10];let h;e[11]!==d?(h=s.jsx("p",{className:"text-xs text-muted-foreground",children:d}),e[11]=d,e[12]=h):h=e[12];let g;return e[13]!==x||e[14]!==h?(g=s.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[x,h]}),e[13]=x,e[14]=h,e[15]=g):g=e[15],g}function Ge(t){return s.jsx(be,{section:t,threadLinks:!0},t.title)}function ul(){const t=U.c(99),e=ee(),l=ge({strict:!1}).org??"",r=ve(),[i,m]=z.useState("all"),[o,c]=z.useState(7),[a,u]=z.useState("live"),[n]=z.useState(Xe);let x;t[0]!==n?(x=new Date(n).toISOString(),t[0]=n,t[1]=x):x=t[1];const d=x;let h;t[2]!==o||t[3]!==n?(h=new Date(n-o*864e5).toISOString(),t[2]=o,t[3]=n,t[4]=h):h=t[4];const g=h;if(r.isLoading){let f;return t[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(se.Content,{children:s.jsx(de,{})}),t[5]=f):f=t[5],f}if(!r.data?.isAdmin){let f;t[6]!==e?(f=e("thread.analytics.notAdmin"),t[6]=e,t[7]=f):f=t[7];let J;return t[8]!==f?(J=s.jsx(se.Content,{children:s.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:f})}),t[8]=f,t[9]=J):J=t[9],J}let p;t[10]!==e?(p=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=p):p=t[11];let w;t[12]!==p?(w={value:"all",label:p},t[12]=p,t[13]=w):w=t[13];let k;t[14]!==e?(k=e("taskBoard.analytics.orgCurrent"),t[14]=e,t[15]=k):k=t[15];let j;t[16]!==l||t[17]!==k?(j={value:l,label:k},t[16]=l,t[17]=k,t[18]=j):j=t[18];let T;if(t[19]!==r.data.orgs||t[20]!==l||t[21]!==w||t[22]!==j){let f;t[24]!==l?(f=J=>J.slug!==l,t[24]=l,t[25]=f):f=t[25],T=[w,j,...r.data.orgs.filter(f).map(We)],t[19]=r.data.orgs,t[20]=l,t[21]=w,t[22]=j,t[23]=T}else T=t[23];const L=T;let S;t[26]!==e?(S=e("thread.analytics.title"),t[26]=e,t[27]=S):S=t[27];let y;t[28]!==S?(y=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:S}),t[28]=S,t[29]=y):y=t[29];let C;t[30]!==e?(C=e("taskBoard.analytics.orgSearch"),t[30]=e,t[31]=C):C=t[31];let b;t[32]!==e?(b=e("taskBoard.analytics.orgEmpty"),t[32]=e,t[33]=b):b=t[33];let v;t[34]!==i||t[35]!==L||t[36]!==b||t[37]!==C?(v=s.jsx(_e,{options:L,value:i,onChange:m,width:"w-[240px]",searchPlaceholder:C,emptyMessage:b}),t[34]=i,t[35]=L,t[36]=b,t[37]=C,t[38]=v):v=t[38];let N;t[39]!==o||t[40]!==e||t[41]!==a?(N=a!=="live"&&s.jsxs(ae,{value:String(o),onValueChange:f=>c(Number(f)),children:[s.jsx(oe,{className:"w-[140px]",size:"sm",children:s.jsx(ne,{})}),s.jsx(ce,{children:Ve.map(f=>s.jsx(Z,{value:String(f),children:e("taskBoard.analytics.rangeDays",{days:String(f)})},f))})]}),t[39]=o,t[40]=e,t[41]=a,t[42]=N):N=t[42];let _;t[43]!==v||t[44]!==N?(_=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[v,N]}),t[43]=v,t[44]=N,t[45]=_):_=t[45];let E;t[46]!==_||t[47]!==y?(E=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y,_]}),t[46]=_,t[47]=y,t[48]=E):E=t[48];let D;t[49]!==i||t[50]!==l||t[51]!==e?(D=i!==l&&s.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:i==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:i})}),t[49]=i,t[50]=l,t[51]=e,t[52]=D):D=t[52];let O;t[53]===Symbol.for("react.memo_cache_sentinel")?(O=f=>u(f),t[53]=O):O=t[53];let R;t[54]!==e?(R=e("thread.analytics.tabLive"),t[54]=e,t[55]=R):R=t[55];let I;t[56]!==R?(I=s.jsx(le,{value:"live",children:R}),t[56]=R,t[57]=I):I=t[57];let $;t[58]!==e?($=e("thread.analytics.tabUsage"),t[58]=e,t[59]=$):$=t[59];let P;t[60]!==$?(P=s.jsx(le,{value:"usage",children:$}),t[60]=$,t[61]=P):P=t[61];let B;t[62]!==e?(B=e("thread.analytics.tabErrors"),t[62]=e,t[63]=B):B=t[63];let H;t[64]!==B?(H=s.jsx(le,{value:"errors",children:B}),t[64]=B,t[65]=H):H=t[65];let A;t[66]!==I||t[67]!==P||t[68]!==H?(A=s.jsxs(Le,{children:[I,P,H]}),t[66]=I,t[67]=P,t[68]=H,t[69]=A):A=t[69];let F;t[70]!==i||t[71]!==a?(F=a==="live"&&s.jsx(Ye,{org:i}),t[70]=i,t[71]=a,t[72]=F):F=t[72];let Y;t[73]!==F?(Y=s.jsx(re,{value:"live",children:F}),t[73]=F,t[74]=Y):Y=t[74];let M;t[75]!==g||t[76]!==i||t[77]!==a||t[78]!==d?(M=a==="usage"&&s.jsx(ue,{tool:"THREAD_ANALYTICS_USAGE",org:i,from:g,to:d}),t[75]=g,t[76]=i,t[77]=a,t[78]=d,t[79]=M):M=t[79];let q;t[80]!==M?(q=s.jsx(re,{value:"usage",children:M}),t[80]=M,t[81]=q):q=t[81];let G;t[82]!==g||t[83]!==i||t[84]!==a||t[85]!==d?(G=a==="errors"&&s.jsx(ue,{tool:"THREAD_ANALYTICS_ERRORS",org:i,from:g,to:d}),t[82]=g,t[83]=i,t[84]=a,t[85]=d,t[86]=G):G=t[86];let W;t[87]!==G?(W=s.jsx(re,{value:"errors",children:G}),t[87]=G,t[88]=W):W=t[88];let X;t[89]!==A||t[90]!==Y||t[91]!==q||t[92]!==W||t[93]!==a?(X=s.jsxs(Ee,{value:a,onValueChange:O,children:[A,Y,q,W]}),t[89]=A,t[90]=Y,t[91]=q,t[92]=W,t[93]=a,t[94]=X):X=t[94];let te;return t[95]!==E||t[96]!==D||t[97]!==X?(te=s.jsx(se.Content,{children:s.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[E,D,X]})})}),t[95]=E,t[96]=D,t[97]=X,t[98]=te):te=t[98],te}function We(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function Xe(){return Date.now()}export{ul as default};