decocms 4.367.6 → 4.367.7

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 (361) hide show
  1. package/dist/client/assets/{AlertCircle-CZODjB-G.js → AlertCircle-CMdkAjxQ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CIyBmnKJ.js → AreaChart-jIv2Q0sS.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-qXobBdxD.js → ArrowLeft-DGJWLWaL.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-_qaicB3i.js → ArrowRight-D_1DZN2N.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-B2y3FAZT.js → ArrowUp-Bx3jqyJU.js} +1 -1
  6. package/dist/client/assets/{Check-DYuLLcXz.js → Check-HvrCGvlV.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Cpa5ukkn.js → CheckCircle-CQTpywHl.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BvrNCsKT.js → ChevronRight-dkkIYuGe.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B-GxN-tN.js → ChevronUp-BANcOZ09.js} +1 -1
  10. package/dist/client/assets/{Copy01-BKbbYkAO.js → Copy01-D4tr9F1r.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-D16_sfKz.js → CreditCard01-CX8hLF54.js} +1 -1
  12. package/dist/client/assets/{Database01-C9bPAMOv.js → Database01-C6v3VKBC.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-BKAvE_4x.js → DotsVertical-DEpQR8Rs.js} +1 -1
  14. package/dist/client/assets/{Download01-BvE_0avp.js → Download01-G8ZhNqF3.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-C42cr3OZ.js → ErrorBarContext-DNwZJRAX.js} +1 -1
  16. package/dist/client/assets/{Eye-CO0I0F0e.js → Eye-wRiP-IKY.js} +1 -1
  17. package/dist/client/assets/{File02-Cnt06RSY.js → File02-C5Axd7Wg.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-BPIVJl4U.js → GitBranch01-xiI7ahmy.js} +1 -1
  19. package/dist/client/assets/{Globe01-DjDoxbql.js → Globe01-BJfrzyV2.js} +1 -1
  20. package/dist/client/assets/{HardDrive-UFyvehqQ.js → HardDrive-BtlNN50l.js} +1 -1
  21. package/dist/client/assets/{Image01-D3ZQNp9r.js → Image01-ZQpSr40Q.js} +1 -1
  22. package/dist/client/assets/{Key01-0kVvyKcG.js → Key01-TUQZiePT.js} +1 -1
  23. package/dist/client/assets/{Link01-Ct7pxTAu.js → Link01-Dubdh0XV.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-DCfxP5B_.js → LinkExternal01-DsoIvXMf.js} +1 -1
  25. package/dist/client/assets/{MessageCircle01-CweHuqp7.js → MessageCircle01-DrVOv17x.js} +1 -1
  26. package/dist/client/assets/{Monitor01-BWZHqfxa.js → Monitor01-8akol8yD.js} +1 -1
  27. package/dist/client/assets/{Package-T9dujty4.js → Package-6pCyxdj-.js} +1 -1
  28. package/dist/client/assets/{Palette-B9i9hnCi.js → Palette-8_jSprTt.js} +1 -1
  29. package/dist/client/assets/{Play-BIZK_qUZ.js → Play-B2WDpGm-.js} +1 -1
  30. package/dist/client/assets/{Plus-DaMIkku0.js → Plus-B6iViyXP.js} +1 -1
  31. package/dist/client/assets/{Printer-AWNoUKRJ.js → Printer-1AF1IGx9.js} +1 -1
  32. package/dist/client/assets/{SearchLg-C2sftj0S.js → SearchLg-o3jjSP_H.js} +1 -1
  33. package/dist/client/assets/{SearchMd-B6arCmyn.js → SearchMd-BFooCWLz.js} +1 -1
  34. package/dist/client/assets/{Sector-BM01w_NE.js → Sector-D27lvJUl.js} +1 -1
  35. package/dist/client/assets/{Settings02-Cng3FY1l.js → Settings02-11lXkxuh.js} +1 -1
  36. package/dist/client/assets/{Share07-BgGqkker.js → Share07-2izyqHpD.js} +1 -1
  37. package/dist/client/assets/{Shield01-CVF7EZQb.js → Shield01-C_NSoVzs.js} +1 -1
  38. package/dist/client/assets/{Stars01-DSWmseOt.js → Stars01-dQ6_BPZ3.js} +1 -1
  39. package/dist/client/assets/{Sun-B2S_0TDV.js → Sun-DqCbyuBS.js} +1 -1
  40. package/dist/client/assets/{SwitchHorizontal01-BaPOYupn.js → SwitchHorizontal01-Chrl4_cZ.js} +1 -1
  41. package/dist/client/assets/{Tool01-DW_T3YR5.js → Tool01-DekOr9OW.js} +1 -1
  42. package/dist/client/assets/{Tool02-zLL5jksN.js → Tool02-CgXadMFZ.js} +1 -1
  43. package/dist/client/assets/{Trash01-CchLM2HV.js → Trash01-DwLqZ5iv.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-CSoUpxS1.js → TrendUp01-BJ6ZxGib.js} +1 -1
  45. package/dist/client/assets/{Upload01-G3c4UCfB.js → Upload01-zIaNWjGg.js} +1 -1
  46. package/dist/client/assets/{User01-CZRm273k.js → User01-Cuc8TQ2e.js} +1 -1
  47. package/dist/client/assets/{UserSquare-BdoEkD8Z.js → UserSquare-DO483pcO.js} +1 -1
  48. package/dist/client/assets/{Users01-D_H_0-Jf.js → Users01-C_FX7NZW.js} +1 -1
  49. package/dist/client/assets/{Users03-DSBIUomT.js → Users03-CBIUviMz.js} +1 -1
  50. package/dist/client/assets/{X-Dr0Tqjzv.js → X-BbEHf0ox.js} +1 -1
  51. package/dist/client/assets/{XCircle-Ce8PGmrS.js → XCircle-CIpucXWN.js} +1 -1
  52. package/dist/client/assets/{XClose-5naA93fy.js → XClose-D9lEUPrO.js} +1 -1
  53. package/dist/client/assets/{Zap-XMkPrxNc.js → Zap-FJBBk1lb.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-BLK0GcJv.js → ZoomOut-DR5p3Py1.js} +1 -1
  55. package/dist/client/assets/{access-gate-Cql3KqwB.js → access-gate-BGLq5_fD.js} +1 -1
  56. package/dist/client/assets/{add-connection-dialog-BFK-aGDM.js → add-connection-dialog-CP-mB4l0.js} +1 -1
  57. package/dist/client/assets/{agent-analytics-BiLU3geK.js → agent-analytics-CwkHNxxG.js} +1 -1
  58. package/dist/client/assets/agent-app-DOZj_KNh.js +1 -0
  59. package/dist/client/assets/{agent-assets-l4c7ivCP.js → agent-assets-COVC5lPr.js} +1 -1
  60. package/dist/client/assets/{agent-automation-Dr_aQL2N.js → agent-automation-BWSPNjim.js} +1 -1
  61. package/dist/client/assets/{agent-automations-BtQVYGNC.js → agent-automations-BUDch-j3.js} +1 -1
  62. package/dist/client/assets/{agent-connect-sources-B72Z2yOq.js → agent-connect-sources-LY53id1I.js} +1 -1
  63. package/dist/client/assets/agent-deck-Ci4o3-Qm.js +1 -0
  64. package/dist/client/assets/{agent-e2e-BC-S1G-I.js → agent-e2e-CnVObhl4.js} +1 -1
  65. package/dist/client/assets/agent-file-cFbD0OqV.js +1 -0
  66. package/dist/client/assets/{agent-git-BCY9JF0p.js → agent-git-C-KtJQOB.js} +1 -1
  67. package/dist/client/assets/{agent-hosting-BTRnh7Qw.js → agent-hosting-Dr-g2CXP.js} +1 -1
  68. package/dist/client/assets/{agent-icon-I_u5FzRN.js → agent-icon-CL_nl9mo.js} +1 -1
  69. package/dist/client/assets/agent-library-file-DXMpRwGw.js +1 -0
  70. package/dist/client/assets/{agent-monitor-C3BUSOjB.js → agent-monitor-SvCw0nUy.js} +1 -1
  71. package/dist/client/assets/{agent-overview-DLgGJyEN.js → agent-overview-lLErih75.js} +1 -1
  72. package/dist/client/assets/agent-settings-BDT_wIMj.js +1 -0
  73. package/dist/client/assets/{agent-site-editor-CcVudugZ.js → agent-site-editor-BukowFNy.js} +1 -1
  74. package/dist/client/assets/agent-site-editor-code-CaFMcCwi.js +2 -0
  75. package/dist/client/assets/{agent-site-editor-content-C_xKa1S3.js → agent-site-editor-content-DtzkoDLB.js} +2 -2
  76. package/dist/client/assets/{agent-site-editor-preview-DHkNf2Kb.js → agent-site-editor-preview-DX7U6V5V.js} +3 -3
  77. package/dist/client/assets/agent-view-BOmW_Ep_.js +1 -0
  78. package/dist/client/assets/{agent-view-guard-jbDY82eS.js → agent-view-guard-BMN6ThUt.js} +1 -1
  79. package/dist/client/assets/{agents-list-CF5eQ1pF.js → agents-list-C6ZSW07I.js} +1 -1
  80. package/dist/client/assets/{ai-providers-COjB4NMg.js → ai-providers-D2C1qlv0.js} +1 -1
  81. package/dist/client/assets/{alert-DwSbSu1x.js → alert-0Lc8v4N7.js} +1 -1
  82. package/dist/client/assets/{alert-dialog-dzu9U-o1.js → alert-dialog-BcLnZa7A.js} +1 -1
  83. package/dist/client/assets/api-keys-C2lfrWiE.js +1 -0
  84. package/dist/client/assets/{api-keys-Cpho4Cho.js → api-keys-Cf6bK86U.js} +1 -1
  85. package/dist/client/assets/app-editor-Cbs0w-F0.js +1 -0
  86. package/dist/client/assets/{asset-utils-DLlbY7-O.js → asset-utils-DIsXFmtL.js} +1 -1
  87. package/dist/client/assets/{auth-UveS8wF5.js → auth-DqeCOVzg.js} +1 -1
  88. package/dist/client/assets/{auth-catchall-CxHpvtO-.js → auth-catchall-BNIBQ_XR.js} +1 -1
  89. package/dist/client/assets/{auth-entry-BVtguEOj.js → auth-entry-Bq32N4lt.js} +1 -1
  90. package/dist/client/assets/{auth-split-layout-DzJReBpa.js → auth-split-layout-DliwYz65.js} +1 -1
  91. package/dist/client/assets/{authenticate-and-persist-oauth-CrVNvw_C.js → authenticate-and-persist-oauth-Eoth2qMz.js} +1 -1
  92. package/dist/client/assets/{automation-list-row-CXkhnqzA.js → automation-list-row-CpdfZzhf.js} +1 -1
  93. package/dist/client/assets/{automation-runs-DBxHk2or.js → automation-runs-DIEXu2AA.js} +1 -1
  94. package/dist/client/assets/{automations-DFVUH58q.js → automations-BpBth9hu.js} +1 -1
  95. package/dist/client/assets/{autosend-BsJQ1aCs.js → autosend-2Y4HgA_T.js} +1 -1
  96. package/dist/client/assets/{avatar-DV69nhm1.js → avatar-YOwDvuCo.js} +1 -1
  97. package/dist/client/assets/{badge-Bx6TdTjC.js → badge-CKy1DnEV.js} +1 -1
  98. package/dist/client/assets/{block-document-Bz-5kssp.js → block-document-aP19FM_M.js} +1 -1
  99. package/dist/client/assets/{blocks-preview-workspace-context-CzxgcZDm.js → blocks-preview-workspace-context-DP5_u2Xp.js} +1 -1
  100. package/dist/client/assets/{breadcrumb-D4EWX36X.js → breadcrumb-BY8W5NfH.js} +1 -1
  101. package/dist/client/assets/{buckets-B9z_Rm90.js → buckets-Bhe2phyM.js} +1 -1
  102. package/dist/client/assets/{build-improve-prompt-doc-BWFSRTpm.js → build-improve-prompt-doc-DVZMfB_k.js} +1 -1
  103. package/dist/client/assets/{bulk-category-panel-Dq461a8g.js → bulk-category-panel-dbBPINFu.js} +1 -1
  104. package/dist/client/assets/{calendar-BGdb4p0V.js → calendar-O0niDXgD.js} +1 -1
  105. package/dist/client/assets/{capability-load-error-Dnwh9vPw.js → capability-load-error-JtYpAIDC.js} +1 -1
  106. package/dist/client/assets/{cards-CnQ4nU1q.js → cards-CljnVFGF.js} +1 -1
  107. package/dist/client/assets/category-editor-B984VME1.js +1 -0
  108. package/dist/client/assets/{chart-D7o3Rjgy.js → chart-DjxuH9z1.js} +1 -1
  109. package/dist/client/assets/{chat-context-Bj6XM8r6.js → chat-context-DT13Ns9e.js} +1 -1
  110. package/dist/client/assets/{chat-draft-B57QKpbd.js → chat-draft-Bp7WKsio.js} +1 -1
  111. package/dist/client/assets/{checkbox-DXk_ASm3.js → checkbox-BAc6ON84.js} +1 -1
  112. package/dist/client/assets/{choose-editor-yiYqZgm0.js → choose-editor-Db-m1tPL.js} +1 -1
  113. package/dist/client/assets/{cli-auth-success-DaIMiHKG.js → cli-auth-success-ORnUB4EZ.js} +1 -1
  114. package/dist/client/assets/{client-icons-BIZcUQix.js → client-icons-DH-s5V8p.js} +1 -1
  115. package/dist/client/assets/{collapsible-DvCpQaDP.js → collapsible-Cfc5GOq6.js} +1 -1
  116. package/dist/client/assets/{collection-detail-GwafUKCA.js → collection-detail-tLNt3mFd.js} +1 -1
  117. package/dist/client/assets/{collection-display-button-C8HgvUa3.js → collection-display-button-Q83lUSRW.js} +1 -1
  118. package/dist/client/assets/{collection-search-BgR7E5C_.js → collection-search-DOotlcr-.js} +1 -1
  119. package/dist/client/assets/{collection-table-wrapper-CenPQBXL.js → collection-table-wrapper-L7fq3Ewq.js} +1 -1
  120. package/dist/client/assets/{collection-tabs-BKMxlcTD.js → collection-tabs-77YTqRx_.js} +1 -1
  121. package/dist/client/assets/{command-PF8SQ01C.js → command-BbfSNpjK.js} +1 -1
  122. package/dist/client/assets/{command-palette-store-3XeVzDCK.js → command-palette-store-CDXRiKfb.js} +1 -1
  123. package/dist/client/assets/{companion-mcps-section-BcH1woZ_.js → companion-mcps-section-B3OT3fvW.js} +1 -1
  124. package/dist/client/assets/{connect-cRr5yrcf.js → connect-DYMJSd71.js} +1 -1
  125. package/dist/client/assets/{connect-layout-DlS-pJxG.js → connect-layout-Cb-8wVa_.js} +1 -1
  126. package/dist/client/assets/{connection-D83jUgKt.js → connection-C0h_riCe.js} +1 -1
  127. package/dist/client/assets/{connection-card-B6pHDnUn.js → connection-card-BnHVqPYb.js} +1 -1
  128. package/dist/client/assets/{connection-detail-cjhq0_Le.js → connection-detail-BukOET2K.js} +1 -1
  129. package/dist/client/assets/{connection-form-helpers-CjgrOGRh.js → connection-form-helpers-BGarejHH.js} +1 -1
  130. package/dist/client/assets/{connections-jZ71xb1b.js → connections-C94wvfI_.js} +1 -1
  131. package/dist/client/assets/{create-organization-dialog-Wy8ivV4K.js → create-organization-dialog-BeMHfEec.js} +1 -1
  132. package/dist/client/assets/{decofile-api-DGTmPuak.js → decofile-api-D5P6O-Yb.js} +1 -1
  133. package/dist/client/assets/{decopilot-BQ5v61IW.js → decopilot-DEim_pMB.js} +1 -1
  134. package/dist/client/assets/{dialog-DKHdGeG-.js → dialog-DIO2BT5L.js} +1 -1
  135. package/dist/client/assets/{discover-BpZ5XWNf.js → discover-zXR45UVE.js} +1 -1
  136. package/dist/client/assets/{domain-settings-bYxFZI5Z.js → domain-settings-CoxAhG8y.js} +1 -1
  137. package/dist/client/assets/{download-app-dialog-BhmQVCrs.js → download-app-dialog-B-5SSg-B.js} +1 -1
  138. package/dist/client/assets/{drawer-B1TxBXeW.js → drawer-Dp27hT9C.js} +1 -1
  139. package/dist/client/assets/{dropdown-menu-CoycaRIZ.js → dropdown-menu-BzAnwSL0.js} +1 -1
  140. package/dist/client/assets/{editor-BEf-Idam.js → editor-Dm21YC6a.js} +1 -1
  141. package/dist/client/assets/{empty-state-BN3l0e1m.js → empty-state-CvrLm3VU.js} +1 -1
  142. package/dist/client/assets/{empty-state-BuDUIKwc.js → empty-state-F709JYnF.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-Bs0-7FAn.js → extract-connection-data-Cfd0L2y0.js} +1 -1
  144. package/dist/client/assets/{feature-gate-DXl7j_Gb.js → feature-gate-CSQct_zD.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-2uPHyVRd.js → feature-paywall-Cd5ZGlWk.js} +1 -1
  146. package/dist/client/assets/{file-explorer-CWZPR_uA.js → file-explorer-B6MMR_br.js} +1 -1
  147. package/dist/client/assets/{file-preview-CZ1TplhI.js → file-preview-B3un6Sja.js} +1 -1
  148. package/dist/client/assets/{file-share-button-I_P-fFZ5.js → file-share-button-BXZcNnFk.js} +1 -1
  149. package/dist/client/assets/{file-type-icon-SwABlaSO.js → file-type-icon-CzM4dKXx.js} +1 -1
  150. package/dist/client/assets/{folder-icon-Bj6hz7oH.js → folder-icon-Bjs4wWQI.js} +1 -1
  151. package/dist/client/assets/{form-CCI8usbr.js → form-DGoweIp4.js} +1 -1
  152. package/dist/client/assets/{gateway-client-2Mbrw7Hg.js → gateway-client-BKFdOqFV.js} +1 -1
  153. package/dist/client/assets/{general-T1zzubww.js → general-BER62NBk.js} +1 -1
  154. package/dist/client/assets/{github-icon-CCyh_tld.js → github-icon-D5mzGkJ1.js} +1 -1
  155. package/dist/client/assets/{home-nMTACPWA.js → home-9LhFhaJr.js} +1 -1
  156. package/dist/client/assets/{hooks-DxP9ms8F.js → hooks-DOi6gVdi.js} +1 -1
  157. package/dist/client/assets/{hooks-C4BbSdNW.js → hooks-DW28Wv6W.js} +1 -1
  158. package/dist/client/assets/{index-S-urKMuN.js → index-26VXD9YQ.js} +1 -1
  159. package/dist/client/assets/{index-BzGfYuHA.js → index-BKjzqVX4.js} +1 -1
  160. package/dist/client/assets/{index-B7wVUCeI.js → index-BVdPTogP.js} +1 -1
  161. package/dist/client/assets/{index-D6hy4U5O.js → index-BiIMwVbK.js} +1 -1
  162. package/dist/client/assets/{index-C1OUd215.js → index-BqEX4CxD.js} +1 -1
  163. package/dist/client/assets/{index-DvsuDjpW.js → index-C7nGODiq.js} +1 -1
  164. package/dist/client/assets/{index-CfiHR5p3.js → index-C9jQATHx.js} +2 -2
  165. package/dist/client/assets/{index-L41E_jdu.js → index-CLBWHxV4.js} +1 -1
  166. package/dist/client/assets/{index-BeW32OQZ.js → index-Ch3pSh1a.js} +1 -1
  167. package/dist/client/assets/{index-wju8DM5a.js → index-D3hBrAe3.js} +1 -1
  168. package/dist/client/assets/{index-BW3bCYgD.js → index-D9Pa20nR.js} +1 -1
  169. package/dist/client/assets/{index-DplUenCs.js → index-DDHop146.js} +1 -1
  170. package/dist/client/assets/{index-BpW_HPV1.js → index-DX88U1Fe.js} +1 -1
  171. package/dist/client/assets/{index-BIFBhz6Y.js → index-ebCjSNwh.js} +1 -1
  172. package/dist/client/assets/{index-CR7IhZdQ.js → index-kzbDuxts.js} +1 -1
  173. package/dist/client/assets/{index-redirect-D31X29B5.js → index-redirect-bdPeOdFP.js} +1 -1
  174. package/dist/client/assets/{infiniteQueryObserver-F_wqd-Rj.js → infiniteQueryObserver-CrlFqUXS.js} +1 -1
  175. package/dist/client/assets/{infra-billing-D0PNqi3s.js → infra-billing-DBRnO5Xv.js} +1 -1
  176. package/dist/client/assets/{input-S-gsq7gD.js → input-BfoQkl5k.js} +1 -1
  177. package/dist/client/assets/{input-DOqceFPC.js → input-DCAbperr.js} +1 -1
  178. package/dist/client/assets/{input-SZCoDRD-.js → input-DxpPAL6X.js} +1 -1
  179. package/dist/client/assets/{integration-icon-_HXUWC0Q.js → integration-icon-DLbXRirx.js} +1 -1
  180. package/dist/client/assets/{label-DCUE6TYd.js → label-BZvBRfsC.js} +1 -1
  181. package/dist/client/assets/{last-preview-page-D9Fx5pKm.js → last-preview-page-DgNuT4mN.js} +1 -1
  182. package/dist/client/assets/{layout-DRh2IKmg.js → layout-D_2jgeSQ.js} +1 -1
  183. package/dist/client/assets/{legacy-agents-deep-BPmqpQyn.js → legacy-agents-deep-D9-8wOwe.js} +1 -1
  184. package/dist/client/assets/{legacy-main-redirect-34brc64A.js → legacy-main-redirect-U48xVXg3.js} +1 -1
  185. package/dist/client/assets/{library-D0EEtDE-.js → library-DCHuYHcg.js} +1 -1
  186. package/dist/client/assets/{login-wXsz7PP7.js → login-DLU4Kv--.js} +1 -1
  187. package/dist/client/assets/{markdown-CCv5IlPx.js → markdown-BxIxTFHX.js} +1 -1
  188. package/dist/client/assets/{mcp-app-renderer-BVpwtvW6.js → mcp-app-renderer-C5_SSFlp.js} +1 -1
  189. package/dist/client/assets/{mcp-oauth-DbZXTEaP.js → mcp-oauth-Cj16tOMc.js} +1 -1
  190. package/dist/client/assets/{members-D8EXLICP.js → members-B8ghL5vq.js} +1 -1
  191. package/dist/client/assets/{message-templates-xXuDAWxI.js → message-templates-C0k0djOm.js} +1 -1
  192. package/dist/client/assets/{mini-report-page-BuRwBHqD.js → mini-report-page-DPr8miDS.js} +1 -1
  193. package/dist/client/assets/mock-board-CLCjiMWY.js +90 -0
  194. package/dist/client/assets/{monaco-editor-QBiS6INp.js → monaco-editor-D7KtEG80.js} +1 -1
  195. package/dist/client/assets/{monitoring-stats-row-YHUVjX34.js → monitoring-stats-row-C8qE8vIX.js} +1 -1
  196. package/dist/client/assets/{multi-select-BPe8FRks.js → multi-select-PUmjNPLo.js} +1 -1
  197. package/dist/client/assets/{mustache-Cghs0xAa.js → mustache-DoPKkDOt.js} +1 -1
  198. package/dist/client/assets/{oauth-callback-ai-provider-PZGmoG1J.js → oauth-callback-ai-provider-BkPGppSA.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-DasyYGDW.js → oauth-callback-yzNiiBZS.js} +1 -1
  200. package/dist/client/assets/{onboarding-CxwToftc.js → onboarding-DNDx-VJt.js} +1 -1
  201. package/dist/client/assets/{optimistic-project-sidebar-views-CkdziasT.js → optimistic-project-sidebar-views-DQAcmOUC.js} +1 -1
  202. package/dist/client/assets/{organization-choice-DyW08sxK.js → organization-choice-X5fcp7VC.js} +1 -1
  203. package/dist/client/assets/{orgs-DJ8iJmJH.js → orgs-C71bHZfS.js} +1 -1
  204. package/dist/client/assets/{page-seo-form-Di_npWJ4.js → page-seo-form-CJ5C4DO5.js} +1 -1
  205. package/dist/client/assets/{pair-Dpg5RzdY.js → pair-D4JmcK-t.js} +1 -1
  206. package/dist/client/assets/{plan-ladder-ClS63sS8.js → plan-ladder-CQ1a44li.js} +1 -1
  207. package/dist/client/assets/{popover-RErMjkys.js → popover-cYfVOF_J.js} +1 -1
  208. package/dist/client/assets/{post-calendar-Ba_bnQmW.js → post-calendar-DW1nVDLh.js} +1 -1
  209. package/dist/client/assets/{post-editor-CMawN_7j.js → post-editor-C5j6zvkW.js} +1 -1
  210. package/dist/client/assets/{preview-content-Cir3xjov.js → preview-content-DlgGWAMY.js} +1 -1
  211. package/dist/client/assets/{preview-dialog-DXRDlQ04.js → preview-dialog-DMVdVz_V.js} +1 -1
  212. package/dist/client/assets/{primitives-D5fyRotM.js → primitives-7Kw_jkKz.js} +1 -1
  213. package/dist/client/assets/{profile-CARb014r.js → profile-fIXgfLVj.js} +1 -1
  214. package/dist/client/assets/{project-app-view-CbZ9X9YB.js → project-app-view-DpkzCjxR.js} +1 -1
  215. package/dist/client/assets/{project-feed-BnvodKMh.js → project-feed-D1Rnls8q.js} +1 -1
  216. package/dist/client/assets/{project-icon-B0ih2u61.js → project-icon-CWg_rHTZ.js} +1 -1
  217. package/dist/client/assets/project-reports-BcpuMQY2.js +1 -0
  218. package/dist/client/assets/project-tasks-Cbu0gYbc.js +1 -0
  219. package/dist/client/assets/{prompts-DC4p_0y3.js → prompts-D1i8e1V8.js} +1 -1
  220. package/dist/client/assets/record-editor-CQeidmi2.js +1 -0
  221. package/dist/client/assets/{redirect-editor-B55pPerd.js → redirect-editor-BL101gtT.js} +1 -1
  222. package/dist/client/assets/registry-Dkgi61cL.js +2 -0
  223. package/dist/client/assets/{registry-layout-hY2gP5kb.js → registry-layout-r2D039nl.js} +1 -1
  224. package/dist/client/assets/reports-StG6MJZE.js +1 -0
  225. package/dist/client/assets/{reports-BRDL0pEv.js → reports-TdOY4KuN.js} +1 -1
  226. package/dist/client/assets/{reports-onboarding-CVlJWsoz.js → reports-onboarding-s05s2vjv.js} +1 -1
  227. package/dist/client/assets/{reports-tab-DSQtYmT9.js → reports-tab-D0Xwzbct.js} +2 -2
  228. package/dist/client/assets/{repositories-D8heZRgl.js → repositories-JDvNAhI8.js} +1 -1
  229. package/dist/client/assets/{repository-import-picker-C2CebsOL.js → repository-import-picker-BNluAY2V.js} +1 -1
  230. package/dist/client/assets/{repository-picker-5XZZ15v0.js → repository-picker-D9agNhNi.js} +1 -1
  231. package/dist/client/assets/{require-capability-BJkKy0kt.js → require-capability-DjYcyxbJ.js} +1 -1
  232. package/dist/client/assets/{required-auth-layout-BwX4AD0R.js → required-auth-layout-C3o3t9X1.js} +1 -1
  233. package/dist/client/assets/{reset-password-D0tmp0EO.js → reset-password-DOQza5N6.js} +1 -1
  234. package/dist/client/assets/{resizable-DDt8g8vK.js → resizable-BHYHfZY5.js} +1 -1
  235. package/dist/client/assets/{review-settings-BuR2yqLd.js → review-settings-zUGfHLOe.js} +1 -1
  236. package/dist/client/assets/{rich-text-link-control-BU04B-4N.js → rich-text-link-control-BMZBKHAS.js} +1 -1
  237. package/dist/client/assets/{roles-Dlq8_r8a.js → roles-CbYdUx8a.js} +1 -1
  238. package/dist/client/assets/{route-CVpzQ3gM.js → route--XOZLXQj.js} +1 -1
  239. package/dist/client/assets/{route-Kp0M8uVs.js → route-BMqM-gRN.js} +1 -1
  240. package/dist/client/assets/{route-DE-oHInD.js → route-DJ7DRiHo.js} +1 -1
  241. package/dist/client/assets/{runnable-block-editor-CS_U3fa-.js → runnable-block-editor-eIl1ZAUD.js} +1 -1
  242. package/dist/client/assets/{sandbox-lifecycle-context-CsT5D-QV.js → sandbox-lifecycle-context-dIh2VE9T.js} +1 -1
  243. package/dist/client/assets/{schema-kS1q2dfz.js → schema-DLCqAhaO.js} +1 -1
  244. package/dist/client/assets/{scroll-area-CXYGaVSO.js → scroll-area-B6yfQzTQ.js} +1 -1
  245. package/dist/client/assets/{search-input-BtpfjT5l.js → search-input-B9FxoKon.js} +1 -1
  246. package/dist/client/assets/{secrets-DriRRH1t.js → secrets-Ckg8Rd0M.js} +1 -1
  247. package/dist/client/assets/{sections-editor-C9C533d2.js → sections-editor-DfusxW9l.js} +1 -1
  248. package/dist/client/assets/{select-BOl9wnf6.js → select-BemZ3-RS.js} +1 -1
  249. package/dist/client/assets/{select-model-S4XMti-S.js → select-model-Dt_mcRLi.js} +1 -1
  250. package/dist/client/assets/{seo-editor-BFKhbHb8.js → seo-editor-BEgFLCyp.js} +1 -1
  251. package/dist/client/assets/{settings-tab-CzTdGYon.js → settings-tab-W9gLVP9Y.js} +1 -1
  252. package/dist/client/assets/{sheet-Ceo6cjp6.js → sheet-CAYJdNnO.js} +1 -1
  253. package/dist/client/assets/{shell-layout-CQI5EYIN.js → shell-layout-BZ9RU057.js} +1 -1
  254. package/dist/client/assets/{sidebar-Cr04YrvT.js → sidebar-kfvz7bzl.js} +1 -1
  255. package/dist/client/assets/{skill-preview-CJENC0FV.js → skill-preview-DKoageod.js} +1 -1
  256. package/dist/client/assets/{skills-_wNQ3Q4Z.js → skills-DZXynXjf.js} +1 -1
  257. package/dist/client/assets/{sso-DcjvBhN8.js → sso-aIkFrBYs.js} +1 -1
  258. package/dist/client/assets/{store-C8yaccqA.js → store-PyPRbE--.js} +1 -1
  259. package/dist/client/assets/store-registry-mk4k386L.js +2 -0
  260. package/dist/client/assets/{switch-DbzO6PiM.js → switch-CwYc17c1.js} +1 -1
  261. package/dist/client/assets/{synced-repos-CUy4rER9.js → synced-repos-LBwJXWce.js} +1 -1
  262. package/dist/client/assets/{table-CUSmiMk_.js → table-Dk8JamWN.js} +1 -1
  263. package/dist/client/assets/{tabs-52cPaZXm.js → tabs-CScSsCn-.js} +1 -1
  264. package/dist/client/assets/{task-board-CurTs85l.js → task-board-WxptS5oC.js} +1 -1
  265. package/dist/client/assets/{task-route-Bm0ou-_S.js → task-route-CgUDYaF5.js} +1 -1
  266. package/dist/client/assets/{task-status-BaM-QAj1.js → task-status-DYV2rHq2.js} +1 -1
  267. package/dist/client/assets/tasks-CwnRPaEK.js +1 -0
  268. package/dist/client/assets/{tasks-BwcO5_EM.js → tasks-Dyp4w1ZL.js} +1 -1
  269. package/dist/client/assets/{textarea-Q7sXwojB.js → textarea-C-rDHIo4.js} +1 -1
  270. package/dist/client/assets/{thread-intent-DEVJhxVt.js → thread-intent-Dqbb6tX6.js} +1 -1
  271. package/dist/client/assets/{thread-route-Dwt9n8IO.js → thread-route-B7ApJPMo.js} +1 -1
  272. package/dist/client/assets/{thread-route-D6xj1qQJ.js → thread-route-DGpNj7En.js} +1 -1
  273. package/dist/client/assets/{thread-sheet-body-BZp0HOAe.js → thread-sheet-body-CXERmuvO.js} +1 -1
  274. package/dist/client/assets/{toggle-group-CXPhZI2J.js → toggle-group-BwAc-516.js} +1 -1
  275. package/dist/client/assets/{toolbar-icon-button-B5qgEXx3.js → toolbar-icon-button-D5CIjxUn.js} +1 -1
  276. package/dist/client/assets/{tooltip-DIW02rf-.js → tooltip-D5dIOzcQ.js} +1 -1
  277. package/dist/client/assets/{track-B4UKRWe_.js → track-CfasnexS.js} +1 -1
  278. package/dist/client/assets/{types-B3jTqzVf.js → types-BKgDxdgt.js} +1 -1
  279. package/dist/client/assets/{usage-stats-Bb9Gp-Dh.js → usage-stats-CzjkHtFz.js} +1 -1
  280. package/dist/client/assets/{use-ai-providers-DMafZHsF.js → use-ai-providers-DHpBr525.js} +1 -1
  281. package/dist/client/assets/{use-automations-COtBDrNr.js → use-automations-D8fUWM0i.js} +1 -1
  282. package/dist/client/assets/{use-autosave-CVgSUfQU.js → use-autosave-BcXFrygg.js} +1 -1
  283. package/dist/client/assets/{use-connect-companion-DMsU19hB.js → use-connect-companion-BI8_ITvf.js} +1 -1
  284. package/dist/client/assets/{use-connection-Cgge7ejL.js → use-connection-1DEAzFaJ.js} +1 -1
  285. package/dist/client/assets/{use-copy-Cfn-m-ZW.js → use-copy-CrTQ1bFc.js} +1 -1
  286. package/dist/client/assets/{use-create-virtual-mcp-CIJNntTR.js → use-create-virtual-mcp-6onzYx_V.js} +1 -1
  287. package/dist/client/assets/{use-date-fns-locale-BUWupqqb.js → use-date-fns-locale-CKJk6bHw.js} +1 -1
  288. package/dist/client/assets/{use-debounced-autosave-Z2J2ec3T.js → use-debounced-autosave-CscEX7LB.js} +1 -1
  289. package/dist/client/assets/{use-debounced-value-DfSh3fpE.js → use-debounced-value-Cd1Twr6w.js} +1 -1
  290. package/dist/client/assets/{use-deco-credits-Du018wK9.js → use-deco-credits-DXbh8RF9.js} +1 -1
  291. package/dist/client/assets/{use-decopilot-events-B-nXlaQa.js → use-decopilot-events-BorkAE1x.js} +1 -1
  292. package/dist/client/assets/{use-delete-connection-CbdREeJX.js → use-delete-connection-D14lo6hH.js} +1 -1
  293. package/dist/client/assets/{use-deployment-admin-BfQ856y9.js → use-deployment-admin-CnWMkexv.js} +1 -1
  294. package/dist/client/assets/{use-entitlements-Bir1zQcD.js → use-entitlements-CW1G9reZ.js} +1 -1
  295. package/dist/client/assets/{use-fast-preview-draft-url-CI4dqTq2.js → use-fast-preview-draft-url-C6GlSiLC.js} +1 -1
  296. package/dist/client/assets/{use-file-configs-B04A692l.js → use-file-configs-CIuxe_Ni.js} +1 -1
  297. package/dist/client/assets/{use-infinite-scroll-NmeaxM7f.js → use-infinite-scroll-C3V6bChR.js} +1 -1
  298. package/dist/client/assets/{use-join-requests-DI0a8svX.js → use-join-requests-D9RxS7KW.js} +1 -1
  299. package/dist/client/assets/{use-main-panel-tabs-CBiJ8PZZ.js → use-main-panel-tabs-DXkaeHMV.js} +1 -1
  300. package/dist/client/assets/{use-mcp-auth-status-B5PR04-x.js → use-mcp-auth-status-BH9IDFQ1.js} +1 -1
  301. package/dist/client/assets/{use-mcp-client-2DKlVY7y.js → use-mcp-client-2uEIRhaM.js} +1 -1
  302. package/dist/client/assets/{use-mcp-prompts-DPn1lgbL.js → use-mcp-prompts-CoIIHF5C.js} +1 -1
  303. package/dist/client/assets/{use-mcp-tools-0KttftJq.js → use-mcp-tools-BEXh2Dal.js} +1 -1
  304. package/dist/client/assets/{use-members-BOo0dfib.js → use-members-B9Bp6K2N.js} +1 -1
  305. package/dist/client/assets/{use-mobile-dc5AlUoG.js → use-mobile-CpN-x3jP.js} +1 -1
  306. package/dist/client/assets/{use-navigate-to-agent-BsM0_8Qa.js → use-navigate-to-agent-D91bju80.js} +1 -1
  307. package/dist/client/assets/{use-open-billing-url-DU-RhPSk.js → use-open-billing-url-BerGO0rw.js} +1 -1
  308. package/dist/client/assets/{use-org-auth-client-EU2_QrcX.js → use-org-auth-client-r5wiYH2P.js} +1 -1
  309. package/dist/client/assets/{use-org-fs-CPcFon5v.js → use-org-fs-Bts9OSaP.js} +1 -1
  310. package/dist/client/assets/{use-org-notice-CJ4ginwY.js → use-org-notice-CoJcS75H.js} +1 -1
  311. package/dist/client/assets/{use-org-sso-DliUqcof.js → use-org-sso-dhAsVLFb.js} +1 -1
  312. package/dist/client/assets/{use-organization-roles-DWRM5Xlm.js → use-organization-roles-kAP23ZDQ.js} +1 -1
  313. package/dist/client/assets/{use-organization-settings-CZaZMu7C.js → use-organization-settings-OP1vKLQc.js} +1 -1
  314. package/dist/client/assets/{use-panel-navigate-ClG-UYrb.js → use-panel-navigate-DArr9jKh.js} +1 -1
  315. package/dist/client/assets/{use-project-native-view-presence-YmT7vpKk.js → use-project-native-view-presence-7Bqoz-C1.js} +1 -1
  316. package/dist/client/assets/{use-project-scope-CsFUzitf.js → use-project-scope-DUmb12wa.js} +1 -1
  317. package/dist/client/assets/{use-registry-connections-JpgvKLOj.js → use-registry-connections-T5KGR_Hv.js} +1 -1
  318. package/dist/client/assets/{use-releases-Bgl6UW0_.js → use-releases-C3yM6r03.js} +1 -1
  319. package/dist/client/assets/{use-reports-diagnostic-eNPzfjim.js → use-reports-diagnostic-vTs5yUh0.js} +1 -1
  320. package/dist/client/assets/{use-route-default-main-DDalOeoB.js → use-route-default-main-D6cfsdMd.js} +1 -1
  321. package/dist/client/assets/{use-secrets-WK-wxIoH.js → use-secrets-CVFKBXHe.js} +1 -1
  322. package/dist/client/assets/{use-section-preview-base-CUFpzI8Q.js → use-section-preview-base-YyD8NP1s.js} +1 -1
  323. package/dist/client/assets/{use-session-runtime-CwgGPQkM.js → use-session-runtime-Dg7Dw6FF.js} +1 -1
  324. package/dist/client/assets/{use-tags-BqLVEjBd.js → use-tags-yE947YEK.js} +1 -1
  325. package/dist/client/assets/{use-task-metadata-D1gl7viW.js → use-task-metadata-Cxd6otqh.js} +1 -1
  326. package/dist/client/assets/{use-thread-outputs-BnQmraib.js → use-thread-outputs-HjlkcFr2.js} +1 -1
  327. package/dist/client/assets/{use-view-mode-BLK8sDZS.js → use-view-mode-BsvAwGGR.js} +1 -1
  328. package/dist/client/assets/{use-virtual-mcp-vVWql7vM.js → use-virtual-mcp-De5-1hZU.js} +1 -1
  329. package/dist/client/assets/useInfiniteQuery-TmIWCfQ-.js +1 -0
  330. package/dist/client/assets/{useQueries-Do0UR3yN.js → useQueries-Dg8jJOK1.js} +1 -1
  331. package/dist/client/assets/useSuspenseInfiniteQuery-C8wrcyHJ.js +1 -0
  332. package/dist/client/assets/{users-DtkqmbRr.js → users-DmBfcg5F.js} +1 -1
  333. package/dist/client/assets/{utils-WGdymi8M.js → utils-Bx7x03n7.js} +1 -1
  334. package/dist/client/assets/{variant-calendar-DBuSS1Kj.js → variant-calendar-DPR_CnEY.js} +1 -1
  335. package/dist/client/assets/{variant-matcher-override-zmFjw0un.js → variant-matcher-override-DyHDH8Wv.js} +1 -1
  336. package/dist/client/assets/{view-mode-toggle-5ObOX782.js → view-mode-toggle-Cr1ou40b.js} +1 -1
  337. package/dist/client/assets/{virtual-mcp-DhQhvEKt.js → virtual-mcp-BvoWP1mU.js} +1 -1
  338. package/dist/client/index.html +1 -1
  339. package/dist/server/cli.js +1 -1
  340. package/dist/server/server.js +1 -1
  341. package/package.json +1 -1
  342. package/dist/client/assets/agent-app-CmHjLSBh.js +0 -1
  343. package/dist/client/assets/agent-deck-BmbZkAAh.js +0 -1
  344. package/dist/client/assets/agent-file-DWz6GUfE.js +0 -1
  345. package/dist/client/assets/agent-library-file-Buf4K-5l.js +0 -1
  346. package/dist/client/assets/agent-settings-D9FokKv0.js +0 -1
  347. package/dist/client/assets/agent-site-editor-code-Bjs5yYWF.js +0 -2
  348. package/dist/client/assets/agent-view-DMFjk5Go.js +0 -1
  349. package/dist/client/assets/api-keys-CWLFncf0.js +0 -1
  350. package/dist/client/assets/app-editor-BwzQ2tDT.js +0 -1
  351. package/dist/client/assets/category-editor-DYvQntUV.js +0 -1
  352. package/dist/client/assets/mock-board-CRzDhPtf.js +0 -90
  353. package/dist/client/assets/project-reports-N4YBKsf_.js +0 -1
  354. package/dist/client/assets/project-tasks-Bhadpjy2.js +0 -1
  355. package/dist/client/assets/record-editor-B7I5ENzo.js +0 -1
  356. package/dist/client/assets/registry-C0G-_nW5.js +0 -2
  357. package/dist/client/assets/reports-B1m4nLcC.js +0 -1
  358. package/dist/client/assets/store-registry-C4goSG7S.js +0 -2
  359. package/dist/client/assets/tasks-B9F5PMjK.js +0 -1
  360. package/dist/client/assets/useInfiniteQuery-BUDJQ-a0.js +0 -1
  361. package/dist/client/assets/useSuspenseInfiniteQuery-BCBsko2y.js +0 -1
