decocms 4.455.0 → 4.455.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/dist/client/assets/{AlertCircle-BOPAUEgU.js → AlertCircle-SZjuoMGZ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CJHdSsRl.js → AreaChart-ezLCE2QB.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DGlO1CKr.js → ArrowLeft-BgUASx7T.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-Duh-8Vv0.js → ArrowUp-CwQ1Q4VU.js} +1 -1
  5. package/dist/client/assets/{Building02-D_rXBsfQ.js → Building02-Dl4T9LNW.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-DIS9sPOp.js → CartesianChart-CojVOGED.js} +1 -1
  7. package/dist/client/assets/{Check-CcPSzxsY.js → Check-BmlrCmw2.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-CxJ9MBI3.js → CheckCircle-DgPqabhN.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-C9klasvw.js → ChevronUp-6u3SxMoQ.js} +1 -1
  10. package/dist/client/assets/{Copy01-ByHdq7k3.js → Copy01-CkifUnly.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-D7Ll8vXp.js → CreditCard01-K1-aiN4b.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CXVrXTYw.js → DotsVertical-DmnxoC5N.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-D4SFBJLe.js → ErrorBarContext-BaefuZVc.js} +1 -1
  14. package/dist/client/assets/{Image01-DAe5wd3u.js → Image01-0yU0yxN3.js} +1 -1
  15. package/dist/client/assets/{Key01-Dje7twgn.js → Key01-CUdVlBTP.js} +1 -1
  16. package/dist/client/assets/{Line-p8cNw9wz.js → Line-D6mMu8nu.js} +1 -1
  17. package/dist/client/assets/{Link01-BFa5_pnw.js → Link01-7z-hjzg6.js} +1 -1
  18. package/dist/client/assets/{LinkBroken01-BQ3rvf4O.js → LinkBroken01-Br_uH__F.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-ChFFafWR.js → LinkExternal01-DvsbzHx1.js} +1 -1
  20. package/dist/client/assets/{Monitor01-tvCvi4o_.js → Monitor01-DQFu-UId.js} +1 -1
  21. package/dist/client/assets/{Palette-BFtTwWPg.js → Palette-TILTwgWi.js} +1 -1
  22. package/dist/client/assets/{Plus-Dk5G0eGJ.js → Plus-Cn427okX.js} +1 -1
  23. package/dist/client/assets/{SearchMd-DJptVqPP.js → SearchMd-Pjthnah9.js} +1 -1
  24. package/dist/client/assets/{Sector-CoYmht1l.js → Sector-Xhgx4JKP.js} +1 -1
  25. package/dist/client/assets/{ShoppingBag01-mUPmqGRd.js → ShoppingBag01-b6nsxdpv.js} +1 -1
  26. package/dist/client/assets/{Sun-Bl8Ky_if.js → Sun-CJnoMxxW.js} +1 -1
  27. package/dist/client/assets/{Tool01-CGCC9pfF.js → Tool01-bUbUk8P7.js} +1 -1
  28. package/dist/client/assets/{Trash01-BA-bFjuS.js → Trash01-CuygCR6g.js} +1 -1
  29. package/dist/client/assets/{Upload01-C13aB89v.js → Upload01-XLRbUIeR.js} +1 -1
  30. package/dist/client/assets/{User01-B42bcRzQ.js → User01-CVYpMQND.js} +1 -1
  31. package/dist/client/assets/{UserSquare-B6-k4uk5.js → UserSquare-COhFlYGn.js} +1 -1
  32. package/dist/client/assets/{Users01-BmXeKAri.js → Users01-pRhNWrqE.js} +1 -1
  33. package/dist/client/assets/{X-BdtW9stL.js → X-C5Ha4Ozq.js} +1 -1
  34. package/dist/client/assets/{XAxis-G213xRid.js → XAxis-BHJE6EzV.js} +1 -1
  35. package/dist/client/assets/{XClose-Bsj_jKUE.js → XClose-KiYAVi9i.js} +1 -1
  36. package/dist/client/assets/{ZoomOut-BQf_lYpX.js → ZoomOut-FmWelmyS.js} +1 -1
  37. package/dist/client/assets/{access-gate-BtTwTt-9.js → access-gate-jiNu9DZN.js} +1 -1
  38. package/dist/client/assets/{add-connection-dialog-CwnC8yt-.js → add-connection-dialog-GjKD1wTC.js} +1 -1
  39. package/dist/client/assets/{agent-analytics-CPj4bxgs.js → agent-analytics-BeJKrtcQ.js} +1 -1
  40. package/dist/client/assets/agent-app-Do5ejS2P.js +1 -0
  41. package/dist/client/assets/{agent-assets-D5PkhLx3.js → agent-assets-DiAZ_mWn.js} +1 -1
  42. package/dist/client/assets/{agent-automation-Cd6QYcZt.js → agent-automation-CrHxUPPr.js} +1 -1
  43. package/dist/client/assets/{agent-automations-WUChl97S.js → agent-automations-CuCVxPFr.js} +1 -1
  44. package/dist/client/assets/{agent-connect-sources-BTKe88uu.js → agent-connect-sources-GeY0E65Q.js} +1 -1
  45. package/dist/client/assets/agent-deck-CxzsNhg0.js +1 -0
  46. package/dist/client/assets/{agent-e2e-D92Tz-G3.js → agent-e2e-DZ7uBNEc.js} +1 -1
  47. package/dist/client/assets/{agent-experiments-B5NLiDa9.js → agent-experiments-UwQT4D0C.js} +1 -1
  48. package/dist/client/assets/{agent-file-BlaR5see.js → agent-file-Ce07C-Ee.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-CoW01d6P.js → agent-hosting-DnoFF3km.js} +1 -1
  50. package/dist/client/assets/{agent-icon-QobcC4y1.js → agent-icon-Cy4Knhmf.js} +1 -1
  51. package/dist/client/assets/agent-library-JYcPcTMu.js +1 -0
  52. package/dist/client/assets/agent-library-file-D3Jksi3M.js +1 -0
  53. package/dist/client/assets/{agent-monitor-B-qOXS0c.js → agent-monitor-C43eVtFQ.js} +1 -1
  54. package/dist/client/assets/{agent-overview-CLWCQeaZ.js → agent-overview-vIXC5G1N.js} +1 -1
  55. package/dist/client/assets/agent-settings-Cfyz43YR.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-DFNItXi0.js → agent-site-editor-D0zVo-Vf.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-ILiFF32S.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-DeSoO3Vu.js → agent-site-editor-content-4dMPOtfn.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-BQKa6vcQ.js → agent-site-editor-preview-BiJ7TdOp.js} +3 -3
  60. package/dist/client/assets/agent-view-BkydMMwW.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-BggSlJ4I.js → agent-view-guard-D5KfTxlv.js} +1 -1
  62. package/dist/client/assets/{agents-list-Ckh7S6i4.js → agents-list-AbKO_jsf.js} +1 -1
  63. package/dist/client/assets/{ai-providers-KNbVRi9R.js → ai-providers-D1Du1MXh.js} +1 -1
  64. package/dist/client/assets/{alert-dialog-13GPwGkk.js → alert-dialog-BNhkZQ_x.js} +1 -1
  65. package/dist/client/assets/{alert-BZ6uRdL8.js → alert-mIYni7ha.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-C4iGKBOV.js → analytics-sections-Bg673VR8.js} +1 -1
  67. package/dist/client/assets/{api-keys-Btl9HmTY.js → api-keys-Cr3l0gpB.js} +1 -1
  68. package/dist/client/assets/api-keys-DdRKMXqU.js +1 -0
  69. package/dist/client/assets/app-editor-COtME4c7.js +1 -0
  70. package/dist/client/assets/{asset-utils-B4wnf4gp.js → asset-utils-B80sbnEy.js} +1 -1
  71. package/dist/client/assets/{auth-BMIwdKU8.js → auth-Bj6m-efj.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-CsvXshlN.js → auth-catchall-D4Dz-fGV.js} +1 -1
  73. package/dist/client/assets/{auth-entry-BuNH69Nv.js → auth-entry-CF8efX0d.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-rkoJUdAV.js → auth-split-layout-CRqrdELw.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-DWogyy0B.js → authenticate-and-persist-oauth-BWVpVcAz.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-db5LJ5pV.js → automation-list-row-a-sDX1L7.js} +1 -1
  77. package/dist/client/assets/{automation-runs-_74LLZTB.js → automation-runs-Be2AhhQU.js} +1 -1
  78. package/dist/client/assets/{automations-qyXzvoeZ.js → automations-BIY-zWGm.js} +1 -1
  79. package/dist/client/assets/{autosend-B5Obavo-.js → autosend-Bo0qMh1p.js} +1 -1
  80. package/dist/client/assets/{avatar-Bpp_lL_f.js → avatar-s9hDkne5.js} +1 -1
  81. package/dist/client/assets/{badge-DTNkOzY0.js → badge-BbvQ8-kh.js} +1 -1
  82. package/dist/client/assets/{block-document-BLOu51_T.js → block-document-DF2zCbSa.js} +1 -1
  83. package/dist/client/assets/{blocks-preview-workspace-context-BmjkHogK.js → blocks-preview-workspace-context-C9Q4VcWA.js} +1 -1
  84. package/dist/client/assets/{blog-schema-B4_qQgjF.js → blog-schema-CsdFUd69.js} +1 -1
  85. package/dist/client/assets/{buckets-CCNSYAgt.js → buckets-BVpQmWhs.js} +1 -1
  86. package/dist/client/assets/{build-improve-prompt-doc-oJt1CVIT.js → build-improve-prompt-doc-DTV8byFL.js} +1 -1
  87. package/dist/client/assets/{calendar-BRUBvVES.js → calendar-DJKbaXkW.js} +1 -1
  88. package/dist/client/assets/{capability-load-error-th8zEGOp.js → capability-load-error-DToq0UrY.js} +1 -1
  89. package/dist/client/assets/{category-editor-CRqB5ots.js → category-editor-B8R6lxvV.js} +1 -1
  90. package/dist/client/assets/{chart-DBFqaeAD.js → chart-DXNUc0Wn.js} +1 -1
  91. package/dist/client/assets/{chat-context-BHWxNMFT.js → chat-context-DVCvFwd3.js} +1 -1
  92. package/dist/client/assets/{chat-draft-SnGEiSWm.js → chat-draft-CJgB-tPy.js} +1 -1
  93. package/dist/client/assets/{checkbox-DuccoC4e.js → checkbox-DUCWAAon.js} +1 -1
  94. package/dist/client/assets/{choose-editor-Blu_E7S8.js → choose-editor-lgVz_Mxm.js} +1 -1
  95. package/dist/client/assets/{claim-phase-copy-J9IiJiw_.js → claim-phase-copy-yqhsaXjf.js} +1 -1
  96. package/dist/client/assets/{cli-auth-success-g5vIj6jD.js → cli-auth-success-DwgBWIew.js} +1 -1
  97. package/dist/client/assets/{client-icons-ByIvBqps.js → client-icons-DmzJtt6h.js} +1 -1
  98. package/dist/client/assets/{collapsible-qdaAxaaw.js → collapsible-BhnvXHYQ.js} +1 -1
  99. package/dist/client/assets/{collection-detail-CRpVPceB.js → collection-detail-DTU4uoSg.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-CAE4H1Z5.js → collection-display-button-kGszYmIr.js} +1 -1
  101. package/dist/client/assets/{collection-search-BG7vK4NS.js → collection-search-BXjiZfAv.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-C-F_T5Eb.js → collection-table-wrapper-DdfR_Ktb.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-DrZNeSEC.js → collection-tabs-BulYWegd.js} +1 -1
  104. package/dist/client/assets/{column-rules-C1VVvSzv.js → column-rules-BIwgwIU8.js} +1 -1
  105. package/dist/client/assets/{combobox-B0tRCuGZ.js → combobox-kDUiEF-N.js} +1 -1
  106. package/dist/client/assets/{command-D4xFqyr9.js → command-8n8txvgK.js} +1 -1
  107. package/dist/client/assets/{companion-mcps-section-Cz5vCHft.js → companion-mcps-section-1uHuucoN.js} +1 -1
  108. package/dist/client/assets/{config-DPczwNxh.js → config-CV4o64fo.js} +1 -1
  109. package/dist/client/assets/{connect-pk9RQf7E.js → connect-BAQqdM6H.js} +1 -1
  110. package/dist/client/assets/{connect-layout-B5AnMnce.js → connect-layout-BpNxIzne.js} +1 -1
  111. package/dist/client/assets/{connection-BBVDOaSM.js → connection-MWqOhcq1.js} +1 -1
  112. package/dist/client/assets/{connection-card-D1TMmLIT.js → connection-card-BqicHzqi.js} +1 -1
  113. package/dist/client/assets/{connection-detail-DQ776dHS.js → connection-detail-BPnXf2m6.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-CFQwZ1sv.js → connection-form-helpers-c3p1hlVt.js} +1 -1
  115. package/dist/client/assets/{connections-D5_-1i7h.js → connections-y97m_u9F.js} +1 -1
  116. package/dist/client/assets/{context-BzZmRn5A.js → context-D0fXSS45.js} +1 -1
  117. package/dist/client/assets/{context-menu-Dt0_Wi5C.js → context-menu-Cms7vHsB.js} +1 -1
  118. package/dist/client/assets/{create-organization-dialog-SVvYPMqI.js → create-organization-dialog-DV81cdD7.js} +1 -1
  119. package/dist/client/assets/{daily-pulse-Dy2ScJNC.js → daily-pulse-BBf1JfuT.js} +1 -1
  120. package/dist/client/assets/{decopilot-Bh5nOuj8.js → decopilot-YF_T6wlZ.js} +1 -1
  121. package/dist/client/assets/{device-hint-BWrI1ZAV.js → device-hint-nzQNoBun.js} +1 -1
  122. package/dist/client/assets/{dialog-CwJ0Tacd.js → dialog-BI1xJ9QE.js} +1 -1
  123. package/dist/client/assets/{discover-BN5fZmxX.js → discover-BI727LpY.js} +1 -1
  124. package/dist/client/assets/{domain-settings-C0ggYD-b.js → domain-settings-BKNUQKjc.js} +1 -1
  125. package/dist/client/assets/{download-app-dialog-BlTQi4L1.js → download-app-dialog-D_tAj3wC.js} +1 -1
  126. package/dist/client/assets/{drawer-LGekY388.js → drawer-C_V65MTv.js} +1 -1
  127. package/dist/client/assets/{editor-DIJFF-Rn.js → editor-MmTYGWbR.js} +1 -1
  128. package/dist/client/assets/{empty-state-DdDKihxt.js → empty-state-CcAOCIdu.js} +1 -1
  129. package/dist/client/assets/{empty-state-Db66egMr.js → empty-state-DdqIwUzh.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-BZKTCWVm.js → extract-connection-data-BphfLFqb.js} +1 -1
  131. package/dist/client/assets/{feature-gate-DIpT85T7.js → feature-gate-B_eK5iBD.js} +1 -1
  132. package/dist/client/assets/{feature-paywall--RganMza.js → feature-paywall-DWdxE8g5.js} +1 -1
  133. package/dist/client/assets/{file-explorer-B0caqImY.js → file-explorer-C0x2mX1a.js} +1 -1
  134. package/dist/client/assets/{file-preview-BVUwkvqy.js → file-preview-DraufLN1.js} +1 -1
  135. package/dist/client/assets/{file-share-button-Dfx-yCi-.js → file-share-button-nm9-puhb.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-CYHSeMg9.js → file-type-icon---8xc9A3.js} +1 -1
  137. package/dist/client/assets/flat-project-DSx6ncsS.js +1 -0
  138. package/dist/client/assets/{folder-icon-Bz05bjxQ.js → folder-icon-BKl95mgA.js} +1 -1
  139. package/dist/client/assets/{form-DXEENu_8.js → form-DBZy3h_k.js} +1 -1
  140. package/dist/client/assets/{gateway-client-DafKkh5Q.js → gateway-client-DLwMoVSk.js} +1 -1
  141. package/dist/client/assets/{general-P5nYRAWt.js → general-JozDjOAF.js} +1 -1
  142. package/dist/client/assets/{home-C9qFKdi5.js → home-D816nm29.js} +1 -1
  143. package/dist/client/assets/{icon-button-c-SlONOU.js → icon-button-DJOiw-b_.js} +1 -1
  144. package/dist/client/assets/{index-CaP5SDB2.js → index-83q9Ewq1.js} +1 -1
  145. package/dist/client/assets/{index-ZDbB-PVr.js → index-BBLsGP5X.js} +1 -1
  146. package/dist/client/assets/{index-Dl3JXElC.js → index-BHxlMSIR.js} +1 -1
  147. package/dist/client/assets/{index-txkdKzZ6.js → index-B_hHkWjN.js} +1 -1
  148. package/dist/client/assets/{index-KD5FDUeP.js → index-BlUUh9y1.js} +1 -1
  149. package/dist/client/assets/{index-0glLJTM3.js → index-BnsOjLj5.js} +1 -1
  150. package/dist/client/assets/{index-D9bgHbh-.js → index-By8xil-d.js} +1 -1
  151. package/dist/client/assets/{index-DK7oXPIL.js → index-CS9Lxig6.js} +1 -1
  152. package/dist/client/assets/{index-mRG9os_M.js → index-CTTDNGFi.js} +1 -1
  153. package/dist/client/assets/{index-Ccz5AaI_.js → index-Co0BO1QR.js} +1 -1
  154. package/dist/client/assets/{index-DGWe6sla.js → index-D7YVnT5y.js} +1 -1
  155. package/dist/client/assets/{index-ehY3MQSN.js → index-DROc98p5.js} +3 -3
  156. package/dist/client/assets/{index-BOGZM7Pw.js → index-OBKgoLrS.js} +3 -3
  157. package/dist/client/assets/{index-DlDzsxeJ.js → index-nLAjrXPh.js} +1 -1
  158. package/dist/client/assets/{index-redirect-zukIYzlP.js → index-redirect-XmpHbWI0.js} +1 -1
  159. package/dist/client/assets/{index-DuKSozhT.js → index-yiQcNbRY.js} +1 -1
  160. package/dist/client/assets/{infiniteQueryObserver-CHVbl4Al.js → infiniteQueryObserver-Bysh3DKm.js} +1 -1
  161. package/dist/client/assets/{infra-billing-D94tvu0v.js → infra-billing-CrRHsYb5.js} +1 -1
  162. package/dist/client/assets/{input-qBVmxar0.js → input-CcBq0Qtl.js} +3 -3
  163. package/dist/client/assets/{input-C0ZWiiGy.js → input-Kws07Y5R.js} +1 -1
  164. package/dist/client/assets/{input-Cbyu0LGy.js → input-xNv48kMp.js} +1 -1
  165. package/dist/client/assets/{integration-icon-DUuPtqFs.js → integration-icon-D2va06Ai.js} +1 -1
  166. package/dist/client/assets/{label-CKukDnnz.js → label-BsArcFBD.js} +1 -1
  167. package/dist/client/assets/{layout-DZr1Z4Vi.js → layout-DgSCQhnk.js} +1 -1
  168. package/dist/client/assets/{legacy-agents-deep-O_a0ihqp.js → legacy-agents-deep-_Rsc7ywf.js} +1 -1
  169. package/dist/client/assets/{legacy-main-redirect-B6sO18wU.js → legacy-main-redirect-BKsErYAe.js} +1 -1
  170. package/dist/client/assets/library-DXXDvCqk.js +1 -0
  171. package/dist/client/assets/{library-tab-CGsiOX6E.js → library-tab-DsEkCV3p.js} +1 -1
  172. package/dist/client/assets/{login-hdkcuXfq.js → login-Lx_WumW3.js} +1 -1
  173. package/dist/client/assets/{markdown-DNk_PyOf.js → markdown-DNNvyUFL.js} +1 -1
  174. package/dist/client/assets/{mcp-app-renderer-CJ5u3TPG.js → mcp-app-renderer-Bvvl0FWT.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-cSH4PfZY.js → mcp-oauth-3C0PcQv6.js} +1 -1
  176. package/dist/client/assets/{members-C-_zRkLX.js → members-DvRk0bvv.js} +1 -1
  177. package/dist/client/assets/{memory-DLRzHb1w.js → memory-B8oV5gBw.js} +1 -1
  178. package/dist/client/assets/{mini-report-page-CFzUUmyT.js → mini-report-page-DdQ7SKpZ.js} +1 -1
  179. package/dist/client/assets/{mock-board-Si0mPE9y.js → mock-board-DBOMi-p8.js} +1 -1
  180. package/dist/client/assets/{monaco-editor-C4uDUO_q.js → monaco-editor-0FKvs3m8.js} +1 -1
  181. package/dist/client/assets/{monitoring-stats-row-CllZiW9E.js → monitoring-stats-row-bsHcY4Ek.js} +1 -1
  182. package/dist/client/assets/{multi-select-DiHVOPXR.js → multi-select-CsrBGXiU.js} +1 -1
  183. package/dist/client/assets/{mustache-C7f92o5k.js → mustache-R5ZIENHD.js} +1 -1
  184. package/dist/client/assets/{new-project-dialog-CiCMTA1C.js → new-project-dialog-BXg1Q86m.js} +1 -1
  185. package/dist/client/assets/{oauth-callback-Cb4S9fwE.js → oauth-callback-CJsOiTzu.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-ai-provider-CD_A5mvP.js → oauth-callback-ai-provider-BQmwZWeP.js} +1 -1
  187. package/dist/client/assets/{onboarding-B2wyTbOl.js → onboarding-Cg9R0el4.js} +1 -1
  188. package/dist/client/assets/{openai-conversation-WSjKAhvH.js → openai-conversation-BL4VQkfR.js} +1 -1
  189. package/dist/client/assets/{optimistic-project-sidebar-views-BBFtzDV4.js → optimistic-project-sidebar-views-De10Nj6j.js} +1 -1
  190. package/dist/client/assets/{org-file-open-context--_UQSpdl.js → org-file-open-context-BosMDtdb.js} +1 -1
  191. package/dist/client/assets/{organization-choice-Bs4XFXgS.js → organization-choice-oi2kSFzc.js} +1 -1
  192. package/dist/client/assets/{orgs-DzdQslwf.js → orgs-YLkB30CC.js} +1 -1
  193. package/dist/client/assets/{page-seo-form-vON-l1GZ.js → page-seo-form-B7zbvDL2.js} +1 -1
  194. package/dist/client/assets/{pair-IorbWgZn.js → pair-BtqMUvq4.js} +1 -1
  195. package/dist/client/assets/{plan-ladder-DSodyL3Q.js → plan-ladder-2SN6IZxx.js} +1 -1
  196. package/dist/client/assets/{popover-DvKxqM1r.js → popover-Cb13NGPe.js} +1 -1
  197. package/dist/client/assets/{post-calendar-DiEfiKrj.js → post-calendar-RlXieGQw.js} +1 -1
  198. package/dist/client/assets/{post-editor-HV3DNHNH.js → post-editor-_9DsSzJD.js} +1 -1
  199. package/dist/client/assets/{preview-content-Bd42BahA.js → preview-content-DOOZEe7K.js} +1 -1
  200. package/dist/client/assets/{preview-dialog-DBXVi9mo.js → preview-dialog-hfrg0TdN.js} +1 -1
  201. package/dist/client/assets/{profile-C62VIFSL.js → profile-tDdLE8vh.js} +1 -1
  202. package/dist/client/assets/{project-app-view-DYaaNrnC.js → project-app-view-Rd2WBl7i.js} +1 -1
  203. package/dist/client/assets/{project-feed-DDiBGrsP.js → project-feed-CrFrudQ9.js} +1 -1
  204. package/dist/client/assets/{project-icon-DQrOXeEW.js → project-icon-DFU40NC2.js} +1 -1
  205. package/dist/client/assets/project-reports-D2_GUrbe.js +1 -0
  206. package/dist/client/assets/project-tasks-BulftSHT.js +1 -0
  207. package/dist/client/assets/{projects-C-62vsjh.js → projects-QV8eEeko.js} +1 -1
  208. package/dist/client/assets/{projects-empty-state-DllkKglW.js → projects-empty-state-xo5NNNQh.js} +1 -1
  209. package/dist/client/assets/{prompts-53mGvQlZ.js → prompts-BX7-kI7o.js} +1 -1
  210. package/dist/client/assets/record-editor-B0H5WqkE.js +1 -0
  211. package/dist/client/assets/{redirect-editor-C2CflIXw.js → redirect-editor-Bi6rLeHR.js} +1 -1
  212. package/dist/client/assets/{reports-DQcmX2XK.js → reports-CA7N6twS.js} +1 -1
  213. package/dist/client/assets/reports-CHglz2zQ.js +1 -0
  214. package/dist/client/assets/{reports-onboarding-DRfSptAM.js → reports-onboarding-DERDE-0k.js} +1 -1
  215. package/dist/client/assets/{reports-tab-BGRnmmWF.js → reports-tab-3gFhJXg-.js} +2 -2
  216. package/dist/client/assets/{repositories-ltvP9f3v.js → repositories-DMFw7emx.js} +1 -1
  217. package/dist/client/assets/{repository-binding-CEDkA6og.js → repository-binding-BXNOickW.js} +1 -1
  218. package/dist/client/assets/{repository-import-picker-BT060hhl.js → repository-import-picker-Tdhv79ml.js} +1 -1
  219. package/dist/client/assets/{repository-picker-Bowb7b9f.js → repository-picker-PURciVL4.js} +1 -1
  220. package/dist/client/assets/{require-capability-DN9BJlNM.js → require-capability-J3WiMSvq.js} +1 -1
  221. package/dist/client/assets/{required-auth-layout-CKgEUo-z.js → required-auth-layout-D2VAA74b.js} +1 -1
  222. package/dist/client/assets/{reset-password-B6iTpX4u.js → reset-password-C0vsdMzy.js} +1 -1
  223. package/dist/client/assets/{resizable-Cd8jDRB7.js → resizable-pZE9eaKX.js} +1 -1
  224. package/dist/client/assets/{resolve-tab-icon-X0M-w-vv.js → resolve-tab-icon-vYim2A6S.js} +1 -1
  225. package/dist/client/assets/{review-settings-CsnvQ-Qq.js → review-settings-CgwxmK2U.js} +1 -1
  226. package/dist/client/assets/{rich-text-link-control-ClsuTwdo.js → rich-text-link-control-B2JcdNT_.js} +1 -1
  227. package/dist/client/assets/{roles-CU8q7gVb.js → roles-DuPCSfd2.js} +1 -1
  228. package/dist/client/assets/{route-NLnkR9WP.js → route-Cg_bXToL.js} +1 -1
  229. package/dist/client/assets/{route-CIn0WnXQ.js → route-Ycp8NA6O.js} +1 -1
  230. package/dist/client/assets/route-eIs4MDaB.js +1 -0
  231. package/dist/client/assets/{runnable-block-editor-2ItVAsl7.js → runnable-block-editor-CEeBI7Ji.js} +1 -1
  232. package/dist/client/assets/{sandbox-lifecycle-context-C0vkuH66.js → sandbox-lifecycle-context-D9pUeLC3.js} +1 -1
  233. package/dist/client/assets/{schema-W3hqtN1B.js → schema-EK91AuqK.js} +1 -1
  234. package/dist/client/assets/{scroll-area-BN7R6f0c.js → scroll-area-CGd0e1tw.js} +1 -1
  235. package/dist/client/assets/{search-input-dP8TWy_f.js → search-input-Z6QSPnUN.js} +1 -1
  236. package/dist/client/assets/{search-toggle-BY33vUyT.js → search-toggle-HnNumyyq.js} +1 -1
  237. package/dist/client/assets/{secret-picker-Bw0HhGwk.js → secret-picker-CqLw8TkH.js} +1 -1
  238. package/dist/client/assets/{secrets-D3WU-wHx.js → secrets-DlDhor0l.js} +1 -1
  239. package/dist/client/assets/{sections-editor-Bnb_Ii_2.js → sections-editor-BzSi4RpW.js} +1 -1
  240. package/dist/client/assets/{select-CGC5E9nf.js → select-BhJ8bhDe.js} +1 -1
  241. package/dist/client/assets/{select-model-B24PK9T9.js → select-model-R1qyXM2Q.js} +1 -1
  242. package/dist/client/assets/{seo-editor-C0eExFGM.js → seo-editor-CbZ5Ttz-.js} +1 -1
  243. package/dist/client/assets/{separator-CJCi7EK2.js → separator-DdUyNk8m.js} +1 -1
  244. package/dist/client/assets/{settings-tab-6YGWJaPP.js → settings-tab-CFhR9sQ7.js} +1 -1
  245. package/dist/client/assets/{sheet-DOIzAtMq.js → sheet-Bogqpryv.js} +1 -1
  246. package/dist/client/assets/{shell-layout-B9OaioSj.js → shell-layout-DG1i0o3w.js} +1 -1
  247. package/dist/client/assets/{skills-DdHXbE4c.js → skills-C6p2ywNh.js} +1 -1
  248. package/dist/client/assets/{sso-WAQdj9Pk.js → sso-CaX3-wST.js} +1 -1
  249. package/dist/client/assets/{suggestion-CotdwSyy.js → suggestion-hd077eb-.js} +1 -1
  250. package/dist/client/assets/{switch-Ctdc8it1.js → switch-CBzf58ch.js} +1 -1
  251. package/dist/client/assets/{synced-repos-DFq2CK-H.js → synced-repos-B3IgFu_d.js} +1 -1
  252. package/dist/client/assets/{tab-icon-glyph-CXhMb9aF.js → tab-icon-glyph-BfZAz2Nh.js} +1 -1
  253. package/dist/client/assets/{table-BCWfTyhH.js → table-DdKwpV9k.js} +1 -1
  254. package/dist/client/assets/{tabs-BCc9oqWy.js → tabs-8xIz4UtP.js} +1 -1
  255. package/dist/client/assets/{task-board-Dh6sWb9t.js → task-board-BzFCmVqC.js} +1 -1
  256. package/dist/client/assets/{task-route-BGcHuycG.js → task-route-BFxRMUrM.js} +1 -1
  257. package/dist/client/assets/{task-status-CjAgmdGY.js → task-status-BFjuRlF8.js} +1 -1
  258. package/dist/client/assets/{taskboard-analytics-CgboMqfv.js → taskboard-analytics-CUklyXct.js} +1 -1
  259. package/dist/client/assets/{tasks-CQrn-rBP.js → tasks-BBOADBVx.js} +1 -1
  260. package/dist/client/assets/tasks-BklBZeO8.js +1 -0
  261. package/dist/client/assets/{textarea-e3h0PKfc.js → textarea-Cat7zkJf.js} +1 -1
  262. package/dist/client/assets/{thread-analytics-u-mhBpUO.js → thread-analytics-CVNcoFuI.js} +1 -1
  263. package/dist/client/assets/{thread-button-D5H005fQ.js → thread-button-9Si-8tRp.js} +1 -1
  264. package/dist/client/assets/{thread-intent-CNOpHUCE.js → thread-intent-Dk0A6ZtT.js} +1 -1
  265. package/dist/client/assets/{thread-route-DU2TTrlu.js → thread-route-BW9F2J6m.js} +1 -1
  266. package/dist/client/assets/{thread-route-esGiDSRu.js → thread-route-elF7W4D7.js} +1 -1
  267. package/dist/client/assets/{thread-sheet-body-Bn55RhIb.js → thread-sheet-body-DjYFhNWp.js} +1 -1
  268. package/dist/client/assets/{toggle-group-BUS82Kqf.js → toggle-group-B9Z8QVLn.js} +1 -1
  269. package/dist/client/assets/{toolbar-icon-button-B8tRovqj.js → toolbar-icon-button-BZarRBLi.js} +1 -1
  270. package/dist/client/assets/{tooltip-DoWVDYxv.js → tooltip-B7_4-yXG.js} +1 -1
  271. package/dist/client/assets/{track-slrdEZ2N.js → track-oTFNmgLQ.js} +1 -1
  272. package/dist/client/assets/{types-BlCCVKMl.js → types-co2Ht9Mj.js} +1 -1
  273. package/dist/client/assets/{usage-stats-ELYwp3GN.js → usage-stats-BGChWuhD.js} +1 -1
  274. package/dist/client/assets/{use-ai-providers-BuwFLwdC.js → use-ai-providers-DeSnAgnd.js} +1 -1
  275. package/dist/client/assets/{use-automations-B8HKsWEy.js → use-automations-D9GmwdRn.js} +1 -1
  276. package/dist/client/assets/{use-autosave-77sC71ka.js → use-autosave-CPw75416.js} +1 -1
  277. package/dist/client/assets/{use-chat-layout-state-Cd1SDWUO.js → use-chat-layout-state-Che4U26N.js} +1 -1
  278. package/dist/client/assets/{use-clock-tick-DkYE6iX2.js → use-clock-tick-C5v7xKB3.js} +1 -1
  279. package/dist/client/assets/{use-connect-companion-sjR8VGIZ.js → use-connect-companion-DQZNt_6L.js} +1 -1
  280. package/dist/client/assets/{use-connection-C4j2pJbz.js → use-connection-CldQc5wk.js} +1 -1
  281. package/dist/client/assets/{use-copy-BiyQhtNG.js → use-copy-C60AwJfN.js} +1 -1
  282. package/dist/client/assets/{use-create-virtual-mcp-C0a_KTOz.js → use-create-virtual-mcp-C1-gls-6.js} +1 -1
  283. package/dist/client/assets/{use-date-fns-locale-dFt0Hwsj.js → use-date-fns-locale-DrogVNbI.js} +1 -1
  284. package/dist/client/assets/{use-debounced-autosave-D58XDw_5.js → use-debounced-autosave-DEq3njSh.js} +1 -1
  285. package/dist/client/assets/{use-debounced-value-C1TKx6na.js → use-debounced-value-8t15K3Ro.js} +1 -1
  286. package/dist/client/assets/{use-deco-credits--by3KJXE.js → use-deco-credits-odXtC5vU.js} +1 -1
  287. package/dist/client/assets/{use-decopilot-events-DL6Ppxgb.js → use-decopilot-events-PV6rJUEO.js} +1 -1
  288. package/dist/client/assets/{use-delete-connection-Cc8dNIWp.js → use-delete-connection-ZGYKa162.js} +1 -1
  289. package/dist/client/assets/{use-deployment-admin-D0_O_QSr.js → use-deployment-admin-WZmDKf2R.js} +1 -1
  290. package/dist/client/assets/{use-fast-preview-draft-url-KJgu2gHZ.js → use-fast-preview-draft-url-DhkmOrTf.js} +1 -1
  291. package/dist/client/assets/{use-file-configs-j21JL3yE.js → use-file-configs-Cb37DNRD.js} +1 -1
  292. package/dist/client/assets/{use-infinite-scroll-BAQqTty_.js → use-infinite-scroll-CUV2ONAi.js} +1 -1
  293. package/dist/client/assets/{use-join-requests-B2449AYt.js → use-join-requests-CTH575eV.js} +1 -1
  294. package/dist/client/assets/{use-main-panel-tabs-NhZJRbOq.js → use-main-panel-tabs-Dlf1NeW3.js} +1 -1
  295. package/dist/client/assets/{use-mcp-auth-status-CG-b2BD1.js → use-mcp-auth-status-CdQemSFp.js} +1 -1
  296. package/dist/client/assets/{use-mcp-client-9jF2B0Tz.js → use-mcp-client-BLH9AyVn.js} +1 -1
  297. package/dist/client/assets/{use-mcp-prompts-DNAsQeJA.js → use-mcp-prompts-Dn5An3ZZ.js} +1 -1
  298. package/dist/client/assets/{use-mcp-tools-Dbm0kb0W.js → use-mcp-tools-Dvd6qKab.js} +1 -1
  299. package/dist/client/assets/{use-members-CmQfPBAn.js → use-members-Bs-9PW58.js} +1 -1
  300. package/dist/client/assets/{use-mobile-9GiVme_1.js → use-mobile-VzbSoGMr.js} +1 -1
  301. package/dist/client/assets/{use-navigate-to-agent-CSgL519X.js → use-navigate-to-agent-DC1x2gVp.js} +1 -1
  302. package/dist/client/assets/use-new-blocks-editor-Dt6P6iFj.js +1 -0
  303. package/dist/client/assets/{use-open-billing-url-CIF0WByS.js → use-open-billing-url-CqWGNwIl.js} +1 -1
  304. package/dist/client/assets/{use-org-auth-client-BBAyh5Tz.js → use-org-auth-client-BwlmPJlb.js} +1 -1
  305. package/dist/client/assets/{use-org-fs-DF_BlZtj.js → use-org-fs-CAxytlY9.js} +1 -1
  306. package/dist/client/assets/{use-org-repo-syncs-kX31P2gW.js → use-org-repo-syncs-7w0mnChN.js} +1 -1
  307. package/dist/client/assets/{use-org-sso-BmivjhbI.js → use-org-sso-pd_XhDQs.js} +1 -1
  308. package/dist/client/assets/{use-organization-roles-DEPf_2N_.js → use-organization-roles-0bUJSiHD.js} +1 -1
  309. package/dist/client/assets/{use-organization-settings-BgEtBsl7.js → use-organization-settings-HU4xq5ST.js} +1 -1
  310. package/dist/client/assets/{use-panel-navigate-4MoLzTpw.js → use-panel-navigate-CRJv_Vri.js} +1 -1
  311. package/dist/client/assets/{use-project-scope-CUYDg9gO.js → use-project-scope-C7BcZz2G.js} +1 -1
  312. package/dist/client/assets/{use-releases-Dgq67fk3.js → use-releases-CWzjTbPz.js} +1 -1
  313. package/dist/client/assets/{use-reports-diagnostic-D9eBWCCe.js → use-reports-diagnostic-C57CEzOi.js} +1 -1
  314. package/dist/client/assets/{use-secrets-D-qkpxrJ.js → use-secrets-DWHT5uVx.js} +1 -1
  315. package/dist/client/assets/{use-section-preview-base-LT3afhUQ.js → use-section-preview-base-D8KaMaNX.js} +1 -1
  316. package/dist/client/assets/{use-session-runtime-C1jT9-WF.js → use-session-runtime-C3g9swZ6.js} +1 -1
  317. package/dist/client/assets/{use-tags-D0iZ2cgD.js → use-tags-UVdMm4OW.js} +1 -1
  318. package/dist/client/assets/{use-task-board-analytics-B0Mv4i0Z.js → use-task-board-analytics-BsB8uLyj.js} +1 -1
  319. package/dist/client/assets/{use-task-board-events-Q5BqAnUD.js → use-task-board-events-UNKoOCA_.js} +1 -1
  320. package/dist/client/assets/{use-task-metadata-B9tqJ9GP.js → use-task-metadata-Db3_7a5j.js} +1 -1
  321. package/dist/client/assets/{use-thread-analytics-D5tK9O4P.js → use-thread-analytics-jm9iLDFp.js} +1 -1
  322. package/dist/client/assets/{use-thread-outputs-CDQWo15F.js → use-thread-outputs-COXL75K0.js} +1 -1
  323. package/dist/client/assets/useInfiniteQuery-DsKCSoLS.js +1 -0
  324. package/dist/client/assets/{useQueries-DvMDA4qD.js → useQueries-DVNZ_TAh.js} +1 -1
  325. package/dist/client/assets/useSuspenseInfiniteQuery-D4CsLbSw.js +1 -0
  326. package/dist/client/assets/{users-BE1CJVdF.js → users-BjcMnF7Q.js} +1 -1
  327. package/dist/client/assets/{utils-CZW3O45l.js → utils-BdWBNy3y.js} +1 -1
  328. package/dist/client/assets/{variant-calendar-C_oSHjpD.js → variant-calendar-COGidEDl.js} +1 -1
  329. package/dist/client/assets/{variant-matcher-override-B9Dx0Ujt.js → variant-matcher-override-CffNE4hW.js} +1 -1
  330. package/dist/client/assets/{view-mode-toggle-BjrOeE_u.js → view-mode-toggle-EBcGWFvm.js} +1 -1
  331. package/dist/client/assets/{virtual-mcp-DkCjKqhT.js → virtual-mcp-CRDba5ev.js} +1 -1
  332. package/dist/client/index.html +1 -1
  333. package/dist/server/cli.js +1 -1
  334. package/dist/server/server.js +1 -1
  335. package/package.json +1 -1
  336. package/dist/client/assets/agent-app-CjNO2lXq.js +0 -1
  337. package/dist/client/assets/agent-deck-BBsYONOP.js +0 -1
  338. package/dist/client/assets/agent-library-DJDlIAqS.js +0 -1
  339. package/dist/client/assets/agent-library-file-CZjl7KSc.js +0 -1
  340. package/dist/client/assets/agent-settings-DhGEY9it.js +0 -1
  341. package/dist/client/assets/agent-site-editor-code-D1HLX1NJ.js +0 -2
  342. package/dist/client/assets/agent-view-YbbJ0c-k.js +0 -1
  343. package/dist/client/assets/api-keys-C1C00ELj.js +0 -1
  344. package/dist/client/assets/app-editor-Cr-wsjho.js +0 -1
  345. package/dist/client/assets/flat-project-CXofx1Tp.js +0 -1
  346. package/dist/client/assets/library-DOnOZswk.js +0 -1
  347. package/dist/client/assets/project-reports-HuiRnlkO.js +0 -1
  348. package/dist/client/assets/project-tasks-Ck5F7vye.js +0 -1
  349. package/dist/client/assets/record-editor-BAdOwM42.js +0 -1
  350. package/dist/client/assets/reports-Dyr-R6yJ.js +0 -1
  351. package/dist/client/assets/route-qm6cYbsf.js +0 -1
  352. package/dist/client/assets/tasks-L9jj-kWQ.js +0 -1
  353. package/dist/client/assets/use-new-blocks-editor-CQ_89Cdt.js +0 -1
  354. package/dist/client/assets/useInfiniteQuery-pxyjNhep.js +0 -1
  355. package/dist/client/assets/useSuspenseInfiniteQuery-Cf0qcKEf.js +0 -1
