decocms 4.367.7 → 4.368.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 (372) hide show
  1. package/dist/client/assets/{AlertCircle-CMdkAjxQ.js → AlertCircle-_dpPH4gp.js} +1 -1
  2. package/dist/client/assets/{AreaChart-jIv2Q0sS.js → AreaChart-D3UNwAze.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DGJWLWaL.js → ArrowLeft-D5BILPql.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-D_1DZN2N.js → ArrowRight-CeIfu-_Z.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Bx3jqyJU.js → ArrowUp-D3IJVwy-.js} +1 -1
  6. package/dist/client/assets/{Check-HvrCGvlV.js → Check-BrCocVFB.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CQTpywHl.js → CheckCircle-BC0FabXU.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-dkkIYuGe.js → ChevronRight-B8w28Rs0.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BANcOZ09.js → ChevronUp-BZtOj4Ay.js} +1 -1
  10. package/dist/client/assets/{Copy01-D4tr9F1r.js → Copy01-8HlwnVL4.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CX8hLF54.js → CreditCard01-BuU2-7Xz.js} +1 -1
  12. package/dist/client/assets/{Database01-C6v3VKBC.js → Database01-CbAnK_KP.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-DEpQR8Rs.js → DotsVertical-wpNLDjEw.js} +1 -1
  14. package/dist/client/assets/{Download01-G8ZhNqF3.js → Download01-DGABlNWv.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-DNwZJRAX.js → ErrorBarContext-BlJtJ6et.js} +1 -1
  16. package/dist/client/assets/{Eye-wRiP-IKY.js → Eye-DXMWNy9I.js} +1 -1
  17. package/dist/client/assets/{File02-C5Axd7Wg.js → File02-6XspF3iG.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-xiI7ahmy.js → GitBranch01-DdWI6T46.js} +1 -1
  19. package/dist/client/assets/{Globe01-BJfrzyV2.js → Globe01-LbDP9lO6.js} +1 -1
  20. package/dist/client/assets/{HardDrive-BtlNN50l.js → HardDrive-DtG-DEiB.js} +1 -1
  21. package/dist/client/assets/{Image01-ZQpSr40Q.js → Image01-rPrP47_j.js} +1 -1
  22. package/dist/client/assets/{Key01-TUQZiePT.js → Key01-CJUZ2anZ.js} +1 -1
  23. package/dist/client/assets/{Link01-Dubdh0XV.js → Link01-B0bN5v1C.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-DsoIvXMf.js → LinkExternal01-k2QYzvNX.js} +1 -1
  25. package/dist/client/assets/{MessageCircle01-DrVOv17x.js → MessageCircle01-CjlDn3qL.js} +1 -1
  26. package/dist/client/assets/{Monitor01-8akol8yD.js → Monitor01-BWhdvhYh.js} +1 -1
  27. package/dist/client/assets/{Package-6pCyxdj-.js → Package-CUFEWgH0.js} +1 -1
  28. package/dist/client/assets/{Palette-8_jSprTt.js → Palette-D8sq7zSJ.js} +1 -1
  29. package/dist/client/assets/{Play-B2WDpGm-.js → Play-CaXzttX1.js} +1 -1
  30. package/dist/client/assets/{Plus-B6iViyXP.js → Plus-B76Mdzta.js} +1 -1
  31. package/dist/client/assets/{Printer-1AF1IGx9.js → Printer-CilcBFsl.js} +1 -1
  32. package/dist/client/assets/{SearchLg-o3jjSP_H.js → SearchLg-UbmzRtIb.js} +1 -1
  33. package/dist/client/assets/{SearchMd-BFooCWLz.js → SearchMd-Cz88FNXR.js} +1 -1
  34. package/dist/client/assets/{Sector-D27lvJUl.js → Sector-CupdVPpd.js} +1 -1
  35. package/dist/client/assets/{Settings02-11lXkxuh.js → Settings02-DCxh89vV.js} +1 -1
  36. package/dist/client/assets/{Share07-2izyqHpD.js → Share07-CNlETPcr.js} +1 -1
  37. package/dist/client/assets/{Shield01-C_NSoVzs.js → Shield01-UHqavRD7.js} +1 -1
  38. package/dist/client/assets/{Stars01-dQ6_BPZ3.js → Stars01-BPm_Roon.js} +1 -1
  39. package/dist/client/assets/{Sun-DqCbyuBS.js → Sun-BukuAUTA.js} +1 -1
  40. package/dist/client/assets/{SwitchHorizontal01-Chrl4_cZ.js → SwitchHorizontal01-DDZJCKkC.js} +1 -1
  41. package/dist/client/assets/{Tool01-DekOr9OW.js → Tool01-txvCBUcI.js} +1 -1
  42. package/dist/client/assets/{Tool02-CgXadMFZ.js → Tool02-DUdKhOIL.js} +1 -1
  43. package/dist/client/assets/{Trash01-DwLqZ5iv.js → Trash01-CeNVn9va.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-BJ6ZxGib.js → TrendUp01-pvT8-WFv.js} +1 -1
  45. package/dist/client/assets/{Upload01-zIaNWjGg.js → Upload01-CdWOLhzl.js} +1 -1
  46. package/dist/client/assets/{User01-Cuc8TQ2e.js → User01-BFd06Lzl.js} +1 -1
  47. package/dist/client/assets/{UserSquare-DO483pcO.js → UserSquare-VWJ4b2Nu.js} +1 -1
  48. package/dist/client/assets/{Users01-C_FX7NZW.js → Users01-CSkRDmMq.js} +1 -1
  49. package/dist/client/assets/{Users03-CBIUviMz.js → Users03-CKweEAHJ.js} +1 -1
  50. package/dist/client/assets/{X-BbEHf0ox.js → X-Ch9pdqUF.js} +1 -1
  51. package/dist/client/assets/{XCircle-CIpucXWN.js → XCircle-CRFE9Sxc.js} +1 -1
  52. package/dist/client/assets/{XClose-D9lEUPrO.js → XClose-nb8sU8Mf.js} +1 -1
  53. package/dist/client/assets/{Zap-FJBBk1lb.js → Zap-cGv6CHKy.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-DR5p3Py1.js → ZoomOut-kKuBc-4q.js} +1 -1
  55. package/dist/client/assets/{access-gate-BGLq5_fD.js → access-gate-Dna5j1xg.js} +1 -1
  56. package/dist/client/assets/{add-connection-dialog-CP-mB4l0.js → add-connection-dialog-Dv940sel.js} +1 -1
  57. package/dist/client/assets/{agent-analytics-CwkHNxxG.js → agent-analytics-BUFhTNrz.js} +1 -1
  58. package/dist/client/assets/agent-app-CwiQy74t.js +1 -0
  59. package/dist/client/assets/agent-assets-DBUnPpmJ.js +1 -0
  60. package/dist/client/assets/agent-automation-BUKjRQ0s.js +20 -0
  61. package/dist/client/assets/{agent-automations-BUDch-j3.js → agent-automations-CkHa31mG.js} +1 -1
  62. package/dist/client/assets/{agent-connect-sources-LY53id1I.js → agent-connect-sources-aEQ5U5Ys.js} +1 -1
  63. package/dist/client/assets/agent-deck-DZdDIvkK.js +1 -0
  64. package/dist/client/assets/{agent-e2e-CnVObhl4.js → agent-e2e-CVvHLDWr.js} +1 -1
  65. package/dist/client/assets/agent-file-B3z9GSFG.js +1 -0
  66. package/dist/client/assets/{agent-git-C-KtJQOB.js → agent-git-Xu4xVp7K.js} +2 -2
  67. package/dist/client/assets/{agent-hosting-Dr-g2CXP.js → agent-hosting-CqeGjFKK.js} +1 -1
  68. package/dist/client/assets/{agent-icon-CL_nl9mo.js → agent-icon-TqAwQbws.js} +1 -1
  69. package/dist/client/assets/agent-library-file-CyW6BWlf.js +1 -0
  70. package/dist/client/assets/{agent-monitor-SvCw0nUy.js → agent-monitor-CQJNHyJU.js} +1 -1
  71. package/dist/client/assets/{agent-overview-lLErih75.js → agent-overview-BMNsRpT6.js} +1 -1
  72. package/dist/client/assets/agent-settings-DW9H-Dv0.js +1 -0
  73. package/dist/client/assets/{agent-site-editor-BukowFNy.js → agent-site-editor-CIwfwhaR.js} +2 -2
  74. package/dist/client/assets/agent-site-editor-code-DerDfcPo.js +2 -0
  75. package/dist/client/assets/{agent-site-editor-content-DtzkoDLB.js → agent-site-editor-content-gT4XwcZF.js} +2 -2
  76. package/dist/client/assets/{agent-site-editor-preview-DX7U6V5V.js → agent-site-editor-preview-BxCHHAmi.js} +3 -3
  77. package/dist/client/assets/{agent-view-guard-BMN6ThUt.js → agent-view-guard-B9uu0uNy.js} +1 -1
  78. package/dist/client/assets/agent-view-mE-ErsH1.js +1 -0
  79. package/dist/client/assets/{agents-list-C6ZSW07I.js → agents-list-DEcIxmc7.js} +1 -1
  80. package/dist/client/assets/{ai-providers-D2C1qlv0.js → ai-providers-4TWNzC8y.js} +2 -2
  81. package/dist/client/assets/{alert-0Lc8v4N7.js → alert-B054apY1.js} +1 -1
  82. package/dist/client/assets/{alert-dialog-BcLnZa7A.js → alert-dialog-BQcocmj1.js} +1 -1
  83. package/dist/client/assets/api-keys-Dfv4dEMM.js +1 -0
  84. package/dist/client/assets/{api-keys-Cf6bK86U.js → api-keys-EFdKngWA.js} +1 -1
  85. package/dist/client/assets/app-editor-DAPu7E0g.js +1 -0
  86. package/dist/client/assets/{asset-utils-DIsXFmtL.js → asset-utils-D8QOLQKI.js} +1 -1
  87. package/dist/client/assets/{auth-DqeCOVzg.js → auth-CZC2Ujtf.js} +1 -1
  88. package/dist/client/assets/{auth-catchall-BNIBQ_XR.js → auth-catchall-CdCofhcq.js} +1 -1
  89. package/dist/client/assets/{auth-entry-Bq32N4lt.js → auth-entry-D76qGMln.js} +1 -1
  90. package/dist/client/assets/{auth-split-layout-DliwYz65.js → auth-split-layout-BqkQ5MRI.js} +1 -1
  91. package/dist/client/assets/{authenticate-and-persist-oauth-Eoth2qMz.js → authenticate-and-persist-oauth-CHdcX4lx.js} +1 -1
  92. package/dist/client/assets/{automation-list-row-CpdfZzhf.js → automation-list-row-CDBc0L1r.js} +1 -1
  93. package/dist/client/assets/{automation-runs-DIEXu2AA.js → automation-runs-BQLbZ_hL.js} +1 -1
  94. package/dist/client/assets/{automations-BpBth9hu.js → automations-CFVXwFqr.js} +1 -1
  95. package/dist/client/assets/{autosend-2Y4HgA_T.js → autosend-BA2WDHKH.js} +1 -1
  96. package/dist/client/assets/{avatar-YOwDvuCo.js → avatar-U_W3DOyI.js} +1 -1
  97. package/dist/client/assets/{badge-CKy1DnEV.js → badge-CTjh9J7T.js} +1 -1
  98. package/dist/client/assets/{block-document-aP19FM_M.js → block-document-DCeQa0yI.js} +1 -1
  99. package/dist/client/assets/{blocks-preview-workspace-context-DP5_u2Xp.js → blocks-preview-workspace-context-BdOEiss-.js} +1 -1
  100. package/dist/client/assets/{breadcrumb-BY8W5NfH.js → breadcrumb-DhYRM7a2.js} +1 -1
  101. package/dist/client/assets/{buckets-Bhe2phyM.js → buckets-DyboX_DE.js} +1 -1
  102. package/dist/client/assets/{build-improve-prompt-doc-DVZMfB_k.js → build-improve-prompt-doc-CVdAljgW.js} +1 -1
  103. package/dist/client/assets/{bulk-category-panel-dbBPINFu.js → bulk-category-panel-BLBAwogB.js} +1 -1
  104. package/dist/client/assets/{calendar-O0niDXgD.js → calendar-C3g1HVYe.js} +1 -1
  105. package/dist/client/assets/{capability-load-error-JtYpAIDC.js → capability-load-error-DsSoc04a.js} +1 -1
  106. package/dist/client/assets/{cards-CljnVFGF.js → cards-D3kB6iIj.js} +1 -1
  107. package/dist/client/assets/category-editor-CC0PdtIK.js +1 -0
  108. package/dist/client/assets/{chart-DjxuH9z1.js → chart-D_loKaX9.js} +1 -1
  109. package/dist/client/assets/{chat-context-DT13Ns9e.js → chat-context-Cor1QyQv.js} +1 -1
  110. package/dist/client/assets/{chat-draft-Bp7WKsio.js → chat-draft-DCJe5CEL.js} +1 -1
  111. package/dist/client/assets/{checkbox-BAc6ON84.js → checkbox-W4oibM4M.js} +1 -1
  112. package/dist/client/assets/{choose-editor-Db-m1tPL.js → choose-editor-CEzDxdDD.js} +1 -1
  113. package/dist/client/assets/{cli-auth-success-ORnUB4EZ.js → cli-auth-success-C_CF3b7k.js} +1 -1
  114. package/dist/client/assets/{client-icons-DH-s5V8p.js → client-icons-Bzg5KJqo.js} +1 -1
  115. package/dist/client/assets/{collapsible-Cfc5GOq6.js → collapsible-Q7VW373b.js} +1 -1
  116. package/dist/client/assets/{collection-detail-tLNt3mFd.js → collection-detail-Do-V1iEU.js} +1 -1
  117. package/dist/client/assets/{collection-display-button-Q83lUSRW.js → collection-display-button-DoWqp-k5.js} +1 -1
  118. package/dist/client/assets/{collection-search-DOotlcr-.js → collection-search-Ve8Od1Ze.js} +1 -1
  119. package/dist/client/assets/{collection-table-wrapper-L7fq3Ewq.js → collection-table-wrapper-CQd2BlgT.js} +1 -1
  120. package/dist/client/assets/{collection-tabs-77YTqRx_.js → collection-tabs-B31cxzhl.js} +1 -1
  121. package/dist/client/assets/{command-BbfSNpjK.js → command-BTJsPyoV.js} +1 -1
  122. package/dist/client/assets/{command-palette-store-CDXRiKfb.js → command-palette-store-B3FjlwOX.js} +1 -1
  123. package/dist/client/assets/{companion-mcps-section-B3OT3fvW.js → companion-mcps-section-BJrWJNrw.js} +1 -1
  124. package/dist/client/assets/{connect-DYMJSd71.js → connect-Dk6GxqPK.js} +2 -2
  125. package/dist/client/assets/{connect-layout-Cb-8wVa_.js → connect-layout-CJdyGLIg.js} +1 -1
  126. package/dist/client/assets/{connection-C0h_riCe.js → connection-BYgVvaQ-.js} +1 -1
  127. package/dist/client/assets/{connection-card-BnHVqPYb.js → connection-card-BlyShat1.js} +1 -1
  128. package/dist/client/assets/{connection-detail-BukOET2K.js → connection-detail-CtIhDsnP.js} +1 -1
  129. package/dist/client/assets/{connection-form-helpers-BGarejHH.js → connection-form-helpers-DfdZqD7N.js} +1 -1
  130. package/dist/client/assets/{connections-C94wvfI_.js → connections-DxJKDsbg.js} +1 -1
  131. package/dist/client/assets/{create-organization-dialog-BeMHfEec.js → create-organization-dialog-CiZy-ZG6.js} +1 -1
  132. package/dist/client/assets/{decofile-api-D5P6O-Yb.js → decofile-api-drrGQg3A.js} +1 -1
  133. package/dist/client/assets/{decopilot-DEim_pMB.js → decopilot-DB30hM5k.js} +1 -1
  134. package/dist/client/assets/{dialog-DIO2BT5L.js → dialog-FbeViKhV.js} +1 -1
  135. package/dist/client/assets/{discover-zXR45UVE.js → discover-Bkm8Ppdq.js} +1 -1
  136. package/dist/client/assets/{domain-settings-CoxAhG8y.js → domain-settings-di4lhBEH.js} +1 -1
  137. package/dist/client/assets/{download-app-dialog-B-5SSg-B.js → download-app-dialog-B0wRR8XY.js} +1 -1
  138. package/dist/client/assets/{drawer-Dp27hT9C.js → drawer-BFLllOI5.js} +1 -1
  139. package/dist/client/assets/{dropdown-menu-BzAnwSL0.js → dropdown-menu-Cg7EtBKr.js} +1 -1
  140. package/dist/client/assets/{editor-Dm21YC6a.js → editor-DfIJZemH.js} +3 -3
  141. package/dist/client/assets/{empty-state-F709JYnF.js → empty-state-B73golk2.js} +1 -1
  142. package/dist/client/assets/{empty-state-CvrLm3VU.js → empty-state-BUjKoJeI.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-Cfd0L2y0.js → extract-connection-data-OymVW05I.js} +1 -1
  144. package/dist/client/assets/{feature-gate-CSQct_zD.js → feature-gate-BtTiJvHf.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-Cd5ZGlWk.js → feature-paywall-CxRYlO85.js} +1 -1
  146. package/dist/client/assets/{file-explorer-B6MMR_br.js → file-explorer-ChhaUDkc.js} +1 -1
  147. package/dist/client/assets/{file-preview-B3un6Sja.js → file-preview-B-3X414G.js} +1 -1
  148. package/dist/client/assets/{file-share-button-BXZcNnFk.js → file-share-button-BCcqyHI3.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-CzM4dKXx.js → file-type-icon-CgjUbvA5.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Bjs4wWQI.js → folder-icon-DIKFMRjx.js} +1 -1
  151. package/dist/client/assets/{form-DGoweIp4.js → form-ZSFKpKuR.js} +1 -1
  152. package/dist/client/assets/{gateway-client-BKFdOqFV.js → gateway-client-DDB4Jo5d.js} +1 -1
  153. package/dist/client/assets/{general-BER62NBk.js → general-B89BsePD.js} +1 -1
  154. package/dist/client/assets/{github-icon-D5mzGkJ1.js → github-icon-DvBRseH_.js} +1 -1
  155. package/dist/client/assets/home-EgbfGXHT.js +1 -0
  156. package/dist/client/assets/{hooks-DW28Wv6W.js → hooks-CY6XZOHF.js} +1 -1
  157. package/dist/client/assets/{hooks-DOi6gVdi.js → hooks-Czb0EjQM.js} +2 -2
  158. package/dist/client/assets/{index-BqEX4CxD.js → index-B8SDzCvY.js} +1 -1
  159. package/dist/client/assets/{index-26VXD9YQ.js → index-BLoGenx5.js} +1 -1
  160. package/dist/client/assets/{index-BiIMwVbK.js → index-BWW-QUD7.js} +1 -1
  161. package/dist/client/assets/{index-CLBWHxV4.js → index-B_q9xGDu.js} +1 -1
  162. package/dist/client/assets/{index-BKjzqVX4.js → index-BwNv0_X1.js} +1 -1
  163. package/dist/client/assets/{index-ebCjSNwh.js → index-C2PjpIk5.js} +39 -39
  164. package/dist/client/assets/{index-D3hBrAe3.js → index-CaeHd-kX.js} +1 -1
  165. package/dist/client/assets/{index-C7nGODiq.js → index-CbVT0Wha.js} +1 -1
  166. package/dist/client/assets/{index-D9Pa20nR.js → index-CiQ8AEuv.js} +1 -1
  167. package/dist/client/assets/{index-kzbDuxts.js → index-CyayjuN4.js} +1 -1
  168. package/dist/client/assets/{index-BVdPTogP.js → index-DDWK4S9N.js} +1 -1
  169. package/dist/client/assets/{index-Ch3pSh1a.js → index-DQH0Frt9.js} +1 -1
  170. package/dist/client/assets/{index-DDHop146.js → index-DgDEDYFd.js} +1 -1
  171. package/dist/client/assets/{index-C9jQATHx.js → index-bq82HRdX.js} +7 -7
  172. package/dist/client/assets/{index-DX88U1Fe.js → index-mL_OEvyk.js} +2 -2
  173. package/dist/client/assets/{index-redirect-bdPeOdFP.js → index-redirect-Cl5ECm8S.js} +1 -1
  174. package/dist/client/assets/{infiniteQueryObserver-CrlFqUXS.js → infiniteQueryObserver-Dk7f60ge.js} +1 -1
  175. package/dist/client/assets/{infra-billing-DBRnO5Xv.js → infra-billing-D-zABnxC.js} +1 -1
  176. package/dist/client/assets/{input-BfoQkl5k.js → input-B62UEC6S.js} +1 -1
  177. package/dist/client/assets/{input-DxpPAL6X.js → input-C4xdJkO9.js} +2 -2
  178. package/dist/client/assets/{input-DCAbperr.js → input-DYrUDn-6.js} +1 -1
  179. package/dist/client/assets/{integration-icon-DLbXRirx.js → integration-icon-DWVAXJ5W.js} +1 -1
  180. package/dist/client/assets/{label-BZvBRfsC.js → label-DHlCjoX-.js} +1 -1
  181. package/dist/client/assets/{last-preview-page-DgNuT4mN.js → last-preview-page-g2Wt-_qP.js} +1 -1
  182. package/dist/client/assets/{layout-D_2jgeSQ.js → layout-DvNX7Jhc.js} +1 -1
  183. package/dist/client/assets/{legacy-agents-deep-D9-8wOwe.js → legacy-agents-deep-B4F7_80Y.js} +1 -1
  184. package/dist/client/assets/{legacy-main-redirect-U48xVXg3.js → legacy-main-redirect-DLvBqWxl.js} +1 -1
  185. package/dist/client/assets/{library-DCHuYHcg.js → library-CceZemOg.js} +2 -2
  186. package/dist/client/assets/{login-DLU4Kv--.js → login-CX3-ibA4.js} +1 -1
  187. package/dist/client/assets/{markdown-BxIxTFHX.js → markdown-qqEQfcng.js} +33 -33
  188. package/dist/client/assets/{mcp-app-renderer-C5_SSFlp.js → mcp-app-renderer-Cj43EsNL.js} +1 -1
  189. package/dist/client/assets/{mcp-oauth-Cj16tOMc.js → mcp-oauth-lrCnpZRU.js} +1 -1
  190. package/dist/client/assets/{members-B8ghL5vq.js → members-BKOir_Pt.js} +1 -1
  191. package/dist/client/assets/{message-templates-C0k0djOm.js → message-templates-0mKRx1r7.js} +1 -1
  192. package/dist/client/assets/{mini-report-page-DPr8miDS.js → mini-report-page-CfZCYEQQ.js} +1 -1
  193. package/dist/client/assets/mock-board-CqCYQnTw.js +90 -0
  194. package/dist/client/assets/{monaco-editor-D7KtEG80.js → monaco-editor-BbS-xHlo.js} +1 -1
  195. package/dist/client/assets/{monitoring-stats-row-C8qE8vIX.js → monitoring-stats-row-CGLZvQvq.js} +1 -1
  196. package/dist/client/assets/{multi-select-PUmjNPLo.js → multi-select-DHogVRlv.js} +1 -1
  197. package/dist/client/assets/{mustache-DoPKkDOt.js → mustache-CaTcgxFU.js} +1 -1
  198. package/dist/client/assets/{oauth-callback-yzNiiBZS.js → oauth-callback-BDR5owZa.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-ai-provider-BkPGppSA.js → oauth-callback-ai-provider-DSX_mvvw.js} +1 -1
  200. package/dist/client/assets/{onboarding-DNDx-VJt.js → onboarding-_X5jFwXg.js} +1 -1
  201. package/dist/client/assets/{optimistic-project-sidebar-views-DQAcmOUC.js → optimistic-project-sidebar-views-prl2BiPv.js} +1 -1
  202. package/dist/client/assets/org-file-open-context-CY-h563L.js +1 -0
  203. package/dist/client/assets/{organization-choice-X5fcp7VC.js → organization-choice-C7qy14tx.js} +1 -1
  204. package/dist/client/assets/{orgs-C71bHZfS.js → orgs-CgMPvHkg.js} +1 -1
  205. package/dist/client/assets/{page-seo-form-CJ5C4DO5.js → page-seo-form-CmXwxqgr.js} +1 -1
  206. package/dist/client/assets/{pair-D4JmcK-t.js → pair-CoC4CuoZ.js} +1 -1
  207. package/dist/client/assets/{plan-ladder-CQ1a44li.js → plan-ladder-DpgC6kIZ.js} +1 -1
  208. package/dist/client/assets/{popover-cYfVOF_J.js → popover-DJmzS7mv.js} +1 -1
  209. package/dist/client/assets/post-calendar-Dz5zavXp.js +1 -0
  210. package/dist/client/assets/post-editor-DWfeh8M1.js +1 -0
  211. package/dist/client/assets/{preview-content-DlgGWAMY.js → preview-content-C0VkspNR.js} +1 -1
  212. package/dist/client/assets/{preview-dialog-DMVdVz_V.js → preview-dialog-BZOqzTG2.js} +1 -1
  213. package/dist/client/assets/{primitives-7Kw_jkKz.js → primitives-jHhmgAQ9.js} +1 -1
  214. package/dist/client/assets/{profile-fIXgfLVj.js → profile-fLPl9mHC.js} +1 -1
  215. package/dist/client/assets/{project-app-view-DpkzCjxR.js → project-app-view-B7QzqtQA.js} +1 -1
  216. package/dist/client/assets/{project-feed-D1Rnls8q.js → project-feed-B--J89zr.js} +1 -1
  217. package/dist/client/assets/{project-icon-CWg_rHTZ.js → project-icon-BRc_SYWu.js} +1 -1
  218. package/dist/client/assets/project-reports-DeYwugwl.js +1 -0
  219. package/dist/client/assets/project-tasks-D7RrtRzg.js +1 -0
  220. package/dist/client/assets/{prompts-D1i8e1V8.js → prompts-C5wKMcEi.js} +1 -1
  221. package/dist/client/assets/record-editor-BMFTazO_.js +1 -0
  222. package/dist/client/assets/redirect-editor-Bz1hNhc-.js +1 -0
  223. package/dist/client/assets/registry-CBVz5tUq.js +2 -0
  224. package/dist/client/assets/{registry-layout-r2D039nl.js → registry-layout-B8hxuLqC.js} +1 -1
  225. package/dist/client/assets/{reports-TdOY4KuN.js → reports-BNMMk57f.js} +1 -1
  226. package/dist/client/assets/reports-BVwrD4fa.js +1 -0
  227. package/dist/client/assets/{reports-onboarding-s05s2vjv.js → reports-onboarding-Cvd1ByZr.js} +1 -1
  228. package/dist/client/assets/{reports-tab-D0Xwzbct.js → reports-tab-B1GRtFON.js} +2 -2
  229. package/dist/client/assets/{repositories-JDvNAhI8.js → repositories-CrrctYRd.js} +1 -1
  230. package/dist/client/assets/{repository-import-picker-BNluAY2V.js → repository-import-picker-CwyID9Hr.js} +1 -1
  231. package/dist/client/assets/{repository-picker-D9agNhNi.js → repository-picker-nA1fPR0i.js} +1 -1
  232. package/dist/client/assets/{require-capability-DjYcyxbJ.js → require-capability-Dq_uftSz.js} +1 -1
  233. package/dist/client/assets/{required-auth-layout-C3o3t9X1.js → required-auth-layout-bRQ8Relk.js} +1 -1
  234. package/dist/client/assets/{reset-password-DOQza5N6.js → reset-password-9EzqJ9Aj.js} +1 -1
  235. package/dist/client/assets/{resizable-BHYHfZY5.js → resizable-CHa_EJdX.js} +1 -1
  236. package/dist/client/assets/{review-settings-zUGfHLOe.js → review-settings-CuYs2gkJ.js} +1 -1
  237. package/dist/client/assets/{rich-text-link-control-BMZBKHAS.js → rich-text-link-control-BhNjJjUI.js} +1 -1
  238. package/dist/client/assets/{roles-CbYdUx8a.js → roles-DOIPyEeu.js} +1 -1
  239. package/dist/client/assets/{route--XOZLXQj.js → route-BJZVtvXD.js} +1 -1
  240. package/dist/client/assets/{route-BMqM-gRN.js → route-DVbh_JIM.js} +1 -1
  241. package/dist/client/assets/route-DXTx8B1o.js +1 -0
  242. package/dist/client/assets/{runnable-block-editor-eIl1ZAUD.js → runnable-block-editor-NBss0rGv.js} +1 -1
  243. package/dist/client/assets/{sandbox-lifecycle-context-dIh2VE9T.js → sandbox-lifecycle-context-Cwag3ZuW.js} +1 -1
  244. package/dist/client/assets/{schema-DLCqAhaO.js → schema-Difu_0cd.js} +1 -1
  245. package/dist/client/assets/{scroll-area-B6yfQzTQ.js → scroll-area-DizJqsMb.js} +1 -1
  246. package/dist/client/assets/{search-input-B9FxoKon.js → search-input-BFvnqi9T.js} +1 -1
  247. package/dist/client/assets/{secrets-Ckg8Rd0M.js → secrets-mAWyIyIG.js} +1 -1
  248. package/dist/client/assets/{sections-editor-DfusxW9l.js → sections-editor-BS-czeQw.js} +2 -2
  249. package/dist/client/assets/{select-BemZ3-RS.js → select-CQk1UktB.js} +1 -1
  250. package/dist/client/assets/{select-model-Dt_mcRLi.js → select-model-V6Ahwt40.js} +1 -1
  251. package/dist/client/assets/seo-editor-DqOS74Wa.js +1 -0
  252. package/dist/client/assets/{settings-tab-W9gLVP9Y.js → settings-tab-DgFFWLKL.js} +1 -1
  253. package/dist/client/assets/{sheet-CAYJdNnO.js → sheet-XW3igMAp.js} +1 -1
  254. package/dist/client/assets/{shell-layout-BZ9RU057.js → shell-layout-lFmUNyF7.js} +1 -1
  255. package/dist/client/assets/{sidebar-kfvz7bzl.js → sidebar-CaDkomsf.js} +1 -1
  256. package/dist/client/assets/{skill-preview-DKoageod.js → skill-preview-haMHuu3V.js} +1 -1
  257. package/dist/client/assets/skills-CQVB1v99.js +1 -0
  258. package/dist/client/assets/{sso-aIkFrBYs.js → sso-BguB6oWk.js} +1 -1
  259. package/dist/client/assets/{store-PyPRbE--.js → store-DfwhNMsh.js} +1 -1
  260. package/dist/client/assets/store-registry-k7nLI4El.js +2 -0
  261. package/dist/client/assets/{switch-CwYc17c1.js → switch-C44BHJ4_.js} +1 -1
  262. package/dist/client/assets/{synced-repos-LBwJXWce.js → synced-repos-CfvjXlOq.js} +1 -1
  263. package/dist/client/assets/{table-Dk8JamWN.js → table-vs5PY6MV.js} +1 -1
  264. package/dist/client/assets/{tabs-CScSsCn-.js → tabs-Be7MjhEn.js} +1 -1
  265. package/dist/client/assets/{task-board-WxptS5oC.js → task-board-NCKWK-L3.js} +1 -1
  266. package/dist/client/assets/{task-route-CgUDYaF5.js → task-route-BoHR4cN4.js} +1 -1
  267. package/dist/client/assets/{task-status-DYV2rHq2.js → task-status-DsfqndTm.js} +1 -1
  268. package/dist/client/assets/{tasks-Dyp4w1ZL.js → tasks-C_VDG237.js} +4 -4
  269. package/dist/client/assets/tasks-DjG_h180.js +1 -0
  270. package/dist/client/assets/{textarea-C-rDHIo4.js → textarea-Dt5uzYAk.js} +1 -1
  271. package/dist/client/assets/{thread-intent-Dqbb6tX6.js → thread-intent-BBez6nif.js} +1 -1
  272. package/dist/client/assets/{thread-route-DGpNj7En.js → thread-route-B0O5tMmh.js} +1 -1
  273. package/dist/client/assets/{thread-route-B7ApJPMo.js → thread-route-DhLwmRkM.js} +1 -1
  274. package/dist/client/assets/{thread-sheet-body-CXERmuvO.js → thread-sheet-body-qD1pkorX.js} +1 -1
  275. package/dist/client/assets/{toggle-group-BwAc-516.js → toggle-group-DXrH4GGv.js} +1 -1
  276. package/dist/client/assets/{toolbar-icon-button-D5CIjxUn.js → toolbar-icon-button-DkmObRsV.js} +1 -1
  277. package/dist/client/assets/{tooltip-D5dIOzcQ.js → tooltip-BbRZqSqs.js} +1 -1
  278. package/dist/client/assets/{track-CfasnexS.js → track-Cq81o3eA.js} +1 -1
  279. package/dist/client/assets/{types-BKgDxdgt.js → types-DfRui0tk.js} +1 -1
  280. package/dist/client/assets/{usage-stats-CzjkHtFz.js → usage-stats-CIfcRmIQ.js} +1 -1
  281. package/dist/client/assets/{use-ai-providers-DHpBr525.js → use-ai-providers-CzWjKGEV.js} +1 -1
  282. package/dist/client/assets/{use-automations-D8fUWM0i.js → use-automations-B1g8BCjF.js} +1 -1
  283. package/dist/client/assets/{use-autosave-BcXFrygg.js → use-autosave-zCYjHp0Q.js} +1 -1
  284. package/dist/client/assets/{use-connect-companion-BI8_ITvf.js → use-connect-companion-CSsGFFTC.js} +1 -1
  285. package/dist/client/assets/{use-connection-1DEAzFaJ.js → use-connection-D_iAIgTV.js} +1 -1
  286. package/dist/client/assets/{use-copy-CrTQ1bFc.js → use-copy-CXvvMCCk.js} +1 -1
  287. package/dist/client/assets/{use-create-virtual-mcp-6onzYx_V.js → use-create-virtual-mcp-wa9JpFSa.js} +1 -1
  288. package/dist/client/assets/{use-date-fns-locale-CKJk6bHw.js → use-date-fns-locale-DAtfdqMB.js} +1 -1
  289. package/dist/client/assets/{use-debounced-autosave-CscEX7LB.js → use-debounced-autosave-CGfqMI_2.js} +1 -1
  290. package/dist/client/assets/{use-debounced-value-Cd1Twr6w.js → use-debounced-value-BjFoL1TN.js} +1 -1
  291. package/dist/client/assets/{use-deco-credits-DXbh8RF9.js → use-deco-credits-KfquqRSe.js} +1 -1
  292. package/dist/client/assets/{use-decopilot-events-BorkAE1x.js → use-decopilot-events-3_YSe3LA.js} +1 -1
  293. package/dist/client/assets/{use-delete-connection-D14lo6hH.js → use-delete-connection-4mVlUDap.js} +1 -1
  294. package/dist/client/assets/{use-deployment-admin-CnWMkexv.js → use-deployment-admin-DiOvR37Z.js} +1 -1
  295. package/dist/client/assets/{use-entitlements-CW1G9reZ.js → use-entitlements-CZtG5Aw4.js} +1 -1
  296. package/dist/client/assets/{use-fast-preview-draft-url-C6GlSiLC.js → use-fast-preview-draft-url-tdElS5FG.js} +1 -1
  297. package/dist/client/assets/{use-file-configs-CIuxe_Ni.js → use-file-configs-BTKu0ddn.js} +1 -1
  298. package/dist/client/assets/{use-infinite-scroll-C3V6bChR.js → use-infinite-scroll-CqfaxXN1.js} +1 -1
  299. package/dist/client/assets/{use-join-requests-D9RxS7KW.js → use-join-requests-B4yW6raK.js} +1 -1
  300. package/dist/client/assets/{use-main-panel-tabs-DXkaeHMV.js → use-main-panel-tabs-Ch6v5oL2.js} +1 -1
  301. package/dist/client/assets/{use-mcp-auth-status-BH9IDFQ1.js → use-mcp-auth-status-BHDkqk7b.js} +1 -1
  302. package/dist/client/assets/{use-mcp-client-2uEIRhaM.js → use-mcp-client-oEME4UuR.js} +1 -1
  303. package/dist/client/assets/{use-mcp-prompts-CoIIHF5C.js → use-mcp-prompts-C3OTryE-.js} +1 -1
  304. package/dist/client/assets/{use-mcp-tools-BEXh2Dal.js → use-mcp-tools-5nC74C22.js} +1 -1
  305. package/dist/client/assets/{use-members-B9Bp6K2N.js → use-members-69QDyex7.js} +1 -1
  306. package/dist/client/assets/{use-mobile-CpN-x3jP.js → use-mobile-DAKfge6F.js} +1 -1
  307. package/dist/client/assets/{use-navigate-to-agent-D91bju80.js → use-navigate-to-agent-DxF2NRC6.js} +1 -1
  308. package/dist/client/assets/{use-open-billing-url-BerGO0rw.js → use-open-billing-url-B38x35SM.js} +1 -1
  309. package/dist/client/assets/{use-org-auth-client-r5wiYH2P.js → use-org-auth-client-DscVB01a.js} +1 -1
  310. package/dist/client/assets/{use-org-fs-Bts9OSaP.js → use-org-fs-fnC2xvX1.js} +1 -1
  311. package/dist/client/assets/{use-org-notice-CoJcS75H.js → use-org-notice-B1I6Lz9G.js} +1 -1
  312. package/dist/client/assets/{use-org-sso-dhAsVLFb.js → use-org-sso-Bkoh1g8c.js} +1 -1
  313. package/dist/client/assets/{use-organization-roles-kAP23ZDQ.js → use-organization-roles-BfyEvouz.js} +1 -1
  314. package/dist/client/assets/{use-organization-settings-OP1vKLQc.js → use-organization-settings-822MAvzA.js} +1 -1
  315. package/dist/client/assets/{use-panel-navigate-DArr9jKh.js → use-panel-navigate-CfBqSRJx.js} +1 -1
  316. package/dist/client/assets/{use-project-native-view-presence-7Bqoz-C1.js → use-project-native-view-presence-D8gp5jYC.js} +1 -1
  317. package/dist/client/assets/{use-project-scope-DUmb12wa.js → use-project-scope-UolqDpiW.js} +1 -1
  318. package/dist/client/assets/{use-registry-connections-T5KGR_Hv.js → use-registry-connections-fPqqwJHB.js} +1 -1
  319. package/dist/client/assets/{use-releases-C3yM6r03.js → use-releases-Cbg5_HwT.js} +1 -1
  320. package/dist/client/assets/{use-reports-diagnostic-vTs5yUh0.js → use-reports-diagnostic-Dlm42p32.js} +1 -1
  321. package/dist/client/assets/{use-route-default-main-D6cfsdMd.js → use-route-default-main-Dxf67Gay.js} +1 -1
  322. package/dist/client/assets/{use-secrets-CVFKBXHe.js → use-secrets-CPAFHAxr.js} +1 -1
  323. package/dist/client/assets/{use-section-preview-base-YyD8NP1s.js → use-section-preview-base-kMBmEGDx.js} +1 -1
  324. package/dist/client/assets/{use-session-runtime-Dg7Dw6FF.js → use-session-runtime-BBfRxqis.js} +1 -1
  325. package/dist/client/assets/{use-tags-yE947YEK.js → use-tags-BbWkKH-n.js} +1 -1
  326. package/dist/client/assets/{use-task-metadata-Cxd6otqh.js → use-task-metadata-C4b2me4e.js} +1 -1
  327. package/dist/client/assets/{use-thread-outputs-HjlkcFr2.js → use-thread-outputs-BBZhcvEI.js} +1 -1
  328. package/dist/client/assets/{use-view-mode-BsvAwGGR.js → use-view-mode-nKImchJM.js} +1 -1
  329. package/dist/client/assets/{use-virtual-mcp-De5-1hZU.js → use-virtual-mcp-Dd6It4Gy.js} +1 -1
  330. package/dist/client/assets/useInfiniteQuery-jh1wgrcQ.js +1 -0
  331. package/dist/client/assets/{useQueries-Dg8jJOK1.js → useQueries-Bz_0VuN2.js} +1 -1
  332. package/dist/client/assets/useSuspenseInfiniteQuery-B8nGcnhH.js +1 -0
  333. package/dist/client/assets/{users-DmBfcg5F.js → users-Bl2iF4g-.js} +1 -1
  334. package/dist/client/assets/{utils-Bx7x03n7.js → utils-8GjS8YYu.js} +1 -1
  335. package/dist/client/assets/variant-calendar-BGrVKKIo.js +1 -0
  336. package/dist/client/assets/{variant-matcher-override-DyHDH8Wv.js → variant-matcher-override-Dlsp2B8I.js} +1 -1
  337. package/dist/client/assets/{view-mode-toggle-Cr1ou40b.js → view-mode-toggle-BcLNRkIj.js} +1 -1
  338. package/dist/client/assets/{virtual-mcp-BvoWP1mU.js → virtual-mcp-KhrhV1xQ.js} +1 -1
  339. package/dist/client/index.html +1 -1
  340. package/dist/server/cli.js +59 -59
  341. package/dist/server/server.js +55 -55
  342. package/package.json +1 -1
  343. package/dist/client/assets/agent-app-DOZj_KNh.js +0 -1
  344. package/dist/client/assets/agent-assets-COVC5lPr.js +0 -1
  345. package/dist/client/assets/agent-automation-BWSPNjim.js +0 -20
  346. package/dist/client/assets/agent-deck-Ci4o3-Qm.js +0 -1
  347. package/dist/client/assets/agent-file-cFbD0OqV.js +0 -1
  348. package/dist/client/assets/agent-library-file-DXMpRwGw.js +0 -1
  349. package/dist/client/assets/agent-settings-BDT_wIMj.js +0 -1
  350. package/dist/client/assets/agent-site-editor-code-CaFMcCwi.js +0 -2
  351. package/dist/client/assets/agent-view-BOmW_Ep_.js +0 -1
  352. package/dist/client/assets/api-keys-C2lfrWiE.js +0 -1
  353. package/dist/client/assets/app-editor-Cbs0w-F0.js +0 -1
  354. package/dist/client/assets/category-editor-B984VME1.js +0 -1
  355. package/dist/client/assets/home-9LhFhaJr.js +0 -1
  356. package/dist/client/assets/mock-board-CLCjiMWY.js +0 -90
  357. package/dist/client/assets/post-calendar-DW1nVDLh.js +0 -1
  358. package/dist/client/assets/post-editor-C5j6zvkW.js +0 -1
  359. package/dist/client/assets/project-reports-BcpuMQY2.js +0 -1
  360. package/dist/client/assets/project-tasks-Cbu0gYbc.js +0 -1
  361. package/dist/client/assets/record-editor-CQeidmi2.js +0 -1
  362. package/dist/client/assets/redirect-editor-BL101gtT.js +0 -1
  363. package/dist/client/assets/registry-Dkgi61cL.js +0 -2
  364. package/dist/client/assets/reports-StG6MJZE.js +0 -1
  365. package/dist/client/assets/route-DJ7DRiHo.js +0 -1
  366. package/dist/client/assets/seo-editor-BEgFLCyp.js +0 -1
  367. package/dist/client/assets/skills-DZXynXjf.js +0 -1
  368. package/dist/client/assets/store-registry-mk4k386L.js +0 -2
  369. package/dist/client/assets/tasks-CwnRPaEK.js +0 -1
  370. package/dist/client/assets/useInfiniteQuery-TmIWCfQ-.js +0 -1
  371. package/dist/client/assets/useSuspenseInfiniteQuery-C8wrcyHJ.js +0 -1
  372. package/dist/client/assets/variant-calendar-DPR_CnEY.js +0 -1
@@ -1,90 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-DJ7DRiHo.js","assets/index-C9jQATHx.js","assets/index-DTEWW9mB.css","assets/index-BKjzqVX4.js","assets/ArrowUp-Bx3jqyJU.js","assets/chat-context-DT13Ns9e.js","assets/use-panel-navigate-DArr9jKh.js","assets/thread-route-DGpNj7En.js","assets/use-project-scope-DUmb12wa.js","assets/use-virtual-mcp-De5-1hZU.js","assets/use-mcp-client-2uEIRhaM.js","assets/auth-DqeCOVzg.js","assets/github-repo-BknN0SVI.js","assets/autosend-2Y4HgA_T.js","assets/thread-intent-Dqbb6tX6.js","assets/slugify-CEUa2lfQ.js","assets/hooks-DW28Wv6W.js","assets/backoff-8mStPHYB.js","assets/task-board-WxptS5oC.js","assets/schema-DLCqAhaO.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-CW1G9reZ.js","assets/use-ai-providers-DHpBr525.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-BorkAE1x.js","assets/use-organization-settings-OP1vKLQc.js","assets/gateway-client-BKFdOqFV.js","assets/tooltip-D5dIOzcQ.js","assets/index-BVdPTogP.js","assets/dialog-DIO2BT5L.js","assets/X-BbEHf0ox.js","assets/drawer-Dp27hT9C.js","assets/collection-search-DOotlcr-.js","assets/SearchMd-BFooCWLz.js","assets/use-mobile-CpN-x3jP.js","assets/use-mcp-prompts-CoIIHF5C.js","assets/index-ebCjSNwh.js","assets/form-DGoweIp4.js","assets/label-BZvBRfsC.js","assets/input-DCAbperr.js","assets/utils-CVEq3hMx.js","assets/input-DxpPAL6X.js","assets/command-palette-store-CDXRiKfb.js","assets/chat-draft-Bp7WKsio.js","assets/use-session-runtime-Dg7Dw6FF.js","assets/ArrowRight-D_1DZN2N.js","assets/agent-icon-CL_nl9mo.js","assets/AlertCircle-CMdkAjxQ.js","assets/Tool01-DekOr9OW.js","assets/ArrowLeft-DGJWLWaL.js","assets/Tool02-CgXadMFZ.js","assets/TrendUp01-BJ6ZxGib.js","assets/ZoomOut-DR5p3Py1.js","assets/Users03-CBIUviMz.js","assets/CheckCircle-CQTpywHl.js","assets/Check-HvrCGvlV.js","assets/ChevronUp-BANcOZ09.js","assets/ChevronRight-dkkIYuGe.js","assets/DotsVertical-DEpQR8Rs.js","assets/UserSquare-DO483pcO.js","assets/Copy01-D4tr9F1r.js","assets/CreditCard01-CX8hLF54.js","assets/Database01-C6v3VKBC.js","assets/MessageCircle01-DrVOv17x.js","assets/Download01-G8ZhNqF3.js","assets/Printer-1AF1IGx9.js","assets/Settings02-11lXkxuh.js","assets/Eye-wRiP-IKY.js","assets/File02-C5Axd7Wg.js","assets/Share07-2izyqHpD.js","assets/GitBranch01-xiI7ahmy.js","assets/Globe01-BJfrzyV2.js","assets/SwitchHorizontal01-Chrl4_cZ.js","assets/HardDrive-BtlNN50l.js","assets/Image01-ZQpSr40Q.js","assets/Key01-TUQZiePT.js","assets/Link01-Dubdh0XV.js","assets/LinkExternal01-DsoIvXMf.js","assets/Monitor01-8akol8yD.js","assets/Sun-DqCbyuBS.js","assets/Package-6pCyxdj-.js","assets/Palette-8_jSprTt.js","assets/Play-B2WDpGm-.js","assets/Plus-B6iViyXP.js","assets/SearchLg-o3jjSP_H.js","assets/Shield01-C_NSoVzs.js","assets/Stars01-dQ6_BPZ3.js","assets/Trash01-DwLqZ5iv.js","assets/Upload01-zIaNWjGg.js","assets/User01-Cuc8TQ2e.js","assets/Users01-C_FX7NZW.js","assets/XCircle-CIpucXWN.js","assets/XClose-D9lEUPrO.js","assets/Zap-FJBBk1lb.js","assets/select-BemZ3-RS.js","assets/usage-stats-CzjkHtFz.js","assets/use-copy-CrTQ1bFc.js","assets/markdown-BxIxTFHX.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/tabs-CScSsCn-.js","assets/use-deco-credits-DXbh8RF9.js","assets/toggle-group-BwAc-516.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-BerGO0rw.js","assets/decopilot-DEim_pMB.js","assets/checkbox-BAc6ON84.js","assets/ai-providers-logos-DD3qZ33J.js","assets/avatar-YOwDvuCo.js","assets/download-app-dialog-B-5SSg-B.js","assets/popover-cYfVOF_J.js","assets/index-26VXD9YQ.js","assets/input-BfoQkl5k.js","assets/hooks-DOi6gVdi.js","assets/use-org-fs-Bts9OSaP.js","assets/dropdown-menu-BzAnwSL0.js","assets/question-004-sINsf4GQ.js","assets/use-members-B9Bp6K2N.js","assets/use-org-auth-client-r5wiYH2P.js","assets/feature-paywall-Cd5ZGlWk.js","assets/plan-ladder-CQ1a44li.js","assets/add-connection-dialog-CP-mB4l0.js","assets/extract-connection-data-Cfd0L2y0.js","assets/metadata-dUsYcpuu.js","assets/github-D4UJ99TO.js","assets/connection-C0h_riCe.js","assets/connection-card-BnHVqPYb.js","assets/use-registry-connections-T5KGR_Hv.js","assets/use-connection-1DEAzFaJ.js","assets/useInfiniteQuery-TmIWCfQ-.js","assets/infiniteQueryObserver-CrlFqUXS.js","assets/retry-i8LvYSZg.js","assets/connection-slug-CITJ0kGN.js","assets/integration-icon-DLbXRirx.js","assets/textarea-C-rDHIo4.js","assets/connection-form-helpers-BGarejHH.js","assets/authenticate-and-persist-oauth-Eoth2qMz.js","assets/mcp-oauth-Cj16tOMc.js","assets/collection-tabs-77YTqRx_.js","assets/badge-CKy1DnEV.js","assets/use-infinite-scroll-C3V6bChR.js","assets/useSuspenseInfiniteQuery-C8wrcyHJ.js","assets/pair-D4JmcK-t.js","assets/collapsible-Cfc5GOq6.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-C5_SSFlp.js","assets/types-BKgDxdgt.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-BZ9RU057.js","assets/anchors-yqDzZN4K.js","assets/use-org-notice-CoJcS75H.js","assets/command-BbfSNpjK.js","assets/index-kzbDuxts.js","assets/project-icon-CWg_rHTZ.js","assets/required-auth-layout-C3o3t9X1.js","assets/use-org-sso-dhAsVLFb.js","assets/shell-layout-CuFt8bor.css","assets/sheet-CAYJdNnO.js","assets/use-navigate-to-agent-D91bju80.js","assets/use-thread-outputs-HjlkcFr2.js","assets/file-type-icon-CzM4dKXx.js","assets/decofile-api-D5P6O-Yb.js","assets/use-releases-C3yM6r03.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-dIh2VE9T.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/empty-state-F709JYnF.js","assets/index-CLBWHxV4.js","assets/index-D3hBrAe3.js","assets/resizable-BHYHfZY5.js","assets/use-route-default-main-D6cfsdMd.js","assets/toolbar-icon-button-D5CIjxUn.js","assets/alert-dialog-BcLnZa7A.js","assets/task-status-DYV2rHq2.js","assets/use-main-panel-tabs-DXkaeHMV.js","assets/use-mcp-tools-BEXh2Dal.js","assets/use-task-metadata-Cxd6otqh.js","assets/use-project-native-view-presence-7Bqoz-C1.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-CIuxe_Ni.js","assets/site-slug-uya6Wp4-.js","assets/virtual-mcp-BvoWP1mU.js","assets/legacy-main-redirect-U48xVXg3.js","assets/preview-dialog-DMVdVz_V.js","assets/preview-content-DlgGWAMY.js","assets/file-preview-B3un6Sja.js","assets/utils-Bx7x03n7.js","assets/editor-Dm21YC6a.js","assets/file-share-button-BXZcNnFk.js","assets/blocks-preview-workspace-context-DP5_u2Xp.js"])))=>i.map(i=>d[i]);
2
- import{c as D,l as M,eG as Bo,j as i,eH as Ao,b as ee,r as L,M as Je,m as Zn,K as at,aw as rl,h as Tt,t as Ve,B as ue,J as al,_ as Mt,n as hr,e as Wn,x as Do,a as il,f as ll,as as Qr,ai as Ro,D as $o,ax as On,u as Eo,d as ol,au as Mo,v as cl,N as pi,o as mi,ag as Io,F as zo,eI as Lo,E as Po,eJ as Oo}from"./index-C9jQATHx.js";import{T as st,n as Fo,i as Ho,a as qo,b as gi,K as Uo,P as Ko,d as Wo,D as Go,f as Vo,e as Qo,g as Yo,s as Zo,S as Xo,v as Jo,u as ec,C as tc}from"./rich-text-link-control-BMZBKHAS.js";import{g as Ue}from"./get-initials-D-f_fDFw.js";import{A as Ke}from"./avatar-YOwDvuCo.js";import{T as sc,a as nc,c as rc}from"./tooltip-D5dIOzcQ.js";import{V as ac,W as ic,Y as lc,w as oc,aG as cc,aD as dc,aH as Ia,aI as uc,T as Qn,aJ as xi,aK as fc,v as dl,c as za,aL as hc,d as ul,J as pc,N as Yr,y as Mr,am as La,a4 as Zr,aM as mc,n as gc}from"./agent-icon-CL_nl9mo.js";import{i as Xn}from"./CheckCircle-CQTpywHl.js";import{i as Pa}from"./ChevronRight-dkkIYuGe.js";import{i as fl}from"./SwitchHorizontal01-Chrl4_cZ.js";import{s as cr}from"./Plus-B6iViyXP.js";import{i as Yn}from"./X-BbEHf0ox.js";import{a as lr,b as Ir,P as zr}from"./popover-cYfVOF_J.js";import{a as we,g as Oa,D as Qe,b as Ye,c as Ze,h as Fn,i as Hn,j as qn}from"./dropdown-menu-BzAnwSL0.js";import{b as xc,S as jt,m as pr,s as hl,k as pl,t as ml,n as gl,o as xl,q as Na,l as dr,r as kl,f as Et,T as bl,e as Xe,P as Xr,v as kc,w as yl,x as bc,y as yc,z as wc,A as vc,B as jc,u as Sc,C as Tc,a as ki,D as Cc,E as Nc,F as wl,G as _c,i as Bc,c as Ac,H as Dc,I as Rc,J as $c,L as _a,K as bi,M as Ec,N as Mc,O as Ic,Q as zc,R as Lc}from"./task-route-CgUDYaF5.js";import{R as Pc}from"./repository-import-picker-BNluAY2V.js";import{a as Fa}from"./use-members-B9Bp6K2N.js";import{a as Ha}from"./format-time-BtXRrtv4.js";import{u as qa,a as Oc,b as Fc}from"./use-tags-yE947YEK.js";import{a as Ua,g as vl}from"./use-organization-settings-OP1vKLQc.js";import{d as Pr,b as Or,D as Fr,h as jl,c as Sl,e as Tl}from"./dialog-DIO2BT5L.js";import{B as Hc,a as qc,b as yi,c as Uc,d as Kc,e as Wc}from"./breadcrumb-BY8W5NfH.js";import{C as Ka}from"./calendar-O0niDXgD.js";import{A as Gc,a as Vc,b as Qc}from"./alert-0Lc8v4N7.js";import{C as Yc,a as Zc,b as Xc}from"./collapsible-Cfc5GOq6.js";import{u as va}from"./use-copy-CrTQ1bFc.js";import{i as qt}from"./AlertCircle-CMdkAjxQ.js";import{i as Gn}from"./Check-HvrCGvlV.js";import{t as Wa}from"./ChevronUp-BANcOZ09.js";import{i as Cl,b as Jc}from"./UserSquare-DO483pcO.js";import{a as ed}from"./Copy01-D4tr9F1r.js";import{i as Ba}from"./Globe01-BJfrzyV2.js";import{n as ur}from"./LinkExternal01-DsoIvXMf.js";import{m as td,a as sd,M as Nl}from"./markdown-BxIxTFHX.js";import{R as nd,e as rd,S as Re,C as ad,D as id,i as _l,n as ld,f as od}from"./task-board-WxptS5oC.js";import{a as cd,E as Ga,r as wt,t as dd,v as ud,w as Bl,x as Ft,y as wi,z as fd,A as hd,B as vi,C as pd,G as fr,N as Kt,m as St,H as Hr,T as Al,R as Va,I as Qa,h as md,J as gd,K as xd,L as kd,O as bd,Q as yd,s as Dl,S as wd,u as Rl,b as $l,U as vd,c as jd}from"./index-ebCjSNwh.js";import{B as Sd,c as Td,t as Cd,C as El,f as Nd,g as ji,s as _d,m as Si,a as Ti,b as Bd,d as Ci,e as Ad,h as Dd,i as Rd,j as $d,k as Ed,l as Md,n as Id}from"./index-D9Pa20nR.js";import{i as zd}from"./Link01-Dubdh0XV.js";import{s as Ld}from"./Trash01-DwLqZ5iv.js";import{c as Pd,e as Ml,s as Il}from"./hooks-DOi6gVdi.js";import{n as Od}from"./Download01-G8ZhNqF3.js";import{i as Fd}from"./File02-C5Axd7Wg.js";import{d as Ya,e as Za,c as Xa,C as Ja,b as Vn,a as qr}from"./command-BbfSNpjK.js";import{u as Hd}from"./use-org-auth-client-r5wiYH2P.js";import{h as qd,b as Ud}from"./use-org-fs-Bts9OSaP.js";import{d as Kd,S as Ni}from"./sandbox-start-errors-BK_aDCyt.js";import{p as Wd,r as Gd,u as zl,G as Vd}from"./repository-picker-D9agNhNi.js";import{i as Qd,c as Yd}from"./hooks-DW28Wv6W.js";import{u as Ll}from"./use-connection-1DEAzFaJ.js";import{e as Zd,b as Xd}from"./use-virtual-mcp-De5-1hZU.js";import{s as Jd}from"./use-project-scope-DUmb12wa.js";import{l as eu}from"./github-repo-scope-C8GSbvaz.js";import{s as tu}from"./User01-Cuc8TQ2e.js";import{c as su,S as nu,a as ru,b as au}from"./sheet-CAYJdNnO.js";import{T as iu}from"./thread-sheet-body-CXERmuvO.js";import{u as lu}from"./use-mcp-client-2uEIRhaM.js";import{i as ou}from"./ArrowUp-Bx3jqyJU.js";import{i as cu}from"./Tool01-DekOr9OW.js";import{u as du}from"./use-open-billing-url-BerGO0rw.js";import{s as uu,w as fu}from"./chat-draft-Bp7WKsio.js";import{u as hu}from"./shell-layout-BZ9RU057.js";const pu={github:"pull",gitlab:"-/merge_requests",bitbucket:"pull-requests"};function mu(t,e){return`${Gd(t)}/${pu[t.provider]}/${e}`}const gu=[{re:/https?:\/\/([^/\s"']+)\/([^\s"']+?)\/-\/merge_requests\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/([^/\s"']+\/[^/\s"']+)\/pull-requests\/(\d+)/},{re:/https?:\/\/([^/\s"']+)\/repos\/([^/\s"']+\/[^/\s"']+)\/pulls\/(\d+)/,api:!0},{re:/https?:\/\/([^/\s"']+)\/api\/v4\/projects\/([^/\s"']+)\/merge_requests\/(\d+)/,api:!0},{re:/https?:\/\/([^/\s"']+)\/2\.0\/repositories\/([^/\s"']+\/[^/\s"']+)\/pullrequests\/(\d+)/,api:!0}],xu={"api.github.com":"github.com","api.bitbucket.org":"bitbucket.org"};function ku(t){const e=t.toLowerCase();return xu[e]??e}function bu(t,e){const s=Number(t[3]);if(!Number.isSafeInteger(s)||s<=0)return null;const r=ku(t[1]),n=t[2],a=e?decodeURIComponent(n):n;if(/^\d+$/.test(a))return null;const l=Wd(`https://${r}/${a}`);return l?{repo:l,number:s,url:mu(l,s)}:null}function yu(t){const e=t.trim();if(!e)return null;for(const{re:s,api:r}of gu){const n=s.exec(e),a=n?bu(n,r===!0):null;if(a)return a}return null}function ei(t){const e=D.c(11),{size:s,className:r}=t,n=s===void 0?16:s;let a;e[0]!==r?(a=M("inline-flex shrink-0 items-center justify-center rounded-full",r),e[0]=r,e[1]=a):a=e[1];let l;e[2]!==n?(l={width:n,height:n,backgroundColor:`${Bo}26`},e[2]=n,e[3]=l):l=e[3];const o=n*.6,c=n*.6;let d;e[4]!==o||e[5]!==c?(d=i.jsx("img",{src:Ao,alt:"Reviewer",style:{width:o,height:c}}),e[4]=o,e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==a||e[8]!==l||e[9]!==d?(u=i.jsx("span",{className:a,style:l,children:d}),e[7]=a,e[8]=l,e[9]=d,e[10]=u):u=e[10],u}function wu(t){const e=D.c(30),{editor:s}=t,r=ee(),[n,a]=L.useState(!1),[l,o]=L.useState(""),[c,d]=L.useState(!1);let u;e[0]!==s?(u=s.isActive("link"),e[0]=s,e[1]=u):u=e[1];const f=u;let h;e[2]!==s||e[3]!==n?(h=()=>{if(n){a(!1);return}const S=s.getAttributes("link").href;o(typeof S=="string"?S:""),d(!1),a(!0)},e[2]=s,e[3]=n,e[4]=h):h=e[4];const x=h;let g;e[5]!==s?(g=()=>{s.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=s,e[6]=g):g=e[6];const p=g;let k;e[7]!==l||e[8]!==s||e[9]!==p?(k=()=>{const S=Fo(l);if(S===""){p();return}if(!Ho(S)){d(!0);return}s.chain().focus().extendMarkRange("link").setLink({href:S}).run(),a(!1)},e[7]=l,e[8]=s,e[9]=p,e[10]=k):k=e[10];const b=k;let m;e[11]!==r?(m=r("markdownEditor.link"),e[11]=r,e[12]=m):m=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx(zd,{size:14}),e[13]=y):y=e[13];let v;e[14]!==f||e[15]!==m||e[16]!==x?(v=i.jsx(st,{active:f,label:m,onClick:x,children:y}),e[14]=f,e[15]=m,e[16]=x,e[17]=v):v=e[17];let w;e[18]!==f||e[19]!==b||e[20]!==l||e[21]!==s||e[22]!==c||e[23]!==n||e[24]!==p||e[25]!==r?(w=n&&i.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md border bg-popover p-1 shadow-md",onBlur:S=>{S.currentTarget.contains(S.relatedTarget)||a(!1)},children:[i.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":c,placeholder:r("markdownEditor.linkPlaceholder"),value:l,onChange:S=>{o(S.target.value),d(!1)},onKeyDown:S=>{S.key==="Enter"?(S.preventDefault(),b()):S.key==="Escape"&&(S.preventDefault(),a(!1),s.chain().focus().run())},className:M("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",c&&"text-destructive")}),i.jsx(st,{active:!1,label:r("markdownEditor.linkApply"),onClick:b,children:i.jsx(Gn,{size:14})}),f&&i.jsx(st,{active:!1,label:r("markdownEditor.linkRemove"),onClick:p,children:i.jsx(Ld,{size:14})})]}),e[18]=f,e[19]=b,e[20]=l,e[21]=s,e[22]=c,e[23]=n,e[24]=p,e[25]=r,e[26]=w):w=e[26];let j;return e[27]!==v||e[28]!==w?(j=i.jsxs("div",{className:"relative",children:[v,w]}),e[27]=v,e[28]=w,e[29]=j):j=e[29],j}const ja=()=>{const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},_i=t=>{const e=D.c(2),{children:s}=t;let r;return e[0]!==s?(r=i.jsx("span",{className:"text-[11px] font-semibold leading-none",children:s}),e[0]=s,e[1]=r):r=e[1],r},Pl=[1,2,3],vu=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function ju(t){const e=D.c(20),{editor:s}=t,r=ee(),[n,a]=L.useState(null);let l;e[0]!==s?(l={editor:s,selector:Su},e[0]=s,e[1]=l):l=e[1];const o=cd(l);let c;e[2]!==r?(c=r("markdownEditor.heading1"),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==r?(d=r("markdownEditor.heading2"),e[4]=r,e[5]=d):d=e[5];let u;e[6]!==r?(u=r("markdownEditor.heading3"),e[6]=r,e[7]=u):u=e[7];let f;e[8]!==c||e[9]!==d||e[10]!==u?(f={1:c,2:d,3:u},e[8]=c,e[9]=d,e[10]=u,e[11]=f):f=e[11];const h=f;let x;e[12]!==s||e[13]!==h||e[14]!==n||e[15]!==o||e[16]!==r?(x=n&&i.jsxs(Sd,{editor:s,shouldShow:vu,appendTo:n,className:"flex items-center gap-0.5 rounded-lg border border-border bg-popover p-1 shadow-md","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[i.jsx(st,{active:o.bold,label:r("markdownEditor.bold"),onClick:()=>s.chain().focus().toggleBold().run(),children:i.jsx(ac,{size:14})}),i.jsx(st,{active:o.italic,label:r("markdownEditor.italic"),onClick:()=>s.chain().focus().toggleItalic().run(),children:i.jsx(ic,{size:14})}),i.jsx(st,{active:o.strike,label:r("markdownEditor.strikethrough"),onClick:()=>s.chain().focus().toggleStrike().run(),children:i.jsx(lc,{size:14})}),i.jsx(st,{active:o.code,label:r("markdownEditor.code"),onClick:()=>s.chain().focus().toggleCode().run(),children:i.jsx(oc,{size:14})}),i.jsx(ja,{}),Pl.map((p,k)=>i.jsx(st,{active:o.headings[k]??!1,label:h[p],onClick:()=>s.chain().focus().toggleHeading({level:p}).run(),children:i.jsx(_i,{children:`H${p}`})},p)),i.jsx(ja,{}),i.jsx(st,{active:o.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>s.chain().focus().toggleBulletList().run(),children:i.jsx(fl,{size:14})}),i.jsx(st,{active:o.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>s.chain().focus().toggleOrderedList().run(),children:i.jsx(_i,{children:"1."})}),i.jsx(st,{active:o.blockquote,label:r("markdownEditor.quote"),onClick:()=>s.chain().focus().toggleBlockquote().run(),children:i.jsx(cc,{size:14})}),i.jsx(ja,{}),i.jsx(wu,{editor:s})]}),e[12]=s,e[13]=h,e[14]=n,e[15]=o,e[16]=r,e[17]=x):x=e[17];let g;return e[18]!==x?(g=i.jsx("div",{ref:a,className:"relative z-20",children:x}),e[18]=x,e[19]=g):g=e[19],g}function Su(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Pl.map(s=>e.isActive("heading",{level:s})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}function ti(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wt=ti();function Ol(t){Wt=t}var Ht={exec:()=>null};function le(t,e=""){let s=typeof t=="string"?t:t.source,r={replace:(n,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(Fe.caret,"$1"),s=s.replace(n,l),r},getRegex:()=>new RegExp(s,e)};return r}var Tu=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Fe={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,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Cu=/^(?:[ \t]*(?:\n|$))+/,Nu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_u=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Bu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,si=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Fl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Hl=le(Fl).replace(/bull/g,si).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(),Au=le(Fl).replace(/bull/g,si).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(),ni=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Du=/^[^\n]+/,ri=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ru=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ri).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$u=le(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,si).getRegex(),Jr="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",ai=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Eu=le("^ {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",ai).replace("tag",Jr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ql=le(ni).replace("hr",mr).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jr).getRegex(),Mu=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ql).getRegex(),ii={blockquote:Mu,code:Nu,def:Ru,fences:_u,heading:Bu,hr:mr,html:Eu,lheading:Hl,list:$u,newline:Cu,paragraph:ql,table:Ht,text:Du},Bi=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mr).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jr).getRegex(),Iu={...ii,lheading:Au,table:Bi,paragraph:le(ni).replace("hr",mr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jr).getRegex()},zu={...ii,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ai).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:Ht,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(ni).replace("hr",mr).replace("heading",` *#{1,6} *[^
3
- ]`).replace("lheading",Hl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lu=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ul=/^( {2,}|\\)\n(?!\s*$)/,Ou=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jn=/[\p{P}\p{S}]/u,ea=/[\s\p{P}\p{S}]/u,li=/[^\s\p{P}\p{S}]/u,Fu=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ea).getRegex(),Kl=/(?!~)[\p{P}\p{S}]/u,Hu=/(?!~)[\s\p{P}\p{S}]/u,qu=/(?:[^\s\p{P}\p{S}]|~)/u,Uu=le(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Tu?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Wl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ku=le(Wl,"u").replace(/punct/g,Jn).getRegex(),Wu=le(Wl,"u").replace(/punct/g,Kl).getRegex(),Gl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gu=le(Gl,"gu").replace(/notPunctSpace/g,li).replace(/punctSpace/g,ea).replace(/punct/g,Jn).getRegex(),Vu=le(Gl,"gu").replace(/notPunctSpace/g,qu).replace(/punctSpace/g,Hu).replace(/punct/g,Kl).getRegex(),Qu=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,li).replace(/punctSpace/g,ea).replace(/punct/g,Jn).getRegex(),Yu=le(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Jn).getRegex(),Zu="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Xu=le(Zu,"gu").replace(/notPunctSpace/g,li).replace(/punctSpace/g,ea).replace(/punct/g,Jn).getRegex(),Ju=le(/\\(punct)/,"gu").replace(/punct/g,Jn).getRegex(),ef=le(/^<(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(),tf=le(ai).replace("(?:-->|$)","-->").getRegex(),sf=le("^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",tf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ur=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nf=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ur).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vl=le(/^!?\[(label)\]\[(ref)\]/).replace("label",Ur).replace("ref",ri).getRegex(),Ql=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",ri).getRegex(),rf=le("reflink|nolink(?!\\()","g").replace("reflink",Vl).replace("nolink",Ql).getRegex(),Ai=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,oi={_backpedal:Ht,anyPunctuation:Ju,autolink:ef,blockSkip:Uu,br:Ul,code:Pu,del:Ht,delLDelim:Ht,delRDelim:Ht,emStrongLDelim:Ku,emStrongRDelimAst:Gu,emStrongRDelimUnd:Qu,escape:Lu,link:nf,nolink:Ql,punctuation:Fu,reflink:Vl,reflinkSearch:rf,tag:sf,text:Ou,url:Ht},af={...oi,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",Ur).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ur).getRegex()},Aa={...oi,emStrongRDelimAst:Vu,emStrongLDelim:Wu,delLDelim:Yu,delRDelim:Xu,url:le(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ai).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\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:le(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ai).getRegex()},lf={...Aa,br:le(Ul).replace("{2,}","*").getRegex(),text:le(Aa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Dr={normal:ii,gfm:Iu,pedantic:zu},rr={normal:oi,gfm:Aa,breaks:lf,pedantic:af},of={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Di=t=>of[t];function dt(t,e){if(e){if(Fe.escapeTest.test(t))return t.replace(Fe.escapeReplace,Di)}else if(Fe.escapeTestNoEncode.test(t))return t.replace(Fe.escapeReplaceNoEncode,Di);return t}function Ri(t){try{t=encodeURI(t).replace(Fe.percentDecode,"%")}catch{return null}return t}function $i(t,e){let s=t.replace(Fe.findPipe,(a,l,o)=>{let c=!1,d=l;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),r=s.split(Fe.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(Fe.slashPipe,"|");return r}function ar(t,e,s){let r=t.length;if(r===0)return"";let n=0;for(;n<r&&t.charAt(r-n-1)===e;)n++;return t.slice(0,r-n)}function cf(t,e){if(t.indexOf(e[1])===-1)return-1;let s=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])s++;else if(t[r]===e[1]&&(s--,s<0))return r;return s>0?-2:-1}function df(t,e=0){let s=e,r="";for(let n of t)if(n===" "){let a=4-s%4;r+=" ".repeat(a),s+=a}else r+=n,s++;return r}function Ei(t,e,s,r,n){let a=e.href,l=e.title||null,o=t[1].replace(n.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:s,href:a,title:l,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,c}function uf(t,e,s){let r=t.match(s.other.indentCodeCompensation);if(r===null)return e;let n=r[1];return e.split(`
4
- `).map(a=>{let l=a.match(s.other.beginningSpace);if(l===null)return a;let[o]=l;return o.length>=n.length?a.slice(n.length):a}).join(`
5
- `)}var Kr=class{options;rules;lexer;constructor(t){this.options=t||Wt}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let s=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?s:ar(s,`
6
- `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let s=e[0],r=uf(s,e[3]||"",this.rules);return{type:"code",raw:s,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let s=e[2].trim();if(this.rules.other.endingHash.test(s)){let r=ar(s,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(s=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ar(e[0],`
7
- `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let s=ar(e[0],`
8
- `).split(`
9
- `),r="",n="",a=[];for(;s.length>0;){let l=!1,o=[],c;for(c=0;c<s.length;c++)if(this.rules.other.blockquoteStart.test(s[c]))o.push(s[c]),l=!0;else if(!l)o.push(s[c]);else break;s=s.slice(c);let d=o.join(`
10
- `),u=d.replace(this.rules.other.blockquoteSetextReplace,`
11
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
12
- ${d}`:d,n=n?`${n}
13
- ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=f,s.length===0)break;let h=a.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let x=h,g=x.raw+`
14
- `+s.join(`
15
- `),p=this.blockquote(g);a[a.length-1]=p,r=r.substring(0,r.length-x.raw.length)+p.raw,n=n.substring(0,n.length-x.text.length)+p.text;break}else if(h?.type==="list"){let x=h,g=x.raw+`
16
- `+s.join(`
17
- `),p=this.list(g);a[a.length-1]=p,r=r.substring(0,r.length-h.raw.length)+p.raw,n=n.substring(0,n.length-x.raw.length)+p.raw,s=g.substring(a.at(-1).raw.length).split(`
18
- `);continue}}return{type:"blockquote",raw:r,tokens:a,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let s=e[1].trim(),r=s.length>1,n={type:"list",raw:"",ordered:r,start:r?+s.slice(0,-1):"",loose:!1,items:[]};s=r?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=r?s:"[*+-]");let a=this.rules.other.listItemRegex(s),l=!1;for(;t;){let c=!1,d="",u="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let f=df(e[2].split(`
19
- `,1)[0],e[1].length),h=t.split(`
20
- `,1)[0],x=!f.trim(),g=0;if(this.options.pedantic?(g=2,u=f.trimStart()):x?g=e[1].length+1:(g=f.search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=f.slice(g),g+=e[1].length),x&&this.rules.other.blankLine.test(h)&&(d+=h+`
21
- `,t=t.substring(h.length+1),c=!0),!c){let p=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),b=this.rules.other.fencesBeginRegex(g),m=this.rules.other.headingBeginRegex(g),y=this.rules.other.htmlBeginRegex(g),v=this.rules.other.blockquoteBeginRegex(g);for(;t;){let w=t.split(`
22
- `,1)[0],j;if(h=w,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),j=h):j=h.replace(this.rules.other.tabCharGlobal," "),b.test(h)||m.test(h)||y.test(h)||v.test(h)||p.test(h)||k.test(h))break;if(j.search(this.rules.other.nonSpaceChar)>=g||!h.trim())u+=`
23
- `+j.slice(g);else{if(x||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(f)||m.test(f)||k.test(f))break;u+=`
24
- `+h}x=!h.trim(),d+=w+`
25
- `,t=t.substring(w.length+1),f=j.slice(g)}}n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(l=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),n.raw+=d}let o=n.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c of n.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(c.raw);if(d){let u={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};c.checked=u.checked,n.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}if(!n.loose){let d=c.tokens.filter(f=>f.type==="space"),u=d.length>0&&d.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=u}}if(n.loose)for(let c of n.items){c.loose=!0;for(let d of c.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let s=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:s,raw:e[0],href:r,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let s=$i(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
26
- `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(s.length===r.length){for(let l of r)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<s.length;l++)a.header.push({text:s[l],tokens:this.lexer.inline(s[l]),header:!0,align:a.align[l]});for(let l of n)a.rows.push($i(l,a.header.length).map((o,c)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[c]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let s=e[1].trim();return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:s,tokens:this.lexer.inline(s)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let s=e[1].charAt(e[1].length-1)===`
27
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:s,tokens:this.lexer.inline(s)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let a=ar(s.slice(0,-1),"\\");if((s.length-a.length)%2===0)return}else{let a=cf(e[2],"()");if(a===-2)return;if(a>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],n=a[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),Ei(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let s;if((s=this.rules.inline.reflink.exec(t))||(s=this.rules.inline.nolink.exec(t))){let r=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[r.toLowerCase()];if(!n){let a=s[0].charAt(0);return{type:"text",raw:a,text:a}}return Ei(s,n,s[0],this.lexer,this.rules)}}emStrong(t,e,s=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!s||this.rules.inline.punctuation.exec(s))){let n=[...r[0]].length-1,a,l,o=n,c=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*t.length+n);(r=d.exec(e))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=[...a].length,r[3]||r[4]){o+=l;continue}else if((r[5]||r[6])&&n%3&&!((n+l)%3)){c+=l;continue}if(o-=l,o>0)continue;l=Math.min(l,l+o+c);let u=[...r[0]][0].length,f=t.slice(0,n+r.index+u+l);if(Math.min(n,l)%2){let x=f.slice(1,-1);return{type:"em",raw:f,text:x,tokens:this.lexer.inlineTokens(x)}}let h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let s=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(s),n=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return r&&n&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:e[0],text:s}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,s=""){let r=this.rules.inline.delLDelim.exec(t);if(r&&(!r[1]||!s||this.rules.inline.punctuation.exec(s))){let n=[...r[0]].length-1,a,l,o=n,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+n);(r=c.exec(e))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(l=[...a].length,l!==n))continue;if(r[3]||r[4]){o+=l;continue}if(o-=l,o>0)continue;l=Math.min(l,l+o);let d=[...r[0]][0].length,u=t.slice(0,n+r.index+d+l),f=u.slice(n,-n);return{type:"del",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let s,r;return e[2]==="@"?(s=e[1],r="mailto:"+s):(s=e[1],r=s),{type:"link",raw:e[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let s,r;if(e[2]==="@")s=e[0],r="mailto:"+s;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);s=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let s=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:s}}}},nt=class Da{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Wt,this.options.tokenizer=this.options.tokenizer||new Kr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let s={other:Fe,block:Dr.normal,inline:rr.normal};this.options.pedantic?(s.block=Dr.pedantic,s.inline=rr.pedantic):this.options.gfm&&(s.block=Dr.gfm,this.options.breaks?s.inline=rr.breaks:s.inline=rr.gfm),this.tokenizer.rules=s}static get rules(){return{block:Dr,inline:rr}}static lex(e,s){return new Da(s).lex(e)}static lexInline(e,s){return new Da(s).inlineTokens(e)}lex(e){e=e.replace(Fe.carriageReturn,`
28
- `),this.blockTokens(e,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let r=this.inlineQueue[s];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,s=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Fe.tabCharGlobal," ").replace(Fe.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(l=>(n=l.call({lexer:this},e,s))?(e=e.substring(n.raw.length),s.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let l=s.at(-1);n.raw.length===1&&l!==void 0?l.raw+=`
29
- `:s.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let l=s.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
30
- `)?"":`
31
- `)+n.raw,l.text+=`
32
- `+n.text,this.inlineQueue.at(-1).src=l.text):s.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let l=s.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
33
- `)?"":`
34
- `)+n.raw,l.text+=`
35
- `+n.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},s.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),s.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),s.push(n);continue}let a=e;if(this.options.extensions?.startBlock){let l=1/0,o=e.slice(1),c;this.options.extensions.startBlock.forEach(d=>{c=d.call({lexer:this},o),typeof c=="number"&&c>=0&&(l=Math.min(l,c))}),l<1/0&&l>=0&&(a=e.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let l=s.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
36
- `)?"":`
37
- `)+n.raw,l.text+=`
38
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):s.push(n),r=a.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let l=s.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
39
- `)?"":`
40
- `)+n.raw,l.text+=`
41
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):s.push(n);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,s}inline(e,s=[]){return this.inlineQueue.push({src:e,tokens:s}),s}inlineTokens(e,s=[]){this.tokenizer.lexer=this;let r=e,n=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)c.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,n.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)a=n[2]?n[2].length:0,r=r.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let l=!1,o="";for(;e;){l||(o=""),l=!1;let c;if(this.options.extensions?.inline?.some(u=>(c=u.call({lexer:this},e,s))?(e=e.substring(c.raw.length),s.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),s.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),s.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),s.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let u=s.at(-1);c.type==="text"&&u?.type==="text"?(u.raw+=c.raw,u.text+=c.text):s.push(c);continue}if(c=this.tokenizer.emStrong(e,r,o)){e=e.substring(c.raw.length),s.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),s.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),s.push(c);continue}if(c=this.tokenizer.del(e,r,o)){e=e.substring(c.raw.length),s.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),s.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),s.push(c);continue}let d=e;if(this.options.extensions?.startInline){let u=1/0,f=e.slice(1),h;this.options.extensions.startInline.forEach(x=>{h=x.call({lexer:this},f),typeof h=="number"&&h>=0&&(u=Math.min(u,h))}),u<1/0&&u>=0&&(d=e.substring(0,u+1))}if(c=this.tokenizer.inlineText(d)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),l=!0;let u=s.at(-1);u?.type==="text"?(u.raw+=c.raw,u.text+=c.text):s.push(c);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return s}},Wr=class{options;parser;constructor(t){this.options=t||Wt}space(t){return""}code({text:t,lang:e,escaped:s}){let r=(e||"").match(Fe.notSpaceStart)?.[0],n=t.replace(Fe.endingNewline,"")+`
42
- `;return r?'<pre><code class="language-'+dt(r)+'">'+(s?n:dt(n,!0))+`</code></pre>
43
- `:"<pre><code>"+(s?n:dt(n,!0))+`</code></pre>
44
- `}blockquote({tokens:t}){return`<blockquote>
45
- ${this.parser.parse(t)}</blockquote>
46
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
47
- `}hr(t){return`<hr>
48
- `}list(t){let e=t.ordered,s=t.start,r="";for(let l=0;l<t.items.length;l++){let o=t.items[l];r+=this.listitem(o)}let n=e?"ol":"ul",a=e&&s!==1?' start="'+s+'"':"";return"<"+n+a+`>
49
- `+r+"</"+n+`>
50
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
51
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
52
- `}table(t){let e="",s="";for(let n=0;n<t.header.length;n++)s+=this.tablecell(t.header[n]);e+=this.tablerow({text:s});let r="";for(let n=0;n<t.rows.length;n++){let a=t.rows[n];s="";for(let l=0;l<a.length;l++)s+=this.tablecell(a[l]);r+=this.tablerow({text:s})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
53
- <thead>
54
- `+e+`</thead>
55
- `+r+`</table>
56
- `}tablerow({text:t}){return`<tr>
57
- ${t}</tr>
58
- `}tablecell(t){let e=this.parser.parseInline(t.tokens),s=t.header?"th":"td";return(t.align?`<${s} align="${t.align}">`:`<${s}>`)+e+`</${s}>
59
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${dt(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:s}){let r=this.parser.parseInline(s),n=Ri(t);if(n===null)return r;t=n;let a='<a href="'+t+'"';return e&&(a+=' title="'+dt(e)+'"'),a+=">"+r+"</a>",a}image({href:t,title:e,text:s,tokens:r}){r&&(s=this.parser.parseInline(r,this.parser.textRenderer));let n=Ri(t);if(n===null)return dt(s);t=n;let a=`<img src="${t}" alt="${dt(s)}"`;return e&&(a+=` title="${dt(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:dt(t.text)}},ci=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},rt=class Ra{options;renderer;textRenderer;constructor(e){this.options=e||Wt,this.options.renderer=this.options.renderer||new Wr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ci}static parse(e,s){return new Ra(s).parse(e)}static parseInline(e,s){return new Ra(s).parseInline(e)}parse(e){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let n=e[r];if(this.options.extensions?.renderers?.[n.type]){let l=n,o=this.options.extensions.renderers[l.type].call({parser:this},l);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){s+=o||"";continue}}let a=n;switch(a.type){case"space":{s+=this.renderer.space(a);break}case"hr":{s+=this.renderer.hr(a);break}case"heading":{s+=this.renderer.heading(a);break}case"code":{s+=this.renderer.code(a);break}case"table":{s+=this.renderer.table(a);break}case"blockquote":{s+=this.renderer.blockquote(a);break}case"list":{s+=this.renderer.list(a);break}case"checkbox":{s+=this.renderer.checkbox(a);break}case"html":{s+=this.renderer.html(a);break}case"def":{s+=this.renderer.def(a);break}case"paragraph":{s+=this.renderer.paragraph(a);break}case"text":{s+=this.renderer.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}parseInline(e,s=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<e.length;n++){let a=e[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=o||"";continue}}let l=a;switch(l.type){case"escape":{r+=s.text(l);break}case"html":{r+=s.html(l);break}case"link":{r+=s.link(l);break}case"image":{r+=s.image(l);break}case"checkbox":{r+=s.checkbox(l);break}case"strong":{r+=s.strong(l);break}case"em":{r+=s.em(l);break}case"codespan":{r+=s.codespan(l);break}case"br":{r+=s.br(l);break}case"del":{r+=s.del(l);break}case"text":{r+=s.text(l);break}default:{let o='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},or=class{options;block;constructor(t){this.options=t||Wt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?nt.lex:nt.lexInline}provideParser(t=this.block){return t?rt.parse:rt.parseInline}},ff=class{defaults=ti();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=rt;Renderer=Wr;TextRenderer=ci;Lexer=nt;Tokenizer=Kr;Hooks=or;constructor(...t){this.use(...t)}walkTokens(t,e){let s=[];for(let r of t)switch(s=s.concat(e.call(this,r)),r.type){case"table":{let n=r;for(let a of n.header)s=s.concat(this.walkTokens(a.tokens,e));for(let a of n.rows)for(let l of a)s=s.concat(this.walkTokens(l.tokens,e));break}case"list":{let n=r;s=s.concat(this.walkTokens(n.items,e));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let l=n[a].flat(1/0);s=s.concat(this.walkTokens(l,e))}):n.tokens&&(s=s.concat(this.walkTokens(n.tokens,e)))}}return s}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(s=>{let r={...s};if(r.async=this.defaults.async||r.async||!1,s.extensions&&(s.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=e.renderers[n.name];a?e.renderers[n.name]=function(...l){let o=n.renderer.apply(this,l);return o===!1&&(o=a.apply(this,l)),o}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[n.level];a?a.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),r.extensions=e),s.renderer){let n=this.defaults.renderer||new Wr(this.defaults);for(let a in s.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let l=a,o=s.renderer[l],c=n[l];n[l]=(...d)=>{let u=o.apply(n,d);return u===!1&&(u=c.apply(n,d)),u||""}}r.renderer=n}if(s.tokenizer){let n=this.defaults.tokenizer||new Kr(this.defaults);for(let a in s.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let l=a,o=s.tokenizer[l],c=n[l];n[l]=(...d)=>{let u=o.apply(n,d);return u===!1&&(u=c.apply(n,d)),u}}r.tokenizer=n}if(s.hooks){let n=this.defaults.hooks||new or;for(let a in s.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let l=a,o=s.hooks[l],c=n[l];or.passThroughHooks.has(a)?n[l]=d=>{if(this.defaults.async&&or.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await o.call(n,d);return c.call(n,f)})();let u=o.call(n,d);return c.call(n,u)}:n[l]=(...d)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(n,d);return f===!1&&(f=await c.apply(n,d)),f})();let u=o.apply(n,d);return u===!1&&(u=c.apply(n,d)),u}}r.hooks=n}if(s.walkTokens){let n=this.defaults.walkTokens,a=s.walkTokens;r.walkTokens=function(l){let o=[];return o.push(a.call(this,l)),n&&(o=o.concat(n.call(this,l))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return nt.lex(t,e??this.defaults)}parser(t,e){return rt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,s)=>{let r={...s},n={...this.defaults,...r},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let l=n.hooks?await n.hooks.preprocess(e):e,o=await(n.hooks?await n.hooks.provideLexer(t):t?nt.lex:nt.lexInline)(l,n),c=n.hooks?await n.hooks.processAllTokens(o):o;n.walkTokens&&await Promise.all(this.walkTokens(c,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser(t):t?rt.parse:rt.parseInline)(c,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(a);try{n.hooks&&(e=n.hooks.preprocess(e));let l=(n.hooks?n.hooks.provideLexer(t):t?nt.lex:nt.lexInline)(e,n);n.hooks&&(l=n.hooks.processAllTokens(l)),n.walkTokens&&this.walkTokens(l,n.walkTokens);let o=(n.hooks?n.hooks.provideParser(t):t?rt.parse:rt.parseInline)(l,n);return n.hooks&&(o=n.hooks.postprocess(o)),o}catch(l){return a(l)}}}onError(t,e){return s=>{if(s.message+=`
60
- Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+dt(s.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(s);throw s}}},Ut=new ff;function fe(t,e){return Ut.parse(t,e)}fe.options=fe.setOptions=function(t){return Ut.setOptions(t),fe.defaults=Ut.defaults,Ol(fe.defaults),fe};fe.getDefaults=ti;fe.defaults=Wt;fe.use=function(...t){return Ut.use(...t),fe.defaults=Ut.defaults,Ol(fe.defaults),fe};fe.walkTokens=function(t,e){return Ut.walkTokens(t,e)};fe.parseInline=Ut.parseInline;fe.Parser=rt;fe.parser=rt.parse;fe.Renderer=Wr;fe.TextRenderer=ci;fe.Lexer=nt;fe.lexer=nt.lex;fe.Tokenizer=Kr;fe.Hooks=or;fe.parse=fe;fe.options;fe.setOptions;fe.use;fe.walkTokens;fe.parseInline;rt.parse;nt.lex;const hf=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function pf(t){return t.flatMap((e,s)=>{var r;if(e.type==="space"||((r=t[s+1])===null||r===void 0?void 0:r.type)==="space")return[e];const n=(e.raw||"").match(hf);return n?[{...e,raw:(e.raw||"").slice(0,-n[0].length)},{type:"space",raw:n[0]}]:[e]})}function mf(t,e){const s=e.split(`
61
- `).flatMap(r=>[r,""]).map(r=>`${t}${r}`).join(`
62
- `);return s.slice(0,s.length-1)}function gf(t,e){const s=[];return Array.from(t.entries()).forEach(([r,n])=>{if(!e){s.push(r);return}(e.marks||[]).find(a=>a.type===r&&fr(a.attrs,n.attrs))||s.push(r)}),s}function xf(t,e){const s=[];return Array.from(e.entries()).forEach(([r,n])=>{const a=t.get(r);(!a||!fr(a.attrs,n.attrs))&&s.push({type:r,mark:n})}),s}function kf(t,e,s,r){const n=!s,a=s&&(!s.marks||s.marks.length===0),l=s&&s.marks&&!r(e,new Map(s.marks.map(c=>[c.type,c]))),o=[];return(n||a||l)&&(s&&s.marks?Array.from(t.entries()).reverse().forEach(([c,d])=>{s.marks.find(u=>u.type===c&&fr(u.attrs,d.attrs))||o.push(c)}):(n||a)&&o.push(...Array.from(t.keys()).reverse())),o}function bf(t,e){let s="";return Array.from(t.keys()).reverse().forEach(r=>{const n=e(r,t.get(r));n&&(s=n+s)}),t.clear(),s}function yf(t,e,s){let r="";return Array.from(t.entries()).forEach(([n,a])=>{const l=s(n,a);l&&(r+=l),e.set(n,a)}),r}function Sa(t){const e=(t.raw||t.text||"").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);return e?{isTask:!0,checked:e[2].toLowerCase()==="x",indentLevel:e[1].length}:{isTask:!1,indentLevel:0}}function Rr(t,e){return typeof t!="string"?"json":e}const wf=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","circle","clippath","defs","ellipse","foreignobject","g","image","line","lineargradient","mask","path","polygon","polyline","radialgradient","rect","stop","switch","symbol","textpath","tspan","use","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),vf=/<\/?([a-zA-Z][\w-]*)/g;function jf(t){const e=[];let s;for(;(s=vf.exec(t))!==null;)e.push(s[1].toLowerCase());return e}function Sf(t){const e=t.toLowerCase();return e.includes("-")?!1:!wf.has(e)}function Tf(t,e){return jf(t).some(s=>Sf(s)?!e.has(s):!1)}var Mi=class{constructor(t){var e,s,r,n,a;this.activeParseLexer=null,this.extensionRanks=new Map,this.baseExtensions=[],this.extensions=[],this.codeTypes=new Set,this.schemaParseDomTagsCache=null,this.inlineNodeTypesCache=null,this.lastParseResult=null,this.markedInstance=(e=t?.marked)!==null&&e!==void 0?e:fe,this.indentStyle=(s=t==null||(r=t.indentation)===null||r===void 0?void 0:r.style)!==null&&s!==void 0?s:"space",this.indentSize=(n=t==null||(a=t.indentation)===null||a===void 0?void 0:a.size)!==null&&n!==void 0?n:2,this.baseExtensions=t?.extensions||[],t?.markedOptions&&typeof this.markedInstance.setOptions=="function"&&this.markedInstance.setOptions(t.markedOptions),this.registry=new Map,this.nodeTypeRegistry=new Map,t?.extensions&&(this.baseExtensions=t.extensions,dd(ud(t.extensions)).forEach(l=>this.registerExtension(l)))}get instance(){return this.markedInstance}get indentCharacter(){return this.indentStyle==="space"?" ":" "}get indentString(){return this.indentCharacter.repeat(this.indentSize)}hasMarked(){return!!this.markedInstance}registerExtension(t){var e,s;this.extensions.push(t);const r=Bl(Ft(t,"code")),n=t.name;r&&this.codeTypes.add(n),this.extensionRanks.has(n)||this.extensionRanks.set(n,this.extensionRanks.size);const a=Ft(t,"markdownTokenName")||n,l=Ft(t,"parseMarkdown"),o=Ft(t,"renderMarkdown"),c=Ft(t,"markdownTokenizer"),d=(e=Ft(t,"markdownOptions"))!==null&&e!==void 0?e:null,u={tokenName:a,nodeName:n,parseMarkdown:l,renderMarkdown:o,isIndenting:(s=d?.indentsContent)!==null&&s!==void 0?s:!1,htmlReopen:d?.htmlReopen,tokenizer:c};if(a&&l){const f=this.registry.get(a)||[];f.push(u),this.registry.set(a,f)}if(o){const f=this.nodeTypeRegistry.get(n)||[];f.push(u),this.nodeTypeRegistry.set(n,f)}c&&this.hasMarked()&&this.registerTokenizer(c)}createLexer(){return new this.markedInstance.Lexer(this.markedInstance.defaults)}createTokenizerHelpers(t){return{inlineTokens:e=>t.inlineTokens(e),blockTokens:e=>t.blockTokens(e)}}tokenizeInline(t){var e;return((e=this.activeParseLexer)!==null&&e!==void 0?e:this.createLexer()).inlineTokens(t)}registerTokenizer(t){if(!this.hasMarked())return;const{name:e,start:s,level:r="inline",tokenize:n}=t,a=this.createTokenizerHelpers.bind(this),l=this.createLexer.bind(this);let o;s?o=typeof s=="function"?s:d=>d.indexOf(s):o=d=>{const u=n(d,[],this.createTokenizerHelpers(this.createLexer()));return u&&u.raw?d.indexOf(u.raw):-1};const c={name:e,level:r,start:o,tokenizer(d,u){const f=this.lexer?a(this.lexer):a(l()),h=n(d,u,f);if(h&&h.type)return{...h,type:h.type||e,raw:h.raw||"",tokens:h.tokens||[]}},childTokens:[]};this.markedInstance.use({extensions:[c]})}getHandlersForToken(t){try{return this.registry.get(t)||[]}catch{return[]}}getHandlerForToken(t){const e=this.getHandlersForToken(t);if(e.length>0)return e[0];const s=this.getHandlersForNodeType(t);return s.length>0?s[0]:void 0}getHandlersForNodeType(t){try{return this.nodeTypeRegistry.get(t)||[]}catch{return[]}}serialize(t){if(!t)return"";const e=this.renderNodes(t,t);return this.isEmptyOutput(e)?"":e}isEmptyOutput(t){return!t||t.trim()===""?!0:t.replace(/&nbsp;/g,"").replace(/\u00A0/g,"").trim()===""}parse(t){if(!this.hasMarked())throw new Error("No marked instance available for parsing");const e=this.activeParseLexer,s=this.createLexer();this.activeParseLexer=s;try{const r=s.lex(t);return{type:"doc",content:this.parseTokens(r,!0)}}finally{this.activeParseLexer=e}}parseTokens(t,e=!1){const s=e?pf(t):t,r=s.reduce((l,o,c)=>(o.type!=="space"&&l.push(c),l),[]);let n=-1,a=0;return s.flatMap((l,o)=>{for(;a<r.length&&r[a]<o;)n=r[a],a+=1;if(e&&l.type==="space"){var c;const u=(c=r[a])!==null&&c!==void 0?c:-1;return this.createImplicitEmptyParagraphsFromSpace(l,n,u)}const d=this.parseToken(l,e);return d===null?[]:Array.isArray(d)?d:[d]})}createImplicitEmptyParagraphsFromSpace(t,e,s){const r=this.countParagraphSeparators(t.raw||"");if(r===0)return[];const n=Math.max(r-(e===-1||s===-1?0:1),0);return Array.from({length:n},()=>({type:"paragraph",content:[]}))}countParagraphSeparators(t){return(t.replace(/\r\n/g,`
63
- `).match(/\n\n/g)||[]).length}parseToken(t,e=!1){if(!t.type)return null;if(t.type==="list")return this.parseListToken(t);const s=this.getHandlersForToken(t.type),r=this.createParseHelpers();if(s.find(n=>{if(!n.parseMarkdown)return!1;const a=n.parseMarkdown(t,r),l=this.normalizeParseResult(a);return l&&(!Array.isArray(l)||l.length>0)?(this.lastParseResult=l,!0):!1})&&this.lastParseResult){const n=this.lastParseResult;return this.lastParseResult=null,n}return this.parseFallbackToken(t,e)}parseListToken(t){if(!t.items||t.items.length===0)return this.parseTokenWithHandlers(t);const e=t.items.some(o=>Sa(o).isTask),s=t.items.some(o=>!Sa(o).isTask);if(!e||!s||this.getHandlersForToken("taskList").length===0)return this.parseTokenWithHandlers(t);const r=[];let n=[],a=null;for(let o=0;o<t.items.length;o+=1){const c=t.items[o],{isTask:d,checked:u,indentLevel:f}=Sa(c);let h=c;if(d){const g=(c.raw||c.text||"").split(`
64
- `),p=g[0].match(/^\s*[-+*]\s+\[([ xX])\]\s+(.*)$/),k=p?p[2]:"";let b=[];if(g.length>1&&g.slice(1).join(`
65
- `).trim()){const m=g.slice(1),y=m.filter(v=>v.trim());if(y.length>0){const v=Math.min(...y.map(j=>j.length-j.trimStart().length)),w=m.map(j=>j.trim()?j.slice(v):"").join(`
66
- `).trim();w&&(b=this.markedInstance.lexer(`${w}
67
- `))}}h={type:"taskItem",raw:"",mainContent:k,indentLevel:f,checked:u??!1,text:k,tokens:this.tokenizeInline(k),nestedTokens:b}}const x=d?"taskList":"list";a!==x?(n.length>0&&r.push({type:a,items:n}),n=[h],a=x):n.push(h)}n.length>0&&r.push({type:a,items:n});const l=[];for(let o=0;o<r.length;o+=1){const c=r[o],d={...t,type:c.type,items:c.items},u=this.parseToken(d);u&&(Array.isArray(u)?l.push(...u):l.push(u))}return l.length>0?l:null}parseTokenWithHandlers(t){if(!t.type)return null;const e=this.getHandlersForToken(t.type),s=this.createParseHelpers();if(e.find(r=>{if(!r.parseMarkdown)return!1;const n=r.parseMarkdown(t,s),a=this.normalizeParseResult(n);return a&&(!Array.isArray(a)||a.length>0)?(this.lastParseResult=a,!0):!1})&&this.lastParseResult){const r=this.lastParseResult;return this.lastParseResult=null,r}return this.parseFallbackToken(t)}createParseHelpers(){return{parseInline:t=>this.parseInlineTokens(t),tokenizeInline:t=>this.tokenizeInline(t),parseChildren:t=>this.parseTokens(t),parseBlockChildren:t=>this.parseTokens(t,!0),createTextNode:(t,e)=>({type:"text",text:t,marks:e||void 0}),createNode:(t,e,s)=>{const r={type:t,attrs:e||void 0,content:s||void 0};return(!e||Object.keys(e).length===0)&&delete r.attrs,r},applyMark:(t,e,s)=>({mark:t,content:e,attrs:s&&Object.keys(s).length>0?s:void 0})}}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}parseInlineTokens(t){const e=[];for(let l=0;l<t.length;l+=1){const o=t[l];if(o.type==="text")e.push({type:"text",text:wi(o.text||"")});else if(o.type==="escape")e.push({type:"text",text:o.text||""});else if(o.type==="html"){var s,r;const c=((s=(r=o.raw)!==null&&r!==void 0?r:o.text)!==null&&s!==void 0?s:"").toString(),d=/^<\/[\s]*[\w-]+/i.test(c),u=c.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!d&&u&&!/\/>$/.test(c)){const h=u[1],x=this.escapeRegex(h),g=new RegExp(`^<\\/\\s*${x}\\b`,"i");let p=-1;const k=[c];for(let b=l+1;b<t.length;b+=1){var n,a;const m=t[b],y=((n=(a=m.raw)!==null&&a!==void 0?a:m.text)!==null&&n!==void 0?n:"").toString();if(k.push(y),m.type==="html"&&g.test(y)){p=b;break}}if(p!==-1){const b=k.join(""),m={type:"html",raw:b,text:b,block:!1},y=this.parseHTMLToken(m);if(y){const v=this.normalizeParseResult(y);Array.isArray(v)?e.push(...v):v&&e.push(v)}l=p;continue}}const f=this.parseHTMLToken(o);if(f){const h=this.normalizeParseResult(f);Array.isArray(h)?e.push(...h):h&&e.push(h)}}else if(o.type){const c=this.getHandlerForToken(o.type);if(c&&c.parseMarkdown){const d=this.createParseHelpers(),u=c.parseMarkdown(o,d);if(this.isMarkResult(u)){const f=this.applyMarkToContent(u.mark,u.content,u.attrs);e.push(...f)}else{const f=this.normalizeParseResult(u);Array.isArray(f)?e.push(...f):f&&e.push(f)}}else o.tokens&&e.push(...this.parseInlineTokens(o.tokens))}}for(let l=e.length-1;l>0;l-=1){const o=e[l],c=e[l-1];if(o.type==="text"&&c.type==="text"){const d=o.marks||[],u=c.marks||[];fd(d,u)&&(c.text=(c.text||"")+(o.text||""),e.splice(l,1))}}return e}applyMarkToContent(t,e,s){return e.map(r=>{if(r.type==="text"){const n=r.marks||[],a=s?{type:t,attrs:s}:{type:t};return{...r,marks:[...n,a]}}return{...r,content:r.content?this.applyMarkToContent(t,r.content,s):void 0}})}isMarkResult(t){return t&&typeof t=="object"&&"mark"in t}normalizeParseResult(t){return t?this.isMarkResult(t)?t.content:t:null}parseFallbackToken(t,e=!1){switch(t.type){case"paragraph":return{type:"paragraph",content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"heading":return{type:"heading",attrs:{level:t.depth||1},content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"text":return{type:"text",text:wi(t.text||"")};case"html":return this.parseHTMLToken(t);case"escape":return{type:"text",text:t.text||""};case"space":return null;default:return t.tokens?this.parseTokens(t.tokens,e):null}}parseHTMLToken(t){const e=t.text||t.raw||"";if(!e.trim())return null;if(this.isUnrecognizedHtml(e))return this.htmlAsLiteralText(e,!!t.block);if(typeof window>"u"||typeof window.DOMParser>"u")return this.htmlAsLiteralText(e,!!t.block);try{const s=hd(e,this.baseExtensions);if(s.type==="doc"&&s.content){if(t.block)return s.content;const r=this.toInlineContent(s.content);return r.length>0?r:null}return s}catch(s){throw new Error(`Failed to parse HTML in markdown: ${s}`)}}toInlineContent(t){const e=this.getInlineNodeTypes();return t.flatMap(s=>s.type&&e.has(s.type)?[s]:s.content?this.toInlineContent(s.content):[])}getInlineNodeTypes(){if(this.inlineNodeTypesCache)return this.inlineNodeTypesCache;const t=new Set(["text"]);try{const e=vi(this.baseExtensions);Object.values(e.nodes).forEach(s=>{s.isInline&&t.add(s.name)})}catch{}return this.inlineNodeTypesCache=t,t}isUnrecognizedHtml(t){return Tf(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=vi(this.baseExtensions),s=r=>{const n=r?.parseDOM;Array.isArray(n)&&n.forEach(a=>{if(typeof a?.tag=="string"){const l=a.tag.match(/^[a-zA-Z][\w-]*/);l&&t.add(l[0].toLowerCase())}})};Object.values(e.nodes).forEach(r=>s(r.spec)),Object.values(e.marks).forEach(r=>s(r.spec))}catch{}return this.schemaParseDomTagsCache=t,t}htmlAsLiteralText(t,e){const s=t.replace(/\s+$/,"");return s?e?{type:"paragraph",content:[{type:"text",text:s}]}:{type:"text",text:s}:null}encodeTextForMarkdown(t,e,s){return s?.type!=null&&this.codeTypes.has(s.type)||(e.marks||[]).some(r=>this.codeTypes.has(typeof r=="string"?r:r.type))?t:this.escapeMarkdownSyntax(pd(t))}escapeMarkdownSyntax(t){return t.replace(/([\\`*_[\]~])/g,"\\$1")}renderNodeToMarkdown(t,e,s=0,r=0,n={}){var a;if(t.type==="text")return this.encodeTextForMarkdown(t.text||"",t,e);if(!t.type)return"";const l=this.getHandlerForToken(t.type);if(!l)return"";const o=Array.isArray(e?.content)&&s>0?e.content[s-1]:void 0,c={renderChildren:(u,f)=>{const h=l.isIndenting?r+1:r;return!Array.isArray(u)&&u.content?this.renderNodes(u.content,t,f||"",s,h):this.renderNodes(u,t,f||"",s,h)},renderChild:(u,f)=>{const h=l.isIndenting?r+1:r;return this.renderNodeToMarkdown(u,t,f,h)},indent:u=>this.indentString+u,wrapInBlock:mf},d={index:s,level:r,parentType:e?.type,previousNode:o,meta:{parentAttrs:e?.attrs,...n}};return((a=l.renderMarkdown)===null||a===void 0?void 0:a.call(l,t,c,d))||""}renderNodes(t,e,s="",r=0,n=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,s,n):t.type?this.renderNodeToMarkdown(t,e,r,n):""}renderNodesWithMarkBoundaries(t,e,s="",r=0){const n=[],a=new Map,l=new Set,o=new Map;return t.forEach((c,d)=>{const u=d<t.length-1?t[d+1]:null;if(c.type)if(c.type==="text"){let f=this.encodeTextForMarkdown(c.text||"",c,e);const h=new Map((c.marks||[]).map(w=>[w.type,w])),x=this.getMarksToOpenForSerialization(a,h,u),g=gf(h,u),p=g.filter(w=>a.has(w)),k=p.length>0&&x.length>0;let b="";if(g.length>0&&!k){const w=f.match(/(\s+)$/);w&&(b=w[1],f=f.slice(0,-b.length))}k||g.slice().reverse().forEach(w=>{if(!a.has(w))return;const j=h.get(w),S=this.getMarkClosing(w,j,o.get(w));S&&(f+=S),a.has(w)&&(a.delete(w),o.delete(w))});let m="";if(x.length>0){const w=f.match(/^(\s+)/);w&&(m=w[1],f=f.slice(m.length))}x.forEach(({type:w,mark:j})=>{const S=l.has(w)?"html":"markdown",T=this.getMarkOpening(w,j,S);T&&(f=T+f),o.set(w,S),l.delete(w)}),k||x.slice().reverse().forEach(({type:w,mark:j})=>{a.set(w,j)}),f=m+f;let y;if(k){const w=new Set((u?.marks||[]).map(T=>T.type));x.forEach(({type:T})=>{w.has(T)&&this.getHtmlReopenTags(T)&&l.add(T)});const j=Array.from(a.keys()),S=p.slice().sort((T,N)=>j.indexOf(N)-j.indexOf(T));y=[...x.map(T=>T.type),...S]}else y=kf(a,h,u,this.markSetsEqual.bind(this));let v="";if(y.length>0){const w=f.match(/(\s+)$/);w&&(v=w[1],f=f.slice(0,-v.length))}y.forEach(w=>{var j;const S=(j=a.get(w))!==null&&j!==void 0?j:h.get(w),T=this.getMarkClosing(w,S,o.get(w));T&&(f+=T),a.delete(w),o.delete(w)}),f+=v,f+=b,n.push(f)}else{const f=new Set((c.marks||[]).map(b=>b.type)),h=new Map,x=new Map;a.forEach((b,m)=>{if(f.has(m)){var y;h.set(m,b),x.set(m,(y=o.get(m))!==null&&y!==void 0?y:"markdown")}});const g=bf(a,(b,m)=>this.getMarkClosing(b,m,o.get(b)));o.clear();const p=this.renderNodeToMarkdown(c,e,d,r),k=c.type==="hardBreak"?"":yf(h,a,(b,m)=>{var y;const v=(y=x.get(b))!==null&&y!==void 0?y:"markdown";return o.set(b,v),this.getMarkOpening(b,m,v)});n.push(g+p+k)}}),n.join(s)}getMarkOpening(t,e,s="markdown"){if(s==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.open)||""}const n=this.getHandlersForNodeType(t),a=n.length>0?n[0]:void 0;if(!a||!a.renderMarkdown)return"";const l="__TIPTAP_MARKDOWN_PLACEHOLDER__",o={type:t,attrs:e.attrs||{},content:[{type:"text",text:l}]};try{const c=a.renderMarkdown(o,{renderChildren:()=>l,renderChild:()=>l,indent:u=>u,wrapInBlock:(u,f)=>u+f},{index:0,level:0,parentType:"text",meta:{}}),d=c.indexOf(l);return d>=0?c.substring(0,d):""}catch(c){throw new Error(`Failed to get mark opening for ${t}: ${c}`)}}getMarkClosing(t,e,s="markdown"){if(s==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.close)||""}const n=this.getHandlersForNodeType(t),a=n.length>0?n[0]:void 0;if(!a||!a.renderMarkdown)return"";const l="__TIPTAP_MARKDOWN_PLACEHOLDER__",o={type:t,attrs:e.attrs||{},content:[{type:"text",text:l}]};try{const c=a.renderMarkdown(o,{renderChildren:()=>l,renderChild:()=>l,indent:f=>f,wrapInBlock:(f,h)=>f+h},{index:0,level:0,parentType:"text",meta:{}}),d=c.indexOf(l),u=d+33;return d>=0?c.substring(u):""}catch(c){throw new Error(`Failed to get mark closing for ${t}: ${c}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),s=e.length>0?e[0]:void 0;return s?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([s,r])=>{const n=e.get(s);return n&&fr(r.attrs,n.attrs)})}getMarksToOpenForSerialization(t,e,s){const r=xf(t,e);if(r.length<=1)return r;const n=s?.marks||[],a=(d,u)=>n.some(f=>f.type===d&&fr(f.attrs,u)),l=(d,u)=>{var f,h;const x=(f=this.extensionRanks.get(d.type))!==null&&f!==void 0?f:Number.MAX_SAFE_INTEGER,g=(h=this.extensionRanks.get(u.type))!==null&&h!==void 0?h:Number.MAX_SAFE_INTEGER;return x!==g?g-x:d.type.localeCompare(u.type)},o=r.filter(d=>!a(d.type,d.mark.attrs)).sort(l),c=r.filter(d=>a(d.type,d.mark.attrs)).sort(l);return[...o,...c]}};const Yl=Ga.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType)return wt.setContent(t,e);if(Rr(t,e?.contentType)!=="markdown"||!this.editor.markdown)return wt.setContent(t,e);const s=this.editor.markdown.parse(t);return wt.setContent(s,e)},insertContent:(t,e)=>{if(!e?.contentType)return wt.insertContent(t,e);if(Rr(t,e?.contentType)!=="markdown"||!this.editor.markdown)return wt.insertContent(t,e);const s=this.editor.markdown.parse(t);return wt.insertContent(s,e)},insertContentAt:(t,e,s)=>{if(!s?.contentType)return wt.insertContentAt(t,e,s);if(Rr(e,s?.contentType)!=="markdown"||!this.editor.markdown)return wt.insertContentAt(t,e,s);const r=this.editor.markdown.parse(e);return wt.insertContentAt(t,r,s)}}},addStorage(){return{manager:new Mi({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:[]})}},onBeforeCreate(){var t;if(this.editor.markdown){console.error("[tiptap][markdown]: There is already a `markdown` property on the editor instance. This might lead to unexpected behavior.");return}if(this.storage.manager=new Mi({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:this.editor.extensionManager.baseExtensions}),this.editor.markdown=this.storage.manager,this.editor.getMarkdown=()=>this.storage.manager.serialize(this.editor.getJSON()),!this.editor.options.contentType||Rr(this.editor.options.content,this.editor.options.contentType)!=="markdown")return;if(!this.editor.markdown)throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.');if(this.editor.options.content===void 0||typeof this.editor.options.content!="string")throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the initial content is not a string. Please provide the initial content as a markdown string.');const e=this.editor.markdown.parse(this.editor.options.content);!((t=e.content)===null||t===void 0)&&t.length&&(this.editor.options.content=e)}});function Gr(t){return t==="left"||t==="right"||t==="center"?t:null}function Cf(t){const e=(t.style.textAlign||"").trim().toLowerCase(),s=(t.getAttribute("align")||"").trim().toLowerCase();return Gr(e||s)}function Nf(t){return Gr(t?.align)}function Zl(){return{default:null,parseHTML:t=>Cf(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}function _f(t){var e;const s=t.parentElement,r=t.closest("table");if(!s||!r)return null;const n=Array.from(s.children).indexOf(t),a=(e=r.querySelectorAll("colgroup > col")[n])===null||e===void 0?void 0:e.getAttribute("width");return a?[parseInt(a,10)]:null}function Xl(t){const e=t.getAttribute("colwidth");return e?e.split(",").map(s=>parseInt(s,10)):_f(t)}const Bf=/[ \t\r\n\f]+/g;function Jl(t){var e;return t.children.length>0?!1:((e=t.textContent)!==null&&e!==void 0?e:"").replace(Bf,"")===""}function eo(t){const e=t.createAndFill();if(!e)throw new Error(`[tiptap error]: "${t.name}" has no default content to backfill.`);return e.content}const Af=Kt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:Xl},align:Zl()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:t=>Jl(t)?{}:!1,getContent:(t,e)=>eo(e.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",St(this.options.HTMLAttributes,t),0]}}),Df=Kt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:Xl},align:Zl()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:t=>Jl(t)?{}:!1,getContent:(t,e)=>eo(e.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",St(this.options.HTMLAttributes,t),0]}}),Rf=Kt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",St(this.options.HTMLAttributes,t),0]}});function $a(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Ii(t,e,s,r,n,a){let l=0,o=!0,c=e.firstChild;const d=t.firstChild;if(d!==null)for(let h=0,x=0;h<d.childCount;h+=1){const{colspan:g,colwidth:p}=d.child(h).attrs;for(let k=0;k<g;k+=1,x+=1){const b=n===x?a:p&&p[k],m=b?`${b}px`:"";if(l+=b||r,b||(o=!1),c){if(c.style.width!==m){const[y,v]=$a(r,b);c.style.setProperty(y,v)}c=c.nextSibling}else{const y=document.createElement("col"),[v,w]=$a(r,b);y.style.setProperty(v,w),e.appendChild(y)}}}for(;c;){var u;const h=c.nextSibling;(u=c.parentNode)===null||u===void 0||u.removeChild(c),c=h}const f=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);o&&!f?(s.style.width=`${l}px`,s.style.minWidth=""):(s.style.width="",s.style.minWidth=`${l}px`)}var $f=class{constructor(t,e,s,r={}){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[n,a]of Object.entries(r))a!=null&&(n==="style"?this.table.style.cssText=String(a):this.table.setAttribute(n,String(a)));t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Ii(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,Ii(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,s=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(s&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function Ef(t,e,s,r){let n=0,a=!0;const l=[],o=t.firstChild;if(!o)return{};for(let u=0,f=0;u<o.childCount;u+=1){const{colspan:h,colwidth:x}=o.child(u).attrs;for(let g=0;g<h;g+=1,f+=1){const p=s===f?r:x&&x[g];n+=p||e,p||(a=!1);const[k,b]=$a(e,p);l.push(["col",{style:`${k}: ${b}`}])}}const c=a?`${n}px`:"",d=a?"":`${n}px`;return{colgroup:["colgroup",{},...l],tableWidth:c,tableMinWidth:d}}function zi(t,e){return t.createAndFill()}function Mf(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(s=>{const r=t.nodes[s];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function If(t,e,s,r,n){const a=Mf(t),l=[],o=[];for(let d=0;d<s;d+=1){const u=zi(a.cell);if(u&&o.push(u),r){const f=zi(a.header_cell);f&&l.push(f)}}const c=[];for(let d=0;d<e;d+=1)c.push(a.row.createChecked(null,r&&d===0?l:o));return a.table.createChecked(null,c)}function zf(t){return t instanceof El}const $r=({editor:t})=>{const{selection:e}=t.state;if(!zf(e))return!1;let s=0;const r=Hr(e.ranges[0].$from,n=>n.type.name==="table");return r?.node.descendants(n=>{if(n.type.name==="table")return!1;["tableCell","tableHeader"].includes(n.type.name)&&(s+=1)}),s!==e.ranges.length?!1:(t.commands.deleteTable(),!0)};function Li(t,e){const s=t.mapping.map(e),r=Hr(t.selection.$from,l=>l.type.name==="table");if(r?.pos===s)return;const n=t.doc.nodeAt(s);if(!n)return;const a=s+n.nodeSize-1;t.setSelection(Al.near(t.doc.resolve(a),-1))}function Lf(t){let e="",s=0;for(;s<t.length;){if(t[s]==="\\"&&s+1<t.length){e+=t[s]+t[s+1],s+=2;continue}if(t[s]!=="`"){e+=t[s++];continue}let r=0;for(;s+r<t.length&&t[s+r]==="`";)r+=1;let n=s+r,a=!1;for(;n<t.length;){if(t[n]!=="`"){n+=1;continue}let l=0;for(;n+l<t.length&&t[n+l]==="`";)l+=1;if(l===r){const o=t.slice(s+r,n);e+=t.slice(s,s+r)+o.replace(/\\\||\|/g,c=>c==="|"?"\\|":c)+t.slice(n,n+r),s=n+r,a=!0;break}n+=l}a||(e+=t.slice(s,s+r),s+=r)}return e}function Pf(t){return t.split(`
68
- `).map(e=>!e.includes("|")||!e.includes("`")?e:Lf(e)).join(`
69
- `)}function Of(t){return(t||"").replace(/\s+/g," ").trim()}function Ff(t,e,s={}){var r;const n=(r=s.cellLineSeparator)!==null&&r!==void 0?r:"";if(!t||!t.content||t.content.length===0)return"";const a=[];t.content.forEach(g=>{const p=[];g.content&&g.content.forEach(k=>{let b="";k.content&&Array.isArray(k.content)&&k.content.length>1?b=k.content.map(w=>e.renderChildren(w)).join(n):b=k.content?e.renderChildren(k.content):"";const m=Of(b.split(n).join(`
70
- `).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=k.type==="tableHeader",v=Nf(k.attrs);p.push({text:m,isHeader:y,align:v})}),a.push(p)});const l=a.reduce((g,p)=>Math.max(g,p.length),0);if(l===0)return"";const o=Array.from({length:l}).fill(0);a.forEach(g=>{for(let k=0;k<l;k+=1){var p;const b=(((p=g[k])===null||p===void 0?void 0:p.text)||"").length;b>o[k]&&(o[k]=b),o[k]<3&&(o[k]=3)}});const c=(g,p)=>g+" ".repeat(Math.max(0,p-g.length)),d=a[0],u=d.some(g=>g.isHeader),f=Array.from({length:l}).fill(null);a.forEach(g=>{for(let k=0;k<l;k+=1){var p;!f[k]&&(!((p=g[k])===null||p===void 0)&&p.align)&&(f[k]=g[k].align)}});let h=`
71
- `;const x=Array.from({length:l}).map((g,p)=>u&&d[p]&&d[p].text||"");return h+=`| ${x.map((g,p)=>c(g,o[p])).join(" | ")} |
72
- `,h+=`| ${o.map((g,p)=>{const k=Math.max(3,g),b=f[p];return b==="left"?`:${"-".repeat(k)}`:b==="right"?`${"-".repeat(k)}:`:b==="center"?`:${"-".repeat(k)}:`:"-".repeat(k)}).join(" | ")} |
73
- `,(u?a.slice(1):a).forEach(g=>{h+=`| ${Array.from({length:l}).fill(0).map((p,k)=>c(g[k]&&g[k].text||"",o[k])).join(" | ")} |
74
- `}),h}const Hf=Kt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:$f,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:s,tableWidth:r,tableMinWidth:n}=Ef(t,this.options.cellMinWidth),a=e.style;function l(){return a||(r?`width: ${r}`:`min-width: ${n}`)}const o=["table",St(this.options.HTMLAttributes,e,{style:l()}),s,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},o]:o},parseMarkdown:(t,e)=>{const s=[],r=Array.isArray(t.align)?t.align:[];if(t.header){const n=[];t.header.forEach((a,l)=>{var o;const c=Gr((o=r[l])!==null&&o!==void 0?o:a.align),d=c?{align:c}:{};n.push(e.createNode("tableHeader",d,[{type:"paragraph",content:e.parseInline(a.tokens)}]))}),s.push(e.createNode("tableRow",{},n))}return t.rows&&t.rows.forEach(n=>{const a=[];n.forEach((l,o)=>{var c;const d=Gr((c=r[o])!==null&&c!==void 0?c:l.align),u=d?{align:d}:{};a.push(e.createNode("tableCell",u,[{type:"paragraph",content:e.parseInline(l.tokens)}]))}),s.push(e.createNode("tableRow",{},a))}),e.createNode("table",void 0,s)},renderMarkdown:(t,e)=>Ff(t,e),markdownTokenizer:{name:"table",level:"block",start:t=>{const e=t.split(`
75
- `);if(e.length<2)return-1;const s=e[1];return!/^[ \t|:]*-[ \t|:-]*$/.test(s)||!s.includes("|")?-1:e[0].includes("|")?0:-1},tokenize(t,e,s){const r=t.indexOf(`
76
-
77
- `),n=r>=0?t.slice(0,r):t,a=n.split(`
78
- `);if(a.length<2)return;const l=a[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(l)||!l.includes("|"))return;const o=Pf(n);if(o===n)return;const c=s.blockTokens(o)[0];if(c?.type!=="table"||!c.raw)return;const d=c.raw.split(`
79
- `).length,u=t.split(`
80
- `).slice(0,d).join(`
81
- `);return{...c,raw:u}}},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:s=!0}={})=>({tr:r,dispatch:n,editor:a})=>{const l=If(a.schema,t,e,s);if(n){const o=r.selection.from+1;r.replaceSelectionWith(l).scrollIntoView().setSelection(Al.near(r.doc.resolve(o)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Id(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Md(t,e),deleteColumn:()=>({state:t,dispatch:e})=>{const s=Hr(t.selection.$from,r=>r.type.name==="table");return Ed(t,e&&(r=>{s&&Li(r,s.pos),e(r)}))},addRowBefore:()=>({state:t,dispatch:e})=>$d(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Rd(t,e),deleteRow:()=>({state:t,dispatch:e})=>{const s=Hr(t.selection.$from,r=>r.type.name==="table");return Dd(t,e&&(r=>{s&&Li(r,s.pos),e(r)}))},deleteTable:()=>({state:t,dispatch:e})=>Ad(t,e),mergeCells:()=>({state:t,dispatch:e})=>Si(t,e),splitCell:()=>({state:t,dispatch:e})=>Ti(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Ci("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Ci("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Bd(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Si(t,e)?!0:Ti(t,e),setCellAttribute:(t,e)=>({state:s,dispatch:r})=>_d(t,e)(s,r),goToNextCell:()=>({state:t,dispatch:e})=>ji(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>ji(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Nd(t),!0),setCellSelection:t=>({tr:e,dispatch:s})=>{if(s){const r=El.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:$r,"Mod-Backspace":$r,Delete:$r,"Mod-Delete":$r}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Td({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Cd({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){const t=this.options.resizable&&this.editor.isEditable,e=this.options.View;return t||!e?null:({node:s,view:r,HTMLAttributes:n})=>{const a=St(this.options.HTMLAttributes,n);return new e(s,this.options.cellMinWidth,r,a)}},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:Bl(Ft(t,"tableRole",e))}}}),qf=Ga.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(Hf.configure(this.options.table)),this.options.tableCell!==!1&&t.push(Af.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(Df.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(Rf.configure(this.options.tableRow)),t}});function Uf(t){const e=D.c(25),{node:s,selected:r,editor:n,deleteNode:a}=t,l=ee(),o=typeof s.attrs.href=="string"?s.attrs.href:"",c=typeof s.attrs.name=="string"?s.attrs.name:"";let d;e[0]!==c||e[1]!==l?(d=c||l("markdownEditor.fileNameFallback"),e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d,f=r&&"ring-2 ring-ring ring-offset-2 ring-offset-background";let h;e[3]!==f?(h=M("mx-0.5 inline-flex max-w-full select-none items-center gap-1.5 rounded-lg border border-border bg-card px-2 py-1 align-middle text-sm text-foreground",f),e[3]=f,e[4]=h):h=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx(Fd,{size:14,className:"shrink-0 text-muted-foreground"}),e[5]=x):x=e[5];let g;e[6]!==u?(g=i.jsx("span",{className:"min-w-0 truncate",children:u}),e[6]=u,e[7]=g):g=e[7];let p;e[8]!==u||e[9]!==l?(p=l("markdownEditor.downloadFile",{name:u}),e[8]=u,e[9]=l,e[10]=p):p=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=i.jsx(Od,{size:14}),e[11]=k):k=e[11];let b;e[12]!==o||e[13]!==u||e[14]!==p?(b=i.jsx("a",{href:o,download:u,"aria-label":p,onMouseDown:Wf,className:"shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:k}),e[12]=o,e[13]=u,e[14]=p,e[15]=b):b=e[15];let m;e[16]!==a||e[17]!==n.isEditable||e[18]!==l?(m=n.isEditable&&i.jsx("button",{type:"button","aria-label":l("markdownEditor.removeFile"),onMouseDown:Kf,onClick:a,className:"shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:i.jsx(Yn,{size:14})}),e[16]=a,e[17]=n.isEditable,e[18]=l,e[19]=m):m=e[19];let y;return e[20]!==h||e[21]!==g||e[22]!==b||e[23]!==m?(y=i.jsxs(Qa,{as:"span",className:h,children:[x,g,b,m]}),e[20]=h,e[21]=g,e[22]=b,e[23]=m,e[24]=y):y=e[24],y}function Kf(t){return t.preventDefault()}function Wf(t){return t.preventDefault()}function Gf(t){return t.replace(/([[\]])/g,"\\$1")}const Vf=Kt.create({name:"attachment",group:"inline",inline:!0,atom:!0,draggable:!0,addAttributes(){return{href:{default:null,parseHTML:t=>t.getAttribute("href"),renderHTML:t=>t.href?{href:t.href}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-name")||t.textContent,renderHTML:t=>t.name?{"data-name":t.name}:{}}}},parseHTML(){return[{tag:"a[data-attachment]"}]},renderHTML({HTMLAttributes:t,node:e}){return["a",St(t,{"data-attachment":""}),typeof e.attrs.name=="string"?e.attrs.name:""]},renderMarkdown:t=>{const e=typeof t.attrs?.href=="string"?t.attrs.href:"",s=typeof t.attrs?.name=="string"?t.attrs.name:"";return`[${Gf(s)}](${e})`},addNodeView(){return Va(Uf)}});function Qf(t){const e=D.c(5),{node:s,selected:r}=t,n=typeof s.attrs.name=="string"?s.attrs.name:"",a=r&&"ring-2 ring-ring";let l;e[0]!==a?(l=M("select-none rounded px-1 font-medium text-primary","bg-primary/10",a),e[0]=a,e[1]=l):l=e[1];let o;return e[2]!==n||e[3]!==l?(o=i.jsxs(Qa,{as:"span","data-testid":"mention-chip",className:l,children:["@",n]}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}const to=Kt.create({name:"mention",group:"inline",inline:!0,atom:!0,selectable:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-mention-id"),renderHTML:t=>t.id?{"data-mention-id":t.id}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-mention-name"),renderHTML:t=>t.name?{"data-mention-name":t.name}:{}}}},parseHTML(){return[{tag:"span[data-mention-id]"}]},renderHTML({HTMLAttributes:t,node:e}){return["span",St(t),`@${typeof e.attrs.name=="string"?e.attrs.name:""}`]},renderMarkdown:t=>{const e=typeof t.attrs?.id=="string"?t.attrs.id:"",s=typeof t.attrs?.name=="string"?t.attrs.name:"";return e?td(e,s):`@${s}`},addNodeView(){return Va(Qf)}}),Yf="studio.mention-members.",Ea=new Map;function Pi(t){const e=Ea.get(t);if(e)return e;try{const s=localStorage.getItem(t);if(!s)return;const r=JSON.parse(s);if(!Array.isArray(r))return;const n=r.filter(a=>!!a&&typeof a.id=="string"&&typeof a.name=="string");return Ea.set(t,n),n}catch{return}}function Zf(t,e){Ea.set(t,e);try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function Xf(t,e){if(!t?.length)return e;const s=new Map(t.map(r=>[r.id,r]));return e.map(r=>{const n=s.get(r.id);return n&&n.name===r.name&&n.email===r.email&&n.image===r.image?n:r})}function Jf(t){return t.map(e=>({id:e.userId,name:e.user?.name?.trim()||e.user?.email?.trim()||"",email:e.user?.email??"",image:e.user?.image??null})).filter(e=>!!e.name).sort((e,s)=>e.name.localeCompare(s.name))}function eh(t){const e=D.c(17),{locator:s}=Je(),r=Hd(),n=`${Yf}${s}`;let a;e[0]!==s?(a=at.mentionMembers(s),e[0]=s,e[1]=a):a=e[1];let l;e[2]!==n?(l=()=>Pi(n),e[2]=n,e[3]=l):l=e[3];let o;e[4]!==r||e[5]!==n?(o=async()=>{const x=await r.organization.listMembers(),g=Xf(Pi(n),Jf(x?.data?.members??[]));return Zf(n,g),g},e[4]=r,e[5]=n,e[6]=o):o=e[6];let c;e[7]!==t||e[8]!==a||e[9]!==l||e[10]!==o?(c={queryKey:a,enabled:t,staleTime:0,placeholderData:l,queryFn:o},e[7]=t,e[8]=a,e[9]=l,e[10]=o,e[11]=c):c=e[11];const d=Zn(c);let u;e[12]!==d.data?(u=d.data??[],e[12]=d.data,e[13]=u):u=e[13];const f=d.isFetching&&!d.data;let h;return e[14]!==u||e[15]!==f?(h={members:u,loading:f},e[14]=u,e[15]=f,e[16]=h):h=e[16],h}const Oi={query:"",range:null,rect:null,editor:null};class so{state=Oi;listeners=new Set;dismissal=null;latched=!1;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getSnapshot=()=>this.state;set(e){this.state=e;for(const s of this.listeners)s()}close(){this.latched=!1,this.set(Oi)}}const ta=new md("markdownEditorMention");function th(t,e,s){t.chain().focus().insertContentAt(e,[{type:"mention",attrs:{id:s.id,name:s.name}},{type:"text",text:" "}]).run(),Ml(t.view,ta)}function sh(t,e,s){const r=Math.min(e+s,t.content.size);return e>=r?"":t.textBetween(e,r,"","")}function no(t,e){const s=e.getSnapshot().range??void 0;s&&s.to>s.from&&(e.dismissal={from:s.from,text:t.state.doc.textBetween(s.from,s.to,"")}),Ml(t.view,ta)}function ro(t){return Ga.create({name:"mentionSuggestion",addProseMirrorPlugins(){const e={editor:this.editor,char:"@",pluginKey:ta,allowedPrefixes:[" ",`
82
- `],allow:({state:s,range:r})=>{const n=t.dismissal;return n?r.from===n.from&&sh(s.doc,n.from,n.text.length)===n.text?!1:(t.dismissal=null,!0):!0},items:()=>[],render:()=>({onStart:s=>{t.set({query:s.query,range:s.range,rect:s.clientRect??null,editor:s.editor})},onUpdate:s=>{t.set({query:s.query,range:s.range,rect:s.clientRect??null,editor:s.editor})},onKeyDown:({event:s})=>s.key==="Escape"?(no(this.editor,t),t.close(),!0):!1,onExit:()=>{t.latched||t.close()}})};return[Pd(e)]}})}const Fi=256,nh=40,Hi=280,rh=140;function ao(t){const e=D.c(4),{store:s}=t,r=L.useSyncExternalStore(s.subscribe,s.getSnapshot),n=r.range!==null;let a;return e[0]!==n||e[1]!==r||e[2]!==s?(a=n?i.jsx(ah,{store:s,state:r}):null,e[0]=n,e[1]=r,e[2]=s,e[3]=a):a=e[3],a}function ah({store:t,state:e}){const s=ee(),{members:r,loading:n}=eh(!0),[a,l]=L.useState(e.query),[o,c]=L.useState(null),d=ih(e.editor),u=d.getBoundingClientRect(),f=d===document.body?new DOMRect(0,0,window.innerWidth,window.innerHeight):u,h=e.rect?.()??new DOMRect(0,0,0,0),x=f.bottom-h.bottom,g=x<Hi&&h.top-f.top>x,p=(g?h.top-f.top:x)-8,k=Math.min(Hi,Math.max(p,rh))-nh,b={position:"absolute",width:Fi,left:Math.min(h.left,f.right-Fi-8)-u.left,...g?{bottom:u.bottom-h.top+6}:{top:h.bottom-u.top+6}},m=()=>{e.editor&&no(e.editor,t),t.close()},y=w=>{const j=w.relatedTarget;if((!j||e.editor?.view.dom.contains(j)===!0)&&t.latched){o?.focus();return}m()},v=w=>{!e.editor||!e.range||(th(e.editor,e.range,w),t.close())};return rl.createPortal(i.jsx("div",{style:b,"data-testid":"mention-menu",className:"z-50 overflow-hidden rounded-lg border border-border bg-popover shadow-md",children:i.jsxs(Ya,{onKeyDown:w=>{w.key==="Escape"&&(w.preventDefault(),m(),e.editor?.commands.focus())},children:[i.jsx(Za,{ref:c,autoFocus:!0,onFocus:()=>{t.latched=!0},value:a,onValueChange:l,placeholder:s("markdownEditor.mentionSearch"),onBlur:y}),i.jsxs(Xa,{style:{maxHeight:k},children:[n?i.jsx("div",{className:"flex items-center justify-center py-6",children:i.jsx(Tt,{size:"sm"})}):i.jsx(Ja,{children:s("markdownEditor.mentionEmpty")}),r.map(w=>i.jsxs(Vn,{value:`${w.name} ${w.email}`,onSelect:()=>v(w),onMouseDown:j=>j.preventDefault(),className:"gap-2",children:[i.jsx(Ke,{url:w.image??void 0,fallback:Ue(w.name),shape:"circle",size:"xs"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:w.name})]},w.id))]})]})}),d)}function ih(t){const e=t?.view.dom.closest('[role="dialog"]');return e instanceof HTMLElement?e:document.body}const lh=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,oh=Kt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",St(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,s,r,n,a,l;const o=(e=(s=t.attrs)===null||s===void 0?void 0:s.src)!==null&&e!==void 0?e:"",c=(r=(n=t.attrs)===null||n===void 0?void 0:n.alt)!==null&&r!==void 0?r:"",d=(a=(l=t.attrs)===null||l===void 0?void 0:l.title)!==null&&a!==void 0?a:"";return d?`![${c}](${o} "${d}")`:`![${c}](${o})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:s,alwaysPreserveAspectRatio:r}=this.options.resize,n=new Set(["src","width","height"]);return({node:a,getPos:l,HTMLAttributes:o,editor:c})=>{const d=document.createElement("img");d.draggable=!1;const u=St(this.options.HTMLAttributes,o);Object.entries(u).forEach(([b,m])=>{if(m!=null)switch(b){case"src":case"width":case"height":break;default:d.setAttribute(b,m)}}),u.src!==null&&(d.src=u.src);let f={...o};const h=b=>{if(typeof b=="string"&&b!==""){d.getAttribute("src")!==b&&(d.src=b);return}d.hasAttribute("src")&&d.removeAttribute("src"),d.src!==""&&(d.src="")};h(o.src);const x=b=>{if(b.type!==a.type)return!1;const m=c.extensionManager.attributes.filter(v=>v.type===b.type.name),y=kd(b,m);return Object.keys(f).forEach(v=>{!n.has(v)&&!(v in y)&&d.removeAttribute(v)}),Object.entries(y).forEach(([v,w])=>{n.has(v)||(w!=null?d.setAttribute(v,w):d.removeAttribute(v))}),h(y.src),f=y,!0},g=new xd({element:d,editor:c,node:a,getPos:l,onResize:(b,m)=>{d.style.width=`${b}px`,d.style.height=`${m}px`},onCommit:(b,m)=>{const y=l();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:b,height:m}).run()},onUpdate:x,options:{directions:t,min:{width:e,height:s},preserveAspectRatio:r===!0}}),p=g.dom,k=()=>{p.style.visibility="",p.style.pointerEvents=""};return p.style.visibility="hidden",p.style.pointerEvents="none",d.complete&&d.naturalWidth>0?k():(d.onload=k,d.onerror=k),g}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[gd({find:lh,type:this.type,getAttributes:t=>{const[,,e,s,r]=t;return{src:s,alt:e,title:r}}})]}});var ch=oh;function dh(t){const e=D.c(16),{node:s,selected:r,editor:n,deleteNode:a}=t,l=ee(),o=typeof s.attrs.src=="string"?s.attrs.src:"",c=typeof s.attrs.alt=="string"?s.attrs.alt:"";let d;e[0]!==c||e[1]!==l?(d=c||l("markdownEditor.imageAltFallback"),e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=r&&"ring-2 ring-ring ring-offset-2 ring-offset-background";let f;e[3]!==u?(f=M("max-h-[420px] max-w-full rounded-lg border border-border object-contain",u),e[3]=u,e[4]=f):f=e[4];let h;e[5]!==o||e[6]!==d||e[7]!==f?(h=i.jsx("img",{src:o,alt:d,draggable:!1,className:f}),e[5]=o,e[6]=d,e[7]=f,e[8]=h):h=e[8];let x;e[9]!==a||e[10]!==n.isEditable||e[11]!==l?(x=n.isEditable&&i.jsx("button",{type:"button","aria-label":l("markdownEditor.removeImage"),onMouseDown:uh,onClick:a,className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-md border border-border bg-card text-muted-foreground opacity-0 shadow-sm transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover/image:opacity-100",children:i.jsx(Yn,{size:14})}),e[9]=a,e[10]=n.isEditable,e[11]=l,e[12]=x):x=e[12];let g;return e[13]!==h||e[14]!==x?(g=i.jsxs(Qa,{className:"group/image relative my-3 w-fit max-w-full",children:[h,x]}),e[13]=h,e[14]=x,e[15]=g):g=e[15],g}function uh(t){return t.preventDefault()}const fh=ch.extend({addNodeView(){return Va(dh)}}).configure({inline:!1,allowBase64:!1}),Ma="uploads",hh="editor-images",io="editor-files",ph=new RegExp(`^/api/[^/]+/fs/${Ma}/read$`),qi="http://relative.invalid";function mh(t){let e;try{e=new URL(t,qi)}catch{return!1}return e.origin!==qi||!ph.test(e.pathname)?!1:(e.searchParams.get("path")??"").startsWith(`${io}/`)}const gh={openOnClick:!1,autolink:!0,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}},xh=bd.extend({parseMarkdown:(t,e)=>{const s=typeof t.href=="string"?t.href:"";if(mh(s))return e.createNode("attachment",{href:s,name:t.text??""});const r=sd(s);return r?e.createNode("mention",{id:r,name:(t.text??"").replace(/^@/,"")}):e.applyMark("link",e.parseInline(t.tokens??[]),{href:s,title:t.title||null})}});function kh(t="",e){return[Dl.configure({heading:{levels:[1,2,3]},underline:!1,link:!1}),xh.configure(gh),Il.configure({placeholder:t}),qf,yd,wd.configure({nested:!0}),fh,Vf,to,...e?[ro(e)]:[],Yl.configure({markedOptions:{breaks:!0}})]}const bh=/^(\s*)([-*+]|\d+[.)])\s+\S/,yh=/^\s*(```|~~~)/,wh=/^\s+(?![-*+>#]|\d+[.)]\s)\S/;function vh(t){const e=[];let s=!1,r=!1;for(const n of t.split(`
83
- `)){if(yh.test(n)){s=!s,r=!1,e.push(n);continue}if(s){e.push(n);continue}if(bh.test(n)){r=!0,e.push(n);continue}if(!n.trim()){r=!1,e.push(n);continue}if(r&&wh.test(n)){e[e.length-1]=`${e[e.length-1]} ${n.trim()}`;continue}r=!1,e.push(n)}return e.join(`
84
- `)}const jh=10,Sh=25,Th={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Ch(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Th[t.type]??(di(t)?".png":"")}function di(t){return t.type.startsWith("image/")}function Nh(){const t=ee(),{upload:e}=qd(Ma),s=Ud(Ma),[r,n]=L.useState(0);return{uploadFile:async l=>{const o=di(l),c=o?jh:Sh;if(l.size>c*1024*1024)return Ve.error(t("markdownEditor.fileTooLarge",{name:l.name,max:String(c)})),null;const d=o?hh:io,u=`${crypto.randomUUID()}${Ch(l)}`;n(f=>f+1);try{return await e.mutateAsync({dir:d,files:[new File([l],u,{type:l.type})]}),s(`${d}/${u}`)}catch{return Ve.error(t("markdownEditor.uploadFailed",{name:l.name})),null}finally{n(f=>f-1)}},pending:r}}const _h=["outline-none","min-h-[200px] sm:min-h-[320px]","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0","[&_p]:my-3 [&_p]:leading-[1.5]","[&_h1]:my-3 [&_h1]:text-xl [&_h1]:font-semibold [&_h1]:leading-[1.5] [&_h1]:text-foreground","[&_h2]:my-3 [&_h2]:text-lg [&_h2]:font-semibold [&_h2]:leading-[1.5] [&_h2]:text-foreground","[&_h3]:my-3 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:leading-[1.5] [&_h3]:text-foreground","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-5","[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-5","[&_li]:my-0.5 [&_li>p]:my-0","[&_blockquote]:my-2 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]","[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-[13px]","[&_pre_code]:bg-transparent [&_pre_code]:p-0","[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2","[&_hr]:my-4 [&_hr]:border-border","[&_strong]:font-semibold [&_strong]:text-foreground","[&_table]:my-3 [&_table]:w-full [&_table]:table-fixed [&_table]:border-collapse","[&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2 [&_th]:text-left [&_th]:font-semibold","[&_td]:border [&_td]:border-border [&_td]:p-2 [&_td]:align-top","[&_th>p]:my-0 [&_td>p]:my-0","[&_ul[data-type=taskList]]:my-3 [&_ul[data-type=taskList]]:list-none [&_ul[data-type=taskList]]:pl-0","[&_li[data-type=taskItem]]:flex [&_li[data-type=taskItem]]:items-start [&_li[data-type=taskItem]]:gap-2","[&_li[data-type=taskItem]>label]:mt-1 [&_li[data-type=taskItem]>label]:shrink-0","[&_li[data-type=taskItem]>div]:min-w-0 [&_li[data-type=taskItem]>div>p]:my-0"].join(" "),Bh=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground/50","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function Ui(t,e,s,r){const n=t.state.schema.nodes[s];if(!n)return e;const a=t.state.tr.replaceWith(e,e,n.create(r)),l=a.mapping.map(e,1);return a.setSelection(vd.near(a.doc.resolve(l))),t.dispatch(a),t.state.selection.to}function Ah({defaultValue:t,onChange:e,placeholder:s,editable:r=!0}){const n=ee(),{uploadFile:a,pending:l}=Nh(),[o]=L.useState(()=>new so),c=L.useRef(null),d=L.useRef(e),u=L.useRef(a);d.current=e,u.current=a;const f=(g,p,k)=>p.length===0?!1:((async()=>{let b=k;for(const m of p){const y=await u.current(m);y&&(b=di(m)?Ui(g,b,"image",{src:y,alt:m.name}):Ui(g,b,"attachment",{href:y,name:m.name}))}})(),!0),h=Rl({extensions:kh(s,o),content:vh(t),contentType:"markdown",editable:r,editorProps:{attributes:{role:"textbox","aria-label":s??"","aria-multiline":"true",class:M(_h,Bh)},handlePaste:(g,p)=>{const k=Array.from(p.clipboardData?.files??[]);return k.length===0?!1:(p.stopPropagation(),f(g,k,g.state.selection.to))},handleDrop:(g,p,k,b)=>{if(b)return!1;const m=Array.from(p.dataTransfer?.files??[]);if(m.length===0)return!1;const y=g.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return y===void 0?!1:(p.stopPropagation(),f(g,m,y))}},onUpdate:({editor:g,transaction:p})=>{p.docChanged&&d.current(g.getMarkdown())}});if(!h)return null;const x=g=>{!g||g.length===0||f(h.view,Array.from(g),h.state.selection.to)};return i.jsxs("div",{className:"flex flex-col",children:[i.jsx(ju,{editor:h}),i.jsx(ao,{store:o}),i.jsx($l,{editor:h,className:"text-[15px] text-muted-foreground"}),i.jsxs("div",{className:"mt-4 flex items-center gap-2 text-xs text-muted-foreground",children:[r&&i.jsx(ue,{type:"button",variant:"ghost",size:"icon-sm","aria-label":n("markdownEditor.attachFile"),onClick:()=>c.current?.click(),children:i.jsx(dc,{size:14})}),l>0&&i.jsxs("span",{className:"inline-flex items-center gap-1.5","aria-live":"polite",role:"status",children:[i.jsx(Tt,{className:"size-3"}),l===1?n("markdownEditor.uploading"):n("markdownEditor.uploadingCount",{count:String(l)})]})]}),i.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:g=>{x(g.target.files),g.target.value=""}})]})}const Dh="claude-subscription";function Rh(t){const e=(t??[]).filter(s=>s.costUsd!==null);return e.length===0?null:{total:e.reduce((s,r)=>s+(r.costUsd??0),0),runCount:e.length,onSubscription:e.every(s=>s.costProvider===Dh)}}function $h(t,e){const s=t.state==="open"&&!t.merged,r=t.mergeable===!1,n=t.checksStatus!=="failing";return{isOpen:s,hasConflict:r,showShip:e&&s&&n&&!r,showResolveConflict:e&&s&&r}}function lo(t){if(t.status!=="completed")return!1;const e=t.conclusion;return e==="success"||e==="neutral"||e==="skipped"}function Eh(t,e,s){return t!=="failing"||s||e.length===0?null:{passed:e.filter(lo).length,total:e.length}}function Mh(t,e){return new URL(e,t).toString()}function oo(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(!s||s.action!=="status_changed")continue;if(typeof s.data?.retry=="number")return null;const r=s.data?.reason;return typeof r!="string"?null:Kd(r.replace(/^Error:\s*/,""))}return null}function Ih({orgSlug:t,repo:e,repositories:s,returnTo:r}){const n=`/api/${encodeURIComponent(t)}/git-providers/github`,a=e?s.find(l=>l.path===e)?.accountId:null;return a?`${n}/accounts/${encodeURIComponent(a)}/manage`:`${n}/install?returnTo=${encodeURIComponent(r)}`}const Ki=()=>0;function zh(t){const{orgSlug:e,itemId:s,onPrs:r}=t,n=L.useRef(r);n.current=r;const a=L.useRef(null),l=L.useRef(""),o=`${e}:${s??""}`;(!a.current||l.current!==o)&&(l.current=o,a.current=c=>{if(!e||!s)return()=>{};const d=u=>{let f;try{f=JSON.parse(u.data)}catch{return}f.data?.id!==s||!Array.isArray(f.data.prs)||(n.current(f.data.prs),c())};return Qd.subscribe(e,d)}),L.useSyncExternalStore(a.current,Ki,Ki)}const co=1440*60*1e3,Lh=40;function uo(t){try{const e=window.localStorage.getItem(al.taskBoardPrs(t));return e?JSON.parse(e):{}}catch{return{}}}function Ph(t){const e=Date.now(),s=Object.entries(t).filter(([,r])=>e-r.updatedAt<=co);for(s.sort(([,r],[,n])=>r.updatedAt-n.updatedAt);s.length>Lh;)s.shift();return Object.fromEntries(s)}function Wi(t,e){if(typeof window>"u")return null;const s=uo(t)[e];return!s||Date.now()-s.updatedAt>co?null:s}function Oh(t,e,s){if(!(typeof window>"u"))try{const r=uo(t);r[e]={data:s,updatedAt:Date.now()},window.localStorage.setItem(al.taskBoardPrs(t),JSON.stringify(Ph(r)))}catch{}}const Fh=6e4,Hh=2e3,qh=t=>t.state===null;function fo(t){const e=D.c(25),{org:s,locator:r}=Je(),n=Mt(),a=hr();let l;e[0]!==t||e[1]!==r||e[2]!==a?(l=g=>{a.setQueryData(at.taskBoardItemPrs(r,t??""),g)},e[0]=t,e[1]=r,e[2]=a,e[3]=l):l=e[3];let o;e[4]!==t||e[5]!==s.slug||e[6]!==l?(o={orgSlug:s.slug,itemId:t,onPrs:l},e[4]=t,e[5]=s.slug,e[6]=l,e[7]=o):o=e[7],zh(o);let c;e[8]!==t||e[9]!==r?(c=at.taskBoardItemPrs(r,t??""),e[8]=t,e[9]=r,e[10]=c):c=e[10];const d=!!t;let u,f;e[11]!==t||e[12]!==r?(u=()=>t?Wi(r,t)?.data??void 0:void 0,f=()=>t?Wi(r,t)?.updatedAt:void 0,e[11]=t,e[12]=r,e[13]=u,e[14]=f):(u=e[13],f=e[14]);let h;e[15]!==t||e[16]!==r||e[17]!==n?(h=async()=>{const{prs:g}=await n.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t});return Oh(r,t,g),g},e[15]=t,e[16]=r,e[17]=n,e[18]=h):h=e[18];let x;return e[19]!==c||e[20]!==d||e[21]!==u||e[22]!==f||e[23]!==h?(x={queryKey:c,enabled:d,refetchInterval:Uh,initialData:u,initialDataUpdatedAt:f,queryFn:h},e[19]=c,e[20]=d,e[21]=u,e[22]=f,e[23]=h,e[24]=x):x=e[24],Zn(x)}function Uh(t){return t.state.data?.some(qh)?Hh:Fh}function Kh(t){const e=D.c(10),{locator:s}=Je(),r=Mt();let n;e[0]!==s||e[1]!==t?(n=at.previewProbe(s,t??""),e[0]=s,e[1]=t,e[2]=n):n=e[2];const a=!!t;let l;e[3]!==r||e[4]!==t?(l=()=>r.call("TASK_BOARD_PREVIEW_PROBE",{url:t}),e[3]=r,e[4]=t,e[5]=l):l=e[5];let o;return e[6]!==n||e[7]!==a||e[8]!==l?(o={queryKey:n,enabled:a,staleTime:0,gcTime:0,retry:!1,queryFn:l},e[6]=n,e[7]=a,e[8]=l,e[9]=o):o=e[9],Zn(o)}function ui(t){const e=D.c(10),{locator:s}=Je(),r=Mt();let n;e[0]!==t||e[1]!==s?(n=at.taskBoardActivity(s,t??""),e[0]=t,e[1]=s,e[2]=n):n=e[2];const a=!!t;let l;e[3]!==t||e[4]!==r?(l=async()=>(await r.call("TASK_BOARD_ACTIVITY_LIST",{taskBoardItemId:t})).activity,e[3]=t,e[4]=r,e[5]=l):l=e[5];let o;return e[6]!==n||e[7]!==a||e[8]!==l?(o={queryKey:n,enabled:a,queryFn:l},e[6]=n,e[7]=a,e[8]=l,e[9]=o):o=e[9],Zn(o)}function Wh(t){const e=D.c(10),{locator:s}=Je(),r=Mt(),n=hr();let a;e[0]!==t||e[1]!==r?(a=async()=>await r.call("TASK_BOARD_PROMOTE_TO_PRODUCTION",{taskBoardItemId:t}),e[0]=t,e[1]=r,e[2]=a):a=e[2];let l;e[3]!==t||e[4]!==s||e[5]!==n?(l=()=>{n.invalidateQueries({queryKey:at.taskBoardItemPrs(s,t)}),n.invalidateQueries({queryKey:at.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=n,e[6]=l):l=e[6];let o;return e[7]!==a||e[8]!==l?(o={mutationFn:a,onSuccess:l},e[7]=a,e[8]=l,e[9]=o):o=e[9],Wn(o)}function Gh(t){const e=D.c(10),{locator:s}=Je(),r=Mt(),n=hr();let a;e[0]!==t||e[1]!==r?(a=async c=>await r.call("TASK_BOARD_RESOLVE_CONFLICT",{id:t,prNumber:c}),e[0]=t,e[1]=r,e[2]=a):a=e[2];let l;e[3]!==t||e[4]!==s||e[5]!==n?(l=()=>{n.invalidateQueries({queryKey:at.taskBoardItemPrs(s,t)}),n.invalidateQueries({queryKey:at.taskBoardActivity(s,t)})},e[3]=t,e[4]=s,e[5]=n,e[6]=l):l=e[6];let o;return e[7]!==a||e[8]!==l?(o={mutationFn:a,onSuccess:l},e[7]=a,e[8]=l,e[9]=o):o=e[9],Wn(o)}function ho(t){return t?nd:[]}function Vh(t,e,s){return e.length===0?!0:rd(t,e,{cycleStartedAt:s})}function Qh(t,e){if(e.length===0)return null;const s=e.map(a=>t.find(l=>l.reviewer===a)),r=s.filter(a=>a?.verdict==="approved"),n={passed:r.length,total:e.length};return s.some(a=>a?.verdict==="changes_requested")?{...n,tone:"danger"}:r.length===0?{...n,tone:"danger"}:r.length<e.length?{...n,tone:"pending"}:{...n,tone:"ok"}}function Yh(t){return t==="in_review"||t==="approved"}const Zh=[],Xh=[];function po(t,e){const s=D.c(4),r=e===void 0?Zh:e,n=Zd();let a;if(s[0]!==n||s[1]!==r||s[2]!==t){const l=Jd(n);a=xc(l,[...t.map(Jh),...r]),s[0]=n,s[1]=r,s[2]=t,s[3]=a}else a=s[3];return a}function Jh(t){return t.repo}function fi(t){const e=D.c(57),{members:s,onSelect:r}=t,n=ee();let a;e[0]!==n?(a=n("taskBoard.taskDialog.assignToPlaceholder"),e[0]=n,e[1]=a):a=e[1];let l;e[2]!==n?(l=n("taskBoard.taskDialog.assignToPlaceholder"),e[2]=n,e[3]=l):l=e[3];let o;e[4]!==a||e[5]!==l?(o=i.jsx(Za,{placeholder:a,"aria-label":l,className:"h-9"}),e[4]=a,e[5]=l,e[6]=o):o=e[6];let c;e[7]!==n?(c=n("taskBoard.taskDialog.noMembersFound"),e[7]=n,e[8]=c):c=e[8];let d;e[9]!==c?(d=i.jsx(Ja,{children:c}),e[9]=c,e[10]=d):d=e[10];let u;e[11]!==n?(u=n("taskBoard.taskDialog.superAgentLabel"),e[11]=n,e[12]=u):u=e[12];let f;e[13]!==r?(f=()=>r(Re),e[13]=r,e[14]=f):f=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(jt,{size:16}),e[15]=h):h=e[15];let x;e[16]!==n?(x=n("taskBoard.taskDialog.superAgentLabel"),e[16]=n,e[17]=x):x=e[17];let g;e[18]!==x?(g=i.jsx("span",{className:"truncate",children:x}),e[18]=x,e[19]=g):g=e[19];let p;e[20]!==g||e[21]!==u||e[22]!==f?(p=i.jsxs(Vn,{value:u,onSelect:f,className:"gap-2",children:[h,g]}),e[20]=g,e[21]=u,e[22]=f,e[23]=p):p=e[23];let k;e[24]!==n?(k=n("taskBoard.taskDialog.unassignedLabel"),e[24]=n,e[25]=k):k=e[25];let b;e[26]!==r?(b=()=>r(null),e[26]=r,e[27]=b):b=e[27];let m;e[28]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(tu,{size:16,className:"text-muted-foreground"}),e[28]=m):m=e[28];let y;e[29]!==n?(y=n("taskBoard.taskDialog.unassignedLabel"),e[29]=n,e[30]=y):y=e[30];let v;e[31]!==y?(v=i.jsx("span",{className:"truncate",children:y}),e[31]=y,e[32]=v):v=e[32];let w;e[33]!==k||e[34]!==b||e[35]!==v?(w=i.jsxs(Vn,{value:k,onSelect:b,className:"gap-2",children:[m,v]}),e[33]=k,e[34]=b,e[35]=v,e[36]=w):w=e[36];let j;e[37]!==p||e[38]!==w?(j=i.jsxs(qr,{children:[p,w]}),e[37]=p,e[38]=w,e[39]=j):j=e[39];let S;e[40]!==n?(S=n("taskBoard.taskDialog.membersGroupHeading"),e[40]=n,e[41]=S):S=e[41];let T;if(e[42]!==s||e[43]!==r){let R;e[45]!==r?(R=E=>i.jsxs(Vn,{value:E.user?.name??E.userId,onSelect:()=>r(E.userId),className:"gap-2",children:[i.jsx(Ke,{url:E.user?.image??void 0,fallback:Ue(E.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:E.user?.name??E.userId})]},E.userId),e[45]=r,e[46]=R):R=e[46],T=s.map(R),e[42]=s,e[43]=r,e[44]=T}else T=e[44];let N;e[47]!==S||e[48]!==T?(N=i.jsx(qr,{heading:S,children:T}),e[47]=S,e[48]=T,e[49]=N):N=e[49];let A;e[50]!==j||e[51]!==N||e[52]!==d?(A=i.jsxs(Xa,{children:[d,j,N]}),e[50]=j,e[51]=N,e[52]=d,e[53]=A):A=e[53];let $;return e[54]!==A||e[55]!==o?($=i.jsxs(Ya,{children:[o,A]}),e[54]=A,e[55]=o,e[56]=$):$=e[56],$}function ep({tags:t,selectedIds:e,defaultColor:s,onToggle:r,onCreate:n,onDelete:a}){const l=ee(),[o,c]=L.useState(""),[d,u]=L.useState(!1),[f,h]=L.useState(s),x=o.trim(),g=t.some(k=>k.name.toLowerCase()===x.toLowerCase()),p=async()=>{if(!(!x||g||d)){u(!0);try{await n(x,f),c("")}finally{u(!1)}}};return i.jsxs(Ya,{children:[i.jsx(Za,{value:o,onValueChange:c,placeholder:l("taskBoard.taskDialog.tagFilterPlaceholder"),"aria-label":l("taskBoard.taskDialog.tagFilterPlaceholder"),className:"h-9"}),i.jsxs(Xa,{children:[x&&!g?i.jsx(qr,{children:i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("input",{type:"color",value:f,onChange:k=>h(k.target.value),"aria-label":l("taskBoard.taskDialog.pickTagColorAriaLabel"),className:"ml-2 size-4 shrink-0 cursor-pointer appearance-none rounded-full border-0 bg-transparent p-0 [&::-moz-color-swatch]:rounded-full [&::-moz-color-swatch]:border-0 [&::-webkit-color-swatch]:rounded-full [&::-webkit-color-swatch]:border-0 [&::-webkit-color-swatch-wrapper]:p-0"}),i.jsxs(Vn,{value:`create-${x}`,disabled:d,onSelect:p,className:"flex-1 gap-2",children:[i.jsx(cr,{size:16,className:"text-muted-foreground"}),i.jsx("span",{className:"truncate",children:l("taskBoard.taskDialog.createTagOption",{name:x})})]})]})}):i.jsx(Ja,{children:l("taskBoard.taskDialog.noTagsFound")}),i.jsx(qr,{children:t.map(k=>{const b=e.includes(k.id);return i.jsxs(Vn,{value:k.name,onSelect:()=>r(k.id),className:"group gap-2",children:[i.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:pr(k.color)}}),i.jsx("span",{className:"flex-1 truncate",children:k.name}),i.jsx("button",{type:"button","aria-label":l("taskBoard.taskDialog.deleteTagAriaLabel",{name:k.name}),className:"flex size-5 shrink-0 items-center justify-center rounded-sm text-muted-foreground opacity-0 hover:bg-background hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100",onClick:m=>{m.stopPropagation(),a(k.id)},children:i.jsx(Ia,{size:13})}),b&&i.jsx(Gn,{size:14,className:"shrink-0 text-foreground"})]},k.id)})})]})]})}function tp(t){if(!t)return[];const e=[],s=new Set,r=(l,o)=>{s.has(l)||(s.add(l),e.push({url:l,label:o.trim()||l}))},n=t.replace(/!\[[^\]]*\]\([^)]*\)/g,"");for(const l of n.matchAll(/\[([^\]]*)\]\((https?:\/\/[^)\s]+)[^)]*\)/g))r(l[2]??"",l[1]??"");const a=n.replace(/\[[^\]]*\]\([^)]*\)/g,"");for(const l of a.matchAll(/https?:\/\/[^\s)]+/g))r(l[0],l[0]);return e}function sp(t){return{id:t.threadId,title:t.title,status:t.status,created_at:t.createdAt,virtual_mcp_id:t.virtualMcpId}}function np(t){const e=D.c(5),{title:s}=t;let r;e[0]!==s?(r=i.jsx(su,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:i.jsx(nu,{className:"truncate text-sm leading-snug",children:s})}),e[0]=s,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("div",{className:"flex flex-1 items-center justify-center"}),e[2]=n):n=e[2];let a;return e[3]!==r?(a=i.jsxs(i.Fragment,{children:[r,n]}),e[3]=r,e[4]=a):a=e[4],a}function rp(t){const e=D.c(12),{thread:s}=t,{org:r,locator:n}=Je();let a;e[0]!==r.id||e[1]!==r.slug?(a={connectionId:Do,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=a):a=e[2];const l=lu(a),o=Ll(),c=Xd(),{data:d}=Fa();let u;e[3]!==s?(u=sp(s),e[3]=s,e[4]=u):u=e[4];let f;return e[5]!==l||e[6]!==o||e[7]!==n||e[8]!==d||e[9]!==u||e[10]!==c?(f=i.jsx(iu,{thread:u,client:l,locator:n,connections:o,virtualMcps:c,members:d,meta:!1}),e[5]=l,e[6]=o,e[7]=n,e[8]=d,e[9]=u,e[10]=c,e[11]=f):f=e[11],f}function ap(t){const e=D.c(11),{thread:s,onClose:r}=t,n=ee(),a=!!s;let l;e[0]!==r?(l=u=>!u&&r(),e[0]=r,e[1]=l):l=e[1];let o;e[2]!==n||e[3]!==s?(o=s&&i.jsx(L.Suspense,{fallback:i.jsx(np,{title:s.title??n("taskBoard.taskDialog.superAgentDefaultName")}),children:i.jsx(rp,{thread:s})}),e[2]=n,e[3]=s,e[4]=o):o=e[4];let c;e[5]!==o?(c=i.jsx(ru,{"data-testid":"task-thread-sheet",className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:o}),e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==l||e[9]!==c?(d=i.jsx(au,{open:a,onOpenChange:l,children:c}),e[7]=a,e[8]=l,e[9]=c,e[10]=d):d=e[10],d}const ip=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function lp(t){const e=D.c(24),{placeholder:s,onSubmit:r,onEmptyChange:n,ref:a,className:l}=t,[o]=L.useState(op);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=Dl.configure({heading:!1,bulletList:!1,orderedList:!1,listItem:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,link:!1,underline:!1}),e[0]=c):c=e[0];let d;e[1]!==o?(d=ro(o),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==s?(u=Il.configure({placeholder:s}),e[3]=s,e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==u?(f=[c,to,d,u,Yl],e[5]=d,e[6]=u,e[7]=f):f=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=M("outline-none text-sm leading-relaxed text-foreground",ip),e[8]=h):h=e[8];let x;e[9]!==s?(x={role:"textbox","aria-label":s,"aria-multiline":"true",class:h},e[9]=s,e[10]=x):x=e[10];let g;e[11]!==n?(g=w=>{const{editor:j}=w;return n(j.isEmpty)},e[11]=n,e[12]=g):g=e[12];const p=Rl({extensions:f,editorProps:{attributes:x,handleKeyDown:(w,j)=>j.key!=="Enter"||j.shiftKey||ta.getState(w.state)?.active?!1:(j.preventDefault(),k(),!0)},onUpdate:g});function k(){if(!p)return;const w=p.getMarkdown().trim();w&&(r(w),p.commands.clearContent(),n(!0))}let b;e[13]!==p?.commands||e[14]!==k?(b=()=>({submit:k,focus:()=>p?.commands.focus()}),e[13]=p?.commands,e[14]=k,e[15]=b):b=e[15],L.useImperativeHandle(a,b);let m;e[16]!==l||e[17]!==p?(m=i.jsx($l,{editor:p,className:l}),e[16]=l,e[17]=p,e[18]=m):m=e[18];let y;e[19]!==o?(y=i.jsx(ao,{store:o}),e[19]=o,e[20]=y):y=e[20];let v;return e[21]!==y||e[22]!==m?(v=i.jsxs(i.Fragment,{children:[m,y]}),e[21]=y,e[22]=m,e[23]=v):v=e[23],v}function op(){return new so}function cp(t){const e=D.c(40),{thread:s,me:r,onReply:n,onDelete:a,onToggleResolved:l}=t,o=ee(),[c,d]=L.useState(!1);if(s.resolved&&!c){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>d(!0),e[0]=m):m=e[0];let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx(uc,{size:16,className:"shrink-0 text-muted-foreground"}),e[1]=y):y=e[1];let v;e[2]!==o||e[3]!==s?(v=up(s,o),e[2]=o,e[3]=s,e[4]=v):v=e[4];let w;e[5]!==v?(w=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:v}),e[5]=v,e[6]=w):w=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx(cu,{size:16,className:"shrink-0 text-muted-foreground"}),e[7]=j):j=e[7];let S;return e[8]!==w?(S=i.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2.5 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-muted/60",children:[y,w,j]}),e[8]=w,e[9]=S):S=e[9],S}let u;e[10]!==o||e[11]!==s.resolved?(u=s.resolved&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",onClick:()=>d(!1),className:"flex items-center justify-between gap-2 rounded-t-xl bg-muted/40 px-4 py-2.5 text-left text-sm text-muted-foreground transition-colors hover:text-foreground",children:[o("taskBoard.taskDialog.commentCollapseThread"),i.jsx(Yn,{size:14,"aria-hidden":!0})]}),i.jsx(Ta,{})]}),e[10]=o,e[11]=s.resolved,e[12]=u):u=e[12];let f;e[13]!==r||e[14]!==a||e[15]!==s?(f=Gi(s,r)?()=>a(s.id):void 0,e[13]=r,e[14]=a,e[15]=s,e[16]=f):f=e[16];let h;e[17]!==l||e[18]!==f||e[19]!==s?(h=i.jsx(Vi,{comment:s,onDelete:f,resolved:s.resolved,onToggleResolved:l}),e[17]=l,e[18]=f,e[19]=s,e[20]=h):h=e[20];let x;if(e[21]!==r||e[22]!==a||e[23]!==s.replies){let m;e[25]!==r||e[26]!==a?(m=(y,v)=>i.jsxs(L.Fragment,{children:[i.jsx(Ta,{inset:v>0}),i.jsx(Vi,{comment:y,onDelete:Gi(y,r)?()=>a(y.id):void 0,isReply:!0})]},y.id),e[25]=r,e[26]=a,e[27]=m):m=e[27],x=s.replies.map(m),e[21]=r,e[22]=a,e[23]=s.replies,e[24]=x}else x=e[24];let g;e[28]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(Ta,{}),e[28]=g):g=e[28];let p;e[29]!==o?(p=o("taskBoard.taskDialog.commentReplyPlaceholder"),e[29]=o,e[30]=p):p=e[30];let k;e[31]!==r||e[32]!==n||e[33]!==p?(k=i.jsx(go,{variant:"reply",placeholder:p,author:r,onSubmit:n}),e[31]=r,e[32]=n,e[33]=p,e[34]=k):k=e[34];let b;return e[35]!==u||e[36]!==h||e[37]!==x||e[38]!==k?(b=i.jsxs("div",{className:"flex flex-col rounded-xl bg-card card-shadow",children:[u,h,x,g,k]}),e[35]=u,e[36]=h,e[37]=x,e[38]=k,e[39]=b):b=e[39],b}function Gi(t,e){return t.author.id===e.id||t.author.isAgent===!0}const dp=new Intl.ListFormat(void 0,{style:"long",type:"conjunction"});function up(t,e){const s=[t,...t.replies],r=dp.format([...new Set(s.map(n=>n.author.name))]);return s.length===1?e("taskBoard.taskDialog.commentResolvedSummaryOne",{names:r}):e("taskBoard.taskDialog.commentResolvedSummaryMany",{count:s.length,names:r})}function fp(t){const e=D.c(6),{me:s,onSubmit:r}=t,n=ee();let a;e[0]!==n?(a=n("taskBoard.taskDialog.commentPlaceholder"),e[0]=n,e[1]=a):a=e[1];let l;return e[2]!==s||e[3]!==r||e[4]!==a?(l=i.jsx(go,{variant:"root",placeholder:a,author:s,onSubmit:r}),e[2]=s,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}function Ta(t){const e=D.c(4),{inset:s}=t,r=s&&"ml-12";let n;e[0]!==r?(n=M("h-px bg-border/50",r),e[0]=r,e[1]=n):n=e[1];let a;return e[2]!==n?(a=i.jsx("span",{className:n}),e[2]=n,e[3]=a):a=e[3],a}function Vi(t){const e=D.c(28),{comment:s,isReply:r,resolved:n,onDelete:a,onToggleResolved:l}=t;let o;e[0]!==s.author?(o=i.jsx(mo,{author:s.author}),e[0]=s.author,e[1]=o):o=e[1];let c;e[2]!==s.author.name?(c=i.jsx("span",{className:"text-sm font-medium text-foreground",children:s.author.name}),e[2]=s.author.name,e[3]=c):c=e[3];let d;e[4]!==s.createdAt?(d=Ha(new Date(s.createdAt)),e[4]=s.createdAt,e[5]=d):d=e[5];let u;e[6]!==d?(u=i.jsx("span",{className:"text-sm text-muted-foreground",children:d}),e[6]=d,e[7]=u):u=e[7];let f;e[8]!==a||e[9]!==l||e[10]!==n?(f=(a||l)&&i.jsx(hp,{resolved:n,onDelete:a,onToggleResolved:l}),e[8]=a,e[9]=l,e[10]=n,e[11]=f):f=e[11];let h;e[12]!==o||e[13]!==c||e[14]!==u||e[15]!==f?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[o,c,u,f]}),e[12]=o,e[13]=c,e[14]=u,e[15]=f,e[16]=h):h=e[16];const x=r&&"pl-8";let g;e[17]!==x?(g=M("text-sm leading-relaxed text-foreground [&_li]:text-sm [&_p]:text-sm",x),e[17]=x,e[18]=g):g=e[18];let p;e[19]!==s.body||e[20]!==s.id?(p=i.jsx(Nl,{id:s.id,text:s.body}),e[19]=s.body,e[20]=s.id,e[21]=p):p=e[21];let k;e[22]!==g||e[23]!==p?(k=i.jsx("div",{className:g,children:p}),e[22]=g,e[23]=p,e[24]=k):k=e[24];let b;return e[25]!==k||e[26]!==h?(b=i.jsxs("div",{className:"group flex flex-col gap-1.5 p-4",children:[h,k]}),e[25]=k,e[26]=h,e[27]=b):b=e[27],b}function hp(t){const e=D.c(18),{resolved:s,onDelete:r,onToggleResolved:n}=t,a=ee();let l;e[0]!==a?(l=a("taskBoard.taskDialog.commentActionsAriaLabel"),e[0]=a,e[1]=l):l=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(Qn,{size:16}),e[2]=o):o=e[2];let c;e[3]!==l?(c=i.jsx(Qe,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":l,className:"ml-auto flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-colors hover:bg-muted hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100",children:o})}),e[3]=l,e[4]=c):c=e[4];let d;e[5]!==n||e[6]!==s||e[7]!==a?(d=n&&i.jsxs(i.Fragment,{children:[i.jsxs(we,{onSelect:n,children:[i.jsx(Gn,{size:16}),a(s?"taskBoard.taskDialog.commentUnresolveThread":"taskBoard.taskDialog.commentResolveThread")]}),i.jsx(Oa,{})]}),e[5]=n,e[6]=s,e[7]=a,e[8]=d):d=e[8];let u;e[9]!==r||e[10]!==a?(u=r&&i.jsxs(we,{variant:"destructive",onSelect:r,children:[i.jsx(Ia,{size:16}),a("taskBoard.taskDialog.commentDelete")]}),e[9]=r,e[10]=a,e[11]=u):u=e[11];let f;e[12]!==d||e[13]!==u?(f=i.jsxs(Ye,{align:"end",className:"w-48",children:[d,u]}),e[12]=d,e[13]=u,e[14]=f):f=e[14];let h;return e[15]!==c||e[16]!==f?(h=i.jsxs(Ze,{children:[c,f]}),e[15]=c,e[16]=f,e[17]=h):h=e[17],h}function mo(t){const e=D.c(6),{author:s}=t;if(s.isAgent){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(jt,{size:24}),e[0]=l):l=e[0],l}const r=s.image??void 0;let n;e[1]!==s.name?(n=Ue(s.name),e[1]=s.name,e[2]=n):n=e[2];let a;return e[3]!==r||e[4]!==n?(a=i.jsx(Ke,{url:r,fallback:n,shape:"circle",size:"xs"}),e[3]=r,e[4]=n,e[5]=a):a=e[5],a}function go(t){const e=D.c(27),{variant:s,placeholder:r,author:n,onSubmit:a}=t,l=ee(),o=L.useRef(null),[c,d]=L.useState(!0);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>o.current?.submit(),e[0]=u):u=e[0];const f=u,h=s==="root"&&"min-h-10";let x;e[1]!==h?(x=M("w-full [&_.tiptap]:outline-none",h),e[1]=h,e[2]=x):x=e[2];let g;e[3]!==a||e[4]!==r||e[5]!==x?(g=i.jsx(lp,{ref:o,placeholder:r,onSubmit:a,onEmptyChange:d,className:x}),e[3]=a,e[4]=r,e[5]=x,e[6]=g):g=e[6];const p=g;let k;e[7]!==l?(k=l("taskBoard.taskDialog.commentSubmitAriaLabel"),e[7]=l,e[8]=k):k=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(ou,{size:16}),e[9]=b):b=e[9];let m;e[10]!==c||e[11]!==k?(m=i.jsx("button",{type:"button",disabled:c,onClick:f,"aria-label":k,className:"flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-40",children:b}),e[10]=c,e[11]=k,e[12]=m):m=e[12];const y=m;let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=()=>o.current?.focus(),e[13]=v):v=e[13];const w=v;if(s==="root"){let N;e[14]!==y?(N=i.jsx("div",{className:"flex items-center justify-end",children:y}),e[14]=y,e[15]=N):N=e[15];let A;return e[16]!==N||e[17]!==p?(A=i.jsxs("div",{"data-testid":"new-comment-composer",onClick:w,className:"relative flex cursor-text flex-col gap-1 rounded-xl bg-card p-3 card-shadow",children:[p,N]}),e[16]=N,e[17]=p,e[18]=A):A=e[18],A}let j;e[19]!==n?(j=i.jsx("span",{className:"mt-0.5 shrink-0",children:i.jsx(mo,{author:n})}),e[19]=n,e[20]=j):j=e[20];let S;e[21]!==p?(S=i.jsx("div",{className:"min-w-0 flex-1 pt-0.5",children:p}),e[21]=p,e[22]=S):S=e[22];let T;return e[23]!==y||e[24]!==S||e[25]!==j?(T=i.jsxs("div",{"data-testid":"reply-composer",onClick:w,className:"relative flex cursor-text items-start gap-2 p-3",children:[j,S,y]}),e[23]=y,e[24]=S,e[25]=j,e[26]=T):T=e[26],T}function pp(t){const e=t.filter(r=>!r.parentId).map(r=>({...r,replies:[]})),s=new Map(e.map(r=>[r.id,r]));for(const r of t)r.parentId&&s.get(r.parentId)?.replies.push(r);return e}function mp(t){const e=D.c(36),{locator:s}=Je(),r=Mt(),n=hr();let a;e[0]!==t||e[1]!==s?(a=at.taskBoardComments(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const l=a,o=!!t;let c;e[3]!==t||e[4]!==r?(c=async()=>pp((await r.call("TASK_BOARD_COMMENT_LIST",{taskBoardItemId:t})).comments),e[3]=t,e[4]=r,e[5]=c):c=e[5];let d;e[6]!==l||e[7]!==o||e[8]!==c?(d={queryKey:l,enabled:o,queryFn:c},e[6]=l,e[7]=o,e[8]=c,e[9]=d):d=e[9];const u=Zn(d);let f;e[10]!==n||e[11]!==l?(f=()=>n.invalidateQueries({queryKey:l}),e[10]=n,e[11]=l,e[12]=f):f=e[12];const h=f;let x;e[13]!==t||e[14]!==r?(x=T=>r.call("TASK_BOARD_COMMENT_CREATE",{taskBoardItemId:t,...T}),e[13]=t,e[14]=r,e[15]=x):x=e[15];let g;e[16]!==h||e[17]!==x?(g={mutationFn:x,onSuccess:h},e[16]=h,e[17]=x,e[18]=g):g=e[18];const p=Wn(g);let k;e[19]!==r?(k=T=>r.call("TASK_BOARD_COMMENT_UPDATE",T),e[19]=r,e[20]=k):k=e[20];let b;e[21]!==h||e[22]!==k?(b={mutationFn:k,onSuccess:h},e[21]=h,e[22]=k,e[23]=b):b=e[23];const m=Wn(b);let y;e[24]!==r?(y=T=>r.call("TASK_BOARD_COMMENT_DELETE",{id:T}),e[24]=r,e[25]=y):y=e[25];let v;e[26]!==h||e[27]!==y?(v={mutationFn:y,onSuccess:h},e[26]=h,e[27]=y,e[28]=v):v=e[28];const w=Wn(v);let j;e[29]!==u.data?(j=u.data??[],e[29]=u.data,e[30]=j):j=e[30];let S;return e[31]!==p||e[32]!==w||e[33]!==m||e[34]!==j?(S={threads:j,post:p,setResolved:m,remove:w},e[31]=p,e[32]=w,e[33]=m,e[34]=j,e[35]=S):S=e[35],S}function gp(t){const e=D.c(24),{locator:s}=Je(),r=Mt(),n=hr();let a;e[0]!==t||e[1]!==s?(a=at.notificationSubscribers(s,t??""),e[0]=t,e[1]=s,e[2]=a):a=e[2];const l=a,o=!!t;let c;e[3]!==t||e[4]!==r?(c=async()=>(await r.call("NOTIFICATION_SUBSCRIPTION_LIST",{taskBoardItemId:t})).userIds,e[3]=t,e[4]=r,e[5]=c):c=e[5];let d;e[6]!==l||e[7]!==o||e[8]!==c?(d={queryKey:l,enabled:o,queryFn:c},e[6]=l,e[7]=o,e[8]=c,e[9]=d):d=e[9];const u=Zn(d);let f;e[10]!==t||e[11]!==r?(f=b=>r.call("NOTIFICATION_SUBSCRIPTION_SET",{taskBoardItemId:t,subscribed:b}),e[10]=t,e[11]=r,e[12]=f):f=e[12];let h;e[13]!==n||e[14]!==l?(h=()=>n.invalidateQueries({queryKey:l}),e[13]=n,e[14]=l,e[15]=h):h=e[15];let x;e[16]!==f||e[17]!==h?(x={mutationFn:f,onSuccess:h},e[16]=f,e[17]=h,e[18]=x):x=e[18];const g=Wn(x);let p;e[19]!==u.data?(p=u.data??[],e[19]=u.data,e[20]=p):p=e[20];let k;return e[21]!==g||e[22]!==p?(k={subscriberIds:p,setSubscribed:g},e[21]=g,e[22]=p,e[23]=k):k=e[23],k}const xp=3;function kp(t){const e=D.c(23),{itemId:s,members:r}=t,n=ee(),{data:a}=il.useSession(),l=a?.user?.id,{subscriberIds:o,setSubscribed:c}=gp(s);let d;e[0]!==l||e[1]!==o?(d=!!l&&o.includes(l),e[0]=l,e[1]=o,e[2]=d):d=e[2];const u=d;let f;if(e[3]!==s||e[4]!==r||e[5]!==l||e[6]!==c||e[7]!==u||e[8]!==o||e[9]!==n){const h=new Map(r.map(wp)),x=l?h.get(l):void 0;let g;e[11]!==l?(g=S=>S!==l,e[11]=l,e[12]=g):g=e[12];const p=o.filter(g).map(S=>h.get(S)).filter(yp),k=[...u&&x?[x]:[],...p],b=k.slice(0,xp),m=k.length-b.length,y=!s||c.isPending;let v;e[13]!==c||e[14]!==u?(v=()=>c.mutate(!u),e[13]=c,e[14]=u,e[15]=v):v=e[15];let w;e[16]!==u||e[17]!==n?(w=n(u?"taskBoard.taskDialog.unsubscribe":"taskBoard.taskDialog.subscribe"),e[16]=u,e[17]=n,e[18]=w):w=e[18];let j;e[19]!==y||e[20]!==v||e[21]!==w?(j=i.jsx(ue,{type:"button",variant:"ghost",size:"sm",disabled:y,onClick:v,className:"h-7 px-2 text-sm font-normal text-muted-foreground",children:w}),e[19]=y,e[20]=v,e[21]=w,e[22]=j):j=e[22],f=i.jsxs("div",{className:"flex items-center gap-2",children:[j,b.length>0&&i.jsxs("span",{className:"inline-flex items-center",title:k.map(S=>S.user?.name??n("taskBoard.taskDialog.someoneLabel")).join(", "),children:[b.map(bp),m>0&&i.jsxs("span",{className:"-ml-2 inline-flex size-6 items-center justify-center rounded-full bg-muted text-[10px] font-medium text-muted-foreground ring-2 ring-background",children:["+",m]})]})]}),e[3]=s,e[4]=r,e[5]=l,e[6]=c,e[7]=u,e[8]=o,e[9]=n,e[10]=f}else f=e[10];return f}function bp(t){return i.jsx(Ke,{url:t.user?.image??void 0,fallback:Ue(t.user?.name),shape:"circle",size:"xs",className:"-ml-2 ring-2 ring-background first:ml-0"},t.userId)}function yp(t){return!!t}function wp(t){return[t.userId,t]}function hi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function xo(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Qi=560,vp=2e3,ko=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),vt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Yi=4,Zi=1,ir="opacity-50";function jp(t){const e=D.c(22),{threads:s}=t,r=ee();let n,a,l,o,c,d;if(e[0]!==r||e[1]!==s){d=Symbol.for("react.early_return_sentinel");e:{const h=Rh(s);if(!h){d=null;break e}const{total:x,runCount:g,onSubscription:p}=h,k=g===1,b=p?k?"taskBoard.taskDialog.costTooltipSubscriptionSingular":"taskBoard.taskDialog.costTooltipSubscriptionPlural":k?"taskBoard.taskDialog.costTooltipSingular":"taskBoard.taskDialog.costTooltipPlural";e[8]===Symbol.for("react.memo_cache_sentinel")?(l=M(vt,"cursor-default hover:bg-transparent"),e[8]=l):l=e[8];const m=String(g);e[9]!==r||e[10]!==m||e[11]!==b?(o=r(b,{runs:m}),e[9]=r,e[10]=m,e[11]=b,e[12]=o):o=e[12],e[13]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Jc,{size:16,className:"shrink-0 text-muted-foreground"}),e[13]=c):c=e[13],n="tabular-nums",a=r("taskBoard.taskDialog.costEstimatePrefix",{amount:x.toLocaleString(void 0,{style:"currency",currency:"USD"})})}e[0]=r,e[1]=s,e[2]=n,e[3]=a,e[4]=l,e[5]=o,e[6]=c,e[7]=d}else n=e[2],a=e[3],l=e[4],o=e[5],c=e[6],d=e[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;let u;e[14]!==n||e[15]!==a?(u=i.jsx("span",{className:n,children:a}),e[14]=n,e[15]=a,e[16]=u):u=e[16];let f;return e[17]!==l||e[18]!==o||e[19]!==c||e[20]!==u?(f=i.jsxs("div",{className:l,title:o,children:[c,u]}),e[17]=l,e[18]=o,e[19]=c,e[20]=u,e[21]=f):f=e[21],f}function Lr(t){const e=D.c(7),{label:s,children:r}=t;let n;e[0]!==s?(n=i.jsx("span",{className:"px-3 text-sm font-medium text-muted-foreground opacity-[0.74]",children:s}),e[0]=s,e[1]=n):n=e[1];let a;e[2]!==r?(a=i.jsx("div",{className:"flex flex-wrap gap-2 sm:flex-col sm:items-start sm:gap-1",children:r}),e[2]=r,e[3]=a):a=e[3];let l;return e[4]!==n||e[5]!==a?(l=i.jsxs("div",{className:"flex flex-col gap-2",children:[n,a]}),e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function Sp(t){const e=D.c(7),{item:s}=t,r=ee(),{data:n}=fo(s.id);if(!n||n.length===0)return null;let a;e[0]!==r?(a=r("taskBoard.taskDialog.reviewsLabel"),e[0]=r,e[1]=a):a=e[1];let l;e[2]!==n?(l=n.map(Tp),e[2]=n,e[3]=l):l=e[3];let o;return e[4]!==a||e[5]!==l?(o=i.jsx(Lr,{label:a,children:l}),e[4]=a,e[5]=l,e[6]=o):o=e[6],o}function Tp(t){return i.jsx(ue,{asChild:!0,variant:"ghost",className:"h-9 w-full justify-start gap-2 px-3 font-medium",children:i.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",title:t.title?`#${t.number} ${t.title}`:t.url,children:[i.jsx(Mr,{size:16,className:"shrink-0"}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t.title??`#${t.number}`})]})},t.url)}function bo(t){const e=D.c(11),{label:s,action:r,children:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Wa,{size:14,className:"shrink-0 transition-transform group-data-[state=closed]:-rotate-90"}),e[0]=a):a=e[0];let l;e[1]!==s?(l=i.jsxs(Yc,{className:"group flex w-fit items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[s,a]}),e[1]=s,e[2]=l):l=e[2];let o;e[3]!==r||e[4]!==l?(o=i.jsxs("div",{className:"flex min-h-7 items-center justify-between gap-2",children:[l,r]}),e[3]=r,e[4]=l,e[5]=o):o=e[5];let c;e[6]!==n?(c=i.jsx(Zc,{children:n}),e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=i.jsxs(Xc,{defaultOpen:!0,className:"flex flex-col gap-2",children:[o,c]}),e[8]=o,e[9]=c,e[10]=d):d=e[10],d}function yo(t){const e=D.c(466),{chrome:s,open:r,onClose:n,item:a,defaultStatus:l,defaultRepo:o,onSubmit:c,onDelete:d,onClone:u,onArchive:f,onOpenPreview:h,onNewChat:x,onAutoFix:g,onRerun:p,isSaving:k}=t,b=r===void 0?!0:r,m=ee(),{org:y}=Je();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={strict:!1},e[0]=v):v=e[0];const{agentId:w}=ll(v),{data:j}=Fa();let S;e[1]!==j?.data?.members?(S=j?.data?.members??[],e[1]=j?.data?.members,e[2]=S):S=e[2];const T=S,N=Ua("delivery_lanes_enabled"),{handleCopy:A,copied:$}=va(),{handleCopy:R,copied:E}=va(),{handleCopy:F,copied:P}=va(),{data:I}=qa();let G;e[3]!==I?(G=I===void 0?[]:I,e[3]=I,e[4]=G):G=e[4];const O=G,V=Oc(),K=Fc();let H;e[5]===Symbol.for("react.memo_cache_sentinel")?(H={slug:"mcp-github"},e[5]=H):H=e[5];const Y=Ll(H);let W;e[6]!==Y?(W=eu(Y),e[6]=Y,e[7]=W):W=e[7];const q=po(Xh,W),ne=hl(q),ae=a?.title??"",te=a?.description??"",oe=a?.status??l??ad[0],ce=a?.priority??"medium",_e=a?.type??id,Ae=a?.assigneeId??null,he=a?.repo??o??null,ge=a?.dueDate;let ke;e[8]!==ge?(ke=xo(ge),e[8]=ge,e[9]=ke):ke=e[9];let xe;e[10]!==a?.tags?(xe=a?.tags.map(Bp)??[],e[10]=a?.tags,e[11]=xe):xe=e[11];let Be;e[12]!==te||e[13]!==oe||e[14]!==ce||e[15]!==_e||e[16]!==Ae||e[17]!==he||e[18]!==ke||e[19]!==xe||e[20]!==ae?(Be={title:ae,description:te,status:oe,priority:ce,type:_e,assigneeId:Ae,repo:he,dueDate:ke,tagIds:xe},e[12]=te,e[13]=oe,e[14]=ce,e[15]=_e,e[16]=Ae,e[17]=he,e[18]=ke,e[19]=xe,e[20]=ae,e[21]=Be):Be=e[21];const[Se,Te]=L.useState(Be),{title:J,description:pe,status:U,priority:be,assigneeId:_,repo:se,dueDate:X}=Se;let de;e[22]!==q||e[23]!==se?(de=se?pl(se,q):void 0,e[22]=q,e[23]=se,e[24]=de):de=e[24];const ie=de,Ie=Se.type,ve=Se.tagIds,[$e,Ce]=L.useState(!1),[it,er]=L.useState(!1),Oe=it&&!$e;let je;e[25]===Symbol.for("react.memo_cache_sentinel")?(je=B=>{if(!B)return;const re=()=>er(B.scrollHeight>Qi);re();const ye=new ResizeObserver(re);return ye.observe(B),()=>ye.disconnect()},e[25]=je):je=e[25];const Vt=je,[tr,It]=L.useState(!1),[sr,nr]=L.useState(!1),[Ct,lt]=L.useState(!1),[ot,et]=L.useState(null);let ut;e[26]!==a?.threads||e[27]!==ot?(ut=a?.threads.find(B=>B.threadId===ot)??null,e[26]=a?.threads,e[27]=ot,e[28]=ut):ut=e[28];const zt=ut,We=L.useRef(Se),Le=L.useRef(null),Lt=L.useRef(c);let ft;e[29]===Symbol.for("react.memo_cache_sentinel")?(ft=()=>{Le.current=null;const B=We.current;B.title.trim()&&Lt.current({title:B.title.trim(),description:B.description.trim()||null,status:B.status,priority:B.priority,type:B.type,assigneeId:B.assigneeId,repo:B.repo,dueDate:B.dueDate?hi(B.dueDate):null,tagIds:B.tagIds})},e[29]=ft):ft=e[29];const ze=ft;let ht;e[30]!==ze||e[31]!==a||e[32]!==c?(ht=(B,re)=>{const ye=re===void 0?!1:re,Ee={...We.current,...B};We.current=Ee,Lt.current=c,Te(Ee),a&&(Le.current&&clearTimeout(Le.current),ye?Le.current=setTimeout(ze,vp):ze())},e[30]=ze,e[31]=a,e[32]=c,e[33]=ht):ht=e[33];const Q=ht;let pt;e[34]!==ze?(pt=()=>{Le.current&&(clearTimeout(Le.current),ze())},e[34]=ze,e[35]=pt):pt=e[35];const Pe=pt;let Nt;e[36]===Symbol.for("react.memo_cache_sentinel")?(Nt=()=>{Le.current&&(clearTimeout(Le.current),Le.current=null)},e[36]=Nt):Nt=e[36];const mt=Nt;let gt;e[37]!==Pe||e[38]!==n?(gt=()=>{Pe(),n()},e[37]=Pe,e[38]=n,e[39]=gt):gt=e[39];const Me=gt;let xt;e[40]!==Pe?(xt=B=>{if(B)return()=>Pe()},e[40]=Pe,e[41]=xt):xt=e[41];const _t=xt;let tt;e[42]!==Me?(tt=B=>{if(!B)return;const re=ye=>{if(ye.key!=="Escape"||ye.defaultPrevented||document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"]'))return;const Ee=ye.target;if(Ee instanceof HTMLElement&&(Ee.isContentEditable||Ee instanceof HTMLInputElement||Ee instanceof HTMLTextAreaElement)){Ee.blur();return}Me()};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},e[42]=Me,e[43]=tt):tt=e[43];const Bt=tt;let kt;e[44]!==V||e[45]!==Q?(kt=async(B,re)=>{const ye=await V.mutateAsync({name:B,color:re});Q({tagIds:[...We.current.tagIds,ye.id]})},e[44]=V,e[45]=Q,e[46]=kt):kt=e[46];const C=kt;let z;e[47]!==K||e[48]!==Q?(z=B=>{K.mutate(B),Q({tagIds:We.current.tagIds.filter(re=>re!==B)})},e[47]=K,e[48]=Q,e[49]=z):z=e[49];const me=z,De=_===Re,He=a&&g&&(U==="triage"||U==="todo")&&!De,Ge=a&&p&&a.assigneeId===Re;let kr;e[50]!==a||e[51]!==y?(kr=a?ml(y.slug,a.keySeq):null,e[50]=a,e[51]=y,e[52]=kr):kr=e[52];const bt=kr;let br;if(e[53]!==_||e[54]!==T){let B;e[56]!==_?(B=re=>re.userId===_,e[56]=_,e[57]=B):B=e[57],br=T.find(B),e[53]=_,e[54]=T,e[55]=br}else br=e[55];const yt=br;let yr;e[58]!==a||e[59]!==T?(yr=a?.assignedBy?T.find(B=>B.userId===a.assignedBy):void 0,e[58]=a,e[59]=T,e[60]=yr):yr=e[60];const qe=yr;let wr;e[61]!==U?(wr=Na(U),e[61]=U,e[62]=wr):wr=e[62];const na=wr.icon;let Ne,Qt,Yt,Zt,Xt,Jt,At,es,ts,ss,ns,rs,Dt,as,Rt;if(e[63]!==w||e[64]!==s||e[65]!==Me||e[66]!==$||e[67]!==F||e[68]!==R||e[69]!==pe||e[70]!==Pe||e[71]!==A||e[72]!==P||e[73]!==k||e[74]!==a||e[75]!==bt||e[76]!==E||e[77]!==f||e[78]!==g||e[79]!==u||e[80]!==d||e[81]!==x||e[82]!==p||e[83]!==y||e[84]!==Q||e[85]!==He||e[86]!==Ge||e[87]!==U||e[88]!==m||e[89]!==J){Ne=!!a&&_l(a);let B;e[105]!==s||e[106]!==Me||e[107]!==F||e[108]!==P||e[109]!==bt||e[110]!==m?(B=s==="page"?i.jsx(Hc,{className:"-ml-2",children:i.jsxs(qc,{className:"text-[15px]",children:[i.jsx(yi,{children:i.jsx(Uc,{asChild:!0,className:"rounded-md px-2 py-1 text-muted-foreground hover:bg-accent",children:i.jsx("button",{type:"button",onClick:Me,children:m("taskBoard.taskDetail.breadcrumbTasks")})})}),i.jsx(Kc,{}),i.jsx(yi,{children:i.jsx(Wc,{className:"px-2 py-1",children:bt??m("taskBoard.taskDetail.breadcrumbTask")})})]})}):bt?i.jsxs(ue,{variant:"ghost",size:"sm",title:bt,"aria-label":m("taskBoard.taskDialog.copyIdAriaLabel"),className:"-ml-2 gap-2 px-2 text-[15px] text-muted-foreground hover:text-foreground",onClick:()=>{F(bt),Ve.success(m("taskBoard.taskDialog.idCopied"))},children:[P?i.jsx(Gn,{size:16}):i.jsx(xi,{size:16}),bt]}):i.jsxs("span",{"aria-hidden":!0,className:"flex h-7 items-center gap-2 text-[15px] text-muted-foreground opacity-50",children:[i.jsx(xi,{size:16}),"–"]}),e[105]=s,e[106]=Me,e[107]=F,e[108]=P,e[109]=bt,e[110]=m,e[111]=B):B=e[111];let re;e[112]!==k||e[113]!==a||e[114]!==m?(re=a&&k&&i.jsx("span",{className:"mr-1 text-sm text-muted-foreground",children:m("taskBoard.taskDialog.savingLabel")}),e[112]=k,e[113]=a,e[114]=m,e[115]=re):re=e[115];let ye;e[116]!==a||e[117]!==m?(ye=a?.externalUrl&&i.jsx(ue,{asChild:!0,variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.openInTrackerAriaLabel"),title:a.externalUrl,className:"text-muted-foreground hover:text-foreground",children:i.jsx("a",{href:a.externalUrl,target:"_blank",rel:"noreferrer",children:i.jsx(ur,{size:16})})}),e[116]=a,e[117]=m,e[118]=ye):ye=e[118];let Ee;e[119]!==w||e[120]!==$||e[121]!==R||e[122]!==pe||e[123]!==A||e[124]!==a||e[125]!==E||e[126]!==f||e[127]!==g||e[128]!==u||e[129]!==d||e[130]!==x||e[131]!==p||e[132]!==y||e[133]!==He||e[134]!==Ge||e[135]!==U||e[136]!==m?(Ee=a&&i.jsxs(i.Fragment,{children:[i.jsx(ue,{variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.shareAriaLabel"),title:m("taskBoard.taskDialog.shareTitle"),className:"text-muted-foreground hover:text-foreground",onClick:()=>{R(`${window.location.origin}${gl(y.slug,a,w)}`),Ve.success(m("taskBoard.taskDialog.linkCopied"))},children:E?i.jsx(Gn,{size:16}):i.jsx(fc,{size:16})}),i.jsxs(Ze,{modal:!1,children:[i.jsx(Qe,{asChild:!0,children:i.jsx(ue,{variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.moreActionsAriaLabel"),className:"text-muted-foreground hover:text-foreground data-[state=open]:bg-accent data-[state=open]:text-foreground",children:i.jsx(Qn,{size:16})})}),i.jsxs(Ye,{align:"end",className:"w-48",children:[x&&i.jsxs(we,{onSelect:x,children:[i.jsx(dl,{size:16}),m("taskBoard.taskDialog.newChatButton")]}),He&&i.jsxs(we,{onSelect:g,children:[i.jsx(za,{size:16}),m("taskBoard.taskBoard.autoFix")]}),Ge&&i.jsxs(we,{onSelect:p,children:[i.jsx(Qr,{size:16}),m("taskBoard.taskBoard.rerun")]}),(x||He||Ge)&&i.jsx(Oa,{}),pe&&i.jsxs(we,{onSelect:()=>A(pe),children:[$?i.jsx(Gn,{size:16}):i.jsx(ed,{size:16}),m("taskBoard.taskDialog.copyDescription")]}),u&&i.jsxs(we,{onSelect:u,children:[i.jsx(hc,{size:16}),m("taskBoard.taskDialog.cloneTask")]}),f&&U!=="archived"&&i.jsxs(we,{onSelect:()=>{mt(),f()},children:[i.jsx(Ro,{size:16}),m("taskBoard.taskDialog.archiveTask")]}),d&&i.jsxs(we,{variant:"destructive",onSelect:()=>{mt(),d()},children:[i.jsx(Ia,{size:16}),m("taskBoard.taskDialog.deleteTask")]})]})]})]}),e[119]=w,e[120]=$,e[121]=R,e[122]=pe,e[123]=A,e[124]=a,e[125]=E,e[126]=f,e[127]=g,e[128]=u,e[129]=d,e[130]=x,e[131]=p,e[132]=y,e[133]=He,e[134]=Ge,e[135]=U,e[136]=m,e[137]=Ee):Ee=e[137];let ct;e[138]!==s||e[139]!==Me||e[140]!==m?(ct=s==="dialog"&&i.jsx(ue,{variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.closeAriaLabel"),className:"text-muted-foreground hover:text-foreground",onClick:Me,children:i.jsx(Yn,{size:16})}),e[138]=s,e[139]=Me,e[140]=m,e[141]=ct):ct=e[141];let Pn;e[142]!==re||e[143]!==ye||e[144]!==Ee||e[145]!==ct?(Pn=i.jsxs("div",{className:"flex items-center gap-0.5",children:[re,ye,Ee,ct]}),e[142]=re,e[143]=ye,e[144]=Ee,e[145]=ct,e[146]=Pn):Pn=e[146];let _r;e[147]!==B||e[148]!==Pn?(_r=i.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 px-6 pb-4 pt-6 sm:px-8",children:[B,Pn]}),e[147]=B,e[148]=Pn,e[149]=_r):_r=e[149];const Br=_r;e[150]!==s||e[151]!==Br?(Rt=s==="page"?i.jsx("div",{className:"mx-auto w-full max-w-[1040px]",children:Br}):Br,e[150]=s,e[151]=Br,e[152]=Rt):Rt=e[152],as="flex min-h-0 flex-1 flex-col overflow-y-auto";const wa=s==="page"&&"mx-auto w-full max-w-[1040px]";e[153]!==wa?(Dt=M("flex flex-col sm:flex-row",wa),e[153]=wa,e[154]=Dt):Dt=e[154],rs="flex min-w-0 flex-col gap-2 p-6 sm:flex-1 sm:p-8 sm:pt-6",Qt=_p,Yt=J,Zt=Ar=>{Ne||(Q({title:Ar.target.value},!0),Ar.target.style.height="auto",Ar.target.style.height=`${Ar.target.scrollHeight}px`)},Xt=Np,Jt=Pe,e[155]!==m?(At=m("taskBoard.taskDialog.taskTitlePlaceholder"),e[155]=m,e[156]=At):At=e[156],es=!0,ts=1,ss=Ne,ns=M("w-full resize-none overflow-hidden border-0 bg-transparent text-2xl font-semibold leading-snug text-foreground outline-none placeholder:text-foreground/30",Ne&&"cursor-default"),e[63]=w,e[64]=s,e[65]=Me,e[66]=$,e[67]=F,e[68]=R,e[69]=pe,e[70]=Pe,e[71]=A,e[72]=P,e[73]=k,e[74]=a,e[75]=bt,e[76]=E,e[77]=f,e[78]=g,e[79]=u,e[80]=d,e[81]=x,e[82]=p,e[83]=y,e[84]=Q,e[85]=He,e[86]=Ge,e[87]=U,e[88]=m,e[89]=J,e[90]=Ne,e[91]=Qt,e[92]=Yt,e[93]=Zt,e[94]=Xt,e[95]=Jt,e[96]=At,e[97]=es,e[98]=ts,e[99]=ss,e[100]=ns,e[101]=rs,e[102]=Dt,e[103]=as,e[104]=Rt}else Ne=e[90],Qt=e[91],Yt=e[92],Zt=e[93],Xt=e[94],Jt=e[95],At=e[96],es=e[97],ts=e[98],ss=e[99],ns=e[100],rs=e[101],Dt=e[102],as=e[103],Rt=e[104];let is;e[157]!==Qt||e[158]!==Yt||e[159]!==Zt||e[160]!==Xt||e[161]!==Jt||e[162]!==At||e[163]!==es||e[164]!==ts||e[165]!==ss||e[166]!==ns?(is=i.jsx("textarea",{ref:Qt,value:Yt,onChange:Zt,onKeyDown:Xt,onBlur:Jt,placeholder:At,autoFocus:es,rows:ts,readOnly:ss,className:ns}),e[157]=Qt,e[158]=Yt,e[159]=Zt,e[160]=Xt,e[161]=Jt,e[162]=At,e[163]=es,e[164]=ts,e[165]=ss,e[166]=ns,e[167]=is):is=e[167];let ls;e[168]!==Ne||e[169]!==m?(ls=Ne&&i.jsxs("p",{className:"mb-3 mt-1 flex items-center gap-1.5 text-xs text-muted-foreground",children:[i.jsx($o,{size:12}),m("taskBoard.taskDialog.reportsContentLocked")]}),e[168]=Ne,e[169]=m,e[170]=ls):ls=e[170];let os;e[171]!==is||e[172]!==ls?(os=i.jsxs("div",{children:[is,ls]}),e[171]=is,e[172]=ls,e[173]=os):os=e[173];let cs;e[174]!==a||e[175]!==p||e[176]!==y?(cs=a&&i.jsx(em,{item:a,orgSlug:y.slug,onRerun:p}),e[174]=a,e[175]=p,e[176]=y,e[177]=cs):cs=e[177];const ra=Oe&&"overflow-hidden";let ds;e[178]!==ra?(ds=M("relative",ra),e[178]=ra,e[179]=ds):ds=e[179];let us;e[180]!==Oe?(us=Oe?{maxHeight:Qi}:void 0,e[180]=Oe,e[181]=us):us=e[181];let vr;e[182]===Symbol.for("react.memo_cache_sentinel")?(vr=()=>Ce(!0),e[182]=vr):vr=e[182];let fs;e[183]!==Q?(fs=B=>Q({description:B},!0),e[183]=Q,e[184]=fs):fs=e[184];let hs;e[185]!==m?(hs=m("taskBoard.taskDialog.descriptionPlaceholder"),e[185]=m,e[186]=hs):hs=e[186];const aa=!Ne;let ps;e[187]!==pe||e[188]!==fs||e[189]!==hs||e[190]!==aa?(ps=i.jsx("div",{ref:Vt,"data-testid":"task-description",children:i.jsx(Ah,{defaultValue:pe,onChange:fs,placeholder:hs,editable:aa})}),e[187]=pe,e[188]=fs,e[189]=hs,e[190]=aa,e[191]=ps):ps=e[191];let ms;e[192]!==Oe?(ms=Oe&&i.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-background to-transparent"}),e[192]=Oe,e[193]=ms):ms=e[193];let gs;e[194]!==Pe||e[195]!==ds||e[196]!==us||e[197]!==ps||e[198]!==ms?(gs=i.jsxs("div",{className:ds,style:us,onFocusCapture:vr,onBlurCapture:Pe,children:[ps,ms]}),e[194]=Pe,e[195]=ds,e[196]=us,e[197]=ps,e[198]=ms,e[199]=gs):gs=e[199];let xs;e[200]!==$e||e[201]!==it||e[202]!==m?(xs=it&&i.jsxs(ue,{type:"button",variant:"ghost",size:"sm",className:"mt-2 w-fit text-muted-foreground hover:text-foreground",onClick:()=>Ce(Cp),children:[i.jsx(Wa,{size:14,className:M("transition-transform",$e&&"rotate-180")}),m($e?"taskBoard.taskDialog.showLess":"taskBoard.taskDialog.showMore")]}),e[200]=$e,e[201]=it,e[202]=m,e[203]=xs):xs=e[203];let ks;e[204]!==gs||e[205]!==xs?(ks=i.jsxs("div",{className:"flex flex-col py-6",children:[gs,xs]}),e[204]=gs,e[205]=xs,e[206]=ks):ks=e[206];let bs;e[207]!==a?(bs=a&&i.jsx("div",{className:"py-4",children:i.jsx("hr",{className:"border-border"})}),e[207]=a,e[208]=bs):bs=e[208];let ys;e[209]!==qe||e[210]!==yt||e[211]!==pe||e[212]!==a||e[213]!==T||e[214]!==h||e[215]!==et?(ys=a&&i.jsxs("div",{className:"flex flex-col gap-8",children:[i.jsx(Hp,{item:a,description:pe,onOpenPreview:h}),i.jsx(Kp,{item:a,members:T,startedBy:qe??yt,onOpenThread:B=>et(B.threadId)})]}),e[209]=qe,e[210]=yt,e[211]=pe,e[212]=a,e[213]=T,e[214]=h,e[215]=et,e[216]=ys):ys=e[216];let ws;e[217]!==ks||e[218]!==bs||e[219]!==ys?(ws=i.jsxs("div",{className:"flex flex-col",children:[ks,bs,ys]}),e[217]=ks,e[218]=bs,e[219]=ys,e[220]=ws):ws=e[220];let vs;e[221]!==rs||e[222]!==os||e[223]!==cs||e[224]!==ws?(vs=i.jsxs("div",{className:rs,children:[os,cs,ws]}),e[221]=rs,e[222]=os,e[223]=cs,e[224]=ws,e[225]=vs):vs=e[225];const Co="flex w-full shrink-0 flex-col gap-8 border-t border-border p-6 sm:sticky sm:top-0 sm:max-h-dvh sm:w-[300px] sm:self-start sm:overflow-y-auto sm:border-t-0";let js;e[226]!==a?(js=a&&i.jsx(Sp,{item:a}),e[226]=a,e[227]=js):js=e[227];let Ss;e[228]!==m?(Ss=m("taskBoard.taskDialog.propertiesLabel"),e[228]=m,e[229]=Ss):Ss=e[229];let Ts;e[230]!==a||e[231]!==U?(Ts=M(a?xl({...a,status:U}):Na(U).iconClassName),e[230]=a,e[231]=U,e[232]=Ts):Ts=e[232];let Cs;e[233]!==na||e[234]!==Ts?(Cs=i.jsx(na,{size:16,className:Ts}),e[233]=na,e[234]=Ts,e[235]=Cs):Cs=e[235];let Ns;e[236]!==U||e[237]!==m?(Ns=dr(U,m),e[236]=U,e[237]=m,e[238]=Ns):Ns=e[238];let _s;e[239]!==Cs||e[240]!==Ns.label?(_s=i.jsx(Qe,{asChild:!0,children:i.jsxs("button",{type:"button",className:vt,children:[Cs,Ns.label]})}),e[239]=Cs,e[240]=Ns.label,e[241]=_s):_s=e[241];let Bs;if(e[242]!==N||e[243]!==Q||e[244]!==m){let B;e[246]!==Q||e[247]!==m?(B=re=>{const{label:ye,visual:Ee}=dr(re,m),ct=Ee.icon;return i.jsxs(we,{onSelect:()=>Q({status:re}),className:"gap-2",children:[i.jsx(ct,{size:16,className:Ee.iconClassName}),ye]},re)},e[246]=Q,e[247]=m,e[248]=B):B=e[248],Bs=kl(N).map(B),e[242]=N,e[243]=Q,e[244]=m,e[245]=Bs}else Bs=e[245];let As;e[249]!==Bs?(As=i.jsx(Ye,{align:"start",className:"w-44",children:Bs}),e[249]=Bs,e[250]=As):As=e[250];let Ds;e[251]!==_s||e[252]!==As?(Ds=i.jsxs(Ze,{children:[_s,As]}),e[251]=_s,e[252]=As,e[253]=Ds):Ds=e[253];let Rs;e[254]!==Ne||e[255]!==m?(Rs=Ne?m("taskBoard.taskDialog.reportsContentLocked"):void 0,e[254]=Ne,e[255]=m,e[256]=Rs):Rs=e[256];const ia=Ne&&"cursor-default opacity-60";let $s;e[257]!==ia?($s=M(vt,ia),e[257]=ia,e[258]=$s):$s=e[258];const la=Et[Ie].icon;let jr;e[259]!==la?(jr=i.jsx(la,{size:16}),e[259]=la,e[260]=jr):jr=e[260];const oa=jr,ca=Et[Ie];let Es;e[261]!==m||e[262]!==ca.labelKey?(Es=m(ca.labelKey),e[261]=m,e[262]=ca.labelKey,e[263]=Es):Es=e[263];let Ms;e[264]!==Ne||e[265]!==Rs||e[266]!==$s||e[267]!==oa||e[268]!==Es?(Ms=i.jsx(Qe,{asChild:!0,children:i.jsxs("button",{type:"button",disabled:Ne,title:Rs,className:$s,children:[oa,Es]})}),e[264]=Ne,e[265]=Rs,e[266]=$s,e[267]=oa,e[268]=Es,e[269]=Ms):Ms=e[269];let Is;e[270]!==Q||e[271]!==m?(Is=bl.map(B=>{const re=Et[B].icon;return i.jsxs(we,{onSelect:()=>Q({type:B}),children:[i.jsx(re,{size:16}),m(Et[B].labelKey)]},B)}),e[270]=Q,e[271]=m,e[272]=Is):Is=e[272];let zs;e[273]!==Is?(zs=i.jsx(Ye,{align:"start",className:"w-44",children:Is}),e[273]=Is,e[274]=zs):zs=e[274];let Ls;e[275]!==Ms||e[276]!==zs?(Ls=i.jsxs(Ze,{children:[Ms,zs]}),e[275]=Ms,e[276]=zs,e[277]=Ls):Ls=e[277];let Ps;e[278]!==Ne||e[279]!==m?(Ps=Ne?m("taskBoard.taskDialog.reportsContentLocked"):void 0,e[278]=Ne,e[279]=m,e[280]=Ps):Ps=e[280];const da=be==="none"&&ir,ua=Ne&&"cursor-default opacity-60";let Os;e[281]!==da||e[282]!==ua?(Os=M(vt,da,ua),e[281]=da,e[282]=ua,e[283]=Os):Os=e[283];let Fs;e[284]!==be||e[285]!==m?(Fs=be==="none"?i.jsxs(i.Fragment,{children:[i.jsx(Qn,{size:16}),m("taskBoard.taskDialog.setPriorityButton")]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:M("size-2 rounded-full",Xe[be].dotClassName)}),m(Xe[be].labelKey)]}),e[284]=be,e[285]=m,e[286]=Fs):Fs=e[286];let Hs;e[287]!==Ne||e[288]!==Ps||e[289]!==Os||e[290]!==Fs?(Hs=i.jsx(Qe,{asChild:!0,children:i.jsx("button",{type:"button",disabled:Ne,title:Ps,className:Os,children:Fs})}),e[287]=Ne,e[288]=Ps,e[289]=Os,e[290]=Fs,e[291]=Hs):Hs=e[291];let qs;e[292]!==Q||e[293]!==m?(qs=Xr.map(B=>i.jsxs(we,{onSelect:()=>Q({priority:B}),children:[i.jsx("span",{className:M("size-2 rounded-full",Xe[B].dotClassName)}),m(Xe[B].labelKey)]},B)),e[292]=Q,e[293]=m,e[294]=qs):qs=e[294];let Us;e[295]!==qs?(Us=i.jsx(Ye,{align:"start",className:"w-40",children:qs}),e[295]=qs,e[296]=Us):Us=e[296];let Ks;e[297]!==Hs||e[298]!==Us?(Ks=i.jsxs(Ze,{children:[Hs,Us]}),e[297]=Hs,e[298]=Us,e[299]=Ks):Ks=e[299];const fa=!_&&ir;let Ws;e[300]!==fa?(Ws=M(vt,fa),e[300]=fa,e[301]=Ws):Ws=e[301];let Gs;e[302]!==qe||e[303]!==yt||e[304]!==De||e[305]!==m?(Gs=De&&qe?i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[i.jsx(Ke,{url:qe.user?.image??void 0,fallback:Ue(qe.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:qe.user?.name??m("taskBoard.taskDialog.superAgentDefaultName")})]}),i.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[i.jsxs("span",{className:"inline-flex items-center",children:[i.jsx(Ke,{url:qe.user?.image??void 0,fallback:Ue(qe.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),i.jsx(jt,{size:16,className:"ring-2 ring-background"})]}),m("taskBoard.taskDialog.superAgentLabel")]})]}):De?i.jsxs(i.Fragment,{children:[i.jsx(jt,{size:16}),m("taskBoard.taskDialog.superAgentLabel")]}):yt?i.jsxs(i.Fragment,{children:[i.jsx(Ke,{url:yt.user?.image??void 0,fallback:Ue(yt.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:yt.user?.name??m("taskBoard.taskDialog.unassignedLabel")})]}):i.jsxs(i.Fragment,{children:[i.jsx(ul,{size:16,className:"text-muted-foreground"}),m("taskBoard.taskDialog.assignButton")]}),e[302]=qe,e[303]=yt,e[304]=De,e[305]=m,e[306]=Gs):Gs=e[306];let Vs;e[307]!==Ws||e[308]!==Gs?(Vs=i.jsx(lr,{asChild:!0,children:i.jsx("button",{type:"button",className:Ws,children:Gs})}),e[307]=Ws,e[308]=Gs,e[309]=Vs):Vs=e[309];let Qs;e[310]!==a?.assigneeId||e[311]!==p||e[312]!==Q?(Qs=B=>{if(nr(!1),B===Re&&a?.assigneeId===Re){p?.();return}Q({assigneeId:B})},e[310]=a?.assigneeId,e[311]=p,e[312]=Q,e[313]=Qs):Qs=e[313];let Ys;e[314]!==T||e[315]!==Qs?(Ys=i.jsx(Ir,{align:"start",className:"w-56 p-0",children:i.jsx(fi,{members:T,onSelect:Qs})}),e[314]=T,e[315]=Qs,e[316]=Ys):Ys=e[316];let Zs;e[317]!==sr||e[318]!==Vs||e[319]!==Ys?(Zs=i.jsxs(zr,{open:sr,onOpenChange:nr,modal:!0,children:[Vs,Ys]}),e[317]=sr,e[318]=Vs,e[319]=Ys,e[320]=Zs):Zs=e[320];let Xs;e[321]!==qe||e[322]!==De||e[323]!==m?(Xs=De&&qe&&i.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[i.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),i.jsxs("span",{className:M(vt,"pointer-events-none"),children:[i.jsx(jt,{size:16}),m("taskBoard.taskDialog.superAgentLabel")]})]}),e[321]=qe,e[322]=De,e[323]=m,e[324]=Xs):Xs=e[324];let Js;e[325]!==Zs||e[326]!==Xs?(Js=i.jsxs("div",{className:"flex flex-col",children:[Zs,Xs]}),e[325]=Zs,e[326]=Xs,e[327]=Js):Js=e[327];const ha=!X&&ir;let en;e[328]!==ha?(en=M(vt,ha),e[328]=ha,e[329]=en):en=e[329];let Sr;e[330]===Symbol.for("react.memo_cache_sentinel")?(Sr=i.jsx(Yr,{size:16,className:"text-muted-foreground"}),e[330]=Sr):Sr=e[330];let tn;e[331]!==X||e[332]!==m?(tn=X?ko.format(X):m("taskBoard.taskDialog.dueDateLabel"),e[331]=X,e[332]=m,e[333]=tn):tn=e[333];let sn;e[334]!==en||e[335]!==tn?(sn=i.jsx(lr,{asChild:!0,children:i.jsxs("button",{type:"button",className:en,children:[Sr,tn]})}),e[334]=en,e[335]=tn,e[336]=sn):sn=e[336];const pa=X??void 0;let nn;e[337]!==Q?(nn=B=>{Q({dueDate:B??null}),B&&It(!1)},e[337]=Q,e[338]=nn):nn=e[338];let rn;e[339]!==pa||e[340]!==nn?(rn=i.jsx(Ir,{className:"w-auto p-0",align:"start",children:i.jsx(Ka,{mode:"single",selected:pa,onSelect:nn,initialFocus:!0})}),e[339]=pa,e[340]=nn,e[341]=rn):rn=e[341];let an;e[342]!==tr||e[343]!==sn||e[344]!==rn?(an=i.jsxs(zr,{open:tr,onOpenChange:It,children:[sn,rn]}),e[342]=tr,e[343]=sn,e[344]=rn,e[345]=an):an=e[345];const ma=a?.threads;let ln;e[346]!==ma?(ln=i.jsx(jp,{threads:ma}),e[346]=ma,e[347]=ln):ln=e[347];let on;e[348]!==Js||e[349]!==an||e[350]!==ln||e[351]!==Ss||e[352]!==Ds||e[353]!==Ls||e[354]!==Ks?(on=i.jsxs(Lr,{label:Ss,children:[Ds,Ls,Ks,Js,an,ln]}),e[348]=Js,e[349]=an,e[350]=ln,e[351]=Ss,e[352]=Ds,e[353]=Ls,e[354]=Ks,e[355]=on):on=e[355];let cn;e[356]!==m?(cn=m("taskBoard.taskDialog.labelsLabel"),e[356]=m,e[357]=cn):cn=e[357];let dn;e[358]!==O||e[359]!==Q||e[360]!==m||e[361]!==ve?(dn=ve.length===0?i.jsx(lr,{asChild:!0,children:i.jsxs("button",{type:"button",className:M(vt,ir),children:[i.jsx(pc,{size:16}),m("taskBoard.taskDialog.tagsButton")]})}):i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:px-3",children:[ve.map(B=>{const re=O.find(ye=>ye.id===B);return re?i.jsxs("div",{className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-muted",children:[i.jsxs("button",{type:"button",onClick:()=>lt(!0),className:"inline-flex items-center gap-1.5",children:[i.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:pr(re.color)}}),i.jsx("span",{className:"truncate",children:re.name})]}),i.jsx("button",{type:"button","aria-label":m("taskBoard.taskDialog.removeTagAriaLabel",{name:re.name}),className:"-mr-0.5 flex size-3.5 items-center justify-center rounded-sm text-muted-foreground hover:bg-background hover:text-foreground",onClick:()=>{Q({tagIds:ve.filter(ye=>ye!==B)})},children:i.jsx(Yn,{size:10})})]},B):null}),i.jsx(lr,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":m("taskBoard.taskDialog.addTagButton"),className:"flex size-7 items-center justify-center rounded-md border border-border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:i.jsx(cr,{size:14})})})]}),e[358]=O,e[359]=Q,e[360]=m,e[361]=ve,e[362]=dn):dn=e[362];let un;e[363]!==O.length?(un=ld(O.length),e[363]=O.length,e[364]=un):un=e[364];let fn;e[365]!==Q||e[366]!==ve?(fn=B=>Q({tagIds:ve.includes(B)?ve.filter(re=>re!==B):[...ve,B]}),e[365]=Q,e[366]=ve,e[367]=fn):fn=e[367];let hn;e[368]!==C||e[369]!==me||e[370]!==O||e[371]!==un||e[372]!==fn||e[373]!==ve?(hn=i.jsx(Ir,{align:"start",className:"w-56 p-0",children:i.jsx(ep,{tags:O,selectedIds:ve,defaultColor:un,onToggle:fn,onCreate:C,onDelete:me})}),e[368]=C,e[369]=me,e[370]=O,e[371]=un,e[372]=fn,e[373]=ve,e[374]=hn):hn=e[374];let pn;e[375]!==dn||e[376]!==hn||e[377]!==Ct?(pn=i.jsxs(zr,{open:Ct,onOpenChange:lt,modal:!0,children:[dn,hn]}),e[375]=dn,e[376]=hn,e[377]=Ct,e[378]=pn):pn=e[378];let mn;e[379]!==cn||e[380]!==pn?(mn=i.jsx(Lr,{label:cn,children:pn}),e[379]=cn,e[380]=pn,e[381]=mn):mn=e[381];const ga=Lr;let gn;e[382]!==m?(gn=m("taskBoard.taskDialog.projectLabel"),e[382]=m,e[383]=gn):gn=e[383];const xa=Ze,ka=!se&&ir;let xn;e[384]!==ka?(xn=M(vt,"max-w-full",ka),e[384]=ka,e[385]=xn):xn=e[385];let kn;e[386]!==ie?(kn=i.jsx(kc,{entry:ie}),e[386]=ie,e[387]=kn):kn=e[387];let bn;e[388]!==se||e[389]!==ie?.title||e[390]!==m?(bn=ie?.title??se??m("taskBoard.taskDialog.projectButton"),e[388]=se,e[389]=ie?.title,e[390]=m,e[391]=bn):bn=e[391];let yn;e[392]!==bn?(yn=i.jsx("span",{className:"min-w-0 truncate text-left",children:bn}),e[392]=bn,e[393]=yn):yn=e[393];let wn;e[394]!==xn||e[395]!==kn||e[396]!==yn?(wn=i.jsx(Qe,{asChild:!0,children:i.jsxs("button",{type:"button",className:xn,children:[kn,yn]})}),e[394]=xn,e[395]=kn,e[396]=yn,e[397]=wn):wn=e[397];const ba=Ye,No="start",_o="w-64";let vn;e[398]!==Q?(vn=()=>Q({repo:null}),e[398]=Q,e[399]=vn):vn=e[399];let jn;e[400]!==m?(jn=m("taskBoard.taskDialog.noProject"),e[400]=m,e[401]=jn):jn=e[401];let Sn;e[402]!==vn||e[403]!==jn?(Sn=i.jsx(we,{onSelect:vn,children:jn}),e[402]=vn,e[403]=jn,e[404]=Sn):Sn=e[404];let Tr;e[405]!==Q?(Tr=B=>i.jsx(we,{className:"gap-2",onSelect:()=>Q({repo:B.repo}),children:i.jsx(yl,{entry:B})},B.id),e[405]=Q,e[406]=Tr):Tr=e[406];const ya=ne.map(Tr);let Tn;e[407]!==ba||e[408]!==Sn||e[409]!==ya?(Tn=i.jsxs(ba,{align:No,className:_o,children:[Sn,ya]}),e[407]=ba,e[408]=Sn,e[409]=ya,e[410]=Tn):Tn=e[410];let Cn;e[411]!==xa||e[412]!==wn||e[413]!==Tn?(Cn=i.jsxs(xa,{children:[wn,Tn]}),e[411]=xa,e[412]=wn,e[413]=Tn,e[414]=Cn):Cn=e[414];let Nn;e[415]!==ga||e[416]!==gn||e[417]!==Cn?(Nn=i.jsx(ga,{label:gn,children:Cn}),e[415]=ga,e[416]=gn,e[417]=Cn,e[418]=Nn):Nn=e[418];let _n;e[419]!==on||e[420]!==mn||e[421]!==Nn||e[422]!==js?(_n=i.jsxs("div",{className:Co,children:[js,on,mn,Nn]}),e[419]=on,e[420]=mn,e[421]=Nn,e[422]=js,e[423]=_n):_n=e[423];let Bn;e[424]!==_n||e[425]!==Dt||e[426]!==vs?(Bn=i.jsxs("div",{className:Dt,children:[vs,_n]}),e[424]=_n,e[425]=Dt,e[426]=vs,e[427]=Bn):Bn=e[427];let An;e[428]!==Bn||e[429]!==as?(An=i.jsx("div",{className:as,children:Bn}),e[428]=Bn,e[429]=as,e[430]=An):An=e[430];let Dn;e[431]!==et?(Dn=()=>et(null),e[431]=et,e[432]=Dn):Dn=e[432];let Rn;e[433]!==zt||e[434]!==Dn?(Rn=i.jsx(ap,{thread:zt,onClose:Dn}),e[433]=zt,e[434]=Dn,e[435]=Rn):Rn=e[435];let $n;e[436]!==ze||e[437]!==k||e[438]!==a||e[439]!==m||e[440]!==J?($n=!a&&i.jsx("div",{className:"flex h-16 items-center justify-end border-t border-border px-4",children:i.jsxs(ue,{size:"sm",disabled:!J.trim()||k,onClick:ze,children:[i.jsx(cr,{size:16}),m("taskBoard.taskDialog.createTaskButton")]})}),e[436]=ze,e[437]=k,e[438]=a,e[439]=m,e[440]=J,e[441]=$n):$n=e[441];let Cr;e[442]!==An||e[443]!==Rn||e[444]!==$n||e[445]!==Rt?(Cr=i.jsxs(i.Fragment,{children:[Rt,An,Rn,$n]}),e[442]=An,e[443]=Rn,e[444]=$n,e[445]=Rt,e[446]=Cr):Cr=e[446];const En=Cr;if(s==="page"){let B;e[447]!==Bt||e[448]!==_t?(B=ye=>{const Ee=Bt(ye),ct=_t(ye);return()=>{Ee?.(),ct?.()}},e[447]=Bt,e[448]=_t,e[449]=B):B=e[449];let re;return e[450]!==En||e[451]!==B?(re=i.jsx("div",{ref:B,"data-testid":"task-detail",className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:En}),e[450]=En,e[451]=B,e[452]=re):re=e[452],re}let Mn;e[453]!==Me?(Mn=B=>!B&&Me(),e[453]=Me,e[454]=Mn):Mn=e[454];let In;e[455]!==m?(In=m("taskBoard.taskDialog.newTaskTitle"),e[455]=m,e[456]=In):In=e[456];let zn;e[457]!==In?(zn=i.jsx(Pr,{className:"sr-only",children:In}),e[457]=In,e[458]=zn):zn=e[458];let Ln;e[459]!==En||e[460]!==zn?(Ln=i.jsxs(Or,{className:"flex max-h-[92vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[90vh] sm:max-h-[820px] sm:max-w-[1040px]",closeButtonClassName:"hidden",children:[zn,En]}),e[459]=En,e[460]=zn,e[461]=Ln):Ln=e[461];let Nr;return e[462]!==b||e[463]!==Mn||e[464]!==Ln?(Nr=i.jsx(Fr,{open:b,onOpenChange:Mn,children:Ln}),e[462]=b,e[463]=Mn,e[464]=Ln,e[465]=Nr):Nr=e[465],Nr}function Cp(t){return!t}function Np(t){t.key==="Enter"&&t.preventDefault()}function _p(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Bp(t){return t.id}function Ap(t){const e=D.c(2);let s;return e[0]!==t?(s=i.jsx(yo,{...t,chrome:"dialog"}),e[0]=t,e[1]=s):s=e[1],s}function Dp(t){const e=D.c(2);let s;return e[0]!==t?(s=i.jsx(yo,{...t,chrome:"page"}),e[0]=t,e[1]=s):s=e[1],s}function Rp(t,e){switch(t.status){case"failed":return wc(t.failureKind)?{label:t.failureKind==="superseded"?e("taskBoard.taskDialog.threadStatusSuperseded"):e("taskBoard.taskDialog.threadStatusEndedAfterDelivery"),className:"text-muted-foreground",icon:qt}:{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:mc};case"requires_action":return{label:e("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:Zr};case"in_progress":return{label:e("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:La,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:Xn};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:qt};default:return t.status}}function $p(t){const e=D.c(28),{thread:s,startedBy:r,onOpen:n}=t,a=ee();let l;if(e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==s){const o=s.status?Rp({...s,status:s.status},a):null,c=s.lastMessage;let d;e[5]!==s.title?(d=od(s.title,"reviewer"),e[5]=s.title,e[6]=d):d=e[6];const u=d;let f;e[7]!==n||e[8]!==s?(f=()=>n?.(s),e[7]=n,e[8]=s,e[9]=f):f=e[9];let h;e[10]!==u?(h=u?i.jsx(ei,{size:16,className:"shrink-0"}):i.jsx(jt,{size:16,className:"shrink-0"}),e[10]=u,e[11]=h):h=e[11];let x;e[12]!==a||e[13]!==s.title?(x=s.title||a("taskBoard.taskDialog.superAgentDefaultName"),e[12]=a,e[13]=s.title,e[14]=x):x=e[14];let g;e[15]!==x?(g=i.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:x}),e[15]=x,e[16]=g):g=e[16];let p;e[17]!==r||e[18]!==a?(p=r&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"shrink-0 text-sm text-muted-foreground/50",children:a("taskBoard.taskDialog.startedByLabel")}),i.jsx(Ke,{url:r.user?.image??void 0,fallback:Ue(r.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate text-sm text-foreground",children:r.user?.name??a("taskBoard.taskDialog.someoneLabel")})]}),e[17]=r,e[18]=a,e[19]=p):p=e[19];let k;e[20]!==n||e[21]!==a?(k=n&&i.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-1 text-xs text-muted-foreground/60 group-hover:text-foreground",children:[a("taskBoard.taskDialog.openThreadHint"),i.jsx(Pa,{size:14})]}),e[20]=n,e[21]=a,e[22]=k):k=e[22];let b;e[23]!==h||e[24]!==g||e[25]!==p||e[26]!==k?(b=i.jsxs("div",{className:"flex items-center gap-2",children:[h,g,p,k]}),e[23]=h,e[24]=g,e[25]=p,e[26]=k,e[27]=b):b=e[27],l=i.jsxs("button",{type:"button",disabled:!n,onClick:f,className:"group flex w-full flex-col gap-2 rounded-xl bg-card p-4 text-left card-shadow transition-colors enabled:hover:bg-muted/60 disabled:cursor-default",children:[b,o&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:M("flex shrink-0 items-center gap-1.5",o.className),children:[o.spin?i.jsx(Tt,{className:"size-[15px]",label:o.label}):i.jsx(o.icon,{size:15}),i.jsx("span",{className:"text-sm",children:o.label})]}),c&&i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:c})]})]}),e[0]=n,e[1]=r,e[2]=a,e[3]=s,e[4]=l}else l=e[4];return l}function Ep(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:Cl}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:Mr}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:Mr}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:Mr}}function Mp(t,e){switch(t){case"passing":return{label:e("taskBoard.taskDialog.prChecksPassing"),className:"text-success",icon:Xn};case"failing":return{label:e("taskBoard.taskDialog.prChecksFailing"),className:"text-destructive",icon:qt};case"pending":return{label:e("taskBoard.taskDialog.prChecksPending"),className:"text-warning",icon:La};default:return null}}const Ip=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);function zp(t){if(t.status!=="completed")return{icon:La,className:"text-warning",spin:!0};const e=t.conclusion;return e&&Ip.has(e)?{icon:qt,className:"text-destructive",spin:!1}:lo(t)?{icon:Xn,className:"text-success",spin:!1}:{icon:Zr,className:"text-muted-foreground",spin:!1}}function Lp(t){const e=D.c(46),{url:s,routes:r}=t,n=ee(),{data:a,isPending:l,isError:o}=Kh(s),c=a?.available??!1;if(l){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(Tt,{className:"size-[14px]"}),e[0]=N):N=e[0];let A;e[1]!==n?(A=n("taskBoard.taskDialog.previewLabel"),e[1]=n,e[2]=A):A=e[2];let $;return e[3]!==A?($=i.jsxs(ue,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,children:[N,A]}),e[3]=A,e[4]=$):$=e[4],$}if(!c||o){let N;e[5]!==n?(N=n("taskBoard.taskDialog.previewUnavailableTitle"),e[5]=n,e[6]=N):N=e[6];let A;e[7]===Symbol.for("react.memo_cache_sentinel")?(A=i.jsx(Ba,{size:14}),e[7]=A):A=e[7];let $;e[8]!==n?($=n("taskBoard.taskDialog.previewUnavailable"),e[8]=n,e[9]=$):$=e[9];let R;return e[10]!==N||e[11]!==$?(R=i.jsxs(ue,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,title:N,children:[A,$]}),e[10]=N,e[11]=$,e[12]=R):R=e[12],R}const d=r.length>0&&"rounded-r-none";let u;e[13]!==d?(u=M("gap-1.5",d),e[13]=d,e[14]=u):u=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Ba,{size:14}),e[15]=f):f=e[15];let h;e[16]!==n?(h=n("taskBoard.taskDialog.previewLabel"),e[16]=n,e[17]=h):h=e[17];let x;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx(ur,{size:12}),e[18]=x):x=e[18];let g;e[19]!==h||e[20]!==s?(g=i.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",children:[f,h,x]}),e[19]=h,e[20]=s,e[21]=g):g=e[21];let p;e[22]!==u||e[23]!==g?(p=i.jsx(ue,{asChild:!0,type:"button",variant:"outline",size:"sm",className:u,children:g}),e[22]=u,e[23]=g,e[24]=p):p=e[24];const k=p;if(r.length===0)return k;let b;e[25]!==n?(b=n("taskBoard.taskDialog.previewRoutesLabel"),e[25]=n,e[26]=b):b=e[26];let m;e[27]!==n?(m=n("taskBoard.taskDialog.previewRoutesLabel"),e[27]=n,e[28]=m):m=e[28];let y;e[29]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx(Wa,{size:14}),e[29]=y):y=e[29];let v;e[30]!==b||e[31]!==m?(v=i.jsx(Qe,{asChild:!0,children:i.jsx(ue,{type:"button",variant:"outline",size:"sm",className:"rounded-l-none border-l-0 px-1.5","aria-label":b,title:m,children:y})}),e[30]=b,e[31]=m,e[32]=v):v=e[32];let w;if(e[33]!==r||e[34]!==s){let N;e[36]!==s?(N=A=>i.jsx(we,{asChild:!0,children:i.jsx("a",{href:Mh(s,A),target:"_blank",rel:"noreferrer",className:"font-mono text-xs",children:A})},A),e[36]=s,e[37]=N):N=e[37],w=r.map(N),e[33]=r,e[34]=s,e[35]=w}else w=e[35];let j;e[38]!==w?(j=i.jsx(Ye,{align:"start",children:w}),e[38]=w,e[39]=j):j=e[39];let S;e[40]!==v||e[41]!==j?(S=i.jsxs(Ze,{children:[v,j]}),e[40]=v,e[41]=j,e[42]=S):S=e[42];let T;return e[43]!==k||e[44]!==S?(T=i.jsxs("div",{className:"flex items-center",children:[k,S]}),e[43]=k,e[44]=S,e[45]=T):T=e[45],T}function Pp(t){const e=D.c(54),{pr:s,routes:r,revalidating:n,previewThread:a,reviewsReady:l,shipPending:o,resolvePending:c,onShip:d,onResolveConflict:u,onOpenPreview:f}=t,h=ee(),[x,g]=L.useState(!1);let p;if(e[0]!==x||e[1]!==f||e[2]!==u||e[3]!==d||e[4]!==s||e[5]!==a||e[6]!==c||e[7]!==n||e[8]!==l||e[9]!==r||e[10]!==o||e[11]!==h){const k=Ep(s,h),b=Mp(s.checksStatus,h);let m;e[13]!==s||e[14]!==l?(m=$h(s,l),e[13]=s,e[14]=l,e[15]=m):m=e[15];const{isOpen:y,hasConflict:v,showShip:w,showResolveConflict:j}=m,S=!!a||!!s.previewUrl||w||j,T=s.checks??[],N=T.length>0||b!=null,A=T.length>0,$=Eh(s.checksStatus,T,x),R=$?{label:h("taskBoard.taskDialog.prChecksScore",$),className:"text-warning",icon:qt}:b,E=n&&"revalidating-ring";let F;e[16]!==E?(F=M("flex flex-col gap-3 rounded-xl bg-card p-3 card-shadow",E),e[16]=E,e[17]=F):F=e[17];const P=yu(s.url)?.repo.provider??"github";let I;e[18]!==P?(I=i.jsx(Vd,{provider:P,className:"size-4 shrink-0 text-foreground"}),e[18]=P,e[19]=I):I=e[19];const G=s.title??`${s.repoOwner}/${s.repoName}`;let O;e[20]!==G?(O=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:G}),e[20]=G,e[21]=O):O=e[21];const V=M("flex shrink-0 items-center gap-1 text-xs font-medium",k.className);let K;e[22]!==k?(K=i.jsx(k.icon,{size:13}),e[22]=k,e[23]=K):K=e[23];let H;e[24]!==k||e[25]!==K||e[26]!==V?(H=i.jsxs("span",{className:V,children:[K,k.label]}),e[24]=k,e[25]=K,e[26]=V,e[27]=H):H=e[27];let Y;e[28]===Symbol.for("react.memo_cache_sentinel")?(Y=i.jsx(ur,{size:12,className:"text-muted-foreground/60 group-hover:text-foreground"}),e[28]=Y):Y=e[28];let W;e[29]!==s.number||e[30]!==s.url?(W=i.jsxs("a",{href:s.url,target:"_blank",rel:"noreferrer",title:s.url,className:"group flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted",children:["#",s.number,Y]}),e[29]=s.number,e[30]=s.url,e[31]=W):W=e[31];let Z;e[32]!==H||e[33]!==W||e[34]!==I||e[35]!==O?(Z=i.jsxs("div",{className:"flex items-center gap-3",children:[I,O,H,W]}),e[32]=H,e[33]=W,e[34]=I,e[35]=O,e[36]=Z):Z=e[36];let q;e[37]!==v||e[38]!==y||e[39]!==h?(q=v&&y&&i.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warning",children:[i.jsx(qt,{size:13,className:"shrink-0"}),h("taskBoard.taskDialog.prConflict")]}),e[37]=v,e[38]=y,e[39]=h,e[40]=q):q=e[40];let ne;e[41]!==S||e[42]!==f||e[43]!==u||e[44]!==d||e[45]!==s.previewUrl||e[46]!==a||e[47]!==c||e[48]!==r||e[49]!==o||e[50]!==j||e[51]!==w||e[52]!==h?(ne=S&&i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&i.jsxs(ue,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",title:h("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>f?.(a),children:[i.jsx(dl,{size:13}),h("taskBoard.taskDialog.openPreviewButton")]}),s.previewUrl&&i.jsx(Lp,{url:s.previewUrl,routes:r}),w&&i.jsx(ue,{type:"button",variant:"success",size:"sm",disabled:o,onClick:d,children:h("taskBoard.taskDialog.shipToProductionButton")}),j&&i.jsxs(ue,{type:"button",variant:"warning",size:"sm",className:"gap-1.5",disabled:c,title:h("taskBoard.taskDialog.resolveConflictTitle"),onClick:u,children:[i.jsx(Cl,{size:13}),h("taskBoard.taskDialog.resolveConflictButton")]})]}),e[41]=S,e[42]=f,e[43]=u,e[44]=d,e[45]=s.previewUrl,e[46]=a,e[47]=c,e[48]=r,e[49]=o,e[50]=j,e[51]=w,e[52]=h,e[53]=ne):ne=e[53],p=i.jsxs("div",{className:F,children:[Z,q,ne,N&&i.jsxs("div",{className:"border-t border-border pt-2 text-xs",children:[i.jsxs("button",{type:"button",disabled:!A,onClick:()=>g(Op),className:"flex w-full items-center gap-1.5 font-medium disabled:cursor-default",children:[R?i.jsx(R.icon,{size:13,className:R.className}):i.jsx(Xn,{size:13,className:"text-muted-foreground"}),i.jsx("span",{className:M(R?.className??"text-muted-foreground"),children:R?.label??h("taskBoard.taskDialog.prChecksLabel")}),A&&i.jsx(Pa,{size:14,className:M("ml-auto text-muted-foreground/60 transition-transform",x&&"rotate-90")})]}),x&&i.jsx("div",{className:"mt-2 flex flex-col gap-2",children:T.map((ae,te)=>{const oe=zp(ae),ce=`${ae.name}-${te}`;return i.jsxs("div",{className:"rounded-md bg-muted/40 p-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[oe.spin?i.jsx(Tt,{className:M("size-[13px]",oe.className)}):i.jsx(oe.icon,{size:13,className:M("shrink-0",oe.className)}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:ae.name}),ae.detailsUrl&&i.jsx("a",{href:ae.detailsUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:i.jsx(ur,{size:12})})]}),ae.summary&&i.jsx("div",{className:"mt-1.5 max-h-64 overflow-auto text-muted-foreground",children:i.jsx(Nl,{id:`${s.url}-${ce}`,text:ae.summary})})]},ce)})})]})]}),e[0]=x,e[1]=f,e[2]=u,e[3]=d,e[4]=s,e[5]=a,e[6]=c,e[7]=n,e[8]=l,e[9]=r,e[10]=o,e[11]=h,e[12]=p}else p=e[12];return p}function Op(t){return!t}function Fp(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(On,{className:"size-4 shrink-0 rounded"}),i.jsx(On,{className:"h-4 min-w-0 flex-1"}),i.jsx(On,{className:"h-4 w-16 shrink-0"}),i.jsx(On,{className:"h-4 w-10 shrink-0"})]}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsxs("div",{className:"flex flex-col gap-3 rounded-xl bg-card p-3 card-shadow",children:[e,i.jsxs("div",{className:"flex gap-2",children:[i.jsx(On,{className:"h-7 w-20"}),i.jsx(On,{className:"h-7 w-28"})]})]}),t[1]=s):s=t[1],s}function Hp(t){const e=D.c(56),{item:s,description:r,onOpenPreview:n}=t,a=ee(),{data:l,isLoading:o,isFetching:c}=fo(s.id),{data:d}=ui(s.id),u=vl(),f=Wh(s.id),h=Gh(s.id);let x,g,p,k,b,m;if(e[0]!==d||e[1]!==r||e[2]!==s.previewRoutes||e[3]!==s.reviewCycleStartedAt||e[4]!==s.status||e[5]!==s.threads||e[6]!==n||e[7]!==f||e[8]!==l||e[9]!==c||e[10]!==o||e[11]!==h||e[12]!==u||e[13]!==a){m=Symbol.for("react.early_return_sentinel");e:{const w=tp(r),j=o&&!l;if(!j&&(!l||l.length===0)&&w.length===0){m=null;break e}let S;e[20]!==d||e[21]!==s.reviewCycleStartedAt||e[22]!==s.status||e[23]!==u?(S=Yh(s.status)&&Vh(d??[],ho(u),s.reviewCycleStartedAt),e[20]=d,e[21]=s.reviewCycleStartedAt,e[22]=s.status,e[23]=u,e[24]=S):S=e[24];const T=S;let N;e[25]!==f||e[26]!==a?(N=()=>f.mutate(void 0,{onSuccess:P=>P?.merged?Ve.success(a("taskBoard.taskDialog.shipSuccess")):Ve.error(a("taskBoard.taskDialog.shipError")),onError:()=>Ve.error(a("taskBoard.taskDialog.shipError"))}),e[25]=f,e[26]=a,e[27]=N):N=e[27];const A=N;let $;e[28]!==h||e[29]!==a?($=P=>h.mutate(P,{onSuccess:()=>Ve.success(a("taskBoard.taskDialog.resolveConflictSuccess")),onError:()=>Ve.error(a("taskBoard.taskDialog.resolveConflictError"))}),e[28]=h,e[29]=a,e[30]=$):$=e[30];const R=$;let E;e[31]!==s.threads||e[32]!==n?(E=n?s.threads.find(Up):void 0,e[31]=s.threads,e[32]=n,e[33]=E):E=e[33];const F=E;x=bo,e[34]!==a?(b=a("taskBoard.taskDialog.linksLabel"),e[34]=a,e[35]=b):b=e[35],g="flex flex-col gap-1",e[36]!==s.previewRoutes||e[37]!==j||e[38]!==n||e[39]!==R||e[40]!==A||e[41]!==F||e[42]!==f||e[43]!==l||e[44]!==c||e[45]!==h||e[46]!==T?(p=j?i.jsx(Fp,{}):(l??[]).map(P=>i.jsx(Pp,{pr:P,routes:s.previewRoutes??[],revalidating:c,previewThread:F,reviewsReady:T,shipPending:f.isPending,resolvePending:h.isPending,onShip:A,onResolveConflict:()=>R(P.number),onOpenPreview:n},P.url)),e[36]=s.previewRoutes,e[37]=j,e[38]=n,e[39]=R,e[40]=A,e[41]=F,e[42]=f,e[43]=l,e[44]=c,e[45]=h,e[46]=T,e[47]=p):p=e[47],k=w.map(qp)}e[0]=d,e[1]=r,e[2]=s.previewRoutes,e[3]=s.reviewCycleStartedAt,e[4]=s.status,e[5]=s.threads,e[6]=n,e[7]=f,e[8]=l,e[9]=c,e[10]=o,e[11]=h,e[12]=u,e[13]=a,e[14]=x,e[15]=g,e[16]=p,e[17]=k,e[18]=b,e[19]=m}else x=e[14],g=e[15],p=e[16],k=e[17],b=e[18],m=e[19];if(m!==Symbol.for("react.early_return_sentinel"))return m;let y;e[48]!==g||e[49]!==p||e[50]!==k?(y=i.jsxs("div",{className:g,children:[p,k]}),e[48]=g,e[49]=p,e[50]=k,e[51]=y):y=e[51];let v;return e[52]!==x||e[53]!==b||e[54]!==y?(v=i.jsx(x,{label:b,children:y}),e[52]=x,e[53]=b,e[54]=y,e[55]=v):v=e[55],v}function qp(t){return i.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-2 rounded-md px-1 py-1.5 transition-colors hover:bg-muted",children:[i.jsx(Ba,{size:15,className:"shrink-0 text-muted-foreground"}),i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:t.label}),i.jsx(ur,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function Up(t){return t.hasPreview&&t.virtualMcpId}function Kp(t){const e=D.c(7),{item:s,members:r,startedBy:n,onOpenThread:a}=t,l=ee(),{data:o}=ui(s.id),{data:c}=il.useSession(),d=new Map(r.map(Yp)),u={id:c?.user?.id??"me",name:c?.user?.name??l("taskBoard.taskDialog.commentYouLabel"),image:c?.user?.image},f=mp(s.id),h=y=>{if(y===Re)return{id:y,name:l("taskBoard.taskDialog.superAgentLabel"),isAgent:!0};if(y===u.id)return u;const v=d.get(y);return{id:y,name:v?.user?.name??y,image:v?.user?.image}},x=f.threads.map(y=>({id:y.id,author:h(y.authorId),body:y.body,createdAt:y.createdAt,resolved:y.resolved,replies:y.replies.map(v=>({id:v.id,author:h(v.authorId),body:v.body,createdAt:v.createdAt,replies:[]}))})),g=[...(o??[]).filter(bc).map(Qp),...s.threads.filter(yc).map(Vp),...x.map(Gp)].sort(Wp),p=[];for(const y of g){if(y.kind==="thread"){p.push({type:"thread",thread:y.thread});continue}if(y.kind==="comment"){p.push({type:"comment",comment:y.comment});continue}const v=p[p.length-1];v?.type==="timeline"?v.items.push(y.activity):p.push({type:"timeline",items:[y.activity]})}let k;e[0]!==l?(k=l("taskBoard.taskDialog.activityLabel"),e[0]=l,e[1]=k):k=e[1];let b;e[2]!==s.id||e[3]!==r?(b=i.jsx(kp,{itemId:s.id,members:r}),e[2]=s.id,e[3]=r,e[4]=b):b=e[4];let m;return e[5]!==f.post?(m=y=>f.post.mutate({body:y}),e[5]=f.post,e[6]=m):m=e[6],i.jsx(bo,{label:k,action:b,children:i.jsxs("div",{className:"flex flex-col gap-5",children:[i.jsx(fp,{me:u,onSubmit:m}),p.map((y,v)=>y.type==="timeline"?i.jsx(Xp,{items:y.items,memberByUserId:d},`timeline-${v}`):y.type==="comment"?i.jsx(cp,{thread:y.comment,me:u,onReply:w=>f.post.mutate({body:w,parentId:y.comment.id}),onDelete:w=>f.remove.mutate(w),onToggleResolved:()=>f.setResolved.mutate({id:y.comment.id,resolved:!y.comment.resolved})},`comment-${y.comment.id}`):i.jsx($p,{thread:y.thread,startedBy:n,onOpen:a},`thread-${y.thread.threadId}`))]})})}function Wp(t,e){return e.at-t.at}function Gp(t){return{kind:"comment",at:new Date(t.createdAt).getTime(),comment:t}}function Vp(t){return{kind:"thread",at:new Date(t.createdAt).getTime(),thread:t}}function Qp(t){return{kind:"activity",at:new Date(t.occurredAt).getTime(),activity:t}}function Yp(t){return[t.userId,t]}function Pt(t){const e=D.c(7),{icon:s,label:r}=t;let n;e[0]!==s?(n=i.jsx("span",{className:"ml-1 mr-1 inline-flex h-[1lh] items-center align-top",children:s}),e[0]=s,e[1]=n):n=e[1];let a;e[2]!==r?(a=i.jsx("span",{className:"mr-1",children:r}),e[2]=r,e[3]=a):a=e[3];let l;return e[4]!==n||e[5]!==a?(l=i.jsxs(i.Fragment,{children:[n,a]}),e[4]=n,e[5]=a,e[6]=l):l=e[6],l}const Vr="\0";function Er(t){return`${Vr}${t}${Vr}`}function Ot(t,e){return t.split(new RegExp(`${Vr}(\\w+)${Vr}`)).map((s,r)=>i.jsx(L.Fragment,{children:r%2===0?s:e[s]},r))}function Un(t,e){return e(t==="qa"?"taskBoard.taskDialog.qaAgentLabel":t==="code_review"?"taskBoard.taskDialog.codeReviewerLabel":"taskBoard.taskDialog.reviewerLabel")}function Zp(t,e,s){const r=h=>{const x=typeof h=="string"?vc[h]:void 0;if(!x)return String(h??"");const g=x.icon;return i.jsx(Pt,{icon:i.jsx(g,{size:14,className:x.iconClassName}),label:e(x.labelKey)})},n=h=>{const x=typeof h=="string"?Xe[h]:void 0;return x?i.jsx(Pt,{icon:i.jsx("span",{className:M("size-2 rounded-full",x.dotClassName)}),label:e(x.labelKey)}):String(h??"")},a=h=>{const x=xo(typeof h=="string"?h:null);return x?i.jsx(Pt,{icon:i.jsx(Yr,{size:14,className:"text-muted-foreground"}),label:ko.format(x)}):""},l=h=>!Array.isArray(h)||h.length===0?null:h.map((x,g)=>{const p=x;return i.jsx(Pt,{icon:i.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:pr(p.color)}}),label:p.name??""},p.id??g)}),o=h=>{if(h===Re)return i.jsx(Pt,{icon:i.jsx(jt,{size:14}),label:e("taskBoard.taskDialog.superAgentLabel")});const x=typeof h=="string"?s.get(h):void 0;return i.jsx(Pt,{icon:i.jsx(Ke,{url:x?.user?.image??void 0,fallback:Ue(x?.user?.name),shape:"circle",size:"2xs"}),label:x?.user?.name??e("taskBoard.taskDialog.someoneLabel")})},c=h=>i.jsx(Pt,{icon:i.jsx(ei,{size:14}),label:Un(h,e)}),d=t.data,u=Er("from"),f=Er("to");switch(t.action){case"created":return e("taskBoard.taskDialog.activityCreated");case"status_changed":{const h=oo([{action:"status_changed",data:d}])?.message??"";return typeof d.retry=="number"?e("taskBoard.taskDialog.activityRetryScheduled",{attempt:String(d.retry),of:String(d.of??d.retry),reason:h}):typeof d.retriesSpent=="number"&&d.retriesSpent>0?Ot(e("taskBoard.taskDialog.activityRetriesExhausted",{to:f,count:String(d.retriesSpent),reason:h}),{to:r(d.to)}):Ot(d.from?e("taskBoard.taskDialog.activityMovedFromTo",{from:u,to:f}):e("taskBoard.taskDialog.activityMovedTo",{to:f}),{from:r(d.from),to:r(d.to)})}case"assignee_changed":return d.to==null?e("taskBoard.taskDialog.activityUnassigned"):Ot(e(d.to===Re?"taskBoard.taskDialog.activityDelegated":"taskBoard.taskDialog.activityAssigned",{name:Er("name")}),{name:o(d.to)});case"type_changed":return d.from?e("taskBoard.taskDialog.activityTypeFromTo",{from:u,to:f}):e("taskBoard.taskDialog.activityTypeSet",{to:f});case"priority_changed":return d.to==="none"?e("taskBoard.taskDialog.activityPriorityCleared"):Ot(!d.from||d.from==="none"?e("taskBoard.taskDialog.activityPrioritySet",{to:f}):e("taskBoard.taskDialog.activityPriorityFromTo",{from:u,to:f}),{from:n(d.from),to:n(d.to)});case"due_date_changed":return d.to==null?e("taskBoard.taskDialog.activityDueDateCleared"):Ot(d.from==null?e("taskBoard.taskDialog.activityDueDateSet",{to:f}):e("taskBoard.taskDialog.activityDueDateFromTo",{from:u,to:f}),{from:a(d.from),to:a(d.to)});case"title_changed":return e("taskBoard.taskDialog.activityRenamed",{to:String(d.to??"")});case"description_changed":return e("taskBoard.taskDialog.activityDescriptionUpdated");case"tags_changed":return!Array.isArray(d.to)||d.to.length===0?e("taskBoard.taskDialog.activityTagsCleared"):Ot(e("taskBoard.taskDialog.activityTagsSet",{to:f}),{to:l(d.to)});case"review_requested":return Ot(e("taskBoard.taskDialog.activityDelegated",{name:Er("name")}),{name:c(d.reviewer)});case"review_approved":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewApprovedWithNotes",{reviewer:Un(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewApproved",{reviewer:Un(d.reviewer,e)});case"review_changes_requested":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewChangesRequestedWithNotes",{reviewer:Un(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewChangesRequested",{reviewer:Un(d.reviewer,e)});case"review_verdict_requested":return e("taskBoard.taskDialog.activityReviewVerdictRequested",{reviewer:Un(d.reviewer,e)});case"merge_conflict_resolution":return e("taskBoard.taskDialog.activityMergeConflictResolution");case"merge_failed":{const h=typeof d.detail=="string"?d.detail:"";switch(d.reason){case"no_pr":return e("taskBoard.taskDialog.activityMergeFailedNoPr");case"checks_failing":return e("taskBoard.taskDialog.activityMergeFailedChecksFailing");case"no_connection":return h?e("taskBoard.taskDialog.activityMergeFailedNoConnection",{detail:h}):e("taskBoard.taskDialog.activityMergeFailed");case"rate_limited":return e("taskBoard.taskDialog.activityMergeFailedRateLimited");case"conflict":return e("taskBoard.taskDialog.activityMergeFailedConflict");case"refused":return h?e("taskBoard.taskDialog.activityMergeFailedRefused",{detail:h}):e("taskBoard.taskDialog.activityMergeFailed");default:return h?e("taskBoard.taskDialog.activityMergeFailedError",{detail:h}):e("taskBoard.taskDialog.activityMergeFailed")}}default:{const h=t.action;return String(h)}}}function Xi(t){return!t||t===Re}function Xp(t){const e=D.c(29),{items:s,memberByUserId:r}=t,n=ee(),[a,l]=L.useState(!1);let o;e[0]!==r||e[1]!==n?(o=m=>Xi(m)?n("taskBoard.taskDialog.superAgentLabel"):r.get(m)?.user?.name??n("taskBoard.taskDialog.someoneLabel"),e[0]=r,e[1]=n,e[2]=o):o=e[2];const c=o;let d;e[3]!==r?(d=m=>{if(Xi(m))return i.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:i.jsx(jt,{size:16})});const y=r.get(m);return i.jsx("span",{className:"z-10 shrink-0 rounded-full bg-background",children:i.jsx(Ke,{url:y?.user?.image??void 0,fallback:Ue(y?.user?.name),shape:"circle",size:"2xs"})})},e[3]=r,e[4]=d):d=e[4];const u=d,f=s.length>Yi&&!a;let h;e[5]!==f||e[6]!==s?(h=f?s.slice(0,Zi):s,e[5]=f,e[6]=s,e[7]=h):h=e[7];const x=h;let g;e[8]!==x.length?(g=x.length>1&&i.jsx("span",{"aria-hidden":!0,className:"absolute bottom-3 left-2 top-3 w-px bg-border"}),e[8]=x.length,e[9]=g):g=e[9];let p;if(e[10]!==u||e[11]!==c||e[12]!==r||e[13]!==n||e[14]!==x){let m;e[16]!==u||e[17]!==c||e[18]!==r||e[19]!==n?(m=y=>i.jsxs("div",{className:"relative flex items-center gap-2.5",children:[u(y.actorId),i.jsxs("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:[c(y.actorId)," ",Zp(y,n,r),i.jsxs("span",{className:"text-muted-foreground/60",children:[" · ",Ha(new Date(y.occurredAt))]})]})]},y.id),e[16]=u,e[17]=c,e[18]=r,e[19]=n,e[20]=m):m=e[20],p=x.map(m),e[10]=u,e[11]=c,e[12]=r,e[13]=n,e[14]=x,e[15]=p}else p=e[15];let k;e[21]!==a||e[22]!==s.length||e[23]!==n?(k=s.length>Yi&&i.jsxs("button",{type:"button",onClick:()=>l(Jp),className:"relative flex items-center gap-2.5 text-left",children:[i.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center rounded-full bg-background text-muted-foreground/60",children:i.jsx(Qn,{size:14})}),i.jsx("span",{className:"text-xs text-muted-foreground/60 hover:text-foreground",children:a?n("taskBoard.taskDialog.timelineFoldLess"):n("taskBoard.taskDialog.timelineFoldMore",{count:String(s.length-Zi)})})]}),e[21]=a,e[22]=s.length,e[23]=n,e[24]=k):k=e[24];let b;return e[25]!==g||e[26]!==p||e[27]!==k?(b=i.jsxs("div",{className:"relative flex flex-col gap-4",children:[g,p,k]}),e[25]=g,e[26]=p,e[27]=k,e[28]=b):b=e[28],b}function Jp(t){return!t}function em(t){const e=D.c(37),{item:s,orgSlug:r,onRerun:n}=t,a=ee(),{data:l}=ui(s.id),{data:o}=zl();let c;e[0]!==l?(c=l??[],e[0]=l,e[1]=c):c=e[1];let d;e[2]!==c?(d=oo(c),e[2]=c,e[3]=d):d=e[3];const u=d;if(!u)return null;const f=u.code===Ni.githubNotAuthenticated,h=u.code===Ni.githubConnectionMissing;let x;e[4]!==s||e[5]!==r||e[6]!==o?(x=Ih({orgSlug:r,repo:s.repo,repositories:o??[],returnTo:gl(r,s)}),e[4]=s,e[5]=r,e[6]=o,e[7]=x):x=e[7];const g=x;let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(qt,{}),e[8]=p):p=e[8];let k;e[9]!==a?(k=a("taskBoard.taskDialog.runFailedTitle"),e[9]=a,e[10]=k):k=e[10];let b;e[11]!==k?(b=i.jsx(Gc,{children:k}),e[11]=k,e[12]=b):b=e[12];let m;e[13]!==h||e[14]!==u.message||e[15]!==f||e[16]!==a?(m=h?a("taskBoard.taskDialog.runFailedGithubMissing"):f?a("taskBoard.taskDialog.runFailedGithubAuth"):u.message,e[13]=h,e[14]=u.message,e[15]=f,e[16]=a,e[17]=m):m=e[17];let y;e[18]!==m?(y=i.jsx(Vc,{children:m}),e[18]=m,e[19]=y):y=e[19];let v;e[20]!==b||e[21]!==y?(v=i.jsxs("div",{className:"flex items-start gap-3",children:[p,i.jsxs("div",{className:"flex flex-col gap-1",children:[b,y]})]}),e[20]=b,e[21]=y,e[22]=v):v=e[22];let w;e[23]!==h||e[24]!==f||e[25]!==g||e[26]!==a?(w=(f||h)&&i.jsx(ue,{size:"sm",asChild:!0,children:i.jsx("a",{href:g,children:a(h?"taskBoard.taskDialog.runFailedLinkRepo":"taskBoard.taskDialog.runFailedReconnect")})}),e[23]=h,e[24]=f,e[25]=g,e[26]=a,e[27]=w):w=e[27];let j;e[28]!==n||e[29]!==a?(j=n&&i.jsxs(ue,{size:"sm",variant:"outline",onClick:n,children:[i.jsx(Qr,{size:14}),a("taskBoard.taskBoard.rerun")]}),e[28]=n,e[29]=a,e[30]=j):j=e[30];let S;e[31]!==w||e[32]!==j?(S=i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 self-start",children:[w,j]}),e[31]=w,e[32]=j,e[33]=S):S=e[33];let T;return e[34]!==S||e[35]!==v?(T=i.jsxs(Qc,{variant:"destructive",className:"mt-2 flex-col",children:[v,S]}),e[34]=S,e[35]=v,e[36]=T):T=e[36],T}const tm=["taskBoard.subscriptionPaywall.trialBenefitMonitoring","taskBoard.subscriptionPaywall.trialBenefitAutoFix","taskBoard.subscriptionPaywall.trialBenefitRuns"],sm="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover";function nm(t){const e=D.c(83),{kind:s,onOpenChange:r}=t,n=ee(),{mutate:a,isPending:l}=du("ORGANIZATION_BILLING_CHECKOUT_START","taskBoard.subscriptionPaywall.checkoutError");if(s==="trial_exhausted"){let v;e[0]!==n?(v=n("taskBoard.subscriptionPaywall.previewAlt"),e[0]=n,e[1]=v):v=e[1];let w;e[2]!==v?(w=i.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:i.jsx("img",{src:sm,alt:v,className:"h-[160px] w-full object-cover object-left-top"})}),e[2]=v,e[3]=w):w=e[3];let j;e[4]!==n?(j=n("taskBoard.subscriptionPaywall.trialTitle"),e[4]=n,e[5]=j):j=e[5];let S;e[6]!==j?(S=i.jsx(Pr,{className:"text-xl font-semibold text-foreground",children:j}),e[6]=j,e[7]=S):S=e[7];let T;e[8]!==n?(T=tm.map(ae=>i.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[i.jsx(Xn,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),i.jsx("span",{className:"leading-snug text-foreground",children:n(ae)})]},ae)),e[8]=n,e[9]=T):T=e[9];let N;e[10]!==T?(N=i.jsx("ul",{className:"flex flex-col gap-3",children:T}),e[10]=T,e[11]=N):N=e[11];let A;e[12]!==n?(A=n("taskBoard.subscriptionPaywall.trialPrice"),e[12]=n,e[13]=A):A=e[13];let $;e[14]!==A?($=i.jsx("span",{className:"text-2xl font-semibold text-foreground",children:A}),e[14]=A,e[15]=$):$=e[15];let R;e[16]!==n?(R=n("taskBoard.subscriptionPaywall.trialPricePeriod"),e[16]=n,e[17]=R):R=e[17];let E;e[18]!==R?(E=i.jsx("span",{className:"text-sm text-muted-foreground",children:R}),e[18]=R,e[19]=E):E=e[19];let F;e[20]!==E||e[21]!==$?(F=i.jsxs("div",{className:"flex items-baseline gap-1.5",children:[$,E]}),e[20]=E,e[21]=$,e[22]=F):F=e[22];let P;e[23]!==r?(P=()=>r(!1),e[23]=r,e[24]=P):P=e[24];let I;e[25]!==n?(I=n("taskBoard.subscriptionPaywall.notNowButton"),e[25]=n,e[26]=I):I=e[26];let G;e[27]!==l||e[28]!==P||e[29]!==I?(G=i.jsx(ue,{variant:"ghost",onClick:P,disabled:l,className:"order-2 w-full sm:order-none sm:w-auto",children:I}),e[27]=l,e[28]=P,e[29]=I,e[30]=G):G=e[30];let O;e[31]!==r||e[32]!==a?(O=()=>a(void 0,{onSuccess:()=>r(!1)}),e[31]=r,e[32]=a,e[33]=O):O=e[33];let V;e[34]!==l?(V=l&&i.jsx(Tt,{className:"size-4"}),e[34]=l,e[35]=V):V=e[35];let K;e[36]!==n?(K=n("taskBoard.subscriptionPaywall.subscribeButton"),e[36]=n,e[37]=K):K=e[37];let H;e[38]!==l||e[39]!==O||e[40]!==V||e[41]!==K?(H=i.jsxs(ue,{disabled:l,onClick:O,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[V,K]}),e[38]=l,e[39]=O,e[40]=V,e[41]=K,e[42]=H):H=e[42];let Y;e[43]!==G||e[44]!==H?(Y=i.jsxs("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[G,H]}),e[43]=G,e[44]=H,e[45]=Y):Y=e[45];let W;e[46]!==F||e[47]!==Y?(W=i.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[F,Y]}),e[46]=F,e[47]=Y,e[48]=W):W=e[48];let Z;e[49]!==W||e[50]!==S||e[51]!==N?(Z=i.jsxs("div",{className:"flex flex-col gap-6 px-3 pb-3 pt-7",children:[S,N,W]}),e[49]=W,e[50]=S,e[51]=N,e[52]=Z):Z=e[52];let q;e[53]!==w||e[54]!==Z?(q=i.jsxs(Or,{className:"gap-0 p-3 sm:max-w-[440px]",closeButtonClassName:"z-10 rounded-full bg-background/70 p-1 text-foreground backdrop-blur transition-colors hover:bg-background",children:[w,Z]}),e[53]=w,e[54]=Z,e[55]=q):q=e[55];let ne;return e[56]!==r||e[57]!==q?(ne=i.jsx(Fr,{open:!0,onOpenChange:r,children:q}),e[56]=r,e[57]=q,e[58]=ne):ne=e[58],ne}let o;e[59]!==s||e[60]!==n?(o=s?{monthly_exhausted:{title:n("taskBoard.subscriptionPaywall.monthlyTitle"),description:n("taskBoard.subscriptionPaywall.monthlyDescription")},runs_exhausted:{title:n("taskBoard.subscriptionPaywall.runsTitle"),description:n("taskBoard.subscriptionPaywall.runsDescription")}}[s]:null,e[59]=s,e[60]=n,e[61]=o):o=e[61];const c=o,d=!!s,u=c?.title;let f;e[62]!==u?(f=i.jsx(Pr,{children:u}),e[62]=u,e[63]=f):f=e[63];const h=c?.description;let x;e[64]!==h?(x=i.jsx(jl,{children:h}),e[64]=h,e[65]=x):x=e[65];let g;e[66]!==f||e[67]!==x?(g=i.jsxs(Sl,{children:[f,x]}),e[66]=f,e[67]=x,e[68]=g):g=e[68];let p;e[69]!==r?(p=()=>r(!1),e[69]=r,e[70]=p):p=e[70];let k;e[71]!==n?(k=n("taskBoard.subscriptionPaywall.dismissButton"),e[71]=n,e[72]=k):k=e[72];let b;e[73]!==p||e[74]!==k?(b=i.jsx(Tl,{children:i.jsx(ue,{variant:"ghost",onClick:p,children:k})}),e[73]=p,e[74]=k,e[75]=b):b=e[75];let m;e[76]!==b||e[77]!==g?(m=i.jsxs(Or,{className:"sm:max-w-[440px]",children:[g,b]}),e[76]=b,e[77]=g,e[78]=m):m=e[78];let y;return e[79]!==r||e[80]!==m||e[81]!==d?(y=i.jsx(Fr,{open:d,onOpenChange:r,children:m}),e[79]=r,e[80]=m,e[81]=d,e[82]=y):y=e[82],y}const rm=new Set(["completed","failed","expired"]);function am(t){return t.threads.some(e=>e.status!==null&&!rm.has(e.status))}function im(t){const e=D.c(43),{items:s,pending:r,onOpenChange:n,onConfirm:a}=t,l=ee(),o=s.length;let c;e[0]!==s?(c=s.some(am),e[0]=s,e[1]=c):c=e[1];const d=c,u=o>0;let f;e[2]!==o||e[3]!==l?(f=o>1?l("taskBoard.rerun.titleMany",{count:o}):l("taskBoard.rerun.title"),e[2]=o,e[3]=l,e[4]=f):f=e[4];let h;e[5]!==f?(h=i.jsx(Pr,{children:f}),e[5]=f,e[6]=h):h=e[6];let x;e[7]!==o||e[8]!==l||e[9]!==d?(x=o>1?l("taskBoard.rerun.descriptionMany",{count:o}):l(d?"taskBoard.rerun.descriptionTakeover":"taskBoard.rerun.description"),e[7]=o,e[8]=l,e[9]=d,e[10]=x):x=e[10];let g;e[11]!==x?(g=i.jsx(jl,{children:x}),e[11]=x,e[12]=g):g=e[12];let p;e[13]!==h||e[14]!==g?(p=i.jsxs(Sl,{children:[h,g]}),e[13]=h,e[14]=g,e[15]=p):p=e[15];let k;e[16]!==n?(k=()=>n(!1),e[16]=n,e[17]=k):k=e[17];let b;e[18]!==l?(b=l("taskBoard.rerun.cancel"),e[18]=l,e[19]=b):b=e[19];let m;e[20]!==r||e[21]!==k||e[22]!==b?(m=i.jsx(ue,{variant:"outline",onClick:k,disabled:r,children:b}),e[20]=r,e[21]=k,e[22]=b,e[23]=m):m=e[23];let y;e[24]!==r?(y=r&&i.jsx(Tt,{className:"size-4"}),e[24]=r,e[25]=y):y=e[25];let v;e[26]!==l?(v=l("taskBoard.rerun.confirm"),e[26]=l,e[27]=v):v=e[27];let w;e[28]!==a||e[29]!==r||e[30]!==y||e[31]!==v?(w=i.jsxs(ue,{onClick:a,disabled:r,children:[y,v]}),e[28]=a,e[29]=r,e[30]=y,e[31]=v,e[32]=w):w=e[32];let j;e[33]!==m||e[34]!==w?(j=i.jsxs(Tl,{children:[m,w]}),e[33]=m,e[34]=w,e[35]=j):j=e[35];let S;e[36]!==j||e[37]!==p?(S=i.jsxs(Or,{className:"max-w-md",children:[p,j]}),e[36]=j,e[37]=p,e[38]=S):S=e[38];let T;return e[39]!==n||e[40]!==S||e[41]!==u?(T=i.jsx(Fr,{open:u,onOpenChange:n,children:S}),e[39]=n,e[40]=S,e[41]=u,e[42]=T):T=e[42],T}const Ji=380,lm=90,el=5,om="cubic-bezier(0.22, 0.61, 0.36, 1)";function cm(t,e,s,r=!0){const n=L.useRef(new Map),a=L.useRef(new Map),l=L.useRef(!1);L.useLayoutEffect(()=>{const o=t.current;if(!o)return;if(!r){l.current=!0;return}const c=l.current;l.current=!1;const d=o.querySelectorAll("[data-flip-id]"),u=new Map,f=n.current;n.current=u;const h=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,x=[];for(const v of d){const w=v.dataset.flipId;if(!w)continue;const j=v.getBoundingClientRect(),S=v.dataset.flipLane;if(u.set(w,{rect:j,lane:S}),!s||c)continue;const T=f.get(w);if(!T)continue;const N=T.rect.left-j.left,A=T.rect.top-j.top;(N||A)&&x.push({el:v,dx:N,dy:A,lane:T.lane!==S})}if(!s||h||x.length===0)return;const g=a.current,p=v=>{v instanceof HTMLElement&&(g.set(v,(g.get(v)??0)+1),v.style.overflow="visible")},k=v=>{if(!(v instanceof HTMLElement))return;const w=(g.get(v)??1)-1;if(w>0){g.set(v,w);return}g.delete(v),v.style.overflow=""};for(const v of x){const w=v.lane?` rotate(${v.dx>0?el:-el}deg)`:"";v.el.style.transition="none",v.el.style.transform=`translate(${v.dx}px, ${v.dy}px)${w}`,v.lane&&(v.el.style.zIndex="10",p(v.el.closest("[data-lane-scroll]")))}let b=0;const m=[],y=requestAnimationFrame(()=>{for(const v of x){const w=v.lane?b++*lm:0;v.el.style.transition=`transform ${Ji}ms ${om} ${w}ms`,v.el.style.transform="",m.push(window.setTimeout(()=>{v.el.style.transition="",v.el.style.transform="",v.el.style.zIndex="",v.lane&&k(v.el.closest("[data-lane-scroll]"))},Ji+w+30))}});return()=>{cancelAnimationFrame(y);for(const v of m)clearTimeout(v);for(const v of x)v.el.style.transition="",v.el.style.transform="",v.el.style.zIndex="",v.lane&&k(v.el.closest("[data-lane-scroll]"))}},[e,t,s,r])}function dm(t,e=[]){const s=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
85
-
86
- `)];if(e.length>0){const r=e.map(n=>{const a=n.merged?"merged":n.state??(n.draft?"draft":"open"),l=n.title?.trim()||`${n.repoOwner}/${n.repoName}`;return`- #${n.number} ${l} [${a}] ${n.url}`});s.push(["## Linked pull requests",...r].join(`
87
- `))}if(t.threads.length>0){const r=t.threads.map(n=>{const a=n.title?.trim()||"Untitled chat";return n.status?`- ${a} [${n.status}]`:`- ${a}`});s.push(["## Other chats on this task",...r].join(`
88
- `))}return s.join(`
89
-
90
- `)}const um=["overdue","today","week","none"],Kn=t=>typeof t=="string"&&t!==""?t:null;function fm(t){const e=Kn(t.priority),s=Kn(t.due),r=Kn(t.tags);return{layout:t.view==="list"?"list":"board",filters:{search:Kn(t.q)??"",assignee:Kn(t.assignee),priority:Xr.includes(e)?e:null,due:um.includes(s)?s:null,tags:r?r.split(",").filter(Boolean):[],project:Kn(t.repo)}}}function hm(t,e){return{view:e==="list"?"list":void 0,q:t.search===""?void 0:t.search,assignee:t.assignee??void 0,priority:t.priority??void 0,due:t.due??void 0,tags:t.tags.length>0?t.tags.join(","):void 0,repo:t.project??void 0}}function pm(t,e){const s=new Set(e.map(r=>r.id));return new Set([...t].filter(r=>s.has(r)))}function mm(){const t=D.c(16);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Eo(e),r=ol();let n;t[1]!==s?(n=fm(s),t[1]=s,t[2]=n):n=t[2];const{filters:a,layout:l}=n;let o;t[3]!==r?(o=(h,x)=>r({to:".",search:g=>({...g,...hm(h,x)}),replace:!0}),t[3]=r,t[4]=o):o=t[4];const c=o;let d;t[5]!==l||t[6]!==c?(d=h=>c(h,l),t[5]=l,t[6]=c,t[7]=d):d=t[7];let u;t[8]!==a||t[9]!==c?(u=h=>c(a,h),t[8]=a,t[9]=c,t[10]=u):u=t[10];let f;return t[11]!==a||t[12]!==l||t[13]!==d||t[14]!==u?(f={filters:a,layout:l,setFilters:d,setLayout:u},t[11]=a,t[12]=l,t[13]=d,t[14]=u,t[15]=f):f=t[15],f}Mo(()=>import("./route-DJ7DRiHo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190])).catch(()=>{});const gm=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function wo(t){const e=new Date(t),s=e.getTime()<Date.now();return{label:gm.format(e),overdue:s}}const Gt="inline-flex items-center gap-1 rounded-full border-[length:var(--border-hairline)] border-border px-2 py-0.5 text-xs font-medium text-muted-foreground",gr=12,xr="size-3.5",Ca=2;function xm(){const t=D.c(9),e=ee();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=M(Gt,"border-warning/50 text-warning"),t[0]=s):s=t[0];let r;t[1]!==e?(r=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=r):r=t[2];let n;t[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Zr,{size:gr}),t[3]=n):n=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==r||t[7]!==a?(l=i.jsxs("span",{className:s,title:r,children:[n,a]}),t[6]=r,t[7]=a,t[8]=l):l=t[8],l}function km(){const t=D.c(9),e=ee();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=M(Gt,"border-warning/50 text-warning"),t[0]=s):s=t[0];let r;t[1]!==e?(r=e("taskBoard.taskBoard.handedToHumanBadgeTitle"),t[1]=e,t[2]=r):r=t[2];let n;t[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Zr,{size:gr}),t[3]=n):n=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsYou"),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==r||t[7]!==a?(l=i.jsxs("span",{className:s,title:r,children:[n,a]}),t[6]=r,t[7]=a,t[8]=l):l=t[8],l}function bm(t){const e=D.c(20),{priority:s,onChange:r}=t,n=ee(),a=Xe[s];let l;e[0]!==a.labelKey||e[1]!==n?(l=n(a.labelKey),e[0]=a.labelKey,e[1]=n,e[2]=l):l=e[2];const o=l,c=a.icon;let d;e[3]!==a.iconClassName?(d=M(xr,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==o||e[7]!==d?(u=i.jsx(c,{className:d,"aria-label":o}),e[5]=a.icon,e[6]=o,e[7]=d,e[8]=u):u=e[8];const f=u;if(!r){let g;return e[9]!==f||e[10]!==o?(g=i.jsx(sa,{label:o,children:f}),e[9]=f,e[10]=o,e[11]=g):g=e[11],g}let h;e[12]!==r||e[13]!==s||e[14]!==n?(h=Xr.map(g=>{const p=Xe[g].icon;return i.jsxs(we,{onSelect:()=>r(g),className:M("gap-2",g===s&&"bg-accent"),children:[i.jsx(p,{size:gr,className:M("shrink-0",Xe[g].iconClassName)}),n(Xe[g].labelKey)]},g)}),e[12]=r,e[13]=s,e[14]=n,e[15]=h):h=e[15];let x;return e[16]!==f||e[17]!==o||e[18]!==h?(x=i.jsx(vo,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function vo(t){const e=D.c(8),{label:s,glyph:r,children:n}=t;let a;e[0]!==r||e[1]!==s?(a=i.jsx(Qe,{asChild:!0,children:i.jsx(ue,{variant:"ghost",size:"icon-sm",title:s,"aria-label":s,onClick:vm,onPointerDown:wm,className:"-m-1.5",children:r})}),e[0]=r,e[1]=s,e[2]=a):a=e[2];let l;e[3]!==n?(l=i.jsx(Ye,{align:"start",className:"w-36",onClick:ym,children:n}),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=i.jsxs(Ze,{children:[a,l]}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function ym(t){return t.stopPropagation()}function wm(t){return t.stopPropagation()}function vm(t){return t.stopPropagation()}function sa(t){const e=D.c(7),{label:s,children:r}=t;let n;e[0]!==r?(n=i.jsx(sc,{asChild:!0,children:i.jsx("span",{className:"flex shrink-0 items-center",children:r})}),e[0]=r,e[1]=n):n=e[1];let a;e[2]!==s?(a=i.jsx(nc,{side:"top",children:s}),e[2]=s,e[3]=a):a=e[3];let l;return e[4]!==n||e[5]!==a?(l=i.jsxs(rc,{children:[n,a]}),e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function jm(t){const e=D.c(20),{type:s,onChange:r}=t,n=ee(),a=Et[s];let l;e[0]!==a.labelKey||e[1]!==n?(l=n(a.labelKey),e[0]=a.labelKey,e[1]=n,e[2]=l):l=e[2];const o=l,c=a.icon;let d;e[3]!==a.iconClassName?(d=M(xr,"shrink-0",a.iconClassName),e[3]=a.iconClassName,e[4]=d):d=e[4];let u;e[5]!==a.icon||e[6]!==o||e[7]!==d?(u=i.jsx(c,{className:d,"aria-label":o}),e[5]=a.icon,e[6]=o,e[7]=d,e[8]=u):u=e[8];const f=u;if(!r){let g;return e[9]!==f||e[10]!==o?(g=i.jsx(sa,{label:o,children:f}),e[9]=f,e[10]=o,e[11]=g):g=e[11],g}let h;e[12]!==r||e[13]!==n||e[14]!==s?(h=bl.map(g=>{const p=Et[g].icon;return i.jsxs(we,{onSelect:()=>r(g),className:M("gap-2",g===s&&"bg-accent"),children:[i.jsx(p,{size:gr,className:M("shrink-0",Et[g].iconClassName)}),n(Et[g].labelKey)]},g)}),e[12]=r,e[13]=n,e[14]=s,e[15]=h):h=e[15];let x;return e[16]!==f||e[17]!==o||e[18]!==h?(x=i.jsx(vo,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function Sm(t){const e=D.c(46),{iso:s,onChange:r}=t;let n;e[0]!==s?(n=Lc(s),e[0]=s,e[1]=n):n=e[1];const a=n;let l;e[2]!==s?(l=wo(s),e[2]=s,e[3]=l):l=e[3];const{label:o}=l;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Yr,{className:xr}),e[4]=c):c=e[4];let d;e[5]!==o?(d=i.jsxs(i.Fragment,{children:[c,o]}),e[5]=o,e[6]=d):d=e[6];const u=d;let f,h,x,g,p,k,b,m,y,v;if(e[7]!==u||e[8]!==r||e[9]!==a){p=Symbol.for("react.early_return_sentinel");e:{const R=M("shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums text-muted-foreground/70",a==="overdue"&&"text-destructive",a==="soon"&&"text-warning");if(!r){p=i.jsx("span",{className:M("flex",R),children:u});break e}x=Ze,h=Qe,g=!0,f=ue,k="ghost",b="sm",m=Nm,y=Cm,v=M("-mx-1.5 h-auto px-1.5 py-1 font-medium",R)}e[7]=u,e[8]=r,e[9]=a,e[10]=f,e[11]=h,e[12]=x,e[13]=g,e[14]=p,e[15]=k,e[16]=b,e[17]=m,e[18]=y,e[19]=v}else f=e[10],h=e[11],x=e[12],g=e[13],p=e[14],k=e[15],b=e[16],m=e[17],y=e[18],v=e[19];if(p!==Symbol.for("react.early_return_sentinel"))return p;let w;e[20]!==f||e[21]!==u||e[22]!==k||e[23]!==b||e[24]!==m||e[25]!==y||e[26]!==v?(w=i.jsx(f,{variant:k,size:b,onClick:m,onPointerDown:y,className:v,children:u}),e[20]=f,e[21]=u,e[22]=k,e[23]=b,e[24]=m,e[25]=y,e[26]=v,e[27]=w):w=e[27];let j;e[28]!==h||e[29]!==g||e[30]!==w?(j=i.jsx(h,{asChild:g,children:w}),e[28]=h,e[29]=g,e[30]=w,e[31]=j):j=e[31];let S;e[32]!==s?(S=new Date(s),e[32]=s,e[33]=S):S=e[33];let T;e[34]!==s?(T=new Date(s),e[34]=s,e[35]=T):T=e[35];let N;e[36]!==r?(N=R=>R&&r(hi(R)),e[36]=r,e[37]=N):N=e[37];let A;e[38]!==S||e[39]!==T||e[40]!==N?(A=i.jsx(Ye,{align:"start",className:"w-auto p-0",onClick:Tm,children:i.jsx(Ka,{mode:"single",selected:S,defaultMonth:T,onSelect:N,initialFocus:!0})}),e[38]=S,e[39]=T,e[40]=N,e[41]=A):A=e[41];let $;return e[42]!==x||e[43]!==j||e[44]!==A?($=i.jsxs(x,{children:[j,A]}),e[42]=x,e[43]=j,e[44]=A,e[45]=$):$=e[45],$}function Tm(t){return t.stopPropagation()}function Cm(t){return t.stopPropagation()}function Nm(t){return t.stopPropagation()}function _m(t){const e=D.c(8),{action:s}=t;let r;e[0]!==s?(r=l=>{l.stopPropagation(),s.onClick()},e[0]=s,e[1]=r):r=e[1];let n;e[2]!==s.icon?(n=i.jsx(s.icon,{className:xr}),e[2]=s.icon,e[3]=n):n=e[3];let a;return e[4]!==s.label||e[5]!==r||e[6]!==n?(a=i.jsxs(ue,{variant:"outline",size:"sm",onClick:r,onPointerDown:Am,ref:Bm,className:"absolute -top-0.5 right-0 h-6 gap-1.5 rounded-full px-2 text-xs font-medium shadow-sm pointer-events-none opacity-0 transition-opacity focus-visible:pointer-events-auto focus-visible:opacity-100 group-hover:pointer-events-auto group-hover:opacity-100",children:[n,s.label]}),e[4]=s.label,e[5]=r,e[6]=n,e[7]=a):a=e[7],a}function Bm(t){return t?.parentElement?.style.setProperty("--fade-text-end",`${t.offsetWidth}px`)}function Am(t){return t.stopPropagation()}function Dm(t){const e=D.c(36),{item:s,checks:r,assignee:n,assignedBy:a,members:l,onAssign:o,onPriorityChange:c,onTypeChange:d,onDueDateChange:u}=t,{org:f}=Je();let h;e[0]!==s.keySeq||e[1]!==f.slug?(h=ml(f.slug,s.keySeq),e[0]=s.keySeq,e[1]=f.slug,e[2]=h):h=e[2];const x=h;let g;e[3]!==s.type||e[4]!==d?(g=i.jsx(jm,{type:s.type,onChange:d}),e[3]=s.type,e[4]=d,e[5]=g):g=e[5];let p;e[6]!==x?(p=i.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground/70",children:x}),e[6]=x,e[7]=p):p=e[7];let k;e[8]!==g||e[9]!==p?(k=i.jsxs("span",{className:"flex shrink-0 items-center gap-1.5",children:[g,p]}),e[8]=g,e[9]=p,e[10]=k):k=e[10];let b;e[11]!==s.dueDate||e[12]!==u?(b=s.dueDate&&i.jsx(Sm,{iso:s.dueDate,onChange:u}),e[11]=s.dueDate,e[12]=u,e[13]=b):b=e[13];let m;e[14]!==k||e[15]!==b?(m=i.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[k,b]}),e[14]=k,e[15]=b,e[16]=m):m=e[16];let y;e[17]!==s.priority||e[18]!==c?(y=(s.priority!=="none"||c)&&i.jsx(bm,{priority:s.priority,onChange:c}),e[17]=s.priority,e[18]=c,e[19]=y):y=e[19];let v;e[20]!==r||e[21]!==s.reviewVerdicts?(v=r&&i.jsx(Em,{summary:r.summary,verdicts:s.reviewVerdicts,enabled:r.enabled}),e[20]=r,e[21]=s.reviewVerdicts,e[22]=v):v=e[22];let w;e[23]!==a||e[24]!==n||e[25]!==s||e[26]!==l||e[27]!==o?(w=i.jsx(So,{item:s,assignee:n,assignedBy:a,members:l,onAssign:o,showDelegation:!1}),e[23]=a,e[24]=n,e[25]=s,e[26]=l,e[27]=o,e[28]=w):w=e[28];let j;e[29]!==y||e[30]!==v||e[31]!==w?(j=i.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[y,v,w]}),e[29]=y,e[30]=v,e[31]=w,e[32]=j):j=e[32];let S;return e[33]!==j||e[34]!==m?(S=i.jsxs("div",{className:"mt-auto flex shrink-0 items-center justify-between gap-2 pt-1",children:[m,j]}),e[33]=j,e[34]=m,e[35]=S):S=e[35],S}function Rm(t){const e=D.c(10),{priority:s}=t,r=ee(),n=Xe[s];let a;e[0]!==n.labelKey||e[1]!==r?(a=r(n.labelKey),e[0]=n.labelKey,e[1]=r,e[2]=a):a=e[2];const l=a;let o;e[3]!==n.dotClassName?(o=M("size-2 shrink-0 rounded-full",n.dotClassName),e[3]=n.dotClassName,e[4]=o):o=e[4];let c;e[5]!==o?(c=i.jsx("span",{className:o}),e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==c?(d=i.jsxs("span",{className:Gt,title:l,children:[c,l]}),e[7]=l,e[8]=c,e[9]=d):d=e[9],d}function $m(t){const e=D.c(7),{iso:s}=t;let r,n;if(e[0]!==s){const{label:o,overdue:c}=wo(s);r=o,n=M(Gt,c&&"border-destructive/50 text-destructive"),e[0]=s,e[1]=r,e[2]=n}else r=e[1],n=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Yr,{size:gr}),e[3]=a):a=e[3];let l;return e[4]!==r||e[5]!==n?(l=i.jsxs("span",{className:n,children:[a,r]}),e[4]=r,e[5]=n,e[6]=l):l=e[6],l}function jo(t){const e=D.c(8),{tag:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=M(Gt,"text-foreground"),e[0]=r):r=e[0];let n;e[1]!==s.color?(n=pr(s.color),e[1]=s.color,e[2]=n):n=e[2];let a;e[3]!==n?(a={borderColor:n},e[3]=n,e[4]=a):a=e[4];let l;return e[5]!==a||e[6]!==s.name?(l=i.jsx("span",{className:r,style:a,children:s.name}),e[5]=a,e[6]=s.name,e[7]=l):l=e[7],l}function Em(t){const e=D.c(26),{summary:s,verdicts:r,enabled:n}=t,a=ee();let l;if(e[0]!==n||e[1]!==a||e[2]!==r){let y;e[4]!==a||e[5]!==r?(y=v=>{const w=r.find(T=>T.reviewer===v),j=a("taskBoard.taskDialog.reviewerLabel"),S=w?w.verdict==="changes_requested"?a("taskBoard.taskBoard.checksChangesRequested"):a(w.verified?"taskBoard.taskBoard.checksApproved":"taskBoard.taskBoard.checksUnverified"):a("taskBoard.taskBoard.checksPending");return i.jsxs("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[i.jsx(ei,{size:12}),j," — ",S]},v)},e[4]=a,e[5]=r,e[6]=y):y=e[6],l=n.map(y),e[0]=n,e[1]=a,e[2]=r,e[3]=l}else l=e[3];let o;e[7]!==l?(o=i.jsx("span",{className:"flex flex-col gap-0.5",children:l}),e[7]=l,e[8]=o):o=e[8];const c=o,d=s.tone==="ok"&&"text-success",u=s.tone==="pending"&&"text-warning",f=s.tone==="danger"&&"text-destructive";let h;e[9]!==d||e[10]!==u||e[11]!==f?(h=M("flex shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums",d,u,f),e[9]=d,e[10]=u,e[11]=f,e[12]=h):h=e[12];const x=String(s.passed),g=String(s.total);let p;e[13]!==a||e[14]!==x||e[15]!==g?(p=a("taskBoard.taskBoard.checksLabel",{passed:x,total:g}),e[13]=a,e[14]=x,e[15]=g,e[16]=p):p=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=i.jsx(Xn,{className:xr}),e[17]=k):k=e[17];let b;e[18]!==s.passed||e[19]!==s.total||e[20]!==h||e[21]!==p?(b=i.jsxs("span",{className:h,"aria-label":p,children:[k,s.passed,"/",s.total]}),e[18]=s.passed,e[19]=s.total,e[20]=h,e[21]=p,e[22]=b):b=e[22];let m;return e[23]!==c||e[24]!==b?(m=i.jsx(sa,{label:c,children:b}),e[23]=c,e[24]=b,e[25]=m):m=e[25],m}function Mm(t){const e=D.c(14),{state:s}=t,r=ee(),n=s==="running",a=n?"taskBoard.taskBoard.agentRunning":"taskBoard.taskBoard.agentFailed";let l;e[0]!==r||e[1]!==a?(l=r(a),e[0]=r,e[1]=a,e[2]=l):l=e[2];const o=l;let c;e[3]!==o||e[4]!==n?(c=n?i.jsx(Tt,{className:"size-3.5 text-primary",label:o}):i.jsx(zo,{size:14,className:"shrink-0 text-destructive","aria-label":o}),e[3]=o,e[4]=n,e[5]=c):c=e[5];let d;e[6]!==o||e[7]!==c?(d=i.jsx(sa,{label:o,children:c}),e[6]=o,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==o?(u=i.jsx("span",{className:"sr-only",children:o}),e[9]=o,e[10]=u):u=e[10];let f;return e[11]!==d||e[12]!==u?(f=i.jsxs("span",{className:"mt-px flex shrink-0 items-center",children:[d,u]}),e[11]=d,e[12]=u,e[13]=f):f=e[13],f}function Im(t){const e=D.c(3),s=ho(vl());if(t.reviewVerdicts.length===0&&t.status!=="in_review"&&!t.reviewCycleStartedAt)return null;const r=Qh(t.reviewVerdicts,s);let n;return e[0]!==s||e[1]!==r?(n=r?{summary:r,enabled:s}:null,e[0]=s,e[1]=r,e[2]=n):n=e[2],n}function So(t){const e=D.c(35),{item:s,assignee:r,assignedBy:n,members:a,onAssign:l,showDelegation:o}=t,c=o===void 0?!0:o,d=ee(),[u,f]=L.useState(!1);if(s.assigneeId===Re){let v;e[0]!==n||e[1]!==d?(v=n?.user?.name?d("taskBoard.taskBoard.assignedToSuperAgentBy",{name:n.user.name}):d("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=n,e[1]=d,e[2]=v):v=e[2];const w=v;if(!c){let N;return e[3]!==n||e[4]!==w?(N=n?i.jsx(Ke,{url:n.user?.image??void 0,fallback:Ue(n.user?.name),shape:"circle",size:"xs",title:w}):null,e[3]=n,e[4]=w,e[5]=N):N=e[5],N}let j;e[6]!==n?(j=n&&i.jsx(Ke,{url:n.user?.image??void 0,fallback:Ue(n.user?.name),shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[6]=n,e[7]=j):j=e[7];let S;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=i.jsx(jt,{size:20,className:"ring-2 ring-background"}),e[8]=S):S=e[8];let T;return e[9]!==j||e[10]!==w?(T=i.jsxs("span",{className:"inline-flex items-center",title:w,children:[j,S]}),e[9]=j,e[10]=w,e[11]=T):T=e[11],T}if(r){const v=r.user?.image??void 0,w=r.user?.name;let j;e[12]!==w?(j=Ue(w),e[12]=w,e[13]=j):j=e[13];let S;return e[14]!==v||e[15]!==j?(S=i.jsx(Ke,{url:v,fallback:j,shape:"circle",size:"xs"}),e[14]=v,e[15]=j,e[16]=S):S=e[16],S}if(!l||!a?.length)return null;let h;e[17]!==d?(h=d("taskBoard.taskBoard.assignButton"),e[17]=d,e[18]=h):h=e[18];let x;e[19]!==d?(x=d("taskBoard.taskBoard.assignButton"),e[19]=d,e[20]=x):x=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{v.stopPropagation(),f(!0)},e[21]=g):g=e[21];let p;e[22]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(ul,{size:13}),e[22]=p):p=e[22];let k;e[23]!==h||e[24]!==x?(k=i.jsx(lr,{asChild:!0,children:i.jsx("button",{type:"button",title:h,"aria-label":x,onClick:g,className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 transition-colors hover:border-muted-foreground hover:text-muted-foreground",children:p})}),e[23]=h,e[24]=x,e[25]=k):k=e[25];let b;e[26]!==l?(b=v=>{l(v),f(!1)},e[26]=l,e[27]=b):b=e[27];let m;e[28]!==a||e[29]!==b?(m=i.jsx(Ir,{className:"w-56 p-0",align:"end",side:"bottom",onClick:zm,children:i.jsx(fi,{members:a,onSelect:b})}),e[28]=a,e[29]=b,e[30]=m):m=e[30];let y;return e[31]!==u||e[32]!==k||e[33]!==m?(y=i.jsxs(zr,{open:u,onOpenChange:f,children:[k,m]}),e[31]=u,e[32]=k,e[33]=m,e[34]=y):y=e[34],y}function zm(t){return t.stopPropagation()}function kg(){const t=D.c(105),e=ee(),{items:s,isLoading:r}=jc(),{data:n}=qa();let a;t[0]!==n?(a=n===void 0?[]:n,t[0]=n,t[1]=a):a=t[1];const l=a,o=Sc(),c=zl();let d,u;if(t[2]!==c.data){const C=(c.data??[]).filter(Zm);d=C.length>0,u=C.map(Ym),t[2]=c.data,t[3]=d,t[4]=u}else d=t[3],u=t[4];const f=u,[h,x]=L.useState(!1);let g;t[5]!==d?(g=C=>C===Re&&!d?(x(!0),!0):!1,t[5]=d,t[6]=g):g=t[6];const p=g,[k,b]=L.useState(null),m=C=>{const z=uu(C);if(z){b(z),mi("task_limit_banner_shown",{organization_id:Te.id,kind:z});return}Ve.error(C.message||e("taskBoard.taskBoard.actionError"))},y=C=>{!C||C.dataset.tracked==="true"||(C.dataset.tracked="true",mi("task_board_opened",{organization_id:Te.id}))};let v;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=[],t[7]=v):v=t[7];const[w,j]=L.useState(v),S=()=>{if(w.length!==0){if(p(Re)){j([]);return}for(const C of w)o.rerun.mutate({id:C.id},{onError:z=>m(z)});j([]),te()}},{data:T}=Fa();let N,A;t[8]!==T?.data?.members?(N=T?.data?.members??[],A=new Map(N.map(Qm)),t[8]=T?.data?.members,t[9]=N,t[10]=A):(N=t[9],A=t[10]);const $=A,{filters:R,setFilters:E,layout:F,setLayout:P}=mm(),I=po(s,f);let G;t[11]!==I?(G=hl(I),t[11]=I,t[12]=G):G=t[12];const O=G;let V;t[13]!==R.project||t[14]!==I?(V=R.project?pl(R.project,I)?.repo??null:null,t[13]=R.project,t[14]=I,t[15]=V):V=t[15];const K=V,[H]=cl();let Y;t[16]===Symbol.for("react.memo_cache_sentinel")?(Y=new Set,t[16]=Y):Y=t[16];const[W,Z]=L.useState(Y);let q;t[17]===Symbol.for("react.memo_cache_sentinel")?(q=C=>Z(z=>{const me=new Set(z);return me.has(C)?me.delete(C):me.add(C),me}),t[17]=q):q=t[17];const ne=q,ae=C=>Z(z=>{const me=new Set(z);for(const De of $e)De.status===C&&me.add(De.id);return me}),te=()=>Z(new Set),oe=C=>{E(C),te()},[ce,_e]=L.useState(!1),[Ae,he]=L.useState(null),{setTaskId:ge}=hu(),{create:ke}=Yd(),xe=Mt(),{org:Be,locator:Se}=Je(),Te=Be,J=ol(),pe=()=>{J({to:"/$org/settings/task-board",params:{org:Te.slug}})};let U;t[18]===Symbol.for("react.memo_cache_sentinel")?(U={strict:!1},t[18]=U):U=t[18];const{taskKey:be}=ll(U),_=Tc(s,be)??null,se=!!be&&!_&&!r,X=_?ki(Te.slug,_):null;let de;t[19]!==J||t[20]!==be?(de=()=>{be&&J({to:".",params:Vm,search:Gm,replace:!0})},t[19]=J,t[20]=be,t[21]=de):de=t[21];const ie=de,Ie=async C=>{const z=crypto.randomUUID(),me=Io(Te.id).id,De=await xe.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:C.id}).then(Wm).catch(Km),He=dm(C,De),Ge={type:"doc",content:[{type:"paragraph",content:[jd({id:C.id,name:C.title,char:"@",kind:"task",metadata:{title:C.title,description:C.description,context:He}}),{type:"text",text:" "}]}]};fu(sessionStorage,Se,z,Ge);try{await ke({id:z,virtual_mcp_id:me}),await o.link.mutateAsync({id:C.id,linkThreadId:z})}catch{}ge(z,me)};let ve;t[22]!==R||t[23]!==I?(ve=C=>Mc(C,R,I),t[22]=R,t[23]=I,t[24]=ve):ve=t[24];const $e=s.filter(ve),Ce=pm(W,$e);let it;t[25]!==H?(it=C=>!Ic.includes(C.status)||H.shownTaskBoardLanes.includes(C.status),t[25]=H,t[26]=it):it=t[26];const er=$e.filter(it);let Oe;t[27]!==R||t[28]!==I||t[29]!==E?(Oe=C=>{const z=zc({repo:C},R.project,I);z!==R.project&&E({...R,project:z})},t[27]=R,t[28]=I,t[29]=E,t[30]=Oe):Oe=t[30];const je=Oe;let Vt;t[31]===Symbol.for("react.memo_cache_sentinel")?(Vt=()=>{he(null),_e(!0)},t[31]=Vt):Vt=t[31];const tr=Vt;let It;t[32]===Symbol.for("react.memo_cache_sentinel")?(It=C=>{he(C),_e(!0)},t[32]=It):It=t[32];const sr=It,nr=C=>{J({to:".",params:z=>({...z,taskKey:ki(Te.slug,C)}),search:Um})};let Ct;t[33]===Symbol.for("react.memo_cache_sentinel")?(Ct=()=>{_e(!1),he(null)},t[33]=Ct):Ct=t[33];const lt=Ct;if(r&&s.length===0){let C;return t[34]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx(Tt,{className:"size-5 text-muted-foreground"})}),t[34]=C):C=t[34],C}if(se){let C;return t[35]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(pi,{to:".",params:qm,search:Hm,replace:!0}),t[35]=C):C=t[35],C}if(X&&X!==be)return i.jsx(pi,{to:".",params:C=>({...C,taskKey:X}),search:Fm,replace:!0});let ot;t[36]!==e?(ot=e("taskBoard.taskBoard.tasksTitle"),t[36]=e,t[37]=ot):ot=t[37];let et;t[38]!==ot?(et=i.jsx("h1",{className:"text-xl font-medium text-foreground",children:ot}),t[38]=ot,t[39]=et):et=t[39];let ut;t[40]!==e?(ut=e("common.taskBoard.listView"),t[40]=e,t[41]=ut):ut=t[41];const zt=F==="board";let We;t[42]!==P?(We=()=>P("board"),t[42]=P,t[43]=We):We=t[43];let Le;t[44]!==e?(Le=e("common.taskBoard.boardView"),t[44]=e,t[45]=Le):Le=t[45];let Lt;t[46]!==zt||t[47]!==We||t[48]!==Le?(Lt=i.jsx(tl,{active:zt,onClick:We,icon:gc,label:Le}),t[46]=zt,t[47]=We,t[48]=Le,t[49]=Lt):Lt=t[49];let ft;t[50]===Symbol.for("react.memo_cache_sentinel")?(ft=i.jsx(cr,{size:16}),t[50]=ft):ft=t[50];let ze;t[51]!==e?(ze=e("taskBoard.taskBoard.newTask"),t[51]=e,t[52]=ze):ze=t[52];let ht;t[53]!==ze?(ht=i.jsxs(ue,{size:"sm",onClick:tr,children:[ft,ze]}),t[53]=ze,t[54]=ht):ht=t[54];const Q=i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[et,i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"sm:hidden",children:i.jsx(Cc,{filters:R,members:N,tags:l,index:I,onChange:oe,onOpenBoardSettings:pe})}),i.jsx("div",{className:"hidden sm:block",children:i.jsx(Nc,{filters:R,members:N,tags:l,index:I,onChange:oe,onOpenBoardSettings:pe})})]}),i.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[i.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[i.jsx(tl,{active:F==="list",onClick:()=>{P("list"),te()},icon:fl,label:ut}),Lt]}),ht]})]})]}),s.length===0?i.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:i.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:e("taskBoard.taskBoard.noTasksYet")})}):$e.length===0?i.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:i.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:[e("taskBoard.taskBoard.noTasksMatch"),i.jsx(ue,{variant:"outline",size:"sm",onClick:()=>oe(Dc),children:e("taskBoard.taskBoard.clearFilters")})]})}):F==="board"?i.jsx(Jm,{visible:!_,items:$e,members:N,memberByUserId:$,selectedIds:Ce,onToggleSelect:ne,onSelectAllInLane:ae,onOpen:nr,onCreate:sr,onMove:(C,z,me)=>{const De=wl(me,C.length);C.forEach((He,Ge)=>o.update.mutate({id:He,status:z,sortOrder:De[Ge]}))},onAssign:(C,z)=>{p(z)||o.update.mutate({id:C,assigneeId:z},{onError:m})},onPriorityChange:(C,z)=>o.update.mutate({id:C,priority:z}),onTypeChange:(C,z)=>o.update.mutate({id:C,type:z}),onDueDateChange:(C,z)=>o.update.mutate({id:C,dueDate:z}),onAutoFix:C=>{p(Re)||o.update.mutate({id:C.id,assigneeId:Re},{onError:m})},onRerun:C=>j([C])}):i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:i.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:er.map(C=>i.jsx(d1,{item:C,assignee:C.assigneeId?$.get(C.assigneeId):void 0,assignedBy:C.assignedBy?$.get(C.assignedBy):void 0,onOpen:()=>nr(C)},C.id))})})]});let pt;t[55]!==o.create||t[56]!==o.remove||t[57]!==o.update||t[58]!==p||t[59]!==ie||t[60]!==m||t[61]!==_||t[62]!==j||t[63]!==ge||t[64]!==Ie||t[65]!==e||t[66]!==je?(pt=_&&i.jsx(Dp,{item:_,onClose:()=>ie(),isSaving:o.update.isPending,onSubmit:C=>{if(p(C.assigneeId)){ie();return}const{title:z,description:me,priority:De,...He}=C,Ge=_l(_)?{}:{title:z,description:me,priority:De};o.update.mutate({id:_.id,...He,...Ge},{onError:m})},onDelete:()=>{o.remove.mutate(_.id),ie()},onClone:()=>{o.create.mutate({title:e("taskBoard.taskDialog.cloneTitle",{title:_.title}),description:_.description,status:_.status,priority:_.priority,repo:_.repo,dueDate:_.dueDate,tagIds:_.tags.map(Om)}),je(_.repo??null),Ve.success(e("taskBoard.taskDialog.cloneSuccess")),ie()},onArchive:()=>{o.update.mutate({id:_.id,status:"archived"}),Ve.success(e("taskBoard.taskDialog.archiveSuccess")),ie()},onNewChat:()=>{Ie(_)},onAutoFix:()=>{p(Re)||(o.update.mutate({id:_.id,assigneeId:Re},{onError:m}),ie())},onRerun:()=>{ie(),j([_])},onOpenPreview:C=>{C.virtualMcpId&&ge(C.threadId,C.virtualMcpId,{panel:"site-editor"})}},_.id),t[55]=o.create,t[56]=o.remove,t[57]=o.update,t[58]=p,t[59]=ie,t[60]=m,t[61]=_,t[62]=j,t[63]=ge,t[64]=Ie,t[65]=e,t[66]=je,t[67]=pt):pt=t[67];const Pe=ce?`new-${Ae??"default"}`:"closed",Nt=Ae??void 0;let mt;t[68]!==o.create||t[69]!==p||t[70]!==lt||t[71]!==je?(mt=C=>{if(p(C.assigneeId)){lt();return}o.create.mutate(C),je(C.repo??null),lt()},t[68]=o.create,t[69]=p,t[70]=lt,t[71]=je,t[72]=mt):mt=t[72];let gt;t[73]!==o.create.isPending||t[74]!==K||t[75]!==lt||t[76]!==ce||t[77]!==Pe||t[78]!==Nt||t[79]!==mt?(gt=i.jsx(Ap,{open:ce,onClose:lt,defaultStatus:Nt,defaultRepo:K,isSaving:o.create.isPending,onSubmit:mt},Pe),t[73]=o.create.isPending,t[74]=K,t[75]=lt,t[76]=ce,t[77]=Pe,t[78]=Nt,t[79]=mt,t[80]=gt):gt=t[80];let Me;t[81]!==h?(Me=i.jsx(Pc,{mode:"link",open:h,onOpenChange:x}),t[81]=h,t[82]=Me):Me=t[82];let xt;t[83]===Symbol.for("react.memo_cache_sentinel")?(xt=C=>!C&&b(null),t[83]=xt):xt=t[83];let _t;t[84]!==k?(_t=i.jsx(nm,{kind:k,onOpenChange:xt}),t[84]=k,t[85]=_t):_t=t[85];let tt;t[86]!==j?(tt=C=>!C&&j([]),t[86]=j,t[87]=tt):tt=t[87];let Bt;t[88]!==o.rerun.isPending||t[89]!==S||t[90]!==w||t[91]!==tt?(Bt=i.jsx(im,{items:w,pending:o.rerun.isPending,onOpenChange:tt,onConfirm:S}),t[88]=o.rerun.isPending,t[89]=S,t[90]=w,t[91]=tt,t[92]=Bt):Bt=t[92];let kt;return t[93]!==o.removeMany||t[94]!==o.update||t[95]!==p||t[96]!==te||t[97]!==s||t[98]!==N||t[99]!==m||t[100]!==_||t[101]!==O||t[102]!==Ce||t[103]!==j?(kt=Ce.size>0&&!_&&i.jsx(Xm,{count:Ce.size,members:N,projectEntries:O,onSetRepo:C=>{for(const z of Ce)o.update.mutate({id:z,repo:C});te()},onMoveTo:C=>{for(const z of Ce)o.update.mutate({id:z,status:C});te()},onSetPriority:C=>{for(const z of Ce)o.update.mutate({id:z,priority:C});te()},onAddTag:C=>{for(const z of Ce){const me=s.find(He=>He.id===z);if(!me)continue;const De=me.tags.map(Pm);De.includes(C)||o.update.mutate({id:z,tagIds:[...De,C]})}te()},onAssign:C=>{if(!p(C)){for(const z of Ce)o.update.mutate({id:z,assigneeId:C},{onError:m});te()}},onSetDueDate:C=>{const z=hi(C);for(const me of Ce)o.update.mutate({id:me,dueDate:z});te()},onAutoFix:Ce.size>0&&Array.from(Ce).every(C=>{const z=s.find(me=>me.id===C);return z&&(z.status==="triage"||z.status==="todo")&&z.assigneeId!==Re})?()=>{if(!p(Re)){for(const C of Ce)o.update.mutate({id:C,assigneeId:Re},{onError:m});te()}}:void 0,onRerun:(()=>{const C=Array.from(Ce).flatMap(z=>{const me=s.find(De=>De.id===z);return me?[me]:[]});return C.length===Ce.size&&C.every(Lm)?()=>j(C):void 0})(),onDelete:()=>{o.removeMany.mutate(Array.from(Ce)),te()},onClear:te}),t[93]=o.removeMany,t[94]=o.update,t[95]=p,t[96]=te,t[97]=s,t[98]=N,t[99]=m,t[100]=_,t[101]=O,t[102]=Ce,t[103]=j,t[104]=kt):kt=t[104],i.jsxs("div",{ref:y,className:"relative flex min-h-0 flex-1 flex-col",children:[i.jsx("div",{className:M("flex min-h-0 flex-1 flex-col",_&&"hidden"),children:Q}),pt,gt,Me,_t,Bt,kt]})}function Lm(t){return t.assigneeId===Re&&t.status!=="done"}function Pm(t){return t.id}function Om(t){return t.id}function Fm(t){return t}function Hm(t){return t}function qm(t){return{...t,taskKey:void 0}}function Um(t){return t}function Km(){return[]}function Wm(t){return t.prs}function Gm(t){return t}function Vm(t){return{...t,taskKey:void 0}}function Qm(t){return[t.userId,t]}function Ym(t){return t.path}function Zm(t){return t.usable}function Xm(t){const e=D.c(104),{count:s,members:r,projectEntries:n,onSetRepo:a,onMoveTo:l,onSetPriority:o,onAddTag:c,onAssign:d,onSetDueDate:u,onAutoFix:f,onRerun:h,onDelete:x,onClear:g}=t,p=ee(),{data:k}=qa();let b;e[0]!==k?(b=k===void 0?[]:k,e[0]=k,e[1]=b):b=e[1];const m=b,y=Ua("delivery_lanes_enabled");let v;e[2]!==s||e[3]!==p?(v=p("taskBoard.taskBoard.selectedCount",{count:s}),e[2]=s,e[3]=p,e[4]=v):v=e[4];let w;e[5]!==v?(w=i.jsx("span",{className:"pl-1 text-sm font-medium text-foreground",children:v}),e[5]=v,e[6]=w):w=e[6];let j;e[7]!==p?(j=p("taskBoard.taskBoard.actionsButton"),e[7]=p,e[8]=j):j=e[8];let S;e[9]!==j?(S=i.jsx(Qe,{asChild:!0,children:i.jsx("button",{type:"button",className:"flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:j})}),e[9]=j,e[10]=S):S=e[10];let T;e[11]!==p?(T=p("taskBoard.taskBoard.moveToButton"),e[11]=p,e[12]=T):T=e[12];let N;e[13]!==T?(N=i.jsx(Hn,{children:T}),e[13]=T,e[14]=N):N=e[14];let A;if(e[15]!==y||e[16]!==l||e[17]!==p){let J;e[19]!==l||e[20]!==p?(J=pe=>i.jsx(we,{onClick:()=>l(pe),children:dr(pe,p).label},pe),e[19]=l,e[20]=p,e[21]=J):J=e[21],A=kl(y).map(J),e[15]=y,e[16]=l,e[17]=p,e[18]=A}else A=e[18];let $;e[22]!==A?($=i.jsx(qn,{children:A}),e[22]=A,e[23]=$):$=e[23];let R;e[24]!==$||e[25]!==N?(R=i.jsxs(Fn,{children:[N,$]}),e[24]=$,e[25]=N,e[26]=R):R=e[26];let E;e[27]!==p?(E=p("taskBoard.taskBoard.changePriorityButton"),e[27]=p,e[28]=E):E=e[28];let F;e[29]!==E?(F=i.jsx(Hn,{children:E}),e[29]=E,e[30]=F):F=e[30];let P;e[31]!==o||e[32]!==p?(P=Xr.map(J=>i.jsxs(we,{onClick:()=>o(J),children:[i.jsx("span",{className:M("size-2 rounded-full",Xe[J].dotClassName)}),p(Xe[J].labelKey)]},J)),e[31]=o,e[32]=p,e[33]=P):P=e[33];let I;e[34]!==P?(I=i.jsx(qn,{children:P}),e[34]=P,e[35]=I):I=e[35];let G;e[36]!==F||e[37]!==I?(G=i.jsxs(Fn,{children:[F,I]}),e[36]=F,e[37]=I,e[38]=G):G=e[38];let O;e[39]!==p?(O=p("taskBoard.taskBoard.assignButton"),e[39]=p,e[40]=O):O=e[40];let V;e[41]!==O?(V=i.jsx(Hn,{children:O}),e[41]=O,e[42]=V):V=e[42];let K;e[43]!==r||e[44]!==d?(K=i.jsx(qn,{className:"w-56 p-0",children:i.jsx(fi,{members:r,onSelect:d})}),e[43]=r,e[44]=d,e[45]=K):K=e[45];let H;e[46]!==V||e[47]!==K?(H=i.jsxs(Fn,{children:[V,K]}),e[46]=V,e[47]=K,e[48]=H):H=e[48];let Y;e[49]!==a||e[50]!==n||e[51]!==p?(Y=n.length>0&&i.jsxs(Fn,{children:[i.jsx(Hn,{children:p("taskBoard.taskBoard.assignProjectButton")}),i.jsxs(qn,{className:"w-64",children:[i.jsx(we,{onClick:()=>a(null),children:p("taskBoard.taskDialog.noProject")}),n.map(J=>i.jsx(we,{className:"gap-2",onClick:()=>a(J.repo),children:i.jsx(yl,{entry:J})},J.id))]})]}),e[49]=a,e[50]=n,e[51]=p,e[52]=Y):Y=e[52];let W;e[53]!==p?(W=p("taskBoard.taskBoard.dueDateButton"),e[53]=p,e[54]=W):W=e[54];let Z;e[55]!==W?(Z=i.jsx(Hn,{children:W}),e[55]=W,e[56]=Z):Z=e[56];let q;e[57]!==u?(q=i.jsx(qn,{className:"w-auto p-0",children:i.jsx(Ka,{mode:"single",onSelect:J=>J&&u(J),initialFocus:!0})}),e[57]=u,e[58]=q):q=e[58];let ne;e[59]!==Z||e[60]!==q?(ne=i.jsxs(Fn,{children:[Z,q]}),e[59]=Z,e[60]=q,e[61]=ne):ne=e[61];let ae;e[62]!==c||e[63]!==m||e[64]!==p?(ae=m.length>0&&i.jsxs(Fn,{children:[i.jsx(Hn,{children:p("taskBoard.taskBoard.addTagButton")}),i.jsx(qn,{children:m.map(J=>i.jsxs(we,{onClick:()=>c(J.id),children:[i.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:pr(J.color)}}),J.name]},J.id))})]}),e[62]=c,e[63]=m,e[64]=p,e[65]=ae):ae=e[65];let te;e[66]===Symbol.for("react.memo_cache_sentinel")?(te=i.jsx(Oa,{}),e[66]=te):te=e[66];let oe;e[67]!==p?(oe=p("taskBoard.taskBoard.deleteSelectedButton"),e[67]=p,e[68]=oe):oe=e[68];let ce;e[69]!==x||e[70]!==oe?(ce=i.jsx(we,{variant:"destructive",onClick:x,children:oe}),e[69]=x,e[70]=oe,e[71]=ce):ce=e[71];let _e;e[72]!==R||e[73]!==G||e[74]!==H||e[75]!==Y||e[76]!==ne||e[77]!==ae||e[78]!==ce?(_e=i.jsxs(Ye,{align:"center",side:"top",children:[R,G,H,Y,ne,ae,te,ce]}),e[72]=R,e[73]=G,e[74]=H,e[75]=Y,e[76]=ne,e[77]=ae,e[78]=ce,e[79]=_e):_e=e[79];let Ae;e[80]!==_e||e[81]!==S?(Ae=i.jsxs(Ze,{children:[S,_e]}),e[80]=_e,e[81]=S,e[82]=Ae):Ae=e[82];let he;e[83]!==f||e[84]!==p?(he=f&&i.jsxs("button",{type:"button",onClick:f,className:"flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:[i.jsx(za,{size:14}),p("taskBoard.taskBoard.autoFix")]}),e[83]=f,e[84]=p,e[85]=he):he=e[85];let ge;e[86]!==h||e[87]!==p?(ge=h&&i.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-sm font-medium text-foreground transition-colors hover:bg-accent",children:[i.jsx(Qr,{size:14}),p("taskBoard.taskBoard.rerun")]}),e[86]=h,e[87]=p,e[88]=ge):ge=e[88];let ke;e[89]!==p?(ke=p("taskBoard.taskBoard.clearSelectionButton"),e[89]=p,e[90]=ke):ke=e[90];let xe;e[91]!==p?(xe=p("taskBoard.taskBoard.clearSelectionButton"),e[91]=p,e[92]=xe):xe=e[92];let Be;e[93]===Symbol.for("react.memo_cache_sentinel")?(Be=i.jsx(Yn,{size:16}),e[93]=Be):Be=e[93];let Se;e[94]!==g||e[95]!==ke||e[96]!==xe?(Se=i.jsx("button",{type:"button","aria-label":ke,title:xe,onClick:g,className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:Be}),e[94]=g,e[95]=ke,e[96]=xe,e[97]=Se):Se=e[97];let Te;return e[98]!==Ae||e[99]!==he||e[100]!==ge||e[101]!==Se||e[102]!==w?(Te=i.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center",children:i.jsxs("div",{className:"pointer-events-auto flex items-center gap-2 rounded-full bg-background px-3 py-2 card-shadow",children:[w,Ae,he,ge,Se]})}),e[98]=Ae,e[99]=he,e[100]=ge,e[101]=Se,e[102]=w,e[103]=Te):Te=e[103],Te}function tl(t){const e=D.c(14),{active:s,onClick:r,icon:n,label:a}=t,l=ee();let o;e[0]!==a||e[1]!==l?(o=l("taskBoard.taskBoard.layoutViewAriaLabel",{label:a}),e[0]=a,e[1]=l,e[2]=o):o=e[2];const c=s?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[3]!==c?(d=M("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",c),e[3]=c,e[4]=d):d=e[4];let u;e[5]!==n?(u=i.jsx(n,{size:14}),e[5]=n,e[6]=u):u=e[6];let f;return e[7]!==s||e[8]!==a||e[9]!==r||e[10]!==o||e[11]!==d||e[12]!==u?(f=i.jsxs("button",{type:"button",onClick:r,"aria-label":o,"aria-pressed":s,className:d,children:[u,a]}),e[7]=s,e[8]=a,e[9]=r,e[10]=o,e[11]=d,e[12]=u,e[13]=f):f=e[13],f}function sl(t,e){return t.sortOrder-e.sortOrder}function Jm(t){const e=D.c(21),{items:s,members:r,memberByUserId:n,selectedIds:a,onToggleSelect:l,onSelectAllInLane:o,onOpen:c,onCreate:d,onMove:u,onAutoFix:f,onRerun:h,onAssign:x,onPriorityChange:g,onTypeChange:p,onDueDateChange:k,visible:b}=t,m=Ua("delivery_lanes_enabled"),[y,v]=L.useState(null);let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=[],e[0]=w):w=e[0];const[j,S]=L.useState(w);let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T=new Map,e[1]=T):T=e[1];const[N,A]=L.useState(T),[$,R]=cl(),E=L.useRef(null);let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=_=>{if(E.current=_,!_)return;const se=X=>{if(X.deltaX!==0||X.deltaY===0||_.scrollWidth<=_.clientWidth)return;for(let ie=X.target;ie&&ie!==_;ie=ie.parentElement)if(ie.hasAttribute("data-lane-scroll"))return;X.preventDefault();const de=X.deltaMode===1?16:X.deltaMode===2?_.clientWidth:1;_.scrollLeft=_.scrollLeft+X.deltaY*de};return _.addEventListener("wheel",se,{passive:!1}),()=>{E.current=null,_.removeEventListener("wheel",se)}},e[2]=F):F=e[2];const P=F,I=N.size>0?s.map(_=>{const se=N.get(_.id);return se?{..._,...se}:_}):s;if(N.size>0&&!y){const _=[...N].filter(se=>{const[X,de]=se,ie=s.find(Ie=>Ie.id===X);return ie?.status===de.status&&ie.sortOrder===de.sortOrder});_.length>0&&A(se=>{const X=new Map(se);for(const[de]of _)X.delete(de);return X})}cm(E,I.map(r1).join(","),y===null,b);const G=_=>I.filter(se=>se.status===_).sort(sl),{lanes:O,hidden:V,hideable:K}=_c({deliveryEnabled:m,shownLanes:$.shownTaskBoardLanes,occupied:I.map(n1)});let H;e[3]!==R?(H=(_,se)=>R(X=>({...X,shownTaskBoardLanes:se?[...X.shownTaskBoardLanes,_]:X.shownTaskBoardLanes.filter(de=>de!==_)})),e[3]=R,e[4]=H):H=e[4];const Y=H,W=_=>Ec({overId:_,statusOf:se=>I.find(X=>X.id===se)?.status});let Z;e[5]!==a?(Z=_=>a.has(_)&&a.size>1?[_,...Array.from(a).filter(se=>se!==_)]:[_],e[5]=a,e[6]=Z):Z=e[6];const q=Z;let ne;e[7]===Symbol.for("react.memo_cache_sentinel")?(ne=(_,se,X)=>{const de=wl(X,_.length);A(ie=>{const Ie=new Map(ie);return _.forEach((ve,$e)=>Ie.set(ve,{status:se,sortOrder:de[$e]})),Ie})},e[7]=ne):ne=e[7];const ae=ne;let te;e[8]===Symbol.for("react.memo_cache_sentinel")?(te={activationConstraint:{distance:4}},e[8]=te):te=e[8];let oe;e[9]===Symbol.for("react.memo_cache_sentinel")?(oe={coordinateGetter:Zo},e[9]=oe):oe=e[9];const ce=qo(gi(Ko,te),gi(Uo,oe)),_e=_=>{const se=String(_.active.id),X=W(_.over?.id),de=I.find($e=>$e.id===se);if(!X||!de||de.status===X)return;const ie=q(se),Ie=String(_.over?.id??""),ve=G(X).filter($e=>!ie.includes($e.id));ae(ie,X,bi(ve,Ie.startsWith(_a)?null:Ie,se))},Ae=_=>{const se=String(_.active.id);v(null);const X=W(_.over?.id)??I.find(je=>je.id===se)?.status;if(!X){A(new Map);return}const de=q(se),ie=G(X),Ie=String(_.over?.id??""),ve=ie.findIndex(je=>je.id===se),$e=Ie.startsWith(_a)?ie.length-1:ie.findIndex(je=>je.id===Ie),Ce=ve===-1||$e===-1?ie:Qo(ie,ve,$e);if(s.filter(je=>je.status===X).sort(sl).map(s1).join()===Ce.map(t1).join()){A(new Map);return}const er=Ce.slice(Ce.findIndex(je=>je.id===se)+1).find(je=>!de.includes(je.id)),Oe=bi(ie.filter(je=>!de.includes(je.id)),er?.id??null,se);ae(de,X,Oe),S(de),u(de,X,Oe)},he=y?I.find(_=>_.id===y):null;let ge;e[10]!==y||e[11]!==q?(ge=y?q(y):[],e[10]=y,e[11]=q,e[12]=ge):ge=e[12];const ke=ge;let xe;e[13]===Symbol.for("react.memo_cache_sentinel")?(xe=_=>{v(String(_.active.id)),S([])},e[13]=xe):xe=e[13];let Be;e[14]===Symbol.for("react.memo_cache_sentinel")?(Be=()=>{v(null),A(new Map)},e[14]=Be):Be=e[14];const Se=rl.createPortal,Te=Wo,J=null,pe=he&&i.jsxs("div",{className:"relative w-[292px] cursor-grabbing",children:[i.jsx(To,{item:he,assignee:he.assigneeId?n.get(he.assigneeId):void 0,assignedBy:he.assignedBy?n.get(he.assignedBy):void 0,selected:a.has(he.id),onOpen:e1,className:"w-full shadow-lg"}),ke.length>1&&i.jsx("span",{className:"absolute -top-2 -right-2 flex h-5 min-w-5 items-center justify-center rounded-full bg-foreground px-1.5 text-[11px] font-semibold text-background",children:ke.length})]});let U;e[15]!==Te||e[16]!==pe?(U=i.jsx(Te,{dropAnimation:J,children:pe}),e[15]=Te,e[16]=pe,e[17]=U):U=e[17];let be;return e[18]!==Se||e[19]!==U?(be=Se(U,document.body),e[18]=Se,e[19]=U,e[20]=be):be=e[20],i.jsxs(Go,{sensors:ce,collisionDetection:Vo,onDragStart:xe,onDragOver:_e,onDragEnd:Ae,onDragCancel:Be,children:[i.jsx("div",{ref:P,className:"min-h-0 flex-1 overflow-x-auto",children:i.jsxs("div",{className:"mx-auto flex h-full w-full max-w-[1680px] gap-3 px-4 pt-6 sm:px-8",children:[O.map(_=>i.jsx(i1,{status:_,items:G(_),members:r,memberByUserId:n,selectedIds:a,isTarget:he?.status===_,hiddenIds:ke,landedIds:j,onToggleSelect:l,onSelectAllInLane:o,onOpen:c,onCreate:d,onAutoFix:f,onRerun:h,onAssign:x,onPriorityChange:g,onTypeChange:p,onDueDateChange:k,onHide:K.includes(_)?()=>Y(_,!1):void 0},_)),V.length>0&&i.jsx(a1,{statuses:V,countOf:_=>G(_).length,onShow:_=>Y(_,!0)})]})}),be]})}function e1(){}function t1(t){return t.id}function s1(t){return t.id}function n1(t){return t.status}function r1(t){return`${t.id}:${t.status}`}function a1(t){const e=D.c(19),{statuses:s,countOf:r,onShow:n}=t,a=ee();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(Pa,{size:14,className:"shrink-0 transition-transform group-open:rotate-90"}),e[0]=l):l=e[0];let o;e[1]!==a?(o=a("taskBoard.taskBoard.hiddenColumns"),e[1]=a,e[2]=o):o=e[2];let c;e[3]!==o?(c=i.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[l,o]}),e[3]=o,e[4]=c):c=e[4];let d;if(e[5]!==r||e[6]!==n||e[7]!==s||e[8]!==a){let h;e[10]!==r||e[11]!==n||e[12]!==a?(h=x=>{const{label:g,visual:p}=dr(x,a),k=p.icon;return i.jsxs("div",{"data-hidden-lane":x,className:"flex items-center gap-2 rounded-xl bg-background px-3 py-2.5 card-shadow",children:[i.jsx(k,{size:15,className:M("shrink-0",p.iconClassName)}),i.jsx("span",{className:"text-sm font-medium text-foreground",children:g}),i.jsx("span",{className:"ml-auto text-[11px] font-medium text-muted-foreground",children:r(x)}),i.jsxs(Ze,{children:[i.jsx(Qe,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":a("taskBoard.taskBoard.laneMenuAriaLabel",{lane:g}),className:"flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:i.jsx(Qn,{size:15})})}),i.jsx(Ye,{align:"end",children:i.jsx(we,{onClick:()=>n(x),children:a("taskBoard.taskBoard.showColumn")})})]})]},x)},e[10]=r,e[11]=n,e[12]=a,e[13]=h):h=e[13],d=s.map(h),e[5]=r,e[6]=n,e[7]=s,e[8]=a,e[9]=d}else d=e[9];let u;e[14]!==d?(u=i.jsx("div",{className:"flex flex-col gap-2 px-1 pt-1",children:d}),e[14]=d,e[15]=u):u=e[15];let f;return e[16]!==c||e[17]!==u?(f=i.jsxs("details",{className:"group h-full w-[300px] shrink-0 py-1",children:[c,u]}),e[16]=c,e[17]=u,e[18]=f):f=e[18],f}function i1(t){const e=D.c(100),{status:s,items:r,members:n,memberByUserId:a,selectedIds:l,isTarget:o,hiddenIds:c,landedIds:d,onToggleSelect:u,onSelectAllInLane:f,onOpen:h,onCreate:x,onAutoFix:g,onRerun:p,onAssign:k,onPriorityChange:b,onTypeChange:m,onDueDateChange:y,onHide:v}=t,w=ee(),{label:j,visual:S}=dr(s,w),T=S.icon,N=`${_a}${s}`;let A;e[0]!==N?(A={id:N},e[0]=N,e[1]=A):A=e[1];const{setNodeRef:$}=Yo(A),R=o&&"bg-muted/50";let E;e[2]!==R?(E=M("flex h-full w-[300px] shrink-0 flex-col rounded-xl py-1 transition-colors",R),e[2]=R,e[3]=E):E=e[3];const F=o?"bg-muted":"bg-background";let P;e[4]!==F?(P=M("sticky top-0 z-10 flex items-center gap-2 px-2 py-1.5 transition-colors",F),e[4]=F,e[5]=P):P=e[5];const I=15,G=M("shrink-0",S.iconClassName.replace(/\banimate-\S+\b/g,"").trim());let O;e[6]!==T||e[7]!==G?(O=i.jsx(T,{size:I,className:G}),e[6]=T,e[7]=G,e[8]=O):O=e[8];let V;e[9]!==j?(V=i.jsx("span",{className:"text-sm font-medium text-foreground",children:j}),e[9]=j,e[10]=V):V=e[10];let K;e[11]!==r.length?(K=i.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:r.length}),e[11]=r.length,e[12]=K):K=e[12];let H;e[13]!==j||e[14]!==w?(H=w("taskBoard.taskBoard.laneMenuAriaLabel",{lane:j}),e[13]=j,e[14]=w,e[15]=H):H=e[15];let Y;e[16]===Symbol.for("react.memo_cache_sentinel")?(Y=i.jsx(Qn,{size:15}),e[16]=Y):Y=e[16];let W;e[17]!==H?(W=i.jsx(Qe,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":H,className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:Y})}),e[17]=H,e[18]=W):W=e[18];let Z;e[19]!==f||e[20]!==s?(Z=()=>f(s),e[19]=f,e[20]=s,e[21]=Z):Z=e[21];let q;e[22]!==w?(q=w("taskBoard.taskBoard.selectAllInLane"),e[22]=w,e[23]=q):q=e[23];let ne;e[24]!==Z||e[25]!==q?(ne=i.jsx(we,{onClick:Z,children:q}),e[24]=Z,e[25]=q,e[26]=ne):ne=e[26];let ae;e[27]!==v||e[28]!==w?(ae=v&&i.jsx(we,{onClick:v,children:w("taskBoard.taskBoard.hideColumn")}),e[27]=v,e[28]=w,e[29]=ae):ae=e[29];let te;e[30]!==ne||e[31]!==ae?(te=i.jsxs(Ye,{align:"end",children:[ne,ae]}),e[30]=ne,e[31]=ae,e[32]=te):te=e[32];let oe;e[33]!==W||e[34]!==te?(oe=i.jsxs(Ze,{children:[W,te]}),e[33]=W,e[34]=te,e[35]=oe):oe=e[35];let ce;e[36]!==j||e[37]!==w?(ce=w("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:j}),e[36]=j,e[37]=w,e[38]=ce):ce=e[38];let _e;e[39]!==j||e[40]!==w?(_e=w("taskBoard.taskBoard.newTaskInLaneTitle",{lane:j}),e[39]=j,e[40]=w,e[41]=_e):_e=e[41];let Ae;e[42]!==x||e[43]!==s?(Ae=()=>x(s),e[42]=x,e[43]=s,e[44]=Ae):Ae=e[44];let he;e[45]===Symbol.for("react.memo_cache_sentinel")?(he=i.jsx(cr,{size:15}),e[45]=he):he=e[45];let ge;e[46]!==ce||e[47]!==_e||e[48]!==Ae?(ge=i.jsx("button",{type:"button","aria-label":ce,title:_e,onClick:Ae,className:"flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:he}),e[46]=ce,e[47]=_e,e[48]=Ae,e[49]=ge):ge=e[49];let ke;e[50]!==V||e[51]!==K||e[52]!==oe||e[53]!==ge||e[54]!==P||e[55]!==O?(ke=i.jsxs("div",{className:P,children:[O,V,K,oe,ge]}),e[50]=V,e[51]=K,e[52]=oe,e[53]=ge,e[54]=P,e[55]=O,e[56]=ke):ke=e[56];let xe;e[57]!==r?(xe=r.map(l1),e[57]=r,e[58]=xe):xe=e[58];let Be;if(e[59]!==c||e[60]!==r||e[61]!==d||e[62]!==a||e[63]!==n||e[64]!==k||e[65]!==g||e[66]!==y||e[67]!==h||e[68]!==b||e[69]!==p||e[70]!==u||e[71]!==m||e[72]!==l){let pe;e[74]!==c||e[75]!==d||e[76]!==a||e[77]!==n||e[78]!==k||e[79]!==g||e[80]!==y||e[81]!==h||e[82]!==b||e[83]!==p||e[84]!==u||e[85]!==m||e[86]!==l?(pe=U=>i.jsx(o1,{item:U,assignee:U.assigneeId?a.get(U.assigneeId):void 0,assignedBy:U.assignedBy?a.get(U.assignedBy):void 0,members:n,selected:l.has(U.id),hidden:c.includes(U.id),landed:d.includes(U.id),onToggleSelect:()=>u(U.id),onOpen:()=>h(U),onAutoFix:g?()=>g(U):void 0,onRerun:p?()=>p(U):void 0,onAssign:k?be=>k(U.id,be):void 0,onPriorityChange:b?be=>b(U.id,be):void 0,onTypeChange:m?be=>m(U.id,be):void 0,onDueDateChange:y?be=>y(U.id,be):void 0},U.id),e[74]=c,e[75]=d,e[76]=a,e[77]=n,e[78]=k,e[79]=g,e[80]=y,e[81]=h,e[82]=b,e[83]=p,e[84]=u,e[85]=m,e[86]=l,e[87]=pe):pe=e[87],Be=r.map(pe),e[59]=c,e[60]=r,e[61]=d,e[62]=a,e[63]=n,e[64]=k,e[65]=g,e[66]=y,e[67]=h,e[68]=b,e[69]=p,e[70]=u,e[71]=m,e[72]=l,e[73]=Be}else Be=e[73];let Se;e[88]!==xe||e[89]!==Be?(Se=i.jsx(Xo,{items:xe,strategy:Jo,children:Be}),e[88]=xe,e[89]=Be,e[90]=Se):Se=e[90];let Te;e[91]!==$||e[92]!==s||e[93]!==Se?(Te=i.jsx("div",{ref:$,"data-lane-scroll":s,className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-1 pt-1 pb-16 [scrollbar-width:thin] [&::-webkit-scrollbar]:w-1",children:Se}),e[91]=$,e[92]=s,e[93]=Se,e[94]=Te):Te=e[94];let J;return e[95]!==s||e[96]!==ke||e[97]!==Te||e[98]!==E?(J=i.jsxs("div",{"data-lane":s,className:E,children:[ke,Te]}),e[95]=s,e[96]=ke,e[97]=Te,e[98]=E,e[99]=J):J=e[99],J}function l1(t){return t.id}function o1(t){const e=D.c(29);let s,r,n,a;e[0]!==t?({item:r,hidden:s,landed:n,...a}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n,e[4]=a):(s=e[1],r=e[2],n=e[3],a=e[4]);let l;e[5]!==r.id?(l={id:r.id},e[5]=r.id,e[6]=l):l=e[6];const{attributes:o,listeners:c,setNodeRef:d,transform:u,transition:f,isDragging:h}=ec(l),x=r.id,g=r.status;let p;e[7]!==o||e[8]!==c?(p={attributes:o,listeners:c},e[7]=o,e[8]=c,e[9]=p):p=e[9];const k=n&&"animate-card-land";let b;e[10]!==k?(b=M("w-full",k),e[10]=k,e[11]=b):b=e[11];let m;e[12]!==u?(m=tc.Translate.toString(u),e[12]=u,e[13]=m):m=e[13];const y=h||s?0:void 0;let v;e[14]!==m||e[15]!==y||e[16]!==f?(v={transform:m,transition:f,opacity:y},e[14]=m,e[15]=y,e[16]=f,e[17]=v):v=e[17];let w;e[18]!==r||e[19]!==a||e[20]!==d||e[21]!==p||e[22]!==b||e[23]!==v?(w=i.jsx(To,{...a,item:r,dragRef:d,bindings:p,className:b,style:v}),e[18]=r,e[19]=a,e[20]=d,e[21]=p,e[22]=b,e[23]=v,e[24]=w):w=e[24];let j;return e[25]!==r.id||e[26]!==r.status||e[27]!==w?(j=i.jsx("div",{className:"flex","data-flip-id":x,"data-flip-lane":g,children:w}),e[25]=r.id,e[26]=r.status,e[27]=w,e[28]=j):j=e[28],j}function To(t){const e=D.c(71),{item:s,assignee:r,assignedBy:n,members:a,selected:l,className:o,dragRef:c,bindings:d,style:u,onToggleSelect:f,onOpen:h,onAutoFix:x,onRerun:g,onAssign:p,onPriorityChange:k,onTypeChange:b,onDueDateChange:m}=t,y=ee(),v=Im(s);let w;e[0]!==s?(w=Rc(s),e[0]=s,e[1]=w):w=e[1];const j=w;let S,T,N,A,$,R,E,F,P,I,G,O;if(e[2]!==d?.attributes||e[3]!==d?.listeners||e[4]!==o||e[5]!==c||e[6]!==s||e[7]!==x||e[8]!==h||e[9]!==g||e[10]!==f||e[11]!==j||e[12]!==l||e[13]!==u||e[14]!==y){T=$c(s)?y("taskBoard.taskBoard.blockedBadgeTitle"):null;const te=x&&(s.status==="triage"||s.status==="todo")&&s.assigneeId!==Re,oe=g&&!te&&s.assigneeId===Re&&s.status!=="done";S=te?{icon:za,label:y("taskBoard.taskBoard.autoFix"),onClick:x}:oe?{icon:Qr,label:y("taskBoard.taskBoard.rerun"),onClick:g}:null,F="button",P=c,I=u,G=d?.attributes,O=d?.listeners,e[27]!==h||e[28]!==f?(N=ce=>{ce.shiftKey&&f?f():h()},e[27]=h,e[28]=f,e[29]=N):N=e[29],A=M("group relative flex shrink-0 cursor-grab flex-col gap-3 rounded-xl px-3.5 pt-3.5 pb-2.5 text-left card-shadow active:cursor-grabbing",T?"bg-warning/10 hover:bg-warning/15":"bg-card hover:bg-accent/60",j==="failed"?"card-ring-destructive":T&&"card-ring-warning",l&&"bg-accent",o),E="flex items-start gap-2",R="relative min-w-0 flex-1 text-[14px] font-[450] leading-snug",$=M("block text-foreground line-clamp-2",S&&"group-hover:fade-text-end"),e[2]=d?.attributes,e[3]=d?.listeners,e[4]=o,e[5]=c,e[6]=s,e[7]=x,e[8]=h,e[9]=g,e[10]=f,e[11]=j,e[12]=l,e[13]=u,e[14]=y,e[15]=S,e[16]=T,e[17]=N,e[18]=A,e[19]=$,e[20]=R,e[21]=E,e[22]=F,e[23]=P,e[24]=I,e[25]=G,e[26]=O}else S=e[15],T=e[16],N=e[17],A=e[18],$=e[19],R=e[20],E=e[21],F=e[22],P=e[23],I=e[24],G=e[25],O=e[26];let V;e[30]!==s.title||e[31]!==$?(V=i.jsx("span",{className:$,children:s.title}),e[30]=s.title,e[31]=$,e[32]=V):V=e[32];let K;e[33]!==S?(K=S&&i.jsx(_m,{action:S}),e[33]=S,e[34]=K):K=e[34];let H;e[35]!==V||e[36]!==K||e[37]!==R?(H=i.jsxs("div",{className:R,children:[V,K]}),e[35]=V,e[36]=K,e[37]=R,e[38]=H):H=e[38];let Y;e[39]!==T?(Y=T&&i.jsx("span",{className:"sr-only",children:T}),e[39]=T,e[40]=Y):Y=e[40];let W;e[41]!==j?(W=j&&i.jsx(Mm,{state:j}),e[41]=j,e[42]=W):W=e[42];let Z;e[43]!==H||e[44]!==Y||e[45]!==W||e[46]!==E?(Z=i.jsxs("div",{className:E,children:[H,Y,W]}),e[43]=H,e[44]=Y,e[45]=W,e[46]=E,e[47]=Z):Z=e[47];let q;e[48]!==s.tags?(q=s.tags.length>0&&i.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[s.tags.slice(0,Ca).map(c1),s.tags.length>Ca&&i.jsxs("span",{className:Gt,children:["+",s.tags.length-Ca]})]}),e[48]=s.tags,e[49]=q):q=e[49];let ne;e[50]!==n||e[51]!==r||e[52]!==v||e[53]!==s||e[54]!==a||e[55]!==p||e[56]!==m||e[57]!==k||e[58]!==b?(ne=i.jsx(Dm,{item:s,checks:v,assignee:r,assignedBy:n,members:a,onAssign:p,onPriorityChange:k,onTypeChange:b,onDueDateChange:m}),e[50]=n,e[51]=r,e[52]=v,e[53]=s,e[54]=a,e[55]=p,e[56]=m,e[57]=k,e[58]=b,e[59]=ne):ne=e[59];let ae;return e[60]!==N||e[61]!==A||e[62]!==Z||e[63]!==q||e[64]!==ne||e[65]!==F||e[66]!==P||e[67]!==I||e[68]!==G||e[69]!==O?(ae=i.jsxs("button",{type:F,ref:P,style:I,...G,...O,onClick:N,className:A,children:[Z,q,ne]}),e[60]=N,e[61]=A,e[62]=Z,e[63]=q,e[64]=ne,e[65]=F,e[66]=P,e[67]=I,e[68]=G,e[69]=O,e[70]=ae):ae=e[70],ae}function c1(t){return i.jsx(jo,{tag:t},t.id)}function d1(t){const e=D.c(38),{item:s,assignee:r,assignedBy:n,onOpen:a}=t;let l;e[0]!==s.status?(l=Na(s.status),e[0]=s.status,e[1]=l):l=e[1];const o=l.icon;let c;e[2]!==s?(c=M("shrink-0",xl(s)),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==o||e[5]!==c?(d=i.jsx(o,{size:16,className:c}),e[4]=o,e[5]=c,e[6]=d):d=e[6];let u;e[7]!==s.title?(u=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.title}),e[7]=s.title,e[8]=u):u=e[8];let f;e[9]!==s?(f=Bc(s)&&i.jsx(xm,{}),e[9]=s,e[10]=f):f=e[10];let h;e[11]!==s?(h=Ac(s)&&i.jsx(km,{}),e[11]=s,e[12]=h):h=e[12];let x;e[13]!==s.priority?(x=s.priority!=="none"&&i.jsx("span",{className:"hidden sm:inline-flex",children:i.jsx(Rm,{priority:s.priority})}),e[13]=s.priority,e[14]=x):x=e[14];let g;e[15]!==s.dueDate?(g=s.dueDate&&i.jsx("span",{className:"hidden sm:inline-flex",children:i.jsx($m,{iso:s.dueDate})}),e[15]=s.dueDate,e[16]=g):g=e[16];let p;e[17]!==s.tags?(p=s.tags.length>0&&i.jsxs("span",{className:"hidden items-center gap-1.5 sm:inline-flex",children:[s.tags.slice(0,2).map(u1),s.tags.length>2&&i.jsxs("span",{className:Gt,children:["+",s.tags.length-2]})]}),e[17]=s.tags,e[18]=p):p=e[18];let k;e[19]!==n||e[20]!==r||e[21]!==s?(k=i.jsx(So,{item:s,assignee:r,assignedBy:n}),e[19]=n,e[20]=r,e[21]=s,e[22]=k):k=e[22];let b;e[23]!==s.createdAt?(b=Ha(new Date(s.createdAt)),e[23]=s.createdAt,e[24]=b):b=e[24];let m;e[25]!==b?(m=i.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:b}),e[25]=b,e[26]=m):m=e[26];let y;return e[27]!==a||e[28]!==k||e[29]!==m||e[30]!==d||e[31]!==u||e[32]!==f||e[33]!==h||e[34]!==x||e[35]!==g||e[36]!==p?(y=i.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[d,u,f,h,x,g,p,k,m]}),e[27]=a,e[28]=k,e[29]=m,e[30]=d,e[31]=u,e[32]=f,e[33]=h,e[34]=x,e[35]=g,e[36]=p,e[37]=y):y=e[37],y}function u1(t){return i.jsx(jo,{tag:t},t.id)}function bg(t){const e=D.c(5),{seed:s,children:r}=t;let n;e[0]!==s?(n=()=>{const o=new Lo({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,retry:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchInterval:!1}}});return s(o),o},e[0]=s,e[1]=n):n=e[1];const[a]=L.useState(n);let l;return e[2]!==r||e[3]!==a?(l=i.jsx("div",{"aria-hidden":"true",inert:!0,className:"pointer-events-none absolute inset-0 select-none overflow-hidden",children:i.jsx(Po,{fallback:null,children:i.jsx(L.Suspense,{fallback:null,children:i.jsx(Oo,{client:a,children:r})})})}),e[2]=r,e[3]=a,e[4]=l):l=e[4],l}const nl=new Date().toISOString();function $t(t,e,s,r,n,a){return{id:t,organizationId:"preview",title:e,description:null,status:s,priority:n,type:r,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:a,keySeq:a,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],createdBy:"preview",createdAt:nl,updatedBy:"preview",updatedAt:nl}}function yg(){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{bg as P,kg as T,yg as m};