decocms 4.371.3 → 4.371.4

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 (370) hide show
  1. package/dist/client/assets/{AlertCircle-VdsUyDsL.js → AlertCircle-DkoTBUue.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DIlQ1K_d.js → AreaChart-DlexVvHr.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-C1Jxz-38.js → ArrowLeft-eoxjWHed.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-B7Hvi15P.js → ArrowRight-BbuAJZmx.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BFEFFMY1.js → ArrowUp-CseIJyft.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-DNNied0N.js → CartesianChart--SFPDO1V.js} +1 -1
  7. package/dist/client/assets/{Check-CCHtN2JL.js → Check-BDjrzcrN.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-62tE7hh5.js → CheckCircle-CSZ4Kehv.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-CFHS6mGR.js → ChevronRight-DFWFq-ve.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-C0AfY4BX.js → ChevronSelectorVertical-C9J9C02y.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-58_Y92Dn.js → ChevronUp-BrOu8rnp.js} +1 -1
  12. package/dist/client/assets/{Copy01-DUI0S5po.js → Copy01-CCOGzU1d.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-BCIcmSsj.js → CreditCard01-CuoUWRm0.js} +1 -1
  14. package/dist/client/assets/{Database01-CgMLXTB0.js → Database01-CJba45_T.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-CllTTtzx.js → DotsVertical-mYRVr9AH.js} +1 -1
  16. package/dist/client/assets/{Download01-D1unS475.js → Download01-Bd0rofRl.js} +1 -1
  17. package/dist/client/assets/{ErrorBarContext-BOFaiRT7.js → ErrorBarContext-C0lyL2YC.js} +1 -1
  18. package/dist/client/assets/{Eye-DJsJHMdz.js → Eye-74QOe9cC.js} +1 -1
  19. package/dist/client/assets/{File02-C6lTNDur.js → File02-CmMbIRXN.js} +1 -1
  20. package/dist/client/assets/{GitBranch01-DuVUhLIs.js → GitBranch01-BKO8WN_h.js} +1 -1
  21. package/dist/client/assets/{Globe01-BxiM5hiu.js → Globe01-Ck7RTkU3.js} +1 -1
  22. package/dist/client/assets/{HardDrive-DYoYQlgK.js → HardDrive-DU6J9iPu.js} +1 -1
  23. package/dist/client/assets/{Image01-BG5OCK-e.js → Image01-DnYDSI2h.js} +1 -1
  24. package/dist/client/assets/{Key01-BVFF75nH.js → Key01-BZd6Jwvq.js} +1 -1
  25. package/dist/client/assets/{Line-pQ4sdY-j.js → Line-G0r0o9gn.js} +1 -1
  26. package/dist/client/assets/{Link01-DqK8epHf.js → Link01-B52qN1xV.js} +1 -1
  27. package/dist/client/assets/{LinkExternal01-2jYkMKWf.js → LinkExternal01-BDgcOJqm.js} +1 -1
  28. package/dist/client/assets/{MessageCircle01-BleWTCg5.js → MessageCircle01-CwQvoxPA.js} +1 -1
  29. package/dist/client/assets/{Monitor01-C3zWsNr6.js → Monitor01-BcYUPleF.js} +1 -1
  30. package/dist/client/assets/{Package-XpklebG8.js → Package-C4SRuwMw.js} +1 -1
  31. package/dist/client/assets/{Palette-Cj-GyLY8.js → Palette-C9EL1sNC.js} +1 -1
  32. package/dist/client/assets/{Play-B7qVZhEj.js → Play-CyyInR_v.js} +1 -1
  33. package/dist/client/assets/{Plus-B3s19fbp.js → Plus-BEdGLMcS.js} +1 -1
  34. package/dist/client/assets/{Printer-hmMbghuH.js → Printer-BgQcHd8s.js} +1 -1
  35. package/dist/client/assets/{SearchLg-B9ADJIQh.js → SearchLg-D8sOk12E.js} +1 -1
  36. package/dist/client/assets/{SearchMd-Cte0Flmz.js → SearchMd-CVv1yVth.js} +1 -1
  37. package/dist/client/assets/{Sector-B1R50REh.js → Sector-CvQy_NRt.js} +1 -1
  38. package/dist/client/assets/{Settings02-BG6PEEFh.js → Settings02-7e_CWXN4.js} +1 -1
  39. package/dist/client/assets/{Share07-XK-81nC3.js → Share07-CWr7FJF7.js} +1 -1
  40. package/dist/client/assets/{Shield01-BiMmptW_.js → Shield01-B8e5sZlX.js} +1 -1
  41. package/dist/client/assets/{Stars01-BbGiUZr8.js → Stars01-DtXaEO3a.js} +1 -1
  42. package/dist/client/assets/{Sun-DPlu9nq0.js → Sun-I1e-KcTY.js} +1 -1
  43. package/dist/client/assets/{SwitchHorizontal01-D4Xp6795.js → SwitchHorizontal01-BRr1FvfD.js} +1 -1
  44. package/dist/client/assets/{Tool01-C-Av9hw4.js → Tool01-dFp1h9Fm.js} +1 -1
  45. package/dist/client/assets/{Tool02-BWLvpTJ3.js → Tool02-DEN5a-af.js} +1 -1
  46. package/dist/client/assets/{Trash01-DBG5z7yc.js → Trash01-DGA8npEZ.js} +1 -1
  47. package/dist/client/assets/{TrendUp01-CVQkVUqd.js → TrendUp01-BK_K6NH_.js} +1 -1
  48. package/dist/client/assets/{Upload01-C3vxmuR3.js → Upload01-B3v_JBAz.js} +1 -1
  49. package/dist/client/assets/{User01-D61cOv44.js → User01-Dbdndpwo.js} +1 -1
  50. package/dist/client/assets/{UserSquare-v3UhY-wJ.js → UserSquare-DZNy5OUH.js} +1 -1
  51. package/dist/client/assets/{Users01-D6vUv3VA.js → Users01-AYbQCr7m.js} +1 -1
  52. package/dist/client/assets/{Users03-CvWlZOBQ.js → Users03-CUK-7hPD.js} +1 -1
  53. package/dist/client/assets/{X-Bl6p2PHk.js → X-BH7q4C1t.js} +1 -1
  54. package/dist/client/assets/{XCircle-CVRXuYKn.js → XCircle-CFDcIdAJ.js} +1 -1
  55. package/dist/client/assets/{XClose-DlSEqtvq.js → XClose-2vlbdyhB.js} +1 -1
  56. package/dist/client/assets/{Zap-CPc5P9In.js → Zap-Df8_LH9g.js} +1 -1
  57. package/dist/client/assets/{ZoomOut-hBrRCaxr.js → ZoomOut-CvFdKFHJ.js} +1 -1
  58. package/dist/client/assets/{access-gate-CMGFwr69.js → access-gate-Bz_XB_uN.js} +1 -1
  59. package/dist/client/assets/{add-connection-dialog-CP5Mmevx.js → add-connection-dialog-CazdSHRl.js} +1 -1
  60. package/dist/client/assets/{agent-analytics-DCS3uSsr.js → agent-analytics-BUU5OHJ0.js} +1 -1
  61. package/dist/client/assets/agent-app-CVC_Lvyo.js +1 -0
  62. package/dist/client/assets/{agent-assets-DdglfWnk.js → agent-assets-koBUkOuF.js} +1 -1
  63. package/dist/client/assets/{agent-automation-CxX1vxsE.js → agent-automation-s5o8QjN7.js} +1 -1
  64. package/dist/client/assets/{agent-automations-B3u2ZCWn.js → agent-automations-BEgeK_8a.js} +1 -1
  65. package/dist/client/assets/{agent-connect-sources-CfWPAAvA.js → agent-connect-sources-Cw1ElYdi.js} +1 -1
  66. package/dist/client/assets/agent-deck-7gpymxb7.js +1 -0
  67. package/dist/client/assets/{agent-e2e-C5hBbr4z.js → agent-e2e-D0tGNaa-.js} +1 -1
  68. package/dist/client/assets/{agent-experiments-D0YmjUod.js → agent-experiments-CF1wr09V.js} +1 -1
  69. package/dist/client/assets/agent-file-CSxJMcjv.js +1 -0
  70. package/dist/client/assets/{agent-git-DEYO9KtF.js → agent-git-X9feic8X.js} +1 -1
  71. package/dist/client/assets/{agent-hosting-Cr3IQ-v1.js → agent-hosting-CiIEbvp9.js} +1 -1
  72. package/dist/client/assets/{agent-icon-8_uoIw9T.js → agent-icon-CWoY8dlp.js} +1 -1
  73. package/dist/client/assets/agent-library-file-ISKmBGds.js +1 -0
  74. package/dist/client/assets/{agent-monitor-0aQD9bjQ.js → agent-monitor-dM1U0oHi.js} +1 -1
  75. package/dist/client/assets/{agent-overview-COVktEcD.js → agent-overview-b_OH54f9.js} +1 -1
  76. package/dist/client/assets/agent-settings-DWKPsWvq.js +1 -0
  77. package/dist/client/assets/{agent-site-editor-mpw2Csz7.js → agent-site-editor-BBBwvkn-.js} +1 -1
  78. package/dist/client/assets/agent-site-editor-code-Cafkyw0y.js +2 -0
  79. package/dist/client/assets/{agent-site-editor-content-Cl3K8_0X.js → agent-site-editor-content-6RAz4TG_.js} +2 -2
  80. package/dist/client/assets/{agent-site-editor-preview-BA36sYGX.js → agent-site-editor-preview-Dgz_F_iP.js} +3 -3
  81. package/dist/client/assets/agent-view-DZGYQu75.js +1 -0
  82. package/dist/client/assets/{agent-view-guard-C-KDGm4-.js → agent-view-guard-BwVsll67.js} +1 -1
  83. package/dist/client/assets/{agents-list-CKuwQGtx.js → agents-list-saY2e2oN.js} +1 -1
  84. package/dist/client/assets/{ai-providers-DKHAMpyi.js → ai-providers-nN3i3GvB.js} +1 -1
  85. package/dist/client/assets/{alert-Dt-3NCs0.js → alert-CHNmHigh.js} +1 -1
  86. package/dist/client/assets/{alert-dialog-DyR5Q_Tj.js → alert-dialog-Cj4mq8qj.js} +1 -1
  87. package/dist/client/assets/api-keys-Cx887mfW.js +1 -0
  88. package/dist/client/assets/{api-keys-BDNm5-Dl.js → api-keys-DrOs-ajg.js} +1 -1
  89. package/dist/client/assets/app-editor-FvLT9tg7.js +1 -0
  90. package/dist/client/assets/{asset-utils-DASitpN8.js → asset-utils-B6xmdxJ-.js} +1 -1
  91. package/dist/client/assets/{auth-NpT8e85Y.js → auth-DQLPrt1d.js} +1 -1
  92. package/dist/client/assets/{auth-catchall-CvSC5l_t.js → auth-catchall-C1NwExr2.js} +1 -1
  93. package/dist/client/assets/{auth-entry-SXWVX_Hn.js → auth-entry-BFo2L_uA.js} +1 -1
  94. package/dist/client/assets/{auth-split-layout-ivHBNujg.js → auth-split-layout-CyH5oyMl.js} +1 -1
  95. package/dist/client/assets/{authenticate-and-persist-oauth-B1pRhuCl.js → authenticate-and-persist-oauth-DiSz7oRO.js} +1 -1
  96. package/dist/client/assets/{automation-list-row-Ddk9fHNo.js → automation-list-row-ToSx3G2V.js} +1 -1
  97. package/dist/client/assets/{automation-runs-CuZxmXdR.js → automation-runs-D-Y_3Wp_.js} +1 -1
  98. package/dist/client/assets/automations-stm8A17b.js +1 -0
  99. package/dist/client/assets/{autosend-4JcmiES9.js → autosend-DBLW1BiY.js} +1 -1
  100. package/dist/client/assets/{avatar-DU3VcflD.js → avatar-CA5LIB-l.js} +1 -1
  101. package/dist/client/assets/{badge-D2mSgg83.js → badge-BHHKIdAQ.js} +1 -1
  102. package/dist/client/assets/{block-document-B-RAdc0f.js → block-document-CKFsXR2D.js} +1 -1
  103. package/dist/client/assets/{blocks-preview-workspace-context-BI0TdpjN.js → blocks-preview-workspace-context-DD1sbvCI.js} +1 -1
  104. package/dist/client/assets/{breadcrumb-zgHbWMCc.js → breadcrumb-CtLbOAvM.js} +1 -1
  105. package/dist/client/assets/{buckets-BS0Xnpxe.js → buckets-n4oqlL53.js} +1 -1
  106. package/dist/client/assets/{build-improve-prompt-doc-B33wGST8.js → build-improve-prompt-doc-C0Pcb13i.js} +1 -1
  107. package/dist/client/assets/{bulk-category-panel-CbySlXro.js → bulk-category-panel-LlH8_RXq.js} +1 -1
  108. package/dist/client/assets/{calendar-ButUng_A.js → calendar-CuSfsKMP.js} +1 -1
  109. package/dist/client/assets/{capability-load-error-DRsV-GAi.js → capability-load-error-nTuuTH9K.js} +1 -1
  110. package/dist/client/assets/{cards-D39Wg-JZ.js → cards-D_qYJSBL.js} +1 -1
  111. package/dist/client/assets/category-editor-m0T0M7LG.js +1 -0
  112. package/dist/client/assets/{chart-CiBx-he_.js → chart-3a-OWzYT.js} +1 -1
  113. package/dist/client/assets/{chat-context-Bl66TDog.js → chat-context-Bu5sIHkQ.js} +1 -1
  114. package/dist/client/assets/{chat-draft-Dr_jRWei.js → chat-draft-CDnPwvf3.js} +1 -1
  115. package/dist/client/assets/{checkbox-CDV3hkI4.js → checkbox-KtkqQde0.js} +1 -1
  116. package/dist/client/assets/{choose-editor-CIPqa9qE.js → choose-editor-Dn1tw3t6.js} +1 -1
  117. package/dist/client/assets/{cli-auth-success-CN1jtlEB.js → cli-auth-success-Dk6ZAOHg.js} +1 -1
  118. package/dist/client/assets/{client-icons-BpIRk6Eq.js → client-icons-BZbx9xet.js} +1 -1
  119. package/dist/client/assets/{collapsible-DCvGxmdk.js → collapsible--RUSBZp8.js} +1 -1
  120. package/dist/client/assets/{collection-detail-CFy4iVJB.js → collection-detail-DeDEzfsH.js} +1 -1
  121. package/dist/client/assets/{collection-display-button-BLff0NvM.js → collection-display-button-CSCRl1NG.js} +1 -1
  122. package/dist/client/assets/{collection-search-Cg8WYO7F.js → collection-search-CYFbkY1e.js} +1 -1
  123. package/dist/client/assets/{collection-table-wrapper-2OEvZUQj.js → collection-table-wrapper-B0GV6KfT.js} +1 -1
  124. package/dist/client/assets/{collection-tabs-BxByj3JB.js → collection-tabs-Cub0gFzH.js} +1 -1
  125. package/dist/client/assets/{combobox-LgVI0Z7L.js → combobox-DKSSMn_F.js} +1 -1
  126. package/dist/client/assets/{command-DeI04U1v.js → command-Aa0mYduw.js} +1 -1
  127. package/dist/client/assets/{command-palette-store-B6erqxcF.js → command-palette-store-AuoaPk0G.js} +1 -1
  128. package/dist/client/assets/{companion-mcps-section-CPXt61w3.js → companion-mcps-section-Cm96EPtV.js} +1 -1
  129. package/dist/client/assets/{connect-NgsFpLka.js → connect-RwN6Lb1O.js} +1 -1
  130. package/dist/client/assets/{connect-layout-DivbguN1.js → connect-layout-BUZjF8sB.js} +1 -1
  131. package/dist/client/assets/{connection-Gh-gc5IV.js → connection-BYV9fPN2.js} +1 -1
  132. package/dist/client/assets/{connection-card-DOCSy-r2.js → connection-card-Dr9bHZoV.js} +1 -1
  133. package/dist/client/assets/{connection-detail-BtFpRXk1.js → connection-detail-CIfYvjz9.js} +1 -1
  134. package/dist/client/assets/{connection-form-helpers-COFd-YYJ.js → connection-form-helpers-BXp-lVpJ.js} +1 -1
  135. package/dist/client/assets/{connections-BnXSX27r.js → connections-CHaTlyIC.js} +1 -1
  136. package/dist/client/assets/{create-organization-dialog-D_YqMWxW.js → create-organization-dialog-yNI_6UTh.js} +1 -1
  137. package/dist/client/assets/{decofile-api-DwtnpwwY.js → decofile-api-DEul9pGZ.js} +1 -1
  138. package/dist/client/assets/{decopilot-CqQIn3DK.js → decopilot-C-Fh2iwl.js} +1 -1
  139. package/dist/client/assets/{dialog-CALEql2B.js → dialog-D57kq_tP.js} +1 -1
  140. package/dist/client/assets/{discover-0sB_P0gJ.js → discover-D4y-o31j.js} +1 -1
  141. package/dist/client/assets/{domain-settings-BsQLpeO_.js → domain-settings-Ch5rCYKa.js} +1 -1
  142. package/dist/client/assets/{download-app-dialog-4cfbO5ZR.js → download-app-dialog-Dd6sw41_.js} +1 -1
  143. package/dist/client/assets/{drawer-Wjj3JV6a.js → drawer-DDadqt4q.js} +1 -1
  144. package/dist/client/assets/{dropdown-menu-BwJm6kWw.js → dropdown-menu-l7cu0teq.js} +1 -1
  145. package/dist/client/assets/{editor-B6qYQm3q.js → editor-DhL1XnKC.js} +1 -1
  146. package/dist/client/assets/{empty-state-Dpo9j0Bh.js → empty-state-Cad5zFK6.js} +1 -1
  147. package/dist/client/assets/{empty-state-CDt1Oweu.js → empty-state-CbrMvgMW.js} +1 -1
  148. package/dist/client/assets/{extract-connection-data-dNt5_vXq.js → extract-connection-data-Dh_Eo1wZ.js} +1 -1
  149. package/dist/client/assets/{feature-gate-D7DzzVJY.js → feature-gate-OPGtzGpZ.js} +1 -1
  150. package/dist/client/assets/{feature-paywall-rsbHj8go.js → feature-paywall-DsAStIcU.js} +1 -1
  151. package/dist/client/assets/{file-explorer-CFWGO-U6.js → file-explorer-DAxbvkJk.js} +1 -1
  152. package/dist/client/assets/{file-preview-r_4dJHJu.js → file-preview-CDdVdNDx.js} +1 -1
  153. package/dist/client/assets/{file-share-button-tzoRmnRq.js → file-share-button-DTqbvQ69.js} +1 -1
  154. package/dist/client/assets/{file-type-icon-Dnlnjv2X.js → file-type-icon-DwxUV7LB.js} +1 -1
  155. package/dist/client/assets/{folder-icon-DZt6oPqY.js → folder-icon-Xf_qPSHt.js} +1 -1
  156. package/dist/client/assets/{form-BDbK3JnT.js → form-x2RdyMbl.js} +1 -1
  157. package/dist/client/assets/{gateway-client-BKiwX9p5.js → gateway-client-D1lNGMSB.js} +1 -1
  158. package/dist/client/assets/{general-Ok0oiZzk.js → general-qL4c5feU.js} +1 -1
  159. package/dist/client/assets/{github-icon-Pmxow-OZ.js → github-icon-BO2ZIrI7.js} +1 -1
  160. package/dist/client/assets/{home-CS-NhJqO.js → home-CLq77ImN.js} +1 -1
  161. package/dist/client/assets/{hooks-Dn-h6Vcw.js → hooks-BX3ndMg6.js} +1 -1
  162. package/dist/client/assets/{hooks-Ccqgw_Vz.js → hooks-ClWLwZb6.js} +1 -1
  163. package/dist/client/assets/{index-CLnsRUUW.js → index-B4f3l0bW.js} +1 -1
  164. package/dist/client/assets/{index-D-uWdP1a.js → index-BCcWkCUf.js} +1 -1
  165. package/dist/client/assets/{index-Ci6FOo2o.js → index-BYo7xjw_.js} +2 -2
  166. package/dist/client/assets/{index-DO47GS7M.js → index-BhSpAyPc.js} +1 -1
  167. package/dist/client/assets/{index-DV57LmCQ.js → index-Br-oQZuQ.js} +1 -1
  168. package/dist/client/assets/{index-LUO-1awi.js → index-CSGdKnA2.js} +1 -1
  169. package/dist/client/assets/{index-CAn5a9er.js → index-C_tMl4q8.js} +1 -1
  170. package/dist/client/assets/{index-B4mA6UnL.js → index-Ciq75byn.js} +1 -1
  171. package/dist/client/assets/{index-Cb1NhXJQ.js → index-D04wJiA7.js} +1 -1
  172. package/dist/client/assets/{index-CFD7GjM4.js → index-DHMJogsX.js} +1 -1
  173. package/dist/client/assets/{index-DgDxrPJQ.js → index-DIk-Tdn7.js} +1 -1
  174. package/dist/client/assets/{index-DzN1GaeD.js → index-DMoDLIev.js} +1 -1
  175. package/dist/client/assets/{index-CpUt41i2.js → index-Da4w1ozj.js} +1 -1
  176. package/dist/client/assets/{index-2Adyhfq_.js → index-DqscriGX.js} +1 -1
  177. package/dist/client/assets/{index-BMgXFXs8.js → index-dzbklFKC.js} +1 -1
  178. package/dist/client/assets/{index-redirect-DvmJfTQ6.js → index-redirect-CgpYz1_8.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-lxHY9KBm.js → infiniteQueryObserver-BegmJhfO.js} +1 -1
  180. package/dist/client/assets/{infra-billing-BrTbotT6.js → infra-billing-BcAZoLz6.js} +1 -1
  181. package/dist/client/assets/{input-lLD2pWyd.js → input-B0Uinzv0.js} +1 -1
  182. package/dist/client/assets/{input-DmMiHqqT.js → input-BWSDRY3j.js} +1 -1
  183. package/dist/client/assets/{input-C1_yaWH2.js → input-Dzyq242f.js} +1 -1
  184. package/dist/client/assets/{integration-icon-PXIcCvAJ.js → integration-icon-Jv69owhG.js} +1 -1
  185. package/dist/client/assets/{label-MNehxDd8.js → label-B9P1qvVv.js} +1 -1
  186. package/dist/client/assets/{last-preview-page-B0L1czTe.js → last-preview-page-By8mKu-G.js} +1 -1
  187. package/dist/client/assets/{layout-Dpdh60IA.js → layout-BiLsgaKY.js} +1 -1
  188. package/dist/client/assets/{legacy-agents-deep-BurccH7y.js → legacy-agents-deep-ARL8jf0f.js} +1 -1
  189. package/dist/client/assets/{legacy-main-redirect-DR_vBjBo.js → legacy-main-redirect-CU9SDsoJ.js} +1 -1
  190. package/dist/client/assets/{library-Bh3JUAWw.js → library-lIdeMZNG.js} +1 -1
  191. package/dist/client/assets/{login-DWsBRCWt.js → login-B-zmZILz.js} +1 -1
  192. package/dist/client/assets/{markdown-Bj_2Le1s.js → markdown-BLbEs4th.js} +1 -1
  193. package/dist/client/assets/{mcp-app-renderer-BtowUfrr.js → mcp-app-renderer-BuE-fXND.js} +1 -1
  194. package/dist/client/assets/{mcp-oauth-BmHUUoma.js → mcp-oauth-gEPmFmtm.js} +1 -1
  195. package/dist/client/assets/{members-D97CSBdC.js → members-DPanptly.js} +1 -1
  196. package/dist/client/assets/{message-templates-CGva-Wmj.js → message-templates-eLGXNsTs.js} +1 -1
  197. package/dist/client/assets/{mini-report-page-B6KW5rQB.js → mini-report-page-B9cbP96Z.js} +1 -1
  198. package/dist/client/assets/{mock-board-B88aD_ZY.js → mock-board-CuyyHaan.js} +22 -22
  199. package/dist/client/assets/{monaco-editor-BL1VqVAn.js → monaco-editor-DL6feSNU.js} +1 -1
  200. package/dist/client/assets/{monitoring-stats-row-DhYpTGm4.js → monitoring-stats-row-DqxN6GUk.js} +1 -1
  201. package/dist/client/assets/{multi-select-D4MUTF49.js → multi-select-oKdD9DyQ.js} +1 -1
  202. package/dist/client/assets/{mustache-vcSnLgSj.js → mustache-DJBjSsyb.js} +1 -1
  203. package/dist/client/assets/{oauth-callback-CCbopwuF.js → oauth-callback-BZYyT9aM.js} +1 -1
  204. package/dist/client/assets/{oauth-callback-ai-provider-BhmhWPuU.js → oauth-callback-ai-provider-7PpM7Rdj.js} +1 -1
  205. package/dist/client/assets/{onboarding-CfCwmxWa.js → onboarding-YCDpp7Hz.js} +1 -1
  206. package/dist/client/assets/{optimistic-project-sidebar-views-r6d0a0fa.js → optimistic-project-sidebar-views-Drp0GaY-.js} +1 -1
  207. package/dist/client/assets/{org-file-open-context-BQaKniQN.js → org-file-open-context-BFThBGhY.js} +1 -1
  208. package/dist/client/assets/{organization-choice-n5jWR8x5.js → organization-choice-BmTH1TFX.js} +1 -1
  209. package/dist/client/assets/{orgs-BP4Nb7eA.js → orgs-Bg15s_t6.js} +1 -1
  210. package/dist/client/assets/{page-seo-form-CUFQ9lAZ.js → page-seo-form-2XHO2I5J.js} +1 -1
  211. package/dist/client/assets/{pair-BVv5qwS0.js → pair-CyjnQvo_.js} +1 -1
  212. package/dist/client/assets/{plan-ladder-B_cdDv2u.js → plan-ladder-BxTjLX-u.js} +1 -1
  213. package/dist/client/assets/{popover-CvyZH1aK.js → popover-ZSYA9qhq.js} +1 -1
  214. package/dist/client/assets/{post-calendar-D4wVrUD5.js → post-calendar-Dk7gydQI.js} +1 -1
  215. package/dist/client/assets/{post-editor-Dl7mmgPt.js → post-editor-EUWIRS7z.js} +1 -1
  216. package/dist/client/assets/{preview-content-CwblWQ7j.js → preview-content-DfENsiTd.js} +1 -1
  217. package/dist/client/assets/{preview-dialog-8QorEoUx.js → preview-dialog-CZ7yktMz.js} +1 -1
  218. package/dist/client/assets/{primitives-Dm-d52Fy.js → primitives-Dc8nwNgw.js} +1 -1
  219. package/dist/client/assets/{profile-CqqLFn0p.js → profile-RjcjGxIC.js} +1 -1
  220. package/dist/client/assets/{project-app-view-Dea9RQT5.js → project-app-view-vHys_Fc0.js} +1 -1
  221. package/dist/client/assets/{project-feed-BWj52Geg.js → project-feed-BQriF9RR.js} +1 -1
  222. package/dist/client/assets/{project-icon-B62L0-Ic.js → project-icon-B44PuWmC.js} +1 -1
  223. package/dist/client/assets/project-reports-BN2wnBRk.js +1 -0
  224. package/dist/client/assets/project-tasks-BiN2QJyD.js +1 -0
  225. package/dist/client/assets/{prompts-C8qjFh5s.js → prompts-DxKpvN4f.js} +1 -1
  226. package/dist/client/assets/record-editor-C0OpqhBn.js +1 -0
  227. package/dist/client/assets/{redirect-editor-DlDRLI5p.js → redirect-editor-QSnnvJNH.js} +1 -1
  228. package/dist/client/assets/registry-BNANrwsH.js +2 -0
  229. package/dist/client/assets/{registry-layout-8_5YS8d1.js → registry-layout-CS36QyR-.js} +1 -1
  230. package/dist/client/assets/{reports-BVUgXRYp.js → reports-Caz12sYh.js} +1 -1
  231. package/dist/client/assets/reports-ClRllm5D.js +1 -0
  232. package/dist/client/assets/{reports-onboarding-CFgdzNmN.js → reports-onboarding-CpuoVkUT.js} +1 -1
  233. package/dist/client/assets/{reports-tab-geHriKhJ.js → reports-tab-CTyrZeC2.js} +2 -2
  234. package/dist/client/assets/{repositories-YhOosDET.js → repositories-Css_5oB-.js} +1 -1
  235. package/dist/client/assets/{repository-import-picker-DyOhHF3u.js → repository-import-picker-BBGtjhUh.js} +1 -1
  236. package/dist/client/assets/{repository-picker-BUYJfJUH.js → repository-picker-C-TSiXvU.js} +1 -1
  237. package/dist/client/assets/{require-capability-BuyUQe2r.js → require-capability-BGOQRUEv.js} +1 -1
  238. package/dist/client/assets/{required-auth-layout-CyxpkSWy.js → required-auth-layout-DfvknvbD.js} +1 -1
  239. package/dist/client/assets/{reset-password-OhUCgdFz.js → reset-password-DqPNpLik.js} +1 -1
  240. package/dist/client/assets/{resizable-DP2_iOJI.js → resizable-DtEfzvUR.js} +1 -1
  241. package/dist/client/assets/{review-settings-opGiYRKh.js → review-settings-DCvHN4QQ.js} +1 -1
  242. package/dist/client/assets/{rich-text-link-control-IfY5GJsh.js → rich-text-link-control-S-iuuCcb.js} +1 -1
  243. package/dist/client/assets/{roles-BAZCs_gu.js → roles-JesQ45E4.js} +1 -1
  244. package/dist/client/assets/{route-VxozlsXO.js → route-BHp1yMIV.js} +1 -1
  245. package/dist/client/assets/{route-KMEErrnr.js → route-DYcLUzKq.js} +1 -1
  246. package/dist/client/assets/{route-9VJmjx4H.js → route-DxO9zGI3.js} +1 -1
  247. package/dist/client/assets/{runnable-block-editor-D9S_7iKc.js → runnable-block-editor-D2pnRUMc.js} +1 -1
  248. package/dist/client/assets/{sandbox-lifecycle-context-3dTG6fho.js → sandbox-lifecycle-context-BKxKj4xP.js} +1 -1
  249. package/dist/client/assets/{schema-36B888Ow.js → schema-CGSQcL_x.js} +1 -1
  250. package/dist/client/assets/{scroll-area-YvnS-VN7.js → scroll-area-DEsjJURz.js} +1 -1
  251. package/dist/client/assets/{search-input-rOGFcd8V.js → search-input-Ckzw9Q8f.js} +1 -1
  252. package/dist/client/assets/{secrets-BlD021Nv.js → secrets-B-ypyy2r.js} +1 -1
  253. package/dist/client/assets/{sections-editor-l0CGUT74.js → sections-editor-CH88tIrj.js} +1 -1
  254. package/dist/client/assets/{select-DlFxiDXG.js → select-KcyEErkL.js} +1 -1
  255. package/dist/client/assets/{select-model-D1v-HQmb.js → select-model-DMvqNufS.js} +1 -1
  256. package/dist/client/assets/{seo-editor-Dsx4w-CS.js → seo-editor-CAiJAVeJ.js} +1 -1
  257. package/dist/client/assets/{settings-tab-1hWkXxtW.js → settings-tab-BeEZ3rCK.js} +1 -1
  258. package/dist/client/assets/{sheet-3mWdWARg.js → sheet-CuLnIbRo.js} +1 -1
  259. package/dist/client/assets/{shell-layout-BhU24obU.js → shell-layout-C6AQzwc3.js} +1 -1
  260. package/dist/client/assets/{sidebar-D-ykwYZK.js → sidebar-BhJ_FDqo.js} +1 -1
  261. package/dist/client/assets/{skill-preview-COt3tZyn.js → skill-preview-Cd79qVc9.js} +1 -1
  262. package/dist/client/assets/{skills-CeAeythT.js → skills-yKnfnfGJ.js} +1 -1
  263. package/dist/client/assets/{sso-BCvc79Hd.js → sso-BUabXZ66.js} +1 -1
  264. package/dist/client/assets/{store-DSS7pwbI.js → store-3eZAp6_n.js} +1 -1
  265. package/dist/client/assets/store-registry-BSlzFQHg.js +2 -0
  266. package/dist/client/assets/{switch-DzbhFkd8.js → switch-C4XaykKw.js} +1 -1
  267. package/dist/client/assets/{synced-repos-C1a_2VSv.js → synced-repos-DcnAsWA0.js} +1 -1
  268. package/dist/client/assets/{table-DRHZogtG.js → table-CuChyRJ6.js} +1 -1
  269. package/dist/client/assets/{tabs-BFpD35SN.js → tabs-CU7XBCqm.js} +1 -1
  270. package/dist/client/assets/{task-board-BnjdulNB.js → task-board-DyB0568a.js} +1 -1
  271. package/dist/client/assets/{task-route-uoLnchBD.js → task-route-DadSSpKF.js} +1 -1
  272. package/dist/client/assets/{task-status-CmnhmVw4.js → task-status-BlXRiQX3.js} +1 -1
  273. package/dist/client/assets/{taskboard-analytics-DUtGlm_o.js → taskboard-analytics-DAdOZgEg.js} +1 -1
  274. package/dist/client/assets/{tasks-CFLqCnn9.js → tasks-BfdiokBG.js} +1 -1
  275. package/dist/client/assets/tasks-CJSTXe38.js +1 -0
  276. package/dist/client/assets/{textarea-cQD0AENQ.js → textarea-__p0yo6J.js} +1 -1
  277. package/dist/client/assets/{thread-intent-B4NPPJnW.js → thread-intent-D1siGaGJ.js} +1 -1
  278. package/dist/client/assets/{thread-route-B4ftFRF1.js → thread-route-CP3pE7Uw.js} +1 -1
  279. package/dist/client/assets/{thread-route-BuKwn_NI.js → thread-route-DNm3Iu0z.js} +1 -1
  280. package/dist/client/assets/{thread-sheet-body-B1hx9HMM.js → thread-sheet-body-BXdoz1zb.js} +1 -1
  281. package/dist/client/assets/{toggle-group-D-jueDYG.js → toggle-group-DngX-VZh.js} +1 -1
  282. package/dist/client/assets/{toolbar-icon-button-C-bcFp4s.js → toolbar-icon-button-CoaHzqzV.js} +1 -1
  283. package/dist/client/assets/{tooltip-Cjm5-OzF.js → tooltip-DiUW72WF.js} +1 -1
  284. package/dist/client/assets/{track-gXVphWaB.js → track-BkvZQsBp.js} +1 -1
  285. package/dist/client/assets/{types-D7bWh5IS.js → types-CVnCSrZu.js} +1 -1
  286. package/dist/client/assets/{usage-stats-D42Vs58C.js → usage-stats-BXE2Nb57.js} +1 -1
  287. package/dist/client/assets/{use-ai-providers-gBzVwZfi.js → use-ai-providers-CTTRbTuh.js} +1 -1
  288. package/dist/client/assets/{use-automations-D7KNhekz.js → use-automations-DcNKFRtS.js} +1 -1
  289. package/dist/client/assets/{use-autosave-B4PyFvWi.js → use-autosave-CoCLYAKc.js} +1 -1
  290. package/dist/client/assets/{use-connect-companion-BPzdOTx5.js → use-connect-companion-B81sEzsb.js} +1 -1
  291. package/dist/client/assets/{use-connection-Xm7LN_9n.js → use-connection-CM4EgQPU.js} +1 -1
  292. package/dist/client/assets/{use-copy-DU94HmBe.js → use-copy-C3r_mwJc.js} +1 -1
  293. package/dist/client/assets/{use-create-virtual-mcp--3UsxEX_.js → use-create-virtual-mcp-4OanjUDo.js} +1 -1
  294. package/dist/client/assets/{use-date-fns-locale-C0E1XIsK.js → use-date-fns-locale-Bwn26aTV.js} +1 -1
  295. package/dist/client/assets/{use-debounced-autosave-B4WPkEbW.js → use-debounced-autosave-CDIZf7vS.js} +1 -1
  296. package/dist/client/assets/{use-debounced-value-xGhRE_R9.js → use-debounced-value-Dt5Xp7np.js} +1 -1
  297. package/dist/client/assets/{use-deco-credits-CHmdnwNW.js → use-deco-credits-BHIJCyKo.js} +1 -1
  298. package/dist/client/assets/{use-decopilot-events-4c7k0EkQ.js → use-decopilot-events-B1TzFZ8t.js} +1 -1
  299. package/dist/client/assets/{use-delete-connection-DuVgZvNd.js → use-delete-connection-MEDuWXFM.js} +1 -1
  300. package/dist/client/assets/{use-deployment-admin-bb8cVdiw.js → use-deployment-admin-DhSh82eL.js} +1 -1
  301. package/dist/client/assets/{use-entitlements-KRzxrqS2.js → use-entitlements-Du1tEG7N.js} +1 -1
  302. package/dist/client/assets/{use-fast-preview-draft-url-FohMvhQi.js → use-fast-preview-draft-url-JhDvVPsK.js} +1 -1
  303. package/dist/client/assets/{use-file-configs-dQMTZ0D4.js → use-file-configs-BlwCwjVB.js} +1 -1
  304. package/dist/client/assets/{use-infinite-scroll-d9JW4eui.js → use-infinite-scroll-C-upQcAM.js} +1 -1
  305. package/dist/client/assets/{use-join-requests-DPp6OyPZ.js → use-join-requests-B0KW0ohy.js} +1 -1
  306. package/dist/client/assets/{use-main-panel-tabs-LtZ4Guyx.js → use-main-panel-tabs-A9lWrQg1.js} +1 -1
  307. package/dist/client/assets/{use-mcp-auth-status-BgfOM5Kn.js → use-mcp-auth-status-DbP9ug3L.js} +1 -1
  308. package/dist/client/assets/{use-mcp-client-DXM1xOfJ.js → use-mcp-client-D-7BuLrC.js} +1 -1
  309. package/dist/client/assets/{use-mcp-prompts-DC_0PH3B.js → use-mcp-prompts-OVUxMbpa.js} +1 -1
  310. package/dist/client/assets/{use-mcp-tools-CMaYw_Hr.js → use-mcp-tools-Bka5B8hg.js} +1 -1
  311. package/dist/client/assets/{use-members-CXzxpKBu.js → use-members-0fLORe9n.js} +1 -1
  312. package/dist/client/assets/{use-mobile-BYI7AfZ8.js → use-mobile-C2LLCzmr.js} +1 -1
  313. package/dist/client/assets/{use-navigate-to-agent-CjUZCiDZ.js → use-navigate-to-agent-C_uFa92h.js} +1 -1
  314. package/dist/client/assets/{use-open-billing-url-BEBNPLNJ.js → use-open-billing-url-CDGeF8Bu.js} +1 -1
  315. package/dist/client/assets/{use-org-auth-client-BPP7gPmZ.js → use-org-auth-client-B9bt8Cd1.js} +1 -1
  316. package/dist/client/assets/{use-org-fs-DVHt8CES.js → use-org-fs-B-yTulsp.js} +1 -1
  317. package/dist/client/assets/{use-org-notice-BxTs_NTo.js → use-org-notice-CKxbuoVc.js} +1 -1
  318. package/dist/client/assets/{use-org-sso-CTb2BJZl.js → use-org-sso-DDMls_8S.js} +1 -1
  319. package/dist/client/assets/{use-organization-roles-V7NuNbQN.js → use-organization-roles-B8cSYq0q.js} +1 -1
  320. package/dist/client/assets/{use-organization-settings-g6uVBQuV.js → use-organization-settings-DmPwVQte.js} +1 -1
  321. package/dist/client/assets/{use-panel-navigate-hgplI2Gf.js → use-panel-navigate-ambGkCyT.js} +1 -1
  322. package/dist/client/assets/{use-project-native-view-presence-DhTiN6Ju.js → use-project-native-view-presence-BG-Guaa9.js} +1 -1
  323. package/dist/client/assets/{use-project-scope-BjFNebNc.js → use-project-scope-CQpPI5pW.js} +1 -1
  324. package/dist/client/assets/{use-registry-connections-DqO-48ZD.js → use-registry-connections-Dwr4-IPF.js} +1 -1
  325. package/dist/client/assets/{use-releases-PNG9gtkr.js → use-releases-B5rxjDuL.js} +1 -1
  326. package/dist/client/assets/{use-reports-diagnostic-CVPpJgJ0.js → use-reports-diagnostic-DmNTAMUo.js} +1 -1
  327. package/dist/client/assets/{use-route-default-main-DfSpgCsG.js → use-route-default-main-BGhZVnpH.js} +1 -1
  328. package/dist/client/assets/{use-secrets-BcSHBiEb.js → use-secrets-2K048iDI.js} +1 -1
  329. package/dist/client/assets/{use-section-preview-base-Mo37PjIJ.js → use-section-preview-base-DGf1SdCz.js} +1 -1
  330. package/dist/client/assets/{use-session-runtime-CXFYmlCx.js → use-session-runtime-DRNcjNGp.js} +1 -1
  331. package/dist/client/assets/{use-tags-DZpP5qDZ.js → use-tags-Dz0JHmit.js} +1 -1
  332. package/dist/client/assets/use-task-board-analytics-BAbIvIck.js +1 -0
  333. package/dist/client/assets/{use-task-metadata-X-a_cXtq.js → use-task-metadata-DFjC02ql.js} +1 -1
  334. package/dist/client/assets/{use-thread-outputs-bMTFY9dN.js → use-thread-outputs-CNFVOo0z.js} +1 -1
  335. package/dist/client/assets/{use-view-mode-87wocfjx.js → use-view-mode-8Q0KLbhQ.js} +1 -1
  336. package/dist/client/assets/{use-virtual-mcp-cCLIMV1h.js → use-virtual-mcp-BqJjq2ej.js} +1 -1
  337. package/dist/client/assets/useInfiniteQuery-BigrA6tZ.js +1 -0
  338. package/dist/client/assets/{useQueries-Bsx5oDu5.js → useQueries-CA76Qw5x.js} +1 -1
  339. package/dist/client/assets/useSuspenseInfiniteQuery-OUbXRXpI.js +1 -0
  340. package/dist/client/assets/{users-fFbwQlCq.js → users-CxTXFPjN.js} +1 -1
  341. package/dist/client/assets/{utils-DZ1FARwz.js → utils-Bsd7FiR5.js} +1 -1
  342. package/dist/client/assets/{variant-calendar-rCSHJOu1.js → variant-calendar-un_6bKKS.js} +1 -1
  343. package/dist/client/assets/{variant-matcher-override-KjWq3dD9.js → variant-matcher-override-DxweoUUC.js} +1 -1
  344. package/dist/client/assets/{view-mode-toggle-N6248osk.js → view-mode-toggle-DYM-xxC9.js} +1 -1
  345. package/dist/client/assets/{virtual-mcp-CjQcEdrw.js → virtual-mcp-DuQ9gz9U.js} +1 -1
  346. package/dist/client/index.html +1 -1
  347. package/dist/server/cli.js +495 -495
  348. package/dist/server/server.js +342 -342
  349. package/package.json +1 -1
  350. package/dist/client/assets/agent-app-Oc3NFHyv.js +0 -1
  351. package/dist/client/assets/agent-deck-C0ZMDlgi.js +0 -1
  352. package/dist/client/assets/agent-file-CGQaQeAZ.js +0 -1
  353. package/dist/client/assets/agent-library-file-KT4Hio_6.js +0 -1
  354. package/dist/client/assets/agent-settings-C4VbiDnu.js +0 -1
  355. package/dist/client/assets/agent-site-editor-code-CC5pYwiP.js +0 -2
  356. package/dist/client/assets/agent-view-CkU0IYt7.js +0 -1
  357. package/dist/client/assets/api-keys-CC37GpyL.js +0 -1
  358. package/dist/client/assets/app-editor-D15HlBI9.js +0 -1
  359. package/dist/client/assets/automations-x9QUNuFg.js +0 -1
  360. package/dist/client/assets/category-editor-DbD1-U8M.js +0 -1
  361. package/dist/client/assets/project-reports-BiLKZHtd.js +0 -1
  362. package/dist/client/assets/project-tasks-CbohEN8r.js +0 -1
  363. package/dist/client/assets/record-editor-DIcN0zmC.js +0 -1
  364. package/dist/client/assets/registry-B1XwkW9J.js +0 -2
  365. package/dist/client/assets/reports-DTnhVLYw.js +0 -1
  366. package/dist/client/assets/store-registry-5Rnsr40F.js +0 -2
  367. package/dist/client/assets/tasks-g-1sXb5S.js +0 -1
  368. package/dist/client/assets/use-task-board-analytics-M_xSWhmc.js +0 -1
  369. package/dist/client/assets/useInfiniteQuery-BaaJ9wpG.js +0 -1
  370. package/dist/client/assets/useSuspenseInfiniteQuery-HEcUWN_D.js +0 -1
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-VxozlsXO.js","assets/index-Ci6FOo2o.js","assets/index-CpNTsElB.css","assets/index-Cb1NhXJQ.js","assets/ArrowUp-BFEFFMY1.js","assets/chat-context-Bl66TDog.js","assets/use-panel-navigate-hgplI2Gf.js","assets/thread-route-BuKwn_NI.js","assets/use-project-scope-BjFNebNc.js","assets/use-virtual-mcp-cCLIMV1h.js","assets/use-mcp-client-DXM1xOfJ.js","assets/auth-NpT8e85Y.js","assets/github-repo-BknN0SVI.js","assets/autosend-4JcmiES9.js","assets/thread-intent-B4NPPJnW.js","assets/slugify-CEUa2lfQ.js","assets/hooks-Ccqgw_Vz.js","assets/backoff-8mStPHYB.js","assets/task-board-BnjdulNB.js","assets/schema-36B888Ow.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-KRzxrqS2.js","assets/use-ai-providers-gBzVwZfi.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-4c7k0EkQ.js","assets/use-organization-settings-g6uVBQuV.js","assets/gateway-client-BKiwX9p5.js","assets/tooltip-Cjm5-OzF.js","assets/index-CAn5a9er.js","assets/dialog-CALEql2B.js","assets/X-Bl6p2PHk.js","assets/drawer-Wjj3JV6a.js","assets/collection-search-Cg8WYO7F.js","assets/SearchMd-Cte0Flmz.js","assets/use-mobile-BYI7AfZ8.js","assets/use-mcp-prompts-DC_0PH3B.js","assets/index-2Adyhfq_.js","assets/form-BDbK3JnT.js","assets/label-MNehxDd8.js","assets/input-lLD2pWyd.js","assets/utils-CVEq3hMx.js","assets/org-file-open-context-BQaKniQN.js","assets/input-C1_yaWH2.js","assets/command-palette-store-B6erqxcF.js","assets/chat-draft-Dr_jRWei.js","assets/use-session-runtime-CXFYmlCx.js","assets/ArrowRight-B7Hvi15P.js","assets/agent-icon-8_uoIw9T.js","assets/AlertCircle-VdsUyDsL.js","assets/Tool01-C-Av9hw4.js","assets/ArrowLeft-C1Jxz-38.js","assets/Tool02-BWLvpTJ3.js","assets/TrendUp01-CVQkVUqd.js","assets/ZoomOut-hBrRCaxr.js","assets/Users03-CvWlZOBQ.js","assets/CheckCircle-62tE7hh5.js","assets/Check-CCHtN2JL.js","assets/ChevronUp-58_Y92Dn.js","assets/ChevronRight-CFHS6mGR.js","assets/ChevronSelectorVertical-C0AfY4BX.js","assets/DotsVertical-CllTTtzx.js","assets/UserSquare-v3UhY-wJ.js","assets/Copy01-DUI0S5po.js","assets/CreditCard01-BCIcmSsj.js","assets/Database01-CgMLXTB0.js","assets/MessageCircle01-BleWTCg5.js","assets/Download01-D1unS475.js","assets/Printer-hmMbghuH.js","assets/Settings02-BG6PEEFh.js","assets/Eye-DJsJHMdz.js","assets/File02-C6lTNDur.js","assets/Share07-XK-81nC3.js","assets/GitBranch01-DuVUhLIs.js","assets/Globe01-BxiM5hiu.js","assets/SwitchHorizontal01-D4Xp6795.js","assets/HardDrive-DYoYQlgK.js","assets/Image01-BG5OCK-e.js","assets/Key01-BVFF75nH.js","assets/Link01-DqK8epHf.js","assets/LinkExternal01-2jYkMKWf.js","assets/Monitor01-C3zWsNr6.js","assets/Sun-DPlu9nq0.js","assets/Package-XpklebG8.js","assets/Palette-Cj-GyLY8.js","assets/Play-B7qVZhEj.js","assets/Plus-B3s19fbp.js","assets/SearchLg-B9ADJIQh.js","assets/Shield01-BiMmptW_.js","assets/Stars01-BbGiUZr8.js","assets/Trash01-DBG5z7yc.js","assets/Upload01-C3vxmuR3.js","assets/User01-D61cOv44.js","assets/Users01-D6vUv3VA.js","assets/XCircle-CVRXuYKn.js","assets/XClose-DlSEqtvq.js","assets/Zap-CPc5P9In.js","assets/select-DlFxiDXG.js","assets/usage-stats-D42Vs58C.js","assets/use-copy-DU94HmBe.js","assets/markdown-Bj_2Le1s.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/tabs-BFpD35SN.js","assets/use-deco-credits-CHmdnwNW.js","assets/toggle-group-D-jueDYG.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-BEBNPLNJ.js","assets/decopilot-CqQIn3DK.js","assets/checkbox-CDV3hkI4.js","assets/ai-providers-logos-DD3qZ33J.js","assets/avatar-DU3VcflD.js","assets/download-app-dialog-4cfbO5ZR.js","assets/popover-CvyZH1aK.js","assets/index-DV57LmCQ.js","assets/input-DmMiHqqT.js","assets/hooks-Dn-h6Vcw.js","assets/use-org-fs-DVHt8CES.js","assets/dropdown-menu-BwJm6kWw.js","assets/question-004-sINsf4GQ.js","assets/use-members-CXzxpKBu.js","assets/use-org-auth-client-BPP7gPmZ.js","assets/feature-paywall-rsbHj8go.js","assets/plan-ladder-B_cdDv2u.js","assets/add-connection-dialog-CP5Mmevx.js","assets/extract-connection-data-dNt5_vXq.js","assets/metadata-dUsYcpuu.js","assets/github-D4UJ99TO.js","assets/connection-Gh-gc5IV.js","assets/connection-card-DOCSy-r2.js","assets/use-registry-connections-DqO-48ZD.js","assets/use-connection-Xm7LN_9n.js","assets/useInfiniteQuery-BaaJ9wpG.js","assets/infiniteQueryObserver-lxHY9KBm.js","assets/retry-i8LvYSZg.js","assets/connection-slug-CITJ0kGN.js","assets/integration-icon-PXIcCvAJ.js","assets/textarea-cQD0AENQ.js","assets/connection-form-helpers-COFd-YYJ.js","assets/authenticate-and-persist-oauth-B1pRhuCl.js","assets/mcp-oauth-BmHUUoma.js","assets/collection-tabs-BxByj3JB.js","assets/badge-D2mSgg83.js","assets/use-infinite-scroll-d9JW4eui.js","assets/useSuspenseInfiniteQuery-HEcUWN_D.js","assets/pair-BVv5qwS0.js","assets/collapsible-DCvGxmdk.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-BtowUfrr.js","assets/types-D7bWh5IS.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-BhU24obU.js","assets/anchors-yqDzZN4K.js","assets/use-org-notice-BxTs_NTo.js","assets/command-DeI04U1v.js","assets/index-BMgXFXs8.js","assets/project-icon-B62L0-Ic.js","assets/required-auth-layout-CyxpkSWy.js","assets/use-org-sso-CTb2BJZl.js","assets/shell-layout-CuFt8bor.css","assets/sheet-3mWdWARg.js","assets/use-navigate-to-agent-CjUZCiDZ.js","assets/use-thread-outputs-bMTFY9dN.js","assets/file-type-icon-Dnlnjv2X.js","assets/decofile-api-DwtnpwwY.js","assets/use-releases-PNG9gtkr.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-3dTG6fho.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/empty-state-Dpo9j0Bh.js","assets/index-CFD7GjM4.js","assets/index-LUO-1awi.js","assets/resizable-DP2_iOJI.js","assets/use-route-default-main-DfSpgCsG.js","assets/toolbar-icon-button-C-bcFp4s.js","assets/alert-dialog-DyR5Q_Tj.js","assets/task-status-CmnhmVw4.js","assets/use-main-panel-tabs-LtZ4Guyx.js","assets/use-mcp-tools-CMaYw_Hr.js","assets/use-task-metadata-X-a_cXtq.js","assets/use-project-native-view-presence-DhTiN6Ju.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-dQMTZ0D4.js","assets/site-slug-uya6Wp4-.js","assets/virtual-mcp-CjQcEdrw.js","assets/legacy-main-redirect-DR_vBjBo.js","assets/preview-dialog-8QorEoUx.js","assets/preview-content-CwblWQ7j.js","assets/file-preview-r_4dJHJu.js","assets/utils-DZ1FARwz.js","assets/editor-B6qYQm3q.js","assets/file-share-button-tzoRmnRq.js","assets/blocks-preview-workspace-context-BI0TdpjN.js"])))=>i.map(i=>d[i]);
2
- import{c as R,b as Y,f as Vr,d as Pa,j as i,B as he,L as Ro,l as M,eG as $o,eH as Eo,r as L,M as Ye,m as Jn,K as lt,aw as ol,h as vt,t as We,J as cl,_ as Mt,n as ur,e as Vn,x as Mo,a as dl,as as Qr,ai as Io,D as zo,ax as Hn,u as Lo,au as Po,v as ul,N as xi,o as ki,ag as Oo,F as Fo,eI as Ho,E as qo,eJ as Uo}from"./index-Ci6FOo2o.js";import{T as rt,n as Ko,i as Wo,a as Go,b as bi,K as Vo,P as Qo,d as Zo,D as Yo,f as Xo,e as Jo,g as ec,s as tc,S as sc,v as nc,u as rc,C as ac}from"./rich-text-link-control-IfY5GJsh.js";import{u as fl}from"./use-task-board-analytics-M_xSWhmc.js";import{C as ic}from"./combobox-LgVI0Z7L.js";import{e as lc,W as oc,X as cc,Z as dc,x as uc,aH as fc,aE as hc,aI as Oa,aJ as pc,U as Yn,aK as yi,aL as mc,w as hl,c as zr,aM as gc,d as pl,K as xc,z as $r,an as Fa,a5 as Zr,aN as kc,O as Yr,n as bc}from"./agent-icon-8_uoIw9T.js";import{g as He}from"./get-initials-D-f_fDFw.js";import{A as qe}from"./avatar-DU3VcflD.js";import{T as yc,a as wc,c as vc}from"./tooltip-Cjm5-OzF.js";import{i as er}from"./CheckCircle-62tE7hh5.js";import{i as Ha}from"./ChevronRight-CFHS6mGR.js";import{i as ml}from"./SwitchHorizontal01-D4Xp6795.js";import{s as lr}from"./Plus-B3s19fbp.js";import{i as Xn}from"./X-Bl6p2PHk.js";import{a as ar,b as Er,P as Mr}from"./popover-CvyZH1aK.js";import{a as ve,g as qa,D as Ge,b as Ve,c as Qe,h as qn,i as Un,j as Kn}from"./dropdown-menu-BwJm6kWw.js";import{b as jc,S as yt,m as fr,s as gl,k as xl,t as kl,n as bl,o as yl,q as Ba,l as or,r as wl,f as Et,T as vl,e as Ze,P as Xr,v as Sc,w as Tc,x as Cc,y as Nc,z as jl,A as _c,B as Bc,u as Ac,C as Dc,a as wi,D as Rc,E as $c,F as Sl,G as Ec,i as Mc,c as Ic,H as zc,I as Lc,J as Pc,L as Aa,K as vi,M as Oc,N as Fc,O as Hc,Q as qc,R as Uc}from"./task-route-uoLnchBD.js";import{R as Kc}from"./repository-import-picker-DyOhHF3u.js";import{a as Ua}from"./use-members-CXzxpKBu.js";import{a as Ka}from"./format-time-BtXRrtv4.js";import{u as Wa,a as Wc,b as Gc}from"./use-tags-DZpP5qDZ.js";import{a as Ga,g as Tl}from"./use-organization-settings-g6uVBQuV.js";import{d as Lr,b as Pr,D as Or,h as Cl,c as Nl,e as _l}from"./dialog-CALEql2B.js";import{B as Vc,a as Qc,b as ji,c as Zc,d as Yc,e as Xc}from"./breadcrumb-zgHbWMCc.js";import{C as Va}from"./calendar-ButUng_A.js";import{A as Si,a as Jc,b as ed}from"./alert-Dt-3NCs0.js";import{C as td,a as sd,b as nd}from"./collapsible-DCvGxmdk.js";import{u as Sa}from"./use-copy-DU94HmBe.js";import{i as Ut}from"./AlertCircle-VdsUyDsL.js";import{i as Qn}from"./Check-CCHtN2JL.js";import{t as Qa}from"./ChevronUp-58_Y92Dn.js";import{i as Bl,b as rd}from"./UserSquare-v3UhY-wJ.js";import{a as ad}from"./Copy01-DUI0S5po.js";import{i as Da}from"./Globe01-BxiM5hiu.js";import{n as cr}from"./LinkExternal01-2jYkMKWf.js";import{s as Al}from"./User01-D61cOv44.js";import{m as id,a as ld,M as Dl}from"./markdown-Bj_2Le1s.js";import{R as od,e as cd,S as Ae,C as dd,D as ud,i as Ra,n as fd,f as hd}from"./task-board-BnjdulNB.js";import{a as pd,E as Za,r as kt,t as md,v as gd,w as Rl,x as Ht,y as Ti,z as xd,A as kd,B as Ci,C as bd,G as dr,N as Wt,m as wt,H as Fr,T as $l,R as Ya,I as Xa,h as yd,J as wd,K as vd,L as jd,O as Sd,Q as Td,s as El,S as Cd,u as Ml,b as Il,U as Nd,c as _d}from"./index-2Adyhfq_.js";import{B as Bd,c as Ad,t as Dd,C as zl,f as Rd,g as Ni,s as $d,m as _i,a as Bi,b as Ed,d as Ai,e as Md,h as Id,i as zd,j as Ld,k as Pd,l as Od,n as Fd}from"./index-DO47GS7M.js";import{i as Hd}from"./Link01-DqK8epHf.js";import{s as qd}from"./Trash01-DBG5z7yc.js";import{c as Ud,e as Ll,s as Pl}from"./hooks-Dn-h6Vcw.js";import{n as Kd}from"./Download01-D1unS475.js";import{i as Wd}from"./File02-C6lTNDur.js";import{d as Ja,e as ei,c as ti,C as si,b as Zn,a as Hr}from"./command-DeI04U1v.js";import{u as Gd}from"./use-org-auth-client-BPP7gPmZ.js";import{h as Vd,b as Qd}from"./use-org-fs-DVHt8CES.js";import{d as Zd,S as Di}from"./sandbox-start-errors-BK_aDCyt.js";import{p as Yd,r as Xd,u as Ol,G as Jd}from"./repository-picker-BUYJfJUH.js";import{i as eu,c as tu}from"./hooks-Ccqgw_Vz.js";import{u as Fl}from"./use-connection-Xm7LN_9n.js";import{e as su,b as nu}from"./use-virtual-mcp-cCLIMV1h.js";import{s as ru}from"./use-project-scope-BjFNebNc.js";import{l as au}from"./github-repo-scope-C8GSbvaz.js";import{c as iu,S as lu,a as ou,b as cu}from"./sheet-3mWdWARg.js";import{T as du}from"./thread-sheet-body-B1hx9HMM.js";import{u as uu}from"./use-mcp-client-DXM1xOfJ.js";import{i as fu}from"./ArrowUp-BFEFFMY1.js";import{i as hu}from"./ChevronSelectorVertical-C0AfY4BX.js";import{u as pu}from"./use-open-billing-url-BEBNPLNJ.js";import{s as mu,w as gu}from"./chat-draft-Dr_jRWei.js";import{u as xu}from"./shell-layout-BhU24obU.js";const ku={github:"pull",gitlab:"-/merge_requests",bitbucket:"pull-requests"};function bu(t,e){return`${Xd(t)}/${ku[t.provider]}/${e}`}const yu=[{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}],wu={"api.github.com":"github.com","api.bitbucket.org":"bitbucket.org"};function vu(t){const e=t.toLowerCase();return wu[e]??e}function ju(t,e){const s=Number(t[3]);if(!Number.isSafeInteger(s)||s<=0)return null;const r=vu(t[1]),n=t[2],a=e?decodeURIComponent(n):n;if(/^\d+$/.test(a))return null;const l=Yd(`https://${r}/${a}`);return l?{repo:l,number:s,url:bu(l,s)}:null}function Su(t){const e=t.trim();if(!e)return null;for(const{re:s,api:r}of yu){const n=s.exec(e),a=n?ju(n,r===!0):null;if(a)return a}return null}function Tu(){const t=R.c(5),e=Y(),s=Vr({strict:!1}).org??"",{data:r}=fl();if(!r?.isCrossOrgView)return null;let n;t[0]!==s||t[1]!==e?(n=e("taskBoard.analytics.bannerOrg",{org:s}),t[0]=s,t[1]=e,t[2]=n):n=t[2];let a;return t[3]!==n?(a=i.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:n}),t[3]=n,t[4]=a):a=t[4],a}function Cu(){const t=R.c(28),e=Y(),s=Pa(),r=Vr({strict:!1}).org??"",{data:n}=fl();if(!n?.isTaskBoardAdmin)return null;let a;t[0]!==n.orgs?(a=n.orgs.map(Nu),t[0]=n.orgs,t[1]=a):a=t[1];const l=a;let o;t[2]!==s?(o=b=>s({to:"/$org/tasks/{-$taskKey}",params:{org:b}}),t[2]=s,t[3]=o):o=t[3];let c;t[4]!==e?(c=e("taskBoard.analytics.orgPickerPlaceholder"),t[4]=e,t[5]=c):c=t[5];let d;t[6]!==e?(d=e("taskBoard.analytics.orgSearch"),t[6]=e,t[7]=d):d=t[7];let u;t[8]!==e?(u=e("taskBoard.analytics.orgEmpty"),t[8]=e,t[9]=u):u=t[9];let f;t[10]!==l||t[11]!==r||t[12]!==o||t[13]!==c||t[14]!==d||t[15]!==u?(f=i.jsx(ic,{options:l,value:r,onChange:o,width:"w-[200px]",placeholder:c,searchPlaceholder:d,emptyMessage:u}),t[10]=l,t[11]=r,t[12]=o,t[13]=c,t[14]=d,t[15]=u,t[16]=f):f=t[16];let h;t[17]!==r?(h={org:r},t[17]=r,t[18]=h):h=t[18];let x;t[19]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx(lc,{size:16}),t[19]=x):x=t[19];let g;t[20]!==e?(g=e("taskBoard.analytics.openAnalytics"),t[20]=e,t[21]=g):g=t[21];let p;t[22]!==h||t[23]!==g?(p=i.jsx(he,{size:"sm",variant:"outline",asChild:!0,children:i.jsxs(Ro,{to:"/$org/taskboard-analytics",params:h,children:[x,g]})}),t[22]=h,t[23]=g,t[24]=p):p=t[24];let k;return t[25]!==f||t[26]!==p?(k=i.jsxs(i.Fragment,{children:[f,p]}),t[25]=f,t[26]=p,t[27]=k):k=t[27],k}function Nu(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function ni(t){const e=R.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:`${$o}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:Eo,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 _u(t){const e=R.c(30),{editor:s}=t,r=Y(),[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=Ko(l);if(S===""){p();return}if(!Wo(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(Hd,{size:14}),e[13]=y):y=e[13];let v;e[14]!==f||e[15]!==m||e[16]!==x?(v=i.jsx(rt,{active:f,label:m,onClick:x,children:y}),e[14]=f,e[15]=m,e[16]=x,e[17]=v):v=e[17];let w;e[18]!==f||e[19]!==b||e[20]!==l||e[21]!==s||e[22]!==c||e[23]!==n||e[24]!==p||e[25]!==r?(w=n&&i.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md border bg-popover p-1 shadow-md",onBlur:S=>{S.currentTarget.contains(S.relatedTarget)||a(!1)},children:[i.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":c,placeholder:r("markdownEditor.linkPlaceholder"),value:l,onChange:S=>{o(S.target.value),d(!1)},onKeyDown:S=>{S.key==="Enter"?(S.preventDefault(),b()):S.key==="Escape"&&(S.preventDefault(),a(!1),s.chain().focus().run())},className:M("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",c&&"text-destructive")}),i.jsx(rt,{active:!1,label:r("markdownEditor.linkApply"),onClick:b,children:i.jsx(Qn,{size:14})}),f&&i.jsx(rt,{active:!1,label:r("markdownEditor.linkRemove"),onClick:p,children:i.jsx(qd,{size:14})})]}),e[18]=f,e[19]=b,e[20]=l,e[21]=s,e[22]=c,e[23]=n,e[24]=p,e[25]=r,e[26]=w):w=e[26];let j;return e[27]!==v||e[28]!==w?(j=i.jsxs("div",{className:"relative",children:[v,w]}),e[27]=v,e[28]=w,e[29]=j):j=e[29],j}const Ta=()=>{const t=R.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},Ri=t=>{const e=R.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},Hl=[1,2,3],Bu=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function Au(t){const e=R.c(20),{editor:s}=t,r=Y(),[n,a]=L.useState(null);let l;e[0]!==s?(l={editor:s,selector:Du},e[0]=s,e[1]=l):l=e[1];const o=pd(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(Bd,{editor:s,shouldShow:Bu,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(rt,{active:o.bold,label:r("markdownEditor.bold"),onClick:()=>s.chain().focus().toggleBold().run(),children:i.jsx(oc,{size:14})}),i.jsx(rt,{active:o.italic,label:r("markdownEditor.italic"),onClick:()=>s.chain().focus().toggleItalic().run(),children:i.jsx(cc,{size:14})}),i.jsx(rt,{active:o.strike,label:r("markdownEditor.strikethrough"),onClick:()=>s.chain().focus().toggleStrike().run(),children:i.jsx(dc,{size:14})}),i.jsx(rt,{active:o.code,label:r("markdownEditor.code"),onClick:()=>s.chain().focus().toggleCode().run(),children:i.jsx(uc,{size:14})}),i.jsx(Ta,{}),Hl.map((p,k)=>i.jsx(rt,{active:o.headings[k]??!1,label:h[p],onClick:()=>s.chain().focus().toggleHeading({level:p}).run(),children:i.jsx(Ri,{children:`H${p}`})},p)),i.jsx(Ta,{}),i.jsx(rt,{active:o.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>s.chain().focus().toggleBulletList().run(),children:i.jsx(ml,{size:14})}),i.jsx(rt,{active:o.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>s.chain().focus().toggleOrderedList().run(),children:i.jsx(Ri,{children:"1."})}),i.jsx(rt,{active:o.blockquote,label:r("markdownEditor.quote"),onClick:()=>s.chain().focus().toggleBlockquote().run(),children:i.jsx(fc,{size:14})}),i.jsx(Ta,{}),i.jsx(_u,{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 Du(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Hl.map(s=>e.isActive("heading",{level:s})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}function ri(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gt=ri();function ql(t){Gt=t}var qt={exec:()=>null};function ie(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(Oe.caret,"$1"),s=s.replace(n,l),r},getRegex:()=>new RegExp(s,e)};return r}var Ru=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Oe={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)}}>`)},$u=/^(?:[ \t]*(?:\n|$))+/,Eu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mu=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Iu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ai=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ul=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kl=ie(Ul).replace(/bull/g,ai).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(),zu=ie(Ul).replace(/bull/g,ai).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(),ii=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Lu=/^[^\n]+/,li=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Pu=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",li).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ou=ie(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ai).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",oi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Fu=ie("^ {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",oi).replace("tag",Jr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Wl=ie(ii).replace("hr",hr).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(),Hu=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Wl).getRegex(),ci={blockquote:Hu,code:Eu,def:Pu,fences:Mu,heading:Iu,hr,html:Fu,lheading:Kl,list:Ou,newline:$u,paragraph:Wl,table:qt,text:Lu},$i=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hr).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(),qu={...ci,lheading:zu,table:$i,paragraph:ie(ii).replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$i).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()},Uu={...ci,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oi).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:qt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(ii).replace("hr",hr).replace("heading",` *#{1,6} *[^
3
- ]`).replace("lheading",Kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ku=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Wu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gl=/^( {2,}|\\)\n(?!\s*$)/,Gu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,ea=/[\s\p{P}\p{S}]/u,di=/[^\s\p{P}\p{S}]/u,Vu=ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ea).getRegex(),Vl=/(?!~)[\p{P}\p{S}]/u,Qu=/(?!~)[\s\p{P}\p{S}]/u,Zu=/(?:[^\s\p{P}\p{S}]|~)/u,Yu=ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ru?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ql=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Xu=ie(Ql,"u").replace(/punct/g,tr).getRegex(),Ju=ie(Ql,"u").replace(/punct/g,Vl).getRegex(),Zl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ef=ie(Zl,"gu").replace(/notPunctSpace/g,di).replace(/punctSpace/g,ea).replace(/punct/g,tr).getRegex(),tf=ie(Zl,"gu").replace(/notPunctSpace/g,Zu).replace(/punctSpace/g,Qu).replace(/punct/g,Vl).getRegex(),sf=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,di).replace(/punctSpace/g,ea).replace(/punct/g,tr).getRegex(),nf=ie(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,tr).getRegex(),rf="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",af=ie(rf,"gu").replace(/notPunctSpace/g,di).replace(/punctSpace/g,ea).replace(/punct/g,tr).getRegex(),lf=ie(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),of=ie(/^<(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(),cf=ie(oi).replace("(?:-->|$)","-->").getRegex(),df=ie("^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",cf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,uf=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",qr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Yl=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",qr).replace("ref",li).getRegex(),Xl=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",li).getRegex(),ff=ie("reflink|nolink(?!\\()","g").replace("reflink",Yl).replace("nolink",Xl).getRegex(),Ei=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ui={_backpedal:qt,anyPunctuation:lf,autolink:of,blockSkip:Yu,br:Gl,code:Wu,del:qt,delLDelim:qt,delRDelim:qt,emStrongLDelim:Xu,emStrongRDelimAst:ef,emStrongRDelimUnd:sf,escape:Ku,link:uf,nolink:Xl,punctuation:Vu,reflink:Yl,reflinkSearch:ff,tag:df,text:Gu,url:qt},hf={...ui,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",qr).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qr).getRegex()},$a={...ui,emStrongRDelimAst:tf,emStrongLDelim:Ju,delLDelim:nf,delRDelim:af,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ei).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:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ei).getRegex()},pf={...$a,br:ie(Gl).replace("{2,}","*").getRegex(),text:ie($a.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Br={normal:ci,gfm:qu,pedantic:Uu},sr={normal:ui,gfm:$a,breaks:pf,pedantic:hf},mf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Mi=t=>mf[t];function ft(t,e){if(e){if(Oe.escapeTest.test(t))return t.replace(Oe.escapeReplace,Mi)}else if(Oe.escapeTestNoEncode.test(t))return t.replace(Oe.escapeReplaceNoEncode,Mi);return t}function Ii(t){try{t=encodeURI(t).replace(Oe.percentDecode,"%")}catch{return null}return t}function zi(t,e){let s=t.replace(Oe.findPipe,(a,l,o)=>{let c=!1,d=l;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),r=s.split(Oe.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(Oe.slashPipe,"|");return r}function nr(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 gf(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 xf(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 Li(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 kf(t,e,s){let r=t.match(s.other.indentCodeCompensation);if(r===null)return e;let n=r[1];return e.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-BHp1yMIV.js","assets/index-BYo7xjw_.js","assets/index-CpNTsElB.css","assets/index-D04wJiA7.js","assets/ArrowUp-CseIJyft.js","assets/chat-context-Bu5sIHkQ.js","assets/use-panel-navigate-ambGkCyT.js","assets/thread-route-DNm3Iu0z.js","assets/use-project-scope-CQpPI5pW.js","assets/use-virtual-mcp-BqJjq2ej.js","assets/use-mcp-client-D-7BuLrC.js","assets/auth-DQLPrt1d.js","assets/github-repo-BknN0SVI.js","assets/autosend-DBLW1BiY.js","assets/thread-intent-D1siGaGJ.js","assets/slugify-CEUa2lfQ.js","assets/hooks-ClWLwZb6.js","assets/backoff-8mStPHYB.js","assets/task-board-DyB0568a.js","assets/schema-CGSQcL_x.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-Du1tEG7N.js","assets/use-ai-providers-CTTRbTuh.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-B1TzFZ8t.js","assets/use-organization-settings-DmPwVQte.js","assets/gateway-client-D1lNGMSB.js","assets/tooltip-DiUW72WF.js","assets/index-C_tMl4q8.js","assets/dialog-D57kq_tP.js","assets/X-BH7q4C1t.js","assets/drawer-DDadqt4q.js","assets/collection-search-CYFbkY1e.js","assets/SearchMd-CVv1yVth.js","assets/use-mobile-C2LLCzmr.js","assets/use-mcp-prompts-OVUxMbpa.js","assets/index-DqscriGX.js","assets/form-x2RdyMbl.js","assets/label-B9P1qvVv.js","assets/input-B0Uinzv0.js","assets/utils-CVEq3hMx.js","assets/org-file-open-context-BFThBGhY.js","assets/input-Dzyq242f.js","assets/command-palette-store-AuoaPk0G.js","assets/chat-draft-CDnPwvf3.js","assets/use-session-runtime-DRNcjNGp.js","assets/ArrowRight-BbuAJZmx.js","assets/agent-icon-CWoY8dlp.js","assets/AlertCircle-DkoTBUue.js","assets/Tool01-dFp1h9Fm.js","assets/ArrowLeft-eoxjWHed.js","assets/Tool02-DEN5a-af.js","assets/TrendUp01-BK_K6NH_.js","assets/ZoomOut-CvFdKFHJ.js","assets/Users03-CUK-7hPD.js","assets/CheckCircle-CSZ4Kehv.js","assets/Check-BDjrzcrN.js","assets/ChevronUp-BrOu8rnp.js","assets/ChevronRight-DFWFq-ve.js","assets/ChevronSelectorVertical-C9J9C02y.js","assets/DotsVertical-mYRVr9AH.js","assets/UserSquare-DZNy5OUH.js","assets/Copy01-CCOGzU1d.js","assets/CreditCard01-CuoUWRm0.js","assets/Database01-CJba45_T.js","assets/MessageCircle01-CwQvoxPA.js","assets/Download01-Bd0rofRl.js","assets/Printer-BgQcHd8s.js","assets/Settings02-7e_CWXN4.js","assets/Eye-74QOe9cC.js","assets/File02-CmMbIRXN.js","assets/Share07-CWr7FJF7.js","assets/GitBranch01-BKO8WN_h.js","assets/Globe01-Ck7RTkU3.js","assets/SwitchHorizontal01-BRr1FvfD.js","assets/HardDrive-DU6J9iPu.js","assets/Image01-DnYDSI2h.js","assets/Key01-BZd6Jwvq.js","assets/Link01-B52qN1xV.js","assets/LinkExternal01-BDgcOJqm.js","assets/Monitor01-BcYUPleF.js","assets/Sun-I1e-KcTY.js","assets/Package-C4SRuwMw.js","assets/Palette-C9EL1sNC.js","assets/Play-CyyInR_v.js","assets/Plus-BEdGLMcS.js","assets/SearchLg-D8sOk12E.js","assets/Shield01-B8e5sZlX.js","assets/Stars01-DtXaEO3a.js","assets/Trash01-DGA8npEZ.js","assets/Upload01-B3v_JBAz.js","assets/User01-Dbdndpwo.js","assets/Users01-AYbQCr7m.js","assets/XCircle-CFDcIdAJ.js","assets/XClose-2vlbdyhB.js","assets/Zap-Df8_LH9g.js","assets/select-KcyEErkL.js","assets/usage-stats-BXE2Nb57.js","assets/use-copy-C3r_mwJc.js","assets/markdown-BLbEs4th.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/tabs-CU7XBCqm.js","assets/use-deco-credits-BHIJCyKo.js","assets/toggle-group-DngX-VZh.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-CDGeF8Bu.js","assets/decopilot-C-Fh2iwl.js","assets/checkbox-KtkqQde0.js","assets/ai-providers-logos-DD3qZ33J.js","assets/avatar-CA5LIB-l.js","assets/download-app-dialog-Dd6sw41_.js","assets/popover-ZSYA9qhq.js","assets/index-Br-oQZuQ.js","assets/input-BWSDRY3j.js","assets/hooks-BX3ndMg6.js","assets/use-org-fs-B-yTulsp.js","assets/dropdown-menu-l7cu0teq.js","assets/question-004-sINsf4GQ.js","assets/use-members-0fLORe9n.js","assets/use-org-auth-client-B9bt8Cd1.js","assets/feature-paywall-DsAStIcU.js","assets/plan-ladder-BxTjLX-u.js","assets/add-connection-dialog-CazdSHRl.js","assets/extract-connection-data-Dh_Eo1wZ.js","assets/metadata-dUsYcpuu.js","assets/github-D4UJ99TO.js","assets/connection-BYV9fPN2.js","assets/connection-card-Dr9bHZoV.js","assets/use-registry-connections-Dwr4-IPF.js","assets/use-connection-CM4EgQPU.js","assets/useInfiniteQuery-BigrA6tZ.js","assets/infiniteQueryObserver-BegmJhfO.js","assets/retry-i8LvYSZg.js","assets/connection-slug-CITJ0kGN.js","assets/integration-icon-Jv69owhG.js","assets/textarea-__p0yo6J.js","assets/connection-form-helpers-BXp-lVpJ.js","assets/authenticate-and-persist-oauth-DiSz7oRO.js","assets/mcp-oauth-gEPmFmtm.js","assets/collection-tabs-Cub0gFzH.js","assets/badge-BHHKIdAQ.js","assets/use-infinite-scroll-C-upQcAM.js","assets/useSuspenseInfiniteQuery-OUbXRXpI.js","assets/pair-CyjnQvo_.js","assets/collapsible--RUSBZp8.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-BuE-fXND.js","assets/types-CVnCSrZu.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-C6AQzwc3.js","assets/anchors-yqDzZN4K.js","assets/use-org-notice-CKxbuoVc.js","assets/command-Aa0mYduw.js","assets/index-dzbklFKC.js","assets/project-icon-B44PuWmC.js","assets/required-auth-layout-DfvknvbD.js","assets/use-org-sso-DDMls_8S.js","assets/shell-layout-CuFt8bor.css","assets/sheet-CuLnIbRo.js","assets/use-navigate-to-agent-C_uFa92h.js","assets/use-thread-outputs-CNFVOo0z.js","assets/file-type-icon-DwxUV7LB.js","assets/decofile-api-DEul9pGZ.js","assets/use-releases-B5rxjDuL.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-BKxKj4xP.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/empty-state-Cad5zFK6.js","assets/index-DHMJogsX.js","assets/index-CSGdKnA2.js","assets/resizable-DtEfzvUR.js","assets/use-route-default-main-BGhZVnpH.js","assets/toolbar-icon-button-CoaHzqzV.js","assets/alert-dialog-Cj4mq8qj.js","assets/task-status-BlXRiQX3.js","assets/use-main-panel-tabs-A9lWrQg1.js","assets/use-mcp-tools-Bka5B8hg.js","assets/use-task-metadata-DFjC02ql.js","assets/use-project-native-view-presence-BG-Guaa9.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-BlwCwjVB.js","assets/site-slug-uya6Wp4-.js","assets/virtual-mcp-DuQ9gz9U.js","assets/legacy-main-redirect-CU9SDsoJ.js","assets/preview-dialog-CZ7yktMz.js","assets/preview-content-DfENsiTd.js","assets/file-preview-CDdVdNDx.js","assets/utils-Bsd7FiR5.js","assets/editor-DhL1XnKC.js","assets/file-share-button-DTqbvQ69.js","assets/blocks-preview-workspace-context-DD1sbvCI.js"])))=>i.map(i=>d[i]);
2
+ import{c as D,M as Ue,f as Vr,u as cl,j as i,h as ht,bI as Eo,b as Y,d as Pa,B as he,L as Mo,l as M,eG as Io,eH as zo,r as L,m as Jn,K as lt,aw as dl,t as Ge,J as ul,_ as Mt,n as ur,e as Vn,x as Lo,a as fl,as as Qr,ai as Po,D as Oo,ax as Hn,au as Fo,v as hl,N as ki,o as bi,ag as Ho,F as qo,eI as Uo,E as Ko,eJ as Wo}from"./index-BYo7xjw_.js";import{T as rt,n as Go,i as Vo,a as Qo,b as yi,K as Zo,P as Yo,d as Xo,D as Jo,f as ec,g as tc,s as sc,e as nc,S as rc,v as ac,u as ic,C as lc}from"./rich-text-link-control-S-iuuCcb.js";import{u as pl}from"./use-task-board-analytics-BAbIvIck.js";import{C as oc}from"./combobox-DKSSMn_F.js";import{e as cc,W as dc,X as uc,Z as fc,x as hc,aH as pc,aE as mc,aI as Oa,aJ as gc,U as Yn,aK as wi,aL as xc,w as ml,c as zr,aM as kc,d as gl,K as bc,z as $r,an as Fa,a5 as Zr,aN as yc,O as Yr,n as wc}from"./agent-icon-CWoY8dlp.js";import{g as He}from"./get-initials-D-f_fDFw.js";import{A as qe}from"./avatar-CA5LIB-l.js";import{T as vc,a as jc,c as Sc}from"./tooltip-DiUW72WF.js";import{i as er}from"./CheckCircle-CSZ4Kehv.js";import{i as Ha}from"./ChevronRight-DFWFq-ve.js";import{i as xl}from"./SwitchHorizontal01-BRr1FvfD.js";import{s as lr}from"./Plus-BEdGLMcS.js";import{i as Xn}from"./X-BH7q4C1t.js";import{a as ar,b as Er,P as Mr}from"./popover-ZSYA9qhq.js";import{a as ve,g as qa,D as Ve,b as Qe,c as Ze,h as qn,i as Un,j as Kn}from"./dropdown-menu-l7cu0teq.js";import{b as Tc,S as wt,m as fr,s as kl,k as bl,t as yl,n as wl,o as vl,q as Ba,l as or,r as jl,f as Et,T as Sl,e as Ye,P as Xr,v as Cc,w as Nc,x as _c,y as Bc,z as Tl,A as Ac,B as Dc,u as Rc,C as $c,a as vi,D as Ec,E as Mc,F as Cl,G as Ic,L as Aa,H as zc,I as Lc,i as Pc,c as Oc,J as Fc,K as Hc,M as qc,N as Uc,O as ji,Q as Kc,R as Wc}from"./task-route-DadSSpKF.js";import{R as Gc}from"./repository-import-picker-BBGtjhUh.js";import{a as Ua}from"./use-members-0fLORe9n.js";import{a as Ka}from"./format-time-BtXRrtv4.js";import{u as Wa,a as Vc,b as Qc}from"./use-tags-Dz0JHmit.js";import{a as Ga,g as Nl}from"./use-organization-settings-DmPwVQte.js";import{d as Lr,b as Pr,D as Or,h as _l,c as Bl,e as Al}from"./dialog-D57kq_tP.js";import{B as Zc,a as Yc,b as Si,c as Xc,d as Jc,e as ed}from"./breadcrumb-CtLbOAvM.js";import{C as Va}from"./calendar-CuSfsKMP.js";import{A as Ti,a as td,b as sd}from"./alert-CHNmHigh.js";import{C as nd,a as rd,b as ad}from"./collapsible--RUSBZp8.js";import{u as Sa}from"./use-copy-C3r_mwJc.js";import{i as Ut}from"./AlertCircle-DkoTBUue.js";import{i as Qn}from"./Check-BDjrzcrN.js";import{t as Qa}from"./ChevronUp-BrOu8rnp.js";import{i as Dl,b as id}from"./UserSquare-DZNy5OUH.js";import{a as ld}from"./Copy01-CCOGzU1d.js";import{i as Da}from"./Globe01-Ck7RTkU3.js";import{n as cr}from"./LinkExternal01-BDgcOJqm.js";import{s as Rl}from"./User01-Dbdndpwo.js";import{m as od,a as cd,M as $l}from"./markdown-BLbEs4th.js";import{R as dd,e as ud,S as Ae,C as fd,D as hd,i as Ra,n as pd,f as md}from"./task-board-DyB0568a.js";import{a as gd,E as Za,r as bt,t as xd,v as kd,w as El,x as Ht,y as Ci,z as bd,A as yd,B as Ni,C as wd,G as dr,N as Wt,m as vt,H as Fr,T as Ml,R as Ya,I as Xa,h as vd,J as jd,K as Sd,L as Td,O as Cd,Q as Nd,s as Il,S as _d,u as zl,b as Ll,U as Bd,c as Ad}from"./index-DqscriGX.js";import{B as Dd,c as Rd,t as $d,C as Pl,f as Ed,g as _i,s as Md,m as Bi,a as Ai,b as Id,d as Di,e as zd,h as Ld,i as Pd,j as Od,k as Fd,l as Hd,n as qd}from"./index-BhSpAyPc.js";import{i as Ud}from"./Link01-B52qN1xV.js";import{s as Kd}from"./Trash01-DGA8npEZ.js";import{c as Wd,e as Ol,s as Fl}from"./hooks-BX3ndMg6.js";import{n as Gd}from"./Download01-Bd0rofRl.js";import{i as Vd}from"./File02-CmMbIRXN.js";import{d as Ja,e as ei,c as ti,C as si,b as Zn,a as Hr}from"./command-Aa0mYduw.js";import{u as Qd}from"./use-org-auth-client-B9bt8Cd1.js";import{h as Zd,b as Yd}from"./use-org-fs-B-yTulsp.js";import{d as Xd,S as Ri}from"./sandbox-start-errors-BK_aDCyt.js";import{p as Jd,r as eu,u as Hl,G as tu}from"./repository-picker-C-TSiXvU.js";import{i as su,c as nu}from"./hooks-ClWLwZb6.js";import{u as ql}from"./use-connection-CM4EgQPU.js";import{e as ru,b as au}from"./use-virtual-mcp-BqJjq2ej.js";import{s as iu}from"./use-project-scope-CQpPI5pW.js";import{l as lu}from"./github-repo-scope-C8GSbvaz.js";import{c as ou,S as cu,a as du,b as uu}from"./sheet-CuLnIbRo.js";import{T as fu}from"./thread-sheet-body-BXdoz1zb.js";import{u as hu}from"./use-mcp-client-D-7BuLrC.js";import{i as pu}from"./ArrowUp-CseIJyft.js";import{i as mu}from"./ChevronSelectorVertical-C9J9C02y.js";import{u as gu}from"./use-open-billing-url-CDGeF8Bu.js";import{s as xu,w as ku}from"./chat-draft-CDnPwvf3.js";import{u as bu}from"./shell-layout-C6AQzwc3.js";const yu={github:"pull",gitlab:"-/merge_requests",bitbucket:"pull-requests"};function wu(t,e){return`${eu(t)}/${yu[t.provider]}/${e}`}const vu=[{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}],ju={"api.github.com":"github.com","api.bitbucket.org":"bitbucket.org"};function Su(t){const e=t.toLowerCase();return ju[e]??e}function Tu(t,e){const s=Number(t[3]);if(!Number.isSafeInteger(s)||s<=0)return null;const r=Su(t[1]),n=t[2],a=e?decodeURIComponent(n):n;if(/^\d+$/.test(a))return null;const l=Jd(`https://${r}/${a}`);return l?{repo:l,number:s,url:wu(l,s)}:null}function Cu(t){const e=t.trim();if(!e)return null;for(const{re:s,api:r}of vu){const n=s.exec(e),a=n?Tu(n,r===!0):null;if(a)return a}return null}function ni(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Vr(e).org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{boardOrg:n}=cl(r);return n&&n!==s?n:null}function Nu(t){const e=D.c(12),{children:s}=t,{project:r}=Ue(),n=ni(),{data:a,isLoading:l}=pl();if(!n)return s;if(l){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(ht,{className:"size-5 text-muted-foreground"})}),e[0]=f):f=e[0],f}let o;e[1]!==a?.orgs||e[2]!==n?(o=a?.orgs.find(f=>f.slug===n),e[1]=a?.orgs,e[2]=n,e[3]=o):o=e[3];const c=o;if(!c)return s;let d;e[4]!==c.id||e[5]!==c.name||e[6]!==c.slug?(d={id:c.id,name:c.name,slug:c.slug,logo:null},e[4]=c.id,e[5]=c.name,e[6]=c.slug,e[7]=d):d=e[7];let u;return e[8]!==s||e[9]!==r||e[10]!==d?(u=i.jsx(Eo,{org:d,project:r,children:s}),e[8]=s,e[9]=r,e[10]=d,e[11]=u):u=e[11],u}function _u(){const t=D.c(5),e=Y(),s=ni();if(!s)return null;let r;t[0]!==e||t[1]!==s?(r=e("taskBoard.analytics.bannerOrg",{org:s}),t[0]=e,t[1]=s,t[2]=r):r=t[2];let n;return t[3]!==r?(n=i.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:r}),t[3]=r,t[4]=n):n=t[4],n}function Bu(){const t=D.c(38),e=Y(),s=Pa(),r=Vr({strict:!1}).org??"",n=ni(),{data:a}=pl();if(!a?.isTaskBoardAdmin)return null;let l;t[0]!==e?(l=e("taskBoard.analytics.orgCurrent"),t[0]=e,t[1]=l):l=t[1];let o;t[2]!==r||t[3]!==l?(o={value:r,label:l},t[2]=r,t[3]=l,t[4]=o):o=t[4];let c;if(t[5]!==a.orgs||t[6]!==r||t[7]!==o){let w;t[9]!==r?(w=j=>j.slug!==r,t[9]=r,t[10]=w):w=t[10],c=[o,...a.orgs.filter(w).map(Au)],t[5]=a.orgs,t[6]=r,t[7]=o,t[8]=c}else c=t[8];const d=c,u=n??r;let f;t[11]!==s||t[12]!==r?(f=w=>s({to:".",search:j=>({...j,boardOrg:w===r?void 0:w}),replace:!0}),t[11]=s,t[12]=r,t[13]=f):f=t[13];let h;t[14]!==e?(h=e("taskBoard.analytics.orgPickerPlaceholder"),t[14]=e,t[15]=h):h=t[15];let x;t[16]!==e?(x=e("taskBoard.analytics.orgSearch"),t[16]=e,t[17]=x):x=t[17];let g;t[18]!==e?(g=e("taskBoard.analytics.orgEmpty"),t[18]=e,t[19]=g):g=t[19];let p;t[20]!==d||t[21]!==u||t[22]!==f||t[23]!==h||t[24]!==x||t[25]!==g?(p=i.jsx(oc,{options:d,value:u,onChange:f,width:"w-[200px]",placeholder:h,searchPlaceholder:x,emptyMessage:g}),t[20]=d,t[21]=u,t[22]=f,t[23]=h,t[24]=x,t[25]=g,t[26]=p):p=t[26];let k;t[27]!==r?(k={org:r},t[27]=r,t[28]=k):k=t[28];let b;t[29]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(cc,{size:16}),t[29]=b):b=t[29];let m;t[30]!==e?(m=e("taskBoard.analytics.openAnalytics"),t[30]=e,t[31]=m):m=t[31];let y;t[32]!==m||t[33]!==k?(y=i.jsx(he,{size:"sm",variant:"outline",asChild:!0,children:i.jsxs(Mo,{to:"/$org/taskboard-analytics",params:k,children:[b,m]})}),t[32]=m,t[33]=k,t[34]=y):y=t[34];let v;return t[35]!==y||t[36]!==p?(v=i.jsxs(i.Fragment,{children:[p,y]}),t[35]=y,t[36]=p,t[37]=v):v=t[37],v}function Au(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function ri(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:`${Io}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:zo,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 Du(t){const e=D.c(30),{editor:s}=t,r=Y(),[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=Go(l);if(S===""){p();return}if(!Vo(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(Ud,{size:14}),e[13]=y):y=e[13];let v;e[14]!==f||e[15]!==m||e[16]!==x?(v=i.jsx(rt,{active:f,label:m,onClick:x,children:y}),e[14]=f,e[15]=m,e[16]=x,e[17]=v):v=e[17];let w;e[18]!==f||e[19]!==b||e[20]!==l||e[21]!==s||e[22]!==c||e[23]!==n||e[24]!==p||e[25]!==r?(w=n&&i.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md border bg-popover p-1 shadow-md",onBlur:S=>{S.currentTarget.contains(S.relatedTarget)||a(!1)},children:[i.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":c,placeholder:r("markdownEditor.linkPlaceholder"),value:l,onChange:S=>{o(S.target.value),d(!1)},onKeyDown:S=>{S.key==="Enter"?(S.preventDefault(),b()):S.key==="Escape"&&(S.preventDefault(),a(!1),s.chain().focus().run())},className:M("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",c&&"text-destructive")}),i.jsx(rt,{active:!1,label:r("markdownEditor.linkApply"),onClick:b,children:i.jsx(Qn,{size:14})}),f&&i.jsx(rt,{active:!1,label:r("markdownEditor.linkRemove"),onClick:p,children:i.jsx(Kd,{size:14})})]}),e[18]=f,e[19]=b,e[20]=l,e[21]=s,e[22]=c,e[23]=n,e[24]=p,e[25]=r,e[26]=w):w=e[26];let j;return e[27]!==v||e[28]!==w?(j=i.jsxs("div",{className:"relative",children:[v,w]}),e[27]=v,e[28]=w,e[29]=j):j=e[29],j}const Ta=()=>{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},Ul=[1,2,3],Ru=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function $u(t){const e=D.c(20),{editor:s}=t,r=Y(),[n,a]=L.useState(null);let l;e[0]!==s?(l={editor:s,selector:Eu},e[0]=s,e[1]=l):l=e[1];const o=gd(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(Dd,{editor:s,shouldShow:Ru,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(rt,{active:o.bold,label:r("markdownEditor.bold"),onClick:()=>s.chain().focus().toggleBold().run(),children:i.jsx(dc,{size:14})}),i.jsx(rt,{active:o.italic,label:r("markdownEditor.italic"),onClick:()=>s.chain().focus().toggleItalic().run(),children:i.jsx(uc,{size:14})}),i.jsx(rt,{active:o.strike,label:r("markdownEditor.strikethrough"),onClick:()=>s.chain().focus().toggleStrike().run(),children:i.jsx(fc,{size:14})}),i.jsx(rt,{active:o.code,label:r("markdownEditor.code"),onClick:()=>s.chain().focus().toggleCode().run(),children:i.jsx(hc,{size:14})}),i.jsx(Ta,{}),Ul.map((p,k)=>i.jsx(rt,{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(Ta,{}),i.jsx(rt,{active:o.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>s.chain().focus().toggleBulletList().run(),children:i.jsx(xl,{size:14})}),i.jsx(rt,{active:o.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>s.chain().focus().toggleOrderedList().run(),children:i.jsx($i,{children:"1."})}),i.jsx(rt,{active:o.blockquote,label:r("markdownEditor.quote"),onClick:()=>s.chain().focus().toggleBlockquote().run(),children:i.jsx(pc,{size:14})}),i.jsx(Ta,{}),i.jsx(Du,{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 Eu(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ul.map(s=>e.isActive("heading",{level:s})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}function ai(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gt=ai();function Kl(t){Gt=t}var qt={exec:()=>null};function ie(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(Oe.caret,"$1"),s=s.replace(n,l),r},getRegex:()=>new RegExp(s,e)};return r}var Mu=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Oe={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)}}>`)},Iu=/^(?:[ \t]*(?:\n|$))+/,zu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lu=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Pu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ii=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Gl=ie(Wl).replace(/bull/g,ii).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(),Ou=ie(Wl).replace(/bull/g,ii).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(),li=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Fu=/^[^\n]+/,oi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Hu=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",oi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qu=ie(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ii).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",ci=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Uu=ie("^ {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",ci).replace("tag",Jr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vl=ie(li).replace("hr",hr).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(),Ku=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vl).getRegex(),di={blockquote:Ku,code:zu,def:Hu,fences:Lu,heading:Pu,hr,html:Uu,lheading:Gl,list:qu,newline:Iu,paragraph:Vl,table:qt,text:Fu},Ei=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hr).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(),Wu={...di,lheading:Ou,table:Ei,paragraph:ie(li).replace("hr",hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ei).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()},Gu={...di,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ci).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:qt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(li).replace("hr",hr).replace("heading",` *#{1,6} *[^
3
+ ]`).replace("lheading",Gl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Vu=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ql=/^( {2,}|\\)\n(?!\s*$)/,Zu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,ea=/[\s\p{P}\p{S}]/u,ui=/[^\s\p{P}\p{S}]/u,Yu=ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ea).getRegex(),Zl=/(?!~)[\p{P}\p{S}]/u,Xu=/(?!~)[\s\p{P}\p{S}]/u,Ju=/(?:[^\s\p{P}\p{S}]|~)/u,ef=ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Mu?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Yl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,tf=ie(Yl,"u").replace(/punct/g,tr).getRegex(),sf=ie(Yl,"u").replace(/punct/g,Zl).getRegex(),Xl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nf=ie(Xl,"gu").replace(/notPunctSpace/g,ui).replace(/punctSpace/g,ea).replace(/punct/g,tr).getRegex(),rf=ie(Xl,"gu").replace(/notPunctSpace/g,Ju).replace(/punctSpace/g,Xu).replace(/punct/g,Zl).getRegex(),af=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ui).replace(/punctSpace/g,ea).replace(/punct/g,tr).getRegex(),lf=ie(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,tr).getRegex(),of="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",cf=ie(of,"gu").replace(/notPunctSpace/g,ui).replace(/punctSpace/g,ea).replace(/punct/g,tr).getRegex(),df=ie(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),uf=ie(/^<(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(),ff=ie(ci).replace("(?:-->|$)","-->").getRegex(),hf=ie("^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",ff).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,pf=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",qr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Jl=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",qr).replace("ref",oi).getRegex(),eo=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",oi).getRegex(),mf=ie("reflink|nolink(?!\\()","g").replace("reflink",Jl).replace("nolink",eo).getRegex(),Mi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,fi={_backpedal:qt,anyPunctuation:df,autolink:uf,blockSkip:ef,br:Ql,code:Qu,del:qt,delLDelim:qt,delRDelim:qt,emStrongLDelim:tf,emStrongRDelimAst:nf,emStrongRDelimUnd:af,escape:Vu,link:pf,nolink:eo,punctuation:Yu,reflink:Jl,reflinkSearch:mf,tag:hf,text:Zu,url:qt},gf={...fi,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",qr).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qr).getRegex()},$a={...fi,emStrongRDelimAst:rf,emStrongLDelim:sf,delLDelim:lf,delRDelim:cf,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Mi).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:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Mi).getRegex()},xf={...$a,br:ie(Ql).replace("{2,}","*").getRegex(),text:ie($a.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Br={normal:di,gfm:Wu,pedantic:Gu},sr={normal:fi,gfm:$a,breaks:xf,pedantic:gf},kf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ii=t=>kf[t];function ft(t,e){if(e){if(Oe.escapeTest.test(t))return t.replace(Oe.escapeReplace,Ii)}else if(Oe.escapeTestNoEncode.test(t))return t.replace(Oe.escapeReplaceNoEncode,Ii);return t}function zi(t){try{t=encodeURI(t).replace(Oe.percentDecode,"%")}catch{return null}return t}function Li(t,e){let s=t.replace(Oe.findPipe,(a,l,o)=>{let c=!1,d=l;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),r=s.split(Oe.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(Oe.slashPipe,"|");return r}function nr(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 bf(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 yf(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 Pi(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 wf(t,e,s){let r=t.match(s.other.indentCodeCompensation);if(r===null)return e;let n=r[1];return e.split(`
4
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
5
  `)}var Ur=class{options;rules;lexer;constructor(t){this.options=t||Gt}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:nr(s,`
6
- `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let s=e[0],r=kf(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=nr(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:nr(e[0],`
6
+ `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let s=e[0],r=wf(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=nr(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:nr(e[0],`
7
7
  `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let s=nr(e[0],`
8
8
  `).split(`
9
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(`
@@ -15,16 +15,16 @@ ${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
15
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
16
  `+s.join(`
17
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=xf(e[2].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=yf(e[2].split(`
19
19
  `,1)[0],e[1].length),h=t.split(`
20
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
21
  `,t=t.substring(h.length+1),c=!0),!c){let p=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),b=this.rules.other.fencesBeginRegex(g),m=this.rules.other.headingBeginRegex(g),y=this.rules.other.htmlBeginRegex(g),v=this.rules.other.blockquoteBeginRegex(g);for(;t;){let w=t.split(`
22
22
  `,1)[0],j;if(h=w,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),j=h):j=h.replace(this.rules.other.tabCharGlobal," "),b.test(h)||m.test(h)||y.test(h)||v.test(h)||p.test(h)||k.test(h))break;if(j.search(this.rules.other.nonSpaceChar)>=g||!h.trim())u+=`
23
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
24
  `+h}x=!h.trim(),d+=w+`
25
- `,t=t.substring(w.length+1),f=j.slice(g)}}n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(l=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),n.raw+=d}let o=n.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c of n.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(c.raw);if(d){let u={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};c.checked=u.checked,n.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}if(!n.loose){let d=c.tokens.filter(f=>f.type==="space"),u=d.length>0&&d.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=u}}if(n.loose)for(let c of n.items){c.loose=!0;for(let d of c.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let s=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:s,raw:e[0],href:r,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let s=zi(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(zi(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=nr(s.slice(0,-1),"\\");if((s.length-a.length)%2===0)return}else{let a=gf(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)),Li(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 Li(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}}}},at=class Ea{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Gt,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:Oe,block:Br.normal,inline:sr.normal};this.options.pedantic?(s.block=Br.pedantic,s.inline=sr.pedantic):this.options.gfm&&(s.block=Br.gfm,this.options.breaks?s.inline=sr.breaks:s.inline=sr.gfm),this.tokenizer.rules=s}static get rules(){return{block:Br,inline:sr}}static lex(e,s){return new Ea(s).lex(e)}static lexInline(e,s){return new Ea(s).inlineTokens(e)}lex(e){e=e.replace(Oe.carriageReturn,`
25
+ `,t=t.substring(w.length+1),f=j.slice(g)}}n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(l=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),n.raw+=d}let o=n.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c of n.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(c.raw);if(d){let u={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};c.checked=u.checked,n.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}if(!n.loose){let d=c.tokens.filter(f=>f.type==="space"),u=d.length>0&&d.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=u}}if(n.loose)for(let c of n.items){c.loose=!0;for(let d of c.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let s=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:s,raw:e[0],href:r,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let s=Li(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(Li(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=nr(s.slice(0,-1),"\\");if((s.length-a.length)%2===0)return}else{let a=bf(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)),Pi(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 Pi(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}}}},at=class Ea{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Gt,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:Oe,block:Br.normal,inline:sr.normal};this.options.pedantic?(s.block=Br.pedantic,s.inline=sr.pedantic):this.options.gfm&&(s.block=Br.gfm,this.options.breaks?s.inline=sr.breaks:s.inline=sr.gfm),this.tokenizer.rules=s}static get rules(){return{block:Br,inline:sr}}static lex(e,s){return new Ea(s).lex(e)}static lexInline(e,s){return new Ea(s).inlineTokens(e)}lex(e){e=e.replace(Oe.carriageReturn,`
28
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(Oe.tabCharGlobal," ").replace(Oe.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
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
30
  `)?"":`
@@ -56,35 +56,35 @@ ${this.parser.parse(t)}</blockquote>
56
56
  `}tablerow({text:t}){return`<tr>
57
57
  ${t}</tr>
58
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>${ft(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=Ii(t);if(n===null)return r;t=n;let a='<a href="'+t+'"';return e&&(a+=' title="'+ft(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=Ii(t);if(n===null)return ft(s);t=n;let a=`<img src="${t}" alt="${ft(s)}"`;return e&&(a+=` title="${ft(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ft(t.text)}},fi=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}},it=class Ma{options;renderer;textRenderer;constructor(e){this.options=e||Gt,this.options.renderer=this.options.renderer||new Kr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fi}static parse(e,s){return new Ma(s).parse(e)}static parseInline(e,s){return new Ma(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}},ir=class{options;block;constructor(t){this.options=t||Gt}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?at.lex:at.lexInline}provideParser(t=this.block){return t?it.parse:it.parseInline}},bf=class{defaults=ri();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=it;Renderer=Kr;TextRenderer=fi;Lexer=at;Tokenizer=Ur;Hooks=ir;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 Kr(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 ir;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];ir.passThroughHooks.has(a)?n[l]=d=>{if(this.defaults.async&&ir.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 at.lex(t,e??this.defaults)}parser(t,e){return it.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?at.lex:at.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?it.parse:it.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?at.lex:at.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?it.parse:it.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>"+ft(s.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(s);throw s}}},Kt=new bf;function ge(t,e){return Kt.parse(t,e)}ge.options=ge.setOptions=function(t){return Kt.setOptions(t),ge.defaults=Kt.defaults,ql(ge.defaults),ge};ge.getDefaults=ri;ge.defaults=Gt;ge.use=function(...t){return Kt.use(...t),ge.defaults=Kt.defaults,ql(ge.defaults),ge};ge.walkTokens=function(t,e){return Kt.walkTokens(t,e)};ge.parseInline=Kt.parseInline;ge.Parser=it;ge.parser=it.parse;ge.Renderer=Kr;ge.TextRenderer=fi;ge.Lexer=at;ge.lexer=at.lex;ge.Tokenizer=Ur;ge.Hooks=ir;ge.parse=ge;ge.options;ge.setOptions;ge.use;ge.walkTokens;ge.parseInline;it.parse;at.lex;const yf=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function wf(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(yf);return n?[{...e,raw:(e.raw||"").slice(0,-n[0].length)},{type:"space",raw:n[0]}]:[e]})}function vf(t,e){const s=e.split(`
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>${ft(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=zi(t);if(n===null)return r;t=n;let a='<a href="'+t+'"';return e&&(a+=' title="'+ft(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=zi(t);if(n===null)return ft(s);t=n;let a=`<img src="${t}" alt="${ft(s)}"`;return e&&(a+=` title="${ft(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ft(t.text)}},hi=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}},it=class Ma{options;renderer;textRenderer;constructor(e){this.options=e||Gt,this.options.renderer=this.options.renderer||new Kr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hi}static parse(e,s){return new Ma(s).parse(e)}static parseInline(e,s){return new Ma(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}},ir=class{options;block;constructor(t){this.options=t||Gt}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?at.lex:at.lexInline}provideParser(t=this.block){return t?it.parse:it.parseInline}},vf=class{defaults=ai();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=it;Renderer=Kr;TextRenderer=hi;Lexer=at;Tokenizer=Ur;Hooks=ir;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 Kr(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 ir;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];ir.passThroughHooks.has(a)?n[l]=d=>{if(this.defaults.async&&ir.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 at.lex(t,e??this.defaults)}parser(t,e){return it.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?at.lex:at.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?it.parse:it.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?at.lex:at.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?it.parse:it.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>"+ft(s.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(s);throw s}}},Kt=new vf;function ge(t,e){return Kt.parse(t,e)}ge.options=ge.setOptions=function(t){return Kt.setOptions(t),ge.defaults=Kt.defaults,Kl(ge.defaults),ge};ge.getDefaults=ai;ge.defaults=Gt;ge.use=function(...t){return Kt.use(...t),ge.defaults=Kt.defaults,Kl(ge.defaults),ge};ge.walkTokens=function(t,e){return Kt.walkTokens(t,e)};ge.parseInline=Kt.parseInline;ge.Parser=it;ge.parser=it.parse;ge.Renderer=Kr;ge.TextRenderer=hi;ge.Lexer=at;ge.lexer=at.lex;ge.Tokenizer=Ur;ge.Hooks=ir;ge.parse=ge;ge.options;ge.setOptions;ge.use;ge.walkTokens;ge.parseInline;it.parse;at.lex;const jf=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function Sf(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(jf);return n?[{...e,raw:(e.raw||"").slice(0,-n[0].length)},{type:"space",raw:n[0]}]:[e]})}function Tf(t,e){const s=e.split(`
61
61
  `).flatMap(r=>[r,""]).map(r=>`${t}${r}`).join(`
62
- `);return s.slice(0,s.length-1)}function jf(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&&dr(a.attrs,n.attrs))||s.push(r)}),s}function Sf(t,e){const s=[];return Array.from(e.entries()).forEach(([r,n])=>{const a=t.get(r);(!a||!dr(a.attrs,n.attrs))&&s.push({type:r,mark:n})}),s}function Tf(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&&dr(u.attrs,d.attrs))||o.push(c)}):(n||a)&&o.push(...Array.from(t.keys()).reverse())),o}function Cf(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 Nf(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 Ca(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 Ar(t,e){return typeof t!="string"?"json":e}const _f=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"]),Bf=/<\/?([a-zA-Z][\w-]*)/g;function Af(t){const e=[];let s;for(;(s=Bf.exec(t))!==null;)e.push(s[1].toLowerCase());return e}function Df(t){const e=t.toLowerCase();return e.includes("-")?!1:!_f.has(e)}function Rf(t,e){return Af(t).some(s=>Df(s)?!e.has(s):!1)}var Pi=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:ge,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,md(gd(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=Rl(Ht(t,"code")),n=t.name;r&&this.codeTypes.add(n),this.extensionRanks.has(n)||this.extensionRanks.set(n,this.extensionRanks.size);const a=Ht(t,"markdownTokenName")||n,l=Ht(t,"parseMarkdown"),o=Ht(t,"renderMarkdown"),c=Ht(t,"markdownTokenizer"),d=(e=Ht(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?wf(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,`
62
+ `);return s.slice(0,s.length-1)}function Cf(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&&dr(a.attrs,n.attrs))||s.push(r)}),s}function Nf(t,e){const s=[];return Array.from(e.entries()).forEach(([r,n])=>{const a=t.get(r);(!a||!dr(a.attrs,n.attrs))&&s.push({type:r,mark:n})}),s}function _f(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&&dr(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 Af(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 Ca(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 Ar(t,e){return typeof t!="string"?"json":e}const Df=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"]),Rf=/<\/?([a-zA-Z][\w-]*)/g;function $f(t){const e=[];let s;for(;(s=Rf.exec(t))!==null;)e.push(s[1].toLowerCase());return e}function Ef(t){const e=t.toLowerCase();return e.includes("-")?!1:!Df.has(e)}function Mf(t,e){return $f(t).some(s=>Ef(s)?!e.has(s):!1)}var Oi=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:ge,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,xd(kd(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=El(Ht(t,"code")),n=t.name;r&&this.codeTypes.add(n),this.extensionRanks.has(n)||this.extensionRanks.set(n,this.extensionRanks.size);const a=Ht(t,"markdownTokenName")||n,l=Ht(t,"parseMarkdown"),o=Ht(t,"renderMarkdown"),c=Ht(t,"markdownTokenizer"),d=(e=Ht(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?Sf(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
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=>Ca(o).isTask),s=t.items.some(o=>!Ca(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}=Ca(c);let h=c;if(d){const g=(c.raw||c.text||"").split(`
64
64
  `),p=g[0].match(/^\s*[-+*]\s+\[([ xX])\]\s+(.*)$/),k=p?p[2]:"";let b=[];if(g.length>1&&g.slice(1).join(`
65
65
  `).trim()){const m=g.slice(1),y=m.filter(v=>v.trim());if(y.length>0){const v=Math.min(...y.map(j=>j.length-j.trimStart().length)),w=m.map(j=>j.trim()?j.slice(v):"").join(`
66
66
  `).trim();w&&(b=this.markedInstance.lexer(`${w}
67
- `))}}h={type:"taskItem",raw:"",mainContent:k,indentLevel:f,checked:u??!1,text:k,tokens:this.tokenizeInline(k),nestedTokens:b}}const x=d?"taskList":"list";a!==x?(n.length>0&&r.push({type:a,items:n}),n=[h],a=x):n.push(h)}n.length>0&&r.push({type:a,items:n});const l=[];for(let o=0;o<r.length;o+=1){const c=r[o],d={...t,type:c.type,items:c.items},u=this.parseToken(d);u&&(Array.isArray(u)?l.push(...u):l.push(u))}return l.length>0?l:null}parseTokenWithHandlers(t){if(!t.type)return null;const e=this.getHandlersForToken(t.type),s=this.createParseHelpers();if(e.find(r=>{if(!r.parseMarkdown)return!1;const n=r.parseMarkdown(t,s),a=this.normalizeParseResult(n);return a&&(!Array.isArray(a)||a.length>0)?(this.lastParseResult=a,!0):!1})&&this.lastParseResult){const r=this.lastParseResult;return this.lastParseResult=null,r}return this.parseFallbackToken(t)}createParseHelpers(){return{parseInline:t=>this.parseInlineTokens(t),tokenizeInline:t=>this.tokenizeInline(t),parseChildren:t=>this.parseTokens(t),parseBlockChildren:t=>this.parseTokens(t,!0),createTextNode:(t,e)=>({type:"text",text:t,marks:e||void 0}),createNode:(t,e,s)=>{const r={type:t,attrs:e||void 0,content:s||void 0};return(!e||Object.keys(e).length===0)&&delete r.attrs,r},applyMark:(t,e,s)=>({mark:t,content:e,attrs:s&&Object.keys(s).length>0?s:void 0})}}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}parseInlineTokens(t){const e=[];for(let l=0;l<t.length;l+=1){const o=t[l];if(o.type==="text")e.push({type:"text",text:Ti(o.text||"")});else if(o.type==="escape")e.push({type:"text",text:o.text||""});else if(o.type==="html"){var s,r;const c=((s=(r=o.raw)!==null&&r!==void 0?r:o.text)!==null&&s!==void 0?s:"").toString(),d=/^<\/[\s]*[\w-]+/i.test(c),u=c.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!d&&u&&!/\/>$/.test(c)){const h=u[1],x=this.escapeRegex(h),g=new RegExp(`^<\\/\\s*${x}\\b`,"i");let p=-1;const k=[c];for(let b=l+1;b<t.length;b+=1){var n,a;const m=t[b],y=((n=(a=m.raw)!==null&&a!==void 0?a:m.text)!==null&&n!==void 0?n:"").toString();if(k.push(y),m.type==="html"&&g.test(y)){p=b;break}}if(p!==-1){const b=k.join(""),m={type:"html",raw:b,text:b,block:!1},y=this.parseHTMLToken(m);if(y){const v=this.normalizeParseResult(y);Array.isArray(v)?e.push(...v):v&&e.push(v)}l=p;continue}}const f=this.parseHTMLToken(o);if(f){const h=this.normalizeParseResult(f);Array.isArray(h)?e.push(...h):h&&e.push(h)}}else if(o.type){const c=this.getHandlerForToken(o.type);if(c&&c.parseMarkdown){const d=this.createParseHelpers(),u=c.parseMarkdown(o,d);if(this.isMarkResult(u)){const f=this.applyMarkToContent(u.mark,u.content,u.attrs);e.push(...f)}else{const f=this.normalizeParseResult(u);Array.isArray(f)?e.push(...f):f&&e.push(f)}}else o.tokens&&e.push(...this.parseInlineTokens(o.tokens))}}for(let l=e.length-1;l>0;l-=1){const o=e[l],c=e[l-1];if(o.type==="text"&&c.type==="text"){const d=o.marks||[],u=c.marks||[];xd(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:Ti(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=kd(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=Ci(this.baseExtensions);Object.values(e.nodes).forEach(s=>{s.isInline&&t.add(s.name)})}catch{}return this.inlineNodeTypesCache=t,t}isUnrecognizedHtml(t){return Rf(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=Ci(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(bd(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:vf},d={index:s,level:r,parentType:e?.type,previousNode:o,meta:{parentAttrs:e?.attrs,...n}};return((a=l.renderMarkdown)===null||a===void 0?void 0:a.call(l,t,c,d))||""}renderNodes(t,e,s="",r=0,n=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,s,n):t.type?this.renderNodeToMarkdown(t,e,r,n):""}renderNodesWithMarkBoundaries(t,e,s="",r=0){const n=[],a=new Map,l=new Set,o=new Map;return t.forEach((c,d)=>{const u=d<t.length-1?t[d+1]:null;if(c.type)if(c.type==="text"){let f=this.encodeTextForMarkdown(c.text||"",c,e);const h=new Map((c.marks||[]).map(w=>[w.type,w])),x=this.getMarksToOpenForSerialization(a,h,u),g=jf(h,u),p=g.filter(w=>a.has(w)),k=p.length>0&&x.length>0;let b="";if(g.length>0&&!k){const w=f.match(/(\s+)$/);w&&(b=w[1],f=f.slice(0,-b.length))}k||g.slice().reverse().forEach(w=>{if(!a.has(w))return;const j=h.get(w),S=this.getMarkClosing(w,j,o.get(w));S&&(f+=S),a.has(w)&&(a.delete(w),o.delete(w))});let m="";if(x.length>0){const w=f.match(/^(\s+)/);w&&(m=w[1],f=f.slice(m.length))}x.forEach(({type:w,mark:j})=>{const S=l.has(w)?"html":"markdown",C=this.getMarkOpening(w,j,S);C&&(f=C+f),o.set(w,S),l.delete(w)}),k||x.slice().reverse().forEach(({type:w,mark:j})=>{a.set(w,j)}),f=m+f;let y;if(k){const w=new Set((u?.marks||[]).map(C=>C.type));x.forEach(({type:C})=>{w.has(C)&&this.getHtmlReopenTags(C)&&l.add(C)});const j=Array.from(a.keys()),S=p.slice().sort((C,N)=>j.indexOf(N)-j.indexOf(C));y=[...x.map(C=>C.type),...S]}else y=Tf(a,h,u,this.markSetsEqual.bind(this));let v="";if(y.length>0){const w=f.match(/(\s+)$/);w&&(v=w[1],f=f.slice(0,-v.length))}y.forEach(w=>{var j;const S=(j=a.get(w))!==null&&j!==void 0?j:h.get(w),C=this.getMarkClosing(w,S,o.get(w));C&&(f+=C),a.delete(w),o.delete(w)}),f+=v,f+=b,n.push(f)}else{const f=new Set((c.marks||[]).map(b=>b.type)),h=new Map,x=new Map;a.forEach((b,m)=>{if(f.has(m)){var y;h.set(m,b),x.set(m,(y=o.get(m))!==null&&y!==void 0?y:"markdown")}});const g=Cf(a,(b,m)=>this.getMarkClosing(b,m,o.get(b)));o.clear();const p=this.renderNodeToMarkdown(c,e,d,r),k=c.type==="hardBreak"?"":Nf(h,a,(b,m)=>{var y;const v=(y=x.get(b))!==null&&y!==void 0?y:"markdown";return o.set(b,v),this.getMarkOpening(b,m,v)});n.push(g+p+k)}}),n.join(s)}getMarkOpening(t,e,s="markdown"){if(s==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.open)||""}const n=this.getHandlersForNodeType(t),a=n.length>0?n[0]:void 0;if(!a||!a.renderMarkdown)return"";const l="__TIPTAP_MARKDOWN_PLACEHOLDER__",o={type:t,attrs:e.attrs||{},content:[{type:"text",text:l}]};try{const c=a.renderMarkdown(o,{renderChildren:()=>l,renderChild:()=>l,indent:u=>u,wrapInBlock:(u,f)=>u+f},{index:0,level:0,parentType:"text",meta:{}}),d=c.indexOf(l);return d>=0?c.substring(0,d):""}catch(c){throw new Error(`Failed to get mark opening for ${t}: ${c}`)}}getMarkClosing(t,e,s="markdown"){if(s==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.close)||""}const n=this.getHandlersForNodeType(t),a=n.length>0?n[0]:void 0;if(!a||!a.renderMarkdown)return"";const l="__TIPTAP_MARKDOWN_PLACEHOLDER__",o={type:t,attrs:e.attrs||{},content:[{type:"text",text:l}]};try{const c=a.renderMarkdown(o,{renderChildren:()=>l,renderChild:()=>l,indent:f=>f,wrapInBlock:(f,h)=>f+h},{index:0,level:0,parentType:"text",meta:{}}),d=c.indexOf(l),u=d+33;return d>=0?c.substring(u):""}catch(c){throw new Error(`Failed to get mark closing for ${t}: ${c}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),s=e.length>0?e[0]:void 0;return s?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([s,r])=>{const n=e.get(s);return n&&dr(r.attrs,n.attrs)})}getMarksToOpenForSerialization(t,e,s){const r=Sf(t,e);if(r.length<=1)return r;const n=s?.marks||[],a=(d,u)=>n.some(f=>f.type===d&&dr(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 Jl=Za.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType)return kt.setContent(t,e);if(Ar(t,e?.contentType)!=="markdown"||!this.editor.markdown)return kt.setContent(t,e);const s=this.editor.markdown.parse(t);return kt.setContent(s,e)},insertContent:(t,e)=>{if(!e?.contentType)return kt.insertContent(t,e);if(Ar(t,e?.contentType)!=="markdown"||!this.editor.markdown)return kt.insertContent(t,e);const s=this.editor.markdown.parse(t);return kt.insertContent(s,e)},insertContentAt:(t,e,s)=>{if(!s?.contentType)return kt.insertContentAt(t,e,s);if(Ar(e,s?.contentType)!=="markdown"||!this.editor.markdown)return kt.insertContentAt(t,e,s);const r=this.editor.markdown.parse(e);return kt.insertContentAt(t,r,s)}}},addStorage(){return{manager:new Pi({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 Pi({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||Ar(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 Wr(t){return t==="left"||t==="right"||t==="center"?t:null}function $f(t){const e=(t.style.textAlign||"").trim().toLowerCase(),s=(t.getAttribute("align")||"").trim().toLowerCase();return Wr(e||s)}function Ef(t){return Wr(t?.align)}function eo(){return{default:null,parseHTML:t=>$f(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}function Mf(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 to(t){const e=t.getAttribute("colwidth");return e?e.split(",").map(s=>parseInt(s,10)):Mf(t)}const If=/[ \t\r\n\f]+/g;function so(t){var e;return t.children.length>0?!1:((e=t.textContent)!==null&&e!==void 0?e:"").replace(If,"")===""}function no(t){const e=t.createAndFill();if(!e)throw new Error(`[tiptap error]: "${t.name}" has no default content to backfill.`);return e.content}const zf=Wt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:to},align:eo()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:t=>so(t)?{}:!1,getContent:(t,e)=>no(e.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",wt(this.options.HTMLAttributes,t),0]}}),Lf=Wt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:to},align:eo()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:t=>so(t)?{}:!1,getContent:(t,e)=>no(e.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",wt(this.options.HTMLAttributes,t),0]}}),Pf=Wt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",wt(this.options.HTMLAttributes,t),0]}});function Ia(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Oi(t,e,s,r,n,a){let l=0,o=!0,c=e.firstChild;const d=t.firstChild;if(d!==null)for(let h=0,x=0;h<d.childCount;h+=1){const{colspan:g,colwidth:p}=d.child(h).attrs;for(let k=0;k<g;k+=1,x+=1){const b=n===x?a:p&&p[k],m=b?`${b}px`:"";if(l+=b||r,b||(o=!1),c){if(c.style.width!==m){const[y,v]=Ia(r,b);c.style.setProperty(y,v)}c=c.nextSibling}else{const y=document.createElement("col"),[v,w]=Ia(r,b);y.style.setProperty(v,w),e.appendChild(y)}}}for(;c;){var u;const h=c.nextSibling;(u=c.parentNode)===null||u===void 0||u.removeChild(c),c=h}const f=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);o&&!f?(s.style.width=`${l}px`,s.style.minWidth=""):(s.style.width="",s.style.minWidth=`${l}px`)}var Of=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")),Oi(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,Oi(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 Ff(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]=Ia(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 Fi(t,e){return t.createAndFill()}function Hf(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 qf(t,e,s,r,n){const a=Hf(t),l=[],o=[];for(let d=0;d<s;d+=1){const u=Fi(a.cell);if(u&&o.push(u),r){const f=Fi(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 Uf(t){return t instanceof zl}const Dr=({editor:t})=>{const{selection:e}=t.state;if(!Uf(e))return!1;let s=0;const r=Fr(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 Hi(t,e){const s=t.mapping.map(e),r=Fr(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($l.near(t.doc.resolve(a),-1))}function Kf(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 Wf(t){return t.split(`
68
- `).map(e=>!e.includes("|")||!e.includes("`")?e:Kf(e)).join(`
69
- `)}function Gf(t){return(t||"").replace(/\s+/g," ").trim()}function Vf(t,e,s={}){var r;const n=(r=s.cellLineSeparator)!==null&&r!==void 0?r:"";if(!t||!t.content||t.content.length===0)return"";const a=[];t.content.forEach(g=>{const p=[];g.content&&g.content.forEach(k=>{let b="";k.content&&Array.isArray(k.content)&&k.content.length>1?b=k.content.map(w=>e.renderChildren(w)).join(n):b=k.content?e.renderChildren(k.content):"";const m=Gf(b.split(n).join(`
70
- `).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=k.type==="tableHeader",v=Ef(k.attrs);p.push({text:m,isHeader:y,align:v})}),a.push(p)});const l=a.reduce((g,p)=>Math.max(g,p.length),0);if(l===0)return"";const o=Array.from({length:l}).fill(0);a.forEach(g=>{for(let k=0;k<l;k+=1){var p;const b=(((p=g[k])===null||p===void 0?void 0:p.text)||"").length;b>o[k]&&(o[k]=b),o[k]<3&&(o[k]=3)}});const c=(g,p)=>g+" ".repeat(Math.max(0,p-g.length)),d=a[0],u=d.some(g=>g.isHeader),f=Array.from({length:l}).fill(null);a.forEach(g=>{for(let k=0;k<l;k+=1){var p;!f[k]&&(!((p=g[k])===null||p===void 0)&&p.align)&&(f[k]=g[k].align)}});let h=`
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:Ci(o.text||"")});else if(o.type==="escape")e.push({type:"text",text:o.text||""});else if(o.type==="html"){var s,r;const c=((s=(r=o.raw)!==null&&r!==void 0?r:o.text)!==null&&s!==void 0?s:"").toString(),d=/^<\/[\s]*[\w-]+/i.test(c),u=c.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!d&&u&&!/\/>$/.test(c)){const h=u[1],x=this.escapeRegex(h),g=new RegExp(`^<\\/\\s*${x}\\b`,"i");let p=-1;const k=[c];for(let b=l+1;b<t.length;b+=1){var n,a;const m=t[b],y=((n=(a=m.raw)!==null&&a!==void 0?a:m.text)!==null&&n!==void 0?n:"").toString();if(k.push(y),m.type==="html"&&g.test(y)){p=b;break}}if(p!==-1){const b=k.join(""),m={type:"html",raw:b,text:b,block:!1},y=this.parseHTMLToken(m);if(y){const v=this.normalizeParseResult(y);Array.isArray(v)?e.push(...v):v&&e.push(v)}l=p;continue}}const f=this.parseHTMLToken(o);if(f){const h=this.normalizeParseResult(f);Array.isArray(h)?e.push(...h):h&&e.push(h)}}else if(o.type){const c=this.getHandlerForToken(o.type);if(c&&c.parseMarkdown){const d=this.createParseHelpers(),u=c.parseMarkdown(o,d);if(this.isMarkResult(u)){const f=this.applyMarkToContent(u.mark,u.content,u.attrs);e.push(...f)}else{const f=this.normalizeParseResult(u);Array.isArray(f)?e.push(...f):f&&e.push(f)}}else o.tokens&&e.push(...this.parseInlineTokens(o.tokens))}}for(let l=e.length-1;l>0;l-=1){const o=e[l],c=e[l-1];if(o.type==="text"&&c.type==="text"){const d=o.marks||[],u=c.marks||[];bd(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:Ci(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=yd(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=Ni(this.baseExtensions);Object.values(e.nodes).forEach(s=>{s.isInline&&t.add(s.name)})}catch{}return this.inlineNodeTypesCache=t,t}isUnrecognizedHtml(t){return Mf(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=Ni(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(wd(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:Tf},d={index:s,level:r,parentType:e?.type,previousNode:o,meta:{parentAttrs:e?.attrs,...n}};return((a=l.renderMarkdown)===null||a===void 0?void 0:a.call(l,t,c,d))||""}renderNodes(t,e,s="",r=0,n=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,s,n):t.type?this.renderNodeToMarkdown(t,e,r,n):""}renderNodesWithMarkBoundaries(t,e,s="",r=0){const n=[],a=new Map,l=new Set,o=new Map;return t.forEach((c,d)=>{const u=d<t.length-1?t[d+1]:null;if(c.type)if(c.type==="text"){let f=this.encodeTextForMarkdown(c.text||"",c,e);const h=new Map((c.marks||[]).map(w=>[w.type,w])),x=this.getMarksToOpenForSerialization(a,h,u),g=Cf(h,u),p=g.filter(w=>a.has(w)),k=p.length>0&&x.length>0;let b="";if(g.length>0&&!k){const w=f.match(/(\s+)$/);w&&(b=w[1],f=f.slice(0,-b.length))}k||g.slice().reverse().forEach(w=>{if(!a.has(w))return;const j=h.get(w),S=this.getMarkClosing(w,j,o.get(w));S&&(f+=S),a.has(w)&&(a.delete(w),o.delete(w))});let m="";if(x.length>0){const w=f.match(/^(\s+)/);w&&(m=w[1],f=f.slice(m.length))}x.forEach(({type:w,mark:j})=>{const S=l.has(w)?"html":"markdown",C=this.getMarkOpening(w,j,S);C&&(f=C+f),o.set(w,S),l.delete(w)}),k||x.slice().reverse().forEach(({type:w,mark:j})=>{a.set(w,j)}),f=m+f;let y;if(k){const w=new Set((u?.marks||[]).map(C=>C.type));x.forEach(({type:C})=>{w.has(C)&&this.getHtmlReopenTags(C)&&l.add(C)});const j=Array.from(a.keys()),S=p.slice().sort((C,N)=>j.indexOf(N)-j.indexOf(C));y=[...x.map(C=>C.type),...S]}else y=_f(a,h,u,this.markSetsEqual.bind(this));let v="";if(y.length>0){const w=f.match(/(\s+)$/);w&&(v=w[1],f=f.slice(0,-v.length))}y.forEach(w=>{var j;const S=(j=a.get(w))!==null&&j!==void 0?j:h.get(w),C=this.getMarkClosing(w,S,o.get(w));C&&(f+=C),a.delete(w),o.delete(w)}),f+=v,f+=b,n.push(f)}else{const f=new Set((c.marks||[]).map(b=>b.type)),h=new Map,x=new Map;a.forEach((b,m)=>{if(f.has(m)){var y;h.set(m,b),x.set(m,(y=o.get(m))!==null&&y!==void 0?y:"markdown")}});const g=Bf(a,(b,m)=>this.getMarkClosing(b,m,o.get(b)));o.clear();const p=this.renderNodeToMarkdown(c,e,d,r),k=c.type==="hardBreak"?"":Af(h,a,(b,m)=>{var y;const v=(y=x.get(b))!==null&&y!==void 0?y:"markdown";return o.set(b,v),this.getMarkOpening(b,m,v)});n.push(g+p+k)}}),n.join(s)}getMarkOpening(t,e,s="markdown"){if(s==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.open)||""}const n=this.getHandlersForNodeType(t),a=n.length>0?n[0]:void 0;if(!a||!a.renderMarkdown)return"";const l="__TIPTAP_MARKDOWN_PLACEHOLDER__",o={type:t,attrs:e.attrs||{},content:[{type:"text",text:l}]};try{const c=a.renderMarkdown(o,{renderChildren:()=>l,renderChild:()=>l,indent:u=>u,wrapInBlock:(u,f)=>u+f},{index:0,level:0,parentType:"text",meta:{}}),d=c.indexOf(l);return d>=0?c.substring(0,d):""}catch(c){throw new Error(`Failed to get mark opening for ${t}: ${c}`)}}getMarkClosing(t,e,s="markdown"){if(s==="html"){var r;return((r=this.getHtmlReopenTags(t))===null||r===void 0?void 0:r.close)||""}const n=this.getHandlersForNodeType(t),a=n.length>0?n[0]:void 0;if(!a||!a.renderMarkdown)return"";const l="__TIPTAP_MARKDOWN_PLACEHOLDER__",o={type:t,attrs:e.attrs||{},content:[{type:"text",text:l}]};try{const c=a.renderMarkdown(o,{renderChildren:()=>l,renderChild:()=>l,indent:f=>f,wrapInBlock:(f,h)=>f+h},{index:0,level:0,parentType:"text",meta:{}}),d=c.indexOf(l),u=d+33;return d>=0?c.substring(u):""}catch(c){throw new Error(`Failed to get mark closing for ${t}: ${c}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),s=e.length>0?e[0]:void 0;return s?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([s,r])=>{const n=e.get(s);return n&&dr(r.attrs,n.attrs)})}getMarksToOpenForSerialization(t,e,s){const r=Nf(t,e);if(r.length<=1)return r;const n=s?.marks||[],a=(d,u)=>n.some(f=>f.type===d&&dr(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 to=Za.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType)return bt.setContent(t,e);if(Ar(t,e?.contentType)!=="markdown"||!this.editor.markdown)return bt.setContent(t,e);const s=this.editor.markdown.parse(t);return bt.setContent(s,e)},insertContent:(t,e)=>{if(!e?.contentType)return bt.insertContent(t,e);if(Ar(t,e?.contentType)!=="markdown"||!this.editor.markdown)return bt.insertContent(t,e);const s=this.editor.markdown.parse(t);return bt.insertContent(s,e)},insertContentAt:(t,e,s)=>{if(!s?.contentType)return bt.insertContentAt(t,e,s);if(Ar(e,s?.contentType)!=="markdown"||!this.editor.markdown)return bt.insertContentAt(t,e,s);const r=this.editor.markdown.parse(e);return bt.insertContentAt(t,r,s)}}},addStorage(){return{manager:new Oi({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 Oi({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||Ar(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 Wr(t){return t==="left"||t==="right"||t==="center"?t:null}function If(t){const e=(t.style.textAlign||"").trim().toLowerCase(),s=(t.getAttribute("align")||"").trim().toLowerCase();return Wr(e||s)}function zf(t){return Wr(t?.align)}function so(){return{default:null,parseHTML:t=>If(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}function Lf(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 no(t){const e=t.getAttribute("colwidth");return e?e.split(",").map(s=>parseInt(s,10)):Lf(t)}const Pf=/[ \t\r\n\f]+/g;function ro(t){var e;return t.children.length>0?!1:((e=t.textContent)!==null&&e!==void 0?e:"").replace(Pf,"")===""}function ao(t){const e=t.createAndFill();if(!e)throw new Error(`[tiptap error]: "${t.name}" has no default content to backfill.`);return e.content}const Of=Wt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:no},align:so()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:t=>ro(t)?{}:!1,getContent:(t,e)=>ao(e.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",vt(this.options.HTMLAttributes,t),0]}}),Ff=Wt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:no},align:so()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:t=>ro(t)?{}:!1,getContent:(t,e)=>ao(e.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",vt(this.options.HTMLAttributes,t),0]}}),Hf=Wt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",vt(this.options.HTMLAttributes,t),0]}});function Ia(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Fi(t,e,s,r,n,a){let l=0,o=!0,c=e.firstChild;const d=t.firstChild;if(d!==null)for(let h=0,x=0;h<d.childCount;h+=1){const{colspan:g,colwidth:p}=d.child(h).attrs;for(let k=0;k<g;k+=1,x+=1){const b=n===x?a:p&&p[k],m=b?`${b}px`:"";if(l+=b||r,b||(o=!1),c){if(c.style.width!==m){const[y,v]=Ia(r,b);c.style.setProperty(y,v)}c=c.nextSibling}else{const y=document.createElement("col"),[v,w]=Ia(r,b);y.style.setProperty(v,w),e.appendChild(y)}}}for(;c;){var u;const h=c.nextSibling;(u=c.parentNode)===null||u===void 0||u.removeChild(c),c=h}const f=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);o&&!f?(s.style.width=`${l}px`,s.style.minWidth=""):(s.style.width="",s.style.minWidth=`${l}px`)}var qf=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")),Fi(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,Fi(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 Uf(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]=Ia(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 Hi(t,e){return t.createAndFill()}function Kf(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 Wf(t,e,s,r,n){const a=Kf(t),l=[],o=[];for(let d=0;d<s;d+=1){const u=Hi(a.cell);if(u&&o.push(u),r){const f=Hi(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 Gf(t){return t instanceof Pl}const Dr=({editor:t})=>{const{selection:e}=t.state;if(!Gf(e))return!1;let s=0;const r=Fr(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 qi(t,e){const s=t.mapping.map(e),r=Fr(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(Ml.near(t.doc.resolve(a),-1))}function Vf(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 Qf(t){return t.split(`
68
+ `).map(e=>!e.includes("|")||!e.includes("`")?e:Vf(e)).join(`
69
+ `)}function Zf(t){return(t||"").replace(/\s+/g," ").trim()}function Yf(t,e,s={}){var r;const n=(r=s.cellLineSeparator)!==null&&r!==void 0?r:"";if(!t||!t.content||t.content.length===0)return"";const a=[];t.content.forEach(g=>{const p=[];g.content&&g.content.forEach(k=>{let b="";k.content&&Array.isArray(k.content)&&k.content.length>1?b=k.content.map(w=>e.renderChildren(w)).join(n):b=k.content?e.renderChildren(k.content):"";const m=Zf(b.split(n).join(`
70
+ `).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=k.type==="tableHeader",v=zf(k.attrs);p.push({text:m,isHeader:y,align:v})}),a.push(p)});const l=a.reduce((g,p)=>Math.max(g,p.length),0);if(l===0)return"";const o=Array.from({length:l}).fill(0);a.forEach(g=>{for(let k=0;k<l;k+=1){var p;const b=(((p=g[k])===null||p===void 0?void 0:p.text)||"").length;b>o[k]&&(o[k]=b),o[k]<3&&(o[k]=3)}});const c=(g,p)=>g+" ".repeat(Math.max(0,p-g.length)),d=a[0],u=d.some(g=>g.isHeader),f=Array.from({length:l}).fill(null);a.forEach(g=>{for(let k=0;k<l;k+=1){var p;!f[k]&&(!((p=g[k])===null||p===void 0)&&p.align)&&(f[k]=g[k].align)}});let h=`
71
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
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
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 Qf=Wt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Of,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}=Ff(t,this.options.cellMinWidth),a=e.style;function l(){return a||(r?`width: ${r}`:`min-width: ${n}`)}const o=["table",wt(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=Wr((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=Wr((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)=>Vf(t,e),markdownTokenizer:{name:"table",level:"block",start:t=>{const e=t.split(`
74
+ `}),h}const Xf=Wt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:qf,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}=Uf(t,this.options.cellMinWidth),a=e.style;function l(){return a||(r?`width: ${r}`:`min-width: ${n}`)}const o=["table",vt(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=Wr((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=Wr((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)=>Yf(t,e),markdownTokenizer:{name:"table",level:"block",start:t=>{const e=t.split(`
75
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
76
 
77
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=Wf(n);if(o===n)return;const c=s.blockTokens(o)[0];if(c?.type!=="table"||!c.raw)return;const d=c.raw.split(`
78
+ `);if(a.length<2)return;const l=a[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(l)||!l.includes("|"))return;const o=Qf(n);if(o===n)return;const c=s.blockTokens(o)[0];if(c?.type!=="table"||!c.raw)return;const d=c.raw.split(`
79
79
  `).length,u=t.split(`
80
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=qf(a.schema,t,e,s);if(n){const o=r.selection.from+1;r.replaceSelectionWith(l).scrollIntoView().setSelection($l.near(r.doc.resolve(o)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>Fd(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Od(t,e),deleteColumn:()=>({state:t,dispatch:e})=>{const s=Fr(t.selection.$from,r=>r.type.name==="table");return Pd(t,e&&(r=>{s&&Hi(r,s.pos),e(r)}))},addRowBefore:()=>({state:t,dispatch:e})=>Ld(t,e),addRowAfter:()=>({state:t,dispatch:e})=>zd(t,e),deleteRow:()=>({state:t,dispatch:e})=>{const s=Fr(t.selection.$from,r=>r.type.name==="table");return Id(t,e&&(r=>{s&&Hi(r,s.pos),e(r)}))},deleteTable:()=>({state:t,dispatch:e})=>Md(t,e),mergeCells:()=>({state:t,dispatch:e})=>_i(t,e),splitCell:()=>({state:t,dispatch:e})=>Bi(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Ai("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Ai("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Ed(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>_i(t,e)?!0:Bi(t,e),setCellAttribute:(t,e)=>({state:s,dispatch:r})=>$d(t,e)(s,r),goToNextCell:()=>({state:t,dispatch:e})=>Ni(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>Ni(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Rd(t),!0),setCellSelection:t=>({tr:e,dispatch:s})=>{if(s){const r=zl.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:Dr,"Mod-Backspace":Dr,Delete:Dr,"Mod-Delete":Dr}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Ad({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Dd({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=wt(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:Rl(Ht(t,"tableRole",e))}}}),Zf=Za.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(Qf.configure(this.options.table)),this.options.tableCell!==!1&&t.push(zf.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(Lf.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(Pf.configure(this.options.tableRow)),t}});function Yf(t){const e=R.c(25),{node:s,selected:r,editor:n,deleteNode:a}=t,l=Y(),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(Wd,{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(Kd,{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:Jf,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:Xf,onClick:a,className:"shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:i.jsx(Xn,{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(Xa,{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 Xf(t){return t.preventDefault()}function Jf(t){return t.preventDefault()}function eh(t){return t.replace(/([[\]])/g,"\\$1")}const th=Wt.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",wt(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`[${eh(s)}](${e})`},addNodeView(){return Ya(Yf)}});function sh(t){const e=R.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(Xa,{as:"span","data-testid":"mention-chip",className:l,children:["@",n]}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}const ro=Wt.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",wt(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?id(e,s):`@${s}`},addNodeView(){return Ya(sh)}}),nh="studio.mention-members.",za=new Map;function qi(t){const e=za.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 za.set(t,n),n}catch{return}}function rh(t,e){za.set(t,e);try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function ah(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 ih(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 lh(t){const e=R.c(17),{locator:s}=Ye(),r=Gd(),n=`${nh}${s}`;let a;e[0]!==s?(a=lt.mentionMembers(s),e[0]=s,e[1]=a):a=e[1];let l;e[2]!==n?(l=()=>qi(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=ah(qi(n),ih(x?.data?.members??[]));return rh(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=Jn(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 Ui={query:"",range:null,rect:null,editor:null};class ao{state=Ui;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(Ui)}}const ta=new yd("markdownEditorMention");function oh(t,e,s){t.chain().focus().insertContentAt(e,[{type:"mention",attrs:{id:s.id,name:s.name}},{type:"text",text:" "}]).run(),Ll(t.view,ta)}function ch(t,e,s){const r=Math.min(e+s,t.content.size);return e>=r?"":t.textBetween(e,r,"","")}function io(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,"")}),Ll(t.view,ta)}function lo(t){return Za.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&&ch(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"?(io(this.editor,t),t.close(),!0):!1,onExit:()=>{t.latched||t.close()}})};return[Ud(e)]}})}const Ki=256,dh=40,Wi=280,uh=140;function oo(t){const e=R.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(fh,{store:s,state:r}):null,e[0]=n,e[1]=r,e[2]=s,e[3]=a):a=e[3],a}function fh({store:t,state:e}){const s=Y(),{members:r,loading:n}=lh(!0),[a,l]=L.useState(e.query),[o,c]=L.useState(null),d=hh(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<Wi&&h.top-f.top>x,p=(g?h.top-f.top:x)-8,k=Math.min(Wi,Math.max(p,uh))-dh,b={position:"absolute",width:Ki,left:Math.min(h.left,f.right-Ki-8)-u.left,...g?{bottom:u.bottom-h.top+6}:{top:h.bottom-u.top+6}},m=()=>{e.editor&&io(e.editor,t),t.close()},y=w=>{const j=w.relatedTarget;if((!j||e.editor?.view.dom.contains(j)===!0)&&t.latched){o?.focus();return}m()},v=w=>{!e.editor||!e.range||(oh(e.editor,e.range,w),t.close())};return ol.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(Ja,{onKeyDown:w=>{w.key==="Escape"&&(w.preventDefault(),m(),e.editor?.commands.focus())},children:[i.jsx(ei,{ref:c,autoFocus:!0,onFocus:()=>{t.latched=!0},value:a,onValueChange:l,placeholder:s("markdownEditor.mentionSearch"),onBlur:y}),i.jsxs(ti,{style:{maxHeight:k},children:[n?i.jsx("div",{className:"flex items-center justify-center py-6",children:i.jsx(vt,{size:"sm"})}):i.jsx(si,{children:s("markdownEditor.mentionEmpty")}),r.map(w=>i.jsxs(Zn,{value:`${w.name} ${w.email}`,onSelect:()=>v(w),onMouseDown:j=>j.preventDefault(),className:"gap-2",children:[i.jsx(qe,{url:w.image??void 0,fallback:He(w.name),shape:"circle",size:"xs"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:w.name})]},w.id))]})]})}),d)}function hh(t){const e=t?.view.dom.closest('[role="dialog"]');return e instanceof HTMLElement?e:document.body}const ph=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,mh=Wt.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",wt(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=wt(this.options.HTMLAttributes,o);Object.entries(u).forEach(([b,m])=>{if(m!=null)switch(b){case"src":case"width":case"height":break;default:d.setAttribute(b,m)}}),u.src!==null&&(d.src=u.src);let f={...o};const h=b=>{if(typeof b=="string"&&b!==""){d.getAttribute("src")!==b&&(d.src=b);return}d.hasAttribute("src")&&d.removeAttribute("src"),d.src!==""&&(d.src="")};h(o.src);const x=b=>{if(b.type!==a.type)return!1;const m=c.extensionManager.attributes.filter(v=>v.type===b.type.name),y=jd(b,m);return Object.keys(f).forEach(v=>{!n.has(v)&&!(v in y)&&d.removeAttribute(v)}),Object.entries(y).forEach(([v,w])=>{n.has(v)||(w!=null?d.setAttribute(v,w):d.removeAttribute(v))}),h(y.src),f=y,!0},g=new vd({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[wd({find:ph,type:this.type,getAttributes:t=>{const[,,e,s,r]=t;return{src:s,alt:e,title:r}}})]}});var gh=mh;function xh(t){const e=R.c(16),{node:s,selected:r,editor:n,deleteNode:a}=t,l=Y(),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:kh,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(Xn,{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(Xa,{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 kh(t){return t.preventDefault()}const bh=gh.extend({addNodeView(){return Ya(xh)}}).configure({inline:!1,allowBase64:!1}),La="uploads",yh="editor-images",co="editor-files",wh=new RegExp(`^/api/[^/]+/fs/${La}/read$`),Gi="http://relative.invalid";function vh(t){let e;try{e=new URL(t,Gi)}catch{return!1}return e.origin!==Gi||!wh.test(e.pathname)?!1:(e.searchParams.get("path")??"").startsWith(`${co}/`)}const jh={openOnClick:!1,autolink:!0,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}},Sh=Sd.extend({parseMarkdown:(t,e)=>{const s=typeof t.href=="string"?t.href:"";if(vh(s))return e.createNode("attachment",{href:s,name:t.text??""});const r=ld(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 Th(t="",e){return[El.configure({heading:{levels:[1,2,3]},underline:!1,link:!1}),Sh.configure(jh),Pl.configure({placeholder:t}),Zf,Td,Cd.configure({nested:!0}),bh,th,ro,...e?[lo(e)]:[],Jl.configure({markedOptions:{breaks:!0}})]}const Ch=/^(\s*)([-*+]|\d+[.)])\s+\S/,Nh=/^\s*(```|~~~)/,_h=/^\s+(?![-*+>#]|\d+[.)]\s)\S/;function Bh(t){const e=[];let s=!1,r=!1;for(const n of t.split(`
83
- `)){if(Nh.test(n)){s=!s,r=!1,e.push(n);continue}if(s){e.push(n);continue}if(Ch.test(n)){r=!0,e.push(n);continue}if(!n.trim()){r=!1,e.push(n);continue}if(r&&_h.test(n)){e[e.length-1]=`${e[e.length-1]} ${n.trim()}`;continue}r=!1,e.push(n)}return e.join(`
84
- `)}const Ah=10,Dh=25,Rh={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function $h(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Rh[t.type]??(hi(t)?".png":"")}function hi(t){return t.type.startsWith("image/")}function Eh(){const t=Y(),{upload:e}=Vd(La),s=Qd(La),[r,n]=L.useState(0);return{uploadFile:async l=>{const o=hi(l),c=o?Ah:Dh;if(l.size>c*1024*1024)return We.error(t("markdownEditor.fileTooLarge",{name:l.name,max:String(c)})),null;const d=o?yh:co,u=`${crypto.randomUUID()}${$h(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 We.error(t("markdownEditor.uploadFailed",{name:l.name})),null}finally{n(f=>f-1)}},pending:r}}const Mh=["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(" "),Ih=["[&_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 Vi(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(Nd.near(a.doc.resolve(l))),t.dispatch(a),t.state.selection.to}function zh({defaultValue:t,onChange:e,placeholder:s,editable:r=!0}){const n=Y(),{uploadFile:a,pending:l}=Eh(),[o]=L.useState(()=>new ao),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=hi(m)?Vi(g,b,"image",{src:y,alt:m.name}):Vi(g,b,"attachment",{href:y,name:m.name}))}})(),!0),h=Ml({extensions:Th(s,o),content:Bh(t),contentType:"markdown",editable:r,editorProps:{attributes:{role:"textbox","aria-label":s??"","aria-multiline":"true",class:M(Mh,Ih)},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(Au,{editor:h}),i.jsx(oo,{store:o}),i.jsx(Il,{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(he,{type:"button",variant:"ghost",size:"icon-sm","aria-label":n("markdownEditor.attachFile"),onClick:()=>c.current?.click(),children:i.jsx(hc,{size:14})}),l>0&&i.jsxs("span",{className:"inline-flex items-center gap-1.5","aria-live":"polite",role:"status",children:[i.jsx(vt,{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 Lh="claude-subscription";function Ph(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===Lh)}}function Oh(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 uo(t){if(t.status!=="completed")return!1;const e=t.conclusion;return e==="success"||e==="neutral"||e==="skipped"}function Fh(t,e,s){return t!=="failing"||s||e.length===0?null:{passed:e.filter(uo).length,total:e.length}}function Hh(t,e){return new URL(e,t).toString()}function fo(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:Zd(r.replace(/^Error:\s*/,""))}return null}function qh({orgSlug:t,repo:e,repositories:s,returnTo:r}){const n=`/api/${encodeURIComponent(t)}/git-providers/github`,a=e?s.find(o=>o.path===e)?.accountId:null;if(!a)return{url:`${n}/install?returnTo=${encodeURIComponent(r)}`,ownerOnly:!1,owner:null};const l=e?.includes("/")?e.split("/")[0]:null;return{url:`${n}/accounts/${encodeURIComponent(a)}/manage`,ownerOnly:l!==null,owner:l}}const Qi=()=>0;function Uh(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 eu.subscribe(e,d)}),L.useSyncExternalStore(a.current,Qi,Qi)}const ho=1440*60*1e3,Kh=40;function po(t){try{const e=window.localStorage.getItem(cl.taskBoardPrs(t));return e?JSON.parse(e):{}}catch{return{}}}function Wh(t){const e=Date.now(),s=Object.entries(t).filter(([,r])=>e-r.updatedAt<=ho);for(s.sort(([,r],[,n])=>r.updatedAt-n.updatedAt);s.length>Kh;)s.shift();return Object.fromEntries(s)}function Zi(t,e){if(typeof window>"u")return null;const s=po(t)[e];return!s||Date.now()-s.updatedAt>ho?null:s}function Gh(t,e,s){if(!(typeof window>"u"))try{const r=po(t);r[e]={data:s,updatedAt:Date.now()},window.localStorage.setItem(cl.taskBoardPrs(t),JSON.stringify(Wh(r)))}catch{}}const Vh=6e4,Qh=2e3,Zh=t=>t.state===null;function mo(t){const e=R.c(25),{org:s,locator:r}=Ye(),n=Mt(),a=ur();let l;e[0]!==t||e[1]!==r||e[2]!==a?(l=g=>{a.setQueryData(lt.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],Uh(o);let c;e[8]!==t||e[9]!==r?(c=lt.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?Zi(r,t)?.data??void 0:void 0,f=()=>t?Zi(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 Gh(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:Yh,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],Jn(x)}function Yh(t){return t.state.data?.some(Zh)?Qh:Vh}function Xh(t){const e=R.c(10),{locator:s}=Ye(),r=Mt();let n;e[0]!==s||e[1]!==t?(n=lt.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],Jn(o)}function pi(t){const e=R.c(10),{locator:s}=Ye(),r=Mt();let n;e[0]!==t||e[1]!==s?(n=lt.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],Jn(o)}function Jh(t){const e=R.c(10),{locator:s}=Ye(),r=Mt(),n=ur();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:lt.taskBoardItemPrs(s,t)}),n.invalidateQueries({queryKey:lt.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],Vn(o)}function ep(t){const e=R.c(10),{locator:s}=Ye(),r=Mt(),n=ur();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:lt.taskBoardItemPrs(s,t)}),n.invalidateQueries({queryKey:lt.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],Vn(o)}function go(t){return t?od:[]}function tp(t,e,s){return e.length===0?!0:cd(t,e,{cycleStartedAt:s})}function sp(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 np(t){return t==="in_review"||t==="approved"}const rp=[],ap=[];function xo(t,e){const s=R.c(4),r=e===void 0?rp:e,n=su();let a;if(s[0]!==n||s[1]!==r||s[2]!==t){const l=ru(n);a=jc(l,[...t.map(ip),...r]),s[0]=n,s[1]=r,s[2]=t,s[3]=a}else a=s[3];return a}function ip(t){return t.repo}function mi(t){const e=R.c(57),{members:s,onSelect:r}=t,n=Y();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(ei,{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(si,{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(Ae),e[13]=r,e[14]=f):f=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(yt,{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(Zn,{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(Al,{size:16,className:"text-muted-foreground"}),e[28]=m):m=e[28];let y;e[29]!==n?(y=n("taskBoard.taskDialog.unassignedLabel"),e[29]=n,e[30]=y):y=e[30];let v;e[31]!==y?(v=i.jsx("span",{className:"truncate",children:y}),e[31]=y,e[32]=v):v=e[32];let w;e[33]!==k||e[34]!==b||e[35]!==v?(w=i.jsxs(Zn,{value:k,onSelect:b,className:"gap-2",children:[m,v]}),e[33]=k,e[34]=b,e[35]=v,e[36]=w):w=e[36];let j;e[37]!==p||e[38]!==w?(j=i.jsxs(Hr,{children:[p,w]}),e[37]=p,e[38]=w,e[39]=j):j=e[39];let S;e[40]!==n?(S=n("taskBoard.taskDialog.membersGroupHeading"),e[40]=n,e[41]=S):S=e[41];let C;if(e[42]!==s||e[43]!==r){let D;e[45]!==r?(D=E=>i.jsxs(Zn,{value:E.user?.name??E.userId,onSelect:()=>r(E.userId),className:"gap-2",children:[i.jsx(qe,{url:E.user?.image??void 0,fallback:He(E.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:E.user?.name??E.userId})]},E.userId),e[45]=r,e[46]=D):D=e[46],C=s.map(D),e[42]=s,e[43]=r,e[44]=C}else C=e[44];let N;e[47]!==S||e[48]!==C?(N=i.jsx(Hr,{heading:S,children:C}),e[47]=S,e[48]=C,e[49]=N):N=e[49];let _;e[50]!==j||e[51]!==N||e[52]!==d?(_=i.jsxs(ti,{children:[d,j,N]}),e[50]=j,e[51]=N,e[52]=d,e[53]=_):_=e[53];let $;return e[54]!==_||e[55]!==o?($=i.jsxs(Ja,{children:[o,_]}),e[54]=_,e[55]=o,e[56]=$):$=e[56],$}function lp({tags:t,selectedIds:e,defaultColor:s,onToggle:r,onCreate:n,onDelete:a}){const l=Y(),[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(Ja,{children:[i.jsx(ei,{value:o,onValueChange:c,placeholder:l("taskBoard.taskDialog.tagFilterPlaceholder"),"aria-label":l("taskBoard.taskDialog.tagFilterPlaceholder"),className:"h-9"}),i.jsxs(ti,{children:[x&&!g?i.jsx(Hr,{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(Zn,{value:`create-${x}`,disabled:d,onSelect:p,className:"flex-1 gap-2",children:[i.jsx(lr,{size:16,className:"text-muted-foreground"}),i.jsx("span",{className:"truncate",children:l("taskBoard.taskDialog.createTagOption",{name:x})})]})]})}):i.jsx(si,{children:l("taskBoard.taskDialog.noTagsFound")}),i.jsx(Hr,{children:t.map(k=>{const b=e.includes(k.id);return i.jsxs(Zn,{value:k.name,onSelect:()=>r(k.id),className:"group gap-2",children:[i.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:fr(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(Oa,{size:13})}),b&&i.jsx(Qn,{size:14,className:"shrink-0 text-foreground"})]},k.id)})})]})]})}function op(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 cp(t){return{id:t.threadId,title:t.title,status:t.status,created_at:t.createdAt,virtual_mcp_id:t.virtualMcpId}}function dp(t){const e=R.c(5),{title:s}=t;let r;e[0]!==s?(r=i.jsx(iu,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:i.jsx(lu,{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 up(t){const e=R.c(12),{thread:s}=t,{org:r,locator:n}=Ye();let a;e[0]!==r.id||e[1]!==r.slug?(a={connectionId:Mo,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=a):a=e[2];const l=uu(a),o=Fl(),c=nu(),{data:d}=Ua();let u;e[3]!==s?(u=cp(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(du,{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 fp(t){const e=R.c(11),{thread:s,onClose:r}=t,n=Y(),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(dp,{title:s.title??n("taskBoard.taskDialog.superAgentDefaultName")}),children:i.jsx(up,{thread:s})}),e[2]=n,e[3]=s,e[4]=o):o=e[4];let c;e[5]!==o?(c=i.jsx(ou,{"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(cu,{open:a,onOpenChange:l,children:c}),e[7]=a,e[8]=l,e[9]=c,e[10]=d):d=e[10],d}const hp=["[&_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 pp(t){const e=R.c(24),{placeholder:s,onSubmit:r,onEmptyChange:n,ref:a,className:l}=t,[o]=L.useState(mp);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=El.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=lo(o),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==s?(u=Pl.configure({placeholder:s}),e[3]=s,e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==u?(f=[c,ro,d,u,Jl],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",hp),e[8]=h):h=e[8];let x;e[9]!==s?(x={role:"textbox","aria-label":s,"aria-multiline":"true",class:h},e[9]=s,e[10]=x):x=e[10];let g;e[11]!==n?(g=w=>{const{editor:j}=w;return n(j.isEmpty)},e[11]=n,e[12]=g):g=e[12];const p=Ml({extensions:f,editorProps:{attributes:x,handleKeyDown:(w,j)=>j.key!=="Enter"||j.shiftKey||ta.getState(w.state)?.active?!1:(j.preventDefault(),k(),!0)},onUpdate:g});function k(){if(!p)return;const w=p.getMarkdown().trim();w&&(r(w),p.commands.clearContent(),n(!0))}let b;e[13]!==p?.commands||e[14]!==k?(b=()=>({submit:k,focus:()=>p?.commands.focus()}),e[13]=p?.commands,e[14]=k,e[15]=b):b=e[15],L.useImperativeHandle(a,b);let m;e[16]!==l||e[17]!==p?(m=i.jsx(Il,{editor:p,className:l}),e[16]=l,e[17]=p,e[18]=m):m=e[18];let y;e[19]!==o?(y=i.jsx(oo,{store:o}),e[19]=o,e[20]=y):y=e[20];let v;return e[21]!==y||e[22]!==m?(v=i.jsxs(i.Fragment,{children:[m,y]}),e[21]=y,e[22]=m,e[23]=v):v=e[23],v}function mp(){return new ao}function gp(t){const e=R.c(40),{thread:s,me:r,onReply:n,onDelete:a,onToggleResolved:l}=t,o=Y(),[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(pc,{size:16,className:"shrink-0 text-muted-foreground"}),e[1]=y):y=e[1];let v;e[2]!==o||e[3]!==s?(v=kp(s,o),e[2]=o,e[3]=s,e[4]=v):v=e[4];let w;e[5]!==v?(w=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:v}),e[5]=v,e[6]=w):w=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx(hu,{size:16,className:"shrink-0 text-muted-foreground"}),e[7]=j):j=e[7];let S;return e[8]!==w?(S=i.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2.5 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-muted/60",children:[y,w,j]}),e[8]=w,e[9]=S):S=e[9],S}let u;e[10]!==o||e[11]!==s.resolved?(u=s.resolved&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",onClick:()=>d(!1),className:"flex items-center justify-between gap-2 rounded-t-xl bg-muted/40 px-4 py-2.5 text-left text-sm text-muted-foreground transition-colors hover:text-foreground",children:[o("taskBoard.taskDialog.commentCollapseThread"),i.jsx(Xn,{size:14,"aria-hidden":!0})]}),i.jsx(Na,{})]}),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=Yi(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(Xi,{comment:s,onDelete:f,resolved:s.resolved,onToggleResolved:l}),e[17]=l,e[18]=f,e[19]=s,e[20]=h):h=e[20];let x;if(e[21]!==r||e[22]!==a||e[23]!==s.replies){let m;e[25]!==r||e[26]!==a?(m=(y,v)=>i.jsxs(L.Fragment,{children:[i.jsx(Na,{inset:v>0}),i.jsx(Xi,{comment:y,onDelete:Yi(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(Na,{}),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(bo,{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 Yi(t,e){return t.author.id===e.id||t.author.isAgent===!0}const xp=new Intl.ListFormat(void 0,{style:"long",type:"conjunction"});function kp(t,e){const s=[t,...t.replies],r=xp.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 bp(t){const e=R.c(6),{me:s,onSubmit:r}=t,n=Y();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(bo,{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 Na(t){const e=R.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 Xi(t){const e=R.c(28),{comment:s,isReply:r,resolved:n,onDelete:a,onToggleResolved:l}=t;let o;e[0]!==s.author?(o=i.jsx(ko,{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=Ka(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(yp,{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(Dl,{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 yp(t){const e=R.c(18),{resolved:s,onDelete:r,onToggleResolved:n}=t,a=Y();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(Yn,{size:16}),e[2]=o):o=e[2];let c;e[3]!==l?(c=i.jsx(Ge,{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(ve,{onSelect:n,children:[i.jsx(Qn,{size:16}),a(s?"taskBoard.taskDialog.commentUnresolveThread":"taskBoard.taskDialog.commentResolveThread")]}),i.jsx(qa,{})]}),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(ve,{variant:"destructive",onSelect:r,children:[i.jsx(Oa,{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(Ve,{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(Qe,{children:[c,f]}),e[15]=c,e[16]=f,e[17]=h):h=e[17],h}function ko(t){const e=R.c(6),{author:s}=t;if(s.isAgent){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(yt,{size:24}),e[0]=l):l=e[0],l}const r=s.image??void 0;let n;e[1]!==s.name?(n=He(s.name),e[1]=s.name,e[2]=n):n=e[2];let a;return e[3]!==r||e[4]!==n?(a=i.jsx(qe,{url:r,fallback:n,shape:"circle",size:"xs"}),e[3]=r,e[4]=n,e[5]=a):a=e[5],a}function bo(t){const e=R.c(27),{variant:s,placeholder:r,author:n,onSubmit:a}=t,l=Y(),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(pp,{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(fu,{size:16}),e[9]=b):b=e[9];let m;e[10]!==c||e[11]!==k?(m=i.jsx("button",{type:"button",disabled:c,onClick:f,"aria-label":k,className:"flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-40",children:b}),e[10]=c,e[11]=k,e[12]=m):m=e[12];const y=m;let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=()=>o.current?.focus(),e[13]=v):v=e[13];const w=v;if(s==="root"){let N;e[14]!==y?(N=i.jsx("div",{className:"flex items-center justify-end",children:y}),e[14]=y,e[15]=N):N=e[15];let _;return e[16]!==N||e[17]!==p?(_=i.jsxs("div",{"data-testid":"new-comment-composer",onClick:w,className:"relative flex cursor-text flex-col gap-1 rounded-xl bg-card p-3 card-shadow",children:[p,N]}),e[16]=N,e[17]=p,e[18]=_):_=e[18],_}let j;e[19]!==n?(j=i.jsx("span",{className:"mt-0.5 shrink-0",children:i.jsx(ko,{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 C;return e[23]!==y||e[24]!==S||e[25]!==j?(C=i.jsxs("div",{"data-testid":"reply-composer",onClick:w,className:"relative flex cursor-text items-start gap-2 p-3",children:[j,S,y]}),e[23]=y,e[24]=S,e[25]=j,e[26]=C):C=e[26],C}function wp(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 vp(t){const e=R.c(36),{locator:s}=Ye(),r=Mt(),n=ur();let a;e[0]!==t||e[1]!==s?(a=lt.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()=>wp((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=Jn(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=C=>r.call("TASK_BOARD_COMMENT_CREATE",{taskBoardItemId:t,...C}),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=Vn(g);let k;e[19]!==r?(k=C=>r.call("TASK_BOARD_COMMENT_UPDATE",C),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=Vn(b);let y;e[24]!==r?(y=C=>r.call("TASK_BOARD_COMMENT_DELETE",{id:C}),e[24]=r,e[25]=y):y=e[25];let v;e[26]!==h||e[27]!==y?(v={mutationFn:y,onSuccess:h},e[26]=h,e[27]=y,e[28]=v):v=e[28];const w=Vn(v);let j;e[29]!==u.data?(j=u.data??[],e[29]=u.data,e[30]=j):j=e[30];let S;return e[31]!==p||e[32]!==w||e[33]!==m||e[34]!==j?(S={threads:j,post:p,setResolved:m,remove:w},e[31]=p,e[32]=w,e[33]=m,e[34]=j,e[35]=S):S=e[35],S}function jp(t){const e=R.c(24),{locator:s}=Ye(),r=Mt(),n=ur();let a;e[0]!==t||e[1]!==s?(a=lt.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=Jn(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=Vn(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 Sp=3;function Tp(t){const e=R.c(23),{itemId:s,members:r}=t,n=Y(),{data:a}=dl.useSession(),l=a?.user?.id,{subscriberIds:o,setSubscribed:c}=jp(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(_p)),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(Np),k=[...u&&x?[x]:[],...p],b=k.slice(0,Sp),m=k.length-b.length,y=!s||c.isPending;let v;e[13]!==c||e[14]!==u?(v=()=>c.mutate(!u),e[13]=c,e[14]=u,e[15]=v):v=e[15];let w;e[16]!==u||e[17]!==n?(w=n(u?"taskBoard.taskDialog.unsubscribe":"taskBoard.taskDialog.subscribe"),e[16]=u,e[17]=n,e[18]=w):w=e[18];let j;e[19]!==y||e[20]!==v||e[21]!==w?(j=i.jsx(he,{type:"button",variant:"ghost",size:"sm",disabled:y,onClick:v,className:"h-7 px-2 text-sm font-normal text-muted-foreground",children:w}),e[19]=y,e[20]=v,e[21]=w,e[22]=j):j=e[22],f=i.jsxs("div",{className:"flex items-center gap-2",children:[j,b.length>0&&i.jsxs("span",{className:"inline-flex items-center",title:k.map(S=>S.user?.name??n("taskBoard.taskDialog.someoneLabel")).join(", "),children:[b.map(Cp),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 Cp(t){return i.jsx(qe,{url:t.user?.image??void 0,fallback:He(t.user?.name),shape:"circle",size:"xs",className:"-ml-2 ring-2 ring-background first:ml-0"},t.userId)}function Np(t){return!!t}function _p(t){return[t.userId,t]}function gi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function yo(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ji=560,Bp=2e3,wo=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),bt="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",el=4,tl=1,rr="opacity-50";function Ap(t){const e=R.c(22),{threads:s}=t,r=Y();let n,a,l,o,c,d;if(e[0]!==r||e[1]!==s){d=Symbol.for("react.early_return_sentinel");e:{const h=Ph(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(bt,"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(rd,{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 Ir(t){const e=R.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 Dp(t){const e=R.c(7),{item:s}=t,r=Y(),{data:n}=mo(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(Rp),e[2]=n,e[3]=l):l=e[3];let o;return e[4]!==a||e[5]!==l?(o=i.jsx(Ir,{label:a,children:l}),e[4]=a,e[5]=l,e[6]=o):o=e[6],o}function Rp(t){return i.jsx(he,{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($r,{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 vo(t){const e=R.c(11),{label:s,action:r,children:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Qa,{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(td,{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(sd,{children:n}),e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=i.jsxs(nd,{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 jo(t){const e=R.c(451),{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=Y(),{org:y}=Ye();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={strict:!1},e[0]=v):v=e[0];const{agentId:w}=Vr(v),{data:j}=Ua(),S=j?.data?.members??[],C=Ga("delivery_lanes_enabled"),{handleCopy:N,copied:_}=Sa(),{handleCopy:$,copied:D}=Sa(),{handleCopy:E,copied:P}=Sa(),{data:O}=Wa();let z;e[1]!==O?(z=O===void 0?[]:O,e[1]=O,e[2]=z):z=e[2];const F=z,V=Wc(),Q=Gc();let K;e[3]===Symbol.for("react.memo_cache_sentinel")?(K={slug:"mcp-github"},e[3]=K):K=e[3];const H=Fl(K);let Z;e[4]!==H?(Z=au(H),e[4]=H,e[5]=Z):Z=e[5];const q=xo(ap,Z),W=gl(q),X=a?.title??"",se=a?.description??"",ee=a?.status??l??dd[0],le=a?.priority??"medium",pe=a?.type??ud,Ce=a?.assigneeId??null,_e=a?.repo??o??null,xe=a?.dueDate;let fe;e[6]!==xe?(fe=yo(xe),e[6]=xe,e[7]=fe):fe=e[7];let be;e[8]!==a?.tags?(be=a?.tags.map(Ip)??[],e[8]=a?.tags,e[9]=be):be=e[9];let je;e[10]!==ee||e[11]!==le||e[12]!==pe||e[13]!==Ce||e[14]!==_e||e[15]!==fe||e[16]!==be||e[17]!==X||e[18]!==se?(je={title:X,description:se,status:ee,priority:le,type:pe,assigneeId:Ce,repo:_e,dueDate:fe,tagIds:be},e[10]=ee,e[11]=le,e[12]=pe,e[13]=Ce,e[14]=_e,e[15]=fe,e[16]=be,e[17]=X,e[18]=se,e[19]=je):je=e[19];const[Ne,De]=L.useState(je),{title:me,description:G,status:oe,priority:ae,assigneeId:Se,repo:B,dueDate:ne}=Ne;let te;e[20]!==q||e[21]!==B?(te=B?xl(B,q):void 0,e[20]=q,e[21]=B,e[22]=te):te=e[22];const de=te,ce=Ne.type,ke=Ne.tagIds,[Me,Ie]=L.useState(!1),[ye,It]=L.useState(!1),Xe=ye&&!Me;let Ue;e[23]===Symbol.for("react.memo_cache_sentinel")?(Ue=A=>{if(!A)return;const re=()=>It(A.scrollHeight>Ji);re();const we=new ResizeObserver(re);return we.observe(A),()=>we.disconnect()},e[23]=Ue):Ue=e[23];const Be=Ue,[jt,gr]=L.useState(!1),[St,xr]=L.useState(!1),[Qt,zt]=L.useState(!1),[Je,et]=L.useState(null);let ht;e[24]!==a?.threads||e[25]!==Je?(ht=a?.threads.find(A=>A.threadId===Je)??null,e[24]=a?.threads,e[25]=Je,e[26]=ht):ht=e[26];const Tt=ht,ot=L.useRef(Ne),Fe=L.useRef(null),Zt=L.useRef(c);let tt;e[27]===Symbol.for("react.memo_cache_sentinel")?(tt=()=>{Fe.current=null;const A=ot.current;A.title.trim()&&Zt.current({title:A.title.trim(),description:A.description.trim()||null,status:A.status,priority:A.priority,type:A.type,assigneeId:A.assigneeId,repo:A.repo,dueDate:A.dueDate?gi(A.dueDate):null,tagIds:A.tagIds})},e[27]=tt):tt=e[27];const ze=tt;let pt;e[28]!==ze||e[29]!==a||e[30]!==c?(pt=(A,re)=>{const we=re===void 0?!1:re,Re={...ot.current,...A};ot.current=Re,Zt.current=c,De(Re),a&&(Fe.current&&clearTimeout(Fe.current),we?Fe.current=setTimeout(ze,Bp):ze())},e[28]=ze,e[29]=a,e[30]=c,e[31]=pt):pt=e[31];const U=pt;let st;e[32]!==ze?(st=()=>{Fe.current&&(clearTimeout(Fe.current),ze())},e[32]=ze,e[33]=st):st=e[33];const Le=st;let Yt;e[34]===Symbol.for("react.memo_cache_sentinel")?(Yt=()=>{Fe.current&&(clearTimeout(Fe.current),Fe.current=null)},e[34]=Yt):Yt=e[34];const Lt=Yt;let Ct;e[35]!==Le||e[36]!==n?(Ct=()=>{Le(),n()},e[35]=Le,e[36]=n,e[37]=Ct):Ct=e[37];const $e=Ct;let nt;e[38]!==Le?(nt=A=>{if(A)return()=>Le()},e[38]=Le,e[39]=nt):nt=e[39];const Nt=nt;let mt;e[40]!==$e?(mt=A=>{if(!A)return;const re=we=>{if(we.key!=="Escape"||we.defaultPrevented||document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"]'))return;const Re=we.target;if(Re instanceof HTMLElement&&(Re.isContentEditable||Re instanceof HTMLInputElement||Re instanceof HTMLTextAreaElement)){Re.blur();return}$e()};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},e[40]=$e,e[41]=mt):mt=e[41];const _t=mt;let gt;e[42]!==V||e[43]!==U?(gt=async(A,re)=>{const we=await V.mutateAsync({name:A,color:re});U({tagIds:[...ot.current.tagIds,we.id]})},e[42]=V,e[43]=U,e[44]=gt):gt=e[44];const ct=gt;let xt;e[45]!==Q||e[46]!==U?(xt=A=>{Q.mutate(A),U({tagIds:ot.current.tagIds.filter(re=>re!==A)})},e[45]=Q,e[46]=U,e[47]=xt):xt=e[47];const Bt=xt,T=Se===Ae,I=a&&g&&(oe==="triage"||oe==="todo")&&!T,ue=a&&p&&a.assigneeId===Ae;let Ee;e[48]!==a||e[49]!==y?(Ee=a?kl(y.slug,a.keySeq):null,e[48]=a,e[49]=y,e[50]=Ee):Ee=e[50];const Pe=Ee;let dt;e[51]!==Se?(dt=A=>A.userId===Se,e[51]=Se,e[52]=dt):dt=e[52];const Pt=S.find(dt),Ke=a?.assignedBy?S.find(A=>A.userId===a.assignedBy):void 0,kr=a?S.find(A=>A.userId===a.createdBy):void 0;let br;e[53]!==oe?(br=Ba(oe),e[53]=oe,e[54]=br):br=e[54];const na=br.icon;let Te,Xt,Jt,es,ts,ss,At,ns,rs,as,is,ls,Dt,os,Rt;if(e[55]!==w||e[56]!==s||e[57]!==$e||e[58]!==_||e[59]!==E||e[60]!==$||e[61]!==G||e[62]!==Le||e[63]!==N||e[64]!==P||e[65]!==k||e[66]!==a||e[67]!==Pe||e[68]!==D||e[69]!==f||e[70]!==g||e[71]!==u||e[72]!==d||e[73]!==x||e[74]!==p||e[75]!==y||e[76]!==U||e[77]!==I||e[78]!==ue||e[79]!==oe||e[80]!==m||e[81]!==me){Te=!!a&&Ra(a);let A;e[97]!==s||e[98]!==$e||e[99]!==E||e[100]!==P||e[101]!==Pe||e[102]!==m?(A=s==="page"?i.jsx(Vc,{className:"-ml-2",children:i.jsxs(Qc,{className:"text-[15px]",children:[i.jsx(ji,{children:i.jsx(Zc,{asChild:!0,className:"rounded-md px-2 py-1 text-muted-foreground hover:bg-accent",children:i.jsx("button",{type:"button",onClick:$e,children:m("taskBoard.taskDetail.breadcrumbTasks")})})}),i.jsx(Yc,{}),i.jsx(ji,{children:i.jsx(Xc,{className:"px-2 py-1",children:Pe??m("taskBoard.taskDetail.breadcrumbTask")})})]})}):Pe?i.jsxs(he,{variant:"ghost",size:"sm",title:Pe,"aria-label":m("taskBoard.taskDialog.copyIdAriaLabel"),className:"-ml-2 gap-2 px-2 text-[15px] text-muted-foreground hover:text-foreground",onClick:()=>{E(Pe),We.success(m("taskBoard.taskDialog.idCopied"))},children:[P?i.jsx(Qn,{size:16}):i.jsx(yi,{size:16}),Pe]}):i.jsxs("span",{"aria-hidden":!0,className:"flex h-7 items-center gap-2 text-[15px] text-muted-foreground opacity-50",children:[i.jsx(yi,{size:16}),"–"]}),e[97]=s,e[98]=$e,e[99]=E,e[100]=P,e[101]=Pe,e[102]=m,e[103]=A):A=e[103];let re;e[104]!==k||e[105]!==a||e[106]!==m?(re=a&&k&&i.jsx("span",{className:"mr-1 text-sm text-muted-foreground",children:m("taskBoard.taskDialog.savingLabel")}),e[104]=k,e[105]=a,e[106]=m,e[107]=re):re=e[107];let we;e[108]!==a||e[109]!==m?(we=a?.externalUrl&&i.jsx(he,{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(cr,{size:16})})}),e[108]=a,e[109]=m,e[110]=we):we=e[110];let Re;e[111]!==w||e[112]!==_||e[113]!==$||e[114]!==G||e[115]!==N||e[116]!==a||e[117]!==D||e[118]!==f||e[119]!==g||e[120]!==u||e[121]!==d||e[122]!==x||e[123]!==p||e[124]!==y||e[125]!==I||e[126]!==ue||e[127]!==oe||e[128]!==m?(Re=a&&i.jsxs(i.Fragment,{children:[i.jsx(he,{variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.shareAriaLabel"),title:m("taskBoard.taskDialog.shareTitle"),className:"text-muted-foreground hover:text-foreground",onClick:()=>{$(`${window.location.origin}${bl(y.slug,a,w)}`),We.success(m("taskBoard.taskDialog.linkCopied"))},children:D?i.jsx(Qn,{size:16}):i.jsx(mc,{size:16})}),i.jsxs(Qe,{modal:!1,children:[i.jsx(Ge,{asChild:!0,children:i.jsx(he,{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(Yn,{size:16})})}),i.jsxs(Ve,{align:"end",className:"w-48",children:[x&&i.jsxs(ve,{onSelect:x,children:[i.jsx(hl,{size:16}),m("taskBoard.taskDialog.newChatButton")]}),I&&i.jsxs(ve,{onSelect:g,children:[i.jsx(zr,{size:16}),m("taskBoard.taskBoard.autoFix")]}),ue&&i.jsxs(ve,{onSelect:p,children:[i.jsx(Qr,{size:16}),m("taskBoard.taskBoard.rerun")]}),(x||I||ue)&&i.jsx(qa,{}),G&&i.jsxs(ve,{onSelect:()=>N(G),children:[_?i.jsx(Qn,{size:16}):i.jsx(ad,{size:16}),m("taskBoard.taskDialog.copyDescription")]}),u&&i.jsxs(ve,{onSelect:u,children:[i.jsx(gc,{size:16}),m("taskBoard.taskDialog.cloneTask")]}),f&&oe!=="archived"&&i.jsxs(ve,{onSelect:()=>{Lt(),f()},children:[i.jsx(Io,{size:16}),m("taskBoard.taskDialog.archiveTask")]}),d&&i.jsxs(ve,{variant:"destructive",onSelect:()=>{Lt(),d()},children:[i.jsx(Oa,{size:16}),m("taskBoard.taskDialog.deleteTask")]})]})]})]}),e[111]=w,e[112]=_,e[113]=$,e[114]=G,e[115]=N,e[116]=a,e[117]=D,e[118]=f,e[119]=g,e[120]=u,e[121]=d,e[122]=x,e[123]=p,e[124]=y,e[125]=I,e[126]=ue,e[127]=oe,e[128]=m,e[129]=Re):Re=e[129];let ut;e[130]!==s||e[131]!==$e||e[132]!==m?(ut=s==="dialog"&&i.jsx(he,{variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.closeAriaLabel"),className:"text-muted-foreground hover:text-foreground",onClick:$e,children:i.jsx(Xn,{size:16})}),e[130]=s,e[131]=$e,e[132]=m,e[133]=ut):ut=e[133];let Fn;e[134]!==re||e[135]!==we||e[136]!==Re||e[137]!==ut?(Fn=i.jsxs("div",{className:"flex items-center gap-0.5",children:[re,we,Re,ut]}),e[134]=re,e[135]=we,e[136]=Re,e[137]=ut,e[138]=Fn):Fn=e[138];let Cr;e[139]!==A||e[140]!==Fn?(Cr=i.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 px-6 pb-4 pt-6 sm:px-8",children:[A,Fn]}),e[139]=A,e[140]=Fn,e[141]=Cr):Cr=e[141];const Nr=Cr;e[142]!==s||e[143]!==Nr?(Rt=s==="page"?i.jsx("div",{className:"mx-auto w-full max-w-[1040px]",children:Nr}):Nr,e[142]=s,e[143]=Nr,e[144]=Rt):Rt=e[144],os="flex min-h-0 flex-1 flex-col overflow-y-auto";const ja=s==="page"&&"mx-auto w-full max-w-[1040px]";e[145]!==ja?(Dt=M("flex flex-col sm:flex-row",ja),e[145]=ja,e[146]=Dt):Dt=e[146],ls="flex min-w-0 flex-col gap-2 p-6 sm:flex-1 sm:p-8 sm:pt-6",Xt=Mp,Jt=me,es=_r=>{Te||(U({title:_r.target.value},!0),_r.target.style.height="auto",_r.target.style.height=`${_r.target.scrollHeight}px`)},ts=Ep,ss=Le,e[147]!==m?(At=m("taskBoard.taskDialog.taskTitlePlaceholder"),e[147]=m,e[148]=At):At=e[148],ns=!0,rs=1,as=Te,is=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",Te&&"cursor-default"),e[55]=w,e[56]=s,e[57]=$e,e[58]=_,e[59]=E,e[60]=$,e[61]=G,e[62]=Le,e[63]=N,e[64]=P,e[65]=k,e[66]=a,e[67]=Pe,e[68]=D,e[69]=f,e[70]=g,e[71]=u,e[72]=d,e[73]=x,e[74]=p,e[75]=y,e[76]=U,e[77]=I,e[78]=ue,e[79]=oe,e[80]=m,e[81]=me,e[82]=Te,e[83]=Xt,e[84]=Jt,e[85]=es,e[86]=ts,e[87]=ss,e[88]=At,e[89]=ns,e[90]=rs,e[91]=as,e[92]=is,e[93]=ls,e[94]=Dt,e[95]=os,e[96]=Rt}else Te=e[82],Xt=e[83],Jt=e[84],es=e[85],ts=e[86],ss=e[87],At=e[88],ns=e[89],rs=e[90],as=e[91],is=e[92],ls=e[93],Dt=e[94],os=e[95],Rt=e[96];let cs;e[149]!==Xt||e[150]!==Jt||e[151]!==es||e[152]!==ts||e[153]!==ss||e[154]!==At||e[155]!==ns||e[156]!==rs||e[157]!==as||e[158]!==is?(cs=i.jsx("textarea",{ref:Xt,value:Jt,onChange:es,onKeyDown:ts,onBlur:ss,placeholder:At,autoFocus:ns,rows:rs,readOnly:as,className:is}),e[149]=Xt,e[150]=Jt,e[151]=es,e[152]=ts,e[153]=ss,e[154]=At,e[155]=ns,e[156]=rs,e[157]=as,e[158]=is,e[159]=cs):cs=e[159];let ds;e[160]!==Te||e[161]!==m?(ds=Te&&i.jsxs("p",{className:"mb-3 mt-1 flex items-center gap-1.5 text-xs text-muted-foreground",children:[i.jsx(zo,{size:12}),m("taskBoard.taskDialog.reportsContentLocked")]}),e[160]=Te,e[161]=m,e[162]=ds):ds=e[162];let us;e[163]!==cs||e[164]!==ds?(us=i.jsxs("div",{children:[cs,ds]}),e[163]=cs,e[164]=ds,e[165]=us):us=e[165];let fs;e[166]!==a||e[167]!==p||e[168]!==y?(fs=a&&i.jsx(lm,{item:a,orgSlug:y.slug,onRerun:p}),e[166]=a,e[167]=p,e[168]=y,e[169]=fs):fs=e[169];const ra=Xe&&"overflow-hidden";let hs;e[170]!==ra?(hs=M("relative",ra),e[170]=ra,e[171]=hs):hs=e[171];let ps;e[172]!==Xe?(ps=Xe?{maxHeight:Ji}:void 0,e[172]=Xe,e[173]=ps):ps=e[173];let yr;e[174]===Symbol.for("react.memo_cache_sentinel")?(yr=()=>Ie(!0),e[174]=yr):yr=e[174];let ms;e[175]!==U?(ms=A=>U({description:A},!0),e[175]=U,e[176]=ms):ms=e[176];let gs;e[177]!==m?(gs=m("taskBoard.taskDialog.descriptionPlaceholder"),e[177]=m,e[178]=gs):gs=e[178];const aa=!Te;let xs;e[179]!==G||e[180]!==ms||e[181]!==gs||e[182]!==aa?(xs=i.jsx("div",{ref:Be,"data-testid":"task-description",children:i.jsx(zh,{defaultValue:G,onChange:ms,placeholder:gs,editable:aa})}),e[179]=G,e[180]=ms,e[181]=gs,e[182]=aa,e[183]=xs):xs=e[183];let ks;e[184]!==Xe?(ks=Xe&&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[184]=Xe,e[185]=ks):ks=e[185];let bs;e[186]!==Le||e[187]!==hs||e[188]!==ps||e[189]!==xs||e[190]!==ks?(bs=i.jsxs("div",{className:hs,style:ps,onFocusCapture:yr,onBlurCapture:Le,children:[xs,ks]}),e[186]=Le,e[187]=hs,e[188]=ps,e[189]=xs,e[190]=ks,e[191]=bs):bs=e[191];let ys;e[192]!==Me||e[193]!==ye||e[194]!==m?(ys=ye&&i.jsxs(he,{type:"button",variant:"ghost",size:"sm",className:"mt-2 w-fit text-muted-foreground hover:text-foreground",onClick:()=>Ie($p),children:[i.jsx(Qa,{size:14,className:M("transition-transform",Me&&"rotate-180")}),m(Me?"taskBoard.taskDialog.showLess":"taskBoard.taskDialog.showMore")]}),e[192]=Me,e[193]=ye,e[194]=m,e[195]=ys):ys=e[195];let ws;e[196]!==bs||e[197]!==ys?(ws=i.jsxs("div",{className:"flex flex-col py-6",children:[bs,ys]}),e[196]=bs,e[197]=ys,e[198]=ws):ws=e[198];let vs;e[199]!==a?(vs=a&&i.jsx("div",{className:"py-4",children:i.jsx("hr",{className:"border-border"})}),e[199]=a,e[200]=vs):vs=e[200];const ia=a&&i.jsxs("div",{className:"flex flex-col gap-8",children:[i.jsx(Qp,{item:a,description:G,onOpenPreview:h}),i.jsx(Xp,{item:a,members:S,startedBy:Ke??Pt,onOpenThread:A=>et(A.threadId)})]});let js;e[201]!==ws||e[202]!==vs||e[203]!==ia?(js=i.jsxs("div",{className:"flex flex-col",children:[ws,vs,ia]}),e[201]=ws,e[202]=vs,e[203]=ia,e[204]=js):js=e[204];let Ss;e[205]!==ls||e[206]!==us||e[207]!==fs||e[208]!==js?(Ss=i.jsxs("div",{className:ls,children:[us,fs,js]}),e[205]=ls,e[206]=us,e[207]=fs,e[208]=js,e[209]=Ss):Ss=e[209];const Bo="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 Ts;e[210]!==a?(Ts=a&&i.jsx(Dp,{item:a}),e[210]=a,e[211]=Ts):Ts=e[211];let Cs;e[212]!==m?(Cs=m("taskBoard.taskDialog.propertiesLabel"),e[212]=m,e[213]=Cs):Cs=e[213];let Ns;e[214]!==a||e[215]!==oe?(Ns=M(a?yl({...a,status:oe}):Ba(oe).iconClassName),e[214]=a,e[215]=oe,e[216]=Ns):Ns=e[216];let _s;e[217]!==na||e[218]!==Ns?(_s=i.jsx(na,{size:16,className:Ns}),e[217]=na,e[218]=Ns,e[219]=_s):_s=e[219];let Bs;e[220]!==oe||e[221]!==m?(Bs=or(oe,m),e[220]=oe,e[221]=m,e[222]=Bs):Bs=e[222];let As;e[223]!==_s||e[224]!==Bs.label?(As=i.jsx(Ge,{asChild:!0,children:i.jsxs("button",{type:"button",className:bt,children:[_s,Bs.label]})}),e[223]=_s,e[224]=Bs.label,e[225]=As):As=e[225];let Ds;if(e[226]!==C||e[227]!==U||e[228]!==m){let A;e[230]!==U||e[231]!==m?(A=re=>{const{label:we,visual:Re}=or(re,m),ut=Re.icon;return i.jsxs(ve,{onSelect:()=>U({status:re}),className:"gap-2",children:[i.jsx(ut,{size:16,className:Re.iconClassName}),we]},re)},e[230]=U,e[231]=m,e[232]=A):A=e[232],Ds=wl(C).map(A),e[226]=C,e[227]=U,e[228]=m,e[229]=Ds}else Ds=e[229];let Rs;e[233]!==Ds?(Rs=i.jsx(Ve,{align:"start",className:"w-44",children:Ds}),e[233]=Ds,e[234]=Rs):Rs=e[234];let $s;e[235]!==As||e[236]!==Rs?($s=i.jsxs(Qe,{children:[As,Rs]}),e[235]=As,e[236]=Rs,e[237]=$s):$s=e[237];let Es;e[238]!==Te||e[239]!==m?(Es=Te?m("taskBoard.taskDialog.reportsContentLocked"):void 0,e[238]=Te,e[239]=m,e[240]=Es):Es=e[240];const la=Te&&"cursor-default opacity-60";let Ms;e[241]!==la?(Ms=M(bt,la),e[241]=la,e[242]=Ms):Ms=e[242];const oa=Et[ce].icon;let wr;e[243]!==oa?(wr=i.jsx(oa,{size:16}),e[243]=oa,e[244]=wr):wr=e[244];const ca=wr,da=Et[ce];let Is;e[245]!==m||e[246]!==da.labelKey?(Is=m(da.labelKey),e[245]=m,e[246]=da.labelKey,e[247]=Is):Is=e[247];let zs;e[248]!==Te||e[249]!==Es||e[250]!==Ms||e[251]!==ca||e[252]!==Is?(zs=i.jsx(Ge,{asChild:!0,children:i.jsxs("button",{type:"button",disabled:Te,title:Es,className:Ms,children:[ca,Is]})}),e[248]=Te,e[249]=Es,e[250]=Ms,e[251]=ca,e[252]=Is,e[253]=zs):zs=e[253];let Ls;e[254]!==U||e[255]!==m?(Ls=vl.map(A=>{const re=Et[A].icon;return i.jsxs(ve,{onSelect:()=>U({type:A}),children:[i.jsx(re,{size:16}),m(Et[A].labelKey)]},A)}),e[254]=U,e[255]=m,e[256]=Ls):Ls=e[256];let Ps;e[257]!==Ls?(Ps=i.jsx(Ve,{align:"start",className:"w-44",children:Ls}),e[257]=Ls,e[258]=Ps):Ps=e[258];let Os;e[259]!==zs||e[260]!==Ps?(Os=i.jsxs(Qe,{children:[zs,Ps]}),e[259]=zs,e[260]=Ps,e[261]=Os):Os=e[261];let Fs;e[262]!==Te||e[263]!==m?(Fs=Te?m("taskBoard.taskDialog.reportsContentLocked"):void 0,e[262]=Te,e[263]=m,e[264]=Fs):Fs=e[264];const ua=ae==="none"&&rr,fa=Te&&"cursor-default opacity-60";let Hs;e[265]!==ua||e[266]!==fa?(Hs=M(bt,ua,fa),e[265]=ua,e[266]=fa,e[267]=Hs):Hs=e[267];let qs;e[268]!==ae||e[269]!==m?(qs=ae==="none"?i.jsxs(i.Fragment,{children:[i.jsx(Yn,{size:16}),m("taskBoard.taskDialog.setPriorityButton")]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:M("size-2 rounded-full",Ze[ae].dotClassName)}),m(Ze[ae].labelKey)]}),e[268]=ae,e[269]=m,e[270]=qs):qs=e[270];let Us;e[271]!==Te||e[272]!==Fs||e[273]!==Hs||e[274]!==qs?(Us=i.jsx(Ge,{asChild:!0,children:i.jsx("button",{type:"button",disabled:Te,title:Fs,className:Hs,children:qs})}),e[271]=Te,e[272]=Fs,e[273]=Hs,e[274]=qs,e[275]=Us):Us=e[275];let Ks;e[276]!==U||e[277]!==m?(Ks=Xr.map(A=>i.jsxs(ve,{onSelect:()=>U({priority:A}),children:[i.jsx("span",{className:M("size-2 rounded-full",Ze[A].dotClassName)}),m(Ze[A].labelKey)]},A)),e[276]=U,e[277]=m,e[278]=Ks):Ks=e[278];let Ws;e[279]!==Ks?(Ws=i.jsx(Ve,{align:"start",className:"w-40",children:Ks}),e[279]=Ks,e[280]=Ws):Ws=e[280];let Gs;e[281]!==Us||e[282]!==Ws?(Gs=i.jsxs(Qe,{children:[Us,Ws]}),e[281]=Us,e[282]=Ws,e[283]=Gs):Gs=e[283];const ha=a&&i.jsx("div",{className:"inline-flex h-9 items-center justify-start gap-2 px-3 text-sm font-medium text-foreground",title:m("taskBoard.taskDialog.createdByLabel"),children:Ra(a)?i.jsxs(i.Fragment,{children:[i.jsx(zr,{size:16,className:"text-muted-foreground"}),m("taskBoard.taskDialog.createdBySystemLabel")]}):kr?i.jsxs(i.Fragment,{children:[i.jsx(qe,{url:kr.user?.image??void 0,fallback:He(kr.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:kr.user?.name??m("taskBoard.taskDialog.unknownCreatorLabel")})]}):i.jsxs(i.Fragment,{children:[i.jsx(Al,{size:16,className:"text-muted-foreground"}),m("taskBoard.taskDialog.unknownCreatorLabel")]})}),pa=!Se&&rr;let Vs;e[284]!==pa?(Vs=M(bt,pa),e[284]=pa,e[285]=Vs):Vs=e[285];let Qs;e[286]!==Ke||e[287]!==Pt||e[288]!==T||e[289]!==m?(Qs=T&&Ke?i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[i.jsx(qe,{url:Ke.user?.image??void 0,fallback:He(Ke.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:Ke.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(qe,{url:Ke.user?.image??void 0,fallback:He(Ke.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),i.jsx(yt,{size:16,className:"ring-2 ring-background"})]}),m("taskBoard.taskDialog.superAgentLabel")]})]}):T?i.jsxs(i.Fragment,{children:[i.jsx(yt,{size:16}),m("taskBoard.taskDialog.superAgentLabel")]}):Pt?i.jsxs(i.Fragment,{children:[i.jsx(qe,{url:Pt.user?.image??void 0,fallback:He(Pt.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:Pt.user?.name??m("taskBoard.taskDialog.unassignedLabel")})]}):i.jsxs(i.Fragment,{children:[i.jsx(pl,{size:16,className:"text-muted-foreground"}),m("taskBoard.taskDialog.assignButton")]}),e[286]=Ke,e[287]=Pt,e[288]=T,e[289]=m,e[290]=Qs):Qs=e[290];let Zs;e[291]!==Vs||e[292]!==Qs?(Zs=i.jsx(ar,{asChild:!0,children:i.jsx("button",{type:"button",className:Vs,children:Qs})}),e[291]=Vs,e[292]=Qs,e[293]=Zs):Zs=e[293];let Ys;e[294]!==a?.assigneeId||e[295]!==p||e[296]!==U?(Ys=A=>{if(xr(!1),A===Ae&&a?.assigneeId===Ae){p?.();return}U({assigneeId:A})},e[294]=a?.assigneeId,e[295]=p,e[296]=U,e[297]=Ys):Ys=e[297];let Xs;e[298]!==S||e[299]!==Ys?(Xs=i.jsx(Er,{align:"start",className:"w-56 p-0",children:i.jsx(mi,{members:S,onSelect:Ys})}),e[298]=S,e[299]=Ys,e[300]=Xs):Xs=e[300];let Js;e[301]!==St||e[302]!==Zs||e[303]!==Xs?(Js=i.jsxs(Mr,{open:St,onOpenChange:xr,modal:!0,children:[Zs,Xs]}),e[301]=St,e[302]=Zs,e[303]=Xs,e[304]=Js):Js=e[304];let en;e[305]!==Ke||e[306]!==T||e[307]!==m?(en=T&&Ke&&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(bt,"pointer-events-none"),children:[i.jsx(yt,{size:16}),m("taskBoard.taskDialog.superAgentLabel")]})]}),e[305]=Ke,e[306]=T,e[307]=m,e[308]=en):en=e[308];let tn;e[309]!==Js||e[310]!==en?(tn=i.jsxs("div",{className:"flex flex-col",children:[Js,en]}),e[309]=Js,e[310]=en,e[311]=tn):tn=e[311];const ma=!ne&&rr;let sn;e[312]!==ma?(sn=M(bt,ma),e[312]=ma,e[313]=sn):sn=e[313];let vr;e[314]===Symbol.for("react.memo_cache_sentinel")?(vr=i.jsx(Yr,{size:16,className:"text-muted-foreground"}),e[314]=vr):vr=e[314];let nn;e[315]!==ne||e[316]!==m?(nn=ne?wo.format(ne):m("taskBoard.taskDialog.dueDateLabel"),e[315]=ne,e[316]=m,e[317]=nn):nn=e[317];let rn;e[318]!==sn||e[319]!==nn?(rn=i.jsx(ar,{asChild:!0,children:i.jsxs("button",{type:"button",className:sn,children:[vr,nn]})}),e[318]=sn,e[319]=nn,e[320]=rn):rn=e[320];const ga=ne??void 0;let an;e[321]!==U?(an=A=>{U({dueDate:A??null}),A&&gr(!1)},e[321]=U,e[322]=an):an=e[322];let ln;e[323]!==ga||e[324]!==an?(ln=i.jsx(Er,{className:"w-auto p-0",align:"start",children:i.jsx(Va,{mode:"single",selected:ga,onSelect:an,initialFocus:!0})}),e[323]=ga,e[324]=an,e[325]=ln):ln=e[325];let on;e[326]!==jt||e[327]!==rn||e[328]!==ln?(on=i.jsxs(Mr,{open:jt,onOpenChange:gr,children:[rn,ln]}),e[326]=jt,e[327]=rn,e[328]=ln,e[329]=on):on=e[329];const xa=a?.threads;let cn;e[330]!==xa?(cn=i.jsx(Ap,{threads:xa}),e[330]=xa,e[331]=cn):cn=e[331];let dn;e[332]!==tn||e[333]!==on||e[334]!==cn||e[335]!==Cs||e[336]!==$s||e[337]!==Os||e[338]!==Gs||e[339]!==ha?(dn=i.jsxs(Ir,{label:Cs,children:[$s,Os,Gs,ha,tn,on,cn]}),e[332]=tn,e[333]=on,e[334]=cn,e[335]=Cs,e[336]=$s,e[337]=Os,e[338]=Gs,e[339]=ha,e[340]=dn):dn=e[340];let un;e[341]!==m?(un=m("taskBoard.taskDialog.labelsLabel"),e[341]=m,e[342]=un):un=e[342];let fn;e[343]!==F||e[344]!==U||e[345]!==m||e[346]!==ke?(fn=ke.length===0?i.jsx(ar,{asChild:!0,children:i.jsxs("button",{type:"button",className:M(bt,rr),children:[i.jsx(xc,{size:16}),m("taskBoard.taskDialog.tagsButton")]})}):i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:px-3",children:[ke.map(A=>{const re=F.find(we=>we.id===A);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:()=>zt(!0),className:"inline-flex items-center gap-1.5",children:[i.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:fr(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:()=>{U({tagIds:ke.filter(we=>we!==A)})},children:i.jsx(Xn,{size:10})})]},A):null}),i.jsx(ar,{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(lr,{size:14})})})]}),e[343]=F,e[344]=U,e[345]=m,e[346]=ke,e[347]=fn):fn=e[347];let hn;e[348]!==F.length?(hn=fd(F.length),e[348]=F.length,e[349]=hn):hn=e[349];let pn;e[350]!==U||e[351]!==ke?(pn=A=>U({tagIds:ke.includes(A)?ke.filter(re=>re!==A):[...ke,A]}),e[350]=U,e[351]=ke,e[352]=pn):pn=e[352];let mn;e[353]!==ct||e[354]!==Bt||e[355]!==F||e[356]!==hn||e[357]!==pn||e[358]!==ke?(mn=i.jsx(Er,{align:"start",className:"w-56 p-0",children:i.jsx(lp,{tags:F,selectedIds:ke,defaultColor:hn,onToggle:pn,onCreate:ct,onDelete:Bt})}),e[353]=ct,e[354]=Bt,e[355]=F,e[356]=hn,e[357]=pn,e[358]=ke,e[359]=mn):mn=e[359];let gn;e[360]!==fn||e[361]!==mn||e[362]!==Qt?(gn=i.jsxs(Mr,{open:Qt,onOpenChange:zt,modal:!0,children:[fn,mn]}),e[360]=fn,e[361]=mn,e[362]=Qt,e[363]=gn):gn=e[363];let xn;e[364]!==un||e[365]!==gn?(xn=i.jsx(Ir,{label:un,children:gn}),e[364]=un,e[365]=gn,e[366]=xn):xn=e[366];const ka=Ir;let kn;e[367]!==m?(kn=m("taskBoard.taskDialog.projectLabel"),e[367]=m,e[368]=kn):kn=e[368];const ba=Qe,ya=!B&&rr;let bn;e[369]!==ya?(bn=M(bt,"max-w-full",ya),e[369]=ya,e[370]=bn):bn=e[370];let yn;e[371]!==de?(yn=i.jsx(Nc,{entry:de}),e[371]=de,e[372]=yn):yn=e[372];let wn;e[373]!==B||e[374]!==de?.title||e[375]!==m?(wn=de?.title??B??m("taskBoard.taskDialog.projectButton"),e[373]=B,e[374]=de?.title,e[375]=m,e[376]=wn):wn=e[376];let vn;e[377]!==wn?(vn=i.jsx("span",{className:"min-w-0 truncate text-left",children:wn}),e[377]=wn,e[378]=vn):vn=e[378];let jn;e[379]!==bn||e[380]!==yn||e[381]!==vn?(jn=i.jsx(Ge,{asChild:!0,children:i.jsxs("button",{type:"button",className:bn,children:[yn,vn]})}),e[379]=bn,e[380]=yn,e[381]=vn,e[382]=jn):jn=e[382];const wa=Ve,Ao="start",Do="w-64";let Sn;e[383]!==U?(Sn=()=>U({repo:null}),e[383]=U,e[384]=Sn):Sn=e[384];let Tn;e[385]!==m?(Tn=m("taskBoard.taskDialog.noProject"),e[385]=m,e[386]=Tn):Tn=e[386];let Cn;e[387]!==Sn||e[388]!==Tn?(Cn=i.jsx(ve,{onSelect:Sn,children:Tn}),e[387]=Sn,e[388]=Tn,e[389]=Cn):Cn=e[389];let jr;e[390]!==U?(jr=A=>i.jsx(ve,{className:"gap-2",onSelect:()=>U({repo:A.repo}),children:i.jsx(jl,{entry:A})},A.id),e[390]=U,e[391]=jr):jr=e[391];const va=W.map(jr);let Nn;e[392]!==wa||e[393]!==Cn||e[394]!==va?(Nn=i.jsxs(wa,{align:Ao,className:Do,children:[Cn,va]}),e[392]=wa,e[393]=Cn,e[394]=va,e[395]=Nn):Nn=e[395];let _n;e[396]!==ba||e[397]!==jn||e[398]!==Nn?(_n=i.jsxs(ba,{children:[jn,Nn]}),e[396]=ba,e[397]=jn,e[398]=Nn,e[399]=_n):_n=e[399];let Bn;e[400]!==ka||e[401]!==kn||e[402]!==_n?(Bn=i.jsx(ka,{label:kn,children:_n}),e[400]=ka,e[401]=kn,e[402]=_n,e[403]=Bn):Bn=e[403];let An;e[404]!==dn||e[405]!==xn||e[406]!==Bn||e[407]!==Ts?(An=i.jsxs("div",{className:Bo,children:[Ts,dn,xn,Bn]}),e[404]=dn,e[405]=xn,e[406]=Bn,e[407]=Ts,e[408]=An):An=e[408];let Dn;e[409]!==An||e[410]!==Dt||e[411]!==Ss?(Dn=i.jsxs("div",{className:Dt,children:[Ss,An]}),e[409]=An,e[410]=Dt,e[411]=Ss,e[412]=Dn):Dn=e[412];let Rn;e[413]!==Dn||e[414]!==os?(Rn=i.jsx("div",{className:os,children:Dn}),e[413]=Dn,e[414]=os,e[415]=Rn):Rn=e[415];let $n;e[416]!==et?($n=()=>et(null),e[416]=et,e[417]=$n):$n=e[417];let En;e[418]!==Tt||e[419]!==$n?(En=i.jsx(fp,{thread:Tt,onClose:$n}),e[418]=Tt,e[419]=$n,e[420]=En):En=e[420];let Mn;e[421]!==ze||e[422]!==k||e[423]!==a||e[424]!==m||e[425]!==me?(Mn=!a&&i.jsx("div",{className:"flex h-16 items-center justify-end border-t border-border px-4",children:i.jsxs(he,{size:"sm",disabled:!me.trim()||k,onClick:ze,children:[i.jsx(lr,{size:16}),m("taskBoard.taskDialog.createTaskButton")]})}),e[421]=ze,e[422]=k,e[423]=a,e[424]=m,e[425]=me,e[426]=Mn):Mn=e[426];let Sr;e[427]!==Rn||e[428]!==En||e[429]!==Mn||e[430]!==Rt?(Sr=i.jsxs(i.Fragment,{children:[Rt,Rn,En,Mn]}),e[427]=Rn,e[428]=En,e[429]=Mn,e[430]=Rt,e[431]=Sr):Sr=e[431];const In=Sr;if(s==="page"){let A;e[432]!==_t||e[433]!==Nt?(A=we=>{const Re=_t(we),ut=Nt(we);return()=>{Re?.(),ut?.()}},e[432]=_t,e[433]=Nt,e[434]=A):A=e[434];let re;return e[435]!==In||e[436]!==A?(re=i.jsx("div",{ref:A,"data-testid":"task-detail",className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:In}),e[435]=In,e[436]=A,e[437]=re):re=e[437],re}let zn;e[438]!==$e?(zn=A=>!A&&$e(),e[438]=$e,e[439]=zn):zn=e[439];let Ln;e[440]!==m?(Ln=m("taskBoard.taskDialog.newTaskTitle"),e[440]=m,e[441]=Ln):Ln=e[441];let Pn;e[442]!==Ln?(Pn=i.jsx(Lr,{className:"sr-only",children:Ln}),e[442]=Ln,e[443]=Pn):Pn=e[443];let On;e[444]!==In||e[445]!==Pn?(On=i.jsxs(Pr,{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:[Pn,In]}),e[444]=In,e[445]=Pn,e[446]=On):On=e[446];let Tr;return e[447]!==b||e[448]!==zn||e[449]!==On?(Tr=i.jsx(Or,{open:b,onOpenChange:zn,children:On}),e[447]=b,e[448]=zn,e[449]=On,e[450]=Tr):Tr=e[450],Tr}function $p(t){return!t}function Ep(t){t.key==="Enter"&&t.preventDefault()}function Mp(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Ip(t){return t.id}function zp(t){const e=R.c(2);let s;return e[0]!==t?(s=i.jsx(jo,{...t,chrome:"dialog"}),e[0]=t,e[1]=s):s=e[1],s}function Lp(t){const e=R.c(2);let s;return e[0]!==t?(s=i.jsx(jo,{...t,chrome:"page"}),e[0]=t,e[1]=s):s=e[1],s}function Pp(t,e){switch(t.status){case"failed":return Cc(t.failureKind)?{label:t.failureKind==="superseded"?e("taskBoard.taskDialog.threadStatusSuperseded"):e("taskBoard.taskDialog.threadStatusEndedAfterDelivery"),className:"text-muted-foreground",icon:Ut}:{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:kc};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:Fa,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:er};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:Ut};default:return t.status}}function Op(t){const e=R.c(28),{thread:s,startedBy:r,onOpen:n}=t,a=Y();let l;if(e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==s){const o=s.status?Pp({...s,status:s.status},a):null,c=s.lastMessage;let d;e[5]!==s.title?(d=hd(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(ni,{size:16,className:"shrink-0"}):i.jsx(yt,{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(qe,{url:r.user?.image??void 0,fallback:He(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(Ha,{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(vt,{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 Fp(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:Bl}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:$r}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:$r}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:$r}}function Hp(t,e){switch(t){case"passing":return{label:e("taskBoard.taskDialog.prChecksPassing"),className:"text-success",icon:er};case"failing":return{label:e("taskBoard.taskDialog.prChecksFailing"),className:"text-destructive",icon:Ut};case"pending":return{label:e("taskBoard.taskDialog.prChecksPending"),className:"text-warning",icon:Fa};default:return null}}const qp=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);function Up(t){if(t.status!=="completed")return{icon:Fa,className:"text-warning",spin:!0};const e=t.conclusion;return e&&qp.has(e)?{icon:Ut,className:"text-destructive",spin:!1}:uo(t)?{icon:er,className:"text-success",spin:!1}:{icon:Zr,className:"text-muted-foreground",spin:!1}}function Kp(t){const e=R.c(46),{url:s,routes:r}=t,n=Y(),{data:a,isPending:l,isError:o}=Xh(s),c=a?.available??!1;if(l){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(vt,{className:"size-[14px]"}),e[0]=N):N=e[0];let _;e[1]!==n?(_=n("taskBoard.taskDialog.previewLabel"),e[1]=n,e[2]=_):_=e[2];let $;return e[3]!==_?($=i.jsxs(he,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,children:[N,_]}),e[3]=_,e[4]=$):$=e[4],$}if(!c||o){let N;e[5]!==n?(N=n("taskBoard.taskDialog.previewUnavailableTitle"),e[5]=n,e[6]=N):N=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx(Da,{size:14}),e[7]=_):_=e[7];let $;e[8]!==n?($=n("taskBoard.taskDialog.previewUnavailable"),e[8]=n,e[9]=$):$=e[9];let D;return e[10]!==N||e[11]!==$?(D=i.jsxs(he,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,title:N,children:[_,$]}),e[10]=N,e[11]=$,e[12]=D):D=e[12],D}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(Da,{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(cr,{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(he,{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(Qa,{size:14}),e[29]=y):y=e[29];let v;e[30]!==b||e[31]!==m?(v=i.jsx(Ge,{asChild:!0,children:i.jsx(he,{type:"button",variant:"outline",size:"sm",className:"rounded-l-none border-l-0 px-1.5","aria-label":b,title:m,children:y})}),e[30]=b,e[31]=m,e[32]=v):v=e[32];let w;if(e[33]!==r||e[34]!==s){let N;e[36]!==s?(N=_=>i.jsx(ve,{asChild:!0,children:i.jsx("a",{href:Hh(s,_),target:"_blank",rel:"noreferrer",className:"font-mono text-xs",children:_})},_),e[36]=s,e[37]=N):N=e[37],w=r.map(N),e[33]=r,e[34]=s,e[35]=w}else w=e[35];let j;e[38]!==w?(j=i.jsx(Ve,{align:"start",children:w}),e[38]=w,e[39]=j):j=e[39];let S;e[40]!==v||e[41]!==j?(S=i.jsxs(Qe,{children:[v,j]}),e[40]=v,e[41]=j,e[42]=S):S=e[42];let C;return e[43]!==k||e[44]!==S?(C=i.jsxs("div",{className:"flex items-center",children:[k,S]}),e[43]=k,e[44]=S,e[45]=C):C=e[45],C}function Wp(t){const e=R.c(54),{pr:s,routes:r,revalidating:n,previewThread:a,reviewsReady:l,shipPending:o,resolvePending:c,onShip:d,onResolveConflict:u,onOpenPreview:f}=t,h=Y(),[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=Fp(s,h),b=Hp(s.checksStatus,h);let m;e[13]!==s||e[14]!==l?(m=Oh(s,l),e[13]=s,e[14]=l,e[15]=m):m=e[15];const{isOpen:y,hasConflict:v,showShip:w,showResolveConflict:j}=m,S=!!a||!!s.previewUrl||w||j,C=s.checks??[],N=C.length>0||b!=null,_=C.length>0,$=Fh(s.checksStatus,C,x),D=$?{label:h("taskBoard.taskDialog.prChecksScore",$),className:"text-warning",icon:Ut}:b,E=n&&"revalidating-ring";let P;e[16]!==E?(P=M("flex flex-col gap-3 rounded-xl bg-card p-3 card-shadow",E),e[16]=E,e[17]=P):P=e[17];const O=Su(s.url)?.repo.provider??"github";let z;e[18]!==O?(z=i.jsx(Jd,{provider:O,className:"size-4 shrink-0 text-foreground"}),e[18]=O,e[19]=z):z=e[19];const F=s.title??`${s.repoOwner}/${s.repoName}`;let V;e[20]!==F?(V=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:F}),e[20]=F,e[21]=V):V=e[21];const Q=M("flex shrink-0 items-center gap-1 text-xs font-medium",k.className);let K;e[22]!==k?(K=i.jsx(k.icon,{size:13}),e[22]=k,e[23]=K):K=e[23];let H;e[24]!==k||e[25]!==K||e[26]!==Q?(H=i.jsxs("span",{className:Q,children:[K,k.label]}),e[24]=k,e[25]=K,e[26]=Q,e[27]=H):H=e[27];let Z;e[28]===Symbol.for("react.memo_cache_sentinel")?(Z=i.jsx(cr,{size:12,className:"text-muted-foreground/60 group-hover:text-foreground"}),e[28]=Z):Z=e[28];let J;e[29]!==s.number||e[30]!==s.url?(J=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,Z]}),e[29]=s.number,e[30]=s.url,e[31]=J):J=e[31];let q;e[32]!==H||e[33]!==J||e[34]!==z||e[35]!==V?(q=i.jsxs("div",{className:"flex items-center gap-3",children:[z,V,H,J]}),e[32]=H,e[33]=J,e[34]=z,e[35]=V,e[36]=q):q=e[36];let W;e[37]!==v||e[38]!==y||e[39]!==h?(W=v&&y&&i.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warning",children:[i.jsx(Ut,{size:13,className:"shrink-0"}),h("taskBoard.taskDialog.prConflict")]}),e[37]=v,e[38]=y,e[39]=h,e[40]=W):W=e[40];let X;e[41]!==S||e[42]!==f||e[43]!==u||e[44]!==d||e[45]!==s.previewUrl||e[46]!==a||e[47]!==c||e[48]!==r||e[49]!==o||e[50]!==j||e[51]!==w||e[52]!==h?(X=S&&i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&i.jsxs(he,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",title:h("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>f?.(a),children:[i.jsx(hl,{size:13}),h("taskBoard.taskDialog.openPreviewButton")]}),s.previewUrl&&i.jsx(Kp,{url:s.previewUrl,routes:r}),w&&i.jsx(he,{type:"button",variant:"success",size:"sm",disabled:o,onClick:d,children:h("taskBoard.taskDialog.shipToProductionButton")}),j&&i.jsxs(he,{type:"button",variant:"warning",size:"sm",className:"gap-1.5",disabled:c,title:h("taskBoard.taskDialog.resolveConflictTitle"),onClick:u,children:[i.jsx(Bl,{size:13}),h("taskBoard.taskDialog.resolveConflictButton")]})]}),e[41]=S,e[42]=f,e[43]=u,e[44]=d,e[45]=s.previewUrl,e[46]=a,e[47]=c,e[48]=r,e[49]=o,e[50]=j,e[51]=w,e[52]=h,e[53]=X):X=e[53],p=i.jsxs("div",{className:P,children:[q,W,X,N&&i.jsxs("div",{className:"border-t border-border pt-2 text-xs",children:[i.jsxs("button",{type:"button",disabled:!_,onClick:()=>g(Gp),className:"flex w-full items-center gap-1.5 font-medium disabled:cursor-default",children:[D?i.jsx(D.icon,{size:13,className:D.className}):i.jsx(er,{size:13,className:"text-muted-foreground"}),i.jsx("span",{className:M(D?.className??"text-muted-foreground"),children:D?.label??h("taskBoard.taskDialog.prChecksLabel")}),_&&i.jsx(Ha,{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:C.map((se,ee)=>{const le=Up(se),pe=`${se.name}-${ee}`;return i.jsxs("div",{className:"rounded-md bg-muted/40 p-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[le.spin?i.jsx(vt,{className:M("size-[13px]",le.className)}):i.jsx(le.icon,{size:13,className:M("shrink-0",le.className)}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:se.name}),se.detailsUrl&&i.jsx("a",{href:se.detailsUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:i.jsx(cr,{size:12})})]}),se.summary&&i.jsx("div",{className:"mt-1.5 max-h-64 overflow-auto text-muted-foreground",children:i.jsx(Dl,{id:`${s.url}-${pe}`,text:se.summary})})]},pe)})})]})]}),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 Gp(t){return!t}function Vp(){const t=R.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(Hn,{className:"size-4 shrink-0 rounded"}),i.jsx(Hn,{className:"h-4 min-w-0 flex-1"}),i.jsx(Hn,{className:"h-4 w-16 shrink-0"}),i.jsx(Hn,{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(Hn,{className:"h-7 w-20"}),i.jsx(Hn,{className:"h-7 w-28"})]})]}),t[1]=s):s=t[1],s}function Qp(t){const e=R.c(56),{item:s,description:r,onOpenPreview:n}=t,a=Y(),{data:l,isLoading:o,isFetching:c}=mo(s.id),{data:d}=pi(s.id),u=Tl(),f=Jh(s.id),h=ep(s.id);let x,g,p,k,b,m;if(e[0]!==d||e[1]!==r||e[2]!==s.previewRoutes||e[3]!==s.reviewCycleStartedAt||e[4]!==s.status||e[5]!==s.threads||e[6]!==n||e[7]!==f||e[8]!==l||e[9]!==c||e[10]!==o||e[11]!==h||e[12]!==u||e[13]!==a){m=Symbol.for("react.early_return_sentinel");e:{const w=op(r),j=o&&!l;if(!j&&(!l||l.length===0)&&w.length===0){m=null;break e}let S;e[20]!==d||e[21]!==s.reviewCycleStartedAt||e[22]!==s.status||e[23]!==u?(S=np(s.status)&&tp(d??[],go(u),s.reviewCycleStartedAt),e[20]=d,e[21]=s.reviewCycleStartedAt,e[22]=s.status,e[23]=u,e[24]=S):S=e[24];const C=S;let N;e[25]!==f||e[26]!==a?(N=()=>f.mutate(void 0,{onSuccess:O=>O?.merged?We.success(a("taskBoard.taskDialog.shipSuccess")):We.error(a("taskBoard.taskDialog.shipError")),onError:()=>We.error(a("taskBoard.taskDialog.shipError"))}),e[25]=f,e[26]=a,e[27]=N):N=e[27];const _=N;let $;e[28]!==h||e[29]!==a?($=O=>h.mutate(O,{onSuccess:()=>We.success(a("taskBoard.taskDialog.resolveConflictSuccess")),onError:()=>We.error(a("taskBoard.taskDialog.resolveConflictError"))}),e[28]=h,e[29]=a,e[30]=$):$=e[30];const D=$;let E;e[31]!==s.threads||e[32]!==n?(E=n?s.threads.find(Yp):void 0,e[31]=s.threads,e[32]=n,e[33]=E):E=e[33];const P=E;x=vo,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]!==D||e[40]!==_||e[41]!==P||e[42]!==f||e[43]!==l||e[44]!==c||e[45]!==h||e[46]!==C?(p=j?i.jsx(Vp,{}):(l??[]).map(O=>i.jsx(Wp,{pr:O,routes:s.previewRoutes??[],revalidating:c,previewThread:P,reviewsReady:C,shipPending:f.isPending,resolvePending:h.isPending,onShip:_,onResolveConflict:()=>D(O.number),onOpenPreview:n},O.url)),e[36]=s.previewRoutes,e[37]=j,e[38]=n,e[39]=D,e[40]=_,e[41]=P,e[42]=f,e[43]=l,e[44]=c,e[45]=h,e[46]=C,e[47]=p):p=e[47],k=w.map(Zp)}e[0]=d,e[1]=r,e[2]=s.previewRoutes,e[3]=s.reviewCycleStartedAt,e[4]=s.status,e[5]=s.threads,e[6]=n,e[7]=f,e[8]=l,e[9]=c,e[10]=o,e[11]=h,e[12]=u,e[13]=a,e[14]=x,e[15]=g,e[16]=p,e[17]=k,e[18]=b,e[19]=m}else x=e[14],g=e[15],p=e[16],k=e[17],b=e[18],m=e[19];if(m!==Symbol.for("react.early_return_sentinel"))return m;let y;e[48]!==g||e[49]!==p||e[50]!==k?(y=i.jsxs("div",{className:g,children:[p,k]}),e[48]=g,e[49]=p,e[50]=k,e[51]=y):y=e[51];let v;return e[52]!==x||e[53]!==b||e[54]!==y?(v=i.jsx(x,{label:b,children:y}),e[52]=x,e[53]=b,e[54]=y,e[55]=v):v=e[55],v}function Zp(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(Da,{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(cr,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function Yp(t){return t.hasPreview&&t.virtualMcpId}function Xp(t){const e=R.c(7),{item:s,members:r,startedBy:n,onOpenThread:a}=t,l=Y(),{data:o}=pi(s.id),{data:c}=dl.useSession(),d=new Map(r.map(nm)),u={id:c?.user?.id??"me",name:c?.user?.name??l("taskBoard.taskDialog.commentYouLabel"),image:c?.user?.image},f=vp(s.id),h=y=>{if(y===Ae)return{id:y,name:l("taskBoard.taskDialog.superAgentLabel"),isAgent:!0};if(y===u.id)return u;const v=d.get(y);return{id:y,name:v?.user?.name??y,image:v?.user?.image}},x=f.threads.map(y=>({id:y.id,author:h(y.authorId),body:y.body,createdAt:y.createdAt,resolved:y.resolved,replies:y.replies.map(v=>({id:v.id,author:h(v.authorId),body:v.body,createdAt:v.createdAt,replies:[]}))})),g=[...(o??[]).filter(Sc).map(sm),...s.threads.filter(Tc).map(tm),...x.map(em)].sort(Jp),p=[];for(const y of g){if(y.kind==="thread"){p.push({type:"thread",thread:y.thread});continue}if(y.kind==="comment"){p.push({type:"comment",comment:y.comment});continue}const v=p[p.length-1];v?.type==="timeline"?v.items.push(y.activity):p.push({type:"timeline",items:[y.activity]})}let k;e[0]!==l?(k=l("taskBoard.taskDialog.activityLabel"),e[0]=l,e[1]=k):k=e[1];let b;e[2]!==s.id||e[3]!==r?(b=i.jsx(Tp,{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(vo,{label:k,action:b,children:i.jsxs("div",{className:"flex flex-col gap-5",children:[i.jsx(bp,{me:u,onSubmit:m}),p.map((y,v)=>y.type==="timeline"?i.jsx(am,{items:y.items,memberByUserId:d},`timeline-${v}`):y.type==="comment"?i.jsx(gp,{thread:y.comment,me:u,onReply:w=>f.post.mutate({body:w,parentId:y.comment.id}),onDelete:w=>f.remove.mutate(w),onToggleResolved:()=>f.setResolved.mutate({id:y.comment.id,resolved:!y.comment.resolved})},`comment-${y.comment.id}`):i.jsx(Op,{thread:y.thread,startedBy:n,onOpen:a},`thread-${y.thread.threadId}`))]})})}function Jp(t,e){return e.at-t.at}function em(t){return{kind:"comment",at:new Date(t.createdAt).getTime(),comment:t}}function tm(t){return{kind:"thread",at:new Date(t.createdAt).getTime(),thread:t}}function sm(t){return{kind:"activity",at:new Date(t.occurredAt).getTime(),activity:t}}function nm(t){return[t.userId,t]}function Ot(t){const e=R.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 Gr="\0";function Rr(t){return`${Gr}${t}${Gr}`}function Ft(t,e){return t.split(new RegExp(`${Gr}(\\w+)${Gr}`)).map((s,r)=>i.jsx(L.Fragment,{children:r%2===0?s:e[s]},r))}function Wn(t,e){return e(t==="qa"?"taskBoard.taskDialog.qaAgentLabel":t==="code_review"?"taskBoard.taskDialog.codeReviewerLabel":"taskBoard.taskDialog.reviewerLabel")}function rm(t,e,s){const r=h=>{const x=typeof h=="string"?_c[h]:void 0;if(!x)return String(h??"");const g=x.icon;return i.jsx(Ot,{icon:i.jsx(g,{size:14,className:x.iconClassName}),label:e(x.labelKey)})},n=h=>{const x=typeof h=="string"?Ze[h]:void 0;return x?i.jsx(Ot,{icon:i.jsx("span",{className:M("size-2 rounded-full",x.dotClassName)}),label:e(x.labelKey)}):String(h??"")},a=h=>{const x=yo(typeof h=="string"?h:null);return x?i.jsx(Ot,{icon:i.jsx(Yr,{size:14,className:"text-muted-foreground"}),label:wo.format(x)}):""},l=h=>!Array.isArray(h)||h.length===0?null:h.map((x,g)=>{const p=x;return i.jsx(Ot,{icon:i.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:fr(p.color)}}),label:p.name??""},p.id??g)}),o=h=>{if(h===Ae)return i.jsx(Ot,{icon:i.jsx(yt,{size:14}),label:e("taskBoard.taskDialog.superAgentLabel")});const x=typeof h=="string"?s.get(h):void 0;return i.jsx(Ot,{icon:i.jsx(qe,{url:x?.user?.image??void 0,fallback:He(x?.user?.name),shape:"circle",size:"2xs"}),label:x?.user?.name??e("taskBoard.taskDialog.someoneLabel")})},c=h=>i.jsx(Ot,{icon:i.jsx(ni,{size:14}),label:Wn(h,e)}),d=t.data,u=Rr("from"),f=Rr("to");switch(t.action){case"created":return e("taskBoard.taskDialog.activityCreated");case"status_changed":{const h=fo([{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?Ft(e("taskBoard.taskDialog.activityRetriesExhausted",{to:f,count:String(d.retriesSpent),reason:h}),{to:r(d.to)}):Ft(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"):Ft(e(d.to===Ae?"taskBoard.taskDialog.activityDelegated":"taskBoard.taskDialog.activityAssigned",{name:Rr("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"):Ft(!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"):Ft(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"):Ft(e("taskBoard.taskDialog.activityTagsSet",{to:f}),{to:l(d.to)});case"review_requested":return Ft(e("taskBoard.taskDialog.activityDelegated",{name:Rr("name")}),{name:c(d.reviewer)});case"review_approved":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewApprovedWithNotes",{reviewer:Wn(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewApproved",{reviewer:Wn(d.reviewer,e)});case"review_changes_requested":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewChangesRequestedWithNotes",{reviewer:Wn(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewChangesRequested",{reviewer:Wn(d.reviewer,e)});case"review_verdict_requested":return e("taskBoard.taskDialog.activityReviewVerdictRequested",{reviewer:Wn(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 sl(t){return!t||t===Ae}function am(t){const e=R.c(29),{items:s,memberByUserId:r}=t,n=Y(),[a,l]=L.useState(!1);let o;e[0]!==r||e[1]!==n?(o=m=>sl(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(sl(m))return i.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:i.jsx(yt,{size:16})});const y=r.get(m);return i.jsx("span",{className:"z-10 shrink-0 rounded-full bg-background",children:i.jsx(qe,{url:y?.user?.image??void 0,fallback:He(y?.user?.name),shape:"circle",size:"2xs"})})},e[3]=r,e[4]=d):d=e[4];const u=d,f=s.length>el&&!a;let h;e[5]!==f||e[6]!==s?(h=f?s.slice(0,tl):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)," ",rm(y,n,r),i.jsxs("span",{className:"text-muted-foreground/60",children:[" · ",Ka(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>el&&i.jsxs("button",{type:"button",onClick:()=>l(im),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(Yn,{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-tl)})})]}),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 im(t){return!t}function lm(t){const e=R.c(59),{item:s,orgSlug:r,onRerun:n}=t,a=Y(),{data:l}=pi(s.id),{data:o}=Ol();let c;e[0]!==l?(c=l??[],e[0]=l,e[1]=c):c=e[1];let d;e[2]!==c?(d=fo(c),e[2]=c,e[3]=d):d=e[3];const u=d;if(!u)return null;const f=u.code===Di.githubNotAuthenticated,h=u.code===Di.githubConnectionMissing;let x,g,p,k,b,m,y,v,w,j;if(e[4]!==h||e[5]!==u.message||e[6]!==s||e[7]!==f||e[8]!==r||e[9]!==o||e[10]!==a){g=qh({orgSlug:r,repo:s.repo,repositories:o??[],returnTo:bl(r,s)}),x=Jc,j="destructive",p="mt-2 flex-col",v="flex items-start gap-3",e[21]===Symbol.for("react.memo_cache_sentinel")?(w=i.jsx(Ut,{}),e[21]=w):w=e[21],k="flex flex-col gap-1";let E;e[22]!==a?(E=a("taskBoard.taskDialog.runFailedTitle"),e[22]=a,e[23]=E):E=e[23],e[24]!==E?(b=i.jsx(ed,{children:E}),e[24]=E,e[25]=b):b=e[25];let P;e[26]!==h||e[27]!==u.message||e[28]!==f||e[29]!==a?(P=h?a("taskBoard.taskDialog.runFailedGithubMissing"):f?a("taskBoard.taskDialog.runFailedGithubAuth"):u.message,e[26]=h,e[27]=u.message,e[28]=f,e[29]=a,e[30]=P):P=e[30],e[31]!==P?(m=i.jsx(Si,{children:P}),e[31]=P,e[32]=m):m=e[32],y=f&&g.ownerOnly&&g.owner&&i.jsx(Si,{children:a("taskBoard.taskDialog.runFailedGithubOwnerOnly",{owner:g.owner})}),e[4]=h,e[5]=u.message,e[6]=s,e[7]=f,e[8]=r,e[9]=o,e[10]=a,e[11]=x,e[12]=g,e[13]=p,e[14]=k,e[15]=b,e[16]=m,e[17]=y,e[18]=v,e[19]=w,e[20]=j}else x=e[11],g=e[12],p=e[13],k=e[14],b=e[15],m=e[16],y=e[17],v=e[18],w=e[19],j=e[20];let S;e[33]!==k||e[34]!==b||e[35]!==m||e[36]!==y?(S=i.jsxs("div",{className:k,children:[b,m,y]}),e[33]=k,e[34]=b,e[35]=m,e[36]=y,e[37]=S):S=e[37];let C;e[38]!==S||e[39]!==v||e[40]!==w?(C=i.jsxs("div",{className:v,children:[w,S]}),e[38]=S,e[39]=v,e[40]=w,e[41]=C):C=e[41];let N;e[42]!==h||e[43]!==f||e[44]!==g||e[45]!==a?(N=(f||h)&&i.jsx(he,{size:"sm",asChild:!0,children:i.jsx("a",{href:g.url,children:a(h?"taskBoard.taskDialog.runFailedLinkRepo":"taskBoard.taskDialog.runFailedReconnect")})}),e[42]=h,e[43]=f,e[44]=g,e[45]=a,e[46]=N):N=e[46];let _;e[47]!==n||e[48]!==a?(_=n&&i.jsxs(he,{size:"sm",variant:"outline",onClick:n,children:[i.jsx(Qr,{size:14}),a("taskBoard.taskBoard.rerun")]}),e[47]=n,e[48]=a,e[49]=_):_=e[49];let $;e[50]!==N||e[51]!==_?($=i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 self-start",children:[N,_]}),e[50]=N,e[51]=_,e[52]=$):$=e[52];let D;return e[53]!==x||e[54]!==p||e[55]!==C||e[56]!==$||e[57]!==j?(D=i.jsxs(x,{variant:j,className:p,children:[C,$]}),e[53]=x,e[54]=p,e[55]=C,e[56]=$,e[57]=j,e[58]=D):D=e[58],D}const om=["taskBoard.subscriptionPaywall.trialBenefitMonitoring","taskBoard.subscriptionPaywall.trialBenefitAutoFix","taskBoard.subscriptionPaywall.trialBenefitRuns"],cm="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover";function dm(t){const e=R.c(83),{kind:s,onOpenChange:r}=t,n=Y(),{mutate:a,isPending:l}=pu("ORGANIZATION_BILLING_CHECKOUT_START","taskBoard.subscriptionPaywall.checkoutError");if(s==="trial_exhausted"){let v;e[0]!==n?(v=n("taskBoard.subscriptionPaywall.previewAlt"),e[0]=n,e[1]=v):v=e[1];let w;e[2]!==v?(w=i.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:i.jsx("img",{src:cm,alt:v,className:"h-[160px] w-full object-cover object-left-top"})}),e[2]=v,e[3]=w):w=e[3];let j;e[4]!==n?(j=n("taskBoard.subscriptionPaywall.trialTitle"),e[4]=n,e[5]=j):j=e[5];let S;e[6]!==j?(S=i.jsx(Lr,{className:"text-xl font-semibold text-foreground",children:j}),e[6]=j,e[7]=S):S=e[7];let C;e[8]!==n?(C=om.map(se=>i.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[i.jsx(er,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),i.jsx("span",{className:"leading-snug text-foreground",children:n(se)})]},se)),e[8]=n,e[9]=C):C=e[9];let N;e[10]!==C?(N=i.jsx("ul",{className:"flex flex-col gap-3",children:C}),e[10]=C,e[11]=N):N=e[11];let _;e[12]!==n?(_=n("taskBoard.subscriptionPaywall.trialPrice"),e[12]=n,e[13]=_):_=e[13];let $;e[14]!==_?($=i.jsx("span",{className:"text-2xl font-semibold text-foreground",children:_}),e[14]=_,e[15]=$):$=e[15];let D;e[16]!==n?(D=n("taskBoard.subscriptionPaywall.trialPricePeriod"),e[16]=n,e[17]=D):D=e[17];let E;e[18]!==D?(E=i.jsx("span",{className:"text-sm text-muted-foreground",children:D}),e[18]=D,e[19]=E):E=e[19];let P;e[20]!==E||e[21]!==$?(P=i.jsxs("div",{className:"flex items-baseline gap-1.5",children:[$,E]}),e[20]=E,e[21]=$,e[22]=P):P=e[22];let O;e[23]!==r?(O=()=>r(!1),e[23]=r,e[24]=O):O=e[24];let z;e[25]!==n?(z=n("taskBoard.subscriptionPaywall.notNowButton"),e[25]=n,e[26]=z):z=e[26];let F;e[27]!==l||e[28]!==O||e[29]!==z?(F=i.jsx(he,{variant:"ghost",onClick:O,disabled:l,className:"order-2 w-full sm:order-none sm:w-auto",children:z}),e[27]=l,e[28]=O,e[29]=z,e[30]=F):F=e[30];let V;e[31]!==r||e[32]!==a?(V=()=>a(void 0,{onSuccess:()=>r(!1)}),e[31]=r,e[32]=a,e[33]=V):V=e[33];let Q;e[34]!==l?(Q=l&&i.jsx(vt,{className:"size-4"}),e[34]=l,e[35]=Q):Q=e[35];let K;e[36]!==n?(K=n("taskBoard.subscriptionPaywall.subscribeButton"),e[36]=n,e[37]=K):K=e[37];let H;e[38]!==l||e[39]!==V||e[40]!==Q||e[41]!==K?(H=i.jsxs(he,{disabled:l,onClick:V,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[Q,K]}),e[38]=l,e[39]=V,e[40]=Q,e[41]=K,e[42]=H):H=e[42];let Z;e[43]!==F||e[44]!==H?(Z=i.jsxs("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[F,H]}),e[43]=F,e[44]=H,e[45]=Z):Z=e[45];let J;e[46]!==P||e[47]!==Z?(J=i.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[P,Z]}),e[46]=P,e[47]=Z,e[48]=J):J=e[48];let q;e[49]!==J||e[50]!==S||e[51]!==N?(q=i.jsxs("div",{className:"flex flex-col gap-6 px-3 pb-3 pt-7",children:[S,N,J]}),e[49]=J,e[50]=S,e[51]=N,e[52]=q):q=e[52];let W;e[53]!==w||e[54]!==q?(W=i.jsxs(Pr,{className:"gap-0 p-3 sm:max-w-[440px]",closeButtonClassName:"z-10 rounded-full bg-background/70 p-1 text-foreground backdrop-blur transition-colors hover:bg-background",children:[w,q]}),e[53]=w,e[54]=q,e[55]=W):W=e[55];let X;return e[56]!==r||e[57]!==W?(X=i.jsx(Or,{open:!0,onOpenChange:r,children:W}),e[56]=r,e[57]=W,e[58]=X):X=e[58],X}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(Lr,{children:u}),e[62]=u,e[63]=f):f=e[63];const h=c?.description;let x;e[64]!==h?(x=i.jsx(Cl,{children:h}),e[64]=h,e[65]=x):x=e[65];let g;e[66]!==f||e[67]!==x?(g=i.jsxs(Nl,{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(_l,{children:i.jsx(he,{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(Pr,{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(Or,{open:d,onOpenChange:r,children:m}),e[79]=r,e[80]=m,e[81]=d,e[82]=y):y=e[82],y}const um=new Set(["completed","failed","expired"]);function fm(t){return t.threads.some(e=>e.status!==null&&!um.has(e.status))}function hm(t){const e=R.c(43),{items:s,pending:r,onOpenChange:n,onConfirm:a}=t,l=Y(),o=s.length;let c;e[0]!==s?(c=s.some(fm),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(Lr,{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(Cl,{children:x}),e[11]=x,e[12]=g):g=e[12];let p;e[13]!==h||e[14]!==g?(p=i.jsxs(Nl,{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(he,{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(vt,{className:"size-4"}),e[24]=r,e[25]=y):y=e[25];let v;e[26]!==l?(v=l("taskBoard.rerun.confirm"),e[26]=l,e[27]=v):v=e[27];let w;e[28]!==a||e[29]!==r||e[30]!==y||e[31]!==v?(w=i.jsxs(he,{onClick:a,disabled:r,children:[y,v]}),e[28]=a,e[29]=r,e[30]=y,e[31]=v,e[32]=w):w=e[32];let j;e[33]!==m||e[34]!==w?(j=i.jsxs(_l,{children:[m,w]}),e[33]=m,e[34]=w,e[35]=j):j=e[35];let S;e[36]!==j||e[37]!==p?(S=i.jsxs(Pr,{className:"max-w-md",children:[p,j]}),e[36]=j,e[37]=p,e[38]=S):S=e[38];let C;return e[39]!==n||e[40]!==S||e[41]!==u?(C=i.jsx(Or,{open:u,onOpenChange:n,children:S}),e[39]=n,e[40]=S,e[41]=u,e[42]=C):C=e[42],C}const nl=380,pm=90,rl=5,mm="cubic-bezier(0.22, 0.61, 0.36, 1)";function gm(t,e,s,r=!0){const n=L.useRef(new Map),a=L.useRef(new Map),l=L.useRef(!1);L.useLayoutEffect(()=>{const o=t.current;if(!o)return;if(!r){l.current=!0;return}const c=l.current;l.current=!1;const d=o.querySelectorAll("[data-flip-id]"),u=new Map,f=n.current;n.current=u;const h=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,x=[];for(const v of d){const w=v.dataset.flipId;if(!w)continue;const j=v.getBoundingClientRect(),S=v.dataset.flipLane;if(u.set(w,{rect:j,lane:S}),!s||c)continue;const C=f.get(w);if(!C)continue;const N=C.rect.left-j.left,_=C.rect.top-j.top;(N||_)&&x.push({el:v,dx:N,dy:_,lane:C.lane!==S})}if(!s||h||x.length===0)return;const g=a.current,p=v=>{v instanceof HTMLElement&&(g.set(v,(g.get(v)??0)+1),v.style.overflow="visible")},k=v=>{if(!(v instanceof HTMLElement))return;const w=(g.get(v)??1)-1;if(w>0){g.set(v,w);return}g.delete(v),v.style.overflow=""};for(const v of x){const w=v.lane?` rotate(${v.dx>0?rl:-rl}deg)`:"";v.el.style.transition="none",v.el.style.transform=`translate(${v.dx}px, ${v.dy}px)${w}`,v.lane&&(v.el.style.zIndex="10",p(v.el.closest("[data-lane-scroll]")))}let b=0;const m=[],y=requestAnimationFrame(()=>{for(const v of x){const w=v.lane?b++*pm:0;v.el.style.transition=`transform ${nl}ms ${mm} ${w}ms`,v.el.style.transform="",m.push(window.setTimeout(()=>{v.el.style.transition="",v.el.style.transform="",v.el.style.zIndex="",v.lane&&k(v.el.closest("[data-lane-scroll]"))},nl+w+30))}});return()=>{cancelAnimationFrame(y);for(const v of m)clearTimeout(v);for(const v of x)v.el.style.transition="",v.el.style.transform="",v.el.style.zIndex="",v.lane&&k(v.el.closest("[data-lane-scroll]"))}},[e,t,s,r])}function xm(t,e=[]){const s=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).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=Wf(a.schema,t,e,s);if(n){const o=r.selection.from+1;r.replaceSelectionWith(l).scrollIntoView().setSelection(Ml.near(r.doc.resolve(o)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>qd(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>Hd(t,e),deleteColumn:()=>({state:t,dispatch:e})=>{const s=Fr(t.selection.$from,r=>r.type.name==="table");return Fd(t,e&&(r=>{s&&qi(r,s.pos),e(r)}))},addRowBefore:()=>({state:t,dispatch:e})=>Od(t,e),addRowAfter:()=>({state:t,dispatch:e})=>Pd(t,e),deleteRow:()=>({state:t,dispatch:e})=>{const s=Fr(t.selection.$from,r=>r.type.name==="table");return Ld(t,e&&(r=>{s&&qi(r,s.pos),e(r)}))},deleteTable:()=>({state:t,dispatch:e})=>zd(t,e),mergeCells:()=>({state:t,dispatch:e})=>Bi(t,e),splitCell:()=>({state:t,dispatch:e})=>Ai(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Di("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Di("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Id(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Bi(t,e)?!0:Ai(t,e),setCellAttribute:(t,e)=>({state:s,dispatch:r})=>Md(t,e)(s,r),goToNextCell:()=>({state:t,dispatch:e})=>_i(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>_i(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Ed(t),!0),setCellSelection:t=>({tr:e,dispatch:s})=>{if(s){const r=Pl.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:Dr,"Mod-Backspace":Dr,Delete:Dr,"Mod-Delete":Dr}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Rd({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],$d({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=vt(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:El(Ht(t,"tableRole",e))}}}),Jf=Za.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(Xf.configure(this.options.table)),this.options.tableCell!==!1&&t.push(Of.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(Ff.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(Hf.configure(this.options.tableRow)),t}});function eh(t){const e=D.c(25),{node:s,selected:r,editor:n,deleteNode:a}=t,l=Y(),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(Vd,{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(Gd,{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:sh,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:th,onClick:a,className:"shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:i.jsx(Xn,{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(Xa,{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 th(t){return t.preventDefault()}function sh(t){return t.preventDefault()}function nh(t){return t.replace(/([[\]])/g,"\\$1")}const rh=Wt.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",vt(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`[${nh(s)}](${e})`},addNodeView(){return Ya(eh)}});function ah(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(Xa,{as:"span","data-testid":"mention-chip",className:l,children:["@",n]}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}const io=Wt.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",vt(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?od(e,s):`@${s}`},addNodeView(){return Ya(ah)}}),ih="studio.mention-members.",za=new Map;function Ui(t){const e=za.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 za.set(t,n),n}catch{return}}function lh(t,e){za.set(t,e);try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function oh(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 ch(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 dh(t){const e=D.c(17),{locator:s}=Ue(),r=Qd(),n=`${ih}${s}`;let a;e[0]!==s?(a=lt.mentionMembers(s),e[0]=s,e[1]=a):a=e[1];let l;e[2]!==n?(l=()=>Ui(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=oh(Ui(n),ch(x?.data?.members??[]));return lh(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=Jn(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 Ki={query:"",range:null,rect:null,editor:null};class lo{state=Ki;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(Ki)}}const ta=new vd("markdownEditorMention");function uh(t,e,s){t.chain().focus().insertContentAt(e,[{type:"mention",attrs:{id:s.id,name:s.name}},{type:"text",text:" "}]).run(),Ol(t.view,ta)}function fh(t,e,s){const r=Math.min(e+s,t.content.size);return e>=r?"":t.textBetween(e,r,"","")}function oo(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,"")}),Ol(t.view,ta)}function co(t){return Za.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&&fh(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"?(oo(this.editor,t),t.close(),!0):!1,onExit:()=>{t.latched||t.close()}})};return[Wd(e)]}})}const Wi=256,hh=40,Gi=280,ph=140;function uo(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(mh,{store:s,state:r}):null,e[0]=n,e[1]=r,e[2]=s,e[3]=a):a=e[3],a}function mh({store:t,state:e}){const s=Y(),{members:r,loading:n}=dh(!0),[a,l]=L.useState(e.query),[o,c]=L.useState(null),d=gh(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<Gi&&h.top-f.top>x,p=(g?h.top-f.top:x)-8,k=Math.min(Gi,Math.max(p,ph))-hh,b={position:"absolute",width:Wi,left:Math.min(h.left,f.right-Wi-8)-u.left,...g?{bottom:u.bottom-h.top+6}:{top:h.bottom-u.top+6}},m=()=>{e.editor&&oo(e.editor,t),t.close()},y=w=>{const j=w.relatedTarget;if((!j||e.editor?.view.dom.contains(j)===!0)&&t.latched){o?.focus();return}m()},v=w=>{!e.editor||!e.range||(uh(e.editor,e.range,w),t.close())};return dl.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(Ja,{onKeyDown:w=>{w.key==="Escape"&&(w.preventDefault(),m(),e.editor?.commands.focus())},children:[i.jsx(ei,{ref:c,autoFocus:!0,onFocus:()=>{t.latched=!0},value:a,onValueChange:l,placeholder:s("markdownEditor.mentionSearch"),onBlur:y}),i.jsxs(ti,{style:{maxHeight:k},children:[n?i.jsx("div",{className:"flex items-center justify-center py-6",children:i.jsx(ht,{size:"sm"})}):i.jsx(si,{children:s("markdownEditor.mentionEmpty")}),r.map(w=>i.jsxs(Zn,{value:`${w.name} ${w.email}`,onSelect:()=>v(w),onMouseDown:j=>j.preventDefault(),className:"gap-2",children:[i.jsx(qe,{url:w.image??void 0,fallback:He(w.name),shape:"circle",size:"xs"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:w.name})]},w.id))]})]})}),d)}function gh(t){const e=t?.view.dom.closest('[role="dialog"]');return e instanceof HTMLElement?e:document.body}const xh=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,kh=Wt.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",vt(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=vt(this.options.HTMLAttributes,o);Object.entries(u).forEach(([b,m])=>{if(m!=null)switch(b){case"src":case"width":case"height":break;default:d.setAttribute(b,m)}}),u.src!==null&&(d.src=u.src);let f={...o};const h=b=>{if(typeof b=="string"&&b!==""){d.getAttribute("src")!==b&&(d.src=b);return}d.hasAttribute("src")&&d.removeAttribute("src"),d.src!==""&&(d.src="")};h(o.src);const x=b=>{if(b.type!==a.type)return!1;const m=c.extensionManager.attributes.filter(v=>v.type===b.type.name),y=Td(b,m);return Object.keys(f).forEach(v=>{!n.has(v)&&!(v in y)&&d.removeAttribute(v)}),Object.entries(y).forEach(([v,w])=>{n.has(v)||(w!=null?d.setAttribute(v,w):d.removeAttribute(v))}),h(y.src),f=y,!0},g=new Sd({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[jd({find:xh,type:this.type,getAttributes:t=>{const[,,e,s,r]=t;return{src:s,alt:e,title:r}}})]}});var bh=kh;function yh(t){const e=D.c(16),{node:s,selected:r,editor:n,deleteNode:a}=t,l=Y(),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:wh,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(Xn,{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(Xa,{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 wh(t){return t.preventDefault()}const vh=bh.extend({addNodeView(){return Ya(yh)}}).configure({inline:!1,allowBase64:!1}),La="uploads",jh="editor-images",fo="editor-files",Sh=new RegExp(`^/api/[^/]+/fs/${La}/read$`),Vi="http://relative.invalid";function Th(t){let e;try{e=new URL(t,Vi)}catch{return!1}return e.origin!==Vi||!Sh.test(e.pathname)?!1:(e.searchParams.get("path")??"").startsWith(`${fo}/`)}const Ch={openOnClick:!1,autolink:!0,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}},Nh=Cd.extend({parseMarkdown:(t,e)=>{const s=typeof t.href=="string"?t.href:"";if(Th(s))return e.createNode("attachment",{href:s,name:t.text??""});const r=cd(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 _h(t="",e){return[Il.configure({heading:{levels:[1,2,3]},underline:!1,link:!1}),Nh.configure(Ch),Fl.configure({placeholder:t}),Jf,Nd,_d.configure({nested:!0}),vh,rh,io,...e?[co(e)]:[],to.configure({markedOptions:{breaks:!0}})]}const Bh=/^(\s*)([-*+]|\d+[.)])\s+\S/,Ah=/^\s*(```|~~~)/,Dh=/^\s+(?![-*+>#]|\d+[.)]\s)\S/;function Rh(t){const e=[];let s=!1,r=!1;for(const n of t.split(`
83
+ `)){if(Ah.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&&Dh.test(n)){e[e.length-1]=`${e[e.length-1]} ${n.trim()}`;continue}r=!1,e.push(n)}return e.join(`
84
+ `)}const $h=10,Eh=25,Mh={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Ih(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Mh[t.type]??(pi(t)?".png":"")}function pi(t){return t.type.startsWith("image/")}function zh(){const t=Y(),{upload:e}=Zd(La),s=Yd(La),[r,n]=L.useState(0);return{uploadFile:async l=>{const o=pi(l),c=o?$h:Eh;if(l.size>c*1024*1024)return Ge.error(t("markdownEditor.fileTooLarge",{name:l.name,max:String(c)})),null;const d=o?jh:fo,u=`${crypto.randomUUID()}${Ih(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 Ge.error(t("markdownEditor.uploadFailed",{name:l.name})),null}finally{n(f=>f-1)}},pending:r}}const Lh=["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(" "),Ph=["[&_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 Qi(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(Bd.near(a.doc.resolve(l))),t.dispatch(a),t.state.selection.to}function Oh({defaultValue:t,onChange:e,placeholder:s,editable:r=!0}){const n=Y(),{uploadFile:a,pending:l}=zh(),[o]=L.useState(()=>new lo),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=pi(m)?Qi(g,b,"image",{src:y,alt:m.name}):Qi(g,b,"attachment",{href:y,name:m.name}))}})(),!0),h=zl({extensions:_h(s,o),content:Rh(t),contentType:"markdown",editable:r,editorProps:{attributes:{role:"textbox","aria-label":s??"","aria-multiline":"true",class:M(Lh,Ph)},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($u,{editor:h}),i.jsx(uo,{store:o}),i.jsx(Ll,{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(he,{type:"button",variant:"ghost",size:"icon-sm","aria-label":n("markdownEditor.attachFile"),onClick:()=>c.current?.click(),children:i.jsx(mc,{size:14})}),l>0&&i.jsxs("span",{className:"inline-flex items-center gap-1.5","aria-live":"polite",role:"status",children:[i.jsx(ht,{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 Fh="claude-subscription";function Hh(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===Fh)}}function qh(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 ho(t){if(t.status!=="completed")return!1;const e=t.conclusion;return e==="success"||e==="neutral"||e==="skipped"}function Uh(t,e,s){return t!=="failing"||s||e.length===0?null:{passed:e.filter(ho).length,total:e.length}}function Kh(t,e){return new URL(e,t).toString()}function po(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:Xd(r.replace(/^Error:\s*/,""))}return null}function Wh({orgSlug:t,repo:e,repositories:s,returnTo:r}){const n=`/api/${encodeURIComponent(t)}/git-providers/github`,a=e?s.find(o=>o.path===e)?.accountId:null;if(!a)return{url:`${n}/install?returnTo=${encodeURIComponent(r)}`,ownerOnly:!1,owner:null};const l=e?.includes("/")?e.split("/")[0]:null;return{url:`${n}/accounts/${encodeURIComponent(a)}/manage`,ownerOnly:l!==null,owner:l}}const Zi=()=>0;function Gh(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 su.subscribe(e,d)}),L.useSyncExternalStore(a.current,Zi,Zi)}const mo=1440*60*1e3,Vh=40;function go(t){try{const e=window.localStorage.getItem(ul.taskBoardPrs(t));return e?JSON.parse(e):{}}catch{return{}}}function Qh(t){const e=Date.now(),s=Object.entries(t).filter(([,r])=>e-r.updatedAt<=mo);for(s.sort(([,r],[,n])=>r.updatedAt-n.updatedAt);s.length>Vh;)s.shift();return Object.fromEntries(s)}function Yi(t,e){if(typeof window>"u")return null;const s=go(t)[e];return!s||Date.now()-s.updatedAt>mo?null:s}function Zh(t,e,s){if(!(typeof window>"u"))try{const r=go(t);r[e]={data:s,updatedAt:Date.now()},window.localStorage.setItem(ul.taskBoardPrs(t),JSON.stringify(Qh(r)))}catch{}}const Yh=6e4,Xh=2e3,Jh=t=>t.state===null;function xo(t){const e=D.c(25),{org:s,locator:r}=Ue(),n=Mt(),a=ur();let l;e[0]!==t||e[1]!==r||e[2]!==a?(l=g=>{a.setQueryData(lt.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],Gh(o);let c;e[8]!==t||e[9]!==r?(c=lt.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?Yi(r,t)?.data??void 0:void 0,f=()=>t?Yi(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 Zh(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:ep,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],Jn(x)}function ep(t){return t.state.data?.some(Jh)?Xh:Yh}function tp(t){const e=D.c(10),{locator:s}=Ue(),r=Mt();let n;e[0]!==s||e[1]!==t?(n=lt.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],Jn(o)}function mi(t){const e=D.c(10),{locator:s}=Ue(),r=Mt();let n;e[0]!==t||e[1]!==s?(n=lt.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],Jn(o)}function sp(t){const e=D.c(10),{locator:s}=Ue(),r=Mt(),n=ur();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:lt.taskBoardItemPrs(s,t)}),n.invalidateQueries({queryKey:lt.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],Vn(o)}function np(t){const e=D.c(10),{locator:s}=Ue(),r=Mt(),n=ur();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:lt.taskBoardItemPrs(s,t)}),n.invalidateQueries({queryKey:lt.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],Vn(o)}function ko(t){return t?dd:[]}function rp(t,e,s){return e.length===0?!0:ud(t,e,{cycleStartedAt:s})}function ap(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 ip(t){return t==="in_review"||t==="approved"}const lp=[],op=[];function bo(t,e){const s=D.c(4),r=e===void 0?lp:e,n=ru();let a;if(s[0]!==n||s[1]!==r||s[2]!==t){const l=iu(n);a=Tc(l,[...t.map(cp),...r]),s[0]=n,s[1]=r,s[2]=t,s[3]=a}else a=s[3];return a}function cp(t){return t.repo}function gi(t){const e=D.c(57),{members:s,onSelect:r}=t,n=Y();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(ei,{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(si,{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(Ae),e[13]=r,e[14]=f):f=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(wt,{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(Zn,{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(Rl,{size:16,className:"text-muted-foreground"}),e[28]=m):m=e[28];let y;e[29]!==n?(y=n("taskBoard.taskDialog.unassignedLabel"),e[29]=n,e[30]=y):y=e[30];let v;e[31]!==y?(v=i.jsx("span",{className:"truncate",children:y}),e[31]=y,e[32]=v):v=e[32];let w;e[33]!==k||e[34]!==b||e[35]!==v?(w=i.jsxs(Zn,{value:k,onSelect:b,className:"gap-2",children:[m,v]}),e[33]=k,e[34]=b,e[35]=v,e[36]=w):w=e[36];let j;e[37]!==p||e[38]!==w?(j=i.jsxs(Hr,{children:[p,w]}),e[37]=p,e[38]=w,e[39]=j):j=e[39];let S;e[40]!==n?(S=n("taskBoard.taskDialog.membersGroupHeading"),e[40]=n,e[41]=S):S=e[41];let C;if(e[42]!==s||e[43]!==r){let R;e[45]!==r?(R=E=>i.jsxs(Zn,{value:E.user?.name??E.userId,onSelect:()=>r(E.userId),className:"gap-2",children:[i.jsx(qe,{url:E.user?.image??void 0,fallback:He(E.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:E.user?.name??E.userId})]},E.userId),e[45]=r,e[46]=R):R=e[46],C=s.map(R),e[42]=s,e[43]=r,e[44]=C}else C=e[44];let N;e[47]!==S||e[48]!==C?(N=i.jsx(Hr,{heading:S,children:C}),e[47]=S,e[48]=C,e[49]=N):N=e[49];let _;e[50]!==j||e[51]!==N||e[52]!==d?(_=i.jsxs(ti,{children:[d,j,N]}),e[50]=j,e[51]=N,e[52]=d,e[53]=_):_=e[53];let $;return e[54]!==_||e[55]!==o?($=i.jsxs(Ja,{children:[o,_]}),e[54]=_,e[55]=o,e[56]=$):$=e[56],$}function dp({tags:t,selectedIds:e,defaultColor:s,onToggle:r,onCreate:n,onDelete:a}){const l=Y(),[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(Ja,{children:[i.jsx(ei,{value:o,onValueChange:c,placeholder:l("taskBoard.taskDialog.tagFilterPlaceholder"),"aria-label":l("taskBoard.taskDialog.tagFilterPlaceholder"),className:"h-9"}),i.jsxs(ti,{children:[x&&!g?i.jsx(Hr,{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(Zn,{value:`create-${x}`,disabled:d,onSelect:p,className:"flex-1 gap-2",children:[i.jsx(lr,{size:16,className:"text-muted-foreground"}),i.jsx("span",{className:"truncate",children:l("taskBoard.taskDialog.createTagOption",{name:x})})]})]})}):i.jsx(si,{children:l("taskBoard.taskDialog.noTagsFound")}),i.jsx(Hr,{children:t.map(k=>{const b=e.includes(k.id);return i.jsxs(Zn,{value:k.name,onSelect:()=>r(k.id),className:"group gap-2",children:[i.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:fr(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(Oa,{size:13})}),b&&i.jsx(Qn,{size:14,className:"shrink-0 text-foreground"})]},k.id)})})]})]})}function up(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 fp(t){return{id:t.threadId,title:t.title,status:t.status,created_at:t.createdAt,virtual_mcp_id:t.virtualMcpId}}function hp(t){const e=D.c(5),{title:s}=t;let r;e[0]!==s?(r=i.jsx(ou,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:i.jsx(cu,{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 pp(t){const e=D.c(12),{thread:s}=t,{org:r,locator:n}=Ue();let a;e[0]!==r.id||e[1]!==r.slug?(a={connectionId:Lo,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=a):a=e[2];const l=hu(a),o=ql(),c=au(),{data:d}=Ua();let u;e[3]!==s?(u=fp(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(fu,{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 mp(t){const e=D.c(11),{thread:s,onClose:r}=t,n=Y(),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(hp,{title:s.title??n("taskBoard.taskDialog.superAgentDefaultName")}),children:i.jsx(pp,{thread:s})}),e[2]=n,e[3]=s,e[4]=o):o=e[4];let c;e[5]!==o?(c=i.jsx(du,{"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(uu,{open:a,onOpenChange:l,children:c}),e[7]=a,e[8]=l,e[9]=c,e[10]=d):d=e[10],d}const gp=["[&_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 xp(t){const e=D.c(24),{placeholder:s,onSubmit:r,onEmptyChange:n,ref:a,className:l}=t,[o]=L.useState(kp);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=Il.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=co(o),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==s?(u=Fl.configure({placeholder:s}),e[3]=s,e[4]=u):u=e[4];let f;e[5]!==d||e[6]!==u?(f=[c,io,d,u,to],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",gp),e[8]=h):h=e[8];let x;e[9]!==s?(x={role:"textbox","aria-label":s,"aria-multiline":"true",class:h},e[9]=s,e[10]=x):x=e[10];let g;e[11]!==n?(g=w=>{const{editor:j}=w;return n(j.isEmpty)},e[11]=n,e[12]=g):g=e[12];const p=zl({extensions:f,editorProps:{attributes:x,handleKeyDown:(w,j)=>j.key!=="Enter"||j.shiftKey||ta.getState(w.state)?.active?!1:(j.preventDefault(),k(),!0)},onUpdate:g});function k(){if(!p)return;const w=p.getMarkdown().trim();w&&(r(w),p.commands.clearContent(),n(!0))}let b;e[13]!==p?.commands||e[14]!==k?(b=()=>({submit:k,focus:()=>p?.commands.focus()}),e[13]=p?.commands,e[14]=k,e[15]=b):b=e[15],L.useImperativeHandle(a,b);let m;e[16]!==l||e[17]!==p?(m=i.jsx(Ll,{editor:p,className:l}),e[16]=l,e[17]=p,e[18]=m):m=e[18];let y;e[19]!==o?(y=i.jsx(uo,{store:o}),e[19]=o,e[20]=y):y=e[20];let v;return e[21]!==y||e[22]!==m?(v=i.jsxs(i.Fragment,{children:[m,y]}),e[21]=y,e[22]=m,e[23]=v):v=e[23],v}function kp(){return new lo}function bp(t){const e=D.c(40),{thread:s,me:r,onReply:n,onDelete:a,onToggleResolved:l}=t,o=Y(),[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(gc,{size:16,className:"shrink-0 text-muted-foreground"}),e[1]=y):y=e[1];let v;e[2]!==o||e[3]!==s?(v=wp(s,o),e[2]=o,e[3]=s,e[4]=v):v=e[4];let w;e[5]!==v?(w=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:v}),e[5]=v,e[6]=w):w=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsx(mu,{size:16,className:"shrink-0 text-muted-foreground"}),e[7]=j):j=e[7];let S;return e[8]!==w?(S=i.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2.5 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-muted/60",children:[y,w,j]}),e[8]=w,e[9]=S):S=e[9],S}let u;e[10]!==o||e[11]!==s.resolved?(u=s.resolved&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",onClick:()=>d(!1),className:"flex items-center justify-between gap-2 rounded-t-xl bg-muted/40 px-4 py-2.5 text-left text-sm text-muted-foreground transition-colors hover:text-foreground",children:[o("taskBoard.taskDialog.commentCollapseThread"),i.jsx(Xn,{size:14,"aria-hidden":!0})]}),i.jsx(Na,{})]}),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=Xi(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(Ji,{comment:s,onDelete:f,resolved:s.resolved,onToggleResolved:l}),e[17]=l,e[18]=f,e[19]=s,e[20]=h):h=e[20];let x;if(e[21]!==r||e[22]!==a||e[23]!==s.replies){let m;e[25]!==r||e[26]!==a?(m=(y,v)=>i.jsxs(L.Fragment,{children:[i.jsx(Na,{inset:v>0}),i.jsx(Ji,{comment:y,onDelete:Xi(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(Na,{}),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(wo,{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 Xi(t,e){return t.author.id===e.id||t.author.isAgent===!0}const yp=new Intl.ListFormat(void 0,{style:"long",type:"conjunction"});function wp(t,e){const s=[t,...t.replies],r=yp.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 vp(t){const e=D.c(6),{me:s,onSubmit:r}=t,n=Y();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(wo,{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 Na(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 Ji(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(yo,{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=Ka(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(jp,{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($l,{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 jp(t){const e=D.c(18),{resolved:s,onDelete:r,onToggleResolved:n}=t,a=Y();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(Yn,{size:16}),e[2]=o):o=e[2];let c;e[3]!==l?(c=i.jsx(Ve,{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(ve,{onSelect:n,children:[i.jsx(Qn,{size:16}),a(s?"taskBoard.taskDialog.commentUnresolveThread":"taskBoard.taskDialog.commentResolveThread")]}),i.jsx(qa,{})]}),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(ve,{variant:"destructive",onSelect:r,children:[i.jsx(Oa,{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(Qe,{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 yo(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(wt,{size:24}),e[0]=l):l=e[0],l}const r=s.image??void 0;let n;e[1]!==s.name?(n=He(s.name),e[1]=s.name,e[2]=n):n=e[2];let a;return e[3]!==r||e[4]!==n?(a=i.jsx(qe,{url:r,fallback:n,shape:"circle",size:"xs"}),e[3]=r,e[4]=n,e[5]=a):a=e[5],a}function wo(t){const e=D.c(27),{variant:s,placeholder:r,author:n,onSubmit:a}=t,l=Y(),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(xp,{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(pu,{size:16}),e[9]=b):b=e[9];let m;e[10]!==c||e[11]!==k?(m=i.jsx("button",{type:"button",disabled:c,onClick:f,"aria-label":k,className:"flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-40",children:b}),e[10]=c,e[11]=k,e[12]=m):m=e[12];const y=m;let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=()=>o.current?.focus(),e[13]=v):v=e[13];const w=v;if(s==="root"){let N;e[14]!==y?(N=i.jsx("div",{className:"flex items-center justify-end",children:y}),e[14]=y,e[15]=N):N=e[15];let _;return e[16]!==N||e[17]!==p?(_=i.jsxs("div",{"data-testid":"new-comment-composer",onClick:w,className:"relative flex cursor-text flex-col gap-1 rounded-xl bg-card p-3 card-shadow",children:[p,N]}),e[16]=N,e[17]=p,e[18]=_):_=e[18],_}let j;e[19]!==n?(j=i.jsx("span",{className:"mt-0.5 shrink-0",children:i.jsx(yo,{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 C;return e[23]!==y||e[24]!==S||e[25]!==j?(C=i.jsxs("div",{"data-testid":"reply-composer",onClick:w,className:"relative flex cursor-text items-start gap-2 p-3",children:[j,S,y]}),e[23]=y,e[24]=S,e[25]=j,e[26]=C):C=e[26],C}function Sp(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 Tp(t){const e=D.c(36),{locator:s}=Ue(),r=Mt(),n=ur();let a;e[0]!==t||e[1]!==s?(a=lt.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()=>Sp((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=Jn(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=C=>r.call("TASK_BOARD_COMMENT_CREATE",{taskBoardItemId:t,...C}),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=Vn(g);let k;e[19]!==r?(k=C=>r.call("TASK_BOARD_COMMENT_UPDATE",C),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=Vn(b);let y;e[24]!==r?(y=C=>r.call("TASK_BOARD_COMMENT_DELETE",{id:C}),e[24]=r,e[25]=y):y=e[25];let v;e[26]!==h||e[27]!==y?(v={mutationFn:y,onSuccess:h},e[26]=h,e[27]=y,e[28]=v):v=e[28];const w=Vn(v);let j;e[29]!==u.data?(j=u.data??[],e[29]=u.data,e[30]=j):j=e[30];let S;return e[31]!==p||e[32]!==w||e[33]!==m||e[34]!==j?(S={threads:j,post:p,setResolved:m,remove:w},e[31]=p,e[32]=w,e[33]=m,e[34]=j,e[35]=S):S=e[35],S}function Cp(t){const e=D.c(24),{locator:s}=Ue(),r=Mt(),n=ur();let a;e[0]!==t||e[1]!==s?(a=lt.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=Jn(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=Vn(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 Np=3;function _p(t){const e=D.c(23),{itemId:s,members:r}=t,n=Y(),{data:a}=fl.useSession(),l=a?.user?.id,{subscriberIds:o,setSubscribed:c}=Cp(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(Dp)),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(Ap),k=[...u&&x?[x]:[],...p],b=k.slice(0,Np),m=k.length-b.length,y=!s||c.isPending;let v;e[13]!==c||e[14]!==u?(v=()=>c.mutate(!u),e[13]=c,e[14]=u,e[15]=v):v=e[15];let w;e[16]!==u||e[17]!==n?(w=n(u?"taskBoard.taskDialog.unsubscribe":"taskBoard.taskDialog.subscribe"),e[16]=u,e[17]=n,e[18]=w):w=e[18];let j;e[19]!==y||e[20]!==v||e[21]!==w?(j=i.jsx(he,{type:"button",variant:"ghost",size:"sm",disabled:y,onClick:v,className:"h-7 px-2 text-sm font-normal text-muted-foreground",children:w}),e[19]=y,e[20]=v,e[21]=w,e[22]=j):j=e[22],f=i.jsxs("div",{className:"flex items-center gap-2",children:[j,b.length>0&&i.jsxs("span",{className:"inline-flex items-center",title:k.map(S=>S.user?.name??n("taskBoard.taskDialog.someoneLabel")).join(", "),children:[b.map(Bp),m>0&&i.jsxs("span",{className:"-ml-2 inline-flex size-6 items-center justify-center rounded-full bg-muted text-[10px] font-medium text-muted-foreground ring-2 ring-background",children:["+",m]})]})]}),e[3]=s,e[4]=r,e[5]=l,e[6]=c,e[7]=u,e[8]=o,e[9]=n,e[10]=f}else f=e[10];return f}function Bp(t){return i.jsx(qe,{url:t.user?.image??void 0,fallback:He(t.user?.name),shape:"circle",size:"xs",className:"-ml-2 ring-2 ring-background first:ml-0"},t.userId)}function Ap(t){return!!t}function Dp(t){return[t.userId,t]}function xi(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function vo(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const el=560,Rp=2e3,jo=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),yt="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",tl=4,sl=1,rr="opacity-50";function $p(t){const e=D.c(22),{threads:s}=t,r=Y();let n,a,l,o,c,d;if(e[0]!==r||e[1]!==s){d=Symbol.for("react.early_return_sentinel");e:{const h=Hh(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(yt,"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(id,{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 Ir(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 Ep(t){const e=D.c(7),{item:s}=t,r=Y(),{data:n}=xo(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(Mp),e[2]=n,e[3]=l):l=e[3];let o;return e[4]!==a||e[5]!==l?(o=i.jsx(Ir,{label:a,children:l}),e[4]=a,e[5]=l,e[6]=o):o=e[6],o}function Mp(t){return i.jsx(he,{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($r,{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 So(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(Qa,{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(nd,{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(rd,{children:n}),e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==c?(d=i.jsxs(ad,{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 To(t){const e=D.c(451),{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=Y(),{org:y}=Ue();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={strict:!1},e[0]=v):v=e[0];const{agentId:w}=Vr(v),{data:j}=Ua(),S=j?.data?.members??[],C=Ga("delivery_lanes_enabled"),{handleCopy:N,copied:_}=Sa(),{handleCopy:$,copied:R}=Sa(),{handleCopy:E,copied:P}=Sa(),{data:O}=Wa();let z;e[1]!==O?(z=O===void 0?[]:O,e[1]=O,e[2]=z):z=e[2];const F=z,V=Vc(),Q=Qc();let K;e[3]===Symbol.for("react.memo_cache_sentinel")?(K={slug:"mcp-github"},e[3]=K):K=e[3];const H=ql(K);let Z;e[4]!==H?(Z=lu(H),e[4]=H,e[5]=Z):Z=e[5];const q=bo(op,Z),W=kl(q),X=a?.title??"",se=a?.description??"",ee=a?.status??l??fd[0],le=a?.priority??"medium",pe=a?.type??hd,Ce=a?.assigneeId??null,_e=a?.repo??o??null,xe=a?.dueDate;let fe;e[6]!==xe?(fe=vo(xe),e[6]=xe,e[7]=fe):fe=e[7];let be;e[8]!==a?.tags?(be=a?.tags.map(Pp)??[],e[8]=a?.tags,e[9]=be):be=e[9];let je;e[10]!==ee||e[11]!==le||e[12]!==pe||e[13]!==Ce||e[14]!==_e||e[15]!==fe||e[16]!==be||e[17]!==X||e[18]!==se?(je={title:X,description:se,status:ee,priority:le,type:pe,assigneeId:Ce,repo:_e,dueDate:fe,tagIds:be},e[10]=ee,e[11]=le,e[12]=pe,e[13]=Ce,e[14]=_e,e[15]=fe,e[16]=be,e[17]=X,e[18]=se,e[19]=je):je=e[19];const[Ne,De]=L.useState(je),{title:me,description:G,status:oe,priority:ae,assigneeId:Se,repo:B,dueDate:ne}=Ne;let te;e[20]!==q||e[21]!==B?(te=B?bl(B,q):void 0,e[20]=q,e[21]=B,e[22]=te):te=e[22];const de=te,ce=Ne.type,ke=Ne.tagIds,[Me,Ie]=L.useState(!1),[ye,It]=L.useState(!1),Xe=ye&&!Me;let Ke;e[23]===Symbol.for("react.memo_cache_sentinel")?(Ke=A=>{if(!A)return;const re=()=>It(A.scrollHeight>el);re();const we=new ResizeObserver(re);return we.observe(A),()=>we.disconnect()},e[23]=Ke):Ke=e[23];const Be=Ke,[jt,gr]=L.useState(!1),[St,xr]=L.useState(!1),[Qt,zt]=L.useState(!1),[Je,et]=L.useState(null);let pt;e[24]!==a?.threads||e[25]!==Je?(pt=a?.threads.find(A=>A.threadId===Je)??null,e[24]=a?.threads,e[25]=Je,e[26]=pt):pt=e[26];const Tt=pt,ot=L.useRef(Ne),Fe=L.useRef(null),Zt=L.useRef(c);let tt;e[27]===Symbol.for("react.memo_cache_sentinel")?(tt=()=>{Fe.current=null;const A=ot.current;A.title.trim()&&Zt.current({title:A.title.trim(),description:A.description.trim()||null,status:A.status,priority:A.priority,type:A.type,assigneeId:A.assigneeId,repo:A.repo,dueDate:A.dueDate?xi(A.dueDate):null,tagIds:A.tagIds})},e[27]=tt):tt=e[27];const ze=tt;let mt;e[28]!==ze||e[29]!==a||e[30]!==c?(mt=(A,re)=>{const we=re===void 0?!1:re,Re={...ot.current,...A};ot.current=Re,Zt.current=c,De(Re),a&&(Fe.current&&clearTimeout(Fe.current),we?Fe.current=setTimeout(ze,Rp):ze())},e[28]=ze,e[29]=a,e[30]=c,e[31]=mt):mt=e[31];const U=mt;let st;e[32]!==ze?(st=()=>{Fe.current&&(clearTimeout(Fe.current),ze())},e[32]=ze,e[33]=st):st=e[33];const Le=st;let Yt;e[34]===Symbol.for("react.memo_cache_sentinel")?(Yt=()=>{Fe.current&&(clearTimeout(Fe.current),Fe.current=null)},e[34]=Yt):Yt=e[34];const Lt=Yt;let Ct;e[35]!==Le||e[36]!==n?(Ct=()=>{Le(),n()},e[35]=Le,e[36]=n,e[37]=Ct):Ct=e[37];const $e=Ct;let nt;e[38]!==Le?(nt=A=>{if(A)return()=>Le()},e[38]=Le,e[39]=nt):nt=e[39];const Nt=nt;let gt;e[40]!==$e?(gt=A=>{if(!A)return;const re=we=>{if(we.key!=="Escape"||we.defaultPrevented||document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"]'))return;const Re=we.target;if(Re instanceof HTMLElement&&(Re.isContentEditable||Re instanceof HTMLInputElement||Re instanceof HTMLTextAreaElement)){Re.blur();return}$e()};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},e[40]=$e,e[41]=gt):gt=e[41];const _t=gt;let xt;e[42]!==V||e[43]!==U?(xt=async(A,re)=>{const we=await V.mutateAsync({name:A,color:re});U({tagIds:[...ot.current.tagIds,we.id]})},e[42]=V,e[43]=U,e[44]=xt):xt=e[44];const ct=xt;let kt;e[45]!==Q||e[46]!==U?(kt=A=>{Q.mutate(A),U({tagIds:ot.current.tagIds.filter(re=>re!==A)})},e[45]=Q,e[46]=U,e[47]=kt):kt=e[47];const Bt=kt,T=Se===Ae,I=a&&g&&(oe==="triage"||oe==="todo")&&!T,ue=a&&p&&a.assigneeId===Ae;let Ee;e[48]!==a||e[49]!==y?(Ee=a?yl(y.slug,a.keySeq):null,e[48]=a,e[49]=y,e[50]=Ee):Ee=e[50];const Pe=Ee;let dt;e[51]!==Se?(dt=A=>A.userId===Se,e[51]=Se,e[52]=dt):dt=e[52];const Pt=S.find(dt),We=a?.assignedBy?S.find(A=>A.userId===a.assignedBy):void 0,kr=a?S.find(A=>A.userId===a.createdBy):void 0;let br;e[53]!==oe?(br=Ba(oe),e[53]=oe,e[54]=br):br=e[54];const na=br.icon;let Te,Xt,Jt,es,ts,ss,At,ns,rs,as,is,ls,Dt,os,Rt;if(e[55]!==w||e[56]!==s||e[57]!==$e||e[58]!==_||e[59]!==E||e[60]!==$||e[61]!==G||e[62]!==Le||e[63]!==N||e[64]!==P||e[65]!==k||e[66]!==a||e[67]!==Pe||e[68]!==R||e[69]!==f||e[70]!==g||e[71]!==u||e[72]!==d||e[73]!==x||e[74]!==p||e[75]!==y||e[76]!==U||e[77]!==I||e[78]!==ue||e[79]!==oe||e[80]!==m||e[81]!==me){Te=!!a&&Ra(a);let A;e[97]!==s||e[98]!==$e||e[99]!==E||e[100]!==P||e[101]!==Pe||e[102]!==m?(A=s==="page"?i.jsx(Zc,{className:"-ml-2",children:i.jsxs(Yc,{className:"text-[15px]",children:[i.jsx(Si,{children:i.jsx(Xc,{asChild:!0,className:"rounded-md px-2 py-1 text-muted-foreground hover:bg-accent",children:i.jsx("button",{type:"button",onClick:$e,children:m("taskBoard.taskDetail.breadcrumbTasks")})})}),i.jsx(Jc,{}),i.jsx(Si,{children:i.jsx(ed,{className:"px-2 py-1",children:Pe??m("taskBoard.taskDetail.breadcrumbTask")})})]})}):Pe?i.jsxs(he,{variant:"ghost",size:"sm",title:Pe,"aria-label":m("taskBoard.taskDialog.copyIdAriaLabel"),className:"-ml-2 gap-2 px-2 text-[15px] text-muted-foreground hover:text-foreground",onClick:()=>{E(Pe),Ge.success(m("taskBoard.taskDialog.idCopied"))},children:[P?i.jsx(Qn,{size:16}):i.jsx(wi,{size:16}),Pe]}):i.jsxs("span",{"aria-hidden":!0,className:"flex h-7 items-center gap-2 text-[15px] text-muted-foreground opacity-50",children:[i.jsx(wi,{size:16}),"–"]}),e[97]=s,e[98]=$e,e[99]=E,e[100]=P,e[101]=Pe,e[102]=m,e[103]=A):A=e[103];let re;e[104]!==k||e[105]!==a||e[106]!==m?(re=a&&k&&i.jsx("span",{className:"mr-1 text-sm text-muted-foreground",children:m("taskBoard.taskDialog.savingLabel")}),e[104]=k,e[105]=a,e[106]=m,e[107]=re):re=e[107];let we;e[108]!==a||e[109]!==m?(we=a?.externalUrl&&i.jsx(he,{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(cr,{size:16})})}),e[108]=a,e[109]=m,e[110]=we):we=e[110];let Re;e[111]!==w||e[112]!==_||e[113]!==$||e[114]!==G||e[115]!==N||e[116]!==a||e[117]!==R||e[118]!==f||e[119]!==g||e[120]!==u||e[121]!==d||e[122]!==x||e[123]!==p||e[124]!==y||e[125]!==I||e[126]!==ue||e[127]!==oe||e[128]!==m?(Re=a&&i.jsxs(i.Fragment,{children:[i.jsx(he,{variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.shareAriaLabel"),title:m("taskBoard.taskDialog.shareTitle"),className:"text-muted-foreground hover:text-foreground",onClick:()=>{$(`${window.location.origin}${wl(y.slug,a,w)}`),Ge.success(m("taskBoard.taskDialog.linkCopied"))},children:R?i.jsx(Qn,{size:16}):i.jsx(xc,{size:16})}),i.jsxs(Ze,{modal:!1,children:[i.jsx(Ve,{asChild:!0,children:i.jsx(he,{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(Yn,{size:16})})}),i.jsxs(Qe,{align:"end",className:"w-48",children:[x&&i.jsxs(ve,{onSelect:x,children:[i.jsx(ml,{size:16}),m("taskBoard.taskDialog.newChatButton")]}),I&&i.jsxs(ve,{onSelect:g,children:[i.jsx(zr,{size:16}),m("taskBoard.taskBoard.autoFix")]}),ue&&i.jsxs(ve,{onSelect:p,children:[i.jsx(Qr,{size:16}),m("taskBoard.taskBoard.rerun")]}),(x||I||ue)&&i.jsx(qa,{}),G&&i.jsxs(ve,{onSelect:()=>N(G),children:[_?i.jsx(Qn,{size:16}):i.jsx(ld,{size:16}),m("taskBoard.taskDialog.copyDescription")]}),u&&i.jsxs(ve,{onSelect:u,children:[i.jsx(kc,{size:16}),m("taskBoard.taskDialog.cloneTask")]}),f&&oe!=="archived"&&i.jsxs(ve,{onSelect:()=>{Lt(),f()},children:[i.jsx(Po,{size:16}),m("taskBoard.taskDialog.archiveTask")]}),d&&i.jsxs(ve,{variant:"destructive",onSelect:()=>{Lt(),d()},children:[i.jsx(Oa,{size:16}),m("taskBoard.taskDialog.deleteTask")]})]})]})]}),e[111]=w,e[112]=_,e[113]=$,e[114]=G,e[115]=N,e[116]=a,e[117]=R,e[118]=f,e[119]=g,e[120]=u,e[121]=d,e[122]=x,e[123]=p,e[124]=y,e[125]=I,e[126]=ue,e[127]=oe,e[128]=m,e[129]=Re):Re=e[129];let ut;e[130]!==s||e[131]!==$e||e[132]!==m?(ut=s==="dialog"&&i.jsx(he,{variant:"ghost",size:"icon-sm","aria-label":m("taskBoard.taskDialog.closeAriaLabel"),className:"text-muted-foreground hover:text-foreground",onClick:$e,children:i.jsx(Xn,{size:16})}),e[130]=s,e[131]=$e,e[132]=m,e[133]=ut):ut=e[133];let Fn;e[134]!==re||e[135]!==we||e[136]!==Re||e[137]!==ut?(Fn=i.jsxs("div",{className:"flex items-center gap-0.5",children:[re,we,Re,ut]}),e[134]=re,e[135]=we,e[136]=Re,e[137]=ut,e[138]=Fn):Fn=e[138];let Cr;e[139]!==A||e[140]!==Fn?(Cr=i.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 px-6 pb-4 pt-6 sm:px-8",children:[A,Fn]}),e[139]=A,e[140]=Fn,e[141]=Cr):Cr=e[141];const Nr=Cr;e[142]!==s||e[143]!==Nr?(Rt=s==="page"?i.jsx("div",{className:"mx-auto w-full max-w-[1040px]",children:Nr}):Nr,e[142]=s,e[143]=Nr,e[144]=Rt):Rt=e[144],os="flex min-h-0 flex-1 flex-col overflow-y-auto";const ja=s==="page"&&"mx-auto w-full max-w-[1040px]";e[145]!==ja?(Dt=M("flex flex-col sm:flex-row",ja),e[145]=ja,e[146]=Dt):Dt=e[146],ls="flex min-w-0 flex-col gap-2 p-6 sm:flex-1 sm:p-8 sm:pt-6",Xt=Lp,Jt=me,es=_r=>{Te||(U({title:_r.target.value},!0),_r.target.style.height="auto",_r.target.style.height=`${_r.target.scrollHeight}px`)},ts=zp,ss=Le,e[147]!==m?(At=m("taskBoard.taskDialog.taskTitlePlaceholder"),e[147]=m,e[148]=At):At=e[148],ns=!0,rs=1,as=Te,is=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",Te&&"cursor-default"),e[55]=w,e[56]=s,e[57]=$e,e[58]=_,e[59]=E,e[60]=$,e[61]=G,e[62]=Le,e[63]=N,e[64]=P,e[65]=k,e[66]=a,e[67]=Pe,e[68]=R,e[69]=f,e[70]=g,e[71]=u,e[72]=d,e[73]=x,e[74]=p,e[75]=y,e[76]=U,e[77]=I,e[78]=ue,e[79]=oe,e[80]=m,e[81]=me,e[82]=Te,e[83]=Xt,e[84]=Jt,e[85]=es,e[86]=ts,e[87]=ss,e[88]=At,e[89]=ns,e[90]=rs,e[91]=as,e[92]=is,e[93]=ls,e[94]=Dt,e[95]=os,e[96]=Rt}else Te=e[82],Xt=e[83],Jt=e[84],es=e[85],ts=e[86],ss=e[87],At=e[88],ns=e[89],rs=e[90],as=e[91],is=e[92],ls=e[93],Dt=e[94],os=e[95],Rt=e[96];let cs;e[149]!==Xt||e[150]!==Jt||e[151]!==es||e[152]!==ts||e[153]!==ss||e[154]!==At||e[155]!==ns||e[156]!==rs||e[157]!==as||e[158]!==is?(cs=i.jsx("textarea",{ref:Xt,value:Jt,onChange:es,onKeyDown:ts,onBlur:ss,placeholder:At,autoFocus:ns,rows:rs,readOnly:as,className:is}),e[149]=Xt,e[150]=Jt,e[151]=es,e[152]=ts,e[153]=ss,e[154]=At,e[155]=ns,e[156]=rs,e[157]=as,e[158]=is,e[159]=cs):cs=e[159];let ds;e[160]!==Te||e[161]!==m?(ds=Te&&i.jsxs("p",{className:"mb-3 mt-1 flex items-center gap-1.5 text-xs text-muted-foreground",children:[i.jsx(Oo,{size:12}),m("taskBoard.taskDialog.reportsContentLocked")]}),e[160]=Te,e[161]=m,e[162]=ds):ds=e[162];let us;e[163]!==cs||e[164]!==ds?(us=i.jsxs("div",{children:[cs,ds]}),e[163]=cs,e[164]=ds,e[165]=us):us=e[165];let fs;e[166]!==a||e[167]!==p||e[168]!==y?(fs=a&&i.jsx(dm,{item:a,orgSlug:y.slug,onRerun:p}),e[166]=a,e[167]=p,e[168]=y,e[169]=fs):fs=e[169];const ra=Xe&&"overflow-hidden";let hs;e[170]!==ra?(hs=M("relative",ra),e[170]=ra,e[171]=hs):hs=e[171];let ps;e[172]!==Xe?(ps=Xe?{maxHeight:el}:void 0,e[172]=Xe,e[173]=ps):ps=e[173];let yr;e[174]===Symbol.for("react.memo_cache_sentinel")?(yr=()=>Ie(!0),e[174]=yr):yr=e[174];let ms;e[175]!==U?(ms=A=>U({description:A},!0),e[175]=U,e[176]=ms):ms=e[176];let gs;e[177]!==m?(gs=m("taskBoard.taskDialog.descriptionPlaceholder"),e[177]=m,e[178]=gs):gs=e[178];const aa=!Te;let xs;e[179]!==G||e[180]!==ms||e[181]!==gs||e[182]!==aa?(xs=i.jsx("div",{ref:Be,"data-testid":"task-description",children:i.jsx(Oh,{defaultValue:G,onChange:ms,placeholder:gs,editable:aa})}),e[179]=G,e[180]=ms,e[181]=gs,e[182]=aa,e[183]=xs):xs=e[183];let ks;e[184]!==Xe?(ks=Xe&&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[184]=Xe,e[185]=ks):ks=e[185];let bs;e[186]!==Le||e[187]!==hs||e[188]!==ps||e[189]!==xs||e[190]!==ks?(bs=i.jsxs("div",{className:hs,style:ps,onFocusCapture:yr,onBlurCapture:Le,children:[xs,ks]}),e[186]=Le,e[187]=hs,e[188]=ps,e[189]=xs,e[190]=ks,e[191]=bs):bs=e[191];let ys;e[192]!==Me||e[193]!==ye||e[194]!==m?(ys=ye&&i.jsxs(he,{type:"button",variant:"ghost",size:"sm",className:"mt-2 w-fit text-muted-foreground hover:text-foreground",onClick:()=>Ie(Ip),children:[i.jsx(Qa,{size:14,className:M("transition-transform",Me&&"rotate-180")}),m(Me?"taskBoard.taskDialog.showLess":"taskBoard.taskDialog.showMore")]}),e[192]=Me,e[193]=ye,e[194]=m,e[195]=ys):ys=e[195];let ws;e[196]!==bs||e[197]!==ys?(ws=i.jsxs("div",{className:"flex flex-col py-6",children:[bs,ys]}),e[196]=bs,e[197]=ys,e[198]=ws):ws=e[198];let vs;e[199]!==a?(vs=a&&i.jsx("div",{className:"py-4",children:i.jsx("hr",{className:"border-border"})}),e[199]=a,e[200]=vs):vs=e[200];const ia=a&&i.jsxs("div",{className:"flex flex-col gap-8",children:[i.jsx(Xp,{item:a,description:G,onOpenPreview:h}),i.jsx(tm,{item:a,members:S,startedBy:We??Pt,onOpenThread:A=>et(A.threadId)})]});let js;e[201]!==ws||e[202]!==vs||e[203]!==ia?(js=i.jsxs("div",{className:"flex flex-col",children:[ws,vs,ia]}),e[201]=ws,e[202]=vs,e[203]=ia,e[204]=js):js=e[204];let Ss;e[205]!==ls||e[206]!==us||e[207]!==fs||e[208]!==js?(Ss=i.jsxs("div",{className:ls,children:[us,fs,js]}),e[205]=ls,e[206]=us,e[207]=fs,e[208]=js,e[209]=Ss):Ss=e[209];const Do="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 Ts;e[210]!==a?(Ts=a&&i.jsx(Ep,{item:a}),e[210]=a,e[211]=Ts):Ts=e[211];let Cs;e[212]!==m?(Cs=m("taskBoard.taskDialog.propertiesLabel"),e[212]=m,e[213]=Cs):Cs=e[213];let Ns;e[214]!==a||e[215]!==oe?(Ns=M(a?vl({...a,status:oe}):Ba(oe).iconClassName),e[214]=a,e[215]=oe,e[216]=Ns):Ns=e[216];let _s;e[217]!==na||e[218]!==Ns?(_s=i.jsx(na,{size:16,className:Ns}),e[217]=na,e[218]=Ns,e[219]=_s):_s=e[219];let Bs;e[220]!==oe||e[221]!==m?(Bs=or(oe,m),e[220]=oe,e[221]=m,e[222]=Bs):Bs=e[222];let As;e[223]!==_s||e[224]!==Bs.label?(As=i.jsx(Ve,{asChild:!0,children:i.jsxs("button",{type:"button",className:yt,children:[_s,Bs.label]})}),e[223]=_s,e[224]=Bs.label,e[225]=As):As=e[225];let Ds;if(e[226]!==C||e[227]!==U||e[228]!==m){let A;e[230]!==U||e[231]!==m?(A=re=>{const{label:we,visual:Re}=or(re,m),ut=Re.icon;return i.jsxs(ve,{onSelect:()=>U({status:re}),className:"gap-2",children:[i.jsx(ut,{size:16,className:Re.iconClassName}),we]},re)},e[230]=U,e[231]=m,e[232]=A):A=e[232],Ds=jl(C).map(A),e[226]=C,e[227]=U,e[228]=m,e[229]=Ds}else Ds=e[229];let Rs;e[233]!==Ds?(Rs=i.jsx(Qe,{align:"start",className:"w-44",children:Ds}),e[233]=Ds,e[234]=Rs):Rs=e[234];let $s;e[235]!==As||e[236]!==Rs?($s=i.jsxs(Ze,{children:[As,Rs]}),e[235]=As,e[236]=Rs,e[237]=$s):$s=e[237];let Es;e[238]!==Te||e[239]!==m?(Es=Te?m("taskBoard.taskDialog.reportsContentLocked"):void 0,e[238]=Te,e[239]=m,e[240]=Es):Es=e[240];const la=Te&&"cursor-default opacity-60";let Ms;e[241]!==la?(Ms=M(yt,la),e[241]=la,e[242]=Ms):Ms=e[242];const oa=Et[ce].icon;let wr;e[243]!==oa?(wr=i.jsx(oa,{size:16}),e[243]=oa,e[244]=wr):wr=e[244];const ca=wr,da=Et[ce];let Is;e[245]!==m||e[246]!==da.labelKey?(Is=m(da.labelKey),e[245]=m,e[246]=da.labelKey,e[247]=Is):Is=e[247];let zs;e[248]!==Te||e[249]!==Es||e[250]!==Ms||e[251]!==ca||e[252]!==Is?(zs=i.jsx(Ve,{asChild:!0,children:i.jsxs("button",{type:"button",disabled:Te,title:Es,className:Ms,children:[ca,Is]})}),e[248]=Te,e[249]=Es,e[250]=Ms,e[251]=ca,e[252]=Is,e[253]=zs):zs=e[253];let Ls;e[254]!==U||e[255]!==m?(Ls=Sl.map(A=>{const re=Et[A].icon;return i.jsxs(ve,{onSelect:()=>U({type:A}),children:[i.jsx(re,{size:16}),m(Et[A].labelKey)]},A)}),e[254]=U,e[255]=m,e[256]=Ls):Ls=e[256];let Ps;e[257]!==Ls?(Ps=i.jsx(Qe,{align:"start",className:"w-44",children:Ls}),e[257]=Ls,e[258]=Ps):Ps=e[258];let Os;e[259]!==zs||e[260]!==Ps?(Os=i.jsxs(Ze,{children:[zs,Ps]}),e[259]=zs,e[260]=Ps,e[261]=Os):Os=e[261];let Fs;e[262]!==Te||e[263]!==m?(Fs=Te?m("taskBoard.taskDialog.reportsContentLocked"):void 0,e[262]=Te,e[263]=m,e[264]=Fs):Fs=e[264];const ua=ae==="none"&&rr,fa=Te&&"cursor-default opacity-60";let Hs;e[265]!==ua||e[266]!==fa?(Hs=M(yt,ua,fa),e[265]=ua,e[266]=fa,e[267]=Hs):Hs=e[267];let qs;e[268]!==ae||e[269]!==m?(qs=ae==="none"?i.jsxs(i.Fragment,{children:[i.jsx(Yn,{size:16}),m("taskBoard.taskDialog.setPriorityButton")]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:M("size-2 rounded-full",Ye[ae].dotClassName)}),m(Ye[ae].labelKey)]}),e[268]=ae,e[269]=m,e[270]=qs):qs=e[270];let Us;e[271]!==Te||e[272]!==Fs||e[273]!==Hs||e[274]!==qs?(Us=i.jsx(Ve,{asChild:!0,children:i.jsx("button",{type:"button",disabled:Te,title:Fs,className:Hs,children:qs})}),e[271]=Te,e[272]=Fs,e[273]=Hs,e[274]=qs,e[275]=Us):Us=e[275];let Ks;e[276]!==U||e[277]!==m?(Ks=Xr.map(A=>i.jsxs(ve,{onSelect:()=>U({priority:A}),children:[i.jsx("span",{className:M("size-2 rounded-full",Ye[A].dotClassName)}),m(Ye[A].labelKey)]},A)),e[276]=U,e[277]=m,e[278]=Ks):Ks=e[278];let Ws;e[279]!==Ks?(Ws=i.jsx(Qe,{align:"start",className:"w-40",children:Ks}),e[279]=Ks,e[280]=Ws):Ws=e[280];let Gs;e[281]!==Us||e[282]!==Ws?(Gs=i.jsxs(Ze,{children:[Us,Ws]}),e[281]=Us,e[282]=Ws,e[283]=Gs):Gs=e[283];const ha=a&&i.jsx("div",{className:"inline-flex h-9 items-center justify-start gap-2 px-3 text-sm font-medium text-foreground",title:m("taskBoard.taskDialog.createdByLabel"),children:Ra(a)?i.jsxs(i.Fragment,{children:[i.jsx(zr,{size:16,className:"text-muted-foreground"}),m("taskBoard.taskDialog.createdBySystemLabel")]}):kr?i.jsxs(i.Fragment,{children:[i.jsx(qe,{url:kr.user?.image??void 0,fallback:He(kr.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:kr.user?.name??m("taskBoard.taskDialog.unknownCreatorLabel")})]}):i.jsxs(i.Fragment,{children:[i.jsx(Rl,{size:16,className:"text-muted-foreground"}),m("taskBoard.taskDialog.unknownCreatorLabel")]})}),pa=!Se&&rr;let Vs;e[284]!==pa?(Vs=M(yt,pa),e[284]=pa,e[285]=Vs):Vs=e[285];let Qs;e[286]!==We||e[287]!==Pt||e[288]!==T||e[289]!==m?(Qs=T&&We?i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[i.jsx(qe,{url:We.user?.image??void 0,fallback:He(We.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:We.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(qe,{url:We.user?.image??void 0,fallback:He(We.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),i.jsx(wt,{size:16,className:"ring-2 ring-background"})]}),m("taskBoard.taskDialog.superAgentLabel")]})]}):T?i.jsxs(i.Fragment,{children:[i.jsx(wt,{size:16}),m("taskBoard.taskDialog.superAgentLabel")]}):Pt?i.jsxs(i.Fragment,{children:[i.jsx(qe,{url:Pt.user?.image??void 0,fallback:He(Pt.user?.name),shape:"circle",size:"2xs"}),i.jsx("span",{className:"truncate",children:Pt.user?.name??m("taskBoard.taskDialog.unassignedLabel")})]}):i.jsxs(i.Fragment,{children:[i.jsx(gl,{size:16,className:"text-muted-foreground"}),m("taskBoard.taskDialog.assignButton")]}),e[286]=We,e[287]=Pt,e[288]=T,e[289]=m,e[290]=Qs):Qs=e[290];let Zs;e[291]!==Vs||e[292]!==Qs?(Zs=i.jsx(ar,{asChild:!0,children:i.jsx("button",{type:"button",className:Vs,children:Qs})}),e[291]=Vs,e[292]=Qs,e[293]=Zs):Zs=e[293];let Ys;e[294]!==a?.assigneeId||e[295]!==p||e[296]!==U?(Ys=A=>{if(xr(!1),A===Ae&&a?.assigneeId===Ae){p?.();return}U({assigneeId:A})},e[294]=a?.assigneeId,e[295]=p,e[296]=U,e[297]=Ys):Ys=e[297];let Xs;e[298]!==S||e[299]!==Ys?(Xs=i.jsx(Er,{align:"start",className:"w-56 p-0",children:i.jsx(gi,{members:S,onSelect:Ys})}),e[298]=S,e[299]=Ys,e[300]=Xs):Xs=e[300];let Js;e[301]!==St||e[302]!==Zs||e[303]!==Xs?(Js=i.jsxs(Mr,{open:St,onOpenChange:xr,modal:!0,children:[Zs,Xs]}),e[301]=St,e[302]=Zs,e[303]=Xs,e[304]=Js):Js=e[304];let en;e[305]!==We||e[306]!==T||e[307]!==m?(en=T&&We&&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(yt,"pointer-events-none"),children:[i.jsx(wt,{size:16}),m("taskBoard.taskDialog.superAgentLabel")]})]}),e[305]=We,e[306]=T,e[307]=m,e[308]=en):en=e[308];let tn;e[309]!==Js||e[310]!==en?(tn=i.jsxs("div",{className:"flex flex-col",children:[Js,en]}),e[309]=Js,e[310]=en,e[311]=tn):tn=e[311];const ma=!ne&&rr;let sn;e[312]!==ma?(sn=M(yt,ma),e[312]=ma,e[313]=sn):sn=e[313];let vr;e[314]===Symbol.for("react.memo_cache_sentinel")?(vr=i.jsx(Yr,{size:16,className:"text-muted-foreground"}),e[314]=vr):vr=e[314];let nn;e[315]!==ne||e[316]!==m?(nn=ne?jo.format(ne):m("taskBoard.taskDialog.dueDateLabel"),e[315]=ne,e[316]=m,e[317]=nn):nn=e[317];let rn;e[318]!==sn||e[319]!==nn?(rn=i.jsx(ar,{asChild:!0,children:i.jsxs("button",{type:"button",className:sn,children:[vr,nn]})}),e[318]=sn,e[319]=nn,e[320]=rn):rn=e[320];const ga=ne??void 0;let an;e[321]!==U?(an=A=>{U({dueDate:A??null}),A&&gr(!1)},e[321]=U,e[322]=an):an=e[322];let ln;e[323]!==ga||e[324]!==an?(ln=i.jsx(Er,{className:"w-auto p-0",align:"start",children:i.jsx(Va,{mode:"single",selected:ga,onSelect:an,initialFocus:!0})}),e[323]=ga,e[324]=an,e[325]=ln):ln=e[325];let on;e[326]!==jt||e[327]!==rn||e[328]!==ln?(on=i.jsxs(Mr,{open:jt,onOpenChange:gr,children:[rn,ln]}),e[326]=jt,e[327]=rn,e[328]=ln,e[329]=on):on=e[329];const xa=a?.threads;let cn;e[330]!==xa?(cn=i.jsx($p,{threads:xa}),e[330]=xa,e[331]=cn):cn=e[331];let dn;e[332]!==tn||e[333]!==on||e[334]!==cn||e[335]!==Cs||e[336]!==$s||e[337]!==Os||e[338]!==Gs||e[339]!==ha?(dn=i.jsxs(Ir,{label:Cs,children:[$s,Os,Gs,ha,tn,on,cn]}),e[332]=tn,e[333]=on,e[334]=cn,e[335]=Cs,e[336]=$s,e[337]=Os,e[338]=Gs,e[339]=ha,e[340]=dn):dn=e[340];let un;e[341]!==m?(un=m("taskBoard.taskDialog.labelsLabel"),e[341]=m,e[342]=un):un=e[342];let fn;e[343]!==F||e[344]!==U||e[345]!==m||e[346]!==ke?(fn=ke.length===0?i.jsx(ar,{asChild:!0,children:i.jsxs("button",{type:"button",className:M(yt,rr),children:[i.jsx(bc,{size:16}),m("taskBoard.taskDialog.tagsButton")]})}):i.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 sm:px-3",children:[ke.map(A=>{const re=F.find(we=>we.id===A);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:()=>zt(!0),className:"inline-flex items-center gap-1.5",children:[i.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:fr(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:()=>{U({tagIds:ke.filter(we=>we!==A)})},children:i.jsx(Xn,{size:10})})]},A):null}),i.jsx(ar,{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(lr,{size:14})})})]}),e[343]=F,e[344]=U,e[345]=m,e[346]=ke,e[347]=fn):fn=e[347];let hn;e[348]!==F.length?(hn=pd(F.length),e[348]=F.length,e[349]=hn):hn=e[349];let pn;e[350]!==U||e[351]!==ke?(pn=A=>U({tagIds:ke.includes(A)?ke.filter(re=>re!==A):[...ke,A]}),e[350]=U,e[351]=ke,e[352]=pn):pn=e[352];let mn;e[353]!==ct||e[354]!==Bt||e[355]!==F||e[356]!==hn||e[357]!==pn||e[358]!==ke?(mn=i.jsx(Er,{align:"start",className:"w-56 p-0",children:i.jsx(dp,{tags:F,selectedIds:ke,defaultColor:hn,onToggle:pn,onCreate:ct,onDelete:Bt})}),e[353]=ct,e[354]=Bt,e[355]=F,e[356]=hn,e[357]=pn,e[358]=ke,e[359]=mn):mn=e[359];let gn;e[360]!==fn||e[361]!==mn||e[362]!==Qt?(gn=i.jsxs(Mr,{open:Qt,onOpenChange:zt,modal:!0,children:[fn,mn]}),e[360]=fn,e[361]=mn,e[362]=Qt,e[363]=gn):gn=e[363];let xn;e[364]!==un||e[365]!==gn?(xn=i.jsx(Ir,{label:un,children:gn}),e[364]=un,e[365]=gn,e[366]=xn):xn=e[366];const ka=Ir;let kn;e[367]!==m?(kn=m("taskBoard.taskDialog.projectLabel"),e[367]=m,e[368]=kn):kn=e[368];const ba=Ze,ya=!B&&rr;let bn;e[369]!==ya?(bn=M(yt,"max-w-full",ya),e[369]=ya,e[370]=bn):bn=e[370];let yn;e[371]!==de?(yn=i.jsx(Bc,{entry:de}),e[371]=de,e[372]=yn):yn=e[372];let wn;e[373]!==B||e[374]!==de?.title||e[375]!==m?(wn=de?.title??B??m("taskBoard.taskDialog.projectButton"),e[373]=B,e[374]=de?.title,e[375]=m,e[376]=wn):wn=e[376];let vn;e[377]!==wn?(vn=i.jsx("span",{className:"min-w-0 truncate text-left",children:wn}),e[377]=wn,e[378]=vn):vn=e[378];let jn;e[379]!==bn||e[380]!==yn||e[381]!==vn?(jn=i.jsx(Ve,{asChild:!0,children:i.jsxs("button",{type:"button",className:bn,children:[yn,vn]})}),e[379]=bn,e[380]=yn,e[381]=vn,e[382]=jn):jn=e[382];const wa=Qe,Ro="start",$o="w-64";let Sn;e[383]!==U?(Sn=()=>U({repo:null}),e[383]=U,e[384]=Sn):Sn=e[384];let Tn;e[385]!==m?(Tn=m("taskBoard.taskDialog.noProject"),e[385]=m,e[386]=Tn):Tn=e[386];let Cn;e[387]!==Sn||e[388]!==Tn?(Cn=i.jsx(ve,{onSelect:Sn,children:Tn}),e[387]=Sn,e[388]=Tn,e[389]=Cn):Cn=e[389];let jr;e[390]!==U?(jr=A=>i.jsx(ve,{className:"gap-2",onSelect:()=>U({repo:A.repo}),children:i.jsx(Tl,{entry:A})},A.id),e[390]=U,e[391]=jr):jr=e[391];const va=W.map(jr);let Nn;e[392]!==wa||e[393]!==Cn||e[394]!==va?(Nn=i.jsxs(wa,{align:Ro,className:$o,children:[Cn,va]}),e[392]=wa,e[393]=Cn,e[394]=va,e[395]=Nn):Nn=e[395];let _n;e[396]!==ba||e[397]!==jn||e[398]!==Nn?(_n=i.jsxs(ba,{children:[jn,Nn]}),e[396]=ba,e[397]=jn,e[398]=Nn,e[399]=_n):_n=e[399];let Bn;e[400]!==ka||e[401]!==kn||e[402]!==_n?(Bn=i.jsx(ka,{label:kn,children:_n}),e[400]=ka,e[401]=kn,e[402]=_n,e[403]=Bn):Bn=e[403];let An;e[404]!==dn||e[405]!==xn||e[406]!==Bn||e[407]!==Ts?(An=i.jsxs("div",{className:Do,children:[Ts,dn,xn,Bn]}),e[404]=dn,e[405]=xn,e[406]=Bn,e[407]=Ts,e[408]=An):An=e[408];let Dn;e[409]!==An||e[410]!==Dt||e[411]!==Ss?(Dn=i.jsxs("div",{className:Dt,children:[Ss,An]}),e[409]=An,e[410]=Dt,e[411]=Ss,e[412]=Dn):Dn=e[412];let Rn;e[413]!==Dn||e[414]!==os?(Rn=i.jsx("div",{className:os,children:Dn}),e[413]=Dn,e[414]=os,e[415]=Rn):Rn=e[415];let $n;e[416]!==et?($n=()=>et(null),e[416]=et,e[417]=$n):$n=e[417];let En;e[418]!==Tt||e[419]!==$n?(En=i.jsx(mp,{thread:Tt,onClose:$n}),e[418]=Tt,e[419]=$n,e[420]=En):En=e[420];let Mn;e[421]!==ze||e[422]!==k||e[423]!==a||e[424]!==m||e[425]!==me?(Mn=!a&&i.jsx("div",{className:"flex h-16 items-center justify-end border-t border-border px-4",children:i.jsxs(he,{size:"sm",disabled:!me.trim()||k,onClick:ze,children:[i.jsx(lr,{size:16}),m("taskBoard.taskDialog.createTaskButton")]})}),e[421]=ze,e[422]=k,e[423]=a,e[424]=m,e[425]=me,e[426]=Mn):Mn=e[426];let Sr;e[427]!==Rn||e[428]!==En||e[429]!==Mn||e[430]!==Rt?(Sr=i.jsxs(i.Fragment,{children:[Rt,Rn,En,Mn]}),e[427]=Rn,e[428]=En,e[429]=Mn,e[430]=Rt,e[431]=Sr):Sr=e[431];const In=Sr;if(s==="page"){let A;e[432]!==_t||e[433]!==Nt?(A=we=>{const Re=_t(we),ut=Nt(we);return()=>{Re?.(),ut?.()}},e[432]=_t,e[433]=Nt,e[434]=A):A=e[434];let re;return e[435]!==In||e[436]!==A?(re=i.jsx("div",{ref:A,"data-testid":"task-detail",className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:In}),e[435]=In,e[436]=A,e[437]=re):re=e[437],re}let zn;e[438]!==$e?(zn=A=>!A&&$e(),e[438]=$e,e[439]=zn):zn=e[439];let Ln;e[440]!==m?(Ln=m("taskBoard.taskDialog.newTaskTitle"),e[440]=m,e[441]=Ln):Ln=e[441];let Pn;e[442]!==Ln?(Pn=i.jsx(Lr,{className:"sr-only",children:Ln}),e[442]=Ln,e[443]=Pn):Pn=e[443];let On;e[444]!==In||e[445]!==Pn?(On=i.jsxs(Pr,{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:[Pn,In]}),e[444]=In,e[445]=Pn,e[446]=On):On=e[446];let Tr;return e[447]!==b||e[448]!==zn||e[449]!==On?(Tr=i.jsx(Or,{open:b,onOpenChange:zn,children:On}),e[447]=b,e[448]=zn,e[449]=On,e[450]=Tr):Tr=e[450],Tr}function Ip(t){return!t}function zp(t){t.key==="Enter"&&t.preventDefault()}function Lp(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Pp(t){return t.id}function Op(t){const e=D.c(2);let s;return e[0]!==t?(s=i.jsx(To,{...t,chrome:"dialog"}),e[0]=t,e[1]=s):s=e[1],s}function Fp(t){const e=D.c(2);let s;return e[0]!==t?(s=i.jsx(To,{...t,chrome:"page"}),e[0]=t,e[1]=s):s=e[1],s}function Hp(t,e){switch(t.status){case"failed":return _c(t.failureKind)?{label:t.failureKind==="superseded"?e("taskBoard.taskDialog.threadStatusSuperseded"):e("taskBoard.taskDialog.threadStatusEndedAfterDelivery"),className:"text-muted-foreground",icon:Ut}:{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:yc};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:Fa,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:er};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:Ut};default:return t.status}}function qp(t){const e=D.c(28),{thread:s,startedBy:r,onOpen:n}=t,a=Y();let l;if(e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==s){const o=s.status?Hp({...s,status:s.status},a):null,c=s.lastMessage;let d;e[5]!==s.title?(d=md(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(ri,{size:16,className:"shrink-0"}):i.jsx(wt,{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(qe,{url:r.user?.image??void 0,fallback:He(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(Ha,{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(ht,{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 Up(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:Dl}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:$r}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:$r}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:$r}}function Kp(t,e){switch(t){case"passing":return{label:e("taskBoard.taskDialog.prChecksPassing"),className:"text-success",icon:er};case"failing":return{label:e("taskBoard.taskDialog.prChecksFailing"),className:"text-destructive",icon:Ut};case"pending":return{label:e("taskBoard.taskDialog.prChecksPending"),className:"text-warning",icon:Fa};default:return null}}const Wp=new Set(["failure","cancelled","timed_out","action_required","startup_failure","stale"]);function Gp(t){if(t.status!=="completed")return{icon:Fa,className:"text-warning",spin:!0};const e=t.conclusion;return e&&Wp.has(e)?{icon:Ut,className:"text-destructive",spin:!1}:ho(t)?{icon:er,className:"text-success",spin:!1}:{icon:Zr,className:"text-muted-foreground",spin:!1}}function Vp(t){const e=D.c(46),{url:s,routes:r}=t,n=Y(),{data:a,isPending:l,isError:o}=tp(s),c=a?.available??!1;if(l){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(ht,{className:"size-[14px]"}),e[0]=N):N=e[0];let _;e[1]!==n?(_=n("taskBoard.taskDialog.previewLabel"),e[1]=n,e[2]=_):_=e[2];let $;return e[3]!==_?($=i.jsxs(he,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,children:[N,_]}),e[3]=_,e[4]=$):$=e[4],$}if(!c||o){let N;e[5]!==n?(N=n("taskBoard.taskDialog.previewUnavailableTitle"),e[5]=n,e[6]=N):N=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx(Da,{size:14}),e[7]=_):_=e[7];let $;e[8]!==n?($=n("taskBoard.taskDialog.previewUnavailable"),e[8]=n,e[9]=$):$=e[9];let R;return e[10]!==N||e[11]!==$?(R=i.jsxs(he,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",disabled:!0,title:N,children:[_,$]}),e[10]=N,e[11]=$,e[12]=R):R=e[12],R}const d=r.length>0&&"rounded-r-none";let u;e[13]!==d?(u=M("gap-1.5",d),e[13]=d,e[14]=u):u=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Da,{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(cr,{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(he,{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(Qa,{size:14}),e[29]=y):y=e[29];let v;e[30]!==b||e[31]!==m?(v=i.jsx(Ve,{asChild:!0,children:i.jsx(he,{type:"button",variant:"outline",size:"sm",className:"rounded-l-none border-l-0 px-1.5","aria-label":b,title:m,children:y})}),e[30]=b,e[31]=m,e[32]=v):v=e[32];let w;if(e[33]!==r||e[34]!==s){let N;e[36]!==s?(N=_=>i.jsx(ve,{asChild:!0,children:i.jsx("a",{href:Kh(s,_),target:"_blank",rel:"noreferrer",className:"font-mono text-xs",children:_})},_),e[36]=s,e[37]=N):N=e[37],w=r.map(N),e[33]=r,e[34]=s,e[35]=w}else w=e[35];let j;e[38]!==w?(j=i.jsx(Qe,{align:"start",children:w}),e[38]=w,e[39]=j):j=e[39];let S;e[40]!==v||e[41]!==j?(S=i.jsxs(Ze,{children:[v,j]}),e[40]=v,e[41]=j,e[42]=S):S=e[42];let C;return e[43]!==k||e[44]!==S?(C=i.jsxs("div",{className:"flex items-center",children:[k,S]}),e[43]=k,e[44]=S,e[45]=C):C=e[45],C}function Qp(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=Y(),[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=Up(s,h),b=Kp(s.checksStatus,h);let m;e[13]!==s||e[14]!==l?(m=qh(s,l),e[13]=s,e[14]=l,e[15]=m):m=e[15];const{isOpen:y,hasConflict:v,showShip:w,showResolveConflict:j}=m,S=!!a||!!s.previewUrl||w||j,C=s.checks??[],N=C.length>0||b!=null,_=C.length>0,$=Uh(s.checksStatus,C,x),R=$?{label:h("taskBoard.taskDialog.prChecksScore",$),className:"text-warning",icon:Ut}:b,E=n&&"revalidating-ring";let P;e[16]!==E?(P=M("flex flex-col gap-3 rounded-xl bg-card p-3 card-shadow",E),e[16]=E,e[17]=P):P=e[17];const O=Cu(s.url)?.repo.provider??"github";let z;e[18]!==O?(z=i.jsx(tu,{provider:O,className:"size-4 shrink-0 text-foreground"}),e[18]=O,e[19]=z):z=e[19];const F=s.title??`${s.repoOwner}/${s.repoName}`;let V;e[20]!==F?(V=i.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:F}),e[20]=F,e[21]=V):V=e[21];const Q=M("flex shrink-0 items-center gap-1 text-xs font-medium",k.className);let K;e[22]!==k?(K=i.jsx(k.icon,{size:13}),e[22]=k,e[23]=K):K=e[23];let H;e[24]!==k||e[25]!==K||e[26]!==Q?(H=i.jsxs("span",{className:Q,children:[K,k.label]}),e[24]=k,e[25]=K,e[26]=Q,e[27]=H):H=e[27];let Z;e[28]===Symbol.for("react.memo_cache_sentinel")?(Z=i.jsx(cr,{size:12,className:"text-muted-foreground/60 group-hover:text-foreground"}),e[28]=Z):Z=e[28];let J;e[29]!==s.number||e[30]!==s.url?(J=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,Z]}),e[29]=s.number,e[30]=s.url,e[31]=J):J=e[31];let q;e[32]!==H||e[33]!==J||e[34]!==z||e[35]!==V?(q=i.jsxs("div",{className:"flex items-center gap-3",children:[z,V,H,J]}),e[32]=H,e[33]=J,e[34]=z,e[35]=V,e[36]=q):q=e[36];let W;e[37]!==v||e[38]!==y||e[39]!==h?(W=v&&y&&i.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warning",children:[i.jsx(Ut,{size:13,className:"shrink-0"}),h("taskBoard.taskDialog.prConflict")]}),e[37]=v,e[38]=y,e[39]=h,e[40]=W):W=e[40];let X;e[41]!==S||e[42]!==f||e[43]!==u||e[44]!==d||e[45]!==s.previewUrl||e[46]!==a||e[47]!==c||e[48]!==r||e[49]!==o||e[50]!==j||e[51]!==w||e[52]!==h?(X=S&&i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&i.jsxs(he,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",title:h("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>f?.(a),children:[i.jsx(ml,{size:13}),h("taskBoard.taskDialog.openPreviewButton")]}),s.previewUrl&&i.jsx(Vp,{url:s.previewUrl,routes:r}),w&&i.jsx(he,{type:"button",variant:"success",size:"sm",disabled:o,onClick:d,children:h("taskBoard.taskDialog.shipToProductionButton")}),j&&i.jsxs(he,{type:"button",variant:"warning",size:"sm",className:"gap-1.5",disabled:c,title:h("taskBoard.taskDialog.resolveConflictTitle"),onClick:u,children:[i.jsx(Dl,{size:13}),h("taskBoard.taskDialog.resolveConflictButton")]})]}),e[41]=S,e[42]=f,e[43]=u,e[44]=d,e[45]=s.previewUrl,e[46]=a,e[47]=c,e[48]=r,e[49]=o,e[50]=j,e[51]=w,e[52]=h,e[53]=X):X=e[53],p=i.jsxs("div",{className:P,children:[q,W,X,N&&i.jsxs("div",{className:"border-t border-border pt-2 text-xs",children:[i.jsxs("button",{type:"button",disabled:!_,onClick:()=>g(Zp),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(er,{size:13,className:"text-muted-foreground"}),i.jsx("span",{className:M(R?.className??"text-muted-foreground"),children:R?.label??h("taskBoard.taskDialog.prChecksLabel")}),_&&i.jsx(Ha,{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:C.map((se,ee)=>{const le=Gp(se),pe=`${se.name}-${ee}`;return i.jsxs("div",{className:"rounded-md bg-muted/40 p-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[le.spin?i.jsx(ht,{className:M("size-[13px]",le.className)}):i.jsx(le.icon,{size:13,className:M("shrink-0",le.className)}),i.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:se.name}),se.detailsUrl&&i.jsx("a",{href:se.detailsUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:i.jsx(cr,{size:12})})]}),se.summary&&i.jsx("div",{className:"mt-1.5 max-h-64 overflow-auto text-muted-foreground",children:i.jsx($l,{id:`${s.url}-${pe}`,text:se.summary})})]},pe)})})]})]}),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 Zp(t){return!t}function Yp(){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(Hn,{className:"size-4 shrink-0 rounded"}),i.jsx(Hn,{className:"h-4 min-w-0 flex-1"}),i.jsx(Hn,{className:"h-4 w-16 shrink-0"}),i.jsx(Hn,{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(Hn,{className:"h-7 w-20"}),i.jsx(Hn,{className:"h-7 w-28"})]})]}),t[1]=s):s=t[1],s}function Xp(t){const e=D.c(56),{item:s,description:r,onOpenPreview:n}=t,a=Y(),{data:l,isLoading:o,isFetching:c}=xo(s.id),{data:d}=mi(s.id),u=Nl(),f=sp(s.id),h=np(s.id);let x,g,p,k,b,m;if(e[0]!==d||e[1]!==r||e[2]!==s.previewRoutes||e[3]!==s.reviewCycleStartedAt||e[4]!==s.status||e[5]!==s.threads||e[6]!==n||e[7]!==f||e[8]!==l||e[9]!==c||e[10]!==o||e[11]!==h||e[12]!==u||e[13]!==a){m=Symbol.for("react.early_return_sentinel");e:{const w=up(r),j=o&&!l;if(!j&&(!l||l.length===0)&&w.length===0){m=null;break e}let S;e[20]!==d||e[21]!==s.reviewCycleStartedAt||e[22]!==s.status||e[23]!==u?(S=ip(s.status)&&rp(d??[],ko(u),s.reviewCycleStartedAt),e[20]=d,e[21]=s.reviewCycleStartedAt,e[22]=s.status,e[23]=u,e[24]=S):S=e[24];const C=S;let N;e[25]!==f||e[26]!==a?(N=()=>f.mutate(void 0,{onSuccess:O=>O?.merged?Ge.success(a("taskBoard.taskDialog.shipSuccess")):Ge.error(a("taskBoard.taskDialog.shipError")),onError:()=>Ge.error(a("taskBoard.taskDialog.shipError"))}),e[25]=f,e[26]=a,e[27]=N):N=e[27];const _=N;let $;e[28]!==h||e[29]!==a?($=O=>h.mutate(O,{onSuccess:()=>Ge.success(a("taskBoard.taskDialog.resolveConflictSuccess")),onError:()=>Ge.error(a("taskBoard.taskDialog.resolveConflictError"))}),e[28]=h,e[29]=a,e[30]=$):$=e[30];const R=$;let E;e[31]!==s.threads||e[32]!==n?(E=n?s.threads.find(em):void 0,e[31]=s.threads,e[32]=n,e[33]=E):E=e[33];const P=E;x=So,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]!==_||e[41]!==P||e[42]!==f||e[43]!==l||e[44]!==c||e[45]!==h||e[46]!==C?(p=j?i.jsx(Yp,{}):(l??[]).map(O=>i.jsx(Qp,{pr:O,routes:s.previewRoutes??[],revalidating:c,previewThread:P,reviewsReady:C,shipPending:f.isPending,resolvePending:h.isPending,onShip:_,onResolveConflict:()=>R(O.number),onOpenPreview:n},O.url)),e[36]=s.previewRoutes,e[37]=j,e[38]=n,e[39]=R,e[40]=_,e[41]=P,e[42]=f,e[43]=l,e[44]=c,e[45]=h,e[46]=C,e[47]=p):p=e[47],k=w.map(Jp)}e[0]=d,e[1]=r,e[2]=s.previewRoutes,e[3]=s.reviewCycleStartedAt,e[4]=s.status,e[5]=s.threads,e[6]=n,e[7]=f,e[8]=l,e[9]=c,e[10]=o,e[11]=h,e[12]=u,e[13]=a,e[14]=x,e[15]=g,e[16]=p,e[17]=k,e[18]=b,e[19]=m}else x=e[14],g=e[15],p=e[16],k=e[17],b=e[18],m=e[19];if(m!==Symbol.for("react.early_return_sentinel"))return m;let y;e[48]!==g||e[49]!==p||e[50]!==k?(y=i.jsxs("div",{className:g,children:[p,k]}),e[48]=g,e[49]=p,e[50]=k,e[51]=y):y=e[51];let v;return e[52]!==x||e[53]!==b||e[54]!==y?(v=i.jsx(x,{label:b,children:y}),e[52]=x,e[53]=b,e[54]=y,e[55]=v):v=e[55],v}function Jp(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(Da,{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(cr,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function em(t){return t.hasPreview&&t.virtualMcpId}function tm(t){const e=D.c(7),{item:s,members:r,startedBy:n,onOpenThread:a}=t,l=Y(),{data:o}=mi(s.id),{data:c}=fl.useSession(),d=new Map(r.map(im)),u={id:c?.user?.id??"me",name:c?.user?.name??l("taskBoard.taskDialog.commentYouLabel"),image:c?.user?.image},f=Tp(s.id),h=y=>{if(y===Ae)return{id:y,name:l("taskBoard.taskDialog.superAgentLabel"),isAgent:!0};if(y===u.id)return u;const v=d.get(y);return{id:y,name:v?.user?.name??y,image:v?.user?.image}},x=f.threads.map(y=>({id:y.id,author:h(y.authorId),body:y.body,createdAt:y.createdAt,resolved:y.resolved,replies:y.replies.map(v=>({id:v.id,author:h(v.authorId),body:v.body,createdAt:v.createdAt,replies:[]}))})),g=[...(o??[]).filter(Cc).map(am),...s.threads.filter(Nc).map(rm),...x.map(nm)].sort(sm),p=[];for(const y of g){if(y.kind==="thread"){p.push({type:"thread",thread:y.thread});continue}if(y.kind==="comment"){p.push({type:"comment",comment:y.comment});continue}const v=p[p.length-1];v?.type==="timeline"?v.items.push(y.activity):p.push({type:"timeline",items:[y.activity]})}let k;e[0]!==l?(k=l("taskBoard.taskDialog.activityLabel"),e[0]=l,e[1]=k):k=e[1];let b;e[2]!==s.id||e[3]!==r?(b=i.jsx(_p,{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(So,{label:k,action:b,children:i.jsxs("div",{className:"flex flex-col gap-5",children:[i.jsx(vp,{me:u,onSubmit:m}),p.map((y,v)=>y.type==="timeline"?i.jsx(om,{items:y.items,memberByUserId:d},`timeline-${v}`):y.type==="comment"?i.jsx(bp,{thread:y.comment,me:u,onReply:w=>f.post.mutate({body:w,parentId:y.comment.id}),onDelete:w=>f.remove.mutate(w),onToggleResolved:()=>f.setResolved.mutate({id:y.comment.id,resolved:!y.comment.resolved})},`comment-${y.comment.id}`):i.jsx(qp,{thread:y.thread,startedBy:n,onOpen:a},`thread-${y.thread.threadId}`))]})})}function sm(t,e){return e.at-t.at}function nm(t){return{kind:"comment",at:new Date(t.createdAt).getTime(),comment:t}}function rm(t){return{kind:"thread",at:new Date(t.createdAt).getTime(),thread:t}}function am(t){return{kind:"activity",at:new Date(t.occurredAt).getTime(),activity:t}}function im(t){return[t.userId,t]}function Ot(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 Gr="\0";function Rr(t){return`${Gr}${t}${Gr}`}function Ft(t,e){return t.split(new RegExp(`${Gr}(\\w+)${Gr}`)).map((s,r)=>i.jsx(L.Fragment,{children:r%2===0?s:e[s]},r))}function Wn(t,e){return e(t==="qa"?"taskBoard.taskDialog.qaAgentLabel":t==="code_review"?"taskBoard.taskDialog.codeReviewerLabel":"taskBoard.taskDialog.reviewerLabel")}function lm(t,e,s){const r=h=>{const x=typeof h=="string"?Ac[h]:void 0;if(!x)return String(h??"");const g=x.icon;return i.jsx(Ot,{icon:i.jsx(g,{size:14,className:x.iconClassName}),label:e(x.labelKey)})},n=h=>{const x=typeof h=="string"?Ye[h]:void 0;return x?i.jsx(Ot,{icon:i.jsx("span",{className:M("size-2 rounded-full",x.dotClassName)}),label:e(x.labelKey)}):String(h??"")},a=h=>{const x=vo(typeof h=="string"?h:null);return x?i.jsx(Ot,{icon:i.jsx(Yr,{size:14,className:"text-muted-foreground"}),label:jo.format(x)}):""},l=h=>!Array.isArray(h)||h.length===0?null:h.map((x,g)=>{const p=x;return i.jsx(Ot,{icon:i.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:fr(p.color)}}),label:p.name??""},p.id??g)}),o=h=>{if(h===Ae)return i.jsx(Ot,{icon:i.jsx(wt,{size:14}),label:e("taskBoard.taskDialog.superAgentLabel")});const x=typeof h=="string"?s.get(h):void 0;return i.jsx(Ot,{icon:i.jsx(qe,{url:x?.user?.image??void 0,fallback:He(x?.user?.name),shape:"circle",size:"2xs"}),label:x?.user?.name??e("taskBoard.taskDialog.someoneLabel")})},c=h=>i.jsx(Ot,{icon:i.jsx(ri,{size:14}),label:Wn(h,e)}),d=t.data,u=Rr("from"),f=Rr("to");switch(t.action){case"created":return e("taskBoard.taskDialog.activityCreated");case"status_changed":{const h=po([{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?Ft(e("taskBoard.taskDialog.activityRetriesExhausted",{to:f,count:String(d.retriesSpent),reason:h}),{to:r(d.to)}):Ft(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"):Ft(e(d.to===Ae?"taskBoard.taskDialog.activityDelegated":"taskBoard.taskDialog.activityAssigned",{name:Rr("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"):Ft(!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"):Ft(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"):Ft(e("taskBoard.taskDialog.activityTagsSet",{to:f}),{to:l(d.to)});case"review_requested":return Ft(e("taskBoard.taskDialog.activityDelegated",{name:Rr("name")}),{name:c(d.reviewer)});case"review_approved":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewApprovedWithNotes",{reviewer:Wn(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewApproved",{reviewer:Wn(d.reviewer,e)});case"review_changes_requested":return typeof d.notes=="string"&&d.notes.trim()?e("taskBoard.taskDialog.activityReviewChangesRequestedWithNotes",{reviewer:Wn(d.reviewer,e),notes:d.notes}):e("taskBoard.taskDialog.activityReviewChangesRequested",{reviewer:Wn(d.reviewer,e)});case"review_verdict_requested":return e("taskBoard.taskDialog.activityReviewVerdictRequested",{reviewer:Wn(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 nl(t){return!t||t===Ae}function om(t){const e=D.c(29),{items:s,memberByUserId:r}=t,n=Y(),[a,l]=L.useState(!1);let o;e[0]!==r||e[1]!==n?(o=m=>nl(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(nl(m))return i.jsx("span",{className:"z-10 flex size-4 shrink-0 items-center justify-center bg-background",children:i.jsx(wt,{size:16})});const y=r.get(m);return i.jsx("span",{className:"z-10 shrink-0 rounded-full bg-background",children:i.jsx(qe,{url:y?.user?.image??void 0,fallback:He(y?.user?.name),shape:"circle",size:"2xs"})})},e[3]=r,e[4]=d):d=e[4];const u=d,f=s.length>tl&&!a;let h;e[5]!==f||e[6]!==s?(h=f?s.slice(0,sl):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)," ",lm(y,n,r),i.jsxs("span",{className:"text-muted-foreground/60",children:[" · ",Ka(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>tl&&i.jsxs("button",{type:"button",onClick:()=>l(cm),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(Yn,{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-sl)})})]}),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 cm(t){return!t}function dm(t){const e=D.c(59),{item:s,orgSlug:r,onRerun:n}=t,a=Y(),{data:l}=mi(s.id),{data:o}=Hl();let c;e[0]!==l?(c=l??[],e[0]=l,e[1]=c):c=e[1];let d;e[2]!==c?(d=po(c),e[2]=c,e[3]=d):d=e[3];const u=d;if(!u)return null;const f=u.code===Ri.githubNotAuthenticated,h=u.code===Ri.githubConnectionMissing;let x,g,p,k,b,m,y,v,w,j;if(e[4]!==h||e[5]!==u.message||e[6]!==s||e[7]!==f||e[8]!==r||e[9]!==o||e[10]!==a){g=Wh({orgSlug:r,repo:s.repo,repositories:o??[],returnTo:wl(r,s)}),x=td,j="destructive",p="mt-2 flex-col",v="flex items-start gap-3",e[21]===Symbol.for("react.memo_cache_sentinel")?(w=i.jsx(Ut,{}),e[21]=w):w=e[21],k="flex flex-col gap-1";let E;e[22]!==a?(E=a("taskBoard.taskDialog.runFailedTitle"),e[22]=a,e[23]=E):E=e[23],e[24]!==E?(b=i.jsx(sd,{children:E}),e[24]=E,e[25]=b):b=e[25];let P;e[26]!==h||e[27]!==u.message||e[28]!==f||e[29]!==a?(P=h?a("taskBoard.taskDialog.runFailedGithubMissing"):f?a("taskBoard.taskDialog.runFailedGithubAuth"):u.message,e[26]=h,e[27]=u.message,e[28]=f,e[29]=a,e[30]=P):P=e[30],e[31]!==P?(m=i.jsx(Ti,{children:P}),e[31]=P,e[32]=m):m=e[32],y=f&&g.ownerOnly&&g.owner&&i.jsx(Ti,{children:a("taskBoard.taskDialog.runFailedGithubOwnerOnly",{owner:g.owner})}),e[4]=h,e[5]=u.message,e[6]=s,e[7]=f,e[8]=r,e[9]=o,e[10]=a,e[11]=x,e[12]=g,e[13]=p,e[14]=k,e[15]=b,e[16]=m,e[17]=y,e[18]=v,e[19]=w,e[20]=j}else x=e[11],g=e[12],p=e[13],k=e[14],b=e[15],m=e[16],y=e[17],v=e[18],w=e[19],j=e[20];let S;e[33]!==k||e[34]!==b||e[35]!==m||e[36]!==y?(S=i.jsxs("div",{className:k,children:[b,m,y]}),e[33]=k,e[34]=b,e[35]=m,e[36]=y,e[37]=S):S=e[37];let C;e[38]!==S||e[39]!==v||e[40]!==w?(C=i.jsxs("div",{className:v,children:[w,S]}),e[38]=S,e[39]=v,e[40]=w,e[41]=C):C=e[41];let N;e[42]!==h||e[43]!==f||e[44]!==g||e[45]!==a?(N=(f||h)&&i.jsx(he,{size:"sm",asChild:!0,children:i.jsx("a",{href:g.url,children:a(h?"taskBoard.taskDialog.runFailedLinkRepo":"taskBoard.taskDialog.runFailedReconnect")})}),e[42]=h,e[43]=f,e[44]=g,e[45]=a,e[46]=N):N=e[46];let _;e[47]!==n||e[48]!==a?(_=n&&i.jsxs(he,{size:"sm",variant:"outline",onClick:n,children:[i.jsx(Qr,{size:14}),a("taskBoard.taskBoard.rerun")]}),e[47]=n,e[48]=a,e[49]=_):_=e[49];let $;e[50]!==N||e[51]!==_?($=i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 self-start",children:[N,_]}),e[50]=N,e[51]=_,e[52]=$):$=e[52];let R;return e[53]!==x||e[54]!==p||e[55]!==C||e[56]!==$||e[57]!==j?(R=i.jsxs(x,{variant:j,className:p,children:[C,$]}),e[53]=x,e[54]=p,e[55]=C,e[56]=$,e[57]=j,e[58]=R):R=e[58],R}const um=["taskBoard.subscriptionPaywall.trialBenefitMonitoring","taskBoard.subscriptionPaywall.trialBenefitAutoFix","taskBoard.subscriptionPaywall.trialBenefitRuns"],fm="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover";function hm(t){const e=D.c(83),{kind:s,onOpenChange:r}=t,n=Y(),{mutate:a,isPending:l}=gu("ORGANIZATION_BILLING_CHECKOUT_START","taskBoard.subscriptionPaywall.checkoutError");if(s==="trial_exhausted"){let v;e[0]!==n?(v=n("taskBoard.subscriptionPaywall.previewAlt"),e[0]=n,e[1]=v):v=e[1];let w;e[2]!==v?(w=i.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:i.jsx("img",{src:fm,alt:v,className:"h-[160px] w-full object-cover object-left-top"})}),e[2]=v,e[3]=w):w=e[3];let j;e[4]!==n?(j=n("taskBoard.subscriptionPaywall.trialTitle"),e[4]=n,e[5]=j):j=e[5];let S;e[6]!==j?(S=i.jsx(Lr,{className:"text-xl font-semibold text-foreground",children:j}),e[6]=j,e[7]=S):S=e[7];let C;e[8]!==n?(C=um.map(se=>i.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[i.jsx(er,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),i.jsx("span",{className:"leading-snug text-foreground",children:n(se)})]},se)),e[8]=n,e[9]=C):C=e[9];let N;e[10]!==C?(N=i.jsx("ul",{className:"flex flex-col gap-3",children:C}),e[10]=C,e[11]=N):N=e[11];let _;e[12]!==n?(_=n("taskBoard.subscriptionPaywall.trialPrice"),e[12]=n,e[13]=_):_=e[13];let $;e[14]!==_?($=i.jsx("span",{className:"text-2xl font-semibold text-foreground",children:_}),e[14]=_,e[15]=$):$=e[15];let R;e[16]!==n?(R=n("taskBoard.subscriptionPaywall.trialPricePeriod"),e[16]=n,e[17]=R):R=e[17];let E;e[18]!==R?(E=i.jsx("span",{className:"text-sm text-muted-foreground",children:R}),e[18]=R,e[19]=E):E=e[19];let P;e[20]!==E||e[21]!==$?(P=i.jsxs("div",{className:"flex items-baseline gap-1.5",children:[$,E]}),e[20]=E,e[21]=$,e[22]=P):P=e[22];let O;e[23]!==r?(O=()=>r(!1),e[23]=r,e[24]=O):O=e[24];let z;e[25]!==n?(z=n("taskBoard.subscriptionPaywall.notNowButton"),e[25]=n,e[26]=z):z=e[26];let F;e[27]!==l||e[28]!==O||e[29]!==z?(F=i.jsx(he,{variant:"ghost",onClick:O,disabled:l,className:"order-2 w-full sm:order-none sm:w-auto",children:z}),e[27]=l,e[28]=O,e[29]=z,e[30]=F):F=e[30];let V;e[31]!==r||e[32]!==a?(V=()=>a(void 0,{onSuccess:()=>r(!1)}),e[31]=r,e[32]=a,e[33]=V):V=e[33];let Q;e[34]!==l?(Q=l&&i.jsx(ht,{className:"size-4"}),e[34]=l,e[35]=Q):Q=e[35];let K;e[36]!==n?(K=n("taskBoard.subscriptionPaywall.subscribeButton"),e[36]=n,e[37]=K):K=e[37];let H;e[38]!==l||e[39]!==V||e[40]!==Q||e[41]!==K?(H=i.jsxs(he,{disabled:l,onClick:V,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[Q,K]}),e[38]=l,e[39]=V,e[40]=Q,e[41]=K,e[42]=H):H=e[42];let Z;e[43]!==F||e[44]!==H?(Z=i.jsxs("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[F,H]}),e[43]=F,e[44]=H,e[45]=Z):Z=e[45];let J;e[46]!==P||e[47]!==Z?(J=i.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[P,Z]}),e[46]=P,e[47]=Z,e[48]=J):J=e[48];let q;e[49]!==J||e[50]!==S||e[51]!==N?(q=i.jsxs("div",{className:"flex flex-col gap-6 px-3 pb-3 pt-7",children:[S,N,J]}),e[49]=J,e[50]=S,e[51]=N,e[52]=q):q=e[52];let W;e[53]!==w||e[54]!==q?(W=i.jsxs(Pr,{className:"gap-0 p-3 sm:max-w-[440px]",closeButtonClassName:"z-10 rounded-full bg-background/70 p-1 text-foreground backdrop-blur transition-colors hover:bg-background",children:[w,q]}),e[53]=w,e[54]=q,e[55]=W):W=e[55];let X;return e[56]!==r||e[57]!==W?(X=i.jsx(Or,{open:!0,onOpenChange:r,children:W}),e[56]=r,e[57]=W,e[58]=X):X=e[58],X}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(Lr,{children:u}),e[62]=u,e[63]=f):f=e[63];const h=c?.description;let x;e[64]!==h?(x=i.jsx(_l,{children:h}),e[64]=h,e[65]=x):x=e[65];let g;e[66]!==f||e[67]!==x?(g=i.jsxs(Bl,{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(Al,{children:i.jsx(he,{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(Pr,{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(Or,{open:d,onOpenChange:r,children:m}),e[79]=r,e[80]=m,e[81]=d,e[82]=y):y=e[82],y}const pm=new Set(["completed","failed","expired"]);function mm(t){return t.threads.some(e=>e.status!==null&&!pm.has(e.status))}function gm(t){const e=D.c(43),{items:s,pending:r,onOpenChange:n,onConfirm:a}=t,l=Y(),o=s.length;let c;e[0]!==s?(c=s.some(mm),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(Lr,{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(_l,{children:x}),e[11]=x,e[12]=g):g=e[12];let p;e[13]!==h||e[14]!==g?(p=i.jsxs(Bl,{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(he,{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(ht,{className:"size-4"}),e[24]=r,e[25]=y):y=e[25];let v;e[26]!==l?(v=l("taskBoard.rerun.confirm"),e[26]=l,e[27]=v):v=e[27];let w;e[28]!==a||e[29]!==r||e[30]!==y||e[31]!==v?(w=i.jsxs(he,{onClick:a,disabled:r,children:[y,v]}),e[28]=a,e[29]=r,e[30]=y,e[31]=v,e[32]=w):w=e[32];let j;e[33]!==m||e[34]!==w?(j=i.jsxs(Al,{children:[m,w]}),e[33]=m,e[34]=w,e[35]=j):j=e[35];let S;e[36]!==j||e[37]!==p?(S=i.jsxs(Pr,{className:"max-w-md",children:[p,j]}),e[36]=j,e[37]=p,e[38]=S):S=e[38];let C;return e[39]!==n||e[40]!==S||e[41]!==u?(C=i.jsx(Or,{open:u,onOpenChange:n,children:S}),e[39]=n,e[40]=S,e[41]=u,e[42]=C):C=e[42],C}const rl=380,xm=90,al=5,km="cubic-bezier(0.22, 0.61, 0.36, 1)";function bm(t,e,s,r=!0){const n=L.useRef(new Map),a=L.useRef(new Map),l=L.useRef(!1);L.useLayoutEffect(()=>{const o=t.current;if(!o)return;if(!r){l.current=!0;return}const c=l.current;l.current=!1;const d=o.querySelectorAll("[data-flip-id]"),u=new Map,f=n.current;n.current=u;const h=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,x=[];for(const v of d){const w=v.dataset.flipId;if(!w)continue;const j=v.getBoundingClientRect(),S=v.dataset.flipLane;if(u.set(w,{rect:j,lane:S}),!s||c)continue;const C=f.get(w);if(!C)continue;const N=C.rect.left-j.left,_=C.rect.top-j.top;(N||_)&&x.push({el:v,dx:N,dy:_,lane:C.lane!==S})}if(!s||h||x.length===0)return;const g=a.current,p=v=>{v instanceof HTMLElement&&(g.set(v,(g.get(v)??0)+1),v.style.overflow="visible")},k=v=>{if(!(v instanceof HTMLElement))return;const w=(g.get(v)??1)-1;if(w>0){g.set(v,w);return}g.delete(v),v.style.overflow=""};for(const v of x){const w=v.lane?` rotate(${v.dx>0?al:-al}deg)`:"";v.el.style.transition="none",v.el.style.transform=`translate(${v.dx}px, ${v.dy}px)${w}`,v.lane&&(v.el.style.zIndex="10",p(v.el.closest("[data-lane-scroll]")))}let b=0;const m=[],y=requestAnimationFrame(()=>{for(const v of x){const w=v.lane?b++*xm:0;v.el.style.transition=`transform ${rl}ms ${km} ${w}ms`,v.el.style.transform="",m.push(window.setTimeout(()=>{v.el.style.transition="",v.el.style.transform="",v.el.style.zIndex="",v.lane&&k(v.el.closest("[data-lane-scroll]"))},rl+w+30))}});return()=>{cancelAnimationFrame(y);for(const v of m)clearTimeout(v);for(const v of x)v.el.style.transition="",v.el.style.transform="",v.el.style.zIndex="",v.lane&&k(v.el.closest("[data-lane-scroll]"))}},[e,t,s,r])}function ym(t,e=[]){const s=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
85
85
 
86
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
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
88
  `))}return s.join(`
89
89
 
90
- `)}const km=["overdue","today","week","none"],Gn=t=>typeof t=="string"&&t!==""?t:null;function bm(t){const e=Gn(t.priority),s=Gn(t.due),r=Gn(t.tags);return{layout:t.view==="list"?"list":"board",filters:{search:Gn(t.q)??"",assignee:Gn(t.assignee),priority:Xr.includes(e)?e:null,due:km.includes(s)?s:null,tags:r?r.split(",").filter(Boolean):[],project:Gn(t.repo)}}}function ym(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 wm(t,e){const s=new Set(e.map(r=>r.id));return new Set([...t].filter(r=>s.has(r)))}function vm(){const t=R.c(16);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Lo(e),r=Pa();let n;t[1]!==s?(n=bm(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,...ym(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}Po(()=>import("./route-VxozlsXO.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,191,192])).catch(()=>{});const jm=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function So(t){const e=new Date(t),s=e.getTime()<Date.now();return{label:jm.format(e),overdue:s}}const Vt="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",pr=12,mr="size-3.5",_a=2;function Sm(){const t=R.c(9),e=Y();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=M(Vt,"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:pr}),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 Tm(){const t=R.c(9),e=Y();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=M(Vt,"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:pr}),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 Cm(t){const e=R.c(20),{priority:s,onChange:r}=t,n=Y(),a=Ze[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(mr,"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=Ze[g].icon;return i.jsxs(ve,{onSelect:()=>r(g),className:M("gap-2",g===s&&"bg-accent"),children:[i.jsx(p,{size:pr,className:M("shrink-0",Ze[g].iconClassName)}),n(Ze[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(To,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function To(t){const e=R.c(8),{label:s,glyph:r,children:n}=t;let a;e[0]!==r||e[1]!==s?(a=i.jsx(Ge,{asChild:!0,children:i.jsx(he,{variant:"ghost",size:"icon-sm",title:s,"aria-label":s,onClick:Bm,onPointerDown:_m,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(Ve,{align:"start",className:"w-36",onClick:Nm,children:n}),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=i.jsxs(Qe,{children:[a,l]}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function Nm(t){return t.stopPropagation()}function _m(t){return t.stopPropagation()}function Bm(t){return t.stopPropagation()}function sa(t){const e=R.c(7),{label:s,children:r}=t;let n;e[0]!==r?(n=i.jsx(yc,{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(wc,{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(vc,{children:[n,a]}),e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function Am(t){const e=R.c(20),{type:s,onChange:r}=t,n=Y(),a=Et[s];let l;e[0]!==a.labelKey||e[1]!==n?(l=n(a.labelKey),e[0]=a.labelKey,e[1]=n,e[2]=l):l=e[2];const o=l,c=a.icon;let d;e[3]!==a.iconClassName?(d=M(mr,"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=vl.map(g=>{const p=Et[g].icon;return i.jsxs(ve,{onSelect:()=>r(g),className:M("gap-2",g===s&&"bg-accent"),children:[i.jsx(p,{size:pr,className:M("shrink-0",Et[g].iconClassName)}),n(Et[g].labelKey)]},g)}),e[12]=r,e[13]=n,e[14]=s,e[15]=h):h=e[15];let x;return e[16]!==f||e[17]!==o||e[18]!==h?(x=i.jsx(To,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function Dm(t){const e=R.c(46),{iso:s,onChange:r}=t;let n;e[0]!==s?(n=Uc(s),e[0]=s,e[1]=n):n=e[1];const a=n;let l;e[2]!==s?(l=So(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:mr}),e[4]=c):c=e[4];let d;e[5]!==o?(d=i.jsxs(i.Fragment,{children:[c,o]}),e[5]=o,e[6]=d):d=e[6];const u=d;let f,h,x,g,p,k,b,m,y,v;if(e[7]!==u||e[8]!==r||e[9]!==a){p=Symbol.for("react.early_return_sentinel");e:{const D=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",D),children:u});break e}x=Qe,h=Ge,g=!0,f=he,k="ghost",b="sm",m=Em,y=$m,v=M("-mx-1.5 h-auto px-1.5 py-1 font-medium",D)}e[7]=u,e[8]=r,e[9]=a,e[10]=f,e[11]=h,e[12]=x,e[13]=g,e[14]=p,e[15]=k,e[16]=b,e[17]=m,e[18]=y,e[19]=v}else f=e[10],h=e[11],x=e[12],g=e[13],p=e[14],k=e[15],b=e[16],m=e[17],y=e[18],v=e[19];if(p!==Symbol.for("react.early_return_sentinel"))return p;let w;e[20]!==f||e[21]!==u||e[22]!==k||e[23]!==b||e[24]!==m||e[25]!==y||e[26]!==v?(w=i.jsx(f,{variant:k,size:b,onClick:m,onPointerDown:y,className:v,children:u}),e[20]=f,e[21]=u,e[22]=k,e[23]=b,e[24]=m,e[25]=y,e[26]=v,e[27]=w):w=e[27];let j;e[28]!==h||e[29]!==g||e[30]!==w?(j=i.jsx(h,{asChild:g,children:w}),e[28]=h,e[29]=g,e[30]=w,e[31]=j):j=e[31];let S;e[32]!==s?(S=new Date(s),e[32]=s,e[33]=S):S=e[33];let C;e[34]!==s?(C=new Date(s),e[34]=s,e[35]=C):C=e[35];let N;e[36]!==r?(N=D=>D&&r(gi(D)),e[36]=r,e[37]=N):N=e[37];let _;e[38]!==S||e[39]!==C||e[40]!==N?(_=i.jsx(Ve,{align:"start",className:"w-auto p-0",onClick:Rm,children:i.jsx(Va,{mode:"single",selected:S,defaultMonth:C,onSelect:N,initialFocus:!0})}),e[38]=S,e[39]=C,e[40]=N,e[41]=_):_=e[41];let $;return e[42]!==x||e[43]!==j||e[44]!==_?($=i.jsxs(x,{children:[j,_]}),e[42]=x,e[43]=j,e[44]=_,e[45]=$):$=e[45],$}function Rm(t){return t.stopPropagation()}function $m(t){return t.stopPropagation()}function Em(t){return t.stopPropagation()}function Mm(t){const e=R.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:mr}),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(he,{variant:"outline",size:"sm",onClick:r,onPointerDown:zm,ref:Im,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 Im(t){return t?.parentElement?.style.setProperty("--fade-text-end",`${t.offsetWidth}px`)}function zm(t){return t.stopPropagation()}function Lm(t){const e=R.c(36),{item:s,checks:r,assignee:n,assignedBy:a,members:l,onAssign:o,onPriorityChange:c,onTypeChange:d,onDueDateChange:u}=t,{org:f}=Ye();let h;e[0]!==s.keySeq||e[1]!==f.slug?(h=kl(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(Am,{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(Dm,{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(Cm,{priority:s.priority,onChange:c}),e[17]=s.priority,e[18]=c,e[19]=y):y=e[19];let v;e[20]!==r||e[21]!==s.reviewVerdicts?(v=r&&i.jsx(Fm,{summary:r.summary,verdicts:s.reviewVerdicts,enabled:r.enabled}),e[20]=r,e[21]=s.reviewVerdicts,e[22]=v):v=e[22];let w;e[23]!==a||e[24]!==n||e[25]!==s||e[26]!==l||e[27]!==o?(w=i.jsx(No,{item:s,assignee:n,assignedBy:a,members:l,onAssign:o,showDelegation:!1}),e[23]=a,e[24]=n,e[25]=s,e[26]=l,e[27]=o,e[28]=w):w=e[28];let j;e[29]!==y||e[30]!==v||e[31]!==w?(j=i.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[y,v,w]}),e[29]=y,e[30]=v,e[31]=w,e[32]=j):j=e[32];let S;return e[33]!==j||e[34]!==m?(S=i.jsxs("div",{className:"mt-auto flex shrink-0 items-center justify-between gap-2 pt-1",children:[m,j]}),e[33]=j,e[34]=m,e[35]=S):S=e[35],S}function Pm(t){const e=R.c(10),{priority:s}=t,r=Y(),n=Ze[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:Vt,title:l,children:[c,l]}),e[7]=l,e[8]=c,e[9]=d):d=e[9],d}function Om(t){const e=R.c(7),{iso:s}=t;let r,n;if(e[0]!==s){const{label:o,overdue:c}=So(s);r=o,n=M(Vt,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:pr}),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 Co(t){const e=R.c(8),{tag:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=M(Vt,"text-foreground"),e[0]=r):r=e[0];let n;e[1]!==s.color?(n=fr(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 Fm(t){const e=R.c(26),{summary:s,verdicts:r,enabled:n}=t,a=Y();let l;if(e[0]!==n||e[1]!==a||e[2]!==r){let y;e[4]!==a||e[5]!==r?(y=v=>{const w=r.find(C=>C.reviewer===v),j=a("taskBoard.taskDialog.reviewerLabel"),S=w?w.verdict==="changes_requested"?a("taskBoard.taskBoard.checksChangesRequested"):a(w.verified?"taskBoard.taskBoard.checksApproved":"taskBoard.taskBoard.checksUnverified"):a("taskBoard.taskBoard.checksPending");return i.jsxs("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[i.jsx(ni,{size:12}),j," — ",S]},v)},e[4]=a,e[5]=r,e[6]=y):y=e[6],l=n.map(y),e[0]=n,e[1]=a,e[2]=r,e[3]=l}else l=e[3];let o;e[7]!==l?(o=i.jsx("span",{className:"flex flex-col gap-0.5",children:l}),e[7]=l,e[8]=o):o=e[8];const c=o,d=s.tone==="ok"&&"text-success",u=s.tone==="pending"&&"text-warning",f=s.tone==="danger"&&"text-destructive";let h;e[9]!==d||e[10]!==u||e[11]!==f?(h=M("flex shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums",d,u,f),e[9]=d,e[10]=u,e[11]=f,e[12]=h):h=e[12];const x=String(s.passed),g=String(s.total);let p;e[13]!==a||e[14]!==x||e[15]!==g?(p=a("taskBoard.taskBoard.checksLabel",{passed:x,total:g}),e[13]=a,e[14]=x,e[15]=g,e[16]=p):p=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=i.jsx(er,{className:mr}),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 Hm(t){const e=R.c(14),{state:s}=t,r=Y(),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(vt,{className:"size-3.5 text-primary",label:o}):i.jsx(Fo,{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 qm(t){const e=R.c(3),s=go(Tl());if(t.reviewVerdicts.length===0&&t.status!=="in_review"&&!t.reviewCycleStartedAt)return null;const r=sp(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 No(t){const e=R.c(35),{item:s,assignee:r,assignedBy:n,members:a,onAssign:l,showDelegation:o}=t,c=o===void 0?!0:o,d=Y(),[u,f]=L.useState(!1);if(s.assigneeId===Ae){let v;e[0]!==n||e[1]!==d?(v=n?.user?.name?d("taskBoard.taskBoard.assignedToSuperAgentBy",{name:n.user.name}):d("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=n,e[1]=d,e[2]=v):v=e[2];const w=v;if(!c){let N;return e[3]!==n||e[4]!==w?(N=n?i.jsx(qe,{url:n.user?.image??void 0,fallback:He(n.user?.name),shape:"circle",size:"xs",title:w}):null,e[3]=n,e[4]=w,e[5]=N):N=e[5],N}let j;e[6]!==n?(j=n&&i.jsx(qe,{url:n.user?.image??void 0,fallback:He(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(yt,{size:20,className:"ring-2 ring-background"}),e[8]=S):S=e[8];let C;return e[9]!==j||e[10]!==w?(C=i.jsxs("span",{className:"inline-flex items-center",title:w,children:[j,S]}),e[9]=j,e[10]=w,e[11]=C):C=e[11],C}if(r){const v=r.user?.image??void 0,w=r.user?.name;let j;e[12]!==w?(j=He(w),e[12]=w,e[13]=j):j=e[13];let S;return e[14]!==v||e[15]!==j?(S=i.jsx(qe,{url:v,fallback:j,shape:"circle",size:"xs"}),e[14]=v,e[15]=j,e[16]=S):S=e[16],S}if(!l||!a?.length)return null;let h;e[17]!==d?(h=d("taskBoard.taskBoard.assignButton"),e[17]=d,e[18]=h):h=e[18];let x;e[19]!==d?(x=d("taskBoard.taskBoard.assignButton"),e[19]=d,e[20]=x):x=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{v.stopPropagation(),f(!0)},e[21]=g):g=e[21];let p;e[22]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(pl,{size:13}),e[22]=p):p=e[22];let k;e[23]!==h||e[24]!==x?(k=i.jsx(ar,{asChild:!0,children:i.jsx("button",{type:"button",title:h,"aria-label":x,onClick:g,className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 transition-colors hover:border-muted-foreground hover:text-muted-foreground",children:p})}),e[23]=h,e[24]=x,e[25]=k):k=e[25];let b;e[26]!==l?(b=v=>{l(v),f(!1)},e[26]=l,e[27]=b):b=e[27];let m;e[28]!==a||e[29]!==b?(m=i.jsx(Er,{className:"w-56 p-0",align:"end",side:"bottom",onClick:Um,children:i.jsx(mi,{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(Mr,{open:u,onOpenChange:f,children:[k,m]}),e[31]=u,e[32]=k,e[33]=m,e[34]=y):y=e[34],y}function Um(t){return t.stopPropagation()}function Ng(){const t=R.c(107),e=Y(),{items:s,isLoading:r}=Bc(),{data:n}=Wa();let a;t[0]!==n?(a=n===void 0?[]:n,t[0]=n,t[1]=a):a=t[1];const l=a,o=Ac(),c=Ol();let d,u;if(t[2]!==c.data){const T=(c.data??[]).filter(r1);d=T.length>0,u=T.map(n1),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=T=>T===Ae&&!d?(x(!0),!0):!1,t[5]=d,t[6]=g):g=t[6];const p=g,[k,b]=L.useState(null),m=T=>{const I=mu(T);if(I){b(I),ki("task_limit_banner_shown",{organization_id:me.id,kind:I});return}We.error(T.message||e("taskBoard.taskBoard.actionError"))},y=T=>{!T||T.dataset.tracked==="true"||(T.dataset.tracked="true",ki("task_board_opened",{organization_id:me.id}))};let v;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=[],t[7]=v):v=t[7];const[w,j]=L.useState(v),S=()=>{if(w.length!==0){if(p(Ae)){j([]);return}for(const T of w)o.rerun.mutate({id:T.id},{onError:I=>m(I)});j([]),ee()}},{data:C}=Ua();let N,_;t[8]!==C?.data?.members?(N=C?.data?.members??[],_=new Map(N.map(s1)),t[8]=C?.data?.members,t[9]=N,t[10]=_):(N=t[9],_=t[10]);const $=_,{filters:D,setFilters:E,layout:P,setLayout:O}=vm(),z=xo(s,f);let F;t[11]!==z?(F=gl(z),t[11]=z,t[12]=F):F=t[12];const V=F;let Q;t[13]!==D.project||t[14]!==z?(Q=D.project?xl(D.project,z)?.repo??null:null,t[13]=D.project,t[14]=z,t[15]=Q):Q=t[15];const K=Q,[H]=ul();let Z;t[16]===Symbol.for("react.memo_cache_sentinel")?(Z=new Set,t[16]=Z):Z=t[16];const[J,q]=L.useState(Z);let W;t[17]===Symbol.for("react.memo_cache_sentinel")?(W=T=>q(I=>{const ue=new Set(I);return ue.has(T)?ue.delete(T):ue.add(T),ue}),t[17]=W):W=t[17];const X=W,se=T=>q(I=>{const ue=new Set(I);for(const Ee of Ie)Ee.status===T&&ue.add(Ee.id);return ue}),ee=()=>q(new Set),le=T=>{E(T),ee()},[pe,Ce]=L.useState(!1),[_e,xe]=L.useState(null),{setTaskId:fe}=xu(),{create:be}=tu(),je=Mt(),{org:Ne,locator:De}=Ye(),me=Ne,G=Pa(),oe=()=>{G({to:"/$org/settings/task-board",params:{org:me.slug}})};let ae;t[18]===Symbol.for("react.memo_cache_sentinel")?(ae={strict:!1},t[18]=ae):ae=t[18];const{taskKey:Se}=Vr(ae),B=Dc(s,Se)??null,ne=!!Se&&!B&&!r,te=B?wi(me.slug,B):null;let de;t[19]!==G||t[20]!==Se?(de=()=>{Se&&G({to:".",params:t1,search:e1,replace:!0})},t[19]=G,t[20]=Se,t[21]=de):de=t[21];const ce=de,ke=async T=>{const I=crypto.randomUUID(),ue=Oo(me.id).id,Ee=await je.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:T.id}).then(Jm).catch(Xm),Pe=xm(T,Ee),dt={type:"doc",content:[{type:"paragraph",content:[_d({id:T.id,name:T.title,char:"@",kind:"task",metadata:{title:T.title,description:T.description,context:Pe}}),{type:"text",text:" "}]}]};gu(sessionStorage,De,I,dt);try{await be({id:I,virtual_mcp_id:ue}),await o.link.mutateAsync({id:T.id,linkThreadId:I})}catch{}fe(I,ue)};let Me;t[22]!==D||t[23]!==z?(Me=T=>Fc(T,D,z),t[22]=D,t[23]=z,t[24]=Me):Me=t[24];const Ie=s.filter(Me),ye=wm(J,Ie);let It;t[25]!==H?(It=T=>!Hc.includes(T.status)||H.shownTaskBoardLanes.includes(T.status),t[25]=H,t[26]=It):It=t[26];const Xe=Ie.filter(It);let Ue;t[27]!==D||t[28]!==z||t[29]!==E?(Ue=T=>{const I=qc({repo:T},D.project,z);I!==D.project&&E({...D,project:I})},t[27]=D,t[28]=z,t[29]=E,t[30]=Ue):Ue=t[30];const Be=Ue;let jt;t[31]===Symbol.for("react.memo_cache_sentinel")?(jt=()=>{xe(null),Ce(!0)},t[31]=jt):jt=t[31];const gr=jt;let St;t[32]===Symbol.for("react.memo_cache_sentinel")?(St=T=>{xe(T),Ce(!0)},t[32]=St):St=t[32];const xr=St,Qt=T=>{G({to:".",params:I=>({...I,taskKey:wi(me.slug,T)}),search:Ym})};let zt;t[33]===Symbol.for("react.memo_cache_sentinel")?(zt=()=>{Ce(!1),xe(null)},t[33]=zt):zt=t[33];const Je=zt;if(r&&s.length===0){let T;return t[34]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx(vt,{className:"size-5 text-muted-foreground"})}),t[34]=T):T=t[34],T}if(ne){let T;return t[35]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx(xi,{to:".",params:Zm,search:Qm,replace:!0}),t[35]=T):T=t[35],T}if(te&&te!==Se)return i.jsx(xi,{to:".",params:T=>({...T,taskKey:te}),search:Vm,replace:!0});let et;t[36]!==e?(et=e("taskBoard.taskBoard.tasksTitle"),t[36]=e,t[37]=et):et=t[37];let ht;t[38]!==et?(ht=i.jsx("h1",{className:"text-xl font-medium text-foreground",children:et}),t[38]=et,t[39]=ht):ht=t[39];let Tt;t[40]===Symbol.for("react.memo_cache_sentinel")?(Tt=i.jsx(Tu,{}),t[40]=Tt):Tt=t[40];let ot;t[41]===Symbol.for("react.memo_cache_sentinel")?(ot=i.jsx(Cu,{}),t[41]=ot):ot=t[41];let Fe;t[42]!==e?(Fe=e("common.taskBoard.listView"),t[42]=e,t[43]=Fe):Fe=t[43];const Zt=P==="board";let tt;t[44]!==O?(tt=()=>O("board"),t[44]=O,t[45]=tt):tt=t[45];let ze;t[46]!==e?(ze=e("common.taskBoard.boardView"),t[46]=e,t[47]=ze):ze=t[47];let pt;t[48]!==Zt||t[49]!==tt||t[50]!==ze?(pt=i.jsx(al,{active:Zt,onClick:tt,icon:bc,label:ze}),t[48]=Zt,t[49]=tt,t[50]=ze,t[51]=pt):pt=t[51];let U;t[52]===Symbol.for("react.memo_cache_sentinel")?(U=i.jsx(lr,{size:16}),t[52]=U):U=t[52];let st;t[53]!==e?(st=e("taskBoard.taskBoard.newTask"),t[53]=e,t[54]=st):st=t[54];let Le;t[55]!==st?(Le=i.jsxs(he,{size:"sm",onClick:gr,children:[U,st]}),t[55]=st,t[56]=Le):Le=t[56];const Yt=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:[ht,Tt,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(Rc,{filters:D,members:N,tags:l,index:z,onChange:le,onOpenBoardSettings:oe})}),i.jsx("div",{className:"hidden sm:block",children:i.jsx($c,{filters:D,members:N,tags:l,index:z,onChange:le,onOpenBoardSettings:oe})})]}),i.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[ot,i.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[i.jsx(al,{active:P==="list",onClick:()=>{O("list"),ee()},icon:ml,label:Fe}),pt]}),Le]})]})]}),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")})}):Ie.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(he,{variant:"outline",size:"sm",onClick:()=>le(zc),children:e("taskBoard.taskBoard.clearFilters")})]})}):P==="board"?i.jsx(i1,{visible:!B,items:Ie,members:N,memberByUserId:$,selectedIds:ye,onToggleSelect:X,onSelectAllInLane:se,onOpen:Qt,onCreate:xr,onMove:(T,I,ue)=>{const Ee=Sl(ue,T.length);T.forEach((Pe,dt)=>o.update.mutate({id:Pe,status:I,sortOrder:Ee[dt]}))},onAssign:(T,I)=>{p(I)||o.update.mutate({id:T,assigneeId:I},{onError:m})},onPriorityChange:(T,I)=>o.update.mutate({id:T,priority:I}),onTypeChange:(T,I)=>o.update.mutate({id:T,type:I}),onDueDateChange:(T,I)=>o.update.mutate({id:T,dueDate:I}),onAutoFix:T=>{p(Ae)||o.update.mutate({id:T.id,assigneeId:Ae},{onError:m})},onRerun:T=>j([T])}):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:Xe.map(T=>i.jsx(x1,{item:T,assignee:T.assigneeId?$.get(T.assigneeId):void 0,assignedBy:T.assignedBy?$.get(T.assignedBy):void 0,onOpen:()=>Qt(T)},T.id))})})]});let Lt;t[57]!==o.create||t[58]!==o.remove||t[59]!==o.update||t[60]!==p||t[61]!==ce||t[62]!==m||t[63]!==B||t[64]!==j||t[65]!==fe||t[66]!==ke||t[67]!==e||t[68]!==Be?(Lt=B&&i.jsx(Lp,{item:B,onClose:()=>ce(),isSaving:o.update.isPending,onSubmit:T=>{if(p(T.assigneeId)){ce();return}const{title:I,description:ue,priority:Ee,...Pe}=T,dt=Ra(B)?{}:{title:I,description:ue,priority:Ee};o.update.mutate({id:B.id,...Pe,...dt},{onError:m})},onDelete:()=>{o.remove.mutate(B.id),ce()},onClone:()=>{o.create.mutate({title:e("taskBoard.taskDialog.cloneTitle",{title:B.title}),description:B.description,status:B.status,priority:B.priority,repo:B.repo,dueDate:B.dueDate,tagIds:B.tags.map(Gm)}),Be(B.repo??null),We.success(e("taskBoard.taskDialog.cloneSuccess")),ce()},onArchive:()=>{o.update.mutate({id:B.id,status:"archived"}),We.success(e("taskBoard.taskDialog.archiveSuccess")),ce()},onNewChat:()=>{ke(B)},onAutoFix:()=>{p(Ae)||(o.update.mutate({id:B.id,assigneeId:Ae},{onError:m}),ce())},onRerun:()=>{ce(),j([B])},onOpenPreview:T=>{T.virtualMcpId&&fe(T.threadId,T.virtualMcpId,{panel:"site-editor"})}},B.id),t[57]=o.create,t[58]=o.remove,t[59]=o.update,t[60]=p,t[61]=ce,t[62]=m,t[63]=B,t[64]=j,t[65]=fe,t[66]=ke,t[67]=e,t[68]=Be,t[69]=Lt):Lt=t[69];const Ct=pe?`new-${_e??"default"}`:"closed",$e=_e??void 0;let nt;t[70]!==o.create||t[71]!==p||t[72]!==Je||t[73]!==Be?(nt=T=>{if(p(T.assigneeId)){Je();return}o.create.mutate(T),Be(T.repo??null),Je()},t[70]=o.create,t[71]=p,t[72]=Je,t[73]=Be,t[74]=nt):nt=t[74];let Nt;t[75]!==o.create.isPending||t[76]!==K||t[77]!==Je||t[78]!==pe||t[79]!==Ct||t[80]!==$e||t[81]!==nt?(Nt=i.jsx(zp,{open:pe,onClose:Je,defaultStatus:$e,defaultRepo:K,isSaving:o.create.isPending,onSubmit:nt},Ct),t[75]=o.create.isPending,t[76]=K,t[77]=Je,t[78]=pe,t[79]=Ct,t[80]=$e,t[81]=nt,t[82]=Nt):Nt=t[82];let mt;t[83]!==h?(mt=i.jsx(Kc,{mode:"link",open:h,onOpenChange:x}),t[83]=h,t[84]=mt):mt=t[84];let _t;t[85]===Symbol.for("react.memo_cache_sentinel")?(_t=T=>!T&&b(null),t[85]=_t):_t=t[85];let gt;t[86]!==k?(gt=i.jsx(dm,{kind:k,onOpenChange:_t}),t[86]=k,t[87]=gt):gt=t[87];let ct;t[88]!==j?(ct=T=>!T&&j([]),t[88]=j,t[89]=ct):ct=t[89];let xt;t[90]!==o.rerun.isPending||t[91]!==S||t[92]!==w||t[93]!==ct?(xt=i.jsx(hm,{items:w,pending:o.rerun.isPending,onOpenChange:ct,onConfirm:S}),t[90]=o.rerun.isPending,t[91]=S,t[92]=w,t[93]=ct,t[94]=xt):xt=t[94];let Bt;return t[95]!==o.removeMany||t[96]!==o.update||t[97]!==p||t[98]!==ee||t[99]!==s||t[100]!==N||t[101]!==m||t[102]!==B||t[103]!==V||t[104]!==ye||t[105]!==j?(Bt=ye.size>0&&!B&&i.jsx(a1,{count:ye.size,members:N,projectEntries:V,onSetRepo:T=>{for(const I of ye)o.update.mutate({id:I,repo:T});ee()},onMoveTo:T=>{for(const I of ye)o.update.mutate({id:I,status:T});ee()},onSetPriority:T=>{for(const I of ye)o.update.mutate({id:I,priority:T});ee()},onAddTag:T=>{for(const I of ye){const ue=s.find(Pe=>Pe.id===I);if(!ue)continue;const Ee=ue.tags.map(Wm);Ee.includes(T)||o.update.mutate({id:I,tagIds:[...Ee,T]})}ee()},onAssign:T=>{if(!p(T)){for(const I of ye)o.update.mutate({id:I,assigneeId:T},{onError:m});ee()}},onSetDueDate:T=>{const I=gi(T);for(const ue of ye)o.update.mutate({id:ue,dueDate:I});ee()},onAutoFix:ye.size>0&&Array.from(ye).every(T=>{const I=s.find(ue=>ue.id===T);return I&&(I.status==="triage"||I.status==="todo")&&I.assigneeId!==Ae})?()=>{if(!p(Ae)){for(const T of ye)o.update.mutate({id:T,assigneeId:Ae},{onError:m});ee()}}:void 0,onRerun:(()=>{const T=Array.from(ye).flatMap(I=>{const ue=s.find(Ee=>Ee.id===I);return ue?[ue]:[]});return T.length===ye.size&&T.every(Km)?()=>j(T):void 0})(),onDelete:()=>{o.removeMany.mutate(Array.from(ye)),ee()},onClear:ee}),t[95]=o.removeMany,t[96]=o.update,t[97]=p,t[98]=ee,t[99]=s,t[100]=N,t[101]=m,t[102]=B,t[103]=V,t[104]=ye,t[105]=j,t[106]=Bt):Bt=t[106],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",B&&"hidden"),children:Yt}),Lt,Nt,mt,gt,xt,Bt]})}function Km(t){return t.assigneeId===Ae&&t.status!=="done"}function Wm(t){return t.id}function Gm(t){return t.id}function Vm(t){return t}function Qm(t){return t}function Zm(t){return{...t,taskKey:void 0}}function Ym(t){return t}function Xm(){return[]}function Jm(t){return t.prs}function e1(t){return t}function t1(t){return{...t,taskKey:void 0}}function s1(t){return[t.userId,t]}function n1(t){return t.path}function r1(t){return t.usable}function a1(t){const e=R.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=Y(),{data:k}=Wa();let b;e[0]!==k?(b=k===void 0?[]:k,e[0]=k,e[1]=b):b=e[1];const m=b,y=Ga("delivery_lanes_enabled");let v;e[2]!==s||e[3]!==p?(v=p("taskBoard.taskBoard.selectedCount",{count:s}),e[2]=s,e[3]=p,e[4]=v):v=e[4];let w;e[5]!==v?(w=i.jsx("span",{className:"pl-1 text-sm font-medium text-foreground",children:v}),e[5]=v,e[6]=w):w=e[6];let j;e[7]!==p?(j=p("taskBoard.taskBoard.actionsButton"),e[7]=p,e[8]=j):j=e[8];let S;e[9]!==j?(S=i.jsx(Ge,{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 C;e[11]!==p?(C=p("taskBoard.taskBoard.moveToButton"),e[11]=p,e[12]=C):C=e[12];let N;e[13]!==C?(N=i.jsx(Un,{children:C}),e[13]=C,e[14]=N):N=e[14];let _;if(e[15]!==y||e[16]!==l||e[17]!==p){let G;e[19]!==l||e[20]!==p?(G=oe=>i.jsx(ve,{onClick:()=>l(oe),children:or(oe,p).label},oe),e[19]=l,e[20]=p,e[21]=G):G=e[21],_=wl(y).map(G),e[15]=y,e[16]=l,e[17]=p,e[18]=_}else _=e[18];let $;e[22]!==_?($=i.jsx(Kn,{children:_}),e[22]=_,e[23]=$):$=e[23];let D;e[24]!==$||e[25]!==N?(D=i.jsxs(qn,{children:[N,$]}),e[24]=$,e[25]=N,e[26]=D):D=e[26];let E;e[27]!==p?(E=p("taskBoard.taskBoard.changePriorityButton"),e[27]=p,e[28]=E):E=e[28];let P;e[29]!==E?(P=i.jsx(Un,{children:E}),e[29]=E,e[30]=P):P=e[30];let O;e[31]!==o||e[32]!==p?(O=Xr.map(G=>i.jsxs(ve,{onClick:()=>o(G),children:[i.jsx("span",{className:M("size-2 rounded-full",Ze[G].dotClassName)}),p(Ze[G].labelKey)]},G)),e[31]=o,e[32]=p,e[33]=O):O=e[33];let z;e[34]!==O?(z=i.jsx(Kn,{children:O}),e[34]=O,e[35]=z):z=e[35];let F;e[36]!==P||e[37]!==z?(F=i.jsxs(qn,{children:[P,z]}),e[36]=P,e[37]=z,e[38]=F):F=e[38];let V;e[39]!==p?(V=p("taskBoard.taskBoard.assignButton"),e[39]=p,e[40]=V):V=e[40];let Q;e[41]!==V?(Q=i.jsx(Un,{children:V}),e[41]=V,e[42]=Q):Q=e[42];let K;e[43]!==r||e[44]!==d?(K=i.jsx(Kn,{className:"w-56 p-0",children:i.jsx(mi,{members:r,onSelect:d})}),e[43]=r,e[44]=d,e[45]=K):K=e[45];let H;e[46]!==Q||e[47]!==K?(H=i.jsxs(qn,{children:[Q,K]}),e[46]=Q,e[47]=K,e[48]=H):H=e[48];let Z;e[49]!==a||e[50]!==n||e[51]!==p?(Z=n.length>0&&i.jsxs(qn,{children:[i.jsx(Un,{children:p("taskBoard.taskBoard.assignProjectButton")}),i.jsxs(Kn,{className:"w-64",children:[i.jsx(ve,{onClick:()=>a(null),children:p("taskBoard.taskDialog.noProject")}),n.map(G=>i.jsx(ve,{className:"gap-2",onClick:()=>a(G.repo),children:i.jsx(jl,{entry:G})},G.id))]})]}),e[49]=a,e[50]=n,e[51]=p,e[52]=Z):Z=e[52];let J;e[53]!==p?(J=p("taskBoard.taskBoard.dueDateButton"),e[53]=p,e[54]=J):J=e[54];let q;e[55]!==J?(q=i.jsx(Un,{children:J}),e[55]=J,e[56]=q):q=e[56];let W;e[57]!==u?(W=i.jsx(Kn,{className:"w-auto p-0",children:i.jsx(Va,{mode:"single",onSelect:G=>G&&u(G),initialFocus:!0})}),e[57]=u,e[58]=W):W=e[58];let X;e[59]!==q||e[60]!==W?(X=i.jsxs(qn,{children:[q,W]}),e[59]=q,e[60]=W,e[61]=X):X=e[61];let se;e[62]!==c||e[63]!==m||e[64]!==p?(se=m.length>0&&i.jsxs(qn,{children:[i.jsx(Un,{children:p("taskBoard.taskBoard.addTagButton")}),i.jsx(Kn,{children:m.map(G=>i.jsxs(ve,{onClick:()=>c(G.id),children:[i.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:fr(G.color)}}),G.name]},G.id))})]}),e[62]=c,e[63]=m,e[64]=p,e[65]=se):se=e[65];let ee;e[66]===Symbol.for("react.memo_cache_sentinel")?(ee=i.jsx(qa,{}),e[66]=ee):ee=e[66];let le;e[67]!==p?(le=p("taskBoard.taskBoard.deleteSelectedButton"),e[67]=p,e[68]=le):le=e[68];let pe;e[69]!==x||e[70]!==le?(pe=i.jsx(ve,{variant:"destructive",onClick:x,children:le}),e[69]=x,e[70]=le,e[71]=pe):pe=e[71];let Ce;e[72]!==D||e[73]!==F||e[74]!==H||e[75]!==Z||e[76]!==X||e[77]!==se||e[78]!==pe?(Ce=i.jsxs(Ve,{align:"center",side:"top",children:[D,F,H,Z,X,se,ee,pe]}),e[72]=D,e[73]=F,e[74]=H,e[75]=Z,e[76]=X,e[77]=se,e[78]=pe,e[79]=Ce):Ce=e[79];let _e;e[80]!==Ce||e[81]!==S?(_e=i.jsxs(Qe,{children:[S,Ce]}),e[80]=Ce,e[81]=S,e[82]=_e):_e=e[82];let xe;e[83]!==f||e[84]!==p?(xe=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(zr,{size:14}),p("taskBoard.taskBoard.autoFix")]}),e[83]=f,e[84]=p,e[85]=xe):xe=e[85];let fe;e[86]!==h||e[87]!==p?(fe=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]=fe):fe=e[88];let be;e[89]!==p?(be=p("taskBoard.taskBoard.clearSelectionButton"),e[89]=p,e[90]=be):be=e[90];let je;e[91]!==p?(je=p("taskBoard.taskBoard.clearSelectionButton"),e[91]=p,e[92]=je):je=e[92];let Ne;e[93]===Symbol.for("react.memo_cache_sentinel")?(Ne=i.jsx(Xn,{size:16}),e[93]=Ne):Ne=e[93];let De;e[94]!==g||e[95]!==be||e[96]!==je?(De=i.jsx("button",{type:"button","aria-label":be,title:je,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:Ne}),e[94]=g,e[95]=be,e[96]=je,e[97]=De):De=e[97];let me;return e[98]!==_e||e[99]!==xe||e[100]!==fe||e[101]!==De||e[102]!==w?(me=i.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center",children:i.jsxs("div",{className:"pointer-events-auto flex items-center gap-2 rounded-full bg-background px-3 py-2 card-shadow",children:[w,_e,xe,fe,De]})}),e[98]=_e,e[99]=xe,e[100]=fe,e[101]=De,e[102]=w,e[103]=me):me=e[103],me}function al(t){const e=R.c(14),{active:s,onClick:r,icon:n,label:a}=t,l=Y();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 il(t,e){return t.sortOrder-e.sortOrder}function i1(t){const e=R.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=Ga("delivery_lanes_enabled"),[y,v]=L.useState(null);let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=[],e[0]=w):w=e[0];const[j,S]=L.useState(w);let C;e[1]===Symbol.for("react.memo_cache_sentinel")?(C=new Map,e[1]=C):C=e[1];const[N,_]=L.useState(C),[$,D]=ul(),E=L.useRef(null);let P;e[2]===Symbol.for("react.memo_cache_sentinel")?(P=B=>{if(E.current=B,!B)return;const ne=te=>{if(te.deltaX!==0||te.deltaY===0||B.scrollWidth<=B.clientWidth)return;for(let ce=te.target;ce&&ce!==B;ce=ce.parentElement)if(ce.hasAttribute("data-lane-scroll"))return;te.preventDefault();const de=te.deltaMode===1?16:te.deltaMode===2?B.clientWidth:1;B.scrollLeft=B.scrollLeft+te.deltaY*de};return B.addEventListener("wheel",ne,{passive:!1}),()=>{E.current=null,B.removeEventListener("wheel",ne)}},e[2]=P):P=e[2];const O=P,z=N.size>0?s.map(B=>{const ne=N.get(B.id);return ne?{...B,...ne}:B}):s;if(N.size>0&&!y){const B=[...N].filter(ne=>{const[te,de]=ne,ce=s.find(ke=>ke.id===te);return ce?.status===de.status&&ce.sortOrder===de.sortOrder});B.length>0&&_(ne=>{const te=new Map(ne);for(const[de]of B)te.delete(de);return te})}gm(E,z.map(u1).join(","),y===null,b);const F=B=>z.filter(ne=>ne.status===B).sort(il),{lanes:V,hidden:Q,hideable:K}=Ec({deliveryEnabled:m,shownLanes:$.shownTaskBoardLanes,occupied:z.map(d1)});let H;e[3]!==D?(H=(B,ne)=>D(te=>({...te,shownTaskBoardLanes:ne?[...te.shownTaskBoardLanes,B]:te.shownTaskBoardLanes.filter(de=>de!==B)})),e[3]=D,e[4]=H):H=e[4];const Z=H,J=B=>Oc({overId:B,statusOf:ne=>z.find(te=>te.id===ne)?.status});let q;e[5]!==a?(q=B=>a.has(B)&&a.size>1?[B,...Array.from(a).filter(ne=>ne!==B)]:[B],e[5]=a,e[6]=q):q=e[6];const W=q;let X;e[7]===Symbol.for("react.memo_cache_sentinel")?(X=(B,ne,te)=>{const de=Sl(te,B.length);_(ce=>{const ke=new Map(ce);return B.forEach((Me,Ie)=>ke.set(Me,{status:ne,sortOrder:de[Ie]})),ke})},e[7]=X):X=e[7];const se=X;let ee;e[8]===Symbol.for("react.memo_cache_sentinel")?(ee={activationConstraint:{distance:4}},e[8]=ee):ee=e[8];let le;e[9]===Symbol.for("react.memo_cache_sentinel")?(le={coordinateGetter:tc},e[9]=le):le=e[9];const pe=Go(bi(Qo,ee),bi(Vo,le)),Ce=B=>{const ne=String(B.active.id),te=J(B.over?.id),de=z.find(Ie=>Ie.id===ne);if(!te||!de||de.status===te)return;const ce=W(ne),ke=String(B.over?.id??""),Me=F(te).filter(Ie=>!ce.includes(Ie.id));se(ce,te,vi(Me,ke.startsWith(Aa)?null:ke,ne))},_e=B=>{const ne=String(B.active.id);v(null);const te=J(B.over?.id)??z.find(Be=>Be.id===ne)?.status;if(!te){_(new Map);return}const de=W(ne),ce=F(te),ke=String(B.over?.id??""),Me=ce.findIndex(Be=>Be.id===ne),Ie=ke.startsWith(Aa)?ce.length-1:ce.findIndex(Be=>Be.id===ke),ye=Me===-1||Ie===-1?ce:Jo(ce,Me,Ie);if(s.filter(Be=>Be.status===te).sort(il).map(c1).join()===ye.map(o1).join()){_(new Map);return}const Xe=ye.slice(ye.findIndex(Be=>Be.id===ne)+1).find(Be=>!de.includes(Be.id)),Ue=vi(ce.filter(Be=>!de.includes(Be.id)),Xe?.id??null,ne);se(de,te,Ue),S(de),u(de,te,Ue)},xe=y?z.find(B=>B.id===y):null;let fe;e[10]!==y||e[11]!==W?(fe=y?W(y):[],e[10]=y,e[11]=W,e[12]=fe):fe=e[12];const be=fe;let je;e[13]===Symbol.for("react.memo_cache_sentinel")?(je=B=>{v(String(B.active.id)),S([])},e[13]=je):je=e[13];let Ne;e[14]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{v(null),_(new Map)},e[14]=Ne):Ne=e[14];const De=ol.createPortal,me=Zo,G=null,oe=xe&&i.jsxs("div",{className:"relative w-[292px] cursor-grabbing",children:[i.jsx(_o,{item:xe,assignee:xe.assigneeId?n.get(xe.assigneeId):void 0,assignedBy:xe.assignedBy?n.get(xe.assignedBy):void 0,selected:a.has(xe.id),onOpen:l1,className:"w-full shadow-lg"}),be.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:be.length})]});let ae;e[15]!==me||e[16]!==oe?(ae=i.jsx(me,{dropAnimation:G,children:oe}),e[15]=me,e[16]=oe,e[17]=ae):ae=e[17];let Se;return e[18]!==De||e[19]!==ae?(Se=De(ae,document.body),e[18]=De,e[19]=ae,e[20]=Se):Se=e[20],i.jsxs(Yo,{sensors:pe,collisionDetection:Xo,onDragStart:je,onDragOver:Ce,onDragEnd:_e,onDragCancel:Ne,children:[i.jsx("div",{ref:O,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:[V.map(B=>i.jsx(h1,{status:B,items:F(B),members:r,memberByUserId:n,selectedIds:a,isTarget:xe?.status===B,hiddenIds:be,landedIds:j,onToggleSelect:l,onSelectAllInLane:o,onOpen:c,onCreate:d,onAutoFix:f,onRerun:h,onAssign:x,onPriorityChange:g,onTypeChange:p,onDueDateChange:k,onHide:K.includes(B)?()=>Z(B,!1):void 0},B)),Q.length>0&&i.jsx(f1,{statuses:Q,countOf:B=>F(B).length,onShow:B=>Z(B,!0)})]})}),Se]})}function l1(){}function o1(t){return t.id}function c1(t){return t.id}function d1(t){return t.status}function u1(t){return`${t.id}:${t.status}`}function f1(t){const e=R.c(19),{statuses:s,countOf:r,onShow:n}=t,a=Y();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(Ha,{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}=or(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(Qe,{children:[i.jsx(Ge,{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(Yn,{size:15})})}),i.jsx(Ve,{align:"end",children:i.jsx(ve,{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 h1(t){const e=R.c(100),{status:s,items:r,members:n,memberByUserId:a,selectedIds:l,isTarget:o,hiddenIds:c,landedIds:d,onToggleSelect:u,onSelectAllInLane:f,onOpen:h,onCreate:x,onAutoFix:g,onRerun:p,onAssign:k,onPriorityChange:b,onTypeChange:m,onDueDateChange:y,onHide:v}=t,w=Y(),{label:j,visual:S}=or(s,w),C=S.icon,N=`${Aa}${s}`;let _;e[0]!==N?(_={id:N},e[0]=N,e[1]=_):_=e[1];const{setNodeRef:$}=ec(_),D=o&&"bg-muted/50";let E;e[2]!==D?(E=M("flex h-full w-[300px] shrink-0 flex-col rounded-xl py-1 transition-colors",D),e[2]=D,e[3]=E):E=e[3];const P=o?"bg-muted":"bg-background";let O;e[4]!==P?(O=M("sticky top-0 z-10 flex items-center gap-2 px-2 py-1.5 transition-colors",P),e[4]=P,e[5]=O):O=e[5];const z=15,F=M("shrink-0",S.iconClassName.replace(/\banimate-\S+\b/g,"").trim());let V;e[6]!==C||e[7]!==F?(V=i.jsx(C,{size:z,className:F}),e[6]=C,e[7]=F,e[8]=V):V=e[8];let Q;e[9]!==j?(Q=i.jsx("span",{className:"text-sm font-medium text-foreground",children:j}),e[9]=j,e[10]=Q):Q=e[10];let K;e[11]!==r.length?(K=i.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:r.length}),e[11]=r.length,e[12]=K):K=e[12];let H;e[13]!==j||e[14]!==w?(H=w("taskBoard.taskBoard.laneMenuAriaLabel",{lane:j}),e[13]=j,e[14]=w,e[15]=H):H=e[15];let Z;e[16]===Symbol.for("react.memo_cache_sentinel")?(Z=i.jsx(Yn,{size:15}),e[16]=Z):Z=e[16];let J;e[17]!==H?(J=i.jsx(Ge,{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:Z})}),e[17]=H,e[18]=J):J=e[18];let q;e[19]!==f||e[20]!==s?(q=()=>f(s),e[19]=f,e[20]=s,e[21]=q):q=e[21];let W;e[22]!==w?(W=w("taskBoard.taskBoard.selectAllInLane"),e[22]=w,e[23]=W):W=e[23];let X;e[24]!==q||e[25]!==W?(X=i.jsx(ve,{onClick:q,children:W}),e[24]=q,e[25]=W,e[26]=X):X=e[26];let se;e[27]!==v||e[28]!==w?(se=v&&i.jsx(ve,{onClick:v,children:w("taskBoard.taskBoard.hideColumn")}),e[27]=v,e[28]=w,e[29]=se):se=e[29];let ee;e[30]!==X||e[31]!==se?(ee=i.jsxs(Ve,{align:"end",children:[X,se]}),e[30]=X,e[31]=se,e[32]=ee):ee=e[32];let le;e[33]!==J||e[34]!==ee?(le=i.jsxs(Qe,{children:[J,ee]}),e[33]=J,e[34]=ee,e[35]=le):le=e[35];let pe;e[36]!==j||e[37]!==w?(pe=w("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:j}),e[36]=j,e[37]=w,e[38]=pe):pe=e[38];let Ce;e[39]!==j||e[40]!==w?(Ce=w("taskBoard.taskBoard.newTaskInLaneTitle",{lane:j}),e[39]=j,e[40]=w,e[41]=Ce):Ce=e[41];let _e;e[42]!==x||e[43]!==s?(_e=()=>x(s),e[42]=x,e[43]=s,e[44]=_e):_e=e[44];let xe;e[45]===Symbol.for("react.memo_cache_sentinel")?(xe=i.jsx(lr,{size:15}),e[45]=xe):xe=e[45];let fe;e[46]!==pe||e[47]!==Ce||e[48]!==_e?(fe=i.jsx("button",{type:"button","aria-label":pe,title:Ce,onClick:_e,className:"flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:xe}),e[46]=pe,e[47]=Ce,e[48]=_e,e[49]=fe):fe=e[49];let be;e[50]!==Q||e[51]!==K||e[52]!==le||e[53]!==fe||e[54]!==O||e[55]!==V?(be=i.jsxs("div",{className:O,children:[V,Q,K,le,fe]}),e[50]=Q,e[51]=K,e[52]=le,e[53]=fe,e[54]=O,e[55]=V,e[56]=be):be=e[56];let je;e[57]!==r?(je=r.map(p1),e[57]=r,e[58]=je):je=e[58];let Ne;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 oe;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?(oe=ae=>i.jsx(m1,{item:ae,assignee:ae.assigneeId?a.get(ae.assigneeId):void 0,assignedBy:ae.assignedBy?a.get(ae.assignedBy):void 0,members:n,selected:l.has(ae.id),hidden:c.includes(ae.id),landed:d.includes(ae.id),onToggleSelect:()=>u(ae.id),onOpen:()=>h(ae),onAutoFix:g?()=>g(ae):void 0,onRerun:p?()=>p(ae):void 0,onAssign:k?Se=>k(ae.id,Se):void 0,onPriorityChange:b?Se=>b(ae.id,Se):void 0,onTypeChange:m?Se=>m(ae.id,Se):void 0,onDueDateChange:y?Se=>y(ae.id,Se):void 0},ae.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]=oe):oe=e[87],Ne=r.map(oe),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]=Ne}else Ne=e[73];let De;e[88]!==je||e[89]!==Ne?(De=i.jsx(sc,{items:je,strategy:nc,children:Ne}),e[88]=je,e[89]=Ne,e[90]=De):De=e[90];let me;e[91]!==$||e[92]!==s||e[93]!==De?(me=i.jsx("div",{ref:$,"data-lane-scroll":s,className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-1 pt-1 pb-16 [scrollbar-width:thin] [&::-webkit-scrollbar]:w-1",children:De}),e[91]=$,e[92]=s,e[93]=De,e[94]=me):me=e[94];let G;return e[95]!==s||e[96]!==be||e[97]!==me||e[98]!==E?(G=i.jsxs("div",{"data-lane":s,className:E,children:[be,me]}),e[95]=s,e[96]=be,e[97]=me,e[98]=E,e[99]=G):G=e[99],G}function p1(t){return t.id}function m1(t){const e=R.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}=rc(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=ac.Translate.toString(u),e[12]=u,e[13]=m):m=e[13];const y=h||s?0:void 0;let v;e[14]!==m||e[15]!==y||e[16]!==f?(v={transform:m,transition:f,opacity:y},e[14]=m,e[15]=y,e[16]=f,e[17]=v):v=e[17];let w;e[18]!==r||e[19]!==a||e[20]!==d||e[21]!==p||e[22]!==b||e[23]!==v?(w=i.jsx(_o,{...a,item:r,dragRef:d,bindings:p,className:b,style:v}),e[18]=r,e[19]=a,e[20]=d,e[21]=p,e[22]=b,e[23]=v,e[24]=w):w=e[24];let j;return e[25]!==r.id||e[26]!==r.status||e[27]!==w?(j=i.jsx("div",{className:"flex","data-flip-id":x,"data-flip-lane":g,children:w}),e[25]=r.id,e[26]=r.status,e[27]=w,e[28]=j):j=e[28],j}function _o(t){const e=R.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=Y(),v=qm(s);let w;e[0]!==s?(w=Lc(s),e[0]=s,e[1]=w):w=e[1];const j=w;let S,C,N,_,$,D,E,P,O,z,F,V;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){C=Pc(s)?y("taskBoard.taskBoard.blockedBadgeTitle"):null;const ee=x&&(s.status==="triage"||s.status==="todo")&&s.assigneeId!==Ae,le=g&&!ee&&s.assigneeId===Ae&&s.status!=="done";S=ee?{icon:zr,label:y("taskBoard.taskBoard.autoFix"),onClick:x}:le?{icon:Qr,label:y("taskBoard.taskBoard.rerun"),onClick:g}:null,P="button",O=c,z=u,F=d?.attributes,V=d?.listeners,e[27]!==h||e[28]!==f?(N=pe=>{pe.shiftKey&&f?f():h()},e[27]=h,e[28]=f,e[29]=N):N=e[29],_=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",C?"bg-warning/10 hover:bg-warning/15":"bg-card hover:bg-accent/60",j==="failed"?"card-ring-destructive":C&&"card-ring-warning",l&&"bg-accent",o),E="flex items-start gap-2",D="relative min-w-0 flex-1 text-[14px] font-[450] leading-snug",$=M("block text-foreground line-clamp-2",S&&"group-hover:fade-text-end"),e[2]=d?.attributes,e[3]=d?.listeners,e[4]=o,e[5]=c,e[6]=s,e[7]=x,e[8]=h,e[9]=g,e[10]=f,e[11]=j,e[12]=l,e[13]=u,e[14]=y,e[15]=S,e[16]=C,e[17]=N,e[18]=_,e[19]=$,e[20]=D,e[21]=E,e[22]=P,e[23]=O,e[24]=z,e[25]=F,e[26]=V}else S=e[15],C=e[16],N=e[17],_=e[18],$=e[19],D=e[20],E=e[21],P=e[22],O=e[23],z=e[24],F=e[25],V=e[26];let Q;e[30]!==s.title||e[31]!==$?(Q=i.jsx("span",{className:$,children:s.title}),e[30]=s.title,e[31]=$,e[32]=Q):Q=e[32];let K;e[33]!==S?(K=S&&i.jsx(Mm,{action:S}),e[33]=S,e[34]=K):K=e[34];let H;e[35]!==Q||e[36]!==K||e[37]!==D?(H=i.jsxs("div",{className:D,children:[Q,K]}),e[35]=Q,e[36]=K,e[37]=D,e[38]=H):H=e[38];let Z;e[39]!==C?(Z=C&&i.jsx("span",{className:"sr-only",children:C}),e[39]=C,e[40]=Z):Z=e[40];let J;e[41]!==j?(J=j&&i.jsx(Hm,{state:j}),e[41]=j,e[42]=J):J=e[42];let q;e[43]!==H||e[44]!==Z||e[45]!==J||e[46]!==E?(q=i.jsxs("div",{className:E,children:[H,Z,J]}),e[43]=H,e[44]=Z,e[45]=J,e[46]=E,e[47]=q):q=e[47];let W;e[48]!==s.tags?(W=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,_a).map(g1),s.tags.length>_a&&i.jsxs("span",{className:Vt,children:["+",s.tags.length-_a]})]}),e[48]=s.tags,e[49]=W):W=e[49];let X;e[50]!==n||e[51]!==r||e[52]!==v||e[53]!==s||e[54]!==a||e[55]!==p||e[56]!==m||e[57]!==k||e[58]!==b?(X=i.jsx(Lm,{item:s,checks:v,assignee:r,assignedBy:n,members:a,onAssign:p,onPriorityChange:k,onTypeChange:b,onDueDateChange:m}),e[50]=n,e[51]=r,e[52]=v,e[53]=s,e[54]=a,e[55]=p,e[56]=m,e[57]=k,e[58]=b,e[59]=X):X=e[59];let se;return e[60]!==N||e[61]!==_||e[62]!==q||e[63]!==W||e[64]!==X||e[65]!==P||e[66]!==O||e[67]!==z||e[68]!==F||e[69]!==V?(se=i.jsxs("button",{type:P,ref:O,style:z,...F,...V,onClick:N,className:_,children:[q,W,X]}),e[60]=N,e[61]=_,e[62]=q,e[63]=W,e[64]=X,e[65]=P,e[66]=O,e[67]=z,e[68]=F,e[69]=V,e[70]=se):se=e[70],se}function g1(t){return i.jsx(Co,{tag:t},t.id)}function x1(t){const e=R.c(38),{item:s,assignee:r,assignedBy:n,onOpen:a}=t;let l;e[0]!==s.status?(l=Ba(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",yl(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=Mc(s)&&i.jsx(Sm,{}),e[9]=s,e[10]=f):f=e[10];let h;e[11]!==s?(h=Ic(s)&&i.jsx(Tm,{}),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(Pm,{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(Om,{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(k1),s.tags.length>2&&i.jsxs("span",{className:Vt,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(No,{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=Ka(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 k1(t){return i.jsx(Co,{tag:t},t.id)}function _g(t){const e=R.c(5),{seed:s,children:r}=t;let n;e[0]!==s?(n=()=>{const o=new Ho({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(qo,{fallback:null,children:i.jsx(L.Suspense,{fallback:null,children:i.jsx(Uo,{client:a,children:r})})})}),e[2]=r,e[3]=a,e[4]=l):l=e[4],l}const ll=new Date().toISOString();function $t(t,e,s,r,n,a){return{id:t,organizationId:"preview",title:e,description:null,status:s,priority:n,type:r,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:a,keySeq:a,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],createdBy:"preview",createdAt:ll,updatedBy:"preview",updatedAt:ll}}function Bg(){return{items:[$t("p1","Fix checkout shipping estimate","todo","bug","high",1),$t("p2","Add size guide to product page","todo","feature","medium",2),$t("p3","Compress hero images","todo","chore","low",3),$t("p4","Rewrite category descriptions","in_progress","feature","medium",4),$t("p5","Audit broken redirects","in_progress","chore","high",5),$t("p6","New arrivals landing page","in_review","feature","high",6),$t("p7","Speed up search results","done","chore","medium",7),$t("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[]}}export{_g as P,Ng as T,Bg as m};
90
+ `)}const wm=["overdue","today","week","none"],Gn=t=>typeof t=="string"&&t!==""?t:null;function vm(t){const e=Gn(t.priority),s=Gn(t.due),r=Gn(t.tags);return{layout:t.view==="list"?"list":"board",filters:{search:Gn(t.q)??"",assignee:Gn(t.assignee),priority:Xr.includes(e)?e:null,due:wm.includes(s)?s:null,tags:r?r.split(",").filter(Boolean):[],project:Gn(t.repo)}}}function jm(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 Sm(t,e){const s=new Set(e.map(r=>r.id));return new Set([...t].filter(r=>s.has(r)))}function Tm(){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=cl(e),r=Pa();let n;t[1]!==s?(n=vm(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,...jm(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}Fo(()=>import("./route-BHp1yMIV.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,191,192])).catch(()=>{});const Cm=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Co(t){const e=new Date(t),s=e.getTime()<Date.now();return{label:Cm.format(e),overdue:s}}const Vt="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",pr=12,mr="size-3.5",_a=2;function Nm(){const t=D.c(9),e=Y();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=M(Vt,"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:pr}),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 _m(){const t=D.c(9),e=Y();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=M(Vt,"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:pr}),t[3]=n):n=t[3];let a;t[4]!==e?(a=e("taskBoard.taskBoard.needsYou"),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==r||t[7]!==a?(l=i.jsxs("span",{className:s,title:r,children:[n,a]}),t[6]=r,t[7]=a,t[8]=l):l=t[8],l}function Bm(t){const e=D.c(20),{priority:s,onChange:r}=t,n=Y(),a=Ye[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(mr,"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=Ye[g].icon;return i.jsxs(ve,{onSelect:()=>r(g),className:M("gap-2",g===s&&"bg-accent"),children:[i.jsx(p,{size:pr,className:M("shrink-0",Ye[g].iconClassName)}),n(Ye[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(No,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function No(t){const e=D.c(8),{label:s,glyph:r,children:n}=t;let a;e[0]!==r||e[1]!==s?(a=i.jsx(Ve,{asChild:!0,children:i.jsx(he,{variant:"ghost",size:"icon-sm",title:s,"aria-label":s,onClick:Rm,onPointerDown:Dm,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(Qe,{align:"start",className:"w-36",onClick:Am,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 Am(t){return t.stopPropagation()}function Dm(t){return t.stopPropagation()}function Rm(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(vc,{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(jc,{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 $m(t){const e=D.c(20),{type:s,onChange:r}=t,n=Y(),a=Et[s];let l;e[0]!==a.labelKey||e[1]!==n?(l=n(a.labelKey),e[0]=a.labelKey,e[1]=n,e[2]=l):l=e[2];const o=l,c=a.icon;let d;e[3]!==a.iconClassName?(d=M(mr,"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=Sl.map(g=>{const p=Et[g].icon;return i.jsxs(ve,{onSelect:()=>r(g),className:M("gap-2",g===s&&"bg-accent"),children:[i.jsx(p,{size:pr,className:M("shrink-0",Et[g].iconClassName)}),n(Et[g].labelKey)]},g)}),e[12]=r,e[13]=n,e[14]=s,e[15]=h):h=e[15];let x;return e[16]!==f||e[17]!==o||e[18]!==h?(x=i.jsx(No,{label:o,glyph:f,children:h}),e[16]=f,e[17]=o,e[18]=h,e[19]=x):x=e[19],x}function Em(t){const e=D.c(46),{iso:s,onChange:r}=t;let n;e[0]!==s?(n=Wc(s),e[0]=s,e[1]=n):n=e[1];const a=n;let l;e[2]!==s?(l=Co(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:mr}),e[4]=c):c=e[4];let d;e[5]!==o?(d=i.jsxs(i.Fragment,{children:[c,o]}),e[5]=o,e[6]=d):d=e[6];const u=d;let f,h,x,g,p,k,b,m,y,v;if(e[7]!==u||e[8]!==r||e[9]!==a){p=Symbol.for("react.early_return_sentinel");e:{const R=M("shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums text-muted-foreground/70",a==="overdue"&&"text-destructive",a==="soon"&&"text-warning");if(!r){p=i.jsx("span",{className:M("flex",R),children:u});break e}x=Ze,h=Ve,g=!0,f=he,k="ghost",b="sm",m=zm,y=Im,v=M("-mx-1.5 h-auto px-1.5 py-1 font-medium",R)}e[7]=u,e[8]=r,e[9]=a,e[10]=f,e[11]=h,e[12]=x,e[13]=g,e[14]=p,e[15]=k,e[16]=b,e[17]=m,e[18]=y,e[19]=v}else f=e[10],h=e[11],x=e[12],g=e[13],p=e[14],k=e[15],b=e[16],m=e[17],y=e[18],v=e[19];if(p!==Symbol.for("react.early_return_sentinel"))return p;let w;e[20]!==f||e[21]!==u||e[22]!==k||e[23]!==b||e[24]!==m||e[25]!==y||e[26]!==v?(w=i.jsx(f,{variant:k,size:b,onClick:m,onPointerDown:y,className:v,children:u}),e[20]=f,e[21]=u,e[22]=k,e[23]=b,e[24]=m,e[25]=y,e[26]=v,e[27]=w):w=e[27];let j;e[28]!==h||e[29]!==g||e[30]!==w?(j=i.jsx(h,{asChild:g,children:w}),e[28]=h,e[29]=g,e[30]=w,e[31]=j):j=e[31];let S;e[32]!==s?(S=new Date(s),e[32]=s,e[33]=S):S=e[33];let C;e[34]!==s?(C=new Date(s),e[34]=s,e[35]=C):C=e[35];let N;e[36]!==r?(N=R=>R&&r(xi(R)),e[36]=r,e[37]=N):N=e[37];let _;e[38]!==S||e[39]!==C||e[40]!==N?(_=i.jsx(Qe,{align:"start",className:"w-auto p-0",onClick:Mm,children:i.jsx(Va,{mode:"single",selected:S,defaultMonth:C,onSelect:N,initialFocus:!0})}),e[38]=S,e[39]=C,e[40]=N,e[41]=_):_=e[41];let $;return e[42]!==x||e[43]!==j||e[44]!==_?($=i.jsxs(x,{children:[j,_]}),e[42]=x,e[43]=j,e[44]=_,e[45]=$):$=e[45],$}function Mm(t){return t.stopPropagation()}function Im(t){return t.stopPropagation()}function zm(t){return t.stopPropagation()}function Lm(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:mr}),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(he,{variant:"outline",size:"sm",onClick:r,onPointerDown:Om,ref:Pm,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 Pm(t){return t?.parentElement?.style.setProperty("--fade-text-end",`${t.offsetWidth}px`)}function Om(t){return t.stopPropagation()}function Fm(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}=Ue();let h;e[0]!==s.keySeq||e[1]!==f.slug?(h=yl(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($m,{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(Em,{iso:s.dueDate,onChange:u}),e[11]=s.dueDate,e[12]=u,e[13]=b):b=e[13];let m;e[14]!==k||e[15]!==b?(m=i.jsxs("span",{className:"flex min-w-0 items-center gap-3",children:[k,b]}),e[14]=k,e[15]=b,e[16]=m):m=e[16];let y;e[17]!==s.priority||e[18]!==c?(y=(s.priority!=="none"||c)&&i.jsx(Bm,{priority:s.priority,onChange:c}),e[17]=s.priority,e[18]=c,e[19]=y):y=e[19];let v;e[20]!==r||e[21]!==s.reviewVerdicts?(v=r&&i.jsx(Um,{summary:r.summary,verdicts:s.reviewVerdicts,enabled:r.enabled}),e[20]=r,e[21]=s.reviewVerdicts,e[22]=v):v=e[22];let w;e[23]!==a||e[24]!==n||e[25]!==s||e[26]!==l||e[27]!==o?(w=i.jsx(Bo,{item:s,assignee:n,assignedBy:a,members:l,onAssign:o,showDelegation:!1}),e[23]=a,e[24]=n,e[25]=s,e[26]=l,e[27]=o,e[28]=w):w=e[28];let j;e[29]!==y||e[30]!==v||e[31]!==w?(j=i.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[y,v,w]}),e[29]=y,e[30]=v,e[31]=w,e[32]=j):j=e[32];let S;return e[33]!==j||e[34]!==m?(S=i.jsxs("div",{className:"mt-auto flex shrink-0 items-center justify-between gap-2 pt-1",children:[m,j]}),e[33]=j,e[34]=m,e[35]=S):S=e[35],S}function Hm(t){const e=D.c(10),{priority:s}=t,r=Y(),n=Ye[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:Vt,title:l,children:[c,l]}),e[7]=l,e[8]=c,e[9]=d):d=e[9],d}function qm(t){const e=D.c(7),{iso:s}=t;let r,n;if(e[0]!==s){const{label:o,overdue:c}=Co(s);r=o,n=M(Vt,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:pr}),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 _o(t){const e=D.c(8),{tag:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=M(Vt,"text-foreground"),e[0]=r):r=e[0];let n;e[1]!==s.color?(n=fr(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 Um(t){const e=D.c(26),{summary:s,verdicts:r,enabled:n}=t,a=Y();let l;if(e[0]!==n||e[1]!==a||e[2]!==r){let y;e[4]!==a||e[5]!==r?(y=v=>{const w=r.find(C=>C.reviewer===v),j=a("taskBoard.taskDialog.reviewerLabel"),S=w?w.verdict==="changes_requested"?a("taskBoard.taskBoard.checksChangesRequested"):a(w.verified?"taskBoard.taskBoard.checksApproved":"taskBoard.taskBoard.checksUnverified"):a("taskBoard.taskBoard.checksPending");return i.jsxs("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[i.jsx(ri,{size:12}),j," — ",S]},v)},e[4]=a,e[5]=r,e[6]=y):y=e[6],l=n.map(y),e[0]=n,e[1]=a,e[2]=r,e[3]=l}else l=e[3];let o;e[7]!==l?(o=i.jsx("span",{className:"flex flex-col gap-0.5",children:l}),e[7]=l,e[8]=o):o=e[8];const c=o,d=s.tone==="ok"&&"text-success",u=s.tone==="pending"&&"text-warning",f=s.tone==="danger"&&"text-destructive";let h;e[9]!==d||e[10]!==u||e[11]!==f?(h=M("flex shrink-0 items-center gap-1.5 text-xs font-medium tabular-nums",d,u,f),e[9]=d,e[10]=u,e[11]=f,e[12]=h):h=e[12];const x=String(s.passed),g=String(s.total);let p;e[13]!==a||e[14]!==x||e[15]!==g?(p=a("taskBoard.taskBoard.checksLabel",{passed:x,total:g}),e[13]=a,e[14]=x,e[15]=g,e[16]=p):p=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=i.jsx(er,{className:mr}),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 Km(t){const e=D.c(14),{state:s}=t,r=Y(),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(ht,{className:"size-3.5 text-primary",label:o}):i.jsx(qo,{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 Wm(t){const e=D.c(3),s=ko(Nl());if(t.reviewVerdicts.length===0&&t.status!=="in_review"&&!t.reviewCycleStartedAt)return null;const r=ap(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 Bo(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=Y(),[u,f]=L.useState(!1);if(s.assigneeId===Ae){let v;e[0]!==n||e[1]!==d?(v=n?.user?.name?d("taskBoard.taskBoard.assignedToSuperAgentBy",{name:n.user.name}):d("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=n,e[1]=d,e[2]=v):v=e[2];const w=v;if(!c){let N;return e[3]!==n||e[4]!==w?(N=n?i.jsx(qe,{url:n.user?.image??void 0,fallback:He(n.user?.name),shape:"circle",size:"xs",title:w}):null,e[3]=n,e[4]=w,e[5]=N):N=e[5],N}let j;e[6]!==n?(j=n&&i.jsx(qe,{url:n.user?.image??void 0,fallback:He(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(wt,{size:20,className:"ring-2 ring-background"}),e[8]=S):S=e[8];let C;return e[9]!==j||e[10]!==w?(C=i.jsxs("span",{className:"inline-flex items-center",title:w,children:[j,S]}),e[9]=j,e[10]=w,e[11]=C):C=e[11],C}if(r){const v=r.user?.image??void 0,w=r.user?.name;let j;e[12]!==w?(j=He(w),e[12]=w,e[13]=j):j=e[13];let S;return e[14]!==v||e[15]!==j?(S=i.jsx(qe,{url:v,fallback:j,shape:"circle",size:"xs"}),e[14]=v,e[15]=j,e[16]=S):S=e[16],S}if(!l||!a?.length)return null;let h;e[17]!==d?(h=d("taskBoard.taskBoard.assignButton"),e[17]=d,e[18]=h):h=e[18];let x;e[19]!==d?(x=d("taskBoard.taskBoard.assignButton"),e[19]=d,e[20]=x):x=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{v.stopPropagation(),f(!0)},e[21]=g):g=e[21];let p;e[22]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(gl,{size:13}),e[22]=p):p=e[22];let k;e[23]!==h||e[24]!==x?(k=i.jsx(ar,{asChild:!0,children:i.jsx("button",{type:"button",title:h,"aria-label":x,onClick:g,className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 transition-colors hover:border-muted-foreground hover:text-muted-foreground",children:p})}),e[23]=h,e[24]=x,e[25]=k):k=e[25];let b;e[26]!==l?(b=v=>{l(v),f(!1)},e[26]=l,e[27]=b):b=e[27];let m;e[28]!==a||e[29]!==b?(m=i.jsx(Er,{className:"w-56 p-0",align:"end",side:"bottom",onClick:Gm,children:i.jsx(gi,{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(Mr,{open:u,onOpenChange:f,children:[k,m]}),e[31]=u,e[32]=k,e[33]=m,e[34]=y):y=e[34],y}function Gm(t){return t.stopPropagation()}function Dg(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Nu,{children:i.jsx(Vm,{})}),t[0]=e):e=t[0],e}function Vm(){const t=D.c(107),e=Y(),{items:s,isLoading:r}=Dc(),{data:n}=Wa();let a;t[0]!==n?(a=n===void 0?[]:n,t[0]=n,t[1]=a):a=t[1];const l=a,o=Rc(),c=Hl();let d,u;if(t[2]!==c.data){const T=(c.data??[]).filter(o1);d=T.length>0,u=T.map(l1),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=T=>T===Ae&&!d?(x(!0),!0):!1,t[5]=d,t[6]=g):g=t[6];const p=g,[k,b]=L.useState(null),m=T=>{const I=xu(T);if(I){b(I),bi("task_limit_banner_shown",{organization_id:me.id,kind:I});return}Ge.error(T.message||e("taskBoard.taskBoard.actionError"))},y=T=>{!T||T.dataset.tracked==="true"||(T.dataset.tracked="true",bi("task_board_opened",{organization_id:me.id}))};let v;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=[],t[7]=v):v=t[7];const[w,j]=L.useState(v),S=()=>{if(w.length!==0){if(p(Ae)){j([]);return}for(const T of w)o.rerun.mutate({id:T.id},{onError:I=>m(I)});j([]),ee()}},{data:C}=Ua();let N,_;t[8]!==C?.data?.members?(N=C?.data?.members??[],_=new Map(N.map(i1)),t[8]=C?.data?.members,t[9]=N,t[10]=_):(N=t[9],_=t[10]);const $=_,{filters:R,setFilters:E,layout:P,setLayout:O}=Tm(),z=bo(s,f);let F;t[11]!==z?(F=kl(z),t[11]=z,t[12]=F):F=t[12];const V=F;let Q;t[13]!==R.project||t[14]!==z?(Q=R.project?bl(R.project,z)?.repo??null:null,t[13]=R.project,t[14]=z,t[15]=Q):Q=t[15];const K=Q,[H]=hl();let Z;t[16]===Symbol.for("react.memo_cache_sentinel")?(Z=new Set,t[16]=Z):Z=t[16];const[J,q]=L.useState(Z);let W;t[17]===Symbol.for("react.memo_cache_sentinel")?(W=T=>q(I=>{const ue=new Set(I);return ue.has(T)?ue.delete(T):ue.add(T),ue}),t[17]=W):W=t[17];const X=W,se=T=>q(I=>{const ue=new Set(I);for(const Ee of Ie)Ee.status===T&&ue.add(Ee.id);return ue}),ee=()=>q(new Set),le=T=>{E(T),ee()},[pe,Ce]=L.useState(!1),[_e,xe]=L.useState(null),{setTaskId:fe}=bu(),{create:be}=nu(),je=Mt(),{org:Ne,locator:De}=Ue(),me=Ne,G=Pa(),oe=()=>{G({to:"/$org/settings/task-board",params:{org:me.slug}})};let ae;t[18]===Symbol.for("react.memo_cache_sentinel")?(ae={strict:!1},t[18]=ae):ae=t[18];const{taskKey:Se}=Vr(ae),B=$c(s,Se)??null,ne=!!Se&&!B&&!r,te=B?vi(me.slug,B):null;let de;t[19]!==G||t[20]!==Se?(de=()=>{Se&&G({to:".",params:a1,search:r1,replace:!0})},t[19]=G,t[20]=Se,t[21]=de):de=t[21];const ce=de,ke=async T=>{const I=crypto.randomUUID(),ue=Ho(me.id).id,Ee=await je.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:T.id}).then(n1).catch(s1),Pe=ym(T,Ee),dt={type:"doc",content:[{type:"paragraph",content:[Ad({id:T.id,name:T.title,char:"@",kind:"task",metadata:{title:T.title,description:T.description,context:Pe}}),{type:"text",text:" "}]}]};ku(sessionStorage,De,I,dt);try{await be({id:I,virtual_mcp_id:ue}),await o.link.mutateAsync({id:T.id,linkThreadId:I})}catch{}fe(I,ue)};let Me;t[22]!==R||t[23]!==z?(Me=T=>Fc(T,R,z),t[22]=R,t[23]=z,t[24]=Me):Me=t[24];const Ie=s.filter(Me),ye=Sm(J,Ie);let It;t[25]!==H?(It=T=>!Hc.includes(T.status)||H.shownTaskBoardLanes.includes(T.status),t[25]=H,t[26]=It):It=t[26];const Xe=Ie.filter(It);let Ke;t[27]!==R||t[28]!==z||t[29]!==E?(Ke=T=>{const I=qc({repo:T},R.project,z);I!==R.project&&E({...R,project:I})},t[27]=R,t[28]=z,t[29]=E,t[30]=Ke):Ke=t[30];const Be=Ke;let jt;t[31]===Symbol.for("react.memo_cache_sentinel")?(jt=()=>{xe(null),Ce(!0)},t[31]=jt):jt=t[31];const gr=jt;let St;t[32]===Symbol.for("react.memo_cache_sentinel")?(St=T=>{xe(T),Ce(!0)},t[32]=St):St=t[32];const xr=St,Qt=T=>{G({to:".",params:I=>({...I,taskKey:vi(me.slug,T)}),search:t1})};let zt;t[33]===Symbol.for("react.memo_cache_sentinel")?(zt=()=>{Ce(!1),xe(null)},t[33]=zt):zt=t[33];const Je=zt;if(r&&s.length===0){let T;return t[34]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx("div",{className:"flex flex-1 items-center justify-center",children:i.jsx(ht,{className:"size-5 text-muted-foreground"})}),t[34]=T):T=t[34],T}if(ne){let T;return t[35]===Symbol.for("react.memo_cache_sentinel")?(T=i.jsx(ki,{to:".",params:e1,search:Jm,replace:!0}),t[35]=T):T=t[35],T}if(te&&te!==Se)return i.jsx(ki,{to:".",params:T=>({...T,taskKey:te}),search:Xm,replace:!0});let et;t[36]!==e?(et=e("taskBoard.taskBoard.tasksTitle"),t[36]=e,t[37]=et):et=t[37];let pt;t[38]!==et?(pt=i.jsx("h1",{className:"text-xl font-medium text-foreground",children:et}),t[38]=et,t[39]=pt):pt=t[39];let Tt;t[40]===Symbol.for("react.memo_cache_sentinel")?(Tt=i.jsx(_u,{}),t[40]=Tt):Tt=t[40];let ot;t[41]===Symbol.for("react.memo_cache_sentinel")?(ot=i.jsx(Bu,{}),t[41]=ot):ot=t[41];let Fe;t[42]!==e?(Fe=e("common.taskBoard.listView"),t[42]=e,t[43]=Fe):Fe=t[43];const Zt=P==="board";let tt;t[44]!==O?(tt=()=>O("board"),t[44]=O,t[45]=tt):tt=t[45];let ze;t[46]!==e?(ze=e("common.taskBoard.boardView"),t[46]=e,t[47]=ze):ze=t[47];let mt;t[48]!==Zt||t[49]!==tt||t[50]!==ze?(mt=i.jsx(il,{active:Zt,onClick:tt,icon:wc,label:ze}),t[48]=Zt,t[49]=tt,t[50]=ze,t[51]=mt):mt=t[51];let U;t[52]===Symbol.for("react.memo_cache_sentinel")?(U=i.jsx(lr,{size:16}),t[52]=U):U=t[52];let st;t[53]!==e?(st=e("taskBoard.taskBoard.newTask"),t[53]=e,t[54]=st):st=t[54];let Le;t[55]!==st?(Le=i.jsxs(he,{size:"sm",onClick:gr,children:[U,st]}),t[55]=st,t[56]=Le):Le=t[56];const Yt=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:[pt,Tt,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(Ec,{filters:R,members:N,tags:l,index:z,onChange:le,onOpenBoardSettings:oe})}),i.jsx("div",{className:"hidden sm:block",children:i.jsx(Mc,{filters:R,members:N,tags:l,index:z,onChange:le,onOpenBoardSettings:oe})})]}),i.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[ot,i.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[i.jsx(il,{active:P==="list",onClick:()=>{O("list"),ee()},icon:xl,label:Fe}),mt]}),Le]})]})]}),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")})}):Ie.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(he,{variant:"outline",size:"sm",onClick:()=>le(Uc),children:e("taskBoard.taskBoard.clearFilters")})]})}):P==="board"?i.jsx(d1,{visible:!B,items:Ie,members:N,memberByUserId:$,selectedIds:ye,onToggleSelect:X,onSelectAllInLane:se,onOpen:Qt,onCreate:xr,onMove:(T,I,ue)=>{const Ee=Cl(ue,T.length);T.forEach((Pe,dt)=>o.update.mutate({id:Pe,status:I,sortOrder:Ee[dt]}))},onAssign:(T,I)=>{p(I)||o.update.mutate({id:T,assigneeId:I},{onError:m})},onPriorityChange:(T,I)=>o.update.mutate({id:T,priority:I}),onTypeChange:(T,I)=>o.update.mutate({id:T,type:I}),onDueDateChange:(T,I)=>o.update.mutate({id:T,dueDate:I}),onAutoFix:T=>{p(Ae)||o.update.mutate({id:T.id,assigneeId:Ae},{onError:m})},onRerun:T=>j([T])}):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:Xe.map(T=>i.jsx(w1,{item:T,assignee:T.assigneeId?$.get(T.assigneeId):void 0,assignedBy:T.assignedBy?$.get(T.assignedBy):void 0,onOpen:()=>Qt(T)},T.id))})})]});let Lt;t[57]!==o.create||t[58]!==o.remove||t[59]!==o.update||t[60]!==p||t[61]!==ce||t[62]!==m||t[63]!==B||t[64]!==j||t[65]!==fe||t[66]!==ke||t[67]!==e||t[68]!==Be?(Lt=B&&i.jsx(Fp,{item:B,onClose:()=>ce(),isSaving:o.update.isPending,onSubmit:T=>{if(p(T.assigneeId)){ce();return}const{title:I,description:ue,priority:Ee,...Pe}=T,dt=Ra(B)?{}:{title:I,description:ue,priority:Ee};o.update.mutate({id:B.id,...Pe,...dt},{onError:m})},onDelete:()=>{o.remove.mutate(B.id),ce()},onClone:()=>{o.create.mutate({title:e("taskBoard.taskDialog.cloneTitle",{title:B.title}),description:B.description,status:B.status,priority:B.priority,repo:B.repo,dueDate:B.dueDate,tagIds:B.tags.map(Ym)}),Be(B.repo??null),Ge.success(e("taskBoard.taskDialog.cloneSuccess")),ce()},onArchive:()=>{o.update.mutate({id:B.id,status:"archived"}),Ge.success(e("taskBoard.taskDialog.archiveSuccess")),ce()},onNewChat:()=>{ke(B)},onAutoFix:()=>{p(Ae)||(o.update.mutate({id:B.id,assigneeId:Ae},{onError:m}),ce())},onRerun:()=>{ce(),j([B])},onOpenPreview:T=>{T.virtualMcpId&&fe(T.threadId,T.virtualMcpId,{panel:"site-editor"})}},B.id),t[57]=o.create,t[58]=o.remove,t[59]=o.update,t[60]=p,t[61]=ce,t[62]=m,t[63]=B,t[64]=j,t[65]=fe,t[66]=ke,t[67]=e,t[68]=Be,t[69]=Lt):Lt=t[69];const Ct=pe?`new-${_e??"default"}`:"closed",$e=_e??void 0;let nt;t[70]!==o.create||t[71]!==p||t[72]!==Je||t[73]!==Be?(nt=T=>{if(p(T.assigneeId)){Je();return}o.create.mutate(T),Be(T.repo??null),Je()},t[70]=o.create,t[71]=p,t[72]=Je,t[73]=Be,t[74]=nt):nt=t[74];let Nt;t[75]!==o.create.isPending||t[76]!==K||t[77]!==Je||t[78]!==pe||t[79]!==Ct||t[80]!==$e||t[81]!==nt?(Nt=i.jsx(Op,{open:pe,onClose:Je,defaultStatus:$e,defaultRepo:K,isSaving:o.create.isPending,onSubmit:nt},Ct),t[75]=o.create.isPending,t[76]=K,t[77]=Je,t[78]=pe,t[79]=Ct,t[80]=$e,t[81]=nt,t[82]=Nt):Nt=t[82];let gt;t[83]!==h?(gt=i.jsx(Gc,{mode:"link",open:h,onOpenChange:x}),t[83]=h,t[84]=gt):gt=t[84];let _t;t[85]===Symbol.for("react.memo_cache_sentinel")?(_t=T=>!T&&b(null),t[85]=_t):_t=t[85];let xt;t[86]!==k?(xt=i.jsx(hm,{kind:k,onOpenChange:_t}),t[86]=k,t[87]=xt):xt=t[87];let ct;t[88]!==j?(ct=T=>!T&&j([]),t[88]=j,t[89]=ct):ct=t[89];let kt;t[90]!==o.rerun.isPending||t[91]!==S||t[92]!==w||t[93]!==ct?(kt=i.jsx(gm,{items:w,pending:o.rerun.isPending,onOpenChange:ct,onConfirm:S}),t[90]=o.rerun.isPending,t[91]=S,t[92]=w,t[93]=ct,t[94]=kt):kt=t[94];let Bt;return t[95]!==o.removeMany||t[96]!==o.update||t[97]!==p||t[98]!==ee||t[99]!==s||t[100]!==N||t[101]!==m||t[102]!==B||t[103]!==V||t[104]!==ye||t[105]!==j?(Bt=ye.size>0&&!B&&i.jsx(c1,{count:ye.size,members:N,projectEntries:V,onSetRepo:T=>{for(const I of ye)o.update.mutate({id:I,repo:T});ee()},onMoveTo:T=>{for(const I of ye)o.update.mutate({id:I,status:T});ee()},onSetPriority:T=>{for(const I of ye)o.update.mutate({id:I,priority:T});ee()},onAddTag:T=>{for(const I of ye){const ue=s.find(Pe=>Pe.id===I);if(!ue)continue;const Ee=ue.tags.map(Zm);Ee.includes(T)||o.update.mutate({id:I,tagIds:[...Ee,T]})}ee()},onAssign:T=>{if(!p(T)){for(const I of ye)o.update.mutate({id:I,assigneeId:T},{onError:m});ee()}},onSetDueDate:T=>{const I=xi(T);for(const ue of ye)o.update.mutate({id:ue,dueDate:I});ee()},onAutoFix:ye.size>0&&Array.from(ye).every(T=>{const I=s.find(ue=>ue.id===T);return I&&(I.status==="triage"||I.status==="todo")&&I.assigneeId!==Ae})?()=>{if(!p(Ae)){for(const T of ye)o.update.mutate({id:T,assigneeId:Ae},{onError:m});ee()}}:void 0,onRerun:(()=>{const T=Array.from(ye).flatMap(I=>{const ue=s.find(Ee=>Ee.id===I);return ue?[ue]:[]});return T.length===ye.size&&T.every(Qm)?()=>j(T):void 0})(),onDelete:()=>{o.removeMany.mutate(Array.from(ye)),ee()},onClear:ee}),t[95]=o.removeMany,t[96]=o.update,t[97]=p,t[98]=ee,t[99]=s,t[100]=N,t[101]=m,t[102]=B,t[103]=V,t[104]=ye,t[105]=j,t[106]=Bt):Bt=t[106],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",B&&"hidden"),children:Yt}),Lt,Nt,gt,xt,kt,Bt]})}function Qm(t){return t.assigneeId===Ae&&t.status!=="done"}function Zm(t){return t.id}function Ym(t){return t.id}function Xm(t){return t}function Jm(t){return t}function e1(t){return{...t,taskKey:void 0}}function t1(t){return t}function s1(){return[]}function n1(t){return t.prs}function r1(t){return t}function a1(t){return{...t,taskKey:void 0}}function i1(t){return[t.userId,t]}function l1(t){return t.path}function o1(t){return t.usable}function c1(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=Y(),{data:k}=Wa();let b;e[0]!==k?(b=k===void 0?[]:k,e[0]=k,e[1]=b):b=e[1];const m=b,y=Ga("delivery_lanes_enabled");let v;e[2]!==s||e[3]!==p?(v=p("taskBoard.taskBoard.selectedCount",{count:s}),e[2]=s,e[3]=p,e[4]=v):v=e[4];let w;e[5]!==v?(w=i.jsx("span",{className:"pl-1 text-sm font-medium text-foreground",children:v}),e[5]=v,e[6]=w):w=e[6];let j;e[7]!==p?(j=p("taskBoard.taskBoard.actionsButton"),e[7]=p,e[8]=j):j=e[8];let S;e[9]!==j?(S=i.jsx(Ve,{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 C;e[11]!==p?(C=p("taskBoard.taskBoard.moveToButton"),e[11]=p,e[12]=C):C=e[12];let N;e[13]!==C?(N=i.jsx(Un,{children:C}),e[13]=C,e[14]=N):N=e[14];let _;if(e[15]!==y||e[16]!==l||e[17]!==p){let G;e[19]!==l||e[20]!==p?(G=oe=>i.jsx(ve,{onClick:()=>l(oe),children:or(oe,p).label},oe),e[19]=l,e[20]=p,e[21]=G):G=e[21],_=jl(y).map(G),e[15]=y,e[16]=l,e[17]=p,e[18]=_}else _=e[18];let $;e[22]!==_?($=i.jsx(Kn,{children:_}),e[22]=_,e[23]=$):$=e[23];let R;e[24]!==$||e[25]!==N?(R=i.jsxs(qn,{children:[N,$]}),e[24]=$,e[25]=N,e[26]=R):R=e[26];let E;e[27]!==p?(E=p("taskBoard.taskBoard.changePriorityButton"),e[27]=p,e[28]=E):E=e[28];let P;e[29]!==E?(P=i.jsx(Un,{children:E}),e[29]=E,e[30]=P):P=e[30];let O;e[31]!==o||e[32]!==p?(O=Xr.map(G=>i.jsxs(ve,{onClick:()=>o(G),children:[i.jsx("span",{className:M("size-2 rounded-full",Ye[G].dotClassName)}),p(Ye[G].labelKey)]},G)),e[31]=o,e[32]=p,e[33]=O):O=e[33];let z;e[34]!==O?(z=i.jsx(Kn,{children:O}),e[34]=O,e[35]=z):z=e[35];let F;e[36]!==P||e[37]!==z?(F=i.jsxs(qn,{children:[P,z]}),e[36]=P,e[37]=z,e[38]=F):F=e[38];let V;e[39]!==p?(V=p("taskBoard.taskBoard.assignButton"),e[39]=p,e[40]=V):V=e[40];let Q;e[41]!==V?(Q=i.jsx(Un,{children:V}),e[41]=V,e[42]=Q):Q=e[42];let K;e[43]!==r||e[44]!==d?(K=i.jsx(Kn,{className:"w-56 p-0",children:i.jsx(gi,{members:r,onSelect:d})}),e[43]=r,e[44]=d,e[45]=K):K=e[45];let H;e[46]!==Q||e[47]!==K?(H=i.jsxs(qn,{children:[Q,K]}),e[46]=Q,e[47]=K,e[48]=H):H=e[48];let Z;e[49]!==a||e[50]!==n||e[51]!==p?(Z=n.length>0&&i.jsxs(qn,{children:[i.jsx(Un,{children:p("taskBoard.taskBoard.assignProjectButton")}),i.jsxs(Kn,{className:"w-64",children:[i.jsx(ve,{onClick:()=>a(null),children:p("taskBoard.taskDialog.noProject")}),n.map(G=>i.jsx(ve,{className:"gap-2",onClick:()=>a(G.repo),children:i.jsx(Tl,{entry:G})},G.id))]})]}),e[49]=a,e[50]=n,e[51]=p,e[52]=Z):Z=e[52];let J;e[53]!==p?(J=p("taskBoard.taskBoard.dueDateButton"),e[53]=p,e[54]=J):J=e[54];let q;e[55]!==J?(q=i.jsx(Un,{children:J}),e[55]=J,e[56]=q):q=e[56];let W;e[57]!==u?(W=i.jsx(Kn,{className:"w-auto p-0",children:i.jsx(Va,{mode:"single",onSelect:G=>G&&u(G),initialFocus:!0})}),e[57]=u,e[58]=W):W=e[58];let X;e[59]!==q||e[60]!==W?(X=i.jsxs(qn,{children:[q,W]}),e[59]=q,e[60]=W,e[61]=X):X=e[61];let se;e[62]!==c||e[63]!==m||e[64]!==p?(se=m.length>0&&i.jsxs(qn,{children:[i.jsx(Un,{children:p("taskBoard.taskBoard.addTagButton")}),i.jsx(Kn,{children:m.map(G=>i.jsxs(ve,{onClick:()=>c(G.id),children:[i.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:fr(G.color)}}),G.name]},G.id))})]}),e[62]=c,e[63]=m,e[64]=p,e[65]=se):se=e[65];let ee;e[66]===Symbol.for("react.memo_cache_sentinel")?(ee=i.jsx(qa,{}),e[66]=ee):ee=e[66];let le;e[67]!==p?(le=p("taskBoard.taskBoard.deleteSelectedButton"),e[67]=p,e[68]=le):le=e[68];let pe;e[69]!==x||e[70]!==le?(pe=i.jsx(ve,{variant:"destructive",onClick:x,children:le}),e[69]=x,e[70]=le,e[71]=pe):pe=e[71];let Ce;e[72]!==R||e[73]!==F||e[74]!==H||e[75]!==Z||e[76]!==X||e[77]!==se||e[78]!==pe?(Ce=i.jsxs(Qe,{align:"center",side:"top",children:[R,F,H,Z,X,se,ee,pe]}),e[72]=R,e[73]=F,e[74]=H,e[75]=Z,e[76]=X,e[77]=se,e[78]=pe,e[79]=Ce):Ce=e[79];let _e;e[80]!==Ce||e[81]!==S?(_e=i.jsxs(Ze,{children:[S,Ce]}),e[80]=Ce,e[81]=S,e[82]=_e):_e=e[82];let xe;e[83]!==f||e[84]!==p?(xe=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(zr,{size:14}),p("taskBoard.taskBoard.autoFix")]}),e[83]=f,e[84]=p,e[85]=xe):xe=e[85];let fe;e[86]!==h||e[87]!==p?(fe=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]=fe):fe=e[88];let be;e[89]!==p?(be=p("taskBoard.taskBoard.clearSelectionButton"),e[89]=p,e[90]=be):be=e[90];let je;e[91]!==p?(je=p("taskBoard.taskBoard.clearSelectionButton"),e[91]=p,e[92]=je):je=e[92];let Ne;e[93]===Symbol.for("react.memo_cache_sentinel")?(Ne=i.jsx(Xn,{size:16}),e[93]=Ne):Ne=e[93];let De;e[94]!==g||e[95]!==be||e[96]!==je?(De=i.jsx("button",{type:"button","aria-label":be,title:je,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:Ne}),e[94]=g,e[95]=be,e[96]=je,e[97]=De):De=e[97];let me;return e[98]!==_e||e[99]!==xe||e[100]!==fe||e[101]!==De||e[102]!==w?(me=i.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center",children:i.jsxs("div",{className:"pointer-events-auto flex items-center gap-2 rounded-full bg-background px-3 py-2 card-shadow",children:[w,_e,xe,fe,De]})}),e[98]=_e,e[99]=xe,e[100]=fe,e[101]=De,e[102]=w,e[103]=me):me=e[103],me}function il(t){const e=D.c(14),{active:s,onClick:r,icon:n,label:a}=t,l=Y();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 ll(t,e){return t.sortOrder-e.sortOrder}function d1(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=Ga("delivery_lanes_enabled"),[y,v]=L.useState(null);let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=[],e[0]=w):w=e[0];const[j,S]=L.useState(w);let C;e[1]===Symbol.for("react.memo_cache_sentinel")?(C=new Map,e[1]=C):C=e[1];const[N,_]=L.useState(C),[$,R]=hl(),E=L.useRef(null);let P;e[2]===Symbol.for("react.memo_cache_sentinel")?(P=B=>{if(E.current=B,!B)return;const ne=te=>{if(te.deltaX!==0||te.deltaY===0||B.scrollWidth<=B.clientWidth)return;for(let ce=te.target;ce&&ce!==B;ce=ce.parentElement)if(ce.hasAttribute("data-lane-scroll"))return;te.preventDefault();const de=te.deltaMode===1?16:te.deltaMode===2?B.clientWidth:1;B.scrollLeft=B.scrollLeft+te.deltaY*de};return B.addEventListener("wheel",ne,{passive:!1}),()=>{E.current=null,B.removeEventListener("wheel",ne)}},e[2]=P):P=e[2];const O=P,z=N.size>0?s.map(B=>{const ne=N.get(B.id);return ne?{...B,...ne}:B}):s;if(N.size>0&&!y){const B=[...N].filter(ne=>{const[te,de]=ne,ce=s.find(ke=>ke.id===te);return ce?.status===de.status&&ce.sortOrder===de.sortOrder});B.length>0&&_(ne=>{const te=new Map(ne);for(const[de]of B)te.delete(de);return te})}bm(E,z.map(m1).join(","),y===null,b);const F=B=>z.filter(ne=>ne.status===B).sort(ll),{lanes:V,hidden:Q,hideable:K}=Ic({deliveryEnabled:m,shownLanes:$.shownTaskBoardLanes,occupied:z.map(p1)});let H;e[3]!==R?(H=(B,ne)=>R(te=>({...te,shownTaskBoardLanes:ne?[...te.shownTaskBoardLanes,B]:te.shownTaskBoardLanes.filter(de=>de!==B)})),e[3]=R,e[4]=H):H=e[4];const Z=H,J=B=>Kc({overId:B,statusOf:ne=>z.find(te=>te.id===ne)?.status});let q;e[5]!==a?(q=B=>a.has(B)&&a.size>1?[B,...Array.from(a).filter(ne=>ne!==B)]:[B],e[5]=a,e[6]=q):q=e[6];const W=q;let X;e[7]===Symbol.for("react.memo_cache_sentinel")?(X=(B,ne,te)=>{const de=Cl(te,B.length);_(ce=>{const ke=new Map(ce);return B.forEach((Me,Ie)=>ke.set(Me,{status:ne,sortOrder:de[Ie]})),ke})},e[7]=X):X=e[7];const se=X;let ee;e[8]===Symbol.for("react.memo_cache_sentinel")?(ee={activationConstraint:{distance:4}},e[8]=ee):ee=e[8];let le;e[9]===Symbol.for("react.memo_cache_sentinel")?(le={coordinateGetter:sc},e[9]=le):le=e[9];const pe=Qo(yi(Yo,ee),yi(Zo,le)),Ce=B=>{const ne=String(B.active.id),te=J(B.over?.id),de=z.find(Ie=>Ie.id===ne);if(!te||!de||de.status===te)return;const ce=W(ne),ke=String(B.over?.id??""),Me=F(te).filter(Ie=>!ce.includes(Ie.id));se(ce,te,ji(Me,ke.startsWith(Aa)?null:ke,ne))},_e=B=>{const ne=String(B.active.id);v(null);const te=J(B.over?.id)??z.find(Be=>Be.id===ne)?.status;if(!te){_(new Map);return}const de=W(ne),ce=F(te),ke=String(B.over?.id??""),Me=ce.findIndex(Be=>Be.id===ne),Ie=ke.startsWith(Aa)?ce.length-1:ce.findIndex(Be=>Be.id===ke),ye=Me===-1||Ie===-1?ce:nc(ce,Me,Ie);if(s.filter(Be=>Be.status===te).sort(ll).map(h1).join()===ye.map(f1).join()){_(new Map);return}const Xe=ye.slice(ye.findIndex(Be=>Be.id===ne)+1).find(Be=>!de.includes(Be.id)),Ke=ji(ce.filter(Be=>!de.includes(Be.id)),Xe?.id??null,ne);se(de,te,Ke),S(de),u(de,te,Ke)},xe=y?z.find(B=>B.id===y):null;let fe;e[10]!==y||e[11]!==W?(fe=y?W(y):[],e[10]=y,e[11]=W,e[12]=fe):fe=e[12];const be=fe;let je;e[13]===Symbol.for("react.memo_cache_sentinel")?(je=B=>{v(String(B.active.id)),S([])},e[13]=je):je=e[13];let Ne;e[14]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{v(null),_(new Map)},e[14]=Ne):Ne=e[14];const De=dl.createPortal,me=Xo,G=null,oe=xe&&i.jsxs("div",{className:"relative w-[292px] cursor-grabbing",children:[i.jsx(Ao,{item:xe,assignee:xe.assigneeId?n.get(xe.assigneeId):void 0,assignedBy:xe.assignedBy?n.get(xe.assignedBy):void 0,selected:a.has(xe.id),onOpen:u1,className:"w-full shadow-lg"}),be.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:be.length})]});let ae;e[15]!==me||e[16]!==oe?(ae=i.jsx(me,{dropAnimation:G,children:oe}),e[15]=me,e[16]=oe,e[17]=ae):ae=e[17];let Se;return e[18]!==De||e[19]!==ae?(Se=De(ae,document.body),e[18]=De,e[19]=ae,e[20]=Se):Se=e[20],i.jsxs(Jo,{sensors:pe,collisionDetection:ec,onDragStart:je,onDragOver:Ce,onDragEnd:_e,onDragCancel:Ne,children:[i.jsx("div",{ref:O,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:[V.map(B=>i.jsx(x1,{status:B,items:F(B),members:r,memberByUserId:n,selectedIds:a,isTarget:xe?.status===B,hiddenIds:be,landedIds:j,onToggleSelect:l,onSelectAllInLane:o,onOpen:c,onCreate:d,onAutoFix:f,onRerun:h,onAssign:x,onPriorityChange:g,onTypeChange:p,onDueDateChange:k,onHide:K.includes(B)?()=>Z(B,!1):void 0},B)),Q.length>0&&i.jsx(g1,{statuses:Q,countOf:B=>F(B).length,onShow:B=>Z(B,!0)})]})}),Se]})}function u1(){}function f1(t){return t.id}function h1(t){return t.id}function p1(t){return t.status}function m1(t){return`${t.id}:${t.status}`}function g1(t){const e=D.c(19),{statuses:s,countOf:r,onShow:n}=t,a=Y();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(Ha,{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}=or(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(Ve,{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(Yn,{size:15})})}),i.jsx(Qe,{align:"end",children:i.jsx(ve,{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 x1(t){const e=D.c(100),{status:s,items:r,members:n,memberByUserId:a,selectedIds:l,isTarget:o,hiddenIds:c,landedIds:d,onToggleSelect:u,onSelectAllInLane:f,onOpen:h,onCreate:x,onAutoFix:g,onRerun:p,onAssign:k,onPriorityChange:b,onTypeChange:m,onDueDateChange:y,onHide:v}=t,w=Y(),{label:j,visual:S}=or(s,w),C=S.icon,N=`${Aa}${s}`;let _;e[0]!==N?(_={id:N},e[0]=N,e[1]=_):_=e[1];const{setNodeRef:$}=tc(_),R=o&&"bg-muted/50";let E;e[2]!==R?(E=M("flex h-full w-[300px] shrink-0 flex-col rounded-xl py-1 transition-colors",R),e[2]=R,e[3]=E):E=e[3];const P=o?"bg-muted":"bg-background";let O;e[4]!==P?(O=M("sticky top-0 z-10 flex items-center gap-2 px-2 py-1.5 transition-colors",P),e[4]=P,e[5]=O):O=e[5];const z=15,F=M("shrink-0",S.iconClassName.replace(/\banimate-\S+\b/g,"").trim());let V;e[6]!==C||e[7]!==F?(V=i.jsx(C,{size:z,className:F}),e[6]=C,e[7]=F,e[8]=V):V=e[8];let Q;e[9]!==j?(Q=i.jsx("span",{className:"text-sm font-medium text-foreground",children:j}),e[9]=j,e[10]=Q):Q=e[10];let K;e[11]!==r.length?(K=i.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:r.length}),e[11]=r.length,e[12]=K):K=e[12];let H;e[13]!==j||e[14]!==w?(H=w("taskBoard.taskBoard.laneMenuAriaLabel",{lane:j}),e[13]=j,e[14]=w,e[15]=H):H=e[15];let Z;e[16]===Symbol.for("react.memo_cache_sentinel")?(Z=i.jsx(Yn,{size:15}),e[16]=Z):Z=e[16];let J;e[17]!==H?(J=i.jsx(Ve,{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:Z})}),e[17]=H,e[18]=J):J=e[18];let q;e[19]!==f||e[20]!==s?(q=()=>f(s),e[19]=f,e[20]=s,e[21]=q):q=e[21];let W;e[22]!==w?(W=w("taskBoard.taskBoard.selectAllInLane"),e[22]=w,e[23]=W):W=e[23];let X;e[24]!==q||e[25]!==W?(X=i.jsx(ve,{onClick:q,children:W}),e[24]=q,e[25]=W,e[26]=X):X=e[26];let se;e[27]!==v||e[28]!==w?(se=v&&i.jsx(ve,{onClick:v,children:w("taskBoard.taskBoard.hideColumn")}),e[27]=v,e[28]=w,e[29]=se):se=e[29];let ee;e[30]!==X||e[31]!==se?(ee=i.jsxs(Qe,{align:"end",children:[X,se]}),e[30]=X,e[31]=se,e[32]=ee):ee=e[32];let le;e[33]!==J||e[34]!==ee?(le=i.jsxs(Ze,{children:[J,ee]}),e[33]=J,e[34]=ee,e[35]=le):le=e[35];let pe;e[36]!==j||e[37]!==w?(pe=w("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:j}),e[36]=j,e[37]=w,e[38]=pe):pe=e[38];let Ce;e[39]!==j||e[40]!==w?(Ce=w("taskBoard.taskBoard.newTaskInLaneTitle",{lane:j}),e[39]=j,e[40]=w,e[41]=Ce):Ce=e[41];let _e;e[42]!==x||e[43]!==s?(_e=()=>x(s),e[42]=x,e[43]=s,e[44]=_e):_e=e[44];let xe;e[45]===Symbol.for("react.memo_cache_sentinel")?(xe=i.jsx(lr,{size:15}),e[45]=xe):xe=e[45];let fe;e[46]!==pe||e[47]!==Ce||e[48]!==_e?(fe=i.jsx("button",{type:"button","aria-label":pe,title:Ce,onClick:_e,className:"flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:xe}),e[46]=pe,e[47]=Ce,e[48]=_e,e[49]=fe):fe=e[49];let be;e[50]!==Q||e[51]!==K||e[52]!==le||e[53]!==fe||e[54]!==O||e[55]!==V?(be=i.jsxs("div",{className:O,children:[V,Q,K,le,fe]}),e[50]=Q,e[51]=K,e[52]=le,e[53]=fe,e[54]=O,e[55]=V,e[56]=be):be=e[56];let je;e[57]!==r?(je=r.map(k1),e[57]=r,e[58]=je):je=e[58];let Ne;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 oe;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?(oe=ae=>i.jsx(b1,{item:ae,assignee:ae.assigneeId?a.get(ae.assigneeId):void 0,assignedBy:ae.assignedBy?a.get(ae.assignedBy):void 0,members:n,selected:l.has(ae.id),hidden:c.includes(ae.id),landed:d.includes(ae.id),onToggleSelect:()=>u(ae.id),onOpen:()=>h(ae),onAutoFix:g?()=>g(ae):void 0,onRerun:p?()=>p(ae):void 0,onAssign:k?Se=>k(ae.id,Se):void 0,onPriorityChange:b?Se=>b(ae.id,Se):void 0,onTypeChange:m?Se=>m(ae.id,Se):void 0,onDueDateChange:y?Se=>y(ae.id,Se):void 0},ae.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]=oe):oe=e[87],Ne=r.map(oe),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]=Ne}else Ne=e[73];let De;e[88]!==je||e[89]!==Ne?(De=i.jsx(rc,{items:je,strategy:ac,children:Ne}),e[88]=je,e[89]=Ne,e[90]=De):De=e[90];let me;e[91]!==$||e[92]!==s||e[93]!==De?(me=i.jsx("div",{ref:$,"data-lane-scroll":s,className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-1 pt-1 pb-16 [scrollbar-width:thin] [&::-webkit-scrollbar]:w-1",children:De}),e[91]=$,e[92]=s,e[93]=De,e[94]=me):me=e[94];let G;return e[95]!==s||e[96]!==be||e[97]!==me||e[98]!==E?(G=i.jsxs("div",{"data-lane":s,className:E,children:[be,me]}),e[95]=s,e[96]=be,e[97]=me,e[98]=E,e[99]=G):G=e[99],G}function k1(t){return t.id}function b1(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}=ic(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=lc.Translate.toString(u),e[12]=u,e[13]=m):m=e[13];const y=h||s?0:void 0;let v;e[14]!==m||e[15]!==y||e[16]!==f?(v={transform:m,transition:f,opacity:y},e[14]=m,e[15]=y,e[16]=f,e[17]=v):v=e[17];let w;e[18]!==r||e[19]!==a||e[20]!==d||e[21]!==p||e[22]!==b||e[23]!==v?(w=i.jsx(Ao,{...a,item:r,dragRef:d,bindings:p,className:b,style:v}),e[18]=r,e[19]=a,e[20]=d,e[21]=p,e[22]=b,e[23]=v,e[24]=w):w=e[24];let j;return e[25]!==r.id||e[26]!==r.status||e[27]!==w?(j=i.jsx("div",{className:"flex","data-flip-id":x,"data-flip-lane":g,children:w}),e[25]=r.id,e[26]=r.status,e[27]=w,e[28]=j):j=e[28],j}function Ao(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=Y(),v=Wm(s);let w;e[0]!==s?(w=zc(s),e[0]=s,e[1]=w):w=e[1];const j=w;let S,C,N,_,$,R,E,P,O,z,F,V;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){C=Lc(s)?y("taskBoard.taskBoard.blockedBadgeTitle"):null;const ee=x&&(s.status==="triage"||s.status==="todo")&&s.assigneeId!==Ae,le=g&&!ee&&s.assigneeId===Ae&&s.status!=="done";S=ee?{icon:zr,label:y("taskBoard.taskBoard.autoFix"),onClick:x}:le?{icon:Qr,label:y("taskBoard.taskBoard.rerun"),onClick:g}:null,P="button",O=c,z=u,F=d?.attributes,V=d?.listeners,e[27]!==h||e[28]!==f?(N=pe=>{pe.shiftKey&&f?f():h()},e[27]=h,e[28]=f,e[29]=N):N=e[29],_=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",C?"bg-warning/10 hover:bg-warning/15":"bg-card hover:bg-accent/60",j==="failed"?"card-ring-destructive":C&&"card-ring-warning",l&&"bg-accent",o),E="flex items-start gap-2",R="relative min-w-0 flex-1 text-[14px] font-[450] leading-snug",$=M("block text-foreground line-clamp-2",S&&"group-hover:fade-text-end"),e[2]=d?.attributes,e[3]=d?.listeners,e[4]=o,e[5]=c,e[6]=s,e[7]=x,e[8]=h,e[9]=g,e[10]=f,e[11]=j,e[12]=l,e[13]=u,e[14]=y,e[15]=S,e[16]=C,e[17]=N,e[18]=_,e[19]=$,e[20]=R,e[21]=E,e[22]=P,e[23]=O,e[24]=z,e[25]=F,e[26]=V}else S=e[15],C=e[16],N=e[17],_=e[18],$=e[19],R=e[20],E=e[21],P=e[22],O=e[23],z=e[24],F=e[25],V=e[26];let Q;e[30]!==s.title||e[31]!==$?(Q=i.jsx("span",{className:$,children:s.title}),e[30]=s.title,e[31]=$,e[32]=Q):Q=e[32];let K;e[33]!==S?(K=S&&i.jsx(Lm,{action:S}),e[33]=S,e[34]=K):K=e[34];let H;e[35]!==Q||e[36]!==K||e[37]!==R?(H=i.jsxs("div",{className:R,children:[Q,K]}),e[35]=Q,e[36]=K,e[37]=R,e[38]=H):H=e[38];let Z;e[39]!==C?(Z=C&&i.jsx("span",{className:"sr-only",children:C}),e[39]=C,e[40]=Z):Z=e[40];let J;e[41]!==j?(J=j&&i.jsx(Km,{state:j}),e[41]=j,e[42]=J):J=e[42];let q;e[43]!==H||e[44]!==Z||e[45]!==J||e[46]!==E?(q=i.jsxs("div",{className:E,children:[H,Z,J]}),e[43]=H,e[44]=Z,e[45]=J,e[46]=E,e[47]=q):q=e[47];let W;e[48]!==s.tags?(W=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,_a).map(y1),s.tags.length>_a&&i.jsxs("span",{className:Vt,children:["+",s.tags.length-_a]})]}),e[48]=s.tags,e[49]=W):W=e[49];let X;e[50]!==n||e[51]!==r||e[52]!==v||e[53]!==s||e[54]!==a||e[55]!==p||e[56]!==m||e[57]!==k||e[58]!==b?(X=i.jsx(Fm,{item:s,checks:v,assignee:r,assignedBy:n,members:a,onAssign:p,onPriorityChange:k,onTypeChange:b,onDueDateChange:m}),e[50]=n,e[51]=r,e[52]=v,e[53]=s,e[54]=a,e[55]=p,e[56]=m,e[57]=k,e[58]=b,e[59]=X):X=e[59];let se;return e[60]!==N||e[61]!==_||e[62]!==q||e[63]!==W||e[64]!==X||e[65]!==P||e[66]!==O||e[67]!==z||e[68]!==F||e[69]!==V?(se=i.jsxs("button",{type:P,ref:O,style:z,...F,...V,onClick:N,className:_,children:[q,W,X]}),e[60]=N,e[61]=_,e[62]=q,e[63]=W,e[64]=X,e[65]=P,e[66]=O,e[67]=z,e[68]=F,e[69]=V,e[70]=se):se=e[70],se}function y1(t){return i.jsx(_o,{tag:t},t.id)}function w1(t){const e=D.c(38),{item:s,assignee:r,assignedBy:n,onOpen:a}=t;let l;e[0]!==s.status?(l=Ba(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",vl(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=Pc(s)&&i.jsx(Nm,{}),e[9]=s,e[10]=f):f=e[10];let h;e[11]!==s?(h=Oc(s)&&i.jsx(_m,{}),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(Hm,{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(qm,{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(v1),s.tags.length>2&&i.jsxs("span",{className:Vt,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(Bo,{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=Ka(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 v1(t){return i.jsx(_o,{tag:t},t.id)}function Rg(t){const e=D.c(5),{seed:s,children:r}=t;let n;e[0]!==s?(n=()=>{const o=new Uo({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(Ko,{fallback:null,children:i.jsx(L.Suspense,{fallback:null,children:i.jsx(Wo,{client:a,children:r})})})}),e[2]=r,e[3]=a,e[4]=l):l=e[4],l}const ol=new Date().toISOString();function $t(t,e,s,r,n,a){return{id:t,organizationId:"preview",title:e,description:null,status:s,priority:n,type:r,assigneeId:null,assignedBy:null,repo:null,dueDate:null,sortOrder:a,keySeq:a,externalUrl:null,previewRoutes:[],source:null,retryAttempts:0,reviewCycleStartedAt:null,threads:[],tags:[],reviewVerdicts:[],createdBy:"preview",createdAt:ol,updatedBy:"preview",updatedAt:ol}}function $g(){return{items:[$t("p1","Fix checkout shipping estimate","todo","bug","high",1),$t("p2","Add size guide to product page","todo","feature","medium",2),$t("p3","Compress hero images","todo","chore","low",3),$t("p4","Rewrite category descriptions","in_progress","feature","medium",4),$t("p5","Audit broken redirects","in_progress","chore","high",5),$t("p6","New arrivals landing page","in_review","feature","high",6),$t("p7","Speed up search results","done","chore","medium",7),$t("p8","Black Friday banner","done","feature","urgent",8)],repos:[],columns:[]}}export{Rg as P,Dg as T,$g as m};