@@ -1 +1 @@
1
- import{c as H,r as C,b as G,j as h,t as N,Z as xe,B as ke,o as de,X as ue,K as Z,q as $,es as me,c$ as oe,et as z,l as we}from"./index-BOGZM7Pw.js";import{S as fe,s as be}from"./suggestion-CotdwSyy.js";import{f as Pe,h as _e,j as Ce,i as B,k as Se,P as ie,l as Fe,c as Ie,u as De,n as je,d as ve,e as Me,F as Re,s as Le,b as Ae}from"./index-DuKSozhT.js";import{d as Ee,h as Ne,c as Te,b as Qe,D as $e}from"./dialog-CwJ0Tacd.js";import{aX as Oe}from"./agent-icon-QobcC4y1.js";import"./chat-context-BHWxNMFT.js";import{m as Ue,i as qe,a as Ke}from"./decopilot-Bh5nOuj8.js";import{u as pe}from"./use-mcp-client-9jF2B0Tz.js";import{b as ze}from"./repository-binding-CEDkA6og.js";import{g as Be}from"./use-project-scope-CUYDg9gO.js";import{g as ne,s as he}from"./gateway-client-DafKkh5Q.js";import{l as ae,g as ge}from"./use-mcp-prompts-DNAsQeJA.js";import{f as He,a as Je}from"./use-org-fs-DF_BlZtj.js";async function Xe(t,e,n,s,i,o){if(!Ue(e)){N.error("Selected model does not support file uploads");return}const c=n.type||"application/octet-stream";if(!qe(c,e)){const p=Ke(e).parts.map(x=>o(x)).join(", "),w=e?.title??"This model";i?i({fileName:n.name,modelName:w,accepted:p}):N.error(`"${n.name}" can't be attached`,{description:`${w} accepts ${p}.`});return}const d=10*1024*1024;if(n.size>d){N.error(`File "${n.name}" exceeds 10MB limit`);return}try{const p=new FileReader,w=new Promise((r,u)=>{p.onload=()=>{const a=p.result;if(typeof a!="string"){u(new Error("Failed to read file as data URL"));return}const k=a.includes(",")?a.split(",")[1]??a:a;r(k)},p.onerror=u});p.readAsDataURL(n);const x=await w,f={id:crypto.randomUUID(),name:n.name,mimeType:n.type||"application/octet-stream",size:n.size,data:x};Pe(t,{from:s,to:s},f)}catch(p){console.error("Failed to process file:",p),N.error(`Failed to load file "${n.name}"`)}}function Ve(t){const e=H.c(9),{editor:n,selectedModel:s,onUnsupportedFile:i}=t,o=G(),c=C.useRef(Ye);let d,p;e[0]!==n||e[1]!==i||e[2]!==s||e[3]!==o?(d=()=>{c.current=async(f,r)=>{await Xe(n,s,f,r,i,o)}},p=[n,s,i,o],e[0]=n,e[1]=i,e[2]=s,e[3]=o,e[4]=d,e[5]=p):(d=e[4],p=e[5]),C.useEffect(d,p);let w,x;return e[6]!==n?(w=()=>{if(n?.isDestroyed)return;const f=new _e("fileDropHandler");n.state.plugins.find(a=>a.spec.key===f)&&n.unregisterPlugin(f);const u=new Ce({key:f,props:{handleDrop:(a,k,F,S)=>{if(S)return!1;const b=k.dataTransfer?.files;if(!b||b.length===0)return!1;k.preventDefault();const j=a.posAtCoords({left:k.clientX,top:k.clientY});if(!j)return!1;const I=Array.from(b);return(async()=>{let M=j.pos;for(const D of I)await c.current?.(D,M),M=a.state.selection.to})(),!0},handlePaste:(a,k)=>{const F=k.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(k.preventDefault(),(async()=>{let b=a.state.selection.from;for(const j of S){const I=j.getAsFile();I&&(await c.current?.(I,b),b=a.state.selection.to)}})(),!0)}}});return n.registerPlugin(u),()=>{n?.isDestroyed||n.unregisterPlugin(f)}},x=[n],e[6]=n,e[7]=w,e[8]=x):(w=e[7],x=e[8]),C.useEffect(w,x),null}function We(t){return t.kind==="file"}function Ye(){return Promise.resolve()}function Ct(t){const e=H.c(43),{info:n,onClose:s}=t,i=G(),o=n!==null;let c;e[0]!==s?(c=v=>!v&&s(),e[0]=s,e[1]=c):c=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=d):d=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:d.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=p):p=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(xe,{size:18})}),e[4]=w):w=e[4];let x;e[5]!==i?(x=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=x):x=e[6];let f;e[7]!==x?(f=h.jsx(Ee,{className:"text-xl font-semibold tracking-tight",children:x}),e[7]=x,e[8]=f):f=e[8];const r=n?.fileName;let u;e[9]!==r?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",r,"”"]}),e[9]=r,e[10]=u):u=e[10];let a;e[11]!==i?(a=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=a):a=e[12];let k;e[13]!==a||e[14]!==u?(k=h.jsxs(Ne,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",a]}),e[13]=a,e[14]=u,e[15]=k):k=e[15];let F;e[16]!==k||e[17]!==f?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,h.jsxs(Te,{className:"relative gap-4",children:[w,h.jsxs("div",{children:[f,k]})]})]}),e[16]=k,e[17]=f,e[18]=F):F=e[18];const S=n?.modelName??"";let b;e[19]!==i||e[20]!==S?(b=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=b):b=e[21];let j;e[22]!==b?(j=h.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:b}),e[22]=b,e[23]=j):j=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const M=n?.accepted;let D;e[25]!==M?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:M})]}),e[25]=M,e[26]=D):D=e[26];let l;e[27]!==j||e[28]!==D?(l=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"rounded-xl border border-border p-4",children:[j,D]})}),e[27]=j,e[28]=D,e[29]=l):l=e[29];let m;e[30]!==i?(m=i("chat.uploader.gotIt"),e[30]=i,e[31]=m):m=e[31];let y;e[32]!==s||e[33]!==m?(y=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(ke,{onClick:s,children:m})}),e[32]=s,e[33]=m,e[34]=y):y=e[34];let _;e[35]!==F||e[36]!==l||e[37]!==y?(_=h.jsxs(Qe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ze,children:[F,l,y]}),e[35]=F,e[36]=l,e[37]=y,e[38]=_):_=e[38];let R;return e[39]!==o||e[40]!==c||e[41]!==_?(R=h.jsx($e,{open:o,onOpenChange:c,children:_}),e[39]=o,e[40]=c,e[41]=_,e[42]=R):R=e[42],R}function Ze(t){return t.preventDefault()}function St(){const t=H.c(3),[e,n]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>n(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:n,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}const Ge=t=>{const e=H.c(53),{editor:n,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),c=de(),{org:d}=ue(),p=ze();let w;e[0]!==p?(w=Be(p),e[0]=p,e[1]=w):w=e[1];const x=w;let f;e[2]!==d.id||e[3]!==d.slug||e[4]!==s?(f={connectionId:s,orgId:d.id,orgSlug:d.slug},e[2]=d.id,e[3]=d.slug,e[4]=s,e[5]=f):f=e[5];const r=pe(f);let u;e[6]!==d.id||e[7]!==s?(u=Z.virtualMcpResources(s,d.id),e[6]=d.id,e[7]=s,e[8]=u):u=e[8];const a=u,[k,F]=C.useState("categories");let S;e[9]!==k?(S=()=>k,e[9]=k,e[10]=S):S=e[10];const b=C.useEffectEvent(S),j=C.useRef(null),I=C.useRef(!1),M=s??"default";let D;e[11]!==k||e[12]!==d.id||e[13]!==M?(D=["at-mention",d.id,M,k],e[11]=k,e[12]=d.id,e[13]=M,e[14]=D):D=e[14];const l=D;let m;e[15]!==o?(m=o("chat.mentionAt.agentsTitle"),e[15]=o,e[16]=m):m=e[16];let y;e[17]!==o?(y=o("chat.mentionAt.agentsDescription"),e[17]=o,e[18]=y):y=e[18];let _;e[19]!==m||e[20]!==y?(_={name:"agents",title:m,description:y,kind:"category",drillable:!0},e[19]=m,e[20]=y,e[21]=_):_=e[21];let R;e[22]!==o?(R=o("chat.mentionAt.resourcesTitle"),e[22]=o,e[23]=R):R=e[23];let v;e[24]!==o?(v=o("chat.mentionAt.resourcesDescription"),e[24]=o,e[25]=v):v=e[25];let T;e[26]!==R||e[27]!==v?(T={name:"resources",title:R,description:v,kind:"category",drillable:!0},e[26]=R,e[27]=v,e[28]=T):T=e[28];let O;e[29]!==T||e[30]!==_?(O=[_,T],e[29]=T,e[30]=_,e[31]=O):O=e[31];const q=O;let g;e[32]!==r||e[33]!==n||e[34]!==o?(g=async U=>{const{item:P,range:K}=U;if($("chat_picker_item_selected",{picker:"@",item_kind:P.kind,item_name:P.name}),P.kind!=="category"&&(I.current=!0),P.kind==="category")return F(P.name==="agents"?"agents":"resources"),!1;if(P.kind==="agent"&&P.agentId){B(n,K,{id:P.agentId,name:P.name,metadata:{agentId:P.agentId,title:P.name},char:"@"}),F("categories");return}if(P.kind==="resource"&&P.uri&&r){try{const Q=await me(r,P.uri);B(n,K,{id:P.uri,name:P.uri,metadata:Q.contents,char:"@"})}catch(Q){console.error("[at-mention] Failed to fetch resource:",Q),N.error(o("chat.mentionAt.failedToLoadResource"))}F("categories");return}},e[32]=r,e[33]=n,e[34]=o,e[35]=g):g=e[35];const ee=g;let J;e[36]!==p||e[37]!==q||e[38]!==r||e[39]!==x||e[40]!==b||e[41]!==c||e[42]!==a||e[43]!==s?(J=async U=>{const{query:P}=U,K=b();if(K==="categories"){if(!P.trim())return q;const A=P.toLowerCase(),L=p.filter(E=>E.status==="active"&&(!E.id||!oe(E.id))&&!x.has(E.id)&&E.id!==s&&(E.title.toLowerCase().includes(A)||E.description?.toLowerCase().includes(A))).map(et),Y=await(async()=>{if(!r)return[];let E=c.getQueryData(a);return E||(E=await c.fetchQuery({queryKey:a,queryFn:()=>z(r),staleTime:6e4})),(E?.resources??[]).filter(re=>re.uri.toLowerCase().includes(A)||re.name?.toLowerCase().includes(A)||re.description?.toLowerCase().includes(A)).map(tt)})();return[...L,...Y]}if(K==="agents"){let A=p.filter(L=>L.status==="active"&&(!L.id||!oe(L.id))&&!x.has(L.id)&&L.id!==s);if(P.trim()){const L=P.toLowerCase();A=A.filter(Y=>Y.title.toLowerCase().includes(L)||Y.description?.toLowerCase().includes(L))}return A.map(st)}if(!r)return[];let Q=c.getQueryData(a);Q?c.fetchQuery({queryKey:a,queryFn:()=>z(r),staleTime:6e4}).catch(rt):Q=await c.fetchQuery({queryKey:a,queryFn:()=>z(r),staleTime:6e4});let W=Q?.resources??[];if(P.trim()){const A=P.toLowerCase();W=W.filter(L=>L.uri.toLowerCase().includes(A)||L.name?.toLowerCase().includes(A)||L.description?.toLowerCase().includes(A))}return W.map(nt)},e[36]=p,e[37]=q,e[38]=r,e[39]=x,e[40]=b,e[41]=c,e[42]=a,e[43]=s,e[44]=J):J=e[44];const te=J;let X;e[45]!==i?(X=U=>{if(i&&(i.current=U),U)j.current=Date.now(),I.current=!1,$("chat_picker_opened",{picker:"@"});else{const P=j.current;$("chat_picker_closed",{picker:"@",outcome:I.current?"selected":"dismissed",duration_ms:P?Date.now()-P:null}),j.current=null,F("categories")}},e[45]=i,e[46]=X):X=e[46];const se=X;let V;return e[47]!==n||e[48]!==te||e[49]!==ee||e[50]!==se||e[51]!==l?(V=h.jsx(fe,{editor:n,char:"@",pluginKey:"atDropdownMenu",queryKey:l,queryFn:te,onSelect:ee,onOpenChange:se}),e[47]=n,e[48]=te,e[49]=ee,e[50]=se,e[51]=l,e[52]=V):V=e[52],V};function et(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function tt(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function st(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function rt(){}function nt(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function le(t,e,n,s,i,o,c){try{const d=await ge(n,s,o);B(t,e,{id:s,name:he(s,i),metadata:d.messages,char:"/",kind:"prompt",args:o})}catch(d){console.error("[slash] Failed to fetch prompt:",d),N.error(c.t("chat.mentionSlash.failedLoadPrompt"))}}async function ot(t,e,n,s,i){try{const o=await me(n,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),N.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function it(t,e,n,s,i){try{const{files:o,omittedPaths:c}=await He(n,s.volume,s.path),d={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:c};B(t,e,{id:s.id,name:s.name,metadata:d,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),N.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const at=({editor:t,virtualMcpId:e,suggestionOpenRef:n})=>{const s=G(),i=de(),{org:o}=ue(),c=pe({connectionId:e,orgId:o.id,orgSlug:o.slug}),d=Z.virtualMcpPrompts(e,o.id),p=Z.virtualMcpResources(e,o.id),w=Z.slashSkills(o.id),x=["slash-mention",o.id,e??"default"],[f,r]=C.useState(null),[u,a]=C.useState(null),k=Se(t);k&&(k.onEditChip=async l=>{if(c)try{const y=(await ce(i,d,c)).find(_=>_.name===l.promptId);if(!y?.arguments||y.arguments.length===0)return;a({...l,prompt:y})}catch(m){console.error("[slash] Failed to load prompt for editing:",m),N.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),b=async({item:l,range:m})=>{if($("chat_picker_item_selected",{picker:"/",item_kind:l.kind,item_name:l.name}),S.current=!0,!!c)if(l.kind==="prompt"){if(l.arguments&&l.arguments.length>0){r({range:m,item:l});return}const y=ne(l._meta);await le(t,m,c,l.name,y,void 0,{t:s})}else l.kind==="skill"?l.skill&&await it(t,m,o.slug,l.skill,{t:s}):l.uri&&await ot(t,m,c,l.uri,{t:s})},j=async l=>{if(!f||!c)return;const{range:m,item:y}=f,_=ne(y._meta);await le(t,m,c,y.name,_,l,{t:s}),r(null)},I=async l=>{if(!(!u||!c)){if(!Fe(t,u.pos,u.promptId)){N.error(s("chat.mentionSlash.failedUpdatePrompt")),a(null);return}try{const m=await ge(c,u.promptId,l),y=ne(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Ie({id:u.promptId,name:he(u.promptId,y),metadata:m.messages,char:"/",kind:"prompt",args:l})).run(),$("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(m){console.error("[slash] Failed to update prompt:",m),N.error(s("chat.mentionSlash.failedUpdatePrompt"))}a(null)}},M=async l=>{const{query:m}=l;if(!c)return[];const[y,_,R]=await Promise.all([ce(i,d,c),ct(i,p,c),lt(i,w,o.slug)]),v=m.trim().toLowerCase(),T=(y??[]).filter(g=>!v||g.name.toLowerCase().includes(v)||g.title?.toLowerCase().includes(v)||g.description?.toLowerCase().includes(v)).map(g=>({name:g.name,title:g.title,description:g.description,kind:"prompt",arguments:g.arguments,_meta:g._meta})),O=(_??[]).filter(g=>!v||g.uri.toLowerCase().includes(v)||g.name?.toLowerCase().includes(v)||g.description?.toLowerCase().includes(v)).map(g=>({name:g.name??g.uri,title:g.name,description:g.description,kind:"resource",uri:g.uri})),q=(R??[]).filter(g=>!v||g.name.toLowerCase().includes(v)||g.id.toLowerCase().includes(v)||g.description?.toLowerCase().includes(v)).map(g=>({name:g.name,title:g.name,description:g.description??void 0,kind:"skill",skill:g}));return[...T,...O,...q]},D=f?.item.kind==="prompt"?{name:f.item.name,title:f.item.title,arguments:f.item.arguments,description:f.item.description,_meta:f.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(fe,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:x,queryFn:M,onSelect:b,onOpenChange:l=>{if(n&&(n.current=l),l)F.current=Date.now(),S.current=!1,$("chat_picker_opened",{picker:"/"});else{const m=F.current;$("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:m?Date.now()-m:null}),F.current=null}}}),h.jsx(ie,{prompt:D,setPrompt:()=>r(null),onSubmit:j}),h.jsx(ie,{prompt:u?.prompt??null,setPrompt:()=>a(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ce(t,e,n){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>ae(n),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>ae(n),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function lt(t,e,n){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Je(n),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function ct(t,e,n){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(n),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(n),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ye="Ask anything, / for prompts & skills, @ for agents & resources...";function dt(t){return[Le.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),be.configure({placeholder:()=>t.current??ye,showOnlyWhenEditable:!1}),Me,Re]}function Ft({tiptapDoc:t,setTiptapDoc:e,disabled:n=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:c,children:d}){const p=C.useRef(o),w=C.useRef(e),x=C.useRef(s),f=C.useRef(i),r=De({extensions:dt(f),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ye,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(u,a)=>a.key==="Enter"&&!a.shiftKey&&x.current&&!c?.current?(a.preventDefault(),p.current?.(),!0):!1},onUpdate:({editor:u})=>{w.current(u?.getJSON())}});return C.useEffect(()=>{r?.setEditable(!n)},[r,n]),C.useEffect(()=>{p.current=o},[o]),C.useEffect(()=>{w.current=e},[e]),C.useEffect(()=>{x.current=s},[s]),C.useEffect(()=>{f.current=i},[i]),C.useEffect(()=>{if(!r||r.isDestroyed)return;const u=JSON.stringify(r.getJSON()),a=JSON.stringify(t||{type:"doc",content:[]});u!==a&&r.commands.setContent(t||{type:"doc",content:[]})},[r,t]),h.jsx(je.Provider,{value:{editor:r},children:d})}function It(t){const e=H.c(29),{disabled:n,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:c,suggestionOpenRef:d,ref:p,className:w}=t,x=n===void 0?!1:n,f=i===void 0?!1:i,{editor:r}=ve();let u,a;if(e[0]!==r?(u=()=>({focus:()=>{r?.commands.focus()},clear:()=>{r?.commands.clearContent(!0)},appendText:y=>{if(!r)return;const _=r.state.doc.textContent.trim()==="";r.commands.focus("end"),_||r.commands.insertContent(" "),r.commands.insertContent(y)},syncVoiceText:(y,_)=>{if(r&&(r.commands.setContent(y||{type:"doc",content:[]}),_)){r.commands.focus("end");const R=r.state.doc.textContent.trim().length>0;r.commands.insertContent({type:"text",text:R?" "+_:_})}},restoreContent:y=>{r&&r.commands.setContent(y||{type:"doc",content:[]})}}),a=[r],e[0]=r,e[1]=u,e[2]=a):(u=e[1],a=e[2]),C.useImperativeHandle(p??null,u,a),!r)return null;const k=x&&"cursor-not-allowed opacity-70",F=x&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==w||e[4]!==k||e[5]!==F?(S=we("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",w,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",k,F),e[3]=w,e[4]=k,e[5]=F,e[6]=S):S=e[6];let b;e[7]!==r||e[8]!==S?(b=h.jsx(Ae,{editor:r,className:S}),e[7]=r,e[8]=S,e[9]=b):b=e[9];const j=s??null;let I;e[10]!==r||e[11]!==d||e[12]!==j?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(at,{editor:r,virtualMcpId:j,suggestionOpenRef:d})}),e[10]=r,e[11]=d,e[12]=j,e[13]=I):I=e[13];const M=s??null;let D;e[14]!==r||e[15]!==d||e[16]!==M?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ge,{editor:r,virtualMcpId:M,suggestionOpenRef:d})}),e[14]=r,e[15]=d,e[16]=M,e[17]=D):D=e[17];let l;e[18]!==x||e[19]!==r||e[20]!==c||e[21]!==o||e[22]!==f?(l=f&&o&&!x?h.jsx(Ve,{editor:r,selectedModel:o,onUnsupportedFile:c}):null,e[18]=x,e[19]=r,e[20]=c,e[21]=o,e[22]=f,e[23]=l):l=e[23];let m;return e[24]!==I||e[25]!==D||e[26]!==l||e[27]!==b?(m=h.jsxs(h.Fragment,{children:[b,I,D,l]}),e[24]=I,e[25]=D,e[26]=l,e[27]=b,e[28]=m):m=e[28],m}export{Ft as T,Ct as U,It as a,Xe as p,St as u};
1
+ import{c as H,r as C,b as G,j as h,t as N,Z as xe,B as ke,o as de,X as ue,K as Z,q as $,es as me,c$ as oe,et as z,l as we}from"./index-OBKgoLrS.js";import{S as fe,s as be}from"./suggestion-hd077eb-.js";import{f as Pe,h as _e,j as Ce,i as B,k as Se,P as ie,l as Fe,c as Ie,u as De,n as je,d as ve,e as Me,F as Re,s as Le,b as Ae}from"./index-yiQcNbRY.js";import{d as Ee,h as Ne,c as Te,b as Qe,D as $e}from"./dialog-BI1xJ9QE.js";import{aX as Oe}from"./agent-icon-Cy4Knhmf.js";import"./chat-context-DVCvFwd3.js";import{m as Ue,i as qe,a as Ke}from"./decopilot-YF_T6wlZ.js";import{u as pe}from"./use-mcp-client-BLH9AyVn.js";import{b as ze}from"./repository-binding-BXNOickW.js";import{g as Be}from"./use-project-scope-C7BcZz2G.js";import{g as ne,s as he}from"./gateway-client-DLwMoVSk.js";import{l as ae,g as ge}from"./use-mcp-prompts-Dn5An3ZZ.js";import{f as He,a as Je}from"./use-org-fs-CAxytlY9.js";async function Xe(t,e,n,s,i,o){if(!Ue(e)){N.error("Selected model does not support file uploads");return}const c=n.type||"application/octet-stream";if(!qe(c,e)){const p=Ke(e).parts.map(x=>o(x)).join(", "),w=e?.title??"This model";i?i({fileName:n.name,modelName:w,accepted:p}):N.error(`"${n.name}" can't be attached`,{description:`${w} accepts ${p}.`});return}const d=10*1024*1024;if(n.size>d){N.error(`File "${n.name}" exceeds 10MB limit`);return}try{const p=new FileReader,w=new Promise((r,u)=>{p.onload=()=>{const a=p.result;if(typeof a!="string"){u(new Error("Failed to read file as data URL"));return}const k=a.includes(",")?a.split(",")[1]??a:a;r(k)},p.onerror=u});p.readAsDataURL(n);const x=await w,f={id:crypto.randomUUID(),name:n.name,mimeType:n.type||"application/octet-stream",size:n.size,data:x};Pe(t,{from:s,to:s},f)}catch(p){console.error("Failed to process file:",p),N.error(`Failed to load file "${n.name}"`)}}function Ve(t){const e=H.c(9),{editor:n,selectedModel:s,onUnsupportedFile:i}=t,o=G(),c=C.useRef(Ye);let d,p;e[0]!==n||e[1]!==i||e[2]!==s||e[3]!==o?(d=()=>{c.current=async(f,r)=>{await Xe(n,s,f,r,i,o)}},p=[n,s,i,o],e[0]=n,e[1]=i,e[2]=s,e[3]=o,e[4]=d,e[5]=p):(d=e[4],p=e[5]),C.useEffect(d,p);let w,x;return e[6]!==n?(w=()=>{if(n?.isDestroyed)return;const f=new _e("fileDropHandler");n.state.plugins.find(a=>a.spec.key===f)&&n.unregisterPlugin(f);const u=new Ce({key:f,props:{handleDrop:(a,k,F,S)=>{if(S)return!1;const b=k.dataTransfer?.files;if(!b||b.length===0)return!1;k.preventDefault();const j=a.posAtCoords({left:k.clientX,top:k.clientY});if(!j)return!1;const I=Array.from(b);return(async()=>{let M=j.pos;for(const D of I)await c.current?.(D,M),M=a.state.selection.to})(),!0},handlePaste:(a,k)=>{const F=k.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(k.preventDefault(),(async()=>{let b=a.state.selection.from;for(const j of S){const I=j.getAsFile();I&&(await c.current?.(I,b),b=a.state.selection.to)}})(),!0)}}});return n.registerPlugin(u),()=>{n?.isDestroyed||n.unregisterPlugin(f)}},x=[n],e[6]=n,e[7]=w,e[8]=x):(w=e[7],x=e[8]),C.useEffect(w,x),null}function We(t){return t.kind==="file"}function Ye(){return Promise.resolve()}function Ct(t){const e=H.c(43),{info:n,onClose:s}=t,i=G(),o=n!==null;let c;e[0]!==s?(c=v=>!v&&s(),e[0]=s,e[1]=c):c=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=d):d=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:d.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=p):p=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(xe,{size:18})}),e[4]=w):w=e[4];let x;e[5]!==i?(x=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=x):x=e[6];let f;e[7]!==x?(f=h.jsx(Ee,{className:"text-xl font-semibold tracking-tight",children:x}),e[7]=x,e[8]=f):f=e[8];const r=n?.fileName;let u;e[9]!==r?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",r,"”"]}),e[9]=r,e[10]=u):u=e[10];let a;e[11]!==i?(a=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=a):a=e[12];let k;e[13]!==a||e[14]!==u?(k=h.jsxs(Ne,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",a]}),e[13]=a,e[14]=u,e[15]=k):k=e[15];let F;e[16]!==k||e[17]!==f?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,h.jsxs(Te,{className:"relative gap-4",children:[w,h.jsxs("div",{children:[f,k]})]})]}),e[16]=k,e[17]=f,e[18]=F):F=e[18];const S=n?.modelName??"";let b;e[19]!==i||e[20]!==S?(b=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=b):b=e[21];let j;e[22]!==b?(j=h.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:b}),e[22]=b,e[23]=j):j=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const M=n?.accepted;let D;e[25]!==M?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:M})]}),e[25]=M,e[26]=D):D=e[26];let l;e[27]!==j||e[28]!==D?(l=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"rounded-xl border border-border p-4",children:[j,D]})}),e[27]=j,e[28]=D,e[29]=l):l=e[29];let m;e[30]!==i?(m=i("chat.uploader.gotIt"),e[30]=i,e[31]=m):m=e[31];let y;e[32]!==s||e[33]!==m?(y=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(ke,{onClick:s,children:m})}),e[32]=s,e[33]=m,e[34]=y):y=e[34];let _;e[35]!==F||e[36]!==l||e[37]!==y?(_=h.jsxs(Qe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ze,children:[F,l,y]}),e[35]=F,e[36]=l,e[37]=y,e[38]=_):_=e[38];let R;return e[39]!==o||e[40]!==c||e[41]!==_?(R=h.jsx($e,{open:o,onOpenChange:c,children:_}),e[39]=o,e[40]=c,e[41]=_,e[42]=R):R=e[42],R}function Ze(t){return t.preventDefault()}function St(){const t=H.c(3),[e,n]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>n(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:n,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}const Ge=t=>{const e=H.c(53),{editor:n,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),c=de(),{org:d}=ue(),p=ze();let w;e[0]!==p?(w=Be(p),e[0]=p,e[1]=w):w=e[1];const x=w;let f;e[2]!==d.id||e[3]!==d.slug||e[4]!==s?(f={connectionId:s,orgId:d.id,orgSlug:d.slug},e[2]=d.id,e[3]=d.slug,e[4]=s,e[5]=f):f=e[5];const r=pe(f);let u;e[6]!==d.id||e[7]!==s?(u=Z.virtualMcpResources(s,d.id),e[6]=d.id,e[7]=s,e[8]=u):u=e[8];const a=u,[k,F]=C.useState("categories");let S;e[9]!==k?(S=()=>k,e[9]=k,e[10]=S):S=e[10];const b=C.useEffectEvent(S),j=C.useRef(null),I=C.useRef(!1),M=s??"default";let D;e[11]!==k||e[12]!==d.id||e[13]!==M?(D=["at-mention",d.id,M,k],e[11]=k,e[12]=d.id,e[13]=M,e[14]=D):D=e[14];const l=D;let m;e[15]!==o?(m=o("chat.mentionAt.agentsTitle"),e[15]=o,e[16]=m):m=e[16];let y;e[17]!==o?(y=o("chat.mentionAt.agentsDescription"),e[17]=o,e[18]=y):y=e[18];let _;e[19]!==m||e[20]!==y?(_={name:"agents",title:m,description:y,kind:"category",drillable:!0},e[19]=m,e[20]=y,e[21]=_):_=e[21];let R;e[22]!==o?(R=o("chat.mentionAt.resourcesTitle"),e[22]=o,e[23]=R):R=e[23];let v;e[24]!==o?(v=o("chat.mentionAt.resourcesDescription"),e[24]=o,e[25]=v):v=e[25];let T;e[26]!==R||e[27]!==v?(T={name:"resources",title:R,description:v,kind:"category",drillable:!0},e[26]=R,e[27]=v,e[28]=T):T=e[28];let O;e[29]!==T||e[30]!==_?(O=[_,T],e[29]=T,e[30]=_,e[31]=O):O=e[31];const q=O;let g;e[32]!==r||e[33]!==n||e[34]!==o?(g=async U=>{const{item:P,range:K}=U;if($("chat_picker_item_selected",{picker:"@",item_kind:P.kind,item_name:P.name}),P.kind!=="category"&&(I.current=!0),P.kind==="category")return F(P.name==="agents"?"agents":"resources"),!1;if(P.kind==="agent"&&P.agentId){B(n,K,{id:P.agentId,name:P.name,metadata:{agentId:P.agentId,title:P.name},char:"@"}),F("categories");return}if(P.kind==="resource"&&P.uri&&r){try{const Q=await me(r,P.uri);B(n,K,{id:P.uri,name:P.uri,metadata:Q.contents,char:"@"})}catch(Q){console.error("[at-mention] Failed to fetch resource:",Q),N.error(o("chat.mentionAt.failedToLoadResource"))}F("categories");return}},e[32]=r,e[33]=n,e[34]=o,e[35]=g):g=e[35];const ee=g;let J;e[36]!==p||e[37]!==q||e[38]!==r||e[39]!==x||e[40]!==b||e[41]!==c||e[42]!==a||e[43]!==s?(J=async U=>{const{query:P}=U,K=b();if(K==="categories"){if(!P.trim())return q;const A=P.toLowerCase(),L=p.filter(E=>E.status==="active"&&(!E.id||!oe(E.id))&&!x.has(E.id)&&E.id!==s&&(E.title.toLowerCase().includes(A)||E.description?.toLowerCase().includes(A))).map(et),Y=await(async()=>{if(!r)return[];let E=c.getQueryData(a);return E||(E=await c.fetchQuery({queryKey:a,queryFn:()=>z(r),staleTime:6e4})),(E?.resources??[]).filter(re=>re.uri.toLowerCase().includes(A)||re.name?.toLowerCase().includes(A)||re.description?.toLowerCase().includes(A)).map(tt)})();return[...L,...Y]}if(K==="agents"){let A=p.filter(L=>L.status==="active"&&(!L.id||!oe(L.id))&&!x.has(L.id)&&L.id!==s);if(P.trim()){const L=P.toLowerCase();A=A.filter(Y=>Y.title.toLowerCase().includes(L)||Y.description?.toLowerCase().includes(L))}return A.map(st)}if(!r)return[];let Q=c.getQueryData(a);Q?c.fetchQuery({queryKey:a,queryFn:()=>z(r),staleTime:6e4}).catch(rt):Q=await c.fetchQuery({queryKey:a,queryFn:()=>z(r),staleTime:6e4});let W=Q?.resources??[];if(P.trim()){const A=P.toLowerCase();W=W.filter(L=>L.uri.toLowerCase().includes(A)||L.name?.toLowerCase().includes(A)||L.description?.toLowerCase().includes(A))}return W.map(nt)},e[36]=p,e[37]=q,e[38]=r,e[39]=x,e[40]=b,e[41]=c,e[42]=a,e[43]=s,e[44]=J):J=e[44];const te=J;let X;e[45]!==i?(X=U=>{if(i&&(i.current=U),U)j.current=Date.now(),I.current=!1,$("chat_picker_opened",{picker:"@"});else{const P=j.current;$("chat_picker_closed",{picker:"@",outcome:I.current?"selected":"dismissed",duration_ms:P?Date.now()-P:null}),j.current=null,F("categories")}},e[45]=i,e[46]=X):X=e[46];const se=X;let V;return e[47]!==n||e[48]!==te||e[49]!==ee||e[50]!==se||e[51]!==l?(V=h.jsx(fe,{editor:n,char:"@",pluginKey:"atDropdownMenu",queryKey:l,queryFn:te,onSelect:ee,onOpenChange:se}),e[47]=n,e[48]=te,e[49]=ee,e[50]=se,e[51]=l,e[52]=V):V=e[52],V};function et(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function tt(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function st(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function rt(){}function nt(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function le(t,e,n,s,i,o,c){try{const d=await ge(n,s,o);B(t,e,{id:s,name:he(s,i),metadata:d.messages,char:"/",kind:"prompt",args:o})}catch(d){console.error("[slash] Failed to fetch prompt:",d),N.error(c.t("chat.mentionSlash.failedLoadPrompt"))}}async function ot(t,e,n,s,i){try{const o=await me(n,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),N.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function it(t,e,n,s,i){try{const{files:o,omittedPaths:c}=await He(n,s.volume,s.path),d={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:c};B(t,e,{id:s.id,name:s.name,metadata:d,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),N.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const at=({editor:t,virtualMcpId:e,suggestionOpenRef:n})=>{const s=G(),i=de(),{org:o}=ue(),c=pe({connectionId:e,orgId:o.id,orgSlug:o.slug}),d=Z.virtualMcpPrompts(e,o.id),p=Z.virtualMcpResources(e,o.id),w=Z.slashSkills(o.id),x=["slash-mention",o.id,e??"default"],[f,r]=C.useState(null),[u,a]=C.useState(null),k=Se(t);k&&(k.onEditChip=async l=>{if(c)try{const y=(await ce(i,d,c)).find(_=>_.name===l.promptId);if(!y?.arguments||y.arguments.length===0)return;a({...l,prompt:y})}catch(m){console.error("[slash] Failed to load prompt for editing:",m),N.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),b=async({item:l,range:m})=>{if($("chat_picker_item_selected",{picker:"/",item_kind:l.kind,item_name:l.name}),S.current=!0,!!c)if(l.kind==="prompt"){if(l.arguments&&l.arguments.length>0){r({range:m,item:l});return}const y=ne(l._meta);await le(t,m,c,l.name,y,void 0,{t:s})}else l.kind==="skill"?l.skill&&await it(t,m,o.slug,l.skill,{t:s}):l.uri&&await ot(t,m,c,l.uri,{t:s})},j=async l=>{if(!f||!c)return;const{range:m,item:y}=f,_=ne(y._meta);await le(t,m,c,y.name,_,l,{t:s}),r(null)},I=async l=>{if(!(!u||!c)){if(!Fe(t,u.pos,u.promptId)){N.error(s("chat.mentionSlash.failedUpdatePrompt")),a(null);return}try{const m=await ge(c,u.promptId,l),y=ne(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Ie({id:u.promptId,name:he(u.promptId,y),metadata:m.messages,char:"/",kind:"prompt",args:l})).run(),$("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(m){console.error("[slash] Failed to update prompt:",m),N.error(s("chat.mentionSlash.failedUpdatePrompt"))}a(null)}},M=async l=>{const{query:m}=l;if(!c)return[];const[y,_,R]=await Promise.all([ce(i,d,c),ct(i,p,c),lt(i,w,o.slug)]),v=m.trim().toLowerCase(),T=(y??[]).filter(g=>!v||g.name.toLowerCase().includes(v)||g.title?.toLowerCase().includes(v)||g.description?.toLowerCase().includes(v)).map(g=>({name:g.name,title:g.title,description:g.description,kind:"prompt",arguments:g.arguments,_meta:g._meta})),O=(_??[]).filter(g=>!v||g.uri.toLowerCase().includes(v)||g.name?.toLowerCase().includes(v)||g.description?.toLowerCase().includes(v)).map(g=>({name:g.name??g.uri,title:g.name,description:g.description,kind:"resource",uri:g.uri})),q=(R??[]).filter(g=>!v||g.name.toLowerCase().includes(v)||g.id.toLowerCase().includes(v)||g.description?.toLowerCase().includes(v)).map(g=>({name:g.name,title:g.name,description:g.description??void 0,kind:"skill",skill:g}));return[...T,...O,...q]},D=f?.item.kind==="prompt"?{name:f.item.name,title:f.item.title,arguments:f.item.arguments,description:f.item.description,_meta:f.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(fe,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:x,queryFn:M,onSelect:b,onOpenChange:l=>{if(n&&(n.current=l),l)F.current=Date.now(),S.current=!1,$("chat_picker_opened",{picker:"/"});else{const m=F.current;$("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:m?Date.now()-m:null}),F.current=null}}}),h.jsx(ie,{prompt:D,setPrompt:()=>r(null),onSubmit:j}),h.jsx(ie,{prompt:u?.prompt??null,setPrompt:()=>a(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ce(t,e,n){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>ae(n),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>ae(n),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function lt(t,e,n){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Je(n),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function ct(t,e,n){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(n),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(n),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ye="Ask anything, / for prompts & skills, @ for agents & resources...";function dt(t){return[Le.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),be.configure({placeholder:()=>t.current??ye,showOnlyWhenEditable:!1}),Me,Re]}function Ft({tiptapDoc:t,setTiptapDoc:e,disabled:n=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:c,children:d}){const p=C.useRef(o),w=C.useRef(e),x=C.useRef(s),f=C.useRef(i),r=De({extensions:dt(f),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ye,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(u,a)=>a.key==="Enter"&&!a.shiftKey&&x.current&&!c?.current?(a.preventDefault(),p.current?.(),!0):!1},onUpdate:({editor:u})=>{w.current(u?.getJSON())}});return C.useEffect(()=>{r?.setEditable(!n)},[r,n]),C.useEffect(()=>{p.current=o},[o]),C.useEffect(()=>{w.current=e},[e]),C.useEffect(()=>{x.current=s},[s]),C.useEffect(()=>{f.current=i},[i]),C.useEffect(()=>{if(!r||r.isDestroyed)return;const u=JSON.stringify(r.getJSON()),a=JSON.stringify(t||{type:"doc",content:[]});u!==a&&r.commands.setContent(t||{type:"doc",content:[]})},[r,t]),h.jsx(je.Provider,{value:{editor:r},children:d})}function It(t){const e=H.c(29),{disabled:n,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:c,suggestionOpenRef:d,ref:p,className:w}=t,x=n===void 0?!1:n,f=i===void 0?!1:i,{editor:r}=ve();let u,a;if(e[0]!==r?(u=()=>({focus:()=>{r?.commands.focus()},clear:()=>{r?.commands.clearContent(!0)},appendText:y=>{if(!r)return;const _=r.state.doc.textContent.trim()==="";r.commands.focus("end"),_||r.commands.insertContent(" "),r.commands.insertContent(y)},syncVoiceText:(y,_)=>{if(r&&(r.commands.setContent(y||{type:"doc",content:[]}),_)){r.commands.focus("end");const R=r.state.doc.textContent.trim().length>0;r.commands.insertContent({type:"text",text:R?" "+_:_})}},restoreContent:y=>{r&&r.commands.setContent(y||{type:"doc",content:[]})}}),a=[r],e[0]=r,e[1]=u,e[2]=a):(u=e[1],a=e[2]),C.useImperativeHandle(p??null,u,a),!r)return null;const k=x&&"cursor-not-allowed opacity-70",F=x&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==w||e[4]!==k||e[5]!==F?(S=we("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",w,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",k,F),e[3]=w,e[4]=k,e[5]=F,e[6]=S):S=e[6];let b;e[7]!==r||e[8]!==S?(b=h.jsx(Ae,{editor:r,className:S}),e[7]=r,e[8]=S,e[9]=b):b=e[9];const j=s??null;let I;e[10]!==r||e[11]!==d||e[12]!==j?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(at,{editor:r,virtualMcpId:j,suggestionOpenRef:d})}),e[10]=r,e[11]=d,e[12]=j,e[13]=I):I=e[13];const M=s??null;let D;e[14]!==r||e[15]!==d||e[16]!==M?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ge,{editor:r,virtualMcpId:M,suggestionOpenRef:d})}),e[14]=r,e[15]=d,e[16]=M,e[17]=D):D=e[17];let l;e[18]!==x||e[19]!==r||e[20]!==c||e[21]!==o||e[22]!==f?(l=f&&o&&!x?h.jsx(Ve,{editor:r,selectedModel:o,onUnsupportedFile:c}):null,e[18]=x,e[19]=r,e[20]=c,e[21]=o,e[22]=f,e[23]=l):l=e[23];let m;return e[24]!==I||e[25]!==D||e[26]!==l||e[27]!==b?(m=h.jsxs(h.Fragment,{children:[b,I,D,l]}),e[24]=I,e[25]=D,e[26]=l,e[27]=b,e[28]=m):m=e[28],m}export{Ft as T,Ct as U,It as a,Xe as p,St as u};
@@ -1 +1 @@
1
- import{c as k,j as h,r as C,l as L}from"./index-BOGZM7Pw.js";import{n as Z}from"./LinkBroken01-BQ3rvf4O.js";import{A as y}from"./agent-icon-QobcC4y1.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
1
+ import{c as k,j as h,r as C,l as L}from"./index-OBKgoLrS.js";import{n as Z}from"./LinkBroken01-Br_uH__F.js";import{A as y}from"./agent-icon-Cy4Knhmf.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
@@ -1 +1 @@
1
- import{c as n,l as r,j as i,be as p}from"./index-BOGZM7Pw.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
1
+ import{c as n,l as r,j as i,be as p}from"./index-OBKgoLrS.js";function c(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{c as L};
@@ -1 +1 @@
1
- import{c as p,j as s,b as y,P as b,O as _,h as g,B as S,L as j,i as v,k as A,l as N}from"./index-BOGZM7Pw.js";import{R}from"./required-auth-layout-CKgEUo-z.js";import{u as T}from"./use-deployment-admin-D0_O_QSr.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(o=>s.jsx(j,{to:o.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(o.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(o.labelKey)},o.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let n;return e[4]!==t?(n=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=n):n=e[5],n}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!a){let i;e[1]!==t?(i=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==i||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:i,description:l,action:c}),e[10]=i,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let n;e[14]!==t?(n=t("admin.layout.adminDashboard"),e[14]=t,e[15]=n):n=e[15];let o;e[16]!==n?(o=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:n})}),e[16]=n,e[17]=o):o=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==o?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[o,u,f]}),e[20]=o,e[21]=x):x=e[21],x}function P(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{P as default};
1
+ import{c as p,j as s,b as y,P as b,O as _,h as g,B as S,L as j,i as v,k as A,l as N}from"./index-OBKgoLrS.js";import{R}from"./required-auth-layout-D2VAA74b.js";import{u as T}from"./use-deployment-admin-WZmDKf2R.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(o=>s.jsx(j,{to:o.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(o.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(o.labelKey)},o.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let n;return e[4]!==t?(n=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=n):n=e[5],n}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!a){let i;e[1]!==t?(i=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==i||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:i,description:l,action:c}),e[10]=i,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let n;e[14]!==t?(n=t("admin.layout.adminDashboard"),e[14]=t,e[15]=n):n=e[15];let o;e[16]!==n?(o=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:n})}),e[16]=n,e[17]=o):o=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==o?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[o,u,f]}),e[20]=o,e[21]=x):x=e[21],x}function P(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{P as default};
@@ -1 +1 @@
1
- import{c as _,f as h,u as x,X as j,e5 as S,ay as b,fs as v,j as p,N as d}from"./index-BOGZM7Pw.js";import{L}from"./legacy-main-redirect-B6sO18wU.js";import"./thread-route-esGiDSRu.js";function k(){const e=_.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=h(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=j(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const y=S({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:y,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};
1
+ import{c as _,f as h,u as x,X as j,e5 as S,ay as b,fs as v,j as p,N as d}from"./index-OBKgoLrS.js";import{L}from"./legacy-main-redirect-BKsErYAe.js";import"./thread-route-elF7W4D7.js";function k(){const e=_.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=h(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=j(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const y=S({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:y,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};
@@ -1 +1 @@
1
- import{c as v,J as t,j as p,N as m,a6 as c,f as y,u as I,a4 as E,e5 as k,e6 as R,e7 as S,e8 as b}from"./index-BOGZM7Pw.js";import{b as L}from"./thread-route-esGiDSRu.js";function P(d){const a=v.c(78),{target:h}=d,{route:s,search:r}=h;switch(s.to){case c.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:c.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case c.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:c.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case c.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:c.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case c.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:c.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case c.library:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:c.library,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case t.root:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case t.tasks:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.reports:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.siteEditor:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.siteEditorContent:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.siteEditorCode:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.settings:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.assets:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.hosting:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.e2e:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.analytics:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.analytics,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.experiments:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.experiments,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.monitor:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.monitor,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.automations:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.automation:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.app:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.view:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.outputFile:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.outputDeck:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.libraryFile:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.connectSources:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}}}function A(d){const a=v.c(17),{children:h}=d;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=y(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const u=I(e),j=L(),g=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==j||a[3]!==g||a[4]!==i||a[5]!==r.agentId||a[6]!==u?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:u.virtualmcpid,fallbackAgentId:j}),f=(u.main!==void 0?R({org:i,agentId:n,main:u.main,search:u}):null)??S({org:i,routePath:g,search:u}),a[2]=j,a[3]=g,a[4]=i,a[5]=r.agentId,a[6]=u,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(P,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&u.virtualmcpid!==void 0){let l;a[13]!==u?(l=b(u),a[13]=u,a[14]=l):l=a[14];let x;return a[15]!==l?(x=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=x):x=a[16],x}return h??null}export{P as L,A as a};
1
+ import{c as v,J as t,j as p,N as m,a6 as c,f as y,u as I,a4 as E,e5 as k,e6 as R,e7 as S,e8 as b}from"./index-OBKgoLrS.js";import{b as L}from"./thread-route-elF7W4D7.js";function P(d){const a=v.c(78),{target:h}=d,{route:s,search:r}=h;switch(s.to){case c.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:c.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case c.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:c.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case c.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:c.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case c.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:c.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case c.library:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:c.library,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case t.root:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case t.tasks:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.reports:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.siteEditor:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.siteEditorContent:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.siteEditorCode:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.settings:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.assets:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.hosting:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.e2e:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.analytics:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.analytics,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.experiments:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.experiments,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.monitor:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.monitor,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.automations:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.automation:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.app:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.view:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.outputFile:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.outputDeck:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.libraryFile:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.connectSources:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}}}function A(d){const a=v.c(17),{children:h}=d;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=y(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const u=I(e),j=L(),g=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==j||a[3]!==g||a[4]!==i||a[5]!==r.agentId||a[6]!==u?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:u.virtualmcpid,fallbackAgentId:j}),f=(u.main!==void 0?R({org:i,agentId:n,main:u.main,search:u}):null)??S({org:i,routePath:g,search:u}),a[2]=j,a[3]=g,a[4]=i,a[5]=r.agentId,a[6]=u,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(P,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&u.virtualmcpid!==void 0){let l;a[13]!==u?(l=b(u),a[13]=u,a[14]=l):l=a[14];let x;return a[15]!==l?(x=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=x):x=a[16],x}return h??null}export{P as L,A as a};
@@ -0,0 +1 @@
1
+ import{c as i,j as o}from"./index-OBKgoLrS.js";import{C as m}from"./index-B_hHkWjN.js";import{L as p}from"./library-tab-DsEkCV3p.js";import"./use-mobile-VzbSoGMr.js";import"./thread-button-9Si-8tRp.js";import"./agent-icon-Cy4Knhmf.js";import"./AlertCircle-SZjuoMGZ.js";import"./Tool01-bUbUk8P7.js";import"./ArrowUp-CwQ1Q4VU.js";import"./ArrowLeft-BgUASx7T.js";import"./LinkBroken01-Br_uH__F.js";import"./ShoppingBag01-b6nsxdpv.js";import"./ZoomOut-FmWelmyS.js";import"./Building02-Dl4T9LNW.js";import"./CheckCircle-DgPqabhN.js";import"./Check-BmlrCmw2.js";import"./ChevronUp-6u3SxMoQ.js";import"./UserSquare-COhFlYGn.js";import"./Copy01-CkifUnly.js";import"./CreditCard01-K1-aiN4b.js";import"./DotsVertical-DmnxoC5N.js";import"./Image01-0yU0yxN3.js";import"./Palette-TILTwgWi.js";import"./XClose-KiYAVi9i.js";import"./Key01-CUdVlBTP.js";import"./Link01-7z-hjzg6.js";import"./LinkExternal01-DvsbzHx1.js";import"./Monitor01-DQFu-UId.js";import"./Sun-CJnoMxxW.js";import"./Plus-Cn427okX.js";import"./SearchMd-Pjthnah9.js";import"./Trash01-CuygCR6g.js";import"./Upload01-XLRbUIeR.js";import"./User01-CVYpMQND.js";import"./Users01-pRhNWrqE.js";import"./X-C5Ha4Ozq.js";import"./use-chat-layout-state-Che4U26N.js";import"./use-file-configs-Cb37DNRD.js";import"./use-organization-settings-HU4xq5ST.js";import"./schema-EK91AuqK.js";import"./task-board-BzFCmVqC.js";import"./site-slug-DebpOoQq.js";import"./thread-route-elF7W4D7.js";import"./use-panel-navigate-CRJv_Vri.js";import"./use-project-scope-C7BcZz2G.js";import"./repository-binding-BXNOickW.js";import"./use-mcp-client-BLH9AyVn.js";import"./auth-Bj6m-efj.js";import"./thread-intent-Dk0A6ZtT.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./sheet-Bogqpryv.js";import"./tooltip-B7_4-yXG.js";import"./index-BnsOjLj5.js";import"./toolbar-icon-button-BZarRBLi.js";import"./shell-layout-DG1i0o3w.js";import"./avatar-s9hDkne5.js";import"./download-app-dialog-D_tAj3wC.js";import"./dialog-BI1xJ9QE.js";import"./use-clock-tick-C5v7xKB3.js";import"./command-8n8txvgK.js";import"./index-Co0BO1QR.js";import"./integration-icon-D2va06Ai.js";import"./project-icon-DFU40NC2.js";import"./new-project-dialog-BXg1Q86m.js";import"./input-Kws07Y5R.js";import"./label-BsArcFBD.js";import"./repository-import-picker-Tdhv79ml.js";import"./use-navigate-to-agent-DC1x2gVp.js";import"./repository-picker-PURciVL4.js";import"./useInfiniteQuery-DsKCSoLS.js";import"./infiniteQueryObserver-Bysh3DKm.js";import"./collection-search-BXjiZfAv.js";import"./use-debounced-value-8t15K3Ro.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-D2VAA74b.js";import"./autosend-Bo0qMh1p.js";import"./use-org-sso-pd_XhDQs.js";import"./resizable-pZE9eaKX.js";import"./icon-button-DJOiw-b_.js";import"./search-toggle-HnNumyyq.js";import"./alert-dialog-BNhkZQ_x.js";import"./location-DPIrGNp7.js";import"./use-org-fs-CAxytlY9.js";import"./use-org-repo-syncs-7w0mnChN.js";import"./textarea-Cat7zkJf.js";import"./markdown-DNNvyUFL.js";import"./org-file-open-context-BosMDtdb.js";import"./file-share-button-nm9-puhb.js";import"./popover-Cb13NGPe.js";import"./preview-dialog-hfrg0TdN.js";import"./preview-content-DOOZEe7K.js";import"./file-preview-DraufLN1.js";import"./utils-BdWBNy3y.js";import"./editor-MmTYGWbR.js";import"./file-type-icon---8xc9A3.js";import"./folder-icon-BKl95mgA.js";import"./skill-md-ChfVs4uF.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./table-DdKwpV9k.js";function Zt(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(m.Content,{children:o.jsx(p,{})}),r[0]=t):t=r[0],t}export{Zt as default};
@@ -1,4 +1,4 @@
1
- import{c as D,b as q,j as t,aS as pe,X as Me,o as Dt,r as I,B as te,l as J,K as de,t as Y,G as Ue,F as er,H as tr,I as rr,m as sr,ao as nr,d as lr,u as ar,aJ as ir,n as Ve,P as or,e9 as cr}from"./index-BOGZM7Pw.js";import{n as dr,s as ur}from"./Image01-DAe5wd3u.js";import{s as fr}from"./Plus-Dk5G0eGJ.js";import{i as Ke}from"./Upload01-C13aB89v.js";import{u as mr}from"./use-mobile-9GiVme_1.js";import{I as pr}from"./icon-button-c-SlONOU.js";import{S as hr}from"./search-toggle-BY33vUyT.js";import{f as br,e as xr,b as gr,A as yr,a as vr,d as jr,c as wr,g as kr}from"./alert-dialog-13GPwGkk.js";import{b as tt,D as rt,d as st,i as Sr,c as jt,h as wt,e as kt}from"./dialog-CwJ0Tacd.js";import{I as He}from"./input-C0ZWiiGy.js";import{b as W,p as Pt,H as ue,s as Ee,c as we,d as Ot,e as Ft,h as ot,l as Nr}from"./location-DPIrGNp7.js";import{u as Cr}from"./use-debounced-value-C1TKx6na.js";import{c as ge,h as Ye,d as $r,i as nt,j as ct,k as Dr,l as Tt,m as Pr,n as Or}from"./use-org-fs-DF_BlZtj.js";import{u as Fr,a as Tr}from"./use-org-repo-syncs-kX31P2gW.js";import{T as Er}from"./textarea-e3h0PKfc.js";import{t as zr,n as Mr}from"./ChevronUp-C9klasvw.js";import{a as qe}from"./Palette-BFtTwWPg.js";import{b6 as Ar,b as Br,h as Et,a_ as Lr,A as _r}from"./agent-icon-QobcC4y1.js";import{i as St}from"./X-BdtW9stL.js";import{M as Rr}from"./markdown-DNk_PyOf.js";import{S as Vr}from"./file-share-button-Dfx-yCi-.js";import{L as zt}from"./preview-dialog-DBXVi9mo.js";import{F as Mt,S as At}from"./folder-icon-Bz05bjxQ.js";import{i as Ir}from"./repository-binding-CEDkA6og.js";import{i as Ur,c as Kr}from"./XClose-Bsj_jKUE.js";import{t as Hr}from"./Tool01-CGCC9pfF.js";import{i as dt}from"./ZoomOut-BQf_lYpX.js";import{i as qr}from"./DotsVertical-CXVrXTYw.js";import{i as Qr}from"./Key01-Dje7twgn.js";import{s as Xr}from"./Trash01-BA-bFjuS.js";import{t as Se}from"./format-time-CjIPQhCN.js";import{F as ze,d as lt}from"./file-type-icon-CYHSeMg9.js";import{p as Yr}from"./skill-md-ChfVs4uF.js";import{n as Gr,i as Wr}from"./ArrowUp-Duh-8Vv0.js";import{T as De,a as Jr,b as Bt,d as Zr,e as es,c as Pe}from"./table-BCWfTyhH.js";import{s as ts}from"./use-project-scope-CUYDg9gO.js";import{a as rs}from"./use-panel-navigate-4MoLzTpw.js";function ss(l){return l.kind==="file"?"file":l.hasSkill?"skill":l.hasBrand?"brand":"folder"}function ut(l){return{kind:ss(l),path:l.path,name:W(l.path),updatedAt:l.updatedAt,size:l.size??0,entry:l}}const ns=["name","updated","size"];function Nt(l){return l.kind==="file"?1:0}function Lt(l,e){const r=(n,a)=>n.name.localeCompare(a.name,void 0,{numeric:!0,sensitivity:"base"});return[...l].sort((n,a)=>{const s=Nt(n)-Nt(a);if(s!==0)return s;if(e==="updated"){const i=(a.updatedAt??"").localeCompare(n.updatedAt??"");if(i!==0)return i}if(e==="size"){const i=a.size-n.size;if(i!==0)return i}return r(n,a)})}function ls(l){if(l.kind!=="file")return null;const e=l.size;if(!e)return null;const r=["B","KB","MB","GB","TB"];let n=e,a=0;for(;n>=1024&&a<r.length-1;)n/=1024,a++;return`${n>=10||a===0?Math.round(n):n.toFixed(1)} ${r[a]}`}function as(l,e,r){return e?"color":r?"font":/^--brand-(text|fw|leading|tracking)/i.test(l)?"type":/^--brand-space/i.test(l)?"space":/^--brand-radius/i.test(l)?"radius":/^--brand-shadow/i.test(l)?"shadow":/^--brand-(duration|delay|ease)/i.test(l)?"motion":"other"}const is=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,os=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,cs=["svg","png","jpg","jpeg","webp","avif","gif"];function ds(l){return l.split(".").pop()?.toLowerCase()??""}function us(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fs(l){const e=l.trim();return os.test(e)||is.test(e)}function ms(l){const e=l.trim(),r=e.match(/^#([0-9a-f]{3})$/i);return r?.[1]?`#${[...r[1]].map(n=>n+n).join("")}`:e}function _t(l){const e=[],r=new Map,n=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let a;for(;(a=n.exec(l))!==null;){const s=a[1],i=a[2].trim();r.has(s)||e.push(s),r.set(s,i)}return e.map(s=>{const i=r.get(s),o=fs(i),c=/^--brand-font/i.test(s);return{name:s,value:i,isColor:o,isFont:c,kind:as(s,o,c)}})}const Ct=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function ps(l){return l.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??l}function hs(l){const e=[],r=new Map;for(const a of l){if(a.kind!=="color")continue;const s=ps(a.name);r.has(s)||(e.push(s),r.set(s,[])),r.get(s).push(a)}return e.map(a=>{const s=r.get(a);return{family:a,tokens:s,isRamp:s.filter(i=>/-\d+$/.test(i.name)).length>=5}}).sort((a,s)=>{const i=Ct.indexOf(a.family),o=Ct.indexOf(s.family);return i===-1&&o===-1?0:i===-1?1:o===-1?-1:i-o})}function bs(l,e,r){const n=new RegExp(`(${us(e)}\\s*:\\s*)[^;]+(;)`);if(n.test(l))return l.replace(n,(i,o,c)=>`${o}${r}${c}`);const a=l.search(/:root\s*\{/);if(a!==-1){const i=l.indexOf("{",a)+1;return`${l.slice(0,i)}
1
+ import{c as D,b as q,j as t,aS as pe,X as Me,o as Dt,r as I,B as te,l as J,K as de,t as Y,G as Ue,F as er,H as tr,I as rr,m as sr,ao as nr,d as lr,u as ar,aJ as ir,n as Ve,P as or,e9 as cr}from"./index-OBKgoLrS.js";import{n as dr,s as ur}from"./Image01-0yU0yxN3.js";import{s as fr}from"./Plus-Cn427okX.js";import{i as Ke}from"./Upload01-XLRbUIeR.js";import{u as mr}from"./use-mobile-VzbSoGMr.js";import{I as pr}from"./icon-button-DJOiw-b_.js";import{S as hr}from"./search-toggle-HnNumyyq.js";import{f as br,e as xr,b as gr,A as yr,a as vr,d as jr,c as wr,g as kr}from"./alert-dialog-BNhkZQ_x.js";import{b as tt,D as rt,d as st,i as Sr,c as jt,h as wt,e as kt}from"./dialog-BI1xJ9QE.js";import{I as He}from"./input-Kws07Y5R.js";import{b as W,p as Pt,H as ue,s as Ee,c as we,d as Ot,e as Ft,h as ot,l as Nr}from"./location-DPIrGNp7.js";import{u as Cr}from"./use-debounced-value-8t15K3Ro.js";import{c as ge,h as Ye,d as $r,i as nt,j as ct,k as Dr,l as Tt,m as Pr,n as Or}from"./use-org-fs-CAxytlY9.js";import{u as Fr,a as Tr}from"./use-org-repo-syncs-7w0mnChN.js";import{T as Er}from"./textarea-Cat7zkJf.js";import{t as zr,n as Mr}from"./ChevronUp-6u3SxMoQ.js";import{a as qe}from"./Palette-TILTwgWi.js";import{b6 as Ar,b as Br,h as Et,a_ as Lr,A as _r}from"./agent-icon-Cy4Knhmf.js";import{i as St}from"./X-C5Ha4Ozq.js";import{M as Rr}from"./markdown-DNNvyUFL.js";import{S as Vr}from"./file-share-button-nm9-puhb.js";import{L as zt}from"./preview-dialog-hfrg0TdN.js";import{F as Mt,S as At}from"./folder-icon-BKl95mgA.js";import{i as Ir}from"./repository-binding-BXNOickW.js";import{i as Ur,c as Kr}from"./XClose-KiYAVi9i.js";import{t as Hr}from"./Tool01-bUbUk8P7.js";import{i as dt}from"./ZoomOut-FmWelmyS.js";import{i as qr}from"./DotsVertical-DmnxoC5N.js";import{i as Qr}from"./Key01-CUdVlBTP.js";import{s as Xr}from"./Trash01-CuygCR6g.js";import{t as Se}from"./format-time-CjIPQhCN.js";import{F as ze,d as lt}from"./file-type-icon---8xc9A3.js";import{p as Yr}from"./skill-md-ChfVs4uF.js";import{n as Gr,i as Wr}from"./ArrowUp-CwQ1Q4VU.js";import{T as De,a as Jr,b as Bt,d as Zr,e as es,c as Pe}from"./table-DdKwpV9k.js";import{s as ts}from"./use-project-scope-C7BcZz2G.js";import{a as rs}from"./use-panel-navigate-CRJv_Vri.js";function ss(l){return l.kind==="file"?"file":l.hasSkill?"skill":l.hasBrand?"brand":"folder"}function ut(l){return{kind:ss(l),path:l.path,name:W(l.path),updatedAt:l.updatedAt,size:l.size??0,entry:l}}const ns=["name","updated","size"];function Nt(l){return l.kind==="file"?1:0}function Lt(l,e){const r=(n,a)=>n.name.localeCompare(a.name,void 0,{numeric:!0,sensitivity:"base"});return[...l].sort((n,a)=>{const s=Nt(n)-Nt(a);if(s!==0)return s;if(e==="updated"){const i=(a.updatedAt??"").localeCompare(n.updatedAt??"");if(i!==0)return i}if(e==="size"){const i=a.size-n.size;if(i!==0)return i}return r(n,a)})}function ls(l){if(l.kind!=="file")return null;const e=l.size;if(!e)return null;const r=["B","KB","MB","GB","TB"];let n=e,a=0;for(;n>=1024&&a<r.length-1;)n/=1024,a++;return`${n>=10||a===0?Math.round(n):n.toFixed(1)} ${r[a]}`}function as(l,e,r){return e?"color":r?"font":/^--brand-(text|fw|leading|tracking)/i.test(l)?"type":/^--brand-space/i.test(l)?"space":/^--brand-radius/i.test(l)?"radius":/^--brand-shadow/i.test(l)?"shadow":/^--brand-(duration|delay|ease)/i.test(l)?"motion":"other"}const is=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,os=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,cs=["svg","png","jpg","jpeg","webp","avif","gif"];function ds(l){return l.split(".").pop()?.toLowerCase()??""}function us(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fs(l){const e=l.trim();return os.test(e)||is.test(e)}function ms(l){const e=l.trim(),r=e.match(/^#([0-9a-f]{3})$/i);return r?.[1]?`#${[...r[1]].map(n=>n+n).join("")}`:e}function _t(l){const e=[],r=new Map,n=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let a;for(;(a=n.exec(l))!==null;){const s=a[1],i=a[2].trim();r.has(s)||e.push(s),r.set(s,i)}return e.map(s=>{const i=r.get(s),o=fs(i),c=/^--brand-font/i.test(s);return{name:s,value:i,isColor:o,isFont:c,kind:as(s,o,c)}})}const Ct=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function ps(l){return l.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??l}function hs(l){const e=[],r=new Map;for(const a of l){if(a.kind!=="color")continue;const s=ps(a.name);r.has(s)||(e.push(s),r.set(s,[])),r.get(s).push(a)}return e.map(a=>{const s=r.get(a);return{family:a,tokens:s,isRamp:s.filter(i=>/-\d+$/.test(i.name)).length>=5}}).sort((a,s)=>{const i=Ct.indexOf(a.family),o=Ct.indexOf(s.family);return i===-1&&o===-1?0:i===-1?1:o===-1?-1:i-o})}function bs(l,e,r){const n=new RegExp(`(${us(e)}\\s*:\\s*)[^;]+(;)`);if(n.test(l))return l.replace(n,(i,o,c)=>`${o}${r}${c}`);const a=l.search(/:root\s*\{/);if(a!==-1){const i=l.indexOf("{",a)+1;return`${l.slice(0,i)}
2
2
  ${e}: ${r};${l.slice(i)}`}const s=l.length>0&&!l.endsWith(`
3
3
  `)?`
4
4
  `:"";return`${l}${s}:root {
@@ -1 +1 @@
1
- import{c as R,a as x,r as _,u as C,j as u,N as y}from"./index-BOGZM7Pw.js";import{u as U,A as j,a as k}from"./auth-entry-BuNH69Nv.js";import{A as N}from"./auth-split-layout-rkoJUdAV.js";import"./input-C0ZWiiGy.js";import"./use-is-desktop-app-BNujXJc_.js";import"./backoff-8mStPHYB.js";function O(){const e=R.c(5),t=U(),o=x.useSession();_.useRef(null);const i=t.status,c=o.data!=null,r=o.isPending;let n,s;e[0]!==c||e[1]!==r||e[2]!==i?(n=()=>{},s=[i,c,r],e[0]=c,e[1]=r,e[2]=i,e[3]=n,e[4]=s):(n=e[3],s=e[4]),_.useEffect(n,s)}const h="studio_signup_ref",a="studio_signup_src",$=720*60*60,f=128;function g(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function p(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${$}; samesite=lax`}function b(e){e.ref&&e.ref.length<=f&&!g(h)&&p(h,e.ref),e.src&&e.src.length<=f&&!g(a)&&p(a,e.src)}function w(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function v(){const e=x.useSession();O();const t=C({from:"/login"}),{next:o="/",client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:m,code_challenge_method:A,src:S,ref:E}=t;b({src:S,ref:E});const d=o.startsWith("/")&&!o.startsWith("//")?o:"/",l=w({client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:m,code_challenge_method:A});return e.data?l?(window.location.href=l,u.jsx(j,{})):u.jsx(y,{to:d}):u.jsx(N,{children:u.jsx(k,{callbackUrl:d,redirectUrl:l})})}export{v as default};
1
+ import{c as R,a as x,r as _,u as C,j as u,N as y}from"./index-OBKgoLrS.js";import{u as U,A as j,a as k}from"./auth-entry-CF8efX0d.js";import{A as N}from"./auth-split-layout-CRqrdELw.js";import"./input-Kws07Y5R.js";import"./use-is-desktop-app-BNujXJc_.js";import"./backoff-8mStPHYB.js";function O(){const e=R.c(5),t=U(),o=x.useSession();_.useRef(null);const i=t.status,c=o.data!=null,r=o.isPending;let n,s;e[0]!==c||e[1]!==r||e[2]!==i?(n=()=>{},s=[i,c,r],e[0]=c,e[1]=r,e[2]=i,e[3]=n,e[4]=s):(n=e[3],s=e[4]),_.useEffect(n,s)}const h="studio_signup_ref",a="studio_signup_src",$=720*60*60,f=128;function g(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function p(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${$}; samesite=lax`}function b(e){e.ref&&e.ref.length<=f&&!g(h)&&p(h,e.ref),e.src&&e.src.length<=f&&!g(a)&&p(a,e.src)}function w(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function v(){const e=x.useSession();O();const t=C({from:"/login"}),{next:o="/",client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:m,code_challenge_method:A,src:S,ref:E}=t;b({src:S,ref:E});const d=o.startsWith("/")&&!o.startsWith("//")?o:"/",l=w({client_id:i,redirect_uri:c,response_type:r,state:n,scope:s,code_challenge:m,code_challenge_method:A});return e.data?l?(window.location.href=l,u.jsx(j,{})):u.jsx(y,{to:d}):u.jsx(N,{children:u.jsx(k,{callbackUrl:d,redirectUrl:l})})}export{v as default};
@@ -1,4 +1,4 @@
1
- import{co as Fl,j as O,eq as He,f0 as Kt,b as pt,r as Oe,aw as aE,l as dh,c as Ne,B as ph}from"./index-BOGZM7Pw.js";import{i as gh}from"./Check-CcPSzxsY.js";import{a as fh}from"./Copy01-ByHdq7k3.js";import{D as iE,g as oE,f as sE,d as lE}from"./dialog-CwJ0Tacd.js";import{n as mh}from"./Image01-DAe5wd3u.js";import{d as uE,n as cE,b as dE}from"./ZoomOut-BQf_lYpX.js";import{a as pE}from"./location-DPIrGNp7.js";import{a as hh}from"./org-file-open-context--_UQSpdl.js";function Pl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tt=Pl();function bh(e){tt=e}var _t={exec:()=>null};function ee(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(be.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var be={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},gE=/^(?:[ \t]*(?:\n|$))+/,fE=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mE=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hE=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ul=/(?:[*+-]|\d{1,9}[.)])/,Eh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yh=ee(Eh).replace(/bull/g,Ul).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),bE=ee(Eh).replace(/bull/g,Ul).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Bl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,EE=/^[^\n]+/,$l=/(?!\s*\])(?:\\.|[^\[\]\\])+/,yE=ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),SE=ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ul).getRegex(),rn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ql=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kE=ee("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ql).replace("tag",rn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sh=ee(Bl).replace("hr",Dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rn).getRegex(),vE=ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sh).getRegex(),zl={blockquote:vE,code:fE,def:yE,fences:mE,heading:hE,hr:Dt,html:kE,lheading:yh,list:SE,newline:gE,paragraph:Sh,table:_t,text:EE},Tu=ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rn).getRegex(),TE={...zl,lheading:bE,table:Tu,paragraph:ee(Bl).replace("hr",Dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Tu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rn).getRegex()},wE={...zl,html:ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ql).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_t,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ee(Bl).replace("hr",Dt).replace("heading",` *#{1,6} *[^
1
+ import{co as Fl,j as O,eq as He,f0 as Kt,b as pt,r as Oe,aw as aE,l as dh,c as Ne,B as ph}from"./index-OBKgoLrS.js";import{i as gh}from"./Check-BmlrCmw2.js";import{a as fh}from"./Copy01-CkifUnly.js";import{D as iE,g as oE,f as sE,d as lE}from"./dialog-BI1xJ9QE.js";import{n as mh}from"./Image01-0yU0yxN3.js";import{d as uE,n as cE,b as dE}from"./ZoomOut-FmWelmyS.js";import{a as pE}from"./location-DPIrGNp7.js";import{a as hh}from"./org-file-open-context-BosMDtdb.js";function Pl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tt=Pl();function bh(e){tt=e}var _t={exec:()=>null};function ee(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(be.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var be={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},gE=/^(?:[ \t]*(?:\n|$))+/,fE=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mE=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hE=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ul=/(?:[*+-]|\d{1,9}[.)])/,Eh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yh=ee(Eh).replace(/bull/g,Ul).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),bE=ee(Eh).replace(/bull/g,Ul).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Bl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,EE=/^[^\n]+/,$l=/(?!\s*\])(?:\\.|[^\[\]\\])+/,yE=ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),SE=ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ul).getRegex(),rn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ql=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kE=ee("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ql).replace("tag",rn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sh=ee(Bl).replace("hr",Dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rn).getRegex(),vE=ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sh).getRegex(),zl={blockquote:vE,code:fE,def:yE,fences:mE,heading:hE,hr:Dt,html:kE,lheading:yh,list:SE,newline:gE,paragraph:Sh,table:_t,text:EE},Tu=ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rn).getRegex(),TE={...zl,lheading:bE,table:Tu,paragraph:ee(Bl).replace("hr",Dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Tu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rn).getRegex()},wE={...zl,html:ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ql).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_t,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ee(Bl).replace("hr",Dt).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",yh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},AE=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,RE=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kh=/^( {2,}|\\)\n(?!\s*$)/,_E=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,an=/[\p{P}\p{S}]/u,Gl=/[\s\p{P}\p{S}]/u,vh=/[^\s\p{P}\p{S}]/u,IE=ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gl).getRegex(),Th=/(?!~)[\p{P}\p{S}]/u,xE=/(?!~)[\s\p{P}\p{S}]/u,NE=/(?:[^\s\p{P}\p{S}]|~)/u,CE=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,wh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,OE=ee(wh,"u").replace(/punct/g,an).getRegex(),LE=ee(wh,"u").replace(/punct/g,Th).getRegex(),Ah="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",DE=ee(Ah,"gu").replace(/notPunctSpace/g,vh).replace(/punctSpace/g,Gl).replace(/punct/g,an).getRegex(),ME=ee(Ah,"gu").replace(/notPunctSpace/g,NE).replace(/punctSpace/g,xE).replace(/punct/g,Th).getRegex(),FE=ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vh).replace(/punctSpace/g,Gl).replace(/punct/g,an).getRegex(),PE=ee(/\\(punct)/,"gu").replace(/punct/g,an).getRegex(),UE=ee(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),BE=ee(ql).replace("(?:-->|$)","-->").getRegex(),$E=ee("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",BE).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,qE=ee(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Xt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rh=ee(/^!?\[(label)\]\[(ref)\]/).replace("label",Xt).replace("ref",$l).getRegex(),_h=ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",$l).getRegex(),zE=ee("reflink|nolink(?!\\()","g").replace("reflink",Rh).replace("nolink",_h).getRegex(),Hl={_backpedal:_t,anyPunctuation:PE,autolink:UE,blockSkip:CE,br:kh,code:RE,del:_t,emStrongLDelim:OE,emStrongRDelimAst:DE,emStrongRDelimUnd:FE,escape:AE,link:qE,nolink:_h,punctuation:IE,reflink:Rh,reflinkSearch:zE,tag:$E,text:_E,url:_t},GE={...Hl,link:ee(/^!?\[(label)\]\((.*?)\)/).replace("label",Xt).getRegex(),reflink:ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xt).getRegex()},El={...Hl,emStrongRDelimAst:ME,emStrongLDelim:LE,url:ee(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},HE={...El,br:ee(kh).replace("{2,}","*").getRegex(),text:ee(El.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Bt={normal:zl,gfm:TE,pedantic:wE},kt={normal:Hl,gfm:El,breaks:HE,pedantic:GE},jE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},wu=e=>jE[e];function Fe(e,t){if(t){if(be.escapeTest.test(e))return e.replace(be.escapeReplace,wu)}else if(be.escapeTestNoEncode.test(e))return e.replace(be.escapeReplaceNoEncode,wu);return e}function Au(e){try{e=encodeURI(e).replace(be.percentDecode,"%")}catch{return null}return e}function Ru(e,t){const n=e.replace(be.findPipe,(i,o,s)=>{let l=!1,u=o;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(be.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(be.slashPipe,"|");return r}function vt(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function VE(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function _u(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function WE(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
3
3
  `).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var Zt=class{options;rules;lexer;constructor(e){this.options=e||tt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:vt(n,`
@@ -1,4 +1,4 @@
1
- import{r as z,c as L,j as u,f1 as J,f2 as ee,q as te,x as ne,a as oe,l as q,h as se}from"./index-BOGZM7Pw.js";import{D as ie,E as re,C as ae}from"./types-BlCCVKMl.js";const W=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function le(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${de(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,i=o.match(s);if(i){const l=(i.index??0)+i[0].length;return o.slice(0,l)+`
1
+ import{r as z,c as L,j as u,f1 as J,f2 as ee,q as te,x as ne,a as oe,l as q,h as se}from"./index-OBKgoLrS.js";import{D as ie,E as re,C as ae}from"./types-co2Ht9Mj.js";const W=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function le(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${de(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,i=o.match(s);if(i){const l=(i.index??0)+i[0].length;return o.slice(0,l)+`
2
2
  `+n+o.slice(l)}const r=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,a=o.match(r);if(a){const l=(a.index??0)+a[0].length;return o.slice(0,l)+`
3
3
  <head>
4
4
  `+n+`
@@ -1 +1 @@
1
- import{d as D,a as H,e as z,b as W}from"./auth-BMIwdKU8.js";import{aW as L}from"./index-BOGZM7Pw.js";function J(){return window.location.origin}function R(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const P="mcp:oauth:callback:";let O=null;const K=1e3,j=10*6e4,C=15e3;class F{_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this._redirectUrl=t.callbackUrl??O?.redirectUrl??`${J()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/studio MCP client",...n&&{scope:n}}}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const s=window.screenX+(window.outerWidth-600)/2,o=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${s},top=${o},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}}async function B(e){const t=L(e,window.location.origin),n=e.orgSlug?`/api/${encodeURIComponent(e.orgSlug)}/mcp/${e.connectionId}`:`/mcp/${e.connectionId}`,i=new URL(n,t),s=new F({serverUrl:i.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),o={fn:null};try{const r=new Promise((u,d)=>{const y=e.timeout||j;let m,p,E,f=!1;const $=s.state(),S=`${P}${$}`,h=()=>{window.removeEventListener("message",b),window.removeEventListener("storage",U),clearTimeout(m),clearInterval(p),clearInterval(E);try{localStorage.removeItem(S)}catch{}};o.fn=c=>{f||(f=!0,h(),d(c))};const A=async c=>{if(f)return;if(f=!0,!c.success){h(),d(new Error(c.error||"OAuth authentication failed"));return}const{code:k,state:V}=c;if(!k){h(),d(new Error("Missing authorization code"));return}if(s.getStoredState()!==V){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const M=(await D(i))?.authorization_servers?.[0]||i,I=await H(M),g=s.clientInformation();if(!g){h(),d(new Error("Client information not found"));return}const N=s.codeVerifier(),x=await z(M,{metadata:I,clientInformation:g,authorizationCode:k,codeVerifier:N,redirectUri:s.redirectUrl,resource:new URL(i)});h(),u({tokens:x,clientId:g.client_id??null,clientSecret:g.client_secret??null,tokenEndpoint:I?.token_endpoint??null,userinfoEndpoint:I?.userinfo_endpoint??null})}catch(v){h(),d(v)}},b=async c=>{!R()&&c.origin!==window.location.origin||c.data?.type==="mcp:oauth:callback"&&await A(c.data)},U=async c=>{if(!(c.key!==S||!c.newValue))try{const k=JSON.parse(c.newValue);await A(k)}catch{}};window.addEventListener("message",b),window.addEventListener("storage",U),E=setInterval(()=>{if(f)return;let c=null;try{c=localStorage.getItem(S)}catch{return}if(c)try{A(JSON.parse(c))}catch{}},K),m=setTimeout(()=>{f||(f=!0,h(),d(new Error("OAuth authentication timeout")))},y)});if(r.catch(()=>{}),await W(s,{serverUrl:i})==="REDIRECT"){const u=await r;return{token:u.tokens.access_token,tokenInfo:{accessToken:u.tokens.access_token,refreshToken:u.tokens.refresh_token??null,expiresIn:u.tokens.expires_in??null,scope:u.tokens.scope??null,clientId:u.clientId,clientSecret:u.clientSecret,tokenEndpoint:u.tokenEndpoint,userinfoEndpoint:u.userinfoEndpoint,idToken:u.tokens.id_token??null},error:null}}const l=s.tokens(),w=s.clientInformation();return{token:l?.access_token||null,tokenInfo:l?{accessToken:l.access_token,refreshToken:l.refresh_token??null,expiresIn:l.expires_in??null,scope:l.scope??null,clientId:w?.client_id??null,clientSecret:w?.client_secret??null,tokenEndpoint:null,userinfoEndpoint:null,idToken:l.id_token??null}:null,error:null}}catch(r){return o.fn&&o.fn(r instanceof Error?r:new Error(String(r))),{token:null,tokenInfo:null,error:r instanceof Error?r.message:String(r)}}}function T(e,t){if(window.opener&&!window.opener.closed){const n=R()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${P}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function ee(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const i=e.get("error"),s=e.get("error_description");let o=n;if(n)try{const a=atob(n),l=JSON.parse(a);l.clientState&&(o=l.clientState)}catch{}if(i){const a=s||i;return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}if(!t||!n){const a="Missing code or state parameter";return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}return n=o||n,T({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function G(e){try{const t=_(),n=t?new URL(e,t):new URL(e),i=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return i?i[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function Y(e){try{const t=_();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function X(e,t,n){try{const i=`/api/${encodeURIComponent(t)}/connections/${e}/oauth-token/status`,s=n?new URL(i,n).href:i,o=_(),r=!n||new URL(n).origin===o,a=await fetch(s,{credentials:r?"include":"omit"});return a.ok?{hasToken:(await a.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function te({url:e,token:t,orgId:n,studioUrl:i,meshUrl:s}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const r=await fetch(e,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/studio MCP client",version:"1.0.0"}}}),signal:AbortSignal.timeout(C)}),a=G(e),l=Y(e),w=_(),u=L({studioUrl:i,meshUrl:s},w?new URL(e,w).origin:new URL(e).origin);if(r.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(a&&l?await X(a,l,u):{hasToken:!1}).hasToken};let d;try{const p=await r.json();d=p.error||p.message}catch{}return r.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:d||`HTTP ${r.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!r.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:d||`HTTP ${r.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o instanceof Error&&o.name==="TimeoutError"?`Connection check timed out after ${C/1e3}s`:o.message}}}export{B as a,ee as h,te as i};
1
+ import{d as D,a as H,e as z,b as W}from"./auth-Bj6m-efj.js";import{aW as L}from"./index-OBKgoLrS.js";function J(){return window.location.origin}function R(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const P="mcp:oauth:callback:";let O=null;const K=1e3,j=10*6e4,C=15e3;class F{_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this._redirectUrl=t.callbackUrl??O?.redirectUrl??`${J()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/studio MCP client",...n&&{scope:n}}}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const s=window.screenX+(window.outerWidth-600)/2,o=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${s},top=${o},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}}async function B(e){const t=L(e,window.location.origin),n=e.orgSlug?`/api/${encodeURIComponent(e.orgSlug)}/mcp/${e.connectionId}`:`/mcp/${e.connectionId}`,i=new URL(n,t),s=new F({serverUrl:i.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),o={fn:null};try{const r=new Promise((u,d)=>{const y=e.timeout||j;let m,p,E,f=!1;const $=s.state(),S=`${P}${$}`,h=()=>{window.removeEventListener("message",b),window.removeEventListener("storage",U),clearTimeout(m),clearInterval(p),clearInterval(E);try{localStorage.removeItem(S)}catch{}};o.fn=c=>{f||(f=!0,h(),d(c))};const A=async c=>{if(f)return;if(f=!0,!c.success){h(),d(new Error(c.error||"OAuth authentication failed"));return}const{code:k,state:V}=c;if(!k){h(),d(new Error("Missing authorization code"));return}if(s.getStoredState()!==V){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const M=(await D(i))?.authorization_servers?.[0]||i,I=await H(M),g=s.clientInformation();if(!g){h(),d(new Error("Client information not found"));return}const N=s.codeVerifier(),x=await z(M,{metadata:I,clientInformation:g,authorizationCode:k,codeVerifier:N,redirectUri:s.redirectUrl,resource:new URL(i)});h(),u({tokens:x,clientId:g.client_id??null,clientSecret:g.client_secret??null,tokenEndpoint:I?.token_endpoint??null,userinfoEndpoint:I?.userinfo_endpoint??null})}catch(v){h(),d(v)}},b=async c=>{!R()&&c.origin!==window.location.origin||c.data?.type==="mcp:oauth:callback"&&await A(c.data)},U=async c=>{if(!(c.key!==S||!c.newValue))try{const k=JSON.parse(c.newValue);await A(k)}catch{}};window.addEventListener("message",b),window.addEventListener("storage",U),E=setInterval(()=>{if(f)return;let c=null;try{c=localStorage.getItem(S)}catch{return}if(c)try{A(JSON.parse(c))}catch{}},K),m=setTimeout(()=>{f||(f=!0,h(),d(new Error("OAuth authentication timeout")))},y)});if(r.catch(()=>{}),await W(s,{serverUrl:i})==="REDIRECT"){const u=await r;return{token:u.tokens.access_token,tokenInfo:{accessToken:u.tokens.access_token,refreshToken:u.tokens.refresh_token??null,expiresIn:u.tokens.expires_in??null,scope:u.tokens.scope??null,clientId:u.clientId,clientSecret:u.clientSecret,tokenEndpoint:u.tokenEndpoint,userinfoEndpoint:u.userinfoEndpoint,idToken:u.tokens.id_token??null},error:null}}const l=s.tokens(),w=s.clientInformation();return{token:l?.access_token||null,tokenInfo:l?{accessToken:l.access_token,refreshToken:l.refresh_token??null,expiresIn:l.expires_in??null,scope:l.scope??null,clientId:w?.client_id??null,clientSecret:w?.client_secret??null,tokenEndpoint:null,userinfoEndpoint:null,idToken:l.id_token??null}:null,error:null}}catch(r){return o.fn&&o.fn(r instanceof Error?r:new Error(String(r))),{token:null,tokenInfo:null,error:r instanceof Error?r.message:String(r)}}}function T(e,t){if(window.opener&&!window.opener.closed){const n=R()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${P}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function ee(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const i=e.get("error"),s=e.get("error_description");let o=n;if(n)try{const a=atob(n),l=JSON.parse(a);l.clientState&&(o=l.clientState)}catch{}if(i){const a=s||i;return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}if(!t||!n){const a="Missing code or state parameter";return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}return n=o||n,T({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function G(e){try{const t=_(),n=t?new URL(e,t):new URL(e),i=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return i?i[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function Y(e){try{const t=_();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function X(e,t,n){try{const i=`/api/${encodeURIComponent(t)}/connections/${e}/oauth-token/status`,s=n?new URL(i,n).href:i,o=_(),r=!n||new URL(n).origin===o,a=await fetch(s,{credentials:r?"include":"omit"});return a.ok?{hasToken:(await a.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function te({url:e,token:t,orgId:n,studioUrl:i,meshUrl:s}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const r=await fetch(e,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/studio MCP client",version:"1.0.0"}}}),signal:AbortSignal.timeout(C)}),a=G(e),l=Y(e),w=_(),u=L({studioUrl:i,meshUrl:s},w?new URL(e,w).origin:new URL(e).origin);if(r.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(a&&l?await X(a,l,u):{hasToken:!1}).hasToken};let d;try{const p=await r.json();d=p.error||p.message}catch{}return r.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:d||`HTTP ${r.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!r.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:d||`HTTP ${r.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o instanceof Error&&o.name==="TimeoutError"?`Connection check timed out after ${C/1e3}s`:o.message}}}export{B as a,ee as h,te as i};
@@ -1 +1 @@
1
- import{c as ue,b as xe,j as s,ef as ns,B as at,ee as as,ed as rs,X as It,a2 as os,D as cs,o as Jt,e as xt,K as ct,t as ge,r as pe,l as rt,h as Rt,fI as ms,n as ds,e$ as At,I as Ht,F as Wt,H as Xt,aj as us,ah as fs,ai as gs,G as Mt,$ as ps,al as xs,q as nt}from"./index-BOGZM7Pw.js";import{C as hs}from"./collection-display-button-CAE4H1Z5.js";import{S as bs}from"./search-input-dP8TWy_f.js";import{C as js}from"./collection-table-wrapper-C-F_T5Eb.js";import{E as Nt}from"./empty-state-DdDKihxt.js";import{u as vs,a as Cs,I as Ss}from"./use-join-requests-B2449AYt.js";import{A as ot}from"./avatar-Bpp_lL_f.js";import{f as Ns}from"./format-time-CjIPQhCN.js";import{g as gt}from"./get-initials-D-f_fDFw.js";import{a as ys}from"./use-members-CmQfPBAn.js";import{u as Yt}from"./use-org-auth-client-BBAyh5Tz.js";import{u as ws}from"./use-organization-roles-DEPf_2N_.js";import{g as Ms,a as Is}from"./role-color-Dn2tXDDF.js";import{T as Ts,a as Rs,c as As,b as zs}from"./tooltip-DoWVDYxv.js";import{A as zt,a as Pt,b as kt,c as _t,g as Dt,d as Et,e as Ot,f as $t}from"./alert-dialog-13GPwGkk.js";import{B as ht}from"./badge-DTNkOzY0.js";import{i as Zt}from"./DotsVertical-CXVrXTYw.js";import{i as Ps}from"./Key01-Dje7twgn.js";import{s as es,b as ks}from"./XClose-Bsj_jKUE.js";import{s as _s}from"./Trash01-BA-bFjuS.js";import{a as Lt,b as qt,c as Ft,d as Bt,S as Kt}from"./select-CGC5E9nf.js";import{C as Ut}from"./checkbox-DuccoC4e.js";import{e as yt,b as wt,h as Vt,a as Ds,c as Es,f as Os,C as $s}from"./command-D4xFqyr9.js";import{b as Ls,P as qs,a as Fs}from"./popover-DvKxqM1r.js";import{t as Bs}from"./ChevronUp-C9klasvw.js";import{s as Ks}from"./Plus-Dk5G0eGJ.js";import{u as Us,c as Vs,a as Gs,d as Qs}from"./use-tags-D0iZ2cgD.js";import{R as Js}from"./require-capability-DN9BJlNM.js";import"./ArrowUp-Duh-8Vv0.js";import"./Check-CcPSzxsY.js";import"./view-mode-toggle-BjrOeE_u.js";import"./SearchMd-DJptVqPP.js";import"./table-BCWfTyhH.js";import"./dialog-CwJ0Tacd.js";import"./X-BdtW9stL.js";import"./form-DXEENu_8.js";import"./label-CKukDnnz.js";import"./textarea-e3h0PKfc.js";import"./User01-B42bcRzQ.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-0glLJTM3.js";import"./index-Ccz5AaI_.js";import"./access-gate-BtTwTt-9.js";import"./capability-load-error-th8zEGOp.js";function Hs(){const t=ue.c(19),e=xe(),l=vs(),{approve:c,deny:a}=Cs();if(l.length===0)return null;let n;t[0]!==e?(n=e("settings.joinRequestsSection.title"),t[0]=e,t[1]=n):n=t[1];let u;t[2]!==e?(u=e("settings.joinRequestsSection.description"),t[2]=e,t[3]=u):u=t[3];let m;if(t[4]!==c||t[5]!==a||t[6]!==l||t[7]!==e){let f;t[9]!==c||t[10]!==a||t[11]!==e?(f=o=>s.jsx(ns,{icon:s.jsx(ot,{url:o.user?.image??void 0,fallback:(o.user?.name??o.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:o.user?.name??o.user?.email??o.userId,description:o.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(at,{size:"sm",variant:"outline",onClick:()=>a.mutate(o.id),disabled:a.isPending||c.isPending,children:e("settings.joinRequestsSection.deny")}),s.jsx(at,{size:"sm",onClick:()=>c.mutate(o.id),disabled:c.isPending||a.isPending,children:e("settings.joinRequestsSection.approve")})]})},o.id),t[9]=c,t[10]=a,t[11]=e,t[12]=f):f=t[12],m=l.map(f),t[4]=c,t[5]=a,t[6]=l,t[7]=e,t[8]=m}else m=t[8];let r;t[13]!==m?(r=s.jsx(as,{children:m}),t[13]=m,t[14]=r):r=t[14];let p;return t[15]!==n||t[16]!==u||t[17]!==r?(p=s.jsx(rs,{title:n,description:u,children:r}),t[15]=n,t[16]=u,t[17]=r,t[18]=p):p=t[18],p}function Ws(){const t=ue.c(7),{locator:e}=It(),l=os();let c;t[0]!==e?(c=ct.invitations(e),t[0]=e,t[1]=c):c=t[1];let a;t[2]!==l?(a=async()=>(await l.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=l,t[3]=a):a=t[3];let n;return t[4]!==c||t[5]!==a?(n={queryKey:c,queryFn:a},t[4]=c,t[5]=a,t[6]=n):n=t[6],cs(n)}function Xs(){const t=ue.c(10),{locator:e}=It(),l=Yt(),c=Jt();let a;t[0]!==l?(a=async p=>{const f=await l.organization.cancelInvitation({invitationId:p});if(f?.error)throw new Error(f.error.message);return f.data},t[0]=l,t[1]=a):a=t[1];let n;t[2]!==e||t[3]!==c?(n=()=>{c.invalidateQueries({queryKey:ct.invitations(e)}),ge.success("Invitation cancelled")},t[2]=e,t[3]=c,t[4]=n):n=t[4];let u;t[5]!==a||t[6]!==n?(u={mutationFn:a,onSuccess:n,onError:Ys},t[5]=a,t[6]=n,t[7]=u):u=t[7];const m=xt(u);let r;return t[8]!==m?(r={cancel:m},t[8]=m,t[9]=r):r=t[9],r}function Ys(t){ge.error(t instanceof Error?t.message:"Failed to cancel invitation")}function ts(t){const e=ue.c(51),{memberId:l,className:c,disabled:a,maxDisplay:n}=t,u=a===void 0?!1:a,m=n===void 0?2:n,r=xe(),[p,f]=pe.useState(!1),[o,j]=pe.useState(""),{data:E,isLoading:z}=Us(),P=E===void 0?[]:E,{data:v,isLoading:B}=Vs(l),x=v===void 0?[]:v,O=Gs(),I=Qs(),$=z||B,S=x.map(ei);let T;e[0]!==o?(T=C=>C.name.toLowerCase().includes(o.toLowerCase()),e[0]=o,e[1]=T):T=e[1];const k=P.filter(T);let _;e[2]!==o?(_=C=>C.name.toLowerCase()===o.toLowerCase(),e[2]=o,e[3]=_):_=e[3];const R=P.find(_),w=o.trim()&&!R,M=async C=>{const de=S.includes(C.id)?S.filter(be=>be!==C.id):[...S,C.id];await I.mutateAsync({memberId:l,tagIds:de})},K=async()=>{if(!o.trim())return;const C=await O.mutateAsync(o.trim());await I.mutateAsync({memberId:l,tagIds:[...S,C.id]}),j("")},q=async C=>{const he=S.filter(de=>de!==C);await I.mutateAsync({memberId:l,tagIds:he})},N=O.isPending||I.isPending,h=qs;let y;e[4]!==p?(y=()=>f(!p),e[4]=p,e[5]=y):y=e[5];let g;e[6]!==c?(g=rt("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",c),e[6]=c,e[7]=g):g=e[7];const b=u||$,L=$?s.jsx(Rt,{className:"size-3.5 text-muted-foreground"}):x.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[x.slice(0,m).map(Zs),x.length>m&&s.jsxs(ht,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",x.length-m]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:r("common.tagMultiSelect.addTags")});let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Bs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=F):F=e[8];let D;e[9]!==L||e[10]!==y||e[11]!==g||e[12]!==b?(D=s.jsx(Fs,{asChild:!0,children:s.jsxs(at,{variant:"ghost",size:"sm",onClick:y,className:g,disabled:b,children:[L,F]})}),e[9]=L,e[10]=y,e[11]=g,e[12]=b,e[13]=D):D=e[13];const G=Ls,H="w-56 p-0",U="start";let Q;e[14]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(!1),e[14]=Q):Q=e[14];const J=Os,W=!1;let X;e[15]!==r?(X=r("common.tagMultiSelect.searchOrCreate"),e[15]=r,e[16]=X):X=e[16];let Y;e[17]!==o||e[18]!==X?(Y=s.jsx($s,{placeholder:X,value:o,onValueChange:j,className:"h-9"}),e[17]=o,e[18]=X,e[19]=Y):Y=e[19];const ae=Es,re=x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(yt,{heading:r("common.tagMultiSelect.selected"),children:x.map(C=>s.jsx(wt,{onSelect:()=>M(C),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ut,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:C.name})]}),s.jsx("button",{type:"button",onClick:he=>{he.stopPropagation(),q(C.id)},className:"opacity-50 hover:opacity-100",disabled:N,children:s.jsx(es,{size:14})})]})},C.id))}),s.jsx(Vt,{})]}),oe=yt;let Z;e[20]!==r?(Z=r("common.tagMultiSelect.available"),e[20]=r,e[21]=Z):Z=e[21];const ce=k.length===0&&!w&&s.jsx(Ds,{children:r("common.tagMultiSelect.noTagsFound")}),me=k.filter(C=>!S.includes(C.id)).map(C=>s.jsx(wt,{onSelect:()=>M(C),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ut,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:C.name})]})},C.id));let ee;e[22]!==oe||e[23]!==Z||e[24]!==ce||e[25]!==me?(ee=s.jsxs(oe,{heading:Z,children:[ce,me]}),e[22]=oe,e[23]=Z,e[24]=ce,e[25]=me,e[26]=ee):ee=e[26];let te;e[27]!==K||e[28]!==N||e[29]!==o||e[30]!==w||e[31]!==r?(te=w&&s.jsxs(s.Fragment,{children:[s.jsx(Vt,{}),s.jsx(yt,{children:s.jsx(wt,{onSelect:K,className:"cursor-pointer",disabled:N,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[N?s.jsx(Rt,{className:"size-3.5"}):s.jsx(Ks,{size:14}),s.jsx("span",{children:r("common.tagMultiSelect.createTag",{tagName:o.trim()})})]})})})]}),e[27]=K,e[28]=N,e[29]=o,e[30]=w,e[31]=r,e[32]=te):te=e[32];let se;e[33]!==ae||e[34]!==re||e[35]!==ee||e[36]!==te?(se=s.jsxs(ae,{children:[re,ee,te]}),e[33]=ae,e[34]=re,e[35]=ee,e[36]=te,e[37]=se):se=e[37];let ie;e[38]!==J||e[39]!==Y||e[40]!==se?(ie=s.jsxs(J,{shouldFilter:W,children:[Y,se]}),e[38]=J,e[39]=Y,e[40]=se,e[41]=ie):ie=e[41];let le;e[42]!==G||e[43]!==Q||e[44]!==ie?(le=s.jsx(G,{className:H,align:U,onEscapeKeyDown:Q,children:ie}),e[42]=G,e[43]=Q,e[44]=ie,e[45]=le):le=e[45];let ne;return e[46]!==h||e[47]!==p||e[48]!==D||e[49]!==le?(ne=s.jsxs(h,{open:p,onOpenChange:f,children:[D,le]}),e[46]=h,e[47]=p,e[48]=D,e[49]=le,e[50]=ne):ne=e[50],ne}function Zs(t){return s.jsx(ht,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function ei(t){return t.id}const ti=["owner","admin","user"];function si(t){const e=new Map;for(const l of ti)e.set(l,Ms(l,!0));for(const l of t)l&&!e.has(l.role)&&e.set(l.role,Is(l.role));return e}function pt(t){const e=ue.c(84),{role:l,memberId:c,isOwner:a,roleColorMap:n,selectableRoles:u,onRoleChange:m,size:r,className:p}=t,f=r===void 0?"xs":r,o=xe();let j,E,z,P,v,B,x,O,I,$,S;if(e[0]!==p||e[1]!==a||e[2]!==c||e[3]!==m||e[4]!==l||e[5]!==n||e[6]!==u||e[7]!==f||e[8]!==o){S=Symbol.for("react.early_return_sentinel");e:{const N=n.get(l)??"bg-muted-foreground";if(a){let h;e[20]!==c||e[21]!==m?(h=J=>m(c,J),e[20]=c,e[21]=m,e[22]=h):h=e[22];let y;e[23]!==l?(y=s.jsx("span",{className:"capitalize truncate",children:l}),e[23]=l,e[24]=y):y=e[24];const g=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:rt("size-2 rounded-full shrink-0",N)}),y]});let b;e[25]!==g?(b=s.jsx(Lt,{children:g}),e[25]=g,e[26]=b):b=e[26];let L;e[27]!==p||e[28]!==f||e[29]!==b?(L=s.jsx(qt,{size:f,className:p,children:b}),e[27]=p,e[28]=f,e[29]=b,e[30]=L):L=e[30];let F;if(e[31]!==n||e[32]!==u){let J;e[34]!==n?(J=W=>{const X=n.get(W.role)??"bg-muted-foreground";return s.jsx(Ft,{value:W.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:rt("size-3 rounded-full",X)}),s.jsx("span",{className:"capitalize",children:W.label})]})},W.role)},e[34]=n,e[35]=J):J=e[35],F=u.map(J),e[31]=n,e[32]=u,e[33]=F}else F=e[33];let D;e[36]!==F?(D=s.jsx(Bt,{children:F}),e[36]=F,e[37]=D):D=e[37];let G;e[38]!==a||e[39]!==l||e[40]!==h||e[41]!==L||e[42]!==D?(G=s.jsx(Ts,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(Kt,{value:l,onValueChange:h,disabled:a,children:[L,D]})})}),e[38]=a,e[39]=l,e[40]=h,e[41]=L,e[42]=D,e[43]=G):G=e[43];let H;e[44]!==o?(H=o("orgs.members.ownerRoleCannotBeChanged"),e[44]=o,e[45]=H):H=e[45];let U;e[46]!==H?(U=s.jsx(Rs,{children:s.jsx("p",{children:H})}),e[46]=H,e[47]=U):U=e[47];let Q;e[48]!==G||e[49]!==U?(Q=s.jsx(As,{children:s.jsxs(zs,{children:[G,U]})}),e[48]=G,e[49]=U,e[50]=Q):Q=e[50],S=Q;break e}z=Kt,O=l,e[51]!==c||e[52]!==m?(I=h=>m(c,h),e[51]=c,e[52]=m,e[53]=I):I=e[53],$=a,E=qt,B=f,x=p,j=Lt,v="flex items-center gap-2 min-w-0",P=rt("size-2 rounded-full shrink-0",N)}e[0]=p,e[1]=a,e[2]=c,e[3]=m,e[4]=l,e[5]=n,e[6]=u,e[7]=f,e[8]=o,e[9]=j,e[10]=E,e[11]=z,e[12]=P,e[13]=v,e[14]=B,e[15]=x,e[16]=O,e[17]=I,e[18]=$,e[19]=S}else j=e[9],E=e[10],z=e[11],P=e[12],v=e[13],B=e[14],x=e[15],O=e[16],I=e[17],$=e[18],S=e[19];if(S!==Symbol.for("react.early_return_sentinel"))return S;let T;e[54]!==P?(T=s.jsx("div",{className:P}),e[54]=P,e[55]=T):T=e[55];let k;e[56]!==l?(k=s.jsx("span",{className:"capitalize truncate",children:l}),e[56]=l,e[57]=k):k=e[57];let _;e[58]!==T||e[59]!==k||e[60]!==v?(_=s.jsxs("div",{className:v,children:[T,k]}),e[58]=T,e[59]=k,e[60]=v,e[61]=_):_=e[61];let R;e[62]!==j||e[63]!==_?(R=s.jsx(j,{children:_}),e[62]=j,e[63]=_,e[64]=R):R=e[64];let w;e[65]!==E||e[66]!==R||e[67]!==B||e[68]!==x?(w=s.jsx(E,{size:B,className:x,children:R}),e[65]=E,e[66]=R,e[67]=B,e[68]=x,e[69]=w):w=e[69];let M;if(e[70]!==n||e[71]!==u){let N;e[73]!==n?(N=h=>{const y=n.get(h.role)??"bg-muted-foreground";return s.jsx(Ft,{value:h.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:rt("size-3 rounded-full",y)}),s.jsx("span",{className:"capitalize",children:h.label})]})},h.role)},e[73]=n,e[74]=N):N=e[74],M=u.map(N),e[70]=n,e[71]=u,e[72]=M}else M=e[72];let K;e[75]!==M?(K=s.jsx(Bt,{children:M}),e[75]=M,e[76]=K):K=e[76];let q;return e[77]!==z||e[78]!==w||e[79]!==K||e[80]!==O||e[81]!==I||e[82]!==$?(q=s.jsxs(z,{value:O,onValueChange:I,disabled:$,children:[w,K]}),e[77]=z,e[78]=w,e[79]=K,e[80]=O,e[81]=I,e[82]=$,e[83]=q):q=e[83],q}function Gt(t){const e=ue.c(59),{member:l,roles:c,onChangeRole:a,onRemove:n,isUpdating:u}=t,m=u===void 0?!1:u,r=xe(),p=l.role==="owner";let f,o,j,E,z,P,v,B,x;if(e[0]!==p||e[1]!==m||e[2]!==l.id||e[3]!==l.role||e[4]!==a||e[5]!==c||e[6]!==r){let M;e[16]!==l.role?(M=g=>g.role!==l.role&&g.role!=="owner",e[16]=l.role,e[17]=M):M=e[17];const K=c.filter(M);E=Ht;let q;e[18]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Zt,{size:20}),e[18]=q):q=e[18],e[19]!==p?(x=s.jsx(Wt,{asChild:!0,children:s.jsx(at,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:p,onClick:li,children:q})}),e[19]=p,e[20]=x):x=e[20],j=Xt,v="end",B=ii,o=us;let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ks,{size:16}),e[21]=N):N=e[21];let h;e[22]!==r?(h=r("orgs.members.changeRole"),e[22]=r,e[23]=h):h=e[23],e[24]!==m||e[25]!==h?(P=s.jsxs(fs,{disabled:m,children:[N,h]}),e[24]=m,e[25]=h,e[26]=P):P=e[26],f=gs;let y;e[27]!==m||e[28]!==l.id||e[29]!==a||e[30]!==r?(y=g=>{const b=[];return g.isBuiltin||(g.allowsAllStaticPermissions?b.push(r("orgs.members.fullOrgAccess")):g.staticPermissionCount&&g.staticPermissionCount>0&&b.push(r("orgs.members.orgPermsCount",{count:g.staticPermissionCount})),g.allowsAllConnections?b.push(r("orgs.members.allConnections")):g.connectionCount&&g.connectionCount>0&&b.push(r("orgs.members.connectionCount",{count:g.connectionCount})),(g.connectionCount!==0||g.allowsAllConnections)&&(g.allowsAllTools?b.push(r("orgs.members.allTools")):g.toolCount&&g.toolCount>0&&b.push(r("orgs.members.toolCount",{count:g.toolCount})))),s.jsxs(Mt,{onClick:L=>{L.stopPropagation(),a(l.id,g.role)},disabled:m,children:[g.isBuiltin?s.jsx(ps,{size:16}):s.jsx(Ps,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:g.label}),!g.isBuiltin&&b.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:b.join(", ")})]})]},g.role)},e[27]=m,e[28]=l.id,e[29]=a,e[30]=r,e[31]=y):y=e[31],z=K.map(y),e[0]=p,e[1]=m,e[2]=l.id,e[3]=l.role,e[4]=a,e[5]=c,e[6]=r,e[7]=f,e[8]=o,e[9]=j,e[10]=E,e[11]=z,e[12]=P,e[13]=v,e[14]=B,e[15]=x}else f=e[7],o=e[8],j=e[9],E=e[10],z=e[11],P=e[12],v=e[13],B=e[14],x=e[15];let O;e[32]!==f||e[33]!==z?(O=s.jsx(f,{children:z}),e[32]=f,e[33]=z,e[34]=O):O=e[34];let I;e[35]!==o||e[36]!==P||e[37]!==O?(I=s.jsxs(o,{children:[P,O]}),e[35]=o,e[36]=P,e[37]=O,e[38]=I):I=e[38];let $;e[39]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(xs,{}),e[39]=$):$=e[39];let S;e[40]!==l.id||e[41]!==n?(S=M=>{M.stopPropagation(),n(l.id)},e[40]=l.id,e[41]=n,e[42]=S):S=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(_s,{size:16}),e[43]=T):T=e[43];let k;e[44]!==r?(k=r("orgs.members.removeMember"),e[44]=r,e[45]=k):k=e[45];let _;e[46]!==S||e[47]!==k?(_=s.jsxs(Mt,{variant:"destructive",onClick:S,children:[T,k]}),e[46]=S,e[47]=k,e[48]=_):_=e[48];let R;e[49]!==j||e[50]!==_||e[51]!==v||e[52]!==B||e[53]!==I?(R=s.jsxs(j,{align:v,onClick:B,children:[I,$,_]}),e[49]=j,e[50]=_,e[51]=v,e[52]=B,e[53]=I,e[54]=R):R=e[54];let w;return e[55]!==E||e[56]!==R||e[57]!==x?(w=s.jsxs(E,{children:[x,R]}),e[55]=E,e[56]=R,e[57]=x,e[58]=w):w=e[58],w}function ii(t){return t.stopPropagation()}function li(t){return t.stopPropagation()}function Qt(t){const e=ue.c(11),{invitationId:l,onCancel:c,isCancelling:a}=t,n=a===void 0?!1:a,u=xe();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Wt,{asChild:!0,children:s.jsx(at,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ai,children:s.jsx(Zt,{size:20})})}),e[0]=m):m=e[0];let r;e[1]!==l||e[2]!==c?(r=j=>{j.stopPropagation(),c(l)},e[1]=l,e[2]=c,e[3]=r):r=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(es,{size:16}),e[4]=p):p=e[4];let f;e[5]!==u?(f=u("orgs.members.cancelInvitation"),e[5]=u,e[6]=f):f=e[6];let o;return e[7]!==n||e[8]!==r||e[9]!==f?(o=s.jsxs(Ht,{children:[m,s.jsx(Xt,{align:"end",onClick:ni,children:s.jsxs(Mt,{variant:"destructive",onClick:r,disabled:n,children:[p,f]})})]}),e[7]=n,e[8]=r,e[9]=f,e[10]=o):o=e[10],o}function ni(t){return t.stopPropagation()}function ai(t){return t.stopPropagation()}function ri(){const t=ue.c(198),e=xe(),{data:l}=ys(),{data:c}=Ws(),a=Xs(),n=Jt(),{locator:u}=It(),m=Yt(),[r,p]=pe.useState(null),[f,o]=pe.useState(null),[j,E]=pe.useState(""),[z,P]=pe.useState("table"),[v,B]=pe.useState("member"),[x,O]=pe.useState("asc"),I=l?.data?.members;let $;t[0]!==v?($=i=>{v===i?O(fi):(B(i),O("asc"))},t[0]=v,t[1]=$):$=t[1];const S=$;let T=I??[],k=c??[];if(j){const i=j.toLowerCase();T=T.filter(d=>d.user?.name?.toLowerCase().includes(i)||d.user?.email?.toLowerCase().includes(i)||d.role?.toLowerCase().includes(i)),k=k.filter(d=>d.email?.toLowerCase().includes(i)||d.role?.toLowerCase().includes(i))}if(v&&x){let i;t[2]!==x||t[3]!==v?(i=(d,A)=>{let V,fe;e:switch(v){case"member":{V=d.user?.name||"",fe=A.user?.name||"";break e}case"role":{V=d.role||"",fe=A.role||"";break e}case"joined":{V=d.createdAt?typeof d.createdAt=="string"?d.createdAt:d.createdAt.toISOString():"",fe=A.createdAt?typeof A.createdAt=="string"?A.createdAt:A.createdAt.toISOString():"";break e}default:return 0}return x==="asc"?V.localeCompare(fe):fe.localeCompare(V)},t[2]=x,t[3]=v,t[4]=i):i=t[4],T=[...T].sort(i)}const _=T;let R;t[5]!==m?(R=async i=>{const d=await m.organization.removeMember({memberIdOrEmail:i});if(d?.error)throw new Error(d.error.message)},t[5]=m,t[6]=R):R=t[6];let w;t[7]!==u||t[8]!==n||t[9]!==e?(w=()=>{nt("member_removed"),n.invalidateQueries({queryKey:ct.members(u)}),ge.success(e("orgs.members.memberRemovedSuccess")),p(null)},t[7]=u,t[8]=n,t[9]=e,t[10]=w):w=t[10];let M;t[11]!==e?(M=i=>{nt("member_remove_failed",{error:i instanceof Error?i.message:String(i)}),ge.error(i instanceof Error?i.message:e("orgs.members.failedRemoveMember"))},t[11]=e,t[12]=M):M=t[12];let K;t[13]!==R||t[14]!==w||t[15]!==M?(K={mutationFn:R,onSuccess:w,onError:M},t[13]=R,t[14]=w,t[15]=M,t[16]=K):K=t[16];const q=xt(K);let N;t[17]!==m?(N=async i=>{const{memberId:d,role:A}=i,V=await m.organization.updateMemberRole({memberId:d,role:[A]});if(V?.error)throw new Error(V.error.message)},t[17]=m,t[18]=N):N=t[18];let h;t[19]!==u||t[20]!==n||t[21]!==e?(h=(i,d)=>{nt("member_role_updated",{new_role:d.role}),n.invalidateQueries({queryKey:ct.members(u)}),ge.success(e("orgs.members.roleUpdatedSuccess"))},t[19]=u,t[20]=n,t[21]=e,t[22]=h):h=t[22];let y;t[23]!==e?(y=(i,d)=>{nt("member_role_update_failed",{new_role:d.role,error:i instanceof Error?i.message:String(i)}),ge.error(i instanceof Error?i.message:e("orgs.members.failedUpdateRole"))},t[23]=e,t[24]=y):y=t[24];let g;t[25]!==N||t[26]!==h||t[27]!==y?(g={mutationFn:N,onSuccess:h,onError:y},t[25]=N,t[26]=h,t[27]=y,t[28]=g):g=t[28];const b=xt(g);let L;t[29]!==m?(L=async i=>{const{invitationId:d,role:A,email:V}=i,fe=await m.organization.cancelInvitation({invitationId:d});if(fe?.error)throw new Error(fe.error.message);const Tt=await m.organization.inviteMember({email:V,role:A});if(Tt?.error)throw new Error(Tt.error.message)},t[29]=m,t[30]=L):L=t[30];let F;t[31]!==u||t[32]!==n||t[33]!==e?(F=(i,d)=>{nt("invitation_role_updated",{new_role:d.role}),n.invalidateQueries({queryKey:ct.invitations(u)}),ge.success(e("orgs.members.invitationRoleUpdatedSuccess"))},t[31]=u,t[32]=n,t[33]=e,t[34]=F):F=t[34];let D;t[35]!==e?(D=(i,d)=>{nt("invitation_role_update_failed",{new_role:d.role,error:i instanceof Error?i.message:String(i)}),ge.error(i instanceof Error?i.message:e("orgs.members.failedUpdateInvitationRole"))},t[35]=e,t[36]=D):D=t[36];let G;t[37]!==F||t[38]!==D||t[39]!==L?(G={mutationFn:L,onSuccess:F,onError:D},t[37]=F,t[38]=D,t[39]=L,t[40]=G):G=t[40];const H=xt(G),{roles:U,customRoles:Q}=ws();let J;t[41]!==Q?(J=si(Q),t[41]=Q,t[42]=J):J=t[42];const W=J;let X;t[43]!==U?(X=U.filter(ui),t[43]=U,t[44]=X):X=t[44];const Y=X;let ae;t[45]!==e?(ae=e("orgs.members.columnMember"),t[45]=e,t[46]=ae):ae=t[46];let re;t[47]!==e?(re=i=>i.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ot,{url:i.data.user?.image??void 0,fallback:gt(i.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.data.user?.name||e("orgs.members.unknown")}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ot,{fallback:gt(i.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:e("orgs.members.invitationSent")})]})]}),t[47]=e,t[48]=re):re=t[48];let oe;t[49]!==ae||t[50]!==re?(oe={id:"member",header:ae,render:re,cellClassName:"flex-1 min-w-0",sortable:!0},t[49]=ae,t[50]=re,t[51]=oe):oe=t[51];let Z;t[52]!==e?(Z=e("orgs.members.columnRole"),t[52]=e,t[53]=Z):Z=t[53];let ce;t[54]!==W||t[55]!==Y||t[56]!==H||t[57]!==b?(ce=i=>i.type==="member"?s.jsx(pt,{role:i.data.role,memberId:i.data.id,isOwner:i.data.role==="owner",roleColorMap:W,selectableRoles:Y,onRoleChange:(d,A)=>b.mutate({memberId:d,role:A}),className:"w-36"}):s.jsx(pt,{role:i.data.role,memberId:i.data.id,isOwner:!1,roleColorMap:W,selectableRoles:Y,onRoleChange:(d,A)=>H.mutate({invitationId:d,role:A,email:i.data.email}),className:"w-36"}),t[54]=W,t[55]=Y,t[56]=H,t[57]=b,t[58]=ce):ce=t[58];let me;t[59]!==Z||t[60]!==ce?(me={id:"role",header:Z,render:ce,cellClassName:"w-36 shrink-0",sortable:!0},t[59]=Z,t[60]=ce,t[61]=me):me=t[61];let ee;t[62]!==e?(ee=e("orgs.members.columnTags"),t[62]=e,t[63]=ee):ee=t[63];let te;t[64]!==ee?(te={id:"tags",header:ee,render:di,cellClassName:"w-40 shrink-0"},t[64]=ee,t[65]=te):te=t[65];let se;t[66]!==e?(se=e("orgs.members.columnJoined"),t[66]=e,t[67]=se):se=t[67];let ie;t[68]!==e?(ie=i=>i.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:i.data.createdAt?Ns(i.data.createdAt):e("orgs.members.na")}):s.jsx(ht,{variant:"outline",children:e("orgs.members.pending")}),t[68]=e,t[69]=ie):ie=t[69];let le;t[70]!==se||t[71]!==ie?(le={id:"joined",header:se,render:ie,cellClassName:"w-48 shrink-0",sortable:!0},t[70]=se,t[71]=ie,t[72]=le):le=t[72];let ne;t[73]!==a.cancel.isPending||t[74]!==U||t[75]!==b?(ne={id:"actions",header:"",render:i=>i.type==="member"?s.jsx(Gt,{member:i.data,roles:U,onChangeRole:(d,A)=>b.mutate({memberId:d,role:A}),onRemove:p,isUpdating:b.isPending}):s.jsx(Qt,{invitationId:i.data.id,onCancel:o,isCancelling:a.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[73]=a.cancel.isPending,t[74]=U,t[75]=b,t[76]=ne):ne=t[76];let C;t[77]!==oe||t[78]!==me||t[79]!==te||t[80]!==le||t[81]!==ne?(C=[oe,me,te,le,ne],t[77]=oe,t[78]=me,t[79]=te,t[80]=le,t[81]=ne,t[82]=C):C=t[82];const he=C;let de;t[83]!==e?(de=e("orgs.members.inviteMember"),t[83]=e,t[84]=de):de=t[84];let be;t[85]!==de?(be=s.jsx(ds.Actions,{children:s.jsx(Ss,{trigger:s.jsx(at,{size:"sm",children:de})})}),t[85]=de,t[86]=be):be=t[86];const bt=be,jt=[..._.map(mi),...k.filter(ci).map(oi)],vt=!!f;let mt;t[87]===Symbol.for("react.memo_cache_sentinel")?(mt=()=>o(null),t[87]=mt):mt=t[87];let je;t[88]!==e?(je=e("orgs.members.cancelInvitationTitle"),t[88]=e,t[89]=je):je=t[89];let ve;t[90]!==je?(ve=s.jsx(zt,{children:je}),t[90]=je,t[91]=ve):ve=t[91];let Ce;t[92]!==e?(Ce=e("orgs.members.cancelInvitationDescription"),t[92]=e,t[93]=Ce):Ce=t[93];let Se;t[94]!==Ce?(Se=s.jsx(Pt,{children:Ce}),t[94]=Ce,t[95]=Se):Se=t[95];let Ne;t[96]!==ve||t[97]!==Se?(Ne=s.jsxs(kt,{children:[ve,Se]}),t[96]=ve,t[97]=Se,t[98]=Ne):Ne=t[98];let ye;t[99]!==e?(ye=e("orgs.members.keepInvitation"),t[99]=e,t[100]=ye):ye=t[100];let we;t[101]!==ye?(we=s.jsx(_t,{children:ye}),t[101]=ye,t[102]=we):we=t[102];let Me;t[103]!==a.cancel||t[104]!==f?(Me=()=>{f&&(a.cancel.mutate(f),o(null))},t[103]=a.cancel,t[104]=f,t[105]=Me):Me=t[105];const ss=a.cancel.isPending;let Ie;t[106]!==e?(Ie=e("orgs.members.cancelInvitation"),t[106]=e,t[107]=Ie):Ie=t[107];let Te;t[108]!==a.cancel.isPending||t[109]!==Me||t[110]!==Ie?(Te=s.jsx(Dt,{onClick:Me,disabled:ss,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ie}),t[108]=a.cancel.isPending,t[109]=Me,t[110]=Ie,t[111]=Te):Te=t[111];let Re;t[112]!==we||t[113]!==Te?(Re=s.jsxs(Et,{children:[we,Te]}),t[112]=we,t[113]=Te,t[114]=Re):Re=t[114];let Ae;t[115]!==Ne||t[116]!==Re?(Ae=s.jsxs(Ot,{children:[Ne,Re]}),t[115]=Ne,t[116]=Re,t[117]=Ae):Ae=t[117];let ze;t[118]!==vt||t[119]!==Ae?(ze=s.jsx($t,{open:vt,onOpenChange:mt,children:Ae}),t[118]=vt,t[119]=Ae,t[120]=ze):ze=t[120];const Ct=!!r;let dt;t[121]===Symbol.for("react.memo_cache_sentinel")?(dt=()=>p(null),t[121]=dt):dt=t[121];let Pe;t[122]!==e?(Pe=e("orgs.members.removeMemberTitle"),t[122]=e,t[123]=Pe):Pe=t[123];let ke;t[124]!==Pe?(ke=s.jsx(zt,{children:Pe}),t[124]=Pe,t[125]=ke):ke=t[125];let _e;t[126]!==e?(_e=e("orgs.members.removeMemberDescription"),t[126]=e,t[127]=_e):_e=t[127];let De;t[128]!==_e?(De=s.jsx(Pt,{children:_e}),t[128]=_e,t[129]=De):De=t[129];let Ee;t[130]!==ke||t[131]!==De?(Ee=s.jsxs(kt,{children:[ke,De]}),t[130]=ke,t[131]=De,t[132]=Ee):Ee=t[132];let Oe;t[133]!==e?(Oe=e("orgs.members.cancel"),t[133]=e,t[134]=Oe):Oe=t[134];let $e;t[135]!==Oe?($e=s.jsx(_t,{children:Oe}),t[135]=Oe,t[136]=$e):$e=t[136];let Le;t[137]!==r||t[138]!==q?(Le=()=>r&&q.mutate(r),t[137]=r,t[138]=q,t[139]=Le):Le=t[139];const is=q.isPending;let qe;t[140]!==e?(qe=e("orgs.members.remove"),t[140]=e,t[141]=qe):qe=t[141];let Fe;t[142]!==q.isPending||t[143]!==Le||t[144]!==qe?(Fe=s.jsx(Dt,{onClick:Le,disabled:is,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:qe}),t[142]=q.isPending,t[143]=Le,t[144]=qe,t[145]=Fe):Fe=t[145];let Be;t[146]!==$e||t[147]!==Fe?(Be=s.jsxs(Et,{children:[$e,Fe]}),t[146]=$e,t[147]=Fe,t[148]=Be):Be=t[148];let Ke;t[149]!==Ee||t[150]!==Be?(Ke=s.jsxs(Ot,{children:[Ee,Be]}),t[149]=Ee,t[150]=Be,t[151]=Ke):Ke=t[151];let Ue;t[152]!==Ct||t[153]!==Ke?(Ue=s.jsx($t,{open:Ct,onOpenChange:dt,children:Ke}),t[152]=Ct,t[153]=Ke,t[154]=Ue):Ue=t[154];let Ve;t[155]===Symbol.for("react.memo_cache_sentinel")?(Ve=s.jsx(Hs,{}),t[155]=Ve):Ve=t[155];const ls="flex flex-col gap-6";let Ge;t[156]!==e?(Ge=e("orgs.members.searchPlaceholder"),t[156]=e,t[157]=Ge):Ge=t[157];let ut;t[158]===Symbol.for("react.memo_cache_sentinel")?(ut=i=>{i.key==="Escape"&&(E(""),i.target.blur())},t[158]=ut):ut=t[158];let Qe;t[159]!==j||t[160]!==Ge?(Qe=s.jsx(bs,{value:j,onChange:E,placeholder:Ge,className:"w-full md:w-[375px]",onKeyDown:ut}),t[159]=j,t[160]=Ge,t[161]=Qe):Qe=t[161];let Je;t[162]!==e?(Je=e("orgs.members.sortName"),t[162]=e,t[163]=Je):Je=t[163];let He;t[164]!==Je?(He={id:"member",label:Je},t[164]=Je,t[165]=He):He=t[165];let We;t[166]!==e?(We=e("orgs.members.sortRole"),t[166]=e,t[167]=We):We=t[167];let Xe;t[168]!==We?(Xe={id:"role",label:We},t[168]=We,t[169]=Xe):Xe=t[169];let Ye;t[170]!==e?(Ye=e("orgs.members.sortJoined"),t[170]=e,t[171]=Ye):Ye=t[171];let Ze;t[172]!==Ye?(Ze={id:"joined",label:Ye},t[172]=Ye,t[173]=Ze):Ze=t[173];let et;t[174]!==He||t[175]!==Xe||t[176]!==Ze?(et=[He,Xe,Ze],t[174]=He,t[175]=Xe,t[176]=Ze,t[177]=et):et=t[177];let tt;t[178]!==S||t[179]!==x||t[180]!==v||t[181]!==et||t[182]!==z?(tt=s.jsx(hs,{viewMode:z,onViewModeChange:P,sortKey:v,sortDirection:x,onSort:S,sortOptions:et}),t[178]=S,t[179]=x,t[180]=v,t[181]=et,t[182]=z,t[183]=tt):tt=t[183];let st;t[184]!==Qe||t[185]!==tt?(st=s.jsxs("div",{className:"flex items-center gap-2",children:[Qe,tt]}),t[184]=Qe,t[185]=tt,t[186]=st):st=t[186];let it;t[187]!==bt||t[188]!==st?(it=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[st,bt]}),t[187]=bt,t[188]=st,t[189]=it):it=t[189];const St=z==="cards"?s.jsx("div",{children:jt.length===0?s.jsx(Nt,{title:e("orgs.members.noMembersFound"),description:j?e("orgs.members.noMembersMatch",{search:j}):e("orgs.members.inviteMembersGetStarted")}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:jt.map(i=>{if(i.type==="invitation")return s.jsxs(At,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(Qt,{invitationId:i.data.id,onCancel:o,isCancelling:a.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(ot,{fallback:gt(i.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:i.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(ht,{variant:"outline",className:"w-fit text-warning border-warning/40",children:e("orgs.members.pending")})}),s.jsx(pt,{role:i.data.role,memberId:i.data.id,isOwner:!1,roleColorMap:W,selectableRoles:Y,onRoleChange:(A,V)=>H.mutate({invitationId:A,role:V,email:i.data.email}),className:"w-fit"})]})]})]},`inv-${i.data.id}`);const d=i.data;return s.jsxs(At,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(Gt,{member:d,roles:U,onChangeRole:(A,V)=>b.mutate({memberId:A,role:V}),onRemove:p,isUpdating:b.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(ot,{url:d.user?.image??void 0,fallback:gt(d.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:d.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:d.user?.email}),s.jsx(pt,{role:d.role,memberId:d.id,isOwner:d.role==="owner",roleColorMap:W,selectableRoles:Y,onRoleChange:(A,V)=>b.mutate({memberId:A,role:V}),className:"w-fit"}),s.jsx(ts,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(js,{columns:he,data:jt,isLoading:!1,sortKey:v,sortDirection:x,onSort:S,emptyState:j?s.jsx(Nt,{title:e("orgs.members.noMembersFound"),description:e("orgs.members.noMembersMatch",{search:j})}):s.jsx(Nt,{title:e("orgs.members.noMembersFound"),description:e("orgs.members.inviteMembersGetStarted")})});let lt;t[190]!==it||t[191]!==St?(lt=s.jsxs("div",{className:ls,children:[it,St]}),t[190]=it,t[191]=St,t[192]=lt):lt=t[192];let ft;return t[193]!==ze||t[194]!==Ue||t[195]!==Ve||t[196]!==lt?(ft=s.jsxs(s.Fragment,{children:[ze,Ue,Ve,lt]}),t[193]=ze,t[194]=Ue,t[195]=Ve,t[196]=lt,t[197]=ft):ft=t[197],ft}function oi(t){return{type:"invitation",data:t}}function ci(t){return t.status==="pending"}function mi(t){return{type:"member",data:t}}function di(t){return t.type==="member"?s.jsx(ts,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function ui(t){return t.role!=="owner"}function fi(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function gi(){const t=ue.c(7),e=xe();let l;t[0]!==e?(l=e("orgs.members.failedLoadMembers"),t[0]=e,t[1]=l):l=t[1];let c;t[2]!==l?(c=s.jsx("div",{className:"text-sm text-muted-foreground",children:l}),t[2]=l,t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ri,{}),t[4]=a):a=t[4];let n;return t[5]!==c?(n=s.jsx(ms,{group:"members",className:"gap-6",errorFallback:c,children:a}),t[5]=c,t[6]=n):n=t[6],n}function nl(){const t=ue.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Js,{capability:"members:manage",area:"members",children:s.jsx(gi,{})}),t[0]=e):e=t[0],e}export{nl as default};
1
+ import{c as ue,b as xe,j as s,ef as ns,B as at,ee as as,ed as rs,X as It,a2 as os,D as cs,o as Jt,e as xt,K as ct,t as ge,r as pe,l as rt,h as Rt,fI as ms,n as ds,e$ as At,I as Ht,F as Wt,H as Xt,aj as us,ah as fs,ai as gs,G as Mt,$ as ps,al as xs,q as nt}from"./index-OBKgoLrS.js";import{C as hs}from"./collection-display-button-kGszYmIr.js";import{S as bs}from"./search-input-Z6QSPnUN.js";import{C as js}from"./collection-table-wrapper-DdfR_Ktb.js";import{E as Nt}from"./empty-state-CcAOCIdu.js";import{u as vs,a as Cs,I as Ss}from"./use-join-requests-CTH575eV.js";import{A as ot}from"./avatar-s9hDkne5.js";import{f as Ns}from"./format-time-CjIPQhCN.js";import{g as gt}from"./get-initials-D-f_fDFw.js";import{a as ys}from"./use-members-Bs-9PW58.js";import{u as Yt}from"./use-org-auth-client-BwlmPJlb.js";import{u as ws}from"./use-organization-roles-0bUJSiHD.js";import{g as Ms,a as Is}from"./role-color-Dn2tXDDF.js";import{T as Ts,a as Rs,c as As,b as zs}from"./tooltip-B7_4-yXG.js";import{A as zt,a as Pt,b as kt,c as _t,g as Dt,d as Et,e as Ot,f as $t}from"./alert-dialog-BNhkZQ_x.js";import{B as ht}from"./badge-BbvQ8-kh.js";import{i as Zt}from"./DotsVertical-DmnxoC5N.js";import{i as Ps}from"./Key01-CUdVlBTP.js";import{s as es,b as ks}from"./XClose-KiYAVi9i.js";import{s as _s}from"./Trash01-CuygCR6g.js";import{a as Lt,b as qt,c as Ft,d as Bt,S as Kt}from"./select-BhJ8bhDe.js";import{C as Ut}from"./checkbox-DUCWAAon.js";import{e as yt,b as wt,h as Vt,a as Ds,c as Es,f as Os,C as $s}from"./command-8n8txvgK.js";import{b as Ls,P as qs,a as Fs}from"./popover-Cb13NGPe.js";import{t as Bs}from"./ChevronUp-6u3SxMoQ.js";import{s as Ks}from"./Plus-Cn427okX.js";import{u as Us,c as Vs,a as Gs,d as Qs}from"./use-tags-UVdMm4OW.js";import{R as Js}from"./require-capability-J3WiMSvq.js";import"./ArrowUp-CwQ1Q4VU.js";import"./Check-BmlrCmw2.js";import"./view-mode-toggle-EBcGWFvm.js";import"./SearchMd-Pjthnah9.js";import"./table-DdKwpV9k.js";import"./dialog-BI1xJ9QE.js";import"./X-C5Ha4Ozq.js";import"./form-DBZy3h_k.js";import"./label-BsArcFBD.js";import"./textarea-Cat7zkJf.js";import"./User01-CVYpMQND.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-BnsOjLj5.js";import"./index-Co0BO1QR.js";import"./access-gate-jiNu9DZN.js";import"./capability-load-error-DToq0UrY.js";function Hs(){const t=ue.c(19),e=xe(),l=vs(),{approve:c,deny:a}=Cs();if(l.length===0)return null;let n;t[0]!==e?(n=e("settings.joinRequestsSection.title"),t[0]=e,t[1]=n):n=t[1];let u;t[2]!==e?(u=e("settings.joinRequestsSection.description"),t[2]=e,t[3]=u):u=t[3];let m;if(t[4]!==c||t[5]!==a||t[6]!==l||t[7]!==e){let f;t[9]!==c||t[10]!==a||t[11]!==e?(f=o=>s.jsx(ns,{icon:s.jsx(ot,{url:o.user?.image??void 0,fallback:(o.user?.name??o.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:o.user?.name??o.user?.email??o.userId,description:o.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(at,{size:"sm",variant:"outline",onClick:()=>a.mutate(o.id),disabled:a.isPending||c.isPending,children:e("settings.joinRequestsSection.deny")}),s.jsx(at,{size:"sm",onClick:()=>c.mutate(o.id),disabled:c.isPending||a.isPending,children:e("settings.joinRequestsSection.approve")})]})},o.id),t[9]=c,t[10]=a,t[11]=e,t[12]=f):f=t[12],m=l.map(f),t[4]=c,t[5]=a,t[6]=l,t[7]=e,t[8]=m}else m=t[8];let r;t[13]!==m?(r=s.jsx(as,{children:m}),t[13]=m,t[14]=r):r=t[14];let p;return t[15]!==n||t[16]!==u||t[17]!==r?(p=s.jsx(rs,{title:n,description:u,children:r}),t[15]=n,t[16]=u,t[17]=r,t[18]=p):p=t[18],p}function Ws(){const t=ue.c(7),{locator:e}=It(),l=os();let c;t[0]!==e?(c=ct.invitations(e),t[0]=e,t[1]=c):c=t[1];let a;t[2]!==l?(a=async()=>(await l.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=l,t[3]=a):a=t[3];let n;return t[4]!==c||t[5]!==a?(n={queryKey:c,queryFn:a},t[4]=c,t[5]=a,t[6]=n):n=t[6],cs(n)}function Xs(){const t=ue.c(10),{locator:e}=It(),l=Yt(),c=Jt();let a;t[0]!==l?(a=async p=>{const f=await l.organization.cancelInvitation({invitationId:p});if(f?.error)throw new Error(f.error.message);return f.data},t[0]=l,t[1]=a):a=t[1];let n;t[2]!==e||t[3]!==c?(n=()=>{c.invalidateQueries({queryKey:ct.invitations(e)}),ge.success("Invitation cancelled")},t[2]=e,t[3]=c,t[4]=n):n=t[4];let u;t[5]!==a||t[6]!==n?(u={mutationFn:a,onSuccess:n,onError:Ys},t[5]=a,t[6]=n,t[7]=u):u=t[7];const m=xt(u);let r;return t[8]!==m?(r={cancel:m},t[8]=m,t[9]=r):r=t[9],r}function Ys(t){ge.error(t instanceof Error?t.message:"Failed to cancel invitation")}function ts(t){const e=ue.c(51),{memberId:l,className:c,disabled:a,maxDisplay:n}=t,u=a===void 0?!1:a,m=n===void 0?2:n,r=xe(),[p,f]=pe.useState(!1),[o,j]=pe.useState(""),{data:E,isLoading:z}=Us(),P=E===void 0?[]:E,{data:v,isLoading:B}=Vs(l),x=v===void 0?[]:v,O=Gs(),I=Qs(),$=z||B,S=x.map(ei);let T;e[0]!==o?(T=C=>C.name.toLowerCase().includes(o.toLowerCase()),e[0]=o,e[1]=T):T=e[1];const k=P.filter(T);let _;e[2]!==o?(_=C=>C.name.toLowerCase()===o.toLowerCase(),e[2]=o,e[3]=_):_=e[3];const R=P.find(_),w=o.trim()&&!R,M=async C=>{const de=S.includes(C.id)?S.filter(be=>be!==C.id):[...S,C.id];await I.mutateAsync({memberId:l,tagIds:de})},K=async()=>{if(!o.trim())return;const C=await O.mutateAsync(o.trim());await I.mutateAsync({memberId:l,tagIds:[...S,C.id]}),j("")},q=async C=>{const he=S.filter(de=>de!==C);await I.mutateAsync({memberId:l,tagIds:he})},N=O.isPending||I.isPending,h=qs;let y;e[4]!==p?(y=()=>f(!p),e[4]=p,e[5]=y):y=e[5];let g;e[6]!==c?(g=rt("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",c),e[6]=c,e[7]=g):g=e[7];const b=u||$,L=$?s.jsx(Rt,{className:"size-3.5 text-muted-foreground"}):x.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[x.slice(0,m).map(Zs),x.length>m&&s.jsxs(ht,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",x.length-m]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:r("common.tagMultiSelect.addTags")});let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Bs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=F):F=e[8];let D;e[9]!==L||e[10]!==y||e[11]!==g||e[12]!==b?(D=s.jsx(Fs,{asChild:!0,children:s.jsxs(at,{variant:"ghost",size:"sm",onClick:y,className:g,disabled:b,children:[L,F]})}),e[9]=L,e[10]=y,e[11]=g,e[12]=b,e[13]=D):D=e[13];const G=Ls,H="w-56 p-0",U="start";let Q;e[14]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(!1),e[14]=Q):Q=e[14];const J=Os,W=!1;let X;e[15]!==r?(X=r("common.tagMultiSelect.searchOrCreate"),e[15]=r,e[16]=X):X=e[16];let Y;e[17]!==o||e[18]!==X?(Y=s.jsx($s,{placeholder:X,value:o,onValueChange:j,className:"h-9"}),e[17]=o,e[18]=X,e[19]=Y):Y=e[19];const ae=Es,re=x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(yt,{heading:r("common.tagMultiSelect.selected"),children:x.map(C=>s.jsx(wt,{onSelect:()=>M(C),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ut,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:C.name})]}),s.jsx("button",{type:"button",onClick:he=>{he.stopPropagation(),q(C.id)},className:"opacity-50 hover:opacity-100",disabled:N,children:s.jsx(es,{size:14})})]})},C.id))}),s.jsx(Vt,{})]}),oe=yt;let Z;e[20]!==r?(Z=r("common.tagMultiSelect.available"),e[20]=r,e[21]=Z):Z=e[21];const ce=k.length===0&&!w&&s.jsx(Ds,{children:r("common.tagMultiSelect.noTagsFound")}),me=k.filter(C=>!S.includes(C.id)).map(C=>s.jsx(wt,{onSelect:()=>M(C),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ut,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:C.name})]})},C.id));let ee;e[22]!==oe||e[23]!==Z||e[24]!==ce||e[25]!==me?(ee=s.jsxs(oe,{heading:Z,children:[ce,me]}),e[22]=oe,e[23]=Z,e[24]=ce,e[25]=me,e[26]=ee):ee=e[26];let te;e[27]!==K||e[28]!==N||e[29]!==o||e[30]!==w||e[31]!==r?(te=w&&s.jsxs(s.Fragment,{children:[s.jsx(Vt,{}),s.jsx(yt,{children:s.jsx(wt,{onSelect:K,className:"cursor-pointer",disabled:N,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[N?s.jsx(Rt,{className:"size-3.5"}):s.jsx(Ks,{size:14}),s.jsx("span",{children:r("common.tagMultiSelect.createTag",{tagName:o.trim()})})]})})})]}),e[27]=K,e[28]=N,e[29]=o,e[30]=w,e[31]=r,e[32]=te):te=e[32];let se;e[33]!==ae||e[34]!==re||e[35]!==ee||e[36]!==te?(se=s.jsxs(ae,{children:[re,ee,te]}),e[33]=ae,e[34]=re,e[35]=ee,e[36]=te,e[37]=se):se=e[37];let ie;e[38]!==J||e[39]!==Y||e[40]!==se?(ie=s.jsxs(J,{shouldFilter:W,children:[Y,se]}),e[38]=J,e[39]=Y,e[40]=se,e[41]=ie):ie=e[41];let le;e[42]!==G||e[43]!==Q||e[44]!==ie?(le=s.jsx(G,{className:H,align:U,onEscapeKeyDown:Q,children:ie}),e[42]=G,e[43]=Q,e[44]=ie,e[45]=le):le=e[45];let ne;return e[46]!==h||e[47]!==p||e[48]!==D||e[49]!==le?(ne=s.jsxs(h,{open:p,onOpenChange:f,children:[D,le]}),e[46]=h,e[47]=p,e[48]=D,e[49]=le,e[50]=ne):ne=e[50],ne}function Zs(t){return s.jsx(ht,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function ei(t){return t.id}const ti=["owner","admin","user"];function si(t){const e=new Map;for(const l of ti)e.set(l,Ms(l,!0));for(const l of t)l&&!e.has(l.role)&&e.set(l.role,Is(l.role));return e}function pt(t){const e=ue.c(84),{role:l,memberId:c,isOwner:a,roleColorMap:n,selectableRoles:u,onRoleChange:m,size:r,className:p}=t,f=r===void 0?"xs":r,o=xe();let j,E,z,P,v,B,x,O,I,$,S;if(e[0]!==p||e[1]!==a||e[2]!==c||e[3]!==m||e[4]!==l||e[5]!==n||e[6]!==u||e[7]!==f||e[8]!==o){S=Symbol.for("react.early_return_sentinel");e:{const N=n.get(l)??"bg-muted-foreground";if(a){let h;e[20]!==c||e[21]!==m?(h=J=>m(c,J),e[20]=c,e[21]=m,e[22]=h):h=e[22];let y;e[23]!==l?(y=s.jsx("span",{className:"capitalize truncate",children:l}),e[23]=l,e[24]=y):y=e[24];const g=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:rt("size-2 rounded-full shrink-0",N)}),y]});let b;e[25]!==g?(b=s.jsx(Lt,{children:g}),e[25]=g,e[26]=b):b=e[26];let L;e[27]!==p||e[28]!==f||e[29]!==b?(L=s.jsx(qt,{size:f,className:p,children:b}),e[27]=p,e[28]=f,e[29]=b,e[30]=L):L=e[30];let F;if(e[31]!==n||e[32]!==u){let J;e[34]!==n?(J=W=>{const X=n.get(W.role)??"bg-muted-foreground";return s.jsx(Ft,{value:W.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:rt("size-3 rounded-full",X)}),s.jsx("span",{className:"capitalize",children:W.label})]})},W.role)},e[34]=n,e[35]=J):J=e[35],F=u.map(J),e[31]=n,e[32]=u,e[33]=F}else F=e[33];let D;e[36]!==F?(D=s.jsx(Bt,{children:F}),e[36]=F,e[37]=D):D=e[37];let G;e[38]!==a||e[39]!==l||e[40]!==h||e[41]!==L||e[42]!==D?(G=s.jsx(Ts,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(Kt,{value:l,onValueChange:h,disabled:a,children:[L,D]})})}),e[38]=a,e[39]=l,e[40]=h,e[41]=L,e[42]=D,e[43]=G):G=e[43];let H;e[44]!==o?(H=o("orgs.members.ownerRoleCannotBeChanged"),e[44]=o,e[45]=H):H=e[45];let U;e[46]!==H?(U=s.jsx(Rs,{children:s.jsx("p",{children:H})}),e[46]=H,e[47]=U):U=e[47];let Q;e[48]!==G||e[49]!==U?(Q=s.jsx(As,{children:s.jsxs(zs,{children:[G,U]})}),e[48]=G,e[49]=U,e[50]=Q):Q=e[50],S=Q;break e}z=Kt,O=l,e[51]!==c||e[52]!==m?(I=h=>m(c,h),e[51]=c,e[52]=m,e[53]=I):I=e[53],$=a,E=qt,B=f,x=p,j=Lt,v="flex items-center gap-2 min-w-0",P=rt("size-2 rounded-full shrink-0",N)}e[0]=p,e[1]=a,e[2]=c,e[3]=m,e[4]=l,e[5]=n,e[6]=u,e[7]=f,e[8]=o,e[9]=j,e[10]=E,e[11]=z,e[12]=P,e[13]=v,e[14]=B,e[15]=x,e[16]=O,e[17]=I,e[18]=$,e[19]=S}else j=e[9],E=e[10],z=e[11],P=e[12],v=e[13],B=e[14],x=e[15],O=e[16],I=e[17],$=e[18],S=e[19];if(S!==Symbol.for("react.early_return_sentinel"))return S;let T;e[54]!==P?(T=s.jsx("div",{className:P}),e[54]=P,e[55]=T):T=e[55];let k;e[56]!==l?(k=s.jsx("span",{className:"capitalize truncate",children:l}),e[56]=l,e[57]=k):k=e[57];let _;e[58]!==T||e[59]!==k||e[60]!==v?(_=s.jsxs("div",{className:v,children:[T,k]}),e[58]=T,e[59]=k,e[60]=v,e[61]=_):_=e[61];let R;e[62]!==j||e[63]!==_?(R=s.jsx(j,{children:_}),e[62]=j,e[63]=_,e[64]=R):R=e[64];let w;e[65]!==E||e[66]!==R||e[67]!==B||e[68]!==x?(w=s.jsx(E,{size:B,className:x,children:R}),e[65]=E,e[66]=R,e[67]=B,e[68]=x,e[69]=w):w=e[69];let M;if(e[70]!==n||e[71]!==u){let N;e[73]!==n?(N=h=>{const y=n.get(h.role)??"bg-muted-foreground";return s.jsx(Ft,{value:h.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:rt("size-3 rounded-full",y)}),s.jsx("span",{className:"capitalize",children:h.label})]})},h.role)},e[73]=n,e[74]=N):N=e[74],M=u.map(N),e[70]=n,e[71]=u,e[72]=M}else M=e[72];let K;e[75]!==M?(K=s.jsx(Bt,{children:M}),e[75]=M,e[76]=K):K=e[76];let q;return e[77]!==z||e[78]!==w||e[79]!==K||e[80]!==O||e[81]!==I||e[82]!==$?(q=s.jsxs(z,{value:O,onValueChange:I,disabled:$,children:[w,K]}),e[77]=z,e[78]=w,e[79]=K,e[80]=O,e[81]=I,e[82]=$,e[83]=q):q=e[83],q}function Gt(t){const e=ue.c(59),{member:l,roles:c,onChangeRole:a,onRemove:n,isUpdating:u}=t,m=u===void 0?!1:u,r=xe(),p=l.role==="owner";let f,o,j,E,z,P,v,B,x;if(e[0]!==p||e[1]!==m||e[2]!==l.id||e[3]!==l.role||e[4]!==a||e[5]!==c||e[6]!==r){let M;e[16]!==l.role?(M=g=>g.role!==l.role&&g.role!=="owner",e[16]=l.role,e[17]=M):M=e[17];const K=c.filter(M);E=Ht;let q;e[18]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Zt,{size:20}),e[18]=q):q=e[18],e[19]!==p?(x=s.jsx(Wt,{asChild:!0,children:s.jsx(at,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:p,onClick:li,children:q})}),e[19]=p,e[20]=x):x=e[20],j=Xt,v="end",B=ii,o=us;let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ks,{size:16}),e[21]=N):N=e[21];let h;e[22]!==r?(h=r("orgs.members.changeRole"),e[22]=r,e[23]=h):h=e[23],e[24]!==m||e[25]!==h?(P=s.jsxs(fs,{disabled:m,children:[N,h]}),e[24]=m,e[25]=h,e[26]=P):P=e[26],f=gs;let y;e[27]!==m||e[28]!==l.id||e[29]!==a||e[30]!==r?(y=g=>{const b=[];return g.isBuiltin||(g.allowsAllStaticPermissions?b.push(r("orgs.members.fullOrgAccess")):g.staticPermissionCount&&g.staticPermissionCount>0&&b.push(r("orgs.members.orgPermsCount",{count:g.staticPermissionCount})),g.allowsAllConnections?b.push(r("orgs.members.allConnections")):g.connectionCount&&g.connectionCount>0&&b.push(r("orgs.members.connectionCount",{count:g.connectionCount})),(g.connectionCount!==0||g.allowsAllConnections)&&(g.allowsAllTools?b.push(r("orgs.members.allTools")):g.toolCount&&g.toolCount>0&&b.push(r("orgs.members.toolCount",{count:g.toolCount})))),s.jsxs(Mt,{onClick:L=>{L.stopPropagation(),a(l.id,g.role)},disabled:m,children:[g.isBuiltin?s.jsx(ps,{size:16}):s.jsx(Ps,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:g.label}),!g.isBuiltin&&b.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:b.join(", ")})]})]},g.role)},e[27]=m,e[28]=l.id,e[29]=a,e[30]=r,e[31]=y):y=e[31],z=K.map(y),e[0]=p,e[1]=m,e[2]=l.id,e[3]=l.role,e[4]=a,e[5]=c,e[6]=r,e[7]=f,e[8]=o,e[9]=j,e[10]=E,e[11]=z,e[12]=P,e[13]=v,e[14]=B,e[15]=x}else f=e[7],o=e[8],j=e[9],E=e[10],z=e[11],P=e[12],v=e[13],B=e[14],x=e[15];let O;e[32]!==f||e[33]!==z?(O=s.jsx(f,{children:z}),e[32]=f,e[33]=z,e[34]=O):O=e[34];let I;e[35]!==o||e[36]!==P||e[37]!==O?(I=s.jsxs(o,{children:[P,O]}),e[35]=o,e[36]=P,e[37]=O,e[38]=I):I=e[38];let $;e[39]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(xs,{}),e[39]=$):$=e[39];let S;e[40]!==l.id||e[41]!==n?(S=M=>{M.stopPropagation(),n(l.id)},e[40]=l.id,e[41]=n,e[42]=S):S=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(_s,{size:16}),e[43]=T):T=e[43];let k;e[44]!==r?(k=r("orgs.members.removeMember"),e[44]=r,e[45]=k):k=e[45];let _;e[46]!==S||e[47]!==k?(_=s.jsxs(Mt,{variant:"destructive",onClick:S,children:[T,k]}),e[46]=S,e[47]=k,e[48]=_):_=e[48];let R;e[49]!==j||e[50]!==_||e[51]!==v||e[52]!==B||e[53]!==I?(R=s.jsxs(j,{align:v,onClick:B,children:[I,$,_]}),e[49]=j,e[50]=_,e[51]=v,e[52]=B,e[53]=I,e[54]=R):R=e[54];let w;return e[55]!==E||e[56]!==R||e[57]!==x?(w=s.jsxs(E,{children:[x,R]}),e[55]=E,e[56]=R,e[57]=x,e[58]=w):w=e[58],w}function ii(t){return t.stopPropagation()}function li(t){return t.stopPropagation()}function Qt(t){const e=ue.c(11),{invitationId:l,onCancel:c,isCancelling:a}=t,n=a===void 0?!1:a,u=xe();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Wt,{asChild:!0,children:s.jsx(at,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ai,children:s.jsx(Zt,{size:20})})}),e[0]=m):m=e[0];let r;e[1]!==l||e[2]!==c?(r=j=>{j.stopPropagation(),c(l)},e[1]=l,e[2]=c,e[3]=r):r=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(es,{size:16}),e[4]=p):p=e[4];let f;e[5]!==u?(f=u("orgs.members.cancelInvitation"),e[5]=u,e[6]=f):f=e[6];let o;return e[7]!==n||e[8]!==r||e[9]!==f?(o=s.jsxs(Ht,{children:[m,s.jsx(Xt,{align:"end",onClick:ni,children:s.jsxs(Mt,{variant:"destructive",onClick:r,disabled:n,children:[p,f]})})]}),e[7]=n,e[8]=r,e[9]=f,e[10]=o):o=e[10],o}function ni(t){return t.stopPropagation()}function ai(t){return t.stopPropagation()}function ri(){const t=ue.c(198),e=xe(),{data:l}=ys(),{data:c}=Ws(),a=Xs(),n=Jt(),{locator:u}=It(),m=Yt(),[r,p]=pe.useState(null),[f,o]=pe.useState(null),[j,E]=pe.useState(""),[z,P]=pe.useState("table"),[v,B]=pe.useState("member"),[x,O]=pe.useState("asc"),I=l?.data?.members;let $;t[0]!==v?($=i=>{v===i?O(fi):(B(i),O("asc"))},t[0]=v,t[1]=$):$=t[1];const S=$;let T=I??[],k=c??[];if(j){const i=j.toLowerCase();T=T.filter(d=>d.user?.name?.toLowerCase().includes(i)||d.user?.email?.toLowerCase().includes(i)||d.role?.toLowerCase().includes(i)),k=k.filter(d=>d.email?.toLowerCase().includes(i)||d.role?.toLowerCase().includes(i))}if(v&&x){let i;t[2]!==x||t[3]!==v?(i=(d,A)=>{let V,fe;e:switch(v){case"member":{V=d.user?.name||"",fe=A.user?.name||"";break e}case"role":{V=d.role||"",fe=A.role||"";break e}case"joined":{V=d.createdAt?typeof d.createdAt=="string"?d.createdAt:d.createdAt.toISOString():"",fe=A.createdAt?typeof A.createdAt=="string"?A.createdAt:A.createdAt.toISOString():"";break e}default:return 0}return x==="asc"?V.localeCompare(fe):fe.localeCompare(V)},t[2]=x,t[3]=v,t[4]=i):i=t[4],T=[...T].sort(i)}const _=T;let R;t[5]!==m?(R=async i=>{const d=await m.organization.removeMember({memberIdOrEmail:i});if(d?.error)throw new Error(d.error.message)},t[5]=m,t[6]=R):R=t[6];let w;t[7]!==u||t[8]!==n||t[9]!==e?(w=()=>{nt("member_removed"),n.invalidateQueries({queryKey:ct.members(u)}),ge.success(e("orgs.members.memberRemovedSuccess")),p(null)},t[7]=u,t[8]=n,t[9]=e,t[10]=w):w=t[10];let M;t[11]!==e?(M=i=>{nt("member_remove_failed",{error:i instanceof Error?i.message:String(i)}),ge.error(i instanceof Error?i.message:e("orgs.members.failedRemoveMember"))},t[11]=e,t[12]=M):M=t[12];let K;t[13]!==R||t[14]!==w||t[15]!==M?(K={mutationFn:R,onSuccess:w,onError:M},t[13]=R,t[14]=w,t[15]=M,t[16]=K):K=t[16];const q=xt(K);let N;t[17]!==m?(N=async i=>{const{memberId:d,role:A}=i,V=await m.organization.updateMemberRole({memberId:d,role:[A]});if(V?.error)throw new Error(V.error.message)},t[17]=m,t[18]=N):N=t[18];let h;t[19]!==u||t[20]!==n||t[21]!==e?(h=(i,d)=>{nt("member_role_updated",{new_role:d.role}),n.invalidateQueries({queryKey:ct.members(u)}),ge.success(e("orgs.members.roleUpdatedSuccess"))},t[19]=u,t[20]=n,t[21]=e,t[22]=h):h=t[22];let y;t[23]!==e?(y=(i,d)=>{nt("member_role_update_failed",{new_role:d.role,error:i instanceof Error?i.message:String(i)}),ge.error(i instanceof Error?i.message:e("orgs.members.failedUpdateRole"))},t[23]=e,t[24]=y):y=t[24];let g;t[25]!==N||t[26]!==h||t[27]!==y?(g={mutationFn:N,onSuccess:h,onError:y},t[25]=N,t[26]=h,t[27]=y,t[28]=g):g=t[28];const b=xt(g);let L;t[29]!==m?(L=async i=>{const{invitationId:d,role:A,email:V}=i,fe=await m.organization.cancelInvitation({invitationId:d});if(fe?.error)throw new Error(fe.error.message);const Tt=await m.organization.inviteMember({email:V,role:A});if(Tt?.error)throw new Error(Tt.error.message)},t[29]=m,t[30]=L):L=t[30];let F;t[31]!==u||t[32]!==n||t[33]!==e?(F=(i,d)=>{nt("invitation_role_updated",{new_role:d.role}),n.invalidateQueries({queryKey:ct.invitations(u)}),ge.success(e("orgs.members.invitationRoleUpdatedSuccess"))},t[31]=u,t[32]=n,t[33]=e,t[34]=F):F=t[34];let D;t[35]!==e?(D=(i,d)=>{nt("invitation_role_update_failed",{new_role:d.role,error:i instanceof Error?i.message:String(i)}),ge.error(i instanceof Error?i.message:e("orgs.members.failedUpdateInvitationRole"))},t[35]=e,t[36]=D):D=t[36];let G;t[37]!==F||t[38]!==D||t[39]!==L?(G={mutationFn:L,onSuccess:F,onError:D},t[37]=F,t[38]=D,t[39]=L,t[40]=G):G=t[40];const H=xt(G),{roles:U,customRoles:Q}=ws();let J;t[41]!==Q?(J=si(Q),t[41]=Q,t[42]=J):J=t[42];const W=J;let X;t[43]!==U?(X=U.filter(ui),t[43]=U,t[44]=X):X=t[44];const Y=X;let ae;t[45]!==e?(ae=e("orgs.members.columnMember"),t[45]=e,t[46]=ae):ae=t[46];let re;t[47]!==e?(re=i=>i.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ot,{url:i.data.user?.image??void 0,fallback:gt(i.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.data.user?.name||e("orgs.members.unknown")}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ot,{fallback:gt(i.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:e("orgs.members.invitationSent")})]})]}),t[47]=e,t[48]=re):re=t[48];let oe;t[49]!==ae||t[50]!==re?(oe={id:"member",header:ae,render:re,cellClassName:"flex-1 min-w-0",sortable:!0},t[49]=ae,t[50]=re,t[51]=oe):oe=t[51];let Z;t[52]!==e?(Z=e("orgs.members.columnRole"),t[52]=e,t[53]=Z):Z=t[53];let ce;t[54]!==W||t[55]!==Y||t[56]!==H||t[57]!==b?(ce=i=>i.type==="member"?s.jsx(pt,{role:i.data.role,memberId:i.data.id,isOwner:i.data.role==="owner",roleColorMap:W,selectableRoles:Y,onRoleChange:(d,A)=>b.mutate({memberId:d,role:A}),className:"w-36"}):s.jsx(pt,{role:i.data.role,memberId:i.data.id,isOwner:!1,roleColorMap:W,selectableRoles:Y,onRoleChange:(d,A)=>H.mutate({invitationId:d,role:A,email:i.data.email}),className:"w-36"}),t[54]=W,t[55]=Y,t[56]=H,t[57]=b,t[58]=ce):ce=t[58];let me;t[59]!==Z||t[60]!==ce?(me={id:"role",header:Z,render:ce,cellClassName:"w-36 shrink-0",sortable:!0},t[59]=Z,t[60]=ce,t[61]=me):me=t[61];let ee;t[62]!==e?(ee=e("orgs.members.columnTags"),t[62]=e,t[63]=ee):ee=t[63];let te;t[64]!==ee?(te={id:"tags",header:ee,render:di,cellClassName:"w-40 shrink-0"},t[64]=ee,t[65]=te):te=t[65];let se;t[66]!==e?(se=e("orgs.members.columnJoined"),t[66]=e,t[67]=se):se=t[67];let ie;t[68]!==e?(ie=i=>i.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:i.data.createdAt?Ns(i.data.createdAt):e("orgs.members.na")}):s.jsx(ht,{variant:"outline",children:e("orgs.members.pending")}),t[68]=e,t[69]=ie):ie=t[69];let le;t[70]!==se||t[71]!==ie?(le={id:"joined",header:se,render:ie,cellClassName:"w-48 shrink-0",sortable:!0},t[70]=se,t[71]=ie,t[72]=le):le=t[72];let ne;t[73]!==a.cancel.isPending||t[74]!==U||t[75]!==b?(ne={id:"actions",header:"",render:i=>i.type==="member"?s.jsx(Gt,{member:i.data,roles:U,onChangeRole:(d,A)=>b.mutate({memberId:d,role:A}),onRemove:p,isUpdating:b.isPending}):s.jsx(Qt,{invitationId:i.data.id,onCancel:o,isCancelling:a.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[73]=a.cancel.isPending,t[74]=U,t[75]=b,t[76]=ne):ne=t[76];let C;t[77]!==oe||t[78]!==me||t[79]!==te||t[80]!==le||t[81]!==ne?(C=[oe,me,te,le,ne],t[77]=oe,t[78]=me,t[79]=te,t[80]=le,t[81]=ne,t[82]=C):C=t[82];const he=C;let de;t[83]!==e?(de=e("orgs.members.inviteMember"),t[83]=e,t[84]=de):de=t[84];let be;t[85]!==de?(be=s.jsx(ds.Actions,{children:s.jsx(Ss,{trigger:s.jsx(at,{size:"sm",children:de})})}),t[85]=de,t[86]=be):be=t[86];const bt=be,jt=[..._.map(mi),...k.filter(ci).map(oi)],vt=!!f;let mt;t[87]===Symbol.for("react.memo_cache_sentinel")?(mt=()=>o(null),t[87]=mt):mt=t[87];let je;t[88]!==e?(je=e("orgs.members.cancelInvitationTitle"),t[88]=e,t[89]=je):je=t[89];let ve;t[90]!==je?(ve=s.jsx(zt,{children:je}),t[90]=je,t[91]=ve):ve=t[91];let Ce;t[92]!==e?(Ce=e("orgs.members.cancelInvitationDescription"),t[92]=e,t[93]=Ce):Ce=t[93];let Se;t[94]!==Ce?(Se=s.jsx(Pt,{children:Ce}),t[94]=Ce,t[95]=Se):Se=t[95];let Ne;t[96]!==ve||t[97]!==Se?(Ne=s.jsxs(kt,{children:[ve,Se]}),t[96]=ve,t[97]=Se,t[98]=Ne):Ne=t[98];let ye;t[99]!==e?(ye=e("orgs.members.keepInvitation"),t[99]=e,t[100]=ye):ye=t[100];let we;t[101]!==ye?(we=s.jsx(_t,{children:ye}),t[101]=ye,t[102]=we):we=t[102];let Me;t[103]!==a.cancel||t[104]!==f?(Me=()=>{f&&(a.cancel.mutate(f),o(null))},t[103]=a.cancel,t[104]=f,t[105]=Me):Me=t[105];const ss=a.cancel.isPending;let Ie;t[106]!==e?(Ie=e("orgs.members.cancelInvitation"),t[106]=e,t[107]=Ie):Ie=t[107];let Te;t[108]!==a.cancel.isPending||t[109]!==Me||t[110]!==Ie?(Te=s.jsx(Dt,{onClick:Me,disabled:ss,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ie}),t[108]=a.cancel.isPending,t[109]=Me,t[110]=Ie,t[111]=Te):Te=t[111];let Re;t[112]!==we||t[113]!==Te?(Re=s.jsxs(Et,{children:[we,Te]}),t[112]=we,t[113]=Te,t[114]=Re):Re=t[114];let Ae;t[115]!==Ne||t[116]!==Re?(Ae=s.jsxs(Ot,{children:[Ne,Re]}),t[115]=Ne,t[116]=Re,t[117]=Ae):Ae=t[117];let ze;t[118]!==vt||t[119]!==Ae?(ze=s.jsx($t,{open:vt,onOpenChange:mt,children:Ae}),t[118]=vt,t[119]=Ae,t[120]=ze):ze=t[120];const Ct=!!r;let dt;t[121]===Symbol.for("react.memo_cache_sentinel")?(dt=()=>p(null),t[121]=dt):dt=t[121];let Pe;t[122]!==e?(Pe=e("orgs.members.removeMemberTitle"),t[122]=e,t[123]=Pe):Pe=t[123];let ke;t[124]!==Pe?(ke=s.jsx(zt,{children:Pe}),t[124]=Pe,t[125]=ke):ke=t[125];let _e;t[126]!==e?(_e=e("orgs.members.removeMemberDescription"),t[126]=e,t[127]=_e):_e=t[127];let De;t[128]!==_e?(De=s.jsx(Pt,{children:_e}),t[128]=_e,t[129]=De):De=t[129];let Ee;t[130]!==ke||t[131]!==De?(Ee=s.jsxs(kt,{children:[ke,De]}),t[130]=ke,t[131]=De,t[132]=Ee):Ee=t[132];let Oe;t[133]!==e?(Oe=e("orgs.members.cancel"),t[133]=e,t[134]=Oe):Oe=t[134];let $e;t[135]!==Oe?($e=s.jsx(_t,{children:Oe}),t[135]=Oe,t[136]=$e):$e=t[136];let Le;t[137]!==r||t[138]!==q?(Le=()=>r&&q.mutate(r),t[137]=r,t[138]=q,t[139]=Le):Le=t[139];const is=q.isPending;let qe;t[140]!==e?(qe=e("orgs.members.remove"),t[140]=e,t[141]=qe):qe=t[141];let Fe;t[142]!==q.isPending||t[143]!==Le||t[144]!==qe?(Fe=s.jsx(Dt,{onClick:Le,disabled:is,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:qe}),t[142]=q.isPending,t[143]=Le,t[144]=qe,t[145]=Fe):Fe=t[145];let Be;t[146]!==$e||t[147]!==Fe?(Be=s.jsxs(Et,{children:[$e,Fe]}),t[146]=$e,t[147]=Fe,t[148]=Be):Be=t[148];let Ke;t[149]!==Ee||t[150]!==Be?(Ke=s.jsxs(Ot,{children:[Ee,Be]}),t[149]=Ee,t[150]=Be,t[151]=Ke):Ke=t[151];let Ue;t[152]!==Ct||t[153]!==Ke?(Ue=s.jsx($t,{open:Ct,onOpenChange:dt,children:Ke}),t[152]=Ct,t[153]=Ke,t[154]=Ue):Ue=t[154];let Ve;t[155]===Symbol.for("react.memo_cache_sentinel")?(Ve=s.jsx(Hs,{}),t[155]=Ve):Ve=t[155];const ls="flex flex-col gap-6";let Ge;t[156]!==e?(Ge=e("orgs.members.searchPlaceholder"),t[156]=e,t[157]=Ge):Ge=t[157];let ut;t[158]===Symbol.for("react.memo_cache_sentinel")?(ut=i=>{i.key==="Escape"&&(E(""),i.target.blur())},t[158]=ut):ut=t[158];let Qe;t[159]!==j||t[160]!==Ge?(Qe=s.jsx(bs,{value:j,onChange:E,placeholder:Ge,className:"w-full md:w-[375px]",onKeyDown:ut}),t[159]=j,t[160]=Ge,t[161]=Qe):Qe=t[161];let Je;t[162]!==e?(Je=e("orgs.members.sortName"),t[162]=e,t[163]=Je):Je=t[163];let He;t[164]!==Je?(He={id:"member",label:Je},t[164]=Je,t[165]=He):He=t[165];let We;t[166]!==e?(We=e("orgs.members.sortRole"),t[166]=e,t[167]=We):We=t[167];let Xe;t[168]!==We?(Xe={id:"role",label:We},t[168]=We,t[169]=Xe):Xe=t[169];let Ye;t[170]!==e?(Ye=e("orgs.members.sortJoined"),t[170]=e,t[171]=Ye):Ye=t[171];let Ze;t[172]!==Ye?(Ze={id:"joined",label:Ye},t[172]=Ye,t[173]=Ze):Ze=t[173];let et;t[174]!==He||t[175]!==Xe||t[176]!==Ze?(et=[He,Xe,Ze],t[174]=He,t[175]=Xe,t[176]=Ze,t[177]=et):et=t[177];let tt;t[178]!==S||t[179]!==x||t[180]!==v||t[181]!==et||t[182]!==z?(tt=s.jsx(hs,{viewMode:z,onViewModeChange:P,sortKey:v,sortDirection:x,onSort:S,sortOptions:et}),t[178]=S,t[179]=x,t[180]=v,t[181]=et,t[182]=z,t[183]=tt):tt=t[183];let st;t[184]!==Qe||t[185]!==tt?(st=s.jsxs("div",{className:"flex items-center gap-2",children:[Qe,tt]}),t[184]=Qe,t[185]=tt,t[186]=st):st=t[186];let it;t[187]!==bt||t[188]!==st?(it=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[st,bt]}),t[187]=bt,t[188]=st,t[189]=it):it=t[189];const St=z==="cards"?s.jsx("div",{children:jt.length===0?s.jsx(Nt,{title:e("orgs.members.noMembersFound"),description:j?e("orgs.members.noMembersMatch",{search:j}):e("orgs.members.inviteMembersGetStarted")}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:jt.map(i=>{if(i.type==="invitation")return s.jsxs(At,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(Qt,{invitationId:i.data.id,onCancel:o,isCancelling:a.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(ot,{fallback:gt(i.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:i.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(ht,{variant:"outline",className:"w-fit text-warning border-warning/40",children:e("orgs.members.pending")})}),s.jsx(pt,{role:i.data.role,memberId:i.data.id,isOwner:!1,roleColorMap:W,selectableRoles:Y,onRoleChange:(A,V)=>H.mutate({invitationId:A,role:V,email:i.data.email}),className:"w-fit"})]})]})]},`inv-${i.data.id}`);const d=i.data;return s.jsxs(At,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(Gt,{member:d,roles:U,onChangeRole:(A,V)=>b.mutate({memberId:A,role:V}),onRemove:p,isUpdating:b.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(ot,{url:d.user?.image??void 0,fallback:gt(d.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:d.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:d.user?.email}),s.jsx(pt,{role:d.role,memberId:d.id,isOwner:d.role==="owner",roleColorMap:W,selectableRoles:Y,onRoleChange:(A,V)=>b.mutate({memberId:A,role:V}),className:"w-fit"}),s.jsx(ts,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(js,{columns:he,data:jt,isLoading:!1,sortKey:v,sortDirection:x,onSort:S,emptyState:j?s.jsx(Nt,{title:e("orgs.members.noMembersFound"),description:e("orgs.members.noMembersMatch",{search:j})}):s.jsx(Nt,{title:e("orgs.members.noMembersFound"),description:e("orgs.members.inviteMembersGetStarted")})});let lt;t[190]!==it||t[191]!==St?(lt=s.jsxs("div",{className:ls,children:[it,St]}),t[190]=it,t[191]=St,t[192]=lt):lt=t[192];let ft;return t[193]!==ze||t[194]!==Ue||t[195]!==Ve||t[196]!==lt?(ft=s.jsxs(s.Fragment,{children:[ze,Ue,Ve,lt]}),t[193]=ze,t[194]=Ue,t[195]=Ve,t[196]=lt,t[197]=ft):ft=t[197],ft}function oi(t){return{type:"invitation",data:t}}function ci(t){return t.status==="pending"}function mi(t){return{type:"member",data:t}}function di(t){return t.type==="member"?s.jsx(ts,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function ui(t){return t.role!=="owner"}function fi(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function gi(){const t=ue.c(7),e=xe();let l;t[0]!==e?(l=e("orgs.members.failedLoadMembers"),t[0]=e,t[1]=l):l=t[1];let c;t[2]!==l?(c=s.jsx("div",{className:"text-sm text-muted-foreground",children:l}),t[2]=l,t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ri,{}),t[4]=a):a=t[4];let n;return t[5]!==c?(n=s.jsx(ms,{group:"members",className:"gap-6",errorFallback:c,children:a}),t[5]=c,t[6]=n):n=t[6],n}function nl(){const t=ue.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Js,{capability:"members:manage",area:"members",children:s.jsx(gi,{})}),t[0]=e):e=t[0],e}export{nl as default};
@@ -1,4 +1,4 @@
1
- import{c as me,b as he,X as pe,d as je,u as Se,a as we,j as s,n as oe,x as Ne,o as Te,K as ee,r as te,Z as ge,B as de,e$ as ye,l as ve,aS as ce,m as ze,h as Ee}from"./index-BOGZM7Pw.js";import{t as ke}from"./Building02-D_rXBsfQ.js";import{s as Ce}from"./User01-B42bcRzQ.js";import{a as Me,A as Oe}from"./alert-BZ6uRdL8.js";import{T as _e,a as De,b as Fe}from"./tooltip-DoWVDYxv.js";import{C as Pe}from"./collection-tabs-DrZNeSEC.js";import{E as $e}from"./empty-state-DdDKihxt.js";import{u as Le}from"./use-clock-tick-DkYE6iX2.js";import{e as qe,u as Ae,r as Ie,w as Ke}from"./use-org-fs-DF_BlZtj.js";import"./index-0glLJTM3.js";import"./badge-DTNkOzY0.js";const Re=16e3;function He(t,e){return t==="organization"?"MEMORY.md":`users/${e}/MEMORY.md`}function Qe(t){return t==="organization"?`# Organization memory
1
+ import{c as me,b as he,X as pe,d as je,u as Se,a as we,j as s,n as oe,x as Ne,o as Te,K as ee,r as te,Z as ge,B as de,e$ as ye,l as ve,aS as ce,m as ze,h as Ee}from"./index-OBKgoLrS.js";import{t as ke}from"./Building02-Dl4T9LNW.js";import{s as Ce}from"./User01-CVYpMQND.js";import{a as Me,A as Oe}from"./alert-mIYni7ha.js";import{T as _e,a as De,b as Fe}from"./tooltip-B7_4-yXG.js";import{C as Pe}from"./collection-tabs-BulYWegd.js";import{E as $e}from"./empty-state-CcAOCIdu.js";import{u as Le}from"./use-clock-tick-C5v7xKB3.js";import{e as qe,u as Ae,r as Ie,w as Ke}from"./use-org-fs-CAxytlY9.js";import"./index-BnsOjLj5.js";import"./badge-BbvQ8-kh.js";const Re=16e3;function He(t,e){return t==="organization"?"MEMORY.md":`users/${e}/MEMORY.md`}function Qe(t){return t==="organization"?`# Organization memory
2
2
 
3
3
  Durable facts shared with everyone in this organization. Keep this a concise, curated index — not a log.
4
4
  `:`# User memory
@@ -1 +1 @@
1
- import{c as R,l as h,j as s}from"./index-BOGZM7Pw.js";function E($){const e=R.c(34),{generating:l,className:N}=$;let t;e[0]!==N?(t=h("pointer-events-none rounded-xl border border-border bg-background shadow-lg",N),e[0]=N,e[1]=t):t=e[1];let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("circle",{cx:"16",cy:"16",r:"12",fill:"none",strokeWidth:"4",className:"stroke-muted"}),e[2]=p):p=e[2];const v=l?"75.4":"22",k=l?"stroke-muted":"stroke-success";let a;e[3]!==k?(a=h("transition-[stroke-dashoffset] duration-1000 ease-out",k),e[3]=k,e[4]=a):a=e[4];let i;e[5]!==v||e[6]!==a?(i=s.jsxs("svg",{viewBox:"0 0 32 32",className:"size-9 shrink-0 -rotate-90",children:[p,s.jsx("circle",{cx:"16",cy:"16",r:"12",fill:"none",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"75.4",strokeDashoffset:v,className:a})]}),e[5]=v,e[6]=a,e[7]=i):i=e[7];const w=l&&"animate-pulse";let c;e[8]!==w?(c=h("h-1.5 w-full rounded-full bg-muted",w),e[8]=w,e[9]=c):c=e[9];let r;e[10]!==c?(r=s.jsx("div",{className:c}),e[10]=c,e[11]=r):r=e[11];const y=l&&"animate-pulse";let n;e[12]!==y?(n=h("h-1.5 w-2/3 rounded-full bg-muted",y),e[12]=y,e[13]=n):n=e[13];let o;e[14]!==n?(o=s.jsx("div",{className:n}),e[14]=n,e[15]=o):o=e[15];let d;e[16]!==o||e[17]!==r?(d=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[r,o]}),e[16]=o,e[17]=r,e[18]=d):d=e[18];let f;e[19]!==d||e[20]!==i?(f=s.jsxs("div",{className:"flex items-center gap-2.5",children:[i,d]}),e[19]=d,e[20]=i,e[21]=f):f=e[21];let g;e[22]===Symbol.for("react.memo_cache_sentinel")?(g=[7,10,5,9,6,8],e[22]=g):g=e[22];let m;e[23]!==l?(m=s.jsx("div",{className:"flex h-10 items-end gap-1.5",children:g.map((_,b)=>s.jsx("div",{style:{height:`${_*4}px`},className:h("flex-1 rounded-sm",l?"animate-pulse bg-muted":b%2===0?"bg-success/70":"bg-success/30")},`bar-${b}`))}),e[23]=l,e[24]=m):m=e[24];let u;e[25]!==l?(u=s.jsx("div",{className:"flex flex-col gap-1.5",children:["w-full","w-5/6","w-full","w-2/3","w-full"].map((_,b)=>s.jsx("div",{className:h("h-1.5 rounded-full bg-muted",_,l&&"animate-pulse")},`line-${b}`))}),e[25]=l,e[26]=u):u=e[26];let x;e[27]!==f||e[28]!==m||e[29]!==u?(x=s.jsxs("div",{className:"flex h-full flex-col gap-3 p-4",children:[f,m,u]}),e[27]=f,e[28]=m,e[29]=u,e[30]=x):x=e[30];let j;return e[31]!==t||e[32]!==x?(j=s.jsx("div",{"aria-hidden":!0,className:t,children:x}),e[31]=t,e[32]=x,e[33]=j):j=e[33],j}export{E as M};
1
+ import{c as R,l as h,j as s}from"./index-OBKgoLrS.js";function E($){const e=R.c(34),{generating:l,className:N}=$;let t;e[0]!==N?(t=h("pointer-events-none rounded-xl border border-border bg-background shadow-lg",N),e[0]=N,e[1]=t):t=e[1];let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("circle",{cx:"16",cy:"16",r:"12",fill:"none",strokeWidth:"4",className:"stroke-muted"}),e[2]=p):p=e[2];const v=l?"75.4":"22",k=l?"stroke-muted":"stroke-success";let a;e[3]!==k?(a=h("transition-[stroke-dashoffset] duration-1000 ease-out",k),e[3]=k,e[4]=a):a=e[4];let i;e[5]!==v||e[6]!==a?(i=s.jsxs("svg",{viewBox:"0 0 32 32",className:"size-9 shrink-0 -rotate-90",children:[p,s.jsx("circle",{cx:"16",cy:"16",r:"12",fill:"none",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"75.4",strokeDashoffset:v,className:a})]}),e[5]=v,e[6]=a,e[7]=i):i=e[7];const w=l&&"animate-pulse";let c;e[8]!==w?(c=h("h-1.5 w-full rounded-full bg-muted",w),e[8]=w,e[9]=c):c=e[9];let r;e[10]!==c?(r=s.jsx("div",{className:c}),e[10]=c,e[11]=r):r=e[11];const y=l&&"animate-pulse";let n;e[12]!==y?(n=h("h-1.5 w-2/3 rounded-full bg-muted",y),e[12]=y,e[13]=n):n=e[13];let o;e[14]!==n?(o=s.jsx("div",{className:n}),e[14]=n,e[15]=o):o=e[15];let d;e[16]!==o||e[17]!==r?(d=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[r,o]}),e[16]=o,e[17]=r,e[18]=d):d=e[18];let f;e[19]!==d||e[20]!==i?(f=s.jsxs("div",{className:"flex items-center gap-2.5",children:[i,d]}),e[19]=d,e[20]=i,e[21]=f):f=e[21];let g;e[22]===Symbol.for("react.memo_cache_sentinel")?(g=[7,10,5,9,6,8],e[22]=g):g=e[22];let m;e[23]!==l?(m=s.jsx("div",{className:"flex h-10 items-end gap-1.5",children:g.map((_,b)=>s.jsx("div",{style:{height:`${_*4}px`},className:h("flex-1 rounded-sm",l?"animate-pulse bg-muted":b%2===0?"bg-success/70":"bg-success/30")},`bar-${b}`))}),e[23]=l,e[24]=m):m=e[24];let u;e[25]!==l?(u=s.jsx("div",{className:"flex flex-col gap-1.5",children:["w-full","w-5/6","w-full","w-2/3","w-full"].map((_,b)=>s.jsx("div",{className:h("h-1.5 rounded-full bg-muted",_,l&&"animate-pulse")},`line-${b}`))}),e[25]=l,e[26]=u):u=e[26];let x;e[27]!==f||e[28]!==m||e[29]!==u?(x=s.jsxs("div",{className:"flex h-full flex-col gap-3 p-4",children:[f,m,u]}),e[27]=f,e[28]=m,e[29]=u,e[30]=x):x=e[30];let j;return e[31]!==t||e[32]!==x?(j=s.jsx("div",{"aria-hidden":!0,className:t,children:x}),e[31]=t,e[32]=x,e[33]=j):j=e[33],j}export{E as M};
@@ -1 +1 @@
1
- import{c as p,r as c,fe as f,j as o,E as h,ff as m}from"./index-BOGZM7Pw.js";function w(l){const e=p.c(5),{seed:s,children:i}=l;let r;e[0]!==s?(r=()=>{const u=new f({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchInterval:!1}}});return s(u),u},e[0]=s,e[1]=r):r=e[1];const[n]=c.useState(r);let a;return e[2]!==i||e[3]!==n?(a=o.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none absolute inset-0 select-none overflow-hidden",children:o.jsx(h,{fallback:null,children:o.jsx(c.Suspense,{fallback:null,children:o.jsx(m,{client:n,children:i})})})}),e[2]=i,e[3]=n,e[4]=a):a=e[4],a}const d=new Date().toISOString();function t(l,e,s,i,r,n){return{id:l,organizationId:"preview",title:e,description:null,repositoryId:null,status:s,priority:r,type:i,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:n,keySeq:n,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],statusSince:null,createdBy:"preview",createdAt:d,updatedBy:"preview",updatedAt:d}}function y(){return{items:[t("p1","Fix checkout shipping estimate","todo","bug","high",1),t("p2","Add size guide to product page","todo","feature","medium",2),t("p3","Compress hero images","todo","chore","low",3),t("p4","Rewrite category descriptions","in_progress","feature","medium",4),t("p5","Audit broken redirects","in_progress","chore","high",5),t("p6","New arrivals landing page","in_review","feature","high",6),t("p7","Speed up search results","done","chore","medium",7),t("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[]}}export{w as P,y as m};
1
+ import{c as p,r as c,fe as f,j as o,E as h,ff as m}from"./index-OBKgoLrS.js";function w(l){const e=p.c(5),{seed:s,children:i}=l;let r;e[0]!==s?(r=()=>{const u=new f({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchInterval:!1}}});return s(u),u},e[0]=s,e[1]=r):r=e[1];const[n]=c.useState(r);let a;return e[2]!==i||e[3]!==n?(a=o.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none absolute inset-0 select-none overflow-hidden",children:o.jsx(h,{fallback:null,children:o.jsx(c.Suspense,{fallback:null,children:o.jsx(m,{client:n,children:i})})})}),e[2]=i,e[3]=n,e[4]=a):a=e[4],a}const d=new Date().toISOString();function t(l,e,s,i,r,n){return{id:l,organizationId:"preview",title:e,description:null,repositoryId:null,status:s,priority:r,type:i,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:n,keySeq:n,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],statusSince:null,createdBy:"preview",createdAt:d,updatedBy:"preview",updatedAt:d}}function y(){return{items:[t("p1","Fix checkout shipping estimate","todo","bug","high",1),t("p2","Add size guide to product page","todo","feature","medium",2),t("p3","Compress hero images","todo","chore","low",3),t("p4","Rewrite category descriptions","in_progress","feature","medium",4),t("p5","Audit broken redirects","in_progress","chore","high",5),t("p6","New arrivals landing page","in_review","feature","high",6),t("p7","Speed up search results","done","chore","medium",7),t("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[]}}export{w as P,y as m};