@@ -1,90 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-DE-oHInD.js","assets/index-CfiHR5p3.js","assets/index-DTEWW9mB.css","assets/index-BzGfYuHA.js","assets/ArrowUp-B2y3FAZT.js","assets/chat-context-Bj6XM8r6.js","assets/use-panel-navigate-ClG-UYrb.js","assets/thread-route-D6xj1qQJ.js","assets/use-project-scope-CsFUzitf.js","assets/use-virtual-mcp-vVWql7vM.js","assets/use-mcp-client-2DKlVY7y.js","assets/auth-UveS8wF5.js","assets/github-repo-BknN0SVI.js","assets/autosend-BsJQ1aCs.js","assets/thread-intent-DEVJhxVt.js","assets/slugify-CEUa2lfQ.js","assets/hooks-C4BbSdNW.js","assets/backoff-8mStPHYB.js","assets/task-board-CurTs85l.js","assets/schema-kS1q2dfz.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-Bir1zQcD.js","assets/use-ai-providers-DMafZHsF.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-B-nXlaQa.js","assets/use-organization-settings-CZaZMu7C.js","assets/gateway-client-2Mbrw7Hg.js","assets/tooltip-DIW02rf-.js","assets/index-B7wVUCeI.js","assets/dialog-DKHdGeG-.js","assets/X-Dr0Tqjzv.js","assets/drawer-B1TxBXeW.js","assets/collection-search-BgR7E5C_.js","assets/SearchMd-B6arCmyn.js","assets/use-mobile-dc5AlUoG.js","assets/use-mcp-prompts-DPn1lgbL.js","assets/index-BIFBhz6Y.js","assets/form-CCI8usbr.js","assets/label-DCUE6TYd.js","assets/input-DOqceFPC.js","assets/utils-CVEq3hMx.js","assets/input-SZCoDRD-.js","assets/command-palette-store-3XeVzDCK.js","assets/chat-draft-B57QKpbd.js","assets/use-session-runtime-CwgGPQkM.js","assets/ArrowRight-_qaicB3i.js","assets/agent-icon-I_u5FzRN.js","assets/AlertCircle-CZODjB-G.js","assets/Tool01-DW_T3YR5.js","assets/ArrowLeft-qXobBdxD.js","assets/Tool02-zLL5jksN.js","assets/TrendUp01-CSoUpxS1.js","assets/ZoomOut-BLK0GcJv.js","assets/Users03-DSBIUomT.js","assets/CheckCircle-Cpa5ukkn.js","assets/Check-DYuLLcXz.js","assets/ChevronUp-B-GxN-tN.js","assets/ChevronRight-BvrNCsKT.js","assets/DotsVertical-BKAvE_4x.js","assets/UserSquare-BdoEkD8Z.js","assets/Copy01-BKbbYkAO.js","assets/CreditCard01-D16_sfKz.js","assets/Database01-C9bPAMOv.js","assets/MessageCircle01-CweHuqp7.js","assets/Download01-BvE_0avp.js","assets/Printer-AWNoUKRJ.js","assets/Settings02-Cng3FY1l.js","assets/Eye-CO0I0F0e.js","assets/File02-Cnt06RSY.js","assets/Share07-BgGqkker.js","assets/GitBranch01-BPIVJl4U.js","assets/Globe01-DjDoxbql.js","assets/SwitchHorizontal01-BaPOYupn.js","assets/HardDrive-UFyvehqQ.js","assets/Image01-D3ZQNp9r.js","assets/Key01-0kVvyKcG.js","assets/Link01-Ct7pxTAu.js","assets/LinkExternal01-DCfxP5B_.js","assets/Monitor01-BWZHqfxa.js","assets/Sun-B2S_0TDV.js","assets/Package-T9dujty4.js","assets/Palette-B9i9hnCi.js","assets/Play-BIZK_qUZ.js","assets/Plus-DaMIkku0.js","assets/SearchLg-C2sftj0S.js","assets/Shield01-CVF7EZQb.js","assets/Stars01-DSWmseOt.js","assets/Trash01-CchLM2HV.js","assets/Upload01-G3c4UCfB.js","assets/User01-CZRm273k.js","assets/Users01-D_H_0-Jf.js","assets/XCircle-Ce8PGmrS.js","assets/XClose-5naA93fy.js","assets/Zap-XMkPrxNc.js","assets/select-BOl9wnf6.js","assets/usage-stats-Bb9Gp-Dh.js","assets/use-copy-Cfn-m-ZW.js","assets/markdown-CCv5IlPx.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/tabs-52cPaZXm.js","assets/use-deco-credits-Du018wK9.js","assets/toggle-group-CXPhZI2J.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-DU-RhPSk.js","assets/decopilot-BQ5v61IW.js","assets/checkbox-DXk_ASm3.js","assets/ai-providers-logos-DD3qZ33J.js","assets/avatar-DV69nhm1.js","assets/download-app-dialog-BhmQVCrs.js","assets/popover-RErMjkys.js","assets/index-S-urKMuN.js","assets/input-S-gsq7gD.js","assets/hooks-DxP9ms8F.js","assets/use-org-fs-CPcFon5v.js","assets/dropdown-menu-CoycaRIZ.js","assets/question-004-sINsf4GQ.js","assets/use-members-BOo0dfib.js","assets/use-org-auth-client-EU2_QrcX.js","assets/feature-paywall-2uPHyVRd.js","assets/plan-ladder-ClS63sS8.js","assets/add-connection-dialog-BFK-aGDM.js","assets/extract-connection-data-Bs0-7FAn.js","assets/metadata-dUsYcpuu.js","assets/github-D4UJ99TO.js","assets/connection-D83jUgKt.js","assets/connection-card-B6pHDnUn.js","assets/use-registry-connections-JpgvKLOj.js","assets/use-connection-Cgge7ejL.js","assets/useInfiniteQuery-BUDJQ-a0.js","assets/infiniteQueryObserver-F_wqd-Rj.js","assets/retry-i8LvYSZg.js","assets/connection-slug-CITJ0kGN.js","assets/integration-icon-_HXUWC0Q.js","assets/textarea-Q7sXwojB.js","assets/connection-form-helpers-CjgrOGRh.js","assets/authenticate-and-persist-oauth-CrVNvw_C.js","assets/mcp-oauth-DbZXTEaP.js","assets/collection-tabs-BKMxlcTD.js","assets/badge-Bx6TdTjC.js","assets/use-infinite-scroll-NmeaxM7f.js","assets/useSuspenseInfiniteQuery-BCBsko2y.js","assets/pair-Dpg5RzdY.js","assets/collapsible-DvCpQaDP.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-BVpwtvW6.js","assets/types-B3jTqzVf.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-CQI5EYIN.js","assets/anchors-yqDzZN4K.js","assets/use-org-notice-CJ4ginwY.js","assets/command-PF8SQ01C.js","assets/index-CR7IhZdQ.js","assets/project-icon-B0ih2u61.js","assets/required-auth-layout-BwX4AD0R.js","assets/use-org-sso-DliUqcof.js","assets/shell-layout-CuFt8bor.css","assets/sheet-Ceo6cjp6.js","assets/use-navigate-to-agent-BsM0_8Qa.js","assets/use-thread-outputs-BnQmraib.js","assets/file-type-icon-SwABlaSO.js","assets/decofile-api-DGTmPuak.js","assets/use-releases-Bgl6UW0_.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-CsT5D-QV.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/empty-state-BuDUIKwc.js","assets/index-L41E_jdu.js","assets/index-wju8DM5a.js","assets/resizable-DDt8g8vK.js","assets/use-route-default-main-DDalOeoB.js","assets/toolbar-icon-button-B5qgEXx3.js","assets/alert-dialog-dzu9U-o1.js","assets/task-status-BaM-QAj1.js","assets/use-main-panel-tabs-CBiJ8PZZ.js","assets/use-mcp-tools-0KttftJq.js","assets/use-task-metadata-D1gl7viW.js","assets/use-project-native-view-presence-YmT7vpKk.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-B04A692l.js","assets/site-slug-uya6Wp4-.js","assets/virtual-mcp-DhQhvEKt.js","assets/legacy-main-redirect-34brc64A.js","assets/preview-dialog-DXRDlQ04.js","assets/preview-content-Cir3xjov.js","assets/file-preview-CZ1TplhI.js","assets/utils-WGdymi8M.js","assets/editor-BEf-Idam.js","assets/file-share-button-I_P-fFZ5.js","assets/blocks-preview-workspace-context-CzxgcZDm.js"])))=>i.map(i=>d[i]);
2
- import{c as D,l as M,eG as No,j as i,eH as _o,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 Bo,a as il,f as ll,as as Qr,ai as Ao,D as Do,ax as On,u as Ro,d as ol,au as Eo,v as cl,N as pi,o as mi,ag as $o,F as Mo,eI as Io,E as zo,eJ as Lo}from"./index-CfiHR5p3.js";import{T as st,n as Po,i as Oo,a as Fo,b as gi,K as Ho,P as qo,d as Ko,D as Uo,f as Wo,e as Go,g as Vo,s as Qo,S as Yo,v as Zo,u as Xo,C as Jo}from"./rich-text-link-control-BU04B-4N.js";import{g as Ke}from"./get-initials-D-f_fDFw.js";import{A as Ue}from"./avatar-DV69nhm1.js";import{T as ec,a as tc,c as sc}from"./tooltip-DIW02rf-.js";import{V as nc,W as rc,Y as ac,w as ic,aG as lc,aD as oc,aH as Ia,aI as cc,T as Qn,aJ as xi,aK as dc,v as dl,c as za,aL as uc,d as ul,J as fc,N as Yr,y as Mr,am as La,a4 as Zr,aM as hc,n as pc}from"./agent-icon-I_u5FzRN.js";import{i as Xn}from"./CheckCircle-Cpa5ukkn.js";import{i as Pa}from"./ChevronRight-BvrNCsKT.js";import{i as fl}from"./SwitchHorizontal01-BaPOYupn.js";import{s as cr}from"./Plus-DaMIkku0.js";import{i as Yn}from"./X-Dr0Tqjzv.js";import{a as lr,b as Ir,P as zr}from"./popover-RErMjkys.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-CoycaRIZ.js";import{b as mc,S as jt,m as pr,s as hl,k as pl,t as ml,n as gc,o as gl,q as Na,l as dr,r as xl,f as $t,T as kl,e as Xe,P as Xr,v as xc,w as bl,x as kc,y as bc,z as yc,A as wc,B as vc,u as jc,C as Sc,a as ki,D as Tc,E as Cc,F as yl,G as Nc,i as _c,c as Bc,H as Ac,I as Dc,J as Rc,L as _a,K as bi,M as Ec,N as $c,O as Mc,Q as Ic,R as zc}from"./task-route-Bm0ou-_S.js";import{R as Lc}from"./repository-import-picker-C2CebsOL.js";import{a as Fa}from"./use-members-BOo0dfib.js";import{a as Ha}from"./format-time-BtXRrtv4.js";import{u as qa,a as Pc,b as Oc}from"./use-tags-BqLVEjBd.js";import{a as Ka,g as wl}from"./use-organization-settings-CZaZMu7C.js";import{d as Pr,b as Or,D as Fr,h as vl,c as jl,e as Sl}from"./dialog-DKHdGeG-.js";import{B as Fc,a as Hc,b as yi,c as qc,d as Kc,e as Uc}from"./breadcrumb-D4EWX36X.js";import{C as Ua}from"./calendar-BGdb4p0V.js";import{A as Wc,a as Gc,b as Vc}from"./alert-DwSbSu1x.js";import{C as Qc,a as Yc,b as Zc}from"./collapsible-DvCpQaDP.js";import{u as va}from"./use-copy-Cfn-m-ZW.js";import{i as qt}from"./AlertCircle-CZODjB-G.js";import{i as Gn}from"./Check-DYuLLcXz.js";import{t as Wa}from"./ChevronUp-B-GxN-tN.js";import{i as Tl,b as Xc}from"./UserSquare-BdoEkD8Z.js";import{a as Jc}from"./Copy01-BKbbYkAO.js";import{i as Ba}from"./Globe01-DjDoxbql.js";import{n as ur}from"./LinkExternal01-DCfxP5B_.js";import{m as ed,a as td,M as Cl}from"./markdown-CCv5IlPx.js";import{R as sd,e as nd,S as Re,C as rd,D as ad,i as Nl,n as id,f as ld}from"./task-board-CurTs85l.js";import{a as od,E as Ga,r as wt,t as cd,v as dd,w as _l,x as Ft,y as wi,z as ud,A as fd,B as vi,C as hd,G as fr,N as Ut,m as St,H as Hr,T as Bl,R as Va,I as Qa,h as pd,J as md,K as gd,L as xd,O as kd,Q as bd,s as Al,S as yd,u as Dl,b as Rl,U as wd,c as vd}from"./index-BIFBhz6Y.js";import{B as jd,c as Sd,t as Td,C as El,f as Cd,g as ji,s as Nd,m as Si,a as Ti,b as _d,d as Ci,e as Bd,h as Ad,i as Dd,j as Rd,k as Ed,l as $d,n as Md}from"./index-BW3bCYgD.js";import{i as Id}from"./Link01-Ct7pxTAu.js";import{s as zd}from"./Trash01-CchLM2HV.js";import{c as Ld,e as $l,s as Ml}from"./hooks-DxP9ms8F.js";import{n as Pd}from"./Download01-BvE_0avp.js";import{i as Od}from"./File02-Cnt06RSY.js";import{d as Ya,e as Za,c as Xa,C as Ja,b as Vn,a as qr}from"./command-PF8SQ01C.js";import{u as Fd}from"./use-org-auth-client-EU2_QrcX.js";import{h as Hd,b as qd}from"./use-org-fs-CPcFon5v.js";import{d as Kd,S as Ni}from"./sandbox-start-errors-BK_aDCyt.js";import{i as Ud,c as Wd}from"./hooks-C4BbSdNW.js";import{p as Gd,r as Vd,G as Qd,u as Yd}from"./repository-picker-5XZZ15v0.js";import{u as Il}from"./use-connection-Cgge7ejL.js";import{e as Zd,b as Xd}from"./use-virtual-mcp-vVWql7vM.js";import{s as Jd}from"./use-project-scope-CsFUzitf.js";import{l as eu}from"./github-repo-scope-C8GSbvaz.js";import{s as tu}from"./User01-CZRm273k.js";import{c as su,S as nu,a as ru,b as au}from"./sheet-Ceo6cjp6.js";import{T as iu}from"./thread-sheet-body-BZp0HOAe.js";import{u as lu}from"./use-mcp-client-2DKlVY7y.js";import{i as ou}from"./ArrowUp-B2y3FAZT.js";import{i as cu}from"./Tool01-DW_T3YR5.js";import{u as du}from"./use-open-billing-url-DU-RhPSk.js";import{s as uu,w as fu}from"./chat-draft-B57QKpbd.js";import{u as hu}from"./shell-layout-CQI5EYIN.js";const pu={github:"pull",gitlab:"-/merge_requests",bitbucket:"pull-requests"};function mu(t,e){return`${Vd(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=Gd(`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:`${No}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:_o,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=Po(l);if(S===""){p();return}if(!Oo(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(Id,{size:14}),e[13]=y):y=e[13];let w;e[14]!==f||e[15]!==m||e[16]!==x?(w=i.jsx(st,{active:f,label:m,onClick:x,children:y}),e[14]=f,e[15]=m,e[16]=x,e[17]=w):w=e[17];let v;e[18]!==f||e[19]!==b||e[20]!==l||e[21]!==s||e[22]!==c||e[23]!==n||e[24]!==p||e[25]!==r?(v=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(zd,{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]=v):v=e[26];let j;return e[27]!==w||e[28]!==v?(j=i.jsxs("div",{className:"relative",children:[w,v]}),e[27]=w,e[28]=v,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},zl=[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=od(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(jd,{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(nc,{size:14})}),i.jsx(st,{active:o.italic,label:r("markdownEditor.italic"),onClick:()=>s.chain().focus().toggleItalic().run(),children:i.jsx(rc,{size:14})}),i.jsx(st,{active:o.strike,label:r("markdownEditor.strikethrough"),onClick:()=>s.chain().focus().toggleStrike().run(),children:i.jsx(ac,{size:14})}),i.jsx(st,{active:o.code,label:r("markdownEditor.code"),onClick:()=>s.chain().focus().toggleCode().run(),children:i.jsx(ic,{size:14})}),i.jsx(ja,{}),zl.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(lc,{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:zl.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 Ll(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}[.)])/,Pl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ol=le(Pl).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(Pl).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(),Eu=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]*?(?:-->|$))/,$u=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(),Fl=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",Fl).getRegex(),ii={blockquote:Mu,code:Nu,def:Ru,fences:_u,heading:Bu,hr:mr,html:$u,lheading:Ol,list:Eu,newline:Cu,paragraph:Fl,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",Ol).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lu=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Hl=/^( {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(),ql=/(?!~)[\p{P}\p{S}]/u,Hu=/(?!~)[\s\p{P}\p{S}]/u,qu=/(?:[^\s\p{P}\p{S}]|~)/u,Ku=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(),Kl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Uu=le(Kl,"u").replace(/punct/g,Jn).getRegex(),Wu=le(Kl,"u").replace(/punct/g,ql).getRegex(),Ul="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gu=le(Ul,"gu").replace(/notPunctSpace/g,li).replace(/punctSpace/g,ea).replace(/punct/g,Jn).getRegex(),Vu=le(Ul,"gu").replace(/notPunctSpace/g,qu).replace(/punctSpace/g,Hu).replace(/punct/g,ql).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(),Kr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nf=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Kr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wl=le(/^!?\[(label)\]\[(ref)\]/).replace("label",Kr).replace("ref",ri).getRegex(),Gl=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",ri).getRegex(),rf=le("reflink|nolink(?!\\()","g").replace("reflink",Wl).replace("nolink",Gl).getRegex(),Ai=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,oi={_backpedal:Ht,anyPunctuation:Ju,autolink:ef,blockSkip:Ku,br:Hl,code:Pu,del:Ht,delLDelim:Ht,delRDelim:Ht,emStrongLDelim:Uu,emStrongRDelimAst:Gu,emStrongRDelimUnd:Qu,escape:Lu,link:nf,nolink:Gl,punctuation:Fu,reflink:Wl,reflinkSearch:rf,tag:sf,text:Ou,url:Ht},af={...oi,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",Kr).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Kr).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(Hl).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 Ei(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 $i(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 Ur=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),w=this.rules.other.blockquoteBeginRegex(g);for(;t;){let v=t.split(`
22
- `,1)[0],j;if(h=v,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)||w.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+=v+`
25
- `,t=t.substring(v.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=Ei(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(Ei(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)),$i(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 $i(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 Ur,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=Ur;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 Ur(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}}},Kt=new ff;function fe(t,e){return Kt.parse(t,e)}fe.options=fe.setOptions=function(t){return Kt.setOptions(t),fe.defaults=Kt.defaults,Ll(fe.defaults),fe};fe.getDefaults=ti;fe.defaults=Wt;fe.use=function(...t){return Kt.use(...t),fe.defaults=Kt.defaults,Ll(fe.defaults),fe};fe.walkTokens=function(t,e){return Kt.walkTokens(t,e)};fe.parseInline=Kt.parseInline;fe.Parser=rt;fe.parser=rt.parse;fe.Renderer=Wr;fe.TextRenderer=ci;fe.Lexer=nt;fe.lexer=nt.lex;fe.Tokenizer=Ur;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,cd(dd(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=_l(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(w=>w.trim());if(y.length>0){const w=Math.min(...y.map(j=>j.length-j.trimStart().length)),v=m.map(j=>j.trim()?j.slice(w):"").join(`
66
- `).trim();v&&(b=this.markedInstance.lexer(`${v}
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 w=this.normalizeParseResult(y);Array.isArray(w)?e.push(...w):w&&e.push(w)}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||[];ud(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=fd(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(hd(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(v=>[v.type,v])),x=this.getMarksToOpenForSerialization(a,h,u),g=gf(h,u),p=g.filter(v=>a.has(v)),k=p.length>0&&x.length>0;let b="";if(g.length>0&&!k){const v=f.match(/(\s+)$/);v&&(b=v[1],f=f.slice(0,-b.length))}k||g.slice().reverse().forEach(v=>{if(!a.has(v))return;const j=h.get(v),S=this.getMarkClosing(v,j,o.get(v));S&&(f+=S),a.has(v)&&(a.delete(v),o.delete(v))});let m="";if(x.length>0){const v=f.match(/^(\s+)/);v&&(m=v[1],f=f.slice(m.length))}x.forEach(({type:v,mark:j})=>{const S=l.has(v)?"html":"markdown",T=this.getMarkOpening(v,j,S);T&&(f=T+f),o.set(v,S),l.delete(v)}),k||x.slice().reverse().forEach(({type:v,mark:j})=>{a.set(v,j)}),f=m+f;let y;if(k){const v=new Set((u?.marks||[]).map(T=>T.type));x.forEach(({type:T})=>{v.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 w="";if(y.length>0){const v=f.match(/(\s+)$/);v&&(w=v[1],f=f.slice(0,-w.length))}y.forEach(v=>{var j;const S=(j=a.get(v))!==null&&j!==void 0?j:h.get(v),T=this.getMarkClosing(v,S,o.get(v));T&&(f+=T),a.delete(v),o.delete(v)}),f+=w,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 w=(y=x.get(b))!==null&&y!==void 0?y:"markdown";return o.set(b,w),this.getMarkOpening(b,m,w)});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 Vl=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 Ql(){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 Yl(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 Zl(t){var e;return t.children.length>0?!1:((e=t.textContent)!==null&&e!==void 0?e:"").replace(Bf,"")===""}function Xl(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=Ut.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:Yl},align:Ql()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:t=>Zl(t)?{}:!1,getContent:(t,e)=>Xl(e.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",St(this.options.HTMLAttributes,t),0]}}),Df=Ut.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:Yl},align:Ql()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:t=>Zl(t)?{}:!1,getContent:(t,e)=>Xl(e.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",St(this.options.HTMLAttributes,t),0]}}),Rf=Ut.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 Ea(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,w]=Ea(r,b);c.style.setProperty(y,w)}c=c.nextSibling}else{const y=document.createElement("col"),[w,v]=Ea(r,b);y.style.setProperty(w,v),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 Ef=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 $f(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]=Ea(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 Er=({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(Bl.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(v=>e.renderChildren(v)).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",w=Nf(k.attrs);p.push({text:m,isHeader:y,align:w})}),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=Ut.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Ef,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}=$f(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(Bl.near(r.doc.resolve(o)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Md(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>$d(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})=>Rd(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Dd(t,e),deleteRow:()=>({state:t,dispatch:e})=>{const s=Hr(t.selection.$from,r=>r.type.name==="table");return Ad(t,e&&(r=>{s&&Li(r,s.pos),e(r)}))},deleteTable:()=>({state:t,dispatch:e})=>Bd(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})=>_d(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Si(t,e)?!0:Ti(t,e),setCellAttribute:(t,e)=>({state:s,dispatch:r})=>Nd(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&&Cd(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:Er,"Mod-Backspace":Er,Delete:Er,"Mod-Delete":Er}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Sd({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Td({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:_l(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 Kf(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(Od,{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(Pd,{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:Uf,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 Uf(t){return t.preventDefault()}function Wf(t){return t.preventDefault()}function Gf(t){return t.replace(/([[\]])/g,"\\$1")}const Vf=Ut.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(Kf)}});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 Jl=Ut.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?ed(e,s):`@${s}`},addNodeView(){return Va(Qf)}}),Yf="studio.mention-members.",$a=new Map;function Pi(t){const e=$a.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 $a.set(t,n),n}catch{return}}function Zf(t,e){$a.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=Fd(),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 eo{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 pd("markdownEditorMention");function th(t,e,s){t.chain().focus().insertContentAt(e,[{type:"mention",attrs:{id:s.id,name:s.name}},{type:"text",text:" "}]).run(),$l(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 to(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,"")}),$l(t.view,ta)}function so(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"?(to(this.editor,t),t.close(),!0):!1,onExit:()=>{t.latched||t.close()}})};return[Ld(e)]}})}const Fi=256,nh=40,Hi=280,rh=140;function no(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&&to(e.editor,t),t.close()},y=v=>{const j=v.relatedTarget;if((!j||e.editor?.view.dom.contains(j)===!0)&&t.latched){o?.focus();return}m()},w=v=>{!e.editor||!e.range||(th(e.editor,e.range,v),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:v=>{v.key==="Escape"&&(v.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(v=>i.jsxs(Vn,{value:`${v.name} ${v.email}`,onSelect:()=>w(v),onMouseDown:j=>j.preventDefault(),className:"gap-2",children:[i.jsx(Ue,{url:v.image??void 0,fallback:Ke(v.name),shape:"circle",size:"xs"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.name})]},v.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=Ut.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(w=>w.type===b.type.name),y=xd(b,m);return Object.keys(f).forEach(w=>{!n.has(w)&&!(w in y)&&d.removeAttribute(w)}),Object.entries(y).forEach(([w,v])=>{n.has(w)||(v!=null?d.setAttribute(w,v):d.removeAttribute(w))}),h(y.src),f=y,!0},g=new gd({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[md({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",ro="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(`${ro}/`)}const gh={openOnClick:!1,autolink:!0,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}},xh=kd.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=td(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[Al.configure({heading:{levels:[1,2,3]},underline:!1,link:!1}),xh.configure(gh),Ml.configure({placeholder:t}),qf,bd,yd.configure({nested:!0}),fh,Vf,Jl,...e?[so(e)]:[],Vl.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}=Hd(Ma),s=qd(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:ro,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 Ki(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(wd.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 eo),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)?Ki(g,b,"image",{src:y,alt:m.name}):Ki(g,b,"attachment",{href:y,name:m.name}))}})(),!0),h=Dl({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(no,{store:o}),i.jsx(Rl,{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(oc,{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 Eh(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 ao(t){if(t.status!=="completed")return!1;const e=t.conclusion;return e==="success"||e==="neutral"||e==="skipped"}function $h(t,e,s){return t!=="failing"||s||e.length===0?null:{passed:e.filter(ao).length,total:e.length}}function Mh(t,e){return new URL(e,t).toString()}function io(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}const Ui=()=>0;function Ih(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 Ud.subscribe(e,d)}),L.useSyncExternalStore(a.current,Ui,Ui)}const lo=1440*60*1e3,zh=40;function oo(t){try{const e=window.localStorage.getItem(al.taskBoardPrs(t));return e?JSON.parse(e):{}}catch{return{}}}function Lh(t){const e=Date.now(),s=Object.entries(t).filter(([,r])=>e-r.updatedAt<=lo);for(s.sort(([,r],[,n])=>r.updatedAt-n.updatedAt);s.length>zh;)s.shift();return Object.fromEntries(s)}function Wi(t,e){if(typeof window>"u")return null;const s=oo(t)[e];return!s||Date.now()-s.updatedAt>lo?null:s}function Ph(t,e,s){if(!(typeof window>"u"))try{const r=oo(t);r[e]={data:s,updatedAt:Date.now()},window.localStorage.setItem(al.taskBoardPrs(t),JSON.stringify(Lh(r)))}catch{}}const Oh=6e4,Fh=2e3,Hh=t=>t.state===null;function co(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],Ih(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 Ph(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:qh,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 qh(t){return t.state.data?.some(Hh)?Fh:Oh}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 Uh(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 Wh(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 uo(t){return t?sd:[]}function Gh(t,e,s){return e.length===0?!0:nd(t,e,{cycleStartedAt:s})}function Vh(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 Qh(t){return t==="in_review"||t==="approved"}const Yh=[],Zh=[];function fo(t,e){const s=D.c(4),r=e===void 0?Yh:e,n=Zd();let a;if(s[0]!==n||s[1]!==r||s[2]!==t){const l=Jd(n);a=mc(l,[...t.map(Xh),...r]),s[0]=n,s[1]=r,s[2]=t,s[3]=a}else a=s[3];return a}function Xh(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 w;e[31]!==y?(w=i.jsx("span",{className:"truncate",children:y}),e[31]=y,e[32]=w):w=e[32];let v;e[33]!==k||e[34]!==b||e[35]!==w?(v=i.jsxs(Vn,{value:k,onSelect:b,className:"gap-2",children:[m,w]}),e[33]=k,e[34]=b,e[35]=w,e[36]=v):v=e[36];let j;e[37]!==p||e[38]!==v?(j=i.jsxs(qr,{children:[p,v]}),e[37]=p,e[38]=v,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=$=>i.jsxs(Vn,{value:$.user?.name??$.userId,onSelect:()=>r($.userId),className:"gap-2",children:[i.jsx(Ue,{url:$.user?.image??void 0,fallback:Ke($.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:$.user?.name??$.userId})]},$.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 E;return e[54]!==A||e[55]!==o?(E=i.jsxs(Ya,{children:[o,A]}),e[54]=A,e[55]=o,e[56]=E):E=e[56],E}function Jh({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 ep(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 tp(t){return{id:t.threadId,title:t.title,status:t.status,created_at:t.createdAt,virtual_mcp_id:t.virtualMcpId}}function sp(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 np(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:Bo,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=Il(),c=Xd(),{data:d}=Fa();let u;e[3]!==s?(u=tp(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 rp(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(sp,{title:s.title??n("taskBoard.taskDialog.superAgentDefaultName")}),children:i.jsx(np,{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 ap=["[&_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 ip(t){const e=D.c(24),{placeholder:s,onSubmit:r,onEmptyChange:n,ref:a,className:l}=t,[o]=L.useState(lp);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=Al.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=so(o),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==s?(u=Ml.configure({placeholder:s}),e[3]=s,e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==u?(f=[c,Jl,d,u,Vl],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",ap),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=v=>{const{editor:j}=v;return n(j.isEmpty)},e[11]=n,e[12]=g):g=e[12];const p=Dl({extensions:f,editorProps:{attributes:x,handleKeyDown:(v,j)=>j.key!=="Enter"||j.shiftKey||ta.getState(v.state)?.active?!1:(j.preventDefault(),k(),!0)},onUpdate:g});function k(){if(!p)return;const v=p.getMarkdown().trim();v&&(r(v),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(Rl,{editor:p,className:l}),e[16]=l,e[17]=p,e[18]=m):m=e[18];let y;e[19]!==o?(y=i.jsx(no,{store:o}),e[19]=o,e[20]=y):y=e[20];let w;return e[21]!==y||e[22]!==m?(w=i.jsxs(i.Fragment,{children:[m,y]}),e[21]=y,e[22]=m,e[23]=w):w=e[23],w}function lp(){return new eo}function op(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(cc,{size:16,className:"shrink-0 text-muted-foreground"}),e[1]=y):y=e[1];let w;e[2]!==o||e[3]!==s?(w=dp(s,o),e[2]=o,e[3]=s,e[4]=w):w=e[4];let v;e[5]!==w?(v=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:w}),e[5]=w,e[6]=v):v=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]!==v?(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,v,j]}),e[8]=v,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,w)=>i.jsxs(L.Fragment,{children:[i.jsx(Ta,{inset:w>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(po,{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 cp=new Intl.ListFormat(void 0,{style:"long",type:"conjunction"});function dp(t,e){const s=[t,...t.replies],r=cp.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 up(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(po,{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(ho,{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(fp,{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(Cl,{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 fp(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 ho(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=Ke(s.name),e[1]=s.name,e[2]=n):n=e[2];let a;return e[3]!==r||e[4]!==n?(a=i.jsx(Ue,{url:r,fallback:n,shape:"circle",size:"xs"}),e[3]=r,e[4]=n,e[5]=a):a=e[5],a}function po(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(ip,{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 w;e[13]===Symbol.for("react.memo_cache_sentinel")?(w=()=>o.current?.focus(),e[13]=w):w=e[13];const v=w;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:v,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(ho,{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:v,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 hp(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 pp(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()=>hp((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 w;e[26]!==h||e[27]!==y?(w={mutationFn:y,onSuccess:h},e[26]=h,e[27]=y,e[28]=w):w=e[28];const v=Wn(w);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]!==v||e[33]!==m||e[34]!==j?(S={threads:j,post:p,setResolved:m,remove:v},e[31]=p,e[32]=v,e[33]=m,e[34]=j,e[35]=S):S=e[35],S}function mp(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 gp=3;function xp(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}=mp(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(yp)),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(bp),k=[...u&&x?[x]:[],...p],b=k.slice(0,gp),m=k.length-b.length,y=!s||c.isPending;let w;e[13]!==c||e[14]!==u?(w=()=>c.mutate(!u),e[13]=c,e[14]=u,e[15]=w):w=e[15];let v;e[16]!==u||e[17]!==n?(v=n(u?"taskBoard.taskDialog.unsubscribe":"taskBoard.taskDialog.subscribe"),e[16]=u,e[17]=n,e[18]=v):v=e[18];let j;e[19]!==y||e[20]!==w||e[21]!==v?(j=i.jsx(ue,{type:"button",variant:"ghost",size:"sm",disabled:y,onClick:w,className:"h-7 px-2 text-sm font-normal text-muted-foreground",children:v}),e[19]=y,e[20]=w,e[21]=v,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(kp),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 kp(t){return i.jsx(Ue,{url:t.user?.image??void 0,fallback:Ke(t.user?.name),shape:"circle",size:"xs",className:"-ml-2 ring-2 ring-background first:ml-0"},t.userId)}function bp(t){return!!t}function yp(t){return[t.userId,t]}function hi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function mo(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Qi=560,wp=2e3,go=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 vp(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(Xc,{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 jp(t){const e=D.c(7),{item:s}=t,r=ee(),{data:n}=co(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(Sp),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 Sp(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 xo(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(Qc,{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(Yc,{children:n}),e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=i.jsxs(Zc,{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 ko(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 w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w={strict:!1},e[0]=w):w=e[0];const{agentId:v}=ll(w),{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=Ka("delivery_lanes_enabled"),{handleCopy:A,copied:E}=va(),{handleCopy:R,copied:$}=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=Pc(),U=Oc();let H;e[5]===Symbol.for("react.memo_cache_sentinel")?(H={slug:"mcp-github"},e[5]=H):H=e[5];const Y=Il(H);let W;e[6]!==Y?(W=eu(Y),e[6]=Y,e[7]=W):W=e[7];const q=fo(Zh,W),ne=hl(q),ae=a?.title??"",te=a?.description??"",oe=a?.status??l??rd[0],ce=a?.priority??"medium",_e=a?.type??ad,Ae=a?.assigneeId??null,he=a?.repo??o??null,ge=a?.dueDate;let ke;e[8]!==ge?(ke=mo(ge),e[8]=ge,e[9]=ke):ke=e[9];let xe;e[10]!==a?.tags?(xe=a?.tags.map(_p)??[],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:K,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,[Ee,Ce]=L.useState(!1),[it,er]=L.useState(!1),Oe=it&&!Ee;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,$e={...We.current,...B};We.current=$e,Lt.current=c,Te($e),a&&(Le.current&&clearTimeout(Le.current),ye?Le.current=setTimeout(ze,wp):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 $e=ye.target;if($e instanceof HTMLElement&&($e.isContentEditable||$e instanceof HTMLInputElement||$e instanceof HTMLTextAreaElement)){$e.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]!==U||e[48]!==Q?(z=B=>{U.mutate(B),Q({tagIds:We.current.tagIds.filter(re=>re!==B)})},e[47]=U,e[48]=Q,e[49]=z):z=e[49];const me=z,De=_===Re,He=a&&g&&(K==="triage"||K==="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]!==K?(wr=Na(K),e[61]=K,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]!==v||e[64]!==s||e[65]!==Me||e[66]!==E||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[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]!==K||e[88]!==m||e[89]!==J){Ne=!!a&&Nl(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(Fc,{className:"-ml-2",children:i.jsxs(Hc,{className:"text-[15px]",children:[i.jsx(yi,{children:i.jsx(qc,{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(Uc,{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 $e;e[119]!==v||e[120]!==E||e[121]!==R||e[122]!==pe||e[123]!==A||e[124]!==a||e[125]!==$||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]!==K||e[136]!==m?($e=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}${gc(y.slug,a,v)}`),Ve.success(m("taskBoard.taskDialog.linkCopied"))},children:$?i.jsx(Gn,{size:16}):i.jsx(dc,{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:[E?i.jsx(Gn,{size:16}):i.jsx(Jc,{size:16}),m("taskBoard.taskDialog.copyDescription")]}),u&&i.jsxs(we,{onSelect:u,children:[i.jsx(uc,{size:16}),m("taskBoard.taskDialog.cloneTask")]}),f&&K!=="archived"&&i.jsxs(we,{onSelect:()=>{mt(),f()},children:[i.jsx(Ao,{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]=v,e[120]=E,e[121]=R,e[122]=pe,e[123]=A,e[124]=a,e[125]=$,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]=K,e[136]=m,e[137]=$e):$e=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]!==$e||e[145]!==ct?(Pn=i.jsxs("div",{className:"flex items-center gap-0.5",children:[re,ye,$e,ct]}),e[142]=re,e[143]=ye,e[144]=$e,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=Np,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=Cp,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]=v,e[64]=s,e[65]=Me,e[66]=E,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[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]=K,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(Do,{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(Jp,{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]!==Ee||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(Tp),children:[i.jsx(Wa,{size:14,className:M("transition-transform",Ee&&"rotate-180")}),m(Ee?"taskBoard.taskDialog.showLess":"taskBoard.taskDialog.showMore")]}),e[200]=Ee,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(Fp,{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 So="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(jp,{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]!==K?(Ts=M(a?gl({...a,status:K}):Na(K).iconClassName),e[230]=a,e[231]=K,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]!==K||e[237]!==m?(Ns=dr(K,m),e[236]=K,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:$e}=dr(re,m),ct=$e.icon;return i.jsxs(we,{onSelect:()=>Q({status:re}),className:"gap-2",children:[i.jsx(ct,{size:16,className:$e.iconClassName}),ye]},re)},e[246]=Q,e[247]=m,e[248]=B):B=e[248],Bs=xl(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 Es;e[257]!==ia?(Es=M(vt,ia),e[257]=ia,e[258]=Es):Es=e[258];const la=$t[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=$t[Ie];let $s;e[261]!==m||e[262]!==ca.labelKey?($s=m(ca.labelKey),e[261]=m,e[262]=ca.labelKey,e[263]=$s):$s=e[263];let Ms;e[264]!==Ne||e[265]!==Rs||e[266]!==Es||e[267]!==oa||e[268]!==$s?(Ms=i.jsx(Qe,{asChild:!0,children:i.jsxs("button",{type:"button",disabled:Ne,title:Rs,className:Es,children:[oa,$s]})}),e[264]=Ne,e[265]=Rs,e[266]=Es,e[267]=oa,e[268]=$s,e[269]=Ms):Ms=e[269];let Is;e[270]!==Q||e[271]!==m?(Is=kl.map(B=>{const re=$t[B].icon;return i.jsxs(we,{onSelect:()=>Q({type:B}),children:[i.jsx(re,{size:16}),m($t[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 Ks;e[295]!==qs?(Ks=i.jsx(Ye,{align:"start",className:"w-40",children:qs}),e[295]=qs,e[296]=Ks):Ks=e[296];let Us;e[297]!==Hs||e[298]!==Ks?(Us=i.jsxs(Ze,{children:[Hs,Ks]}),e[297]=Hs,e[298]=Ks,e[299]=Us):Us=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(Ue,{url:qe.user?.image??void 0,fallback:Ke(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(Ue,{url:qe.user?.image??void 0,fallback:Ke(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(Ue,{url:yt.user?.image??void 0,fallback:Ke(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?go.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(Ua,{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(vp,{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]!==Us?(on=i.jsxs(Lr,{label:Ss,children:[Ds,Ls,Us,Js,an,ln]}),e[348]=Js,e[349]=an,e[350]=ln,e[351]=Ss,e[352]=Ds,e[353]=Ls,e[354]=Us,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(fc,{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=id(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(Jh,{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(xc,{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,To="start",Co="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(bl,{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:To,className:Co,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:So,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(rp,{thread:zt,onClose:Dn}),e[433]=zt,e[434]=Dn,e[435]=Rn):Rn=e[435];let En;e[436]!==ze||e[437]!==k||e[438]!==a||e[439]!==m||e[440]!==J?(En=!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]=En):En=e[441];let Cr;e[442]!==An||e[443]!==Rn||e[444]!==En||e[445]!==Rt?(Cr=i.jsxs(i.Fragment,{children:[Rt,An,Rn,En]}),e[442]=An,e[443]=Rn,e[444]=En,e[445]=Rt,e[446]=Cr):Cr=e[446];const $n=Cr;if(s==="page"){let B;e[447]!==Bt||e[448]!==_t?(B=ye=>{const $e=Bt(ye),ct=_t(ye);return()=>{$e?.(),ct?.()}},e[447]=Bt,e[448]=_t,e[449]=B):B=e[449];let re;return e[450]!==$n||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:$n}),e[450]=$n,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]!==$n||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,$n]}),e[459]=$n,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 Tp(t){return!t}function Cp(t){t.key==="Enter"&&t.preventDefault()}function Np(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function _p(t){return t.id}function Bp(t){const e=D.c(2);let s;return e[0]!==t?(s=i.jsx(ko,{...t,chrome:"dialog"}),e[0]=t,e[1]=s):s=e[1],s}function Ap(t){const e=D.c(2);let s;return e[0]!==t?(s=i.jsx(ko,{...t,chrome:"page"}),e[0]=t,e[1]=s):s=e[1],s}function Dp(t,e){switch(t.status){case"failed":return yc(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:hc};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 Rp(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?Dp({...s,status:s.status},a):null,c=s.lastMessage;let d;e[5]!==s.title?(d=ld(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(Ue,{url:r.user?.image??void 0,fallback:Ke(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:Tl}: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 $p(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 Mp=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);function Ip(t){if(t.status!=="completed")return{icon:La,className:"text-warning",spin:!0};const e=t.conclusion;return e&&Mp.has(e)?{icon:qt,className:"text-destructive",spin:!1}:ao(t)?{icon:Xn,className:"text-success",spin:!1}:{icon:Zr,className:"text-muted-foreground",spin:!1}}function zp(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 E;return e[3]!==A?(E=i.jsxs(ue,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,children:[N,A]}),e[3]=A,e[4]=E):E=e[4],E}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;e[8]!==n?(E=n("taskBoard.taskDialog.previewUnavailable"),e[8]=n,e[9]=E):E=e[9];let R;return e[10]!==N||e[11]!==E?(R=i.jsxs(ue,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,title:N,children:[A,E]}),e[10]=N,e[11]=E,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 w;e[30]!==b||e[31]!==m?(w=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]=w):w=e[32];let v;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],v=r.map(N),e[33]=r,e[34]=s,e[35]=v}else v=e[35];let j;e[38]!==v?(j=i.jsx(Ye,{align:"start",children:v}),e[38]=v,e[39]=j):j=e[39];let S;e[40]!==w||e[41]!==j?(S=i.jsxs(Ze,{children:[w,j]}),e[40]=w,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 Lp(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=$p(s.checksStatus,h);let m;e[13]!==s||e[14]!==l?(m=Eh(s,l),e[13]=s,e[14]=l,e[15]=m):m=e[15];const{isOpen:y,hasConflict:w,showShip:v,showResolveConflict:j}=m,S=!!a||!!s.previewUrl||v||j,T=s.checks??[],N=T.length>0||b!=null,A=T.length>0,E=$h(s.checksStatus,T,x),R=E?{label:h("taskBoard.taskDialog.prChecksScore",E),className:"text-warning",icon:qt}:b,$=n&&"revalidating-ring";let F;e[16]!==$?(F=M("flex flex-col gap-3 rounded-xl bg-card p-3 card-shadow",$),e[16]=$,e[17]=F):F=e[17];const P=yu(s.url)?.repo.provider??"github";let I;e[18]!==P?(I=i.jsx(Qd,{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 U;e[22]!==k?(U=i.jsx(k.icon,{size:13}),e[22]=k,e[23]=U):U=e[23];let H;e[24]!==k||e[25]!==U||e[26]!==V?(H=i.jsxs("span",{className:V,children:[U,k.label]}),e[24]=k,e[25]=U,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]!==w||e[38]!==y||e[39]!==h?(q=w&&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]=w,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]!==v||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(zp,{url:s.previewUrl,routes:r}),v&&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(Tl,{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]=v,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(Pp),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=Ip(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(Cl,{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 Pp(t){return!t}function Op(){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 Fp(t){const e=D.c(56),{item:s,description:r,onOpenPreview:n}=t,a=ee(),{data:l,isLoading:o,isFetching:c}=co(s.id),{data:d}=ui(s.id),u=wl(),f=Uh(s.id),h=Wh(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 v=ep(r),j=o&&!l;if(!j&&(!l||l.length===0)&&v.length===0){m=null;break e}let S;e[20]!==d||e[21]!==s.reviewCycleStartedAt||e[22]!==s.status||e[23]!==u?(S=Qh(s.status)&&Gh(d??[],uo(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;e[28]!==h||e[29]!==a?(E=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):E=e[30];const R=E;let $;e[31]!==s.threads||e[32]!==n?($=n?s.threads.find(qp):void 0,e[31]=s.threads,e[32]=n,e[33]=$):$=e[33];const F=$;x=xo,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(Op,{}):(l??[]).map(P=>i.jsx(Lp,{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=v.map(Hp)}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 w;return e[52]!==x||e[53]!==b||e[54]!==y?(w=i.jsx(x,{label:b,children:y}),e[52]=x,e[53]=b,e[54]=y,e[55]=w):w=e[55],w}function Hp(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 qp(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(Qp)),u={id:c?.user?.id??"me",name:c?.user?.name??l("taskBoard.taskDialog.commentYouLabel"),image:c?.user?.image},f=pp(s.id),h=y=>{if(y===Re)return{id:y,name:l("taskBoard.taskDialog.superAgentLabel"),isAgent:!0};if(y===u.id)return u;const w=d.get(y);return{id:y,name:w?.user?.name??y,image:w?.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(w=>({id:w.id,author:h(w.authorId),body:w.body,createdAt:w.createdAt,replies:[]}))})),g=[...(o??[]).filter(kc).map(Vp),...s.threads.filter(bc).map(Gp),...x.map(Wp)].sort(Up),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 w=p[p.length-1];w?.type==="timeline"?w.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(xp,{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(xo,{label:k,action:b,children:i.jsxs("div",{className:"flex flex-col gap-5",children:[i.jsx(up,{me:u,onSubmit:m}),p.map((y,w)=>y.type==="timeline"?i.jsx(Zp,{items:y.items,memberByUserId:d},`timeline-${w}`):y.type==="comment"?i.jsx(op,{thread:y.comment,me:u,onReply:v=>f.post.mutate({body:v,parentId:y.comment.id}),onDelete:v=>f.remove.mutate(v),onToggleResolved:()=>f.setResolved.mutate({id:y.comment.id,resolved:!y.comment.resolved})},`comment-${y.comment.id}`):i.jsx(Rp,{thread:y.thread,startedBy:n,onOpen:a},`thread-${y.thread.threadId}`))]})})}function Up(t,e){return e.at-t.at}function Wp(t){return{kind:"comment",at:new Date(t.createdAt).getTime(),comment:t}}function Gp(t){return{kind:"thread",at:new Date(t.createdAt).getTime(),thread:t}}function Vp(t){return{kind:"activity",at:new Date(t.occurredAt).getTime(),activity:t}}function Qp(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 $r(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 Kn(t,e){return e(t==="qa"?"taskBoard.taskDialog.qaAgentLabel":t==="code_review"?"taskBoard.taskDialog.codeReviewerLabel":"taskBoard.taskDialog.reviewerLabel")}function Yp(t,e,s){const r=h=>{const x=typeof h=="string"?wc[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=mo(typeof h=="string"?h:null);return x?i.jsx(Pt,{icon:i.jsx(Yr,{size:14,className:"text-muted-foreground"}),label:go.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(Ue,{url:x?.user?.image??void 0,fallback:Ke(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:Kn(h,e)}),d=t.data,u=$r("from"),f=$r("to");switch(t.action){case"created":return e("taskBoard.taskDialog.activityCreated");case"status_changed":{const h=io([{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:$r("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:$r("name")}),{name:c(d.reviewer)});case"review_approved":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewApprovedWithNotes",{reviewer:Kn(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewApproved",{reviewer:Kn(d.reviewer,e)});case"review_changes_requested":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewChangesRequestedWithNotes",{reviewer:Kn(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewChangesRequested",{reviewer:Kn(d.reviewer,e)});case"review_verdict_requested":return e("taskBoard.taskDialog.activityReviewVerdictRequested",{reviewer:Kn(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 Zp(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(Ue,{url:y?.user?.image??void 0,fallback:Ke(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)," ",Yp(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(Xp),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 Xp(t){return!t}function Jp(t){const e=D.c(33),{item:s,orgSlug:r,onRerun:n}=t,a=ee(),{data:l}=ui(s.id);let o;e[0]!==l?(o=l??[],e[0]=l,e[1]=o):o=e[1];let c;e[2]!==o?(c=io(o),e[2]=o,e[3]=c):c=e[3];const d=c;if(!d)return null;const u=d.code===Ni.githubNotAuthenticated,f=d.code===Ni.githubConnectionMissing;let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(qt,{}),e[4]=h):h=e[4];let x;e[5]!==a?(x=a("taskBoard.taskDialog.runFailedTitle"),e[5]=a,e[6]=x):x=e[6];let g;e[7]!==x?(g=i.jsx(Wc,{children:x}),e[7]=x,e[8]=g):g=e[8];let p;e[9]!==f||e[10]!==d.message||e[11]!==u||e[12]!==a?(p=f?a("taskBoard.taskDialog.runFailedGithubMissing"):u?a("taskBoard.taskDialog.runFailedGithubAuth"):d.message,e[9]=f,e[10]=d.message,e[11]=u,e[12]=a,e[13]=p):p=e[13];let k;e[14]!==p?(k=i.jsx(Gc,{children:p}),e[14]=p,e[15]=k):k=e[15];let b;e[16]!==g||e[17]!==k?(b=i.jsxs("div",{className:"flex items-start gap-3",children:[h,i.jsxs("div",{className:"flex flex-col gap-1",children:[g,k]})]}),e[16]=g,e[17]=k,e[18]=b):b=e[18];let m;e[19]!==f||e[20]!==u||e[21]!==r||e[22]!==a?(m=(u||f)&&i.jsx(ue,{size:"sm",asChild:!0,children:i.jsx("a",{href:`/${r}/settings/connections`,children:a(f?"taskBoard.taskDialog.runFailedLinkRepo":"taskBoard.taskDialog.runFailedReconnect")})}),e[19]=f,e[20]=u,e[21]=r,e[22]=a,e[23]=m):m=e[23];let y;e[24]!==n||e[25]!==a?(y=n&&i.jsxs(ue,{size:"sm",variant:"outline",onClick:n,children:[i.jsx(Qr,{size:14}),a("taskBoard.taskBoard.rerun")]}),e[24]=n,e[25]=a,e[26]=y):y=e[26];let w;e[27]!==y||e[28]!==m?(w=i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 self-start",children:[m,y]}),e[27]=y,e[28]=m,e[29]=w):w=e[29];let v;return e[30]!==w||e[31]!==b?(v=i.jsxs(Vc,{variant:"destructive",className:"mt-2 flex-col",children:[b,w]}),e[30]=w,e[31]=b,e[32]=v):v=e[32],v}const em=["taskBoard.subscriptionPaywall.trialBenefitMonitoring","taskBoard.subscriptionPaywall.trialBenefitAutoFix","taskBoard.subscriptionPaywall.trialBenefitRuns"],tm="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover";function sm(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 w;e[0]!==n?(w=n("taskBoard.subscriptionPaywall.previewAlt"),e[0]=n,e[1]=w):w=e[1];let v;e[2]!==w?(v=i.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:i.jsx("img",{src:tm,alt:w,className:"h-[160px] w-full object-cover object-left-top"})}),e[2]=w,e[3]=v):v=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=em.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;e[14]!==A?(E=i.jsx("span",{className:"text-2xl font-semibold text-foreground",children:A}),e[14]=A,e[15]=E):E=e[15];let R;e[16]!==n?(R=n("taskBoard.subscriptionPaywall.trialPricePeriod"),e[16]=n,e[17]=R):R=e[17];let $;e[18]!==R?($=i.jsx("span",{className:"text-sm text-muted-foreground",children:R}),e[18]=R,e[19]=$):$=e[19];let F;e[20]!==$||e[21]!==E?(F=i.jsxs("div",{className:"flex items-baseline gap-1.5",children:[E,$]}),e[20]=$,e[21]=E,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 U;e[36]!==n?(U=n("taskBoard.subscriptionPaywall.subscribeButton"),e[36]=n,e[37]=U):U=e[37];let H;e[38]!==l||e[39]!==O||e[40]!==V||e[41]!==U?(H=i.jsxs(ue,{disabled:l,onClick:O,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[V,U]}),e[38]=l,e[39]=O,e[40]=V,e[41]=U,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]!==v||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:[v,Z]}),e[53]=v,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(vl,{children:h}),e[64]=h,e[65]=x):x=e[65];let g;e[66]!==f||e[67]!==x?(g=i.jsxs(jl,{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(Sl,{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 nm=new Set(["completed","failed","expired"]);function rm(t){return t.threads.some(e=>e.status!==null&&!nm.has(e.status))}function am(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(rm),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(vl,{children:x}),e[11]=x,e[12]=g):g=e[12];let p;e[13]!==h||e[14]!==g?(p=i.jsxs(jl,{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 w;e[26]!==l?(w=l("taskBoard.rerun.confirm"),e[26]=l,e[27]=w):w=e[27];let v;e[28]!==a||e[29]!==r||e[30]!==y||e[31]!==w?(v=i.jsxs(ue,{onClick:a,disabled:r,children:[y,w]}),e[28]=a,e[29]=r,e[30]=y,e[31]=w,e[32]=v):v=e[32];let j;e[33]!==m||e[34]!==v?(j=i.jsxs(Sl,{children:[m,v]}),e[33]=m,e[34]=v,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,im=90,el=5,lm="cubic-bezier(0.22, 0.61, 0.36, 1)";function om(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 w of d){const v=w.dataset.flipId;if(!v)continue;const j=w.getBoundingClientRect(),S=w.dataset.flipLane;if(u.set(v,{rect:j,lane:S}),!s||c)continue;const T=f.get(v);if(!T)continue;const N=T.rect.left-j.left,A=T.rect.top-j.top;(N||A)&&x.push({el:w,dx:N,dy:A,lane:T.lane!==S})}if(!s||h||x.length===0)return;const g=a.current,p=w=>{w instanceof HTMLElement&&(g.set(w,(g.get(w)??0)+1),w.style.overflow="visible")},k=w=>{if(!(w instanceof HTMLElement))return;const v=(g.get(w)??1)-1;if(v>0){g.set(w,v);return}g.delete(w),w.style.overflow=""};for(const w of x){const v=w.lane?` rotate(${w.dx>0?el:-el}deg)`:"";w.el.style.transition="none",w.el.style.transform=`translate(${w.dx}px, ${w.dy}px)${v}`,w.lane&&(w.el.style.zIndex="10",p(w.el.closest("[data-lane-scroll]")))}let b=0;const m=[],y=requestAnimationFrame(()=>{for(const w of x){const v=w.lane?b++*im:0;w.el.style.transition=`transform ${Ji}ms ${lm} ${v}ms`,w.el.style.transform="",m.push(window.setTimeout(()=>{w.el.style.transition="",w.el.style.transform="",w.el.style.zIndex="",w.lane&&k(w.el.closest("[data-lane-scroll]"))},Ji+v+30))}});return()=>{cancelAnimationFrame(y);for(const w of m)clearTimeout(w);for(const w of x)w.el.style.transition="",w.el.style.transform="",w.el.style.zIndex="",w.lane&&k(w.el.closest("[data-lane-scroll]"))}},[e,t,s,r])}function cm(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 dm=["overdue","today","week","none"],Un=t=>typeof t=="string"&&t!==""?t:null;function um(t){const e=Un(t.priority),s=Un(t.due),r=Un(t.tags);return{layout:t.view==="list"?"list":"board",filters:{search:Un(t.q)??"",assignee:Un(t.assignee),priority:Xr.includes(e)?e:null,due:dm.includes(s)?s:null,tags:r?r.split(",").filter(Boolean):[],project:Un(t.repo)}}}function fm(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 hm(t,e){const s=new Set(e.map(r=>r.id));return new Set([...t].filter(r=>s.has(r)))}function pm(){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=Ro(e),r=ol();let n;t[1]!==s?(n=um(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,...fm(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}Eo(()=>import("./route-DE-oHInD.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 mm=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function bo(t){const e=new Date(t),s=e.getTime()<Date.now();return{label:mm.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 gm(){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 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.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 km(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(yo,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function yo(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:wm,onPointerDown:ym,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:bm,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 bm(t){return t.stopPropagation()}function ym(t){return t.stopPropagation()}function wm(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(ec,{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(tc,{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(sc,{children:[n,a]}),e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function vm(t){const e=D.c(20),{type:s,onChange:r}=t,n=ee(),a=$t[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=kl.map(g=>{const p=$t[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",$t[g].iconClassName)}),n($t[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(yo,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function jm(t){const e=D.c(46),{iso:s,onChange:r}=t;let n;e[0]!==s?(n=zc(s),e[0]=s,e[1]=n):n=e[1];const a=n;let l;e[2]!==s?(l=bo(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,w;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=Cm,y=Tm,w=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]=w}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],w=e[19];if(p!==Symbol.for("react.early_return_sentinel"))return p;let v;e[20]!==f||e[21]!==u||e[22]!==k||e[23]!==b||e[24]!==m||e[25]!==y||e[26]!==w?(v=i.jsx(f,{variant:k,size:b,onClick:m,onPointerDown:y,className:w,children:u}),e[20]=f,e[21]=u,e[22]=k,e[23]=b,e[24]=m,e[25]=y,e[26]=w,e[27]=v):v=e[27];let j;e[28]!==h||e[29]!==g||e[30]!==v?(j=i.jsx(h,{asChild:g,children:v}),e[28]=h,e[29]=g,e[30]=v,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:Sm,children:i.jsx(Ua,{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 E;return e[42]!==x||e[43]!==j||e[44]!==A?(E=i.jsxs(x,{children:[j,A]}),e[42]=x,e[43]=j,e[44]=A,e[45]=E):E=e[45],E}function Sm(t){return t.stopPropagation()}function Tm(t){return t.stopPropagation()}function Cm(t){return t.stopPropagation()}function Nm(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:Bm,ref:_m,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 _m(t){return t?.parentElement?.style.setProperty("--fade-text-end",`${t.offsetWidth}px`)}function Bm(t){return t.stopPropagation()}function Am(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(vm,{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(jm,{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(km,{priority:s.priority,onChange:c}),e[17]=s.priority,e[18]=c,e[19]=y):y=e[19];let w;e[20]!==r||e[21]!==s.reviewVerdicts?(w=r&&i.jsx(Em,{summary:r.summary,verdicts:s.reviewVerdicts,enabled:r.enabled}),e[20]=r,e[21]=s.reviewVerdicts,e[22]=w):w=e[22];let v;e[23]!==a||e[24]!==n||e[25]!==s||e[26]!==l||e[27]!==o?(v=i.jsx(vo,{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]=v):v=e[28];let j;e[29]!==y||e[30]!==w||e[31]!==v?(j=i.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[y,w,v]}),e[29]=y,e[30]=w,e[31]=v,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 Dm(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 Rm(t){const e=D.c(7),{iso:s}=t;let r,n;if(e[0]!==s){const{label:o,overdue:c}=bo(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 wo(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=w=>{const v=r.find(T=>T.reviewer===w),j=a("taskBoard.taskDialog.reviewerLabel"),S=v?v.verdict==="changes_requested"?a("taskBoard.taskBoard.checksChangesRequested"):a(v.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]},w)},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 $m(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(Mo,{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 Mm(t){const e=D.c(3),s=uo(wl());if(t.reviewVerdicts.length===0&&t.status!=="in_review"&&!t.reviewCycleStartedAt)return null;const r=Vh(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 vo(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 w;e[0]!==n||e[1]!==d?(w=n?.user?.name?d("taskBoard.taskBoard.assignedToSuperAgentBy",{name:n.user.name}):d("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=n,e[1]=d,e[2]=w):w=e[2];const v=w;if(!c){let N;return e[3]!==n||e[4]!==v?(N=n?i.jsx(Ue,{url:n.user?.image??void 0,fallback:Ke(n.user?.name),shape:"circle",size:"xs",title:v}):null,e[3]=n,e[4]=v,e[5]=N):N=e[5],N}let j;e[6]!==n?(j=n&&i.jsx(Ue,{url:n.user?.image??void 0,fallback:Ke(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]!==v?(T=i.jsxs("span",{className:"inline-flex items-center",title:v,children:[j,S]}),e[9]=j,e[10]=v,e[11]=T):T=e[11],T}if(r){const w=r.user?.image??void 0,v=r.user?.name;let j;e[12]!==v?(j=Ke(v),e[12]=v,e[13]=j):j=e[13];let S;return e[14]!==w||e[15]!==j?(S=i.jsx(Ue,{url:w,fallback:j,shape:"circle",size:"xs"}),e[14]=w,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=w=>{w.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=w=>{l(w),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:Im,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 Im(t){return t.stopPropagation()}function xg(){const t=D.c(105),e=ee(),{items:s,isLoading:r}=vc(),{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=jc(),c=Yd();let d,u;if(t[2]!==c.data){const C=(c.data??[]).filter(Ym);d=C.length>0,u=C.map(Qm),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 w;t[7]===Symbol.for("react.memo_cache_sentinel")?(w=[],t[7]=w):w=t[7];const[v,j]=L.useState(w),S=()=>{if(v.length!==0){if(p(Re)){j([]);return}for(const C of v)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(Vm)),t[8]=T?.data?.members,t[9]=N,t[10]=A):(N=t[9],A=t[10]);const E=A,{filters:R,setFilters:$,layout:F,setLayout:P}=pm(),I=fo(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 U=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 Ee)De.status===C&&me.add(De.id);return me}),te=()=>Z(new Set),oe=C=>{$(C),te()},[ce,_e]=L.useState(!1),[Ae,he]=L.useState(null),{setTaskId:ge}=hu(),{create:ke}=Wd(),xe=Mt(),{org:Be,locator:Se}=Je(),Te=Be,J=ol(),pe=()=>{J({to:"/$org/settings/task-board",params:{org:Te.slug}})};let K;t[18]===Symbol.for("react.memo_cache_sentinel")?(K={strict:!1},t[18]=K):K=t[18];const{taskKey:be}=ll(K),_=Sc(s,be)??null,se=!!be&&!_&&!r,X=_?ki(Te.slug,_):null;let de;t[19]!==J||t[20]!==be?(de=()=>{be&&J({to:".",params:Gm,search:Wm,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=$o(Te.id).id,De=await xe.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:C.id}).then(Um).catch(Km),He=cm(C,De),Ge={type:"doc",content:[{type:"paragraph",content:[vd({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=>$c(C,R,I),t[22]=R,t[23]=I,t[24]=ve):ve=t[24];const Ee=s.filter(ve),Ce=hm(W,Ee);let it;t[25]!==H?(it=C=>!Mc.includes(C.status)||H.shownTaskBoardLanes.includes(C.status),t[25]=H,t[26]=it):it=t[26];const er=Ee.filter(it);let Oe;t[27]!==R||t[28]!==I||t[29]!==$?(Oe=C=>{const z=Ic({repo:C},R.project,I);z!==R.project&&$({...R,project:z})},t[27]=R,t[28]=I,t[29]=$,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:qm})};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:Hm,search:Fm,replace:!0}),t[35]=C):C=t[35],C}if(X&&X!==be)return i.jsx(pi,{to:".",params:C=>({...C,taskKey:X}),search:Om,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:pc,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(Tc,{filters:R,members:N,tags:l,index:I,onChange:oe,onOpenBoardSettings:pe})}),i.jsx("div",{className:"hidden sm:block",children:i.jsx(Cc,{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")})}):Ee.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(Ac),children:e("taskBoard.taskBoard.clearFilters")})]})}):F==="board"?i.jsx(Xm,{visible:!_,items:Ee,members:N,memberByUserId:E,selectedIds:Ce,onToggleSelect:ne,onSelectAllInLane:ae,onOpen:nr,onCreate:sr,onMove:(C,z,me)=>{const De=yl(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(c1,{item:C,assignee:C.assigneeId?E.get(C.assigneeId):void 0,assignedBy:C.assignedBy?E.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(Ap,{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=Nl(_)?{}:{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(Pm)}),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]!==U||t[75]!==lt||t[76]!==ce||t[77]!==Pe||t[78]!==Nt||t[79]!==mt?(gt=i.jsx(Bp,{open:ce,onClose:lt,defaultStatus:Nt,defaultRepo:U,isSaving:o.create.isPending,onSubmit:mt},Pe),t[73]=o.create.isPending,t[74]=U,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(Lc,{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(sm,{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]!==v||t[91]!==tt?(Bt=i.jsx(am,{items:v,pending:o.rerun.isPending,onOpenChange:tt,onConfirm:S}),t[88]=o.rerun.isPending,t[89]=S,t[90]=v,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(Zm,{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(Lm);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(zm)?()=>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 zm(t){return t.assigneeId===Re&&t.status!=="done"}function Lm(t){return t.id}function Pm(t){return t.id}function Om(t){return t}function Fm(t){return t}function Hm(t){return{...t,taskKey:void 0}}function qm(t){return t}function Km(){return[]}function Um(t){return t.prs}function Wm(t){return t}function Gm(t){return{...t,taskKey:void 0}}function Vm(t){return[t.userId,t]}function Qm(t){return t.path}function Ym(t){return t.usable}function Zm(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=Ka("delivery_lanes_enabled");let w;e[2]!==s||e[3]!==p?(w=p("taskBoard.taskBoard.selectedCount",{count:s}),e[2]=s,e[3]=p,e[4]=w):w=e[4];let v;e[5]!==w?(v=i.jsx("span",{className:"pl-1 text-sm font-medium text-foreground",children:w}),e[5]=w,e[6]=v):v=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=xl(y).map(J),e[15]=y,e[16]=l,e[17]=p,e[18]=A}else A=e[18];let E;e[22]!==A?(E=i.jsx(qn,{children:A}),e[22]=A,e[23]=E):E=e[23];let R;e[24]!==E||e[25]!==N?(R=i.jsxs(Fn,{children:[N,E]}),e[24]=E,e[25]=N,e[26]=R):R=e[26];let $;e[27]!==p?($=p("taskBoard.taskBoard.changePriorityButton"),e[27]=p,e[28]=$):$=e[28];let F;e[29]!==$?(F=i.jsx(Hn,{children:$}),e[29]=$,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 U;e[43]!==r||e[44]!==d?(U=i.jsx(qn,{className:"w-56 p-0",children:i.jsx(fi,{members:r,onSelect:d})}),e[43]=r,e[44]=d,e[45]=U):U=e[45];let H;e[46]!==V||e[47]!==U?(H=i.jsxs(Fn,{children:[V,U]}),e[46]=V,e[47]=U,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(bl,{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(Ua,{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]!==v?(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:[v,Ae,he,ge,Se]})}),e[98]=Ae,e[99]=he,e[100]=ge,e[101]=Se,e[102]=v,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 Xm(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=Ka("delivery_lanes_enabled"),[y,w]=L.useState(null);let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[0]=v):v=e[0];const[j,S]=L.useState(v);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),[E,R]=cl(),$=L.useRef(null);let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=_=>{if($.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}),()=>{$.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})}om($,I.map(n1).join(","),y===null,b);const G=_=>I.filter(se=>se.status===_).sort(sl),{lanes:O,hidden:V,hideable:U}=Nc({deliveryEnabled:m,shownLanes:E.shownTaskBoardLanes,occupied:I.map(s1)});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=yl(X,_.length);A(ie=>{const Ie=new Map(ie);return _.forEach((ve,Ee)=>Ie.set(ve,{status:se,sortOrder:de[Ee]})),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:Qo},e[9]=oe):oe=e[9];const ce=Fo(gi(qo,te),gi(Ho,oe)),_e=_=>{const se=String(_.active.id),X=W(_.over?.id),de=I.find(Ee=>Ee.id===se);if(!X||!de||de.status===X)return;const ie=q(se),Ie=String(_.over?.id??""),ve=G(X).filter(Ee=>!ie.includes(Ee.id));ae(ie,X,bi(ve,Ie.startsWith(_a)?null:Ie,se))},Ae=_=>{const se=String(_.active.id);w(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),Ee=Ie.startsWith(_a)?ie.length-1:ie.findIndex(je=>je.id===Ie),Ce=ve===-1||Ee===-1?ie:Go(ie,ve,Ee);if(s.filter(je=>je.status===X).sort(sl).map(t1).join()===Ce.map(e1).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=_=>{w(String(_.active.id)),S([])},e[13]=xe):xe=e[13];let Be;e[14]===Symbol.for("react.memo_cache_sentinel")?(Be=()=>{w(null),A(new Map)},e[14]=Be):Be=e[14];const Se=rl.createPortal,Te=Ko,J=null,pe=he&&i.jsxs("div",{className:"relative w-[292px] cursor-grabbing",children:[i.jsx(jo,{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:Jm,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 K;e[15]!==Te||e[16]!==pe?(K=i.jsx(Te,{dropAnimation:J,children:pe}),e[15]=Te,e[16]=pe,e[17]=K):K=e[17];let be;return e[18]!==Se||e[19]!==K?(be=Se(K,document.body),e[18]=Se,e[19]=K,e[20]=be):be=e[20],i.jsxs(Uo,{sensors:ce,collisionDetection:Wo,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(a1,{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:U.includes(_)?()=>Y(_,!1):void 0},_)),V.length>0&&i.jsx(r1,{statuses:V,countOf:_=>G(_).length,onShow:_=>Y(_,!0)})]})}),be]})}function Jm(){}function e1(t){return t.id}function t1(t){return t.id}function s1(t){return t.status}function n1(t){return`${t.id}:${t.status}`}function r1(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 a1(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:w}=t,v=ee(),{label:j,visual:S}=dr(s,v),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:E}=Vo(A),R=o&&"bg-muted/50";let $;e[2]!==R?($=M("flex h-full w-[300px] shrink-0 flex-col rounded-xl py-1 transition-colors",R),e[2]=R,e[3]=$):$=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 U;e[11]!==r.length?(U=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]=U):U=e[12];let H;e[13]!==j||e[14]!==v?(H=v("taskBoard.taskBoard.laneMenuAriaLabel",{lane:j}),e[13]=j,e[14]=v,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]!==v?(q=v("taskBoard.taskBoard.selectAllInLane"),e[22]=v,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]!==w||e[28]!==v?(ae=w&&i.jsx(we,{onClick:w,children:v("taskBoard.taskBoard.hideColumn")}),e[27]=w,e[28]=v,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]!==v?(ce=v("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:j}),e[36]=j,e[37]=v,e[38]=ce):ce=e[38];let _e;e[39]!==j||e[40]!==v?(_e=v("taskBoard.taskBoard.newTaskInLaneTitle",{lane:j}),e[39]=j,e[40]=v,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]!==U||e[52]!==oe||e[53]!==ge||e[54]!==P||e[55]!==O?(ke=i.jsxs("div",{className:P,children:[O,V,U,oe,ge]}),e[50]=V,e[51]=U,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(i1),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=K=>i.jsx(l1,{item:K,assignee:K.assigneeId?a.get(K.assigneeId):void 0,assignedBy:K.assignedBy?a.get(K.assignedBy):void 0,members:n,selected:l.has(K.id),hidden:c.includes(K.id),landed:d.includes(K.id),onToggleSelect:()=>u(K.id),onOpen:()=>h(K),onAutoFix:g?()=>g(K):void 0,onRerun:p?()=>p(K):void 0,onAssign:k?be=>k(K.id,be):void 0,onPriorityChange:b?be=>b(K.id,be):void 0,onTypeChange:m?be=>m(K.id,be):void 0,onDueDateChange:y?be=>y(K.id,be):void 0},K.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(Yo,{items:xe,strategy:Zo,children:Be}),e[88]=xe,e[89]=Be,e[90]=Se):Se=e[90];let Te;e[91]!==E||e[92]!==s||e[93]!==Se?(Te=i.jsx("div",{ref:E,"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,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]!==$?(J=i.jsxs("div",{"data-lane":s,className:$,children:[ke,Te]}),e[95]=s,e[96]=ke,e[97]=Te,e[98]=$,e[99]=J):J=e[99],J}function i1(t){return t.id}function l1(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}=Xo(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=Jo.Translate.toString(u),e[12]=u,e[13]=m):m=e[13];const y=h||s?0:void 0;let w;e[14]!==m||e[15]!==y||e[16]!==f?(w={transform:m,transition:f,opacity:y},e[14]=m,e[15]=y,e[16]=f,e[17]=w):w=e[17];let v;e[18]!==r||e[19]!==a||e[20]!==d||e[21]!==p||e[22]!==b||e[23]!==w?(v=i.jsx(jo,{...a,item:r,dragRef:d,bindings:p,className:b,style:w}),e[18]=r,e[19]=a,e[20]=d,e[21]=p,e[22]=b,e[23]=w,e[24]=v):v=e[24];let j;return e[25]!==r.id||e[26]!==r.status||e[27]!==v?(j=i.jsx("div",{className:"flex","data-flip-id":x,"data-flip-lane":g,children:v}),e[25]=r.id,e[26]=r.status,e[27]=v,e[28]=j):j=e[28],j}function jo(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(),w=Mm(s);let v;e[0]!==s?(v=Dc(s),e[0]=s,e[1]=v):v=e[1];const j=v;let S,T,N,A,E,R,$,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=Rc(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),$="flex items-start gap-2",R="relative min-w-0 flex-1 text-[14px] font-[450] leading-snug",E=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,e[20]=R,e[21]=$,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=e[19],R=e[20],$=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]!==E?(V=i.jsx("span",{className:E,children:s.title}),e[30]=s.title,e[31]=E,e[32]=V):V=e[32];let U;e[33]!==S?(U=S&&i.jsx(Nm,{action:S}),e[33]=S,e[34]=U):U=e[34];let H;e[35]!==V||e[36]!==U||e[37]!==R?(H=i.jsxs("div",{className:R,children:[V,U]}),e[35]=V,e[36]=U,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($m,{state:j}),e[41]=j,e[42]=W):W=e[42];let Z;e[43]!==H||e[44]!==Y||e[45]!==W||e[46]!==$?(Z=i.jsxs("div",{className:$,children:[H,Y,W]}),e[43]=H,e[44]=Y,e[45]=W,e[46]=$,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(o1),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]!==w||e[53]!==s||e[54]!==a||e[55]!==p||e[56]!==m||e[57]!==k||e[58]!==b?(ne=i.jsx(Am,{item:s,checks:w,assignee:r,assignedBy:n,members:a,onAssign:p,onPriorityChange:k,onTypeChange:b,onDueDateChange:m}),e[50]=n,e[51]=r,e[52]=w,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 o1(t){return i.jsx(wo,{tag:t},t.id)}function c1(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",gl(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=_c(s)&&i.jsx(gm,{}),e[9]=s,e[10]=f):f=e[10];let h;e[11]!==s?(h=Bc(s)&&i.jsx(xm,{}),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(Dm,{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(Rm,{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(d1),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(vo,{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 d1(t){return i.jsx(wo,{tag:t},t.id)}function kg(t){const e=D.c(5),{seed:s,children:r}=t;let n;e[0]!==s?(n=()=>{const o=new Io({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(zo,{fallback:null,children:i.jsx(L.Suspense,{fallback:null,children:i.jsx(Lo,{client:a,children:r})})})}),e[2]=r,e[3]=a,e[4]=l):l=e[4],l}const nl=new Date().toISOString();function Et(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 bg(){return{items:[Et("p1","Fix checkout shipping estimate","todo","bug","high",1),Et("p2","Add size guide to product page","todo","feature","medium",2),Et("p3","Compress hero images","todo","chore","low",3),Et("p4","Rewrite category descriptions","in_progress","feature","medium",4),Et("p5","Audit broken redirects","in_progress","chore","high",5),Et("p6","New arrivals landing page","in_review","feature","high",6),Et("p7","Speed up search results","done","chore","medium",7),Et("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[]}}export{kg as P,xg as T,bg as m};