@decocms/mesh 2.130.1 → 2.131.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/dist/client/assets/{AlertCircle-Y6iSJK0t.js → AlertCircle-0hiOc8CZ.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-r7aH80QB.js → AlertOctagon-GN8B-INI.js} +1 -1
  3. package/dist/client/assets/AlignLeft-BgC5LMd0.js +1 -0
  4. package/dist/client/assets/{ArrowDown-DPy5cnDQ.js → ArrowDown-PNhqRNxD.js} +1 -1
  5. package/dist/client/assets/{ArrowLeft-p4dfchJF.js → ArrowLeft-wS11NpwF.js} +1 -1
  6. package/dist/client/assets/{ArrowUp-Dx6U6WtF.js → ArrowUp-CH0M2x4i.js} +1 -1
  7. package/dist/client/assets/{Check-BIaai9j0.js → Check-xLOyX88L.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DvhMgeYT.js → CheckCircle-D15lJ7XR.js} +1 -1
  9. package/dist/client/assets/{CheckDone01-kUo2KMa3.js → CheckDone01-C40blUb5.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-DfOayhlO.js → CheckVerified02-Dicrho5O.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-Dyskz-ZD.js → ChevronDown-p63TAVBS.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-D6p6jiry.js → ChevronRight-D_Ht_JRW.js} +1 -1
  13. package/dist/client/assets/{Clock-Dymou738.js → Clock-DrIhUE6G.js} +1 -1
  14. package/dist/client/assets/{Code01-BYnTXqsh.js → Code01-CvvU9TcF.js} +1 -1
  15. package/dist/client/assets/{Container-DBGOFJUc.js → Container-ufACj1Zy.js} +1 -1
  16. package/dist/client/assets/{Copy01-CPaHCgqg.js → Copy01-HMjceblh.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-D8kdCLb1.js → Dataflow03-y0rpKbi9.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-Ra63dU8X.js → DotsHorizontal-2R4cCOu7.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-DcLEsGDj.js → DotsVertical-Bda0yV1s.js} +1 -1
  20. package/dist/client/assets/{Download01-BP0Ze81Q.js → Download01-DfNl1ci5.js} +1 -1
  21. package/dist/client/assets/{Edit01-BEBZ-Ht5.js → Edit01-BF7NKi37.js} +1 -1
  22. package/dist/client/assets/{Eye-VtlrDhJf.js → Eye-jbWvzlxk.js} +1 -1
  23. package/dist/client/assets/{File02-Dcc2k6VI.js → File02-CbYedhXN.js} +1 -1
  24. package/dist/client/assets/{File06-DCHaBaad.js → File06-BM5aCl-O.js} +1 -1
  25. package/dist/client/assets/{FilterLines-D64nKG0E.js → FilterLines-CJpyRJ7t.js} +1 -1
  26. package/dist/client/assets/{Globe01-Rd2g694_.js → Globe01-BfTcTY8o.js} +1 -1
  27. package/dist/client/assets/{Globe02-nOidPs01.js → Globe02-CGDduE0L.js} +1 -1
  28. package/dist/client/assets/{Grid01-C8gF-dWK.js → Grid01-Z7sWikL1.js} +1 -1
  29. package/dist/client/assets/{Hash02-fd4i0k8G.js → Hash02-K4dRD2dR.js} +1 -1
  30. package/dist/client/assets/{Home02-ABQZ6xOx.js → Home02-hJdk8eNH.js} +1 -1
  31. package/dist/client/assets/{Image01-BrzUQQ9K.js → Image01-CuKvPASB.js} +1 -1
  32. package/dist/client/assets/{Inbox01-DK0JkUYE.js → Inbox01-CglLjipa.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-DO1owwAA.js → InfoCircle-Bb6fqYc8.js} +1 -1
  34. package/dist/client/assets/{Key01-bHmq-6W2.js → Key01-LKATn8lY.js} +1 -1
  35. package/dist/client/assets/{LinkExternal01-DyOgk9O3.js → LinkExternal01-D_U0OEXZ.js} +1 -1
  36. package/dist/client/assets/{List-mX8yEKmx.js → List-QV8E4GNR.js} +1 -1
  37. package/dist/client/assets/{Loading01-Jv8Mbea8.js → Loading01-CWvnRL6a.js} +1 -1
  38. package/dist/client/assets/{Lock01-DPx3YF5B.js → Lock01-Bwx9HnGh.js} +1 -1
  39. package/dist/client/assets/{Play-DciA3rqD.js → Play-Icpx1cq_.js} +1 -1
  40. package/dist/client/assets/{Plus-Cecv4wEo.js → Plus-C-k6EyqD.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-Busgf2jQ.js → RefreshCcw01-DCPzxJqp.js} +1 -1
  42. package/dist/client/assets/{Rows03-CBXDKtLW.js → Rows03-BxHdq4li.js} +1 -1
  43. package/dist/client/assets/{Save01-P2clZJAi.js → Save01-SegoBYVF.js} +1 -1
  44. package/dist/client/assets/{SearchMd-CS2uMIPl.js → SearchMd-TuCoj3FU.js} +1 -1
  45. package/dist/client/assets/{Settings01-BAgxhvm4.js → Settings01-DovilCf0.js} +1 -1
  46. package/dist/client/assets/{Shield01-Dw8oloiN.js → Shield01-EZO761pG.js} +1 -1
  47. package/dist/client/assets/{Terminal-d72o721Q.js → Terminal-D1kaOGFC.js} +1 -1
  48. package/dist/client/assets/{Trash01-CKATI1mI.js → Trash01-CPjIZLEP.js} +1 -1
  49. package/dist/client/assets/{Upload01-jmiBld-4.js → Upload01-DAh3LDGl.js} +1 -1
  50. package/dist/client/assets/{Users03-CLx_Qxdb.js → Users03-C6jjP916.js} +1 -1
  51. package/dist/client/assets/{X-RC7YVNJU.js → X-tkzrbQVp.js} +1 -1
  52. package/dist/client/assets/{XCircle-BgJPZWR5.js → XCircle-Cs5fpSB3.js} +1 -1
  53. package/dist/client/assets/{XClose-D-4ELBrc.js → XClose-BvPNH9hN.js} +1 -1
  54. package/dist/client/assets/{agent-connections-preview-Dac4pEFh.js → agent-connections-preview-Dpe_MFjy.js} +1 -1
  55. package/dist/client/assets/agent-detail-DZUg4-s5.js +2 -0
  56. package/dist/client/assets/{agents-vcyOPs3U.js → agents-BWNX2LSR.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-CdqWA8wc.js → alert-dialog-COYgvBCq.js} +1 -1
  58. package/dist/client/assets/{auth-catchall-B-_Zqliv.js → auth-catchall-COXncBeo.js} +1 -1
  59. package/dist/client/assets/{avatar-tLGNC2ok.js → avatar-B9DZwrpo.js} +1 -1
  60. package/dist/client/assets/{badge-0EzsH3AB.js → badge-qrWA_kLG.js} +1 -1
  61. package/dist/client/assets/{binder-w9dF9fSa.js → binder-13i_lQ0c.js} +1 -1
  62. package/dist/client/assets/{breadcrumb-BcJj21EL.js → breadcrumb-Zdkq43pK.js} +1 -1
  63. package/dist/client/assets/{card-c-CJHmFC.js → card-DD-UCxfi.js} +1 -1
  64. package/dist/client/assets/{chart-PoFYShLf.js → chart-Dtw6L5md.js} +1 -1
  65. package/dist/client/assets/{checkbox-kw1ENx9l.js → checkbox-C_Pgnv4n.js} +1 -1
  66. package/dist/client/assets/{circle-alert-orNW2INv.js → circle-alert-DdDFLH9P.js} +1 -1
  67. package/dist/client/assets/{collection-detail-DcWT7KrG.js → collection-detail-Cg75ipNi.js} +3 -3
  68. package/dist/client/assets/{collection-search-DeB-znan.js → collection-search-CxUg-xAQ.js} +1 -1
  69. package/dist/client/assets/{collection-tab-DnFTZr-h.js → collection-tab-C62wXALQ.js} +1 -1
  70. package/dist/client/assets/{collection-table-wrapper-BkrnGVuo.js → collection-table-wrapper-Bz8WElPd.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-CI_dPETO.js → collection-tabs-BjWYcsD2.js} +1 -1
  72. package/dist/client/assets/{command-CtwsQYlg.js → command-wm5iG4Qy.js} +1 -1
  73. package/dist/client/assets/{connect-Cjj5OaBk.js → connect-nlKsY2am.js} +1 -1
  74. package/dist/client/assets/{connection-card-DmcuYZ2d.js → connection-card-CqQpoqHp.js} +1 -1
  75. package/dist/client/assets/connection-detail-0Jk736m3.js +1 -0
  76. package/dist/client/assets/{connections-CQQbEDkG.js → connections-Cg2j2p3f.js} +1 -1
  77. package/dist/client/assets/constants-CbHMb0-K.js +1 -0
  78. package/dist/client/assets/{constants-DyBxaLKI.js → constants-CilfzTas.js} +1 -1
  79. package/dist/client/assets/context-CkGm0UTl.js +23 -0
  80. package/dist/client/assets/{create-organization-dialog-BolmWoUA.js → create-organization-dialog-DCEdnDTn.js} +1 -1
  81. package/dist/client/assets/{create-project-dialog-MbK1spLU.js → create-project-dialog-BWnYbbO8.js} +1 -1
  82. package/dist/client/assets/{dialog-L8ZakXii.js → dialog-iHT0i0tz.js} +1 -1
  83. package/dist/client/assets/{dropdown-menu-VTiqKHN9.js → dropdown-menu-BpyVIc2a.js} +1 -1
  84. package/dist/client/assets/{dynamic-plugin-layout-CMgyIw65.js → dynamic-plugin-layout-BG3KkqG4.js} +1 -1
  85. package/dist/client/assets/{editable-thread-title-CPogfRoD.js → editable-thread-title-BxqvtSds.js} +1 -1
  86. package/dist/client/assets/{empty-state-CevFdaoX.js → empty-state-ozmf3847.js} +1 -1
  87. package/dist/client/assets/{env-vars-editor-CZ9xwqbP.js → env-vars-editor-Nr3mWxuy.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-bPHhUn8L.js → extract-connection-data-DFqYDb10.js} +1 -1
  89. package/dist/client/assets/{file-browser-BBOKW0fZ.js → file-browser-D_9g9ebY.js} +2 -2
  90. package/dist/client/assets/{form-p8UY3zWX.js → form-BP7dMbdn.js} +1 -1
  91. package/dist/client/assets/{grid-view-CBiwYQ_M.js → grid-view-CPznGSAH.js} +1 -1
  92. package/dist/client/assets/{home-gtPjmaoD.js → home-DGwiBCGX.js} +1 -1
  93. package/dist/client/assets/{index-G8oxxr2G.js → index-0ocXQ777.js} +1 -1
  94. package/dist/client/assets/{index-BymQJSqf.js → index-BHlJRTz3.js} +1 -1
  95. package/dist/client/assets/{index-CmPWq7Ch.js → index-CCY7DImO.js} +1 -1
  96. package/dist/client/assets/{index-BPWcS_Kf.js → index-CDOpTYgU.js} +41 -41
  97. package/dist/client/assets/{index-CWyCvGNo.js → index-CEU_Ae_m.js} +1 -1
  98. package/dist/client/assets/{index-BRPNbM-s.js → index-CG50wTGS.js} +1 -1
  99. package/dist/client/assets/{index-CqCzS9v2.js → index-CGrDr99B.js} +1 -1
  100. package/dist/client/assets/index-DGca9RW1.css +1 -0
  101. package/dist/client/assets/{index-Cz17zD6m.js → index-DWQkOhqZ.js} +1 -1
  102. package/dist/client/assets/{index-0HoOnen3.js → index-plkk4e_J.js} +3 -3
  103. package/dist/client/assets/{infiniteQueryObserver-Be7iTEXe.js → infiniteQueryObserver-DaMN_U7y.js} +1 -1
  104. package/dist/client/assets/{input-BtUicd3Q.js → input-CmqvOeLB.js} +1 -1
  105. package/dist/client/assets/{integration-icon-5VjL1GgL.js → integration-icon-KIbgHijj.js} +1 -1
  106. package/dist/client/assets/{label-D6atofYo.js → label-bnFjyLyV.js} +1 -1
  107. package/dist/client/assets/{layout-Cgu_nW-7.js → layout-eozNid8i.js} +1 -1
  108. package/dist/client/assets/{localstorage-keys-BoChS3hJ.js → localstorage-keys-v0BD3Bnj.js} +1 -1
  109. package/dist/client/assets/{login-BJHT5HcO.js → login-CBgrYal6.js} +1 -1
  110. package/dist/client/assets/{markdown-C4hTkq3E.js → markdown-CPbw-_yp.js} +1 -1
  111. package/dist/client/assets/{mcp-oauth-D5R57Lko.js → mcp-oauth-B013QyX1.js} +1 -1
  112. package/dist/client/assets/{mcp-server-card-BiIhdNix.js → mcp-server-card-ncXA5Jvx.js} +1 -1
  113. package/dist/client/assets/{mcp-server-detail-BhlbPBsp.js → mcp-server-detail-3iu4l0w5.js} +2 -2
  114. package/dist/client/assets/{members-OikP95XQ.js → members-CImSfQo3.js} +1 -1
  115. package/dist/client/assets/{monitoring-DapgIfZL.js → monitoring-ChNXdpYB.js} +1 -1
  116. package/dist/client/assets/monitoring-dashboard-edit-Cu-THApH.js +1 -0
  117. package/dist/client/assets/{monitoring-dashboard-view-DRykeaHO.js → monitoring-dashboard-view-BzUwVgh9.js} +1 -1
  118. package/dist/client/assets/{oauth-callback-DZIR2PjB.js → oauth-callback-DZs-RHtN.js} +1 -1
  119. package/dist/client/assets/page-B6FWTLb-.js +1 -0
  120. package/dist/client/assets/{page-PH6ZVWlA.js → page-D9R69UOA.js} +1 -1
  121. package/dist/client/assets/{plugin-empty-state-kz2uan6n.js → plugin-empty-state-C2xpGFC3.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-y1tYhlY3.js → plugin-empty-state-CHtrUf1n.js} +1 -1
  123. package/dist/client/assets/{plugin-header-BJbVVCoY.js → plugin-header-CUHoCr6W.js} +1 -1
  124. package/dist/client/assets/{plugin-header-nmFTSFoR.js → plugin-header-CoAFaSME.js} +1 -1
  125. package/dist/client/assets/{popover-P8B4MdX3.js → popover-BIhQBNxG.js} +1 -1
  126. package/dist/client/assets/project-layout-GwHfcyse.js +1 -0
  127. package/dist/client/assets/{projects-list-3Z4u-J4l.js → projects-list-xLnE8dj1.js} +1 -1
  128. package/dist/client/assets/{ranking-layout-DDk0F0da.js → ranking-layout-g51-toAX.js} +1 -1
  129. package/dist/client/assets/{readme-viewer-BFDmw5ln.js → readme-viewer-ClGynTaO.js} +1 -1
  130. package/dist/client/assets/{registry-layout-tBKkcjtf.js → registry-layout-Dm3suQ96.js} +1 -1
  131. package/dist/client/assets/{registry-utils-BPK3KAEQ.js → registry-utils-CT2cHZWq.js} +1 -1
  132. package/dist/client/assets/{reports-layout-C1Rj5mWL.js → reports-layout-CJCUfohD.js} +1 -1
  133. package/dist/client/assets/{reset-password-CoNNt1yx.js → reset-password-Cv5Uxbmm.js} +1 -1
  134. package/dist/client/assets/{resizable-CpFkObl0.js → resizable-Cwh2gJdN.js} +1 -1
  135. package/dist/client/assets/{save-actions-CNp28sAN.js → save-actions-D1fibul5.js} +1 -1
  136. package/dist/client/assets/{scroll-area-Bhoi0n_B.js → scroll-area-CqN1XcNu.js} +4 -4
  137. package/dist/client/assets/{select-DOO2sOs0.js → select-DzSheW-c.js} +1 -1
  138. package/dist/client/assets/shell-layout-B0efKbYl.js +3 -0
  139. package/dist/client/assets/{skeleton-CR236scd.js → skeleton-Ddk21_zG.js} +1 -1
  140. package/dist/client/assets/{spinner-DzG2AImj.js → spinner-DThNWGT1.js} +1 -1
  141. package/dist/client/assets/{store-invite-CeIOMnWs.js → store-invite-DoNiJ_2C.js} +1 -1
  142. package/dist/client/assets/{switch-UjGh-56-.js → switch-BHoytSWv.js} +1 -1
  143. package/dist/client/assets/{table-CK5AQN01.js → table-C75ROyVe.js} +1 -1
  144. package/dist/client/assets/{tabs-ZEd61iZd.js → tabs-CgeHjw7d.js} +1 -1
  145. package/dist/client/assets/tasks-J3R0xo09.js +1 -0
  146. package/dist/client/assets/{textarea-Ca7XZUqN.js → textarea-D0tgU2KU.js} +1 -1
  147. package/dist/client/assets/{time-range-picker-GPYqbq-o.js → time-range-picker-upAU-oKs.js} +1 -1
  148. package/dist/client/assets/{toggle-group-BgEBi3gu.js → toggle-group-BkgC_GPy.js} +1 -1
  149. package/dist/client/assets/{tools-list-DJeaOzT_.js → tools-list-DcUxVw8u.js} +1 -1
  150. package/dist/client/assets/{tooltip-BWlQ9UL9.js → tooltip-Bnw97WFs.js} +1 -1
  151. package/dist/client/assets/{topbar-portal-CMlW5IwY.js → topbar-portal-C7BEToqh.js} +1 -1
  152. package/dist/client/assets/{types-BPCR06YW.js → types-C3qz9fLX.js} +1 -1
  153. package/dist/client/assets/{use-binding-CcrgjIcJ.js → use-binding-BnDQaQ8a.js} +1 -1
  154. package/dist/client/assets/{use-connection-B6TFiTxb.js → use-connection-CQasYzzj.js} +1 -1
  155. package/dist/client/assets/{use-copy-DfInz4oY.js → use-copy-Co7gHvim.js} +1 -1
  156. package/dist/client/assets/{use-create-virtual-mcp-pELq4UZ_.js → use-create-virtual-mcp-D-bJGh_Q.js} +1 -1
  157. package/dist/client/assets/{use-deco-chat-open-BmqwFIXp.js → use-deco-chat-open-DzCwN_oU.js} +1 -1
  158. package/dist/client/assets/{use-install-from-registry-BCXPqkOi.js → use-install-from-registry-GXYG5L7Y.js} +1 -1
  159. package/dist/client/assets/{use-list-state-Bpa4-xTU.js → use-list-state-BDwJVbli.js} +1 -1
  160. package/dist/client/assets/{use-llm-7gZpMpM0.js → use-llm-BwSqXALL.js} +1 -1
  161. package/dist/client/assets/{use-mcp-prompts-BIRErCHu.js → use-mcp-prompts-CN7UYKcE.js} +1 -1
  162. package/dist/client/assets/{use-mcp-tools-BjSYCbSh.js → use-mcp-tools-CvszUz7q.js} +1 -1
  163. package/dist/client/assets/{use-members-BUeDkAPW.js → use-members-DBSMoNj3.js} +1 -1
  164. package/dist/client/assets/{use-mobile-B9jSIPRg.js → use-mobile-DLdIzb3b.js} +1 -1
  165. package/dist/client/assets/{use-project-B6kYJzwY.js → use-project-DoeOF1FB.js} +1 -1
  166. package/dist/client/assets/{use-settings-modal-Bi52YF5w.js → use-settings-modal-D_BbrW8Q.js} +1 -1
  167. package/dist/client/assets/{use-view-mode-CHcflreW.js → use-view-mode-v-cu8Xdx.js} +1 -1
  168. package/dist/client/assets/{use-virtual-mcp-C4mcpRPm.js → use-virtual-mcp-CcREhkTd.js} +1 -1
  169. package/dist/client/assets/useInfiniteQuery-CS1K3ARI.js +1 -0
  170. package/dist/client/assets/{useMutation-C13VGcqo.js → useMutation-D4nH_fUX.js} +1 -1
  171. package/dist/client/assets/useQuery-D64ihcYY.js +1 -0
  172. package/dist/client/assets/useSuspenseInfiniteQuery-D2GBejOt.js +1 -0
  173. package/dist/client/assets/{workflow-N0cDVEpp.js → workflow-De0pszJC.js} +1 -1
  174. package/dist/client/index.html +2 -2
  175. package/dist/server/cli.js +168 -168
  176. package/dist/server/migrate.js +2 -2
  177. package/dist/server/server.js +2 -2
  178. package/package.json +1 -1
  179. package/dist/client/assets/Tool01-DkfecWlX.js +0 -1
  180. package/dist/client/assets/agent-detail-D5a7TiOz.js +0 -2
  181. package/dist/client/assets/connection-detail-DOePEdlc.js +0 -1
  182. package/dist/client/assets/constants-DK6m0rOQ.js +0 -1
  183. package/dist/client/assets/context-GOV4Tst1.js +0 -23
  184. package/dist/client/assets/deco-constants-BmtTfZbQ.js +0 -1
  185. package/dist/client/assets/index-BcDQ75Aq.css +0 -1
  186. package/dist/client/assets/monitoring-dashboard-edit-Yzekapph.js +0 -1
  187. package/dist/client/assets/page-iyMzbA2I.js +0 -1
  188. package/dist/client/assets/project-layout-BqSVP5TE.js +0 -1
  189. package/dist/client/assets/shell-layout-CSB6jzfL.js +0 -3
  190. package/dist/client/assets/tasks-C15WiR9-.js +0 -1
  191. package/dist/client/assets/useInfiniteQuery-78QQc26G.js +0 -1
  192. package/dist/client/assets/useQuery-CI6Jq2Tz.js +0 -1
  193. package/dist/client/assets/useSuspenseInfiniteQuery-BfZMgfKc.js +0 -1
@@ -1,3 +1,3 @@
1
- import{r as J,c as I,j as s,b$ as oe,v as H,m as Re,B as pe,c0 as Fe,t as fe,u as Be,a as Ue,b as qe,c1 as Ge}from"./index-0HoOnen3.js";import{c as Ve}from"./binder-w9dF9fSa.js";import{u as ye}from"./useQuery-CI6Jq2Tz.js";import{h as He}from"./use-connection-B6TFiTxb.js";import{a as Ke,u as Qe,j as We}from"./constants-DyBxaLKI.js";import{u as xe,P as Je}from"./topbar-portal-CMlW5IwY.js";import{i as ce}from"./Loading01-Jv8Mbea8.js";import{t as Ye}from"./Settings01-BAgxhvm4.js";import{i as Ze}from"./Check-BIaai9j0.js";import{t as Pe}from"./ChevronDown-Dyskz-ZD.js";import{i as Ne}from"./AlertCircle-Y6iSJK0t.js";import{i as _e}from"./ArrowLeft-p4dfchJF.js";import{n as de}from"./CheckDone01-kUo2KMa3.js";import{s as Ie}from"./Clock-Dymou738.js";import{a as Xe}from"./Copy01-CPaHCgqg.js";import{n as Ee}from"./Inbox01-DK0JkUYE.js";import{i as et}from"./CheckCircle-DvhMgeYT.js";import{i as tt}from"./InfoCircle-DO1owwAA.js";import{i as st}from"./XCircle-BgJPZWR5.js";import{u as Me}from"./useMutation-C13VGcqo.js";import{T as se,b as ne,c as le,a as ge,d as je,e as be}from"./table-CK5AQN01.js";import{M as lt}from"./markdown-C4hTkq3E.js";import{n as nt}from"./ArrowDown-DPy5cnDQ.js";import{i as it}from"./ArrowUp-Dx6U6WtF.js";import{i as ot}from"./CheckVerified02-DfOayhlO.js";import{i as Se}from"./ChevronRight-D6p6jiry.js";import{i as rt}from"./File02-Dcc2k6VI.js";import{s as at}from"./Hash02-fd4i0k8G.js";import{s as ve,i as ct}from"./Rows03-CBXDKtLW.js";import{B as dt}from"./badge-0EzsH3AB.js";import{b as mt,c as ut,d as ft,a as xt,C as pt}from"./card-c-CJHmFC.js";import{c as $e,d as me,a as Ce,b as we,S as ke}from"./select-DOO2sOs0.js";import"./index-BymQJSqf.js";const Ae=({size:t=24,color:e="currentColor",...l})=>J.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},J.createElement("path",{d:"M12 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ae.displayName="Columns02";const re={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function ht(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function gt(t){const e=I.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:a}=t,[i,r]=J.useState(!1),o=J.useRef(null);let d;if(e[0]!==l||e[1]!==n){let m;e[3]!==n?(m=S=>S.id===n,e[3]=n,e[4]=m):m=e[4],d=l.find(m),e[0]=l,e[1]=n,e[2]=d}else d=e[2];const c=d;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=m=>{o.current?.contains(m.relatedTarget)||r(!1)},e[5]=u):u=e[5];const f=u;if(l.length===1){let m;e[6]!==c?(m=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[6]=c,e[7]=m):m=e[7];const S=c?.title||"Reports";let _;e[8]!==S?(_=s.jsx("span",{children:S}),e[8]=S,e[9]=_):_=e[9];let $;return e[10]!==m||e[11]!==_?($=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m,_]}),e[10]=m,e[11]=_,e[12]=$):$=e[12],$}let p;e[13]!==i?(p=()=>r(!i),e[13]=i,e[14]=p):p=e[14];let x;e[15]!==c?(x=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[15]=c,e[16]=x):x=e[16];const h=c?.title||"Select source";let g;e[17]!==h?(g=s.jsx("span",{children:h}),e[17]=h,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Pe,{size:14}),e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==x||e[22]!==g?(N=s.jsxs("button",{type:"button",onClick:p,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[x,g,b]}),e[20]=p,e[21]=x,e[22]=g,e[23]=N):N=e[23];let y;e[24]!==l||e[25]!==i||e[26]!==a||e[27]!==n?(y=i&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(m=>s.jsxs("button",{type:"button",onClick:()=>{a(m.id),r(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[m.icon?s.jsx("img",{src:m.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:m.title}),m.id===n&&s.jsx(Ze,{size:14,className:"text-primary"})]},m.id))}),e[24]=l,e[25]=i,e[26]=a,e[27]=n,e[28]=y):y=e[28];let v;return e[29]!==N||e[30]!==y?(v=s.jsxs("div",{className:"relative",ref:o,onBlur:f,children:[N,y]}),e[29]=N,e[30]=y,e[31]=v):v=e[31],v}function jt(t){const e=I.c(2);let l;return e[0]!==t?(l=s.jsx(gt,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ue={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:et},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:Ne},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:st},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:tt}};function De(t){const e=I.c(10),{status:l,size:n}=t,a=n===void 0?"default":n,i=ue[l]??ue.info,r=i.icon,o=a==="sm",d=o?"px-2 py-0.5":"px-2.5 py-1";let c;e[0]!==i.color||e[1]!==d?(c=H("inline-flex items-center gap-1 rounded-full border text-xs font-medium",d,i.color),e[0]=i.color,e[1]=d,e[2]=c):c=e[2];const u=o?12:14;let f;e[3]!==r||e[4]!==u?(f=s.jsx(r,{size:u}),e[3]=r,e[4]=u,e[5]=f):f=e[5];let p;return e[6]!==i.label||e[7]!==c||e[8]!==f?(p=s.jsxs("span",{className:c,children:[f,i.label]}),e[6]=i.label,e[7]=c,e[8]=f,e[9]=p):p=e[9],p}function ze(t){const e=I.c(11),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(a=re.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=a):a=e[3];let i;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(i=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=i):i=e[7];let r;return e[8]!==a||e[9]!==i?(r={queryKey:a,queryFn:i,staleTime:6e4},e[8]=a,e[9]=i,e[10]=r):r=e[10],ye(r)}function bt(t){const e=I.c(10),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?(a=re.report(l,t),e[0]=l,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==n?(i=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5];const r=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==r?(o={queryKey:a,queryFn:i,enabled:r,staleTime:6e4},e[6]=a,e[7]=i,e[8]=r,e[9]=o):o=e[9],ye(o)}const yt={passing:"bg-emerald-500",warning:"bg-amber-500",failing:"bg-red-500",info:"bg-blue-500"},Te=["#A595FF","#FFC116","#DE3A6E"];function ae(t){const e=I.c(7),{icon:l,title:n}=t;let a;e[0]!==l?(a=s.jsx(l,{size:16,className:"opacity-75 shrink-0 text-foreground"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:"text-base text-foreground opacity-75",children:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==i?(r=s.jsxs("div",{className:"flex gap-2 items-center",children:[a,i]}),e[4]=a,e[5]=i,e[6]=r):r=e[6],r}function Nt(t){const e=I.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(lt,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function vt(t){const e=I.c(15),{metric:l}=t;let n;e[0]!==l.unit?(n=l.unit&&s.jsx("span",{className:"text-base text-muted-foreground ml-1",children:l.unit}),e[0]=l.unit,e[1]=n):n=e[1];let a;e[2]!==l.value||e[3]!==n?(a=s.jsxs("div",{className:"text-2xl leading-8 text-foreground font-normal tabular-nums",children:[l.value,n]}),e[2]=l.value,e[3]=n,e[4]=a):a=e[4];let i;e[5]!==l.status?(i=l.status&&s.jsx("span",{className:H("inline-block size-2 rounded-full shrink-0",yt[l.status])}),e[5]=l.status,e[6]=i):i=e[6];let r;e[7]!==l.label?(r=s.jsx("span",{className:"text-sm text-foreground",children:l.label}),e[7]=l.label,e[8]=r):r=e[8];let o;e[9]!==i||e[10]!==r?(o=s.jsxs("div",{className:"flex gap-1.5 items-center",children:[i,r]}),e[9]=i,e[10]=r,e[11]=o):o=e[11];let d;return e[12]!==a||e[13]!==o?(d=s.jsxs("div",{className:"flex flex-col gap-3 items-start justify-end border border-border rounded-lg p-5 flex-1",children:[a,o]}),e[12]=a,e[13]=o,e[14]=d):d=e[14],d}function Le(t){const e=I.c(12),{title:l,items:n,stacked:a}=t,i=a===void 0?!1:a;let r;e[0]!==l?(r=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=r):r=e[1];const o=i?"flex-col items-stretch":"items-stretch";let d;e[2]!==o?(d=H("flex gap-4",o),e[2]=o,e[3]=d):d=e[3];let c;e[4]!==n?(c=n.map(_t),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==d||e[7]!==c?(u=s.jsx("div",{className:d,children:c}),e[6]=d,e[7]=c,e[8]=u):u=e[8];let f;return e[9]!==r||e[10]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[r,u]}),e[9]=r,e[10]=u,e[11]=f):f=e[11],f}function _t(t,e){return s.jsx(vt,{metric:t},`${t.label}-${e}`)}function St(t){const e=I.c(16),{title:l,columns:n,rows:a}=t;let i;e[0]!==l?(i=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=i):i=e[1];let r;e[2]!==n?(r=n.map(wt),e[2]=n,e[3]=r):r=e[3];let o;e[4]!==r?(o=s.jsx(ge,{children:s.jsx(ne,{children:r})}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==a?(d=a.map($t),e[6]=a,e[7]=d):d=e[7];let c;e[8]!==d?(c=s.jsx(je,{children:d}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==o||e[11]!==c?(u=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(be,{children:[o,c]})}),e[10]=o,e[11]=c,e[12]=u):u=e[12];let f;return e[13]!==i||e[14]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[i,u]}),e[13]=i,e[14]=u,e[15]=f):f=e[15],f}function $t(t,e){return s.jsx(ne,{children:t.map(Ct)},e)}function Ct(t,e){return s.jsx(le,{className:"text-sm",children:t??s.jsx("span",{className:"text-muted-foreground",children:"—"})},e)}function wt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Oe(t){const e=I.c(11),{title:l,items:n}=t;let a;e[0]!==l?(a=l&&s.jsx(ae,{icon:ot,title:l}),e[0]=l,e[1]=a):a=e[1];let i;if(e[2]!==n){let d;e[4]!==n.length?(d=(c,u)=>s.jsxs("div",{className:"flex gap-4 items-stretch",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center w-4 shrink-0",children:[s.jsx("div",{className:"h-full w-px bg-border"}),s.jsx("div",{className:"w-2 h-4 rounded-full flex",style:{backgroundColor:Te[u%Te.length]}}),s.jsx("div",{className:H("h-full w-px bg-border",u===n.length-1&&"invisible")})]}),s.jsxs("div",{className:"flex flex-col gap-2 items-start py-3 pb-4 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-foreground leading-none",children:c.label}),c.description&&s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:c.description})]})]},`${c.label}-${u}`),e[4]=n.length,e[5]=d):d=e[5],i=n.map(d),e[2]=n,e[3]=i}else i=e[3];let r;e[6]!==i?(r=s.jsx("div",{className:"flex flex-col",children:i}),e[6]=i,e[7]=r):r=e[7];let o;return e[8]!==a||e[9]!==r?(o=s.jsxs("div",{className:"space-y-4",children:[a,r]}),e[8]=a,e[9]=r,e[10]=o):o=e[10],o}function kt(t){const e=I.c(3),{content:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{icon:rt,title:"Notas"}),e[0]=n):n=e[0];let a;return e[1]!==l?(a=s.jsxs("div",{className:"space-y-4",children:[n,s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:l})]}),e[1]=l,e[2]=a):a=e[2],a}function zt(t){const e=I.c(11),{delta:l}=t;if(l===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"inline-flex items-center justify-center",children:s.jsx(ct,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0],c}const n=l>0,a=n?"text-emerald-600":"text-destructive";let i;e[1]!==a?(i=H("inline-flex items-center gap-0.5 text-sm font-medium",a),e[1]=a,e[2]=i):i=e[2];let r;e[3]!==n?(r=n?s.jsx(it,{size:16}):s.jsx(nt,{size:16}),e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l?(o=Math.abs(l),e[5]=l,e[6]=o):o=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o?(d=s.jsxs("span",{className:i,children:[r,o]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function Tt(t){if(t.length===0)return[];const e=[...t];for(let l=e.length-1;l>0;l--){const n=Math.max(0,Math.min(e.length-1,l+(l%3===0?-2:l%2===0?1:-1)));[e[l],e[n]]=[e[n],e[l]]}return e.map((l,n)=>({...l,position:n+1,delta:0,reference_position:void 0}))}function he(t){const e=I.c(14),{rows:l,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];const[i,r]=J.useState(a);let o;e[1]!==n?(o=n&&s.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground opacity-60 tracking-wide px-1",children:n}),e[1]=n,e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ge,{className:"sticky top-0 bg-background z-10",children:s.jsxs(ne,{children:[s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"#"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"DELTA"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"PRODUTO"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"SCORE"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"GRADE"}),s.jsx(se,{className:"w-10"})]})}),e[3]=d):d=e[3];let c;if(e[4]!==i||e[5]!==l){let p;e[7]!==i?(p=(x,h)=>{const g=i[h]??!1,b=x.note&&typeof x.note=="object"?x.note:null,N=typeof x.note=="string"?!!x.note:b!==null&&Object.keys(b).length>0,y=x.reference_position!==void 0?x.reference_position-x.position:x.delta??0;return s.jsxs(J.Fragment,{children:[s.jsxs(ne,{children:[s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1 opacity-50",children:[s.jsx(at,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground tabular-nums",children:x.position})]})}),s.jsx(le,{children:s.jsx(zt,{delta:y})}),s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[x.image&&s.jsx("img",{src:x.image,alt:"",className:"h-12 w-8 object-cover rounded-sm shrink-0 bg-muted"}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.label})]})}),x.values.map(It),s.jsx(le,{children:N?s.jsx("button",{type:"button",onClick:()=>r(v=>({...v,[h]:!v[h]})),className:"flex items-center justify-center size-6 text-muted-foreground hover:text-foreground transition-colors",children:g?s.jsx(Pe,{size:16}):s.jsx(Se,{size:16})}):s.jsx(Se,{size:16,className:"text-muted-foreground opacity-30"})})]}),N&&g&&s.jsx(ne,{className:"bg-muted/25",children:s.jsx(le,{colSpan:6,children:typeof x.note=="string"?s.jsxs("div",{className:"pl-8 pb-2 flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase opacity-50 tracking-wide",children:"MUDANÇA"}),s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:x.note})]}):s.jsx("div",{className:"py-2 px-4",children:s.jsxs(be,{children:[s.jsx(ge,{children:s.jsx(ne,{children:Object.keys(b??{}).map(Pt)})}),s.jsx(je,{children:s.jsx(ne,{children:Object.values(b??{}).map(Rt)})})]})})})},`note-${h}`)]},h)},e[7]=i,e[8]=p):p=e[8],c=l.map(p),e[4]=i,e[5]=l,e[6]=c}else c=e[6];let u;e[9]!==c?(u=s.jsx("div",{className:"border border-border rounded-lg overflow-auto max-h-[520px]",children:s.jsxs(be,{children:[d,s.jsx(je,{children:c})]})}),e[9]=c,e[10]=u):u=e[10];let f;return e[11]!==o||e[12]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[o,u]}),e[11]=o,e[12]=u,e[13]=f):f=e[13],f}function Rt(t,e){return s.jsx(le,{className:"text-sm tabular-nums",children:t??"—"},e)}function Pt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function It(t,e){const n=e===1&&typeof t=="string"&&t.endsWith("%")?`${parseFloat(t)-10}%`:t;return s.jsx(le,{className:"text-sm tabular-nums",children:n},e)}function Et(t){const e=I.c(20),{title:l,rows:n}=t,[a,i]=J.useState(!1);let r;e[0]!==n?(r=Tt(n),e[0]=n,e[1]=r):r=e[1];const o=r;let d;e[2]!==l?(d=l&&s.jsx(ae,{icon:ve,title:l}),e[2]=l,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>i(Mt),e[4]=c):c=e[4];const u=a?"bg-primary text-primary-foreground border-primary":"bg-transparent text-muted-foreground border-border hover:text-foreground hover:border-foreground/30";let f;e[5]!==u?(f=H("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border transition-colors",u),e[5]=u,e[6]=f):f=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ae,{size:14}),e[7]=p):p=e[7];let x;e[8]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:f,children:[p,"Comparar ordenação anterior"]}),e[8]=f,e[9]=x):x=e[9];let h;e[10]!==d||e[11]!==x?(h=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d,x]}),e[10]=d,e[11]=x,e[12]=h):h=e[12];let g;e[13]!==o||e[14]!==n||e[15]!==a?(g=a?s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx(he,{rows:n,label:"Ordenação Proposta"}),s.jsx(he,{rows:o,label:"Ordenação Atual"})]}):s.jsx(he,{rows:n}),e[13]=o,e[14]=n,e[15]=a,e[16]=g):g=e[16];let b;return e[17]!==h||e[18]!==g?(b=s.jsxs("div",{className:"space-y-4",children:[h,g]}),e[17]=h,e[18]=g,e[19]=b):b=e[19],b}function Mt(t){return!t}function At(t){const e=I.c(17),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(Nt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(Le,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(St,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}case"criteria":{let n;return e[9]!==l.items||e[10]!==l.title?(n=s.jsx(Oe,{title:l.title,items:l.items}),e[9]=l.items,e[10]=l.title,e[11]=n):n=e[11],n}case"note":{let n;return e[12]!==l.content?(n=s.jsx(kt,{content:l.content}),e[12]=l.content,e[13]=n):n=e[13],n}case"ranked-list":{let n;return e[14]!==l.rows||e[15]!==l.title?(n=s.jsx(Et,{title:l.title,rows:l.rows}),e[14]=l.rows,e[15]=l.title,e[16]=n):n=e[16],n}default:return null}}function Dt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Lt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
1
+ import{r as J,c as I,j as s,b$ as oe,v as H,m as Re,B as pe,c0 as Fe,t as fe,u as Be,a as Ue,b as qe,c1 as Ge}from"./index-plkk4e_J.js";import{c as Ve}from"./binder-13i_lQ0c.js";import{u as ye}from"./useQuery-D64ihcYY.js";import{h as He}from"./use-connection-CQasYzzj.js";import{a as Ke,u as Qe,j as We}from"./constants-CilfzTas.js";import{u as xe,P as Je}from"./topbar-portal-C7BEToqh.js";import{i as ce}from"./Loading01-CWvnRL6a.js";import{t as Ye}from"./Settings01-DovilCf0.js";import{i as Ze}from"./Check-xLOyX88L.js";import{t as Pe}from"./ChevronDown-p63TAVBS.js";import{i as Ne}from"./AlertCircle-0hiOc8CZ.js";import{i as _e}from"./ArrowLeft-wS11NpwF.js";import{n as de}from"./CheckDone01-C40blUb5.js";import{s as Ie}from"./Clock-DrIhUE6G.js";import{a as Xe}from"./Copy01-HMjceblh.js";import{n as Ee}from"./Inbox01-CglLjipa.js";import{i as et}from"./CheckCircle-D15lJ7XR.js";import{i as tt}from"./InfoCircle-Bb6fqYc8.js";import{i as st}from"./XCircle-Cs5fpSB3.js";import{u as Me}from"./useMutation-D4nH_fUX.js";import{T as se,b as ne,c as le,a as ge,d as je,e as be}from"./table-C75ROyVe.js";import{M as lt}from"./markdown-CPbw-_yp.js";import{n as nt}from"./ArrowDown-PNhqRNxD.js";import{i as it}from"./ArrowUp-CH0M2x4i.js";import{i as ot}from"./CheckVerified02-Dicrho5O.js";import{i as Se}from"./ChevronRight-D_Ht_JRW.js";import{i as rt}from"./File02-CbYedhXN.js";import{s as at}from"./Hash02-K4dRD2dR.js";import{s as ve,i as ct}from"./Rows03-BxHdq4li.js";import{B as dt}from"./badge-qrWA_kLG.js";import{b as mt,c as ut,d as ft,a as xt,C as pt}from"./card-DD-UCxfi.js";import{c as $e,d as me,a as Ce,b as we,S as ke}from"./select-DzSheW-c.js";import"./index-BHlJRTz3.js";const Ae=({size:t=24,color:e="currentColor",...l})=>J.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},J.createElement("path",{d:"M12 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ae.displayName="Columns02";const re={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function ht(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function gt(t){const e=I.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:a}=t,[i,r]=J.useState(!1),o=J.useRef(null);let d;if(e[0]!==l||e[1]!==n){let m;e[3]!==n?(m=S=>S.id===n,e[3]=n,e[4]=m):m=e[4],d=l.find(m),e[0]=l,e[1]=n,e[2]=d}else d=e[2];const c=d;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=m=>{o.current?.contains(m.relatedTarget)||r(!1)},e[5]=u):u=e[5];const f=u;if(l.length===1){let m;e[6]!==c?(m=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[6]=c,e[7]=m):m=e[7];const S=c?.title||"Reports";let _;e[8]!==S?(_=s.jsx("span",{children:S}),e[8]=S,e[9]=_):_=e[9];let $;return e[10]!==m||e[11]!==_?($=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m,_]}),e[10]=m,e[11]=_,e[12]=$):$=e[12],$}let p;e[13]!==i?(p=()=>r(!i),e[13]=i,e[14]=p):p=e[14];let x;e[15]!==c?(x=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[15]=c,e[16]=x):x=e[16];const h=c?.title||"Select source";let g;e[17]!==h?(g=s.jsx("span",{children:h}),e[17]=h,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Pe,{size:14}),e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==x||e[22]!==g?(N=s.jsxs("button",{type:"button",onClick:p,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[x,g,b]}),e[20]=p,e[21]=x,e[22]=g,e[23]=N):N=e[23];let y;e[24]!==l||e[25]!==i||e[26]!==a||e[27]!==n?(y=i&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(m=>s.jsxs("button",{type:"button",onClick:()=>{a(m.id),r(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[m.icon?s.jsx("img",{src:m.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:m.title}),m.id===n&&s.jsx(Ze,{size:14,className:"text-primary"})]},m.id))}),e[24]=l,e[25]=i,e[26]=a,e[27]=n,e[28]=y):y=e[28];let v;return e[29]!==N||e[30]!==y?(v=s.jsxs("div",{className:"relative",ref:o,onBlur:f,children:[N,y]}),e[29]=N,e[30]=y,e[31]=v):v=e[31],v}function jt(t){const e=I.c(2);let l;return e[0]!==t?(l=s.jsx(gt,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ue={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:et},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:Ne},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:st},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:tt}};function De(t){const e=I.c(10),{status:l,size:n}=t,a=n===void 0?"default":n,i=ue[l]??ue.info,r=i.icon,o=a==="sm",d=o?"px-2 py-0.5":"px-2.5 py-1";let c;e[0]!==i.color||e[1]!==d?(c=H("inline-flex items-center gap-1 rounded-full border text-xs font-medium",d,i.color),e[0]=i.color,e[1]=d,e[2]=c):c=e[2];const u=o?12:14;let f;e[3]!==r||e[4]!==u?(f=s.jsx(r,{size:u}),e[3]=r,e[4]=u,e[5]=f):f=e[5];let p;return e[6]!==i.label||e[7]!==c||e[8]!==f?(p=s.jsxs("span",{className:c,children:[f,i.label]}),e[6]=i.label,e[7]=c,e[8]=f,e[9]=p):p=e[9],p}function ze(t){const e=I.c(11),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(a=re.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=a):a=e[3];let i;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(i=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=i):i=e[7];let r;return e[8]!==a||e[9]!==i?(r={queryKey:a,queryFn:i,staleTime:6e4},e[8]=a,e[9]=i,e[10]=r):r=e[10],ye(r)}function bt(t){const e=I.c(10),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?(a=re.report(l,t),e[0]=l,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==n?(i=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5];const r=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==r?(o={queryKey:a,queryFn:i,enabled:r,staleTime:6e4},e[6]=a,e[7]=i,e[8]=r,e[9]=o):o=e[9],ye(o)}const yt={passing:"bg-emerald-500",warning:"bg-amber-500",failing:"bg-red-500",info:"bg-blue-500"},Te=["#A595FF","#FFC116","#DE3A6E"];function ae(t){const e=I.c(7),{icon:l,title:n}=t;let a;e[0]!==l?(a=s.jsx(l,{size:16,className:"opacity-75 shrink-0 text-foreground"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:"text-base text-foreground opacity-75",children:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==i?(r=s.jsxs("div",{className:"flex gap-2 items-center",children:[a,i]}),e[4]=a,e[5]=i,e[6]=r):r=e[6],r}function Nt(t){const e=I.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(lt,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function vt(t){const e=I.c(15),{metric:l}=t;let n;e[0]!==l.unit?(n=l.unit&&s.jsx("span",{className:"text-base text-muted-foreground ml-1",children:l.unit}),e[0]=l.unit,e[1]=n):n=e[1];let a;e[2]!==l.value||e[3]!==n?(a=s.jsxs("div",{className:"text-2xl leading-8 text-foreground font-normal tabular-nums",children:[l.value,n]}),e[2]=l.value,e[3]=n,e[4]=a):a=e[4];let i;e[5]!==l.status?(i=l.status&&s.jsx("span",{className:H("inline-block size-2 rounded-full shrink-0",yt[l.status])}),e[5]=l.status,e[6]=i):i=e[6];let r;e[7]!==l.label?(r=s.jsx("span",{className:"text-sm text-foreground",children:l.label}),e[7]=l.label,e[8]=r):r=e[8];let o;e[9]!==i||e[10]!==r?(o=s.jsxs("div",{className:"flex gap-1.5 items-center",children:[i,r]}),e[9]=i,e[10]=r,e[11]=o):o=e[11];let d;return e[12]!==a||e[13]!==o?(d=s.jsxs("div",{className:"flex flex-col gap-3 items-start justify-end border border-border rounded-lg p-5 flex-1",children:[a,o]}),e[12]=a,e[13]=o,e[14]=d):d=e[14],d}function Le(t){const e=I.c(12),{title:l,items:n,stacked:a}=t,i=a===void 0?!1:a;let r;e[0]!==l?(r=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=r):r=e[1];const o=i?"flex-col items-stretch":"items-stretch";let d;e[2]!==o?(d=H("flex gap-4",o),e[2]=o,e[3]=d):d=e[3];let c;e[4]!==n?(c=n.map(_t),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==d||e[7]!==c?(u=s.jsx("div",{className:d,children:c}),e[6]=d,e[7]=c,e[8]=u):u=e[8];let f;return e[9]!==r||e[10]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[r,u]}),e[9]=r,e[10]=u,e[11]=f):f=e[11],f}function _t(t,e){return s.jsx(vt,{metric:t},`${t.label}-${e}`)}function St(t){const e=I.c(16),{title:l,columns:n,rows:a}=t;let i;e[0]!==l?(i=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=i):i=e[1];let r;e[2]!==n?(r=n.map(wt),e[2]=n,e[3]=r):r=e[3];let o;e[4]!==r?(o=s.jsx(ge,{children:s.jsx(ne,{children:r})}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==a?(d=a.map($t),e[6]=a,e[7]=d):d=e[7];let c;e[8]!==d?(c=s.jsx(je,{children:d}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==o||e[11]!==c?(u=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(be,{children:[o,c]})}),e[10]=o,e[11]=c,e[12]=u):u=e[12];let f;return e[13]!==i||e[14]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[i,u]}),e[13]=i,e[14]=u,e[15]=f):f=e[15],f}function $t(t,e){return s.jsx(ne,{children:t.map(Ct)},e)}function Ct(t,e){return s.jsx(le,{className:"text-sm",children:t??s.jsx("span",{className:"text-muted-foreground",children:"—"})},e)}function wt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Oe(t){const e=I.c(11),{title:l,items:n}=t;let a;e[0]!==l?(a=l&&s.jsx(ae,{icon:ot,title:l}),e[0]=l,e[1]=a):a=e[1];let i;if(e[2]!==n){let d;e[4]!==n.length?(d=(c,u)=>s.jsxs("div",{className:"flex gap-4 items-stretch",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center w-4 shrink-0",children:[s.jsx("div",{className:"h-full w-px bg-border"}),s.jsx("div",{className:"w-2 h-4 rounded-full flex",style:{backgroundColor:Te[u%Te.length]}}),s.jsx("div",{className:H("h-full w-px bg-border",u===n.length-1&&"invisible")})]}),s.jsxs("div",{className:"flex flex-col gap-2 items-start py-3 pb-4 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-foreground leading-none",children:c.label}),c.description&&s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:c.description})]})]},`${c.label}-${u}`),e[4]=n.length,e[5]=d):d=e[5],i=n.map(d),e[2]=n,e[3]=i}else i=e[3];let r;e[6]!==i?(r=s.jsx("div",{className:"flex flex-col",children:i}),e[6]=i,e[7]=r):r=e[7];let o;return e[8]!==a||e[9]!==r?(o=s.jsxs("div",{className:"space-y-4",children:[a,r]}),e[8]=a,e[9]=r,e[10]=o):o=e[10],o}function kt(t){const e=I.c(3),{content:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{icon:rt,title:"Notas"}),e[0]=n):n=e[0];let a;return e[1]!==l?(a=s.jsxs("div",{className:"space-y-4",children:[n,s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:l})]}),e[1]=l,e[2]=a):a=e[2],a}function zt(t){const e=I.c(11),{delta:l}=t;if(l===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"inline-flex items-center justify-center",children:s.jsx(ct,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0],c}const n=l>0,a=n?"text-emerald-600":"text-destructive";let i;e[1]!==a?(i=H("inline-flex items-center gap-0.5 text-sm font-medium",a),e[1]=a,e[2]=i):i=e[2];let r;e[3]!==n?(r=n?s.jsx(it,{size:16}):s.jsx(nt,{size:16}),e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l?(o=Math.abs(l),e[5]=l,e[6]=o):o=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o?(d=s.jsxs("span",{className:i,children:[r,o]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function Tt(t){if(t.length===0)return[];const e=[...t];for(let l=e.length-1;l>0;l--){const n=Math.max(0,Math.min(e.length-1,l+(l%3===0?-2:l%2===0?1:-1)));[e[l],e[n]]=[e[n],e[l]]}return e.map((l,n)=>({...l,position:n+1,delta:0,reference_position:void 0}))}function he(t){const e=I.c(14),{rows:l,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];const[i,r]=J.useState(a);let o;e[1]!==n?(o=n&&s.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground opacity-60 tracking-wide px-1",children:n}),e[1]=n,e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ge,{className:"sticky top-0 bg-background z-10",children:s.jsxs(ne,{children:[s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"#"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"DELTA"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"PRODUTO"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"SCORE"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"GRADE"}),s.jsx(se,{className:"w-10"})]})}),e[3]=d):d=e[3];let c;if(e[4]!==i||e[5]!==l){let p;e[7]!==i?(p=(x,h)=>{const g=i[h]??!1,b=x.note&&typeof x.note=="object"?x.note:null,N=typeof x.note=="string"?!!x.note:b!==null&&Object.keys(b).length>0,y=x.reference_position!==void 0?x.reference_position-x.position:x.delta??0;return s.jsxs(J.Fragment,{children:[s.jsxs(ne,{children:[s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1 opacity-50",children:[s.jsx(at,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground tabular-nums",children:x.position})]})}),s.jsx(le,{children:s.jsx(zt,{delta:y})}),s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[x.image&&s.jsx("img",{src:x.image,alt:"",className:"h-12 w-8 object-cover rounded-sm shrink-0 bg-muted"}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.label})]})}),x.values.map(It),s.jsx(le,{children:N?s.jsx("button",{type:"button",onClick:()=>r(v=>({...v,[h]:!v[h]})),className:"flex items-center justify-center size-6 text-muted-foreground hover:text-foreground transition-colors",children:g?s.jsx(Pe,{size:16}):s.jsx(Se,{size:16})}):s.jsx(Se,{size:16,className:"text-muted-foreground opacity-30"})})]}),N&&g&&s.jsx(ne,{className:"bg-muted/25",children:s.jsx(le,{colSpan:6,children:typeof x.note=="string"?s.jsxs("div",{className:"pl-8 pb-2 flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase opacity-50 tracking-wide",children:"MUDANÇA"}),s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:x.note})]}):s.jsx("div",{className:"py-2 px-4",children:s.jsxs(be,{children:[s.jsx(ge,{children:s.jsx(ne,{children:Object.keys(b??{}).map(Pt)})}),s.jsx(je,{children:s.jsx(ne,{children:Object.values(b??{}).map(Rt)})})]})})})},`note-${h}`)]},h)},e[7]=i,e[8]=p):p=e[8],c=l.map(p),e[4]=i,e[5]=l,e[6]=c}else c=e[6];let u;e[9]!==c?(u=s.jsx("div",{className:"border border-border rounded-lg overflow-auto max-h-[520px]",children:s.jsxs(be,{children:[d,s.jsx(je,{children:c})]})}),e[9]=c,e[10]=u):u=e[10];let f;return e[11]!==o||e[12]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[o,u]}),e[11]=o,e[12]=u,e[13]=f):f=e[13],f}function Rt(t,e){return s.jsx(le,{className:"text-sm tabular-nums",children:t??"—"},e)}function Pt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function It(t,e){const n=e===1&&typeof t=="string"&&t.endsWith("%")?`${parseFloat(t)-10}%`:t;return s.jsx(le,{className:"text-sm tabular-nums",children:n},e)}function Et(t){const e=I.c(20),{title:l,rows:n}=t,[a,i]=J.useState(!1);let r;e[0]!==n?(r=Tt(n),e[0]=n,e[1]=r):r=e[1];const o=r;let d;e[2]!==l?(d=l&&s.jsx(ae,{icon:ve,title:l}),e[2]=l,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>i(Mt),e[4]=c):c=e[4];const u=a?"bg-primary text-primary-foreground border-primary":"bg-transparent text-muted-foreground border-border hover:text-foreground hover:border-foreground/30";let f;e[5]!==u?(f=H("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border transition-colors",u),e[5]=u,e[6]=f):f=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ae,{size:14}),e[7]=p):p=e[7];let x;e[8]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:f,children:[p,"Comparar ordenação anterior"]}),e[8]=f,e[9]=x):x=e[9];let h;e[10]!==d||e[11]!==x?(h=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d,x]}),e[10]=d,e[11]=x,e[12]=h):h=e[12];let g;e[13]!==o||e[14]!==n||e[15]!==a?(g=a?s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx(he,{rows:n,label:"Ordenação Proposta"}),s.jsx(he,{rows:o,label:"Ordenação Atual"})]}):s.jsx(he,{rows:n}),e[13]=o,e[14]=n,e[15]=a,e[16]=g):g=e[16];let b;return e[17]!==h||e[18]!==g?(b=s.jsxs("div",{className:"space-y-4",children:[h,g]}),e[17]=h,e[18]=g,e[19]=b):b=e[19],b}function Mt(t){return!t}function At(t){const e=I.c(17),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(Nt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(Le,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(St,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}case"criteria":{let n;return e[9]!==l.items||e[10]!==l.title?(n=s.jsx(Oe,{title:l.title,items:l.items}),e[9]=l.items,e[10]=l.title,e[11]=n):n=e[11],n}case"note":{let n;return e[12]!==l.content?(n=s.jsx(kt,{content:l.content}),e[12]=l.content,e[13]=n):n=e[13],n}case"ranked-list":{let n;return e[14]!==l.rows||e[15]!==l.title?(n=s.jsx(Et,{title:l.title,rows:l.rows}),e[14]=l.rows,e[15]=l.title,e[16]=n):n=e[16],n}default:return null}}function Dt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Lt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
2
2
  `)),e.push("");for(const n of t.sections)switch(n.type){case"markdown":e.push(n.content),e.push("");break;case"metrics":{n.title&&(e.push(`## ${n.title}`),e.push(""));const a=["Metric","Value","Previous","Status"],i=n.items.some(r=>r.unit);e.push(`| ${a.join(" | ")} |`),e.push(`| ${a.map(()=>"---").join(" | ")} |`);for(const r of n.items){const o=r.unit==="%"&&typeof r.value=="number"?r.value-10:r.value,d=r.unit==="%"&&typeof r.previousValue=="number"?r.previousValue-10:r.previousValue,c=i&&r.unit?`${o} ${r.unit}`:`${o}`,u=d!=null?i&&r.unit?`${d} ${r.unit}`:`${d}`:"—",f=r.status??"—";e.push(`| ${r.label} | ${c} | ${u} | ${f} |`)}e.push("");break}case"table":{n.title&&(e.push(`## ${n.title}`),e.push("")),e.push(`| ${n.columns.join(" | ")} |`),e.push(`| ${n.columns.map(()=>"---").join(" | ")} |`);for(const a of n.rows)e.push(`| ${a.map(i=>i==null?"—":`${i}`).join(" | ")} |`);e.push("");break}case"criteria":{n.title&&(e.push(`## ${n.title}`),e.push(""));for(const a of n.items){const i=a.description?`: ${a.description}`:"";e.push(`- **${a.label}**${i}`)}e.push("");break}case"note":{e.push(`> ${n.content}`),e.push("");break}case"ranked-list":{n.title&&(e.push(`## ${n.title}`),e.push(""));const a=["#","Item"];e.push(`| ${a.join(" | ")} |`),e.push(`| ${a.map(()=>"---").join(" | ")} |`);for(const i of n.rows){const r=i.reference_position!==void 0?i.reference_position-i.position:i.delta??0,o=r!==0?` (${r>0?"+":""}${r})`:"",d=`${i.position}${o}`,c=i.values.map(u=>`${u}`).join(" | ");e.push(`| ${d} | ${i.label} | ${c} |`)}e.push("");break}}return e.join(`
3
3
  `).trim()}function Ot(t){const e=I.c(86),{reportId:l,onBack:n}=t,{connectionId:a,toolCaller:i}=xe(),r=Re(),{data:o,isLoading:d,error:c}=bt(l),u=o?.lifecycleStatus==="dismissed";let f;e[0]!==u||e[1]!==l||e[2]!==i?(f=async()=>i("REPORTS_UPDATE_STATUS",{reportId:l,lifecycleStatus:u?"read":"dismissed"}),e[0]=u,e[1]=l,e[2]=i,e[3]=f):f=e[3];let p;e[4]!==a||e[5]!==u||e[6]!==n||e[7]!==r?(p=()=>{fe.success(u?"Report restored to inbox":"Report marked as done"),r.invalidateQueries({queryKey:re.reportsList(a)}),n()},e[4]=a,e[5]=u,e[6]=n,e[7]=r,e[8]=p):p=e[8];let x;e[9]!==f||e[10]!==p?(x={mutationFn:f,onSuccess:p,onError:Ut},e[9]=f,e[10]=p,e[11]=x):x=e[11];const h=Me(x);if(d){let L;return e[12]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading report..."})]}),e[12]=L):L=e[12],L}if(c||!o){let L;e[13]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ne,{size:48,className:"text-destructive mb-4"}),e[13]=L):L=e[13];const Q=c?"Error loading report":"Report not found";let U;e[14]!==Q?(U=s.jsx("h3",{className:"text-lg font-medium mb-2",children:Q}),e[14]=Q,e[15]=U):U=e[15];const W=c?.message??"The requested report could not be found.";let X;e[16]!==W?(X=s.jsx("p",{className:"text-muted-foreground text-center mb-4",children:W}),e[16]=W,e[17]=X):X=e[17];let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(_e,{size:14,className:"mr-1"}),e[18]=ee):ee=e[18];let q;e[19]!==n?(q=s.jsxs(pe,{variant:"outline",onClick:n,children:[ee,"Back to reports"]}),e[19]=n,e[20]=q):q=e[20];let Y;return e[21]!==q||e[22]!==U||e[23]!==X?(Y=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[L,U,X,q]}),e[21]=q,e[22]=U,e[23]=X,e[24]=Y):Y=e[24],Y}let g;e[25]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(_e,{size:14}),e[25]=g):g=e[25];let b;e[26]!==n?(b=s.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[g,"Reports"]}),e[26]=n,e[27]=b):b=e[27];let N;e[28]!==o?(N=()=>{const L=Lt(o);navigator.clipboard.writeText(L).then(Bt)},e[28]=o,e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Xe,{size:14}),e[30]=y):y=e[30];let v;e[31]!==N?(v=s.jsxs(pe,{variant:"outline",size:"sm",className:"gap-1.5",onClick:N,children:[y,"Copy as Markdown"]}),e[31]=N,e[32]=v):v=e[32];let m;e[33]!==h?(m=()=>h.mutate(),e[33]=h,e[34]=m):m=e[34];let S;e[35]!==u||e[36]!==h.isPending?(S=h.isPending?s.jsx(ce,{size:14,className:"animate-spin"}):u?s.jsx(Ee,{size:14}):s.jsx(de,{size:14}),e[35]=u,e[36]=h.isPending,e[37]=S):S=e[37];const _=u?"Move to inbox":"Mark as done";let $;e[38]!==h.isPending||e[39]!==S||e[40]!==_||e[41]!==m?($=s.jsxs(pe,{variant:"outline",size:"sm",className:"gap-1.5",onClick:m,disabled:h.isPending,children:[S,_]}),e[38]=h.isPending,e[39]=S,e[40]=_,e[41]=m,e[42]=$):$=e[42];let C;e[43]!==$||e[44]!==v?(C=s.jsxs("div",{className:"flex items-center gap-2",children:[v,$]}),e[43]=$,e[44]=v,e[45]=C):C=e[45];let z;e[46]!==C||e[47]!==b?(z=s.jsxs("div",{className:"flex items-center justify-between",children:[b,C]}),e[46]=C,e[47]=b,e[48]=z):z=e[48];let w;e[49]!==o.title?(w=s.jsx("h1",{className:"text-xl font-semibold leading-tight",children:o.title}),e[49]=o.title,e[50]=w):w=e[50];let T;e[51]!==o.summary?(T=s.jsx("p",{className:"text-sm text-muted-foreground",children:o.summary}),e[51]=o.summary,e[52]=T):T=e[52];let E;e[53]!==w||e[54]!==T?(E=s.jsxs("div",{className:"space-y-1 min-w-0",children:[w,T]}),e[53]=w,e[54]=T,e[55]=E):E=e[55];let M;e[56]!==o.status?(M=s.jsx(De,{status:o.status}),e[56]=o.status,e[57]=M):M=e[57];let R;e[58]!==E||e[59]!==M?(R=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[E,M]}),e[58]=E,e[59]=M,e[60]=R):R=e[60];let k;e[61]!==o.category?(k=s.jsx("span",{className:"capitalize",children:o.category}),e[61]=o.category,e[62]=k):k=e[62];let P;e[63]!==o.source?(P=o.source&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"|"}),s.jsx("span",{children:o.source})]}),e[63]=o.source,e[64]=P):P=e[64];let A;e[65]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("span",{className:"text-border",children:"|"}),e[65]=A):A=e[65];let O;e[66]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ie,{size:12}),e[66]=O):O=e[66];let D;e[67]!==o.updatedAt?(D=Dt(o.updatedAt),e[67]=o.updatedAt,e[68]=D):D=e[68];let j;e[69]!==D?(j=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[O,D]}),e[69]=D,e[70]=j):j=e[70];let F;e[71]!==k||e[72]!==P||e[73]!==j?(F=s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[k,P,A,j]}),e[71]=k,e[72]=P,e[73]=j,e[74]=F):F=e[74];let K;e[75]!==z||e[76]!==R||e[77]!==F?(K=s.jsxs("div",{className:"border-b border-border px-6 py-4 space-y-3",children:[z,R,F]}),e[75]=z,e[76]=R,e[77]=F,e[78]=K):K=e[78];let B;e[79]!==o.sections?(B=Fe(o.sections??[]).map(Ft),e[79]=o.sections,e[80]=B):B=e[80];let G;e[81]!==B?(G=s.jsx("div",{className:"flex-1 px-6 py-6 space-y-8",children:B}),e[81]=B,e[82]=G):G=e[82];let Z;return e[83]!==K||e[84]!==G?(Z=s.jsxs("div",{className:"flex flex-col h-full overflow-y-auto pb-6",children:[K,G]}),e[83]=K,e[84]=G,e[85]=Z):Z=e[85],Z}function Ft(t){return t.type==="side-by-side"?s.jsxs("div",{className:"flex gap-6 items-start w-full",children:[s.jsx("div",{className:"w-full",children:s.jsx(Oe,{title:t.left.title,items:t.left.items})}),s.jsx("div",{className:"w-full",children:s.jsx(Le,{title:t.right.title,items:t.right.items,stacked:!0})})]},`${t.leftIdx}-${t.rightIdx}`):s.jsx(At,{section:t.section},t.idx)}function Bt(){fe.success("Copied report as Markdown")}function Ut(t){fe.error(`Failed to update report: ${t.message}`)}function qt(t){const e=Date.now()-new Date(t).getTime(),l=Math.floor(e/6e4);if(l<1)return"just now";if(l<60)return`${l}m ago`;const n=Math.floor(l/60);if(n<24)return`${n}h ago`;const a=Math.floor(n/24);return a<30?`${a}d ago`:new Date(t).toLocaleDateString()}function Gt(t){const e=I.c(57),{report:l,isDoneTab:n,onSelect:a,onDismiss:i}=t,r=!l.lifecycleStatus||l.lifecycleStatus==="unread",o=n?"opacity-60":"hover:shadow-md";let d;e[0]!==o?(d=H("group relative cursor-pointer transition-shadow",o),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==a||e[3]!==l.id?(c=()=>a(l.id),e[2]=a,e[3]=l.id,e[4]=c):c=e[4];let u;e[5]!==r?(u=r&&s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 rounded-l-xl bg-primary"}),e[5]=r,e[6]=u):u=e[6];const f=r&&"font-bold";let p;e[7]!==f?(p=H("text-sm leading-snug line-clamp-2",f),e[7]=f,e[8]=p):p=e[8];let x;e[9]!==l.title||e[10]!==p?(x=s.jsx(mt,{className:p,children:l.title}),e[9]=l.title,e[10]=p,e[11]=x):x=e[11];let h;e[12]!==l.status?(h=s.jsx(De,{status:l.status,size:"sm"}),e[12]=l.status,e[13]=h):h=e[13];const g=n?"Restore to inbox":"Mark as done",b=n?"text-muted-foreground hover:text-foreground hover:bg-accent":"text-muted-foreground/0 group-hover:text-muted-foreground hover:!text-emerald-600 hover:bg-emerald-500/10";let N;e[14]!==b?(N=H("rounded-md p-1 transition-colors",b),e[14]=b,e[15]=N):N=e[15];let y;e[16]!==n||e[17]!==i||e[18]!==l.id?(y=A=>{A.stopPropagation(),i(l.id,!n)},e[16]=n,e[17]=i,e[18]=l.id,e[19]=y):y=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(de,{size:14}),e[20]=v):v=e[20];let m;e[21]!==N||e[22]!==y||e[23]!==g?(m=s.jsx("button",{type:"button",title:g,className:N,onClick:y,children:v}),e[21]=N,e[22]=y,e[23]=g,e[24]=m):m=e[24];let S;e[25]!==m||e[26]!==h?(S=s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[h,m]}),e[25]=m,e[26]=h,e[27]=S):S=e[27];let _;e[28]!==S||e[29]!==x?(_=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x,S]}),e[28]=S,e[29]=x,e[30]=_):_=e[30];let $;e[31]!==l.summary?($=s.jsx(ut,{className:"mt-1 line-clamp-2 text-xs",children:l.summary}),e[31]=l.summary,e[32]=$):$=e[32];let C;e[33]!==_||e[34]!==$?(C=s.jsxs(ft,{className:"pb-2 pt-5 px-5",children:[_,$]}),e[33]=_,e[34]=$,e[35]=C):C=e[35];let z;e[36]!==l.category?(z=s.jsx("span",{className:"inline-flex items-center gap-1 capitalize",children:l.category}),e[36]=l.category,e[37]=z):z=e[37];let w;e[38]!==l.source?(w=l.source&&s.jsx("span",{className:"inline-flex items-center gap-1 text-muted-foreground/70",children:l.source}),e[38]=l.source,e[39]=w):w=e[39];let T;e[40]!==z||e[41]!==w?(T=s.jsxs("div",{className:"flex items-center gap-3",children:[z,w]}),e[40]=z,e[41]=w,e[42]=T):T=e[42];let E;e[43]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Ie,{size:12}),e[43]=E):E=e[43];let M;e[44]!==l.updatedAt?(M=qt(l.updatedAt),e[44]=l.updatedAt,e[45]=M):M=e[45];let R;e[46]!==M?(R=s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[E,M]})}),e[46]=M,e[47]=R):R=e[47];let k;e[48]!==T||e[49]!==R?(k=s.jsx(xt,{className:"px-5 pb-5",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[T,R]})}),e[48]=T,e[49]=R,e[50]=k):k=e[50];let P;return e[51]!==C||e[52]!==d||e[53]!==k||e[54]!==c||e[55]!==u?(P=s.jsxs(pt,{className:d,onClick:c,children:[u,C,k]}),e[51]=C,e[52]=d,e[53]=k,e[54]=c,e[55]=u,e[56]=P):P=e[56],P}function Vt(t){const e=I.c(24),{category:l,status:n,categories:a,onCategoryChange:i,onStatusChange:r}=t,o=l??"__all__";let d;e[0]!==i?(d=_=>i(_==="__all__"?void 0:_),e[0]=i,e[1]=d):d=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ce,{size:"sm",children:s.jsx(we,{placeholder:"All categories"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(me,{value:"__all__",children:"All categories"}),e[3]=u):u=e[3];let f;e[4]!==a?(f=a.map(Kt),e[4]=a,e[5]=f):f=e[5];let p;e[6]!==f?(p=s.jsxs($e,{children:[u,f]}),e[6]=f,e[7]=p):p=e[7];let x;e[8]!==o||e[9]!==d||e[10]!==p?(x=s.jsxs(ke,{value:o,onValueChange:d,children:[c,p]}),e[8]=o,e[9]=d,e[10]=p,e[11]=x):x=e[11];const h=n??"__all__";let g;e[12]!==r?(g=_=>r(_==="__all__"?void 0:_),e[12]=r,e[13]=g):g=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ce,{size:"sm",children:s.jsx(we,{placeholder:"All statuses"})}),e[14]=b):b=e[14];let N,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(me,{value:"__all__",children:"All statuses"}),y=Object.keys(ue),e[15]=N,e[16]=y):(N=e[15],y=e[16]);let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[N,y.map(Ht)]}),e[17]=v):v=e[17];let m;e[18]!==h||e[19]!==g?(m=s.jsxs(ke,{value:h,onValueChange:g,children:[b,v]}),e[18]=h,e[19]=g,e[20]=m):m=e[20];let S;return e[21]!==m||e[22]!==x?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[x,m]}),e[21]=m,e[22]=x,e[23]=S):S=e[23],S}function Ht(t){return s.jsx(me,{value:t,children:ue[t].label},t)}function Kt(t){return s.jsx(me,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function Qt(t){const e=I.c(51),{onSelectReport:l}=t,[n,a]=J.useState("inbox"),[i,r]=J.useState(),[o,d]=J.useState(),{connectionId:c,toolCaller:u}=xe(),f=Re();let p;e[0]!==i||e[1]!==o?(p={category:i,status:o},e[0]=i,e[1]=o,e[2]=p):p=e[2];const{data:x,isLoading:h,error:g}=ze(p),b=x?.reports??[],N=b.filter(Xt),y=b.filter(Zt),v=n==="inbox"?N:y,m=N.filter(Yt).length,{data:S}=ze();let _;e[3]!==S?.reports?(_=[...new Set((S?.reports??[]).map(Jt))].sort(),e[3]=S?.reports,e[4]=_):_=e[4];const $=_;let C;e[5]!==u?(C=async V=>{const{reportId:te,lifecycleStatus:ie}=V;return u("REPORTS_UPDATE_STATUS",{reportId:te,lifecycleStatus:ie})},e[5]=u,e[6]=C):C=e[6];let z;e[7]!==c||e[8]!==f?(z=()=>{f.invalidateQueries({queryKey:re.reportsList(c)})},e[7]=c,e[8]=f,e[9]=z):z=e[9];let w;e[10]!==C||e[11]!==z?(w={mutationFn:C,onSuccess:z,onError:Wt},e[10]=C,e[11]=z,e[12]=w):w=e[12];const T=Me(w);let E;e[13]!==T?(E=(V,te)=>{T.mutate({reportId:V,lifecycleStatus:te?"dismissed":"read"})},e[13]=T,e[14]=E):E=e[14];const M=E;if(g){let V,te;e[15]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ne,{size:48,className:"text-destructive mb-4"}),te=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading reports"}),e[15]=V,e[16]=te):(V=e[15],te=e[16]);let ie;return e[17]!==g.message?(ie=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[V,te,s.jsx("p",{className:"text-muted-foreground text-center",children:g.message})]}),e[17]=g.message,e[18]=ie):ie=e[18],ie}const R="flex flex-col h-full";let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=()=>a("inbox"),e[19]=k):k=e[19];const P=n==="inbox"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let A;e[20]!==P?(A=H("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",P),e[20]=P,e[21]=A):A=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ee,{size:14}),e[22]=O):O=e[22];let D;e[23]!==h||e[24]!==m?(D=!h&&m>0&&s.jsx(dt,{variant:"default",className:"text-[10px] px-1.5 py-0 h-4",children:m}),e[23]=h,e[24]=m,e[25]=D):D=e[25];let j;e[26]!==A||e[27]!==D?(j=s.jsxs("button",{type:"button",onClick:k,className:A,children:[O,"Inbox",D]}),e[26]=A,e[27]=D,e[28]=j):j=e[28];let F;e[29]===Symbol.for("react.memo_cache_sentinel")?(F=()=>a("done"),e[29]=F):F=e[29];const K=n==="done"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let B;e[30]!==K?(B=H("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",K),e[30]=K,e[31]=B):B=e[31];let G;e[32]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(de,{size:14}),e[32]=G):G=e[32];const Z=!h&&y.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:y.length});let L;e[33]!==B||e[34]!==Z?(L=s.jsxs("button",{type:"button",onClick:F,className:B,children:[G,"Done",Z]}),e[33]=B,e[34]=Z,e[35]=L):L=e[35];let Q;e[36]!==j||e[37]!==L?(Q=s.jsxs("div",{className:"flex items-center gap-1",children:[j,L]}),e[36]=j,e[37]=L,e[38]=Q):Q=e[38];let U;e[39]!==$||e[40]!==i||e[41]!==o?(U=s.jsx(Vt,{category:i,status:o,categories:$,onCategoryChange:r,onStatusChange:d}),e[39]=$,e[40]=i,e[41]=o,e[42]=U):U=e[42];let W;e[43]!==Q||e[44]!==U?(W=s.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-border",children:[Q,U]}),e[43]=Q,e[44]=U,e[45]=W):W=e[45];const X="flex-1 overflow-y-auto p-6",ee=h?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading reports..."})]}):v.length===0?s.jsx("div",{className:"flex flex-col items-center justify-center h-full text-center",children:n==="done"?s.jsxs(s.Fragment,{children:[s.jsx(de,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No dismissed reports"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Reports you mark as done will appear here."})]}):s.jsxs(s.Fragment,{children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:i||o?"No reports match filters":"Inbox is empty"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:i||o?"Try adjusting your filters.":"Reports will appear here once the connected MCP server provides them."})]})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:v.map(V=>s.jsx(Gt,{report:V,isDoneTab:n==="done",onSelect:l,onDismiss:M},V.id))});let q;e[46]!==ee?(q=s.jsx("div",{className:X,children:ee}),e[46]=ee,e[47]=q):q=e[47];let Y;return e[48]!==W||e[49]!==q?(Y=s.jsxs("div",{className:R,children:[W,q]}),e[48]=W,e[49]=q,e[50]=Y):Y=e[50],Y}function Wt(t){fe.error(`Failed to update report: ${t.message}`)}function Jt(t){return t.category}function Yt(t){return!t.lifecycleStatus||t.lifecycleStatus==="unread"}function Zt(t){return t.lifecycleStatus==="dismissed"}function Xt(t){return t.lifecycleStatus!=="dismissed"}function es(t){return t?t.filter(e=>Ve(e,Ge)):[]}function As(){const t=I.c(58),{org:e,project:l}=Be();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const a=Ue(n),i=qe(),r=He(),o=a.reportId??null;let d;t[1]!==i?(d=j=>{i({search:j?{reportId:j}:{},replace:!0})},t[1]=i,t[2]=d):d=t[2];const c=d;let u;t[3]!==e.id?(u={connectionId:Ke,orgId:e.id},t[3]=e.id,t[4]=u):u=t[4];const f=Qe(u);let p;t[5]!==l.id?(p=re.pluginConfig(l.id??"","reports"),t[5]=l.id,t[6]=p):p=t[6];let x;t[7]!==l.id||t[8]!==f?(x=async()=>{const j=await f.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:"reports"}});return j.structuredContent??j},t[7]=l.id,t[8]=f,t[9]=x):x=t[9];const h=!!l.id;let g;t[10]!==p||t[11]!==x||t[12]!==h?(g={queryKey:p,queryFn:x,enabled:h},t[10]=p,t[11]=x,t[12]=h,t[13]=g):g=t[13];const{data:b,isLoading:N}=ye(g);let y,v;if(t[14]!==r||t[15]!==b?.config?.connectionId){v=es(r);const j=b?.config?.connectionId;y=j?v.find(F=>F.id===j):null,t[14]=r,t[15]=b?.config?.connectionId,t[16]=y,t[17]=v}else y=t[16],v=t[17];const m=y,S=m?.id;let _;t[18]!==e.id||t[19]!==S?(_={connectionId:S,orgId:e.id},t[18]=e.id,t[19]=S,t[20]=_):_=t[20];const $=We(_);let C;t[21]!==e.id||t[22]!==e.name||t[23]!==e.slug?(C={id:e.id,slug:e.slug,name:e.name},t[21]=e.id,t[22]=e.name,t[23]=e.slug,t[24]=C):C=t[24];const z=C;if(N){let j;return t[25]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),t[25]=j):j=t[25],j}if(v.length===0){let j;return t[26]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ht,{}),t[26]=j):j=t[26],j}if(!m){let j;return t[27]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(Ye,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]})}),t[27]=j):j=t[27],j}let w;t[28]!==m.app_id||t[29]!==m.app_name||t[30]!==m.description||t[31]!==m.icon||t[32]!==m.id||t[33]!==m.metadata||t[34]!==m.title||t[35]!==m.tools?(w={id:m.id,title:m.title,icon:m.icon,description:m.description,app_name:m.app_name,app_id:m.app_id,tools:m.tools,metadata:m.metadata},t[28]=m.app_id,t[29]=m.app_name,t[30]=m.description,t[31]=m.icon,t[32]=m.id,t[33]=m.metadata,t[34]=m.title,t[35]=m.tools,t[36]=w):w=t[36];let T;t[37]!==$?(T=(j,F)=>$?$.callTool({name:j,arguments:F}).then(ss):Promise.reject(new Error("MCP client is not available")),t[37]=$,t[38]=T):T=t[38];const E=T;let M;t[39]!==m.id||t[40]!==z||t[41]!==w||t[42]!==E?(M={connectionId:m.id,connection:w,toolCaller:E,org:z,session:null},t[39]=m.id,t[40]=z,t[41]=w,t[42]=E,t[43]=M):M=t[43];const R=M;let k;t[44]!==R.connection?(k=[R.connection],t[44]=R.connection,t[45]=k):k=t[45];let P;t[46]!==m.id||t[47]!==k?(P=s.jsx("div",{className:"flex items-center px-6 py-3 border-b border-border",children:s.jsx(jt,{connections:k,selectedConnectionId:m.id,onConnectionChange:ts})}),t[46]=m.id,t[47]=k,t[48]=P):P=t[48];let A;t[49]!==o||t[50]!==c?(A=s.jsx("div",{className:"flex-1 overflow-hidden",children:o?s.jsx(Ot,{reportId:o,onBack:()=>c(null)}):s.jsx(Qt,{onSelectReport:c})}),t[49]=o,t[50]=c,t[51]=A):A=t[51];let O;t[52]!==P||t[53]!==A?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[P,A]}),t[52]=P,t[53]=A,t[54]=O):O=t[54];let D;return t[55]!==R||t[56]!==O?(D=s.jsx(Je,{value:R,children:O}),t[55]=R,t[56]=O,t[57]=D):D=t[57],D}function ts(){}function ss(t){return t.structuredContent??t}export{As as default};
@@ -1 +1 @@
1
- import{c as q,a as Y,b as A,r as B,j as s,B as z,d as G}from"./index-0HoOnen3.js";import{u as K}from"./useMutation-C13VGcqo.js";import{I as L}from"./input-BtUicd3Q.js";function J(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=K(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await G.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{J as default};
1
+ import{c as q,a as Y,b as A,r as B,j as s,B as z,d as G}from"./index-plkk4e_J.js";import{u as K}from"./useMutation-D4nH_fUX.js";import{I as L}from"./input-CmqvOeLB.js";function J(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=K(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await G.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{J as default};
@@ -1 +1 @@
1
- import{r as f,b8 as Pn,c as He,v as Je,j as he}from"./index-0HoOnen3.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Yn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function Qn(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function et(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{et as R,Qn as a,Yn as b};
1
+ import{r as f,b8 as Pn,c as He,v as Je,j as he}from"./index-plkk4e_J.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Yn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function Qn(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function et(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{et as R,Qn as a,Yn as b};
@@ -1 +1 @@
1
- import{c as j,j as i,B as v}from"./index-0HoOnen3.js";import{i as p,a as S}from"./Save01-P2clZJAi.js";import{i as z}from"./Loading01-Jv8Mbea8.js";function k(x){const e=j.c(15),{onSave:m,onUndo:d,isDirty:b,isSaving:s,saveLabel:f,undoLabel:u}=x,n=f===void 0?"Save":f,o=u===void 0?"Undo":u;if(!b)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(p,{size:14}),e[0]=r):r=e[0];let t;e[1]!==s||e[2]!==d||e[3]!==o?(t=i.jsxs(v,{variant:"outline",size:"sm",onClick:d,disabled:s,"aria-label":o,children:[r,o]}),e[1]=s,e[2]=d,e[3]=o,e[4]=t):t=e[4];let a;e[5]!==s?(a=s?i.jsx(z,{size:14,className:"animate-spin"}):i.jsx(S,{size:14}),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==s||e[8]!==m||e[9]!==n||e[10]!==a?(l=i.jsxs(v,{variant:"default",size:"sm",onClick:m,disabled:s,"aria-label":n,children:[a,n]}),e[7]=s,e[8]=m,e[9]=n,e[10]=a,e[11]=l):l=e[11];let c;return e[12]!==t||e[13]!==l?(c=i.jsxs(i.Fragment,{children:[t,l]}),e[12]=t,e[13]=l,e[14]=c):c=e[14],c}export{k as S};
1
+ import{c as j,j as i,B as v}from"./index-plkk4e_J.js";import{i as p,a as S}from"./Save01-SegoBYVF.js";import{i as z}from"./Loading01-CWvnRL6a.js";function k(x){const e=j.c(15),{onSave:m,onUndo:d,isDirty:b,isSaving:s,saveLabel:f,undoLabel:u}=x,n=f===void 0?"Save":f,o=u===void 0?"Undo":u;if(!b)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(p,{size:14}),e[0]=r):r=e[0];let t;e[1]!==s||e[2]!==d||e[3]!==o?(t=i.jsxs(v,{variant:"outline",size:"sm",onClick:d,disabled:s,"aria-label":o,children:[r,o]}),e[1]=s,e[2]=d,e[3]=o,e[4]=t):t=e[4];let a;e[5]!==s?(a=s?i.jsx(z,{size:14,className:"animate-spin"}):i.jsx(S,{size:14}),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==s||e[8]!==m||e[9]!==n||e[10]!==a?(l=i.jsxs(v,{variant:"default",size:"sm",onClick:m,disabled:s,"aria-label":n,children:[a,n]}),e[7]=s,e[8]=m,e[9]=n,e[10]=a,e[11]=l):l=e[11];let c;return e[12]!==t||e[13]!==l?(c=i.jsxs(i.Fragment,{children:[t,l]}),e[12]=t,e[13]=l,e[14]=c):c=e[14],c}export{k as S};
@@ -1,5 +1,5 @@
1
- import{r as a,bM as k,j as h,c as ve,bU as pe,I as F,D as tt,H as J,U as rt,T as ie,M as W,bP as z,bN as nt,v as Ae}from"./index-0HoOnen3.js";import{S as Le}from"./spinner-DzG2AImj.js";import{e as ot}from"./select-DOO2sOs0.js";const it=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));it.displayName="Calendar";function Pe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lt(e){if(Array.isArray(e))return e}function at(e,t,r){return(t=ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ct(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,l,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function st(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xe(Object(r),!0).forEach(function(n){at(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ut(e,t){if(e==null)return{};var r,n,o=dt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dt(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ft(e,t){return lt(e)||ct(e,t)||mt(e,t)||st()}function pt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ht(e){var t=pt(e,"string");return typeof t=="symbol"?t:t+""}function mt(e,t){if(e){if(typeof e=="string")return Pe(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pe(e,t):void 0}}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function X(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function re(e){return{}.toString.call(e).includes("Object")}function bt(e){return!Object.keys(e).length}function K(e){return typeof e=="function"}function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function St(e,t){return re(t)||V("changeType"),Object.keys(t).some(function(r){return!wt(e,r)})&&V("changeField"),t}function yt(e){K(e)||V("selectorType")}function Et(e){K(e)||re(e)||V("handlerType"),re(e)&&Object.values(e).some(function(t){return!K(t)})&&V("handlersType")}function Pt(e){e||V("initialIsRequired"),re(e)||V("initialType"),bt(e)&&V("initialContent")}function xt(e,t){throw new Error(e[t]||e.default)}var Rt={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},V=X(xt)(Rt),Z={changes:St,selector:yt,handler:Et,initial:Pt};function Ct(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Z.initial(e),Z.handler(t);var r={current:e},n=X(Tt)(r,t),o=X(Ot)(r),i=X(Z.changes)(e),l=X(jt)(r);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return Z.selector(u),u(r.current)}function c(u){vt(n,o,i,l)(u)}return[s,c]}function jt(e,t){return K(t)?t(e.current):t}function Ot(e,t){return e.current=je(je({},e.current),t),t}function Tt(e,t,r){return K(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Mt={create:Ct},_t={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function At(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function Lt(e){return{}.toString.call(e).includes("Object")}function Dt(e){return e||Oe("configIsRequired"),Lt(e)||Oe("configType"),e.urls?(It(),{paths:{vs:e.urls.monacoBase}}):e}function It(){console.warn(De.deprecation)}function Nt(e,t){throw new Error(e[t]||e.default)}var De={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
1
+ import{r as a,bx as k,j as h,c as ve,bU as pe,I as F,D as tt,H as J,U as rt,T as ie,M as W,bA as z,by as nt,v as Ae}from"./index-plkk4e_J.js";import{S as Le}from"./spinner-DThNWGT1.js";import{e as ot}from"./select-DzSheW-c.js";const it=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));it.displayName="Calendar";function Pe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lt(e){if(Array.isArray(e))return e}function at(e,t,r){return(t=ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ct(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,l,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function st(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xe(Object(r),!0).forEach(function(n){at(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ut(e,t){if(e==null)return{};var r,n,o=dt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function dt(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ft(e,t){return lt(e)||ct(e,t)||mt(e,t)||st()}function pt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ht(e){var t=pt(e,"string");return typeof t=="symbol"?t:t+""}function mt(e,t){if(e){if(typeof e=="string")return Pe(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pe(e,t):void 0}}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function X(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function re(e){return{}.toString.call(e).includes("Object")}function bt(e){return!Object.keys(e).length}function K(e){return typeof e=="function"}function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function St(e,t){return re(t)||V("changeType"),Object.keys(t).some(function(r){return!wt(e,r)})&&V("changeField"),t}function yt(e){K(e)||V("selectorType")}function Et(e){K(e)||re(e)||V("handlerType"),re(e)&&Object.values(e).some(function(t){return!K(t)})&&V("handlersType")}function Pt(e){e||V("initialIsRequired"),re(e)||V("initialType"),bt(e)&&V("initialContent")}function xt(e,t){throw new Error(e[t]||e.default)}var Rt={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},V=X(xt)(Rt),Z={changes:St,selector:yt,handler:Et,initial:Pt};function Ct(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Z.initial(e),Z.handler(t);var r={current:e},n=X(Tt)(r,t),o=X(Ot)(r),i=X(Z.changes)(e),l=X(jt)(r);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return Z.selector(u),u(r.current)}function c(u){vt(n,o,i,l)(u)}return[s,c]}function jt(e,t){return K(t)?t(e.current):t}function Ot(e,t){return e.current=je(je({},e.current),t),t}function Tt(e,t,r){return K(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var _t={create:Ct},Mt={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function At(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return t.apply(r,[].concat(o,s))}}}function Lt(e){return{}.toString.call(e).includes("Object")}function Dt(e){return e||Oe("configIsRequired"),Lt(e)||Oe("configType"),e.urls?(It(),{paths:{vs:e.urls.monacoBase}}):e}function It(){console.warn(De.deprecation)}function Nt(e,t){throw new Error(e[t]||e.default)}var De={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
5
5
  Instead of using
@@ -8,7 +8,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8
8
  monaco.config({ paths: { vs: '...' } })
9
9
 
10
10
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
11
- `},Oe=At(Nt)(De),Vt={config:Dt},zt=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(o){return r.reduceRight(function(i,l){return l(i)},o)}};function Ie(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],Ie(e[r],t[r]))}),Re(Re({},e),t)}var Wt={type:"cancelation",msg:"operation is manually canceled"};function he(e){var t=!1,r=new Promise(function(n,o){e.then(function(i){return t?o(Wt):n(i)}),e.catch(o)});return r.cancel=function(){return t=!0},r}var Ht=["monaco"],$t=Mt.create({config:_t,isInitialized:!1,resolve:null,reject:null,monaco:null}),Ne=ft($t,2),Q=Ne[0],le=Ne[1];function kt(e){var t=Vt.config(e),r=t.monaco,n=ut(t,Ht);le(function(o){return{config:Ie(o.config,n),monaco:r}})}function Ut(){var e=Q(function(t){var r=t.monaco,n=t.isInitialized,o=t.resolve;return{monaco:r,isInitialized:n,resolve:o}});if(!e.isInitialized){if(le({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),he(me);if(window.monaco&&window.monaco.editor)return Ve(window.monaco),e.resolve(window.monaco),he(me);zt(Ft,Yt)(Xt)}return he(me)}function Ft(e){return document.body.appendChild(e)}function Bt(e){var t=document.createElement("script");return e&&(t.src=e),t}function Yt(e){var t=Q(function(n){var o=n.config,i=n.reject;return{config:o,reject:i}}),r=Bt("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function Xt(){var e=Q(function(r){var n=r.config,o=r.resolve,i=r.reject;return{config:n,resolve:o,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;Ve(n),e.resolve(n)},function(r){e.reject(r)})}function Ve(e){Q().monaco||le({monaco:e})}function qt(){return Q(function(e){var t=e.monaco;return t})}var me=new Promise(function(e,t){return le({resolve:e,reject:t})}),ae={config:kt,init:Ut,__getMonacoInstance:qt},Kt={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ge=Kt,Jt={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Qt=Jt;function Gt({children:e}){return k.createElement("div",{style:Qt.container},e)}var Zt=Gt,er=Zt;function tr({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:l}){return k.createElement("section",{style:{...ge.wrapper,width:e,height:t},...l},!r&&k.createElement(er,null,n),k.createElement("div",{ref:o,style:{...ge.fullWidth,...!r&&ge.hide},className:i}))}var rr=tr,ze=a.memo(rr);function nr(e){a.useEffect(e,[])}var We=nr;function or(e,t,r=!0){let n=a.useRef(!0);a.useEffect(n.current||!r?()=>{n.current=!1}:e,t)}var _=or;function q(){}function H(e,t,r,n){return ir(e,n)||lr(e,t,r,n)}function ir(e,t){return e.editor.getModel(He(e,t))}function lr(e,t,r,n){return e.editor.createModel(t,r,n?He(e,n):void 0)}function He(e,t){return e.Uri.parse(t)}function ar({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:l,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:p="100%",width:v="100%",className:R,wrapperProps:A={},beforeMount:D=q,onMount:T=q}){let[P,x]=a.useState(!1),[y,w]=a.useState(!0),S=a.useRef(null),b=a.useRef(null),j=a.useRef(null),g=a.useRef(T),m=a.useRef(D),M=a.useRef(!1);We(()=>{let E=ae.init();return E.then(C=>(b.current=C)&&w(!1)).catch(C=>C?.type!=="cancelation"&&console.error("Monaco initialization: error:",C)),()=>S.current?Y():E.cancel()}),_(()=>{if(S.current&&b.current){let E=S.current.getOriginalEditor(),C=H(b.current,e||"",n||r||"text",i||"");C!==E.getModel()&&E.setModel(C)}},[i],P),_(()=>{if(S.current&&b.current){let E=S.current.getModifiedEditor(),C=H(b.current,t||"",o||r||"text",l||"");C!==E.getModel()&&E.setModel(C)}},[l],P),_(()=>{let E=S.current.getModifiedEditor();E.getOption(b.current.editor.EditorOption.readOnly)?E.setValue(t||""):t!==E.getValue()&&(E.executeEdits("",[{range:E.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),E.pushUndoStop())},[t],P),_(()=>{S.current?.getModel()?.original.setValue(e||"")},[e],P),_(()=>{let{original:E,modified:C}=S.current.getModel();b.current.editor.setModelLanguage(E,n||r||"text"),b.current.editor.setModelLanguage(C,o||r||"text")},[r,n,o],P),_(()=>{b.current?.editor.setTheme(u)},[u],P),_(()=>{S.current?.updateOptions(f)},[f],P);let B=a.useCallback(()=>{if(!b.current)return;m.current(b.current);let E=H(b.current,e||"",n||r||"text",i||""),C=H(b.current,t||"",o||r||"text",l||"");S.current?.setModel({original:E,modified:C})},[r,t,o,e,n,i,l]),G=a.useCallback(()=>{!M.current&&j.current&&(S.current=b.current.editor.createDiffEditor(j.current,{automaticLayout:!0,...f}),B(),b.current?.editor.setTheme(u),x(!0),M.current=!0)},[f,u,B]);a.useEffect(()=>{P&&g.current(S.current,b.current)},[P]),a.useEffect(()=>{!y&&!P&&G()},[y,P,G]);function Y(){let E=S.current?.getModel();s||E?.original?.dispose(),c||E?.modified?.dispose(),S.current?.dispose()}return k.createElement(ze,{width:v,height:p,isEditorReady:P,loading:d,_ref:j,className:R,wrapperProps:A})}var cr=ar;a.memo(cr);function sr(e){let t=a.useRef();return a.useEffect(()=>{t.current=e},[e]),t.current}var ur=sr,ee=new Map;function dr({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:l="light",line:s,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:p=!1,width:v="100%",height:R="100%",className:A,wrapperProps:D={},beforeMount:T=q,onMount:P=q,onChange:x,onValidate:y=q}){let[w,S]=a.useState(!1),[b,j]=a.useState(!0),g=a.useRef(null),m=a.useRef(null),M=a.useRef(null),B=a.useRef(P),G=a.useRef(T),Y=a.useRef(),E=a.useRef(n),C=ur(i),ye=a.useRef(!1),ue=a.useRef(!1);We(()=>{let O=ae.init();return O.then(N=>(g.current=N)&&j(!1)).catch(N=>N?.type!=="cancelation"&&console.error("Monaco initialization: error:",N)),()=>m.current?et():O.cancel()}),_(()=>{let O=H(g.current,e||n||"",t||o||"",i||r||"");O!==m.current?.getModel()&&(f&&ee.set(C,m.current?.saveViewState()),m.current?.setModel(O),f&&m.current?.restoreViewState(ee.get(i)))},[i],w),_(()=>{m.current?.updateOptions(u)},[u],w),_(()=>{!m.current||n===void 0||(m.current.getOption(g.current.editor.EditorOption.readOnly)?m.current.setValue(n):n!==m.current.getValue()&&(ue.current=!0,m.current.executeEdits("",[{range:m.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),m.current.pushUndoStop(),ue.current=!1))},[n],w),_(()=>{let O=m.current?.getModel();O&&o&&g.current?.editor.setModelLanguage(O,o)},[o],w),_(()=>{s!==void 0&&m.current?.revealLine(s)},[s],w),_(()=>{g.current?.editor.setTheme(l)},[l],w);let Ee=a.useCallback(()=>{if(!(!M.current||!g.current)&&!ye.current){G.current(g.current);let O=i||r,N=H(g.current,n||e||"",t||o||"",O||"");m.current=g.current?.editor.create(M.current,{model:N,automaticLayout:!0,...u},d),f&&m.current.restoreViewState(ee.get(O)),g.current.editor.setTheme(l),s!==void 0&&m.current.revealLine(s),S(!0),ye.current=!0}},[e,t,r,n,o,i,u,d,f,l,s]);a.useEffect(()=>{w&&B.current(m.current,g.current)},[w]),a.useEffect(()=>{!b&&!w&&Ee()},[b,w,Ee]),E.current=n,a.useEffect(()=>{w&&x&&(Y.current?.dispose(),Y.current=m.current?.onDidChangeModelContent(O=>{ue.current||x(m.current.getValue(),O)}))},[w,x]),a.useEffect(()=>{if(w){let O=g.current.editor.onDidChangeMarkers(N=>{let de=m.current.getModel()?.uri;if(de&&N.find(fe=>fe.path===de.path)){let fe=g.current.editor.getModelMarkers({resource:de});y?.(fe)}});return()=>{O?.dispose()}}return()=>{}},[w,y]);function et(){Y.current?.dispose(),p?f&&ee.set(i,m.current.saveViewState()):m.current.getModel()?.dispose(),m.current.dispose()}return k.createElement(ze,{width:v,height:R,isEditorReady:w,loading:c,_ref:M,className:A,wrapperProps:D})}var fr=dr,pr=a.memo(fr),hr=pr;async function mr(e){const t=e.getModel();if(!t)throw new Error("[Monaco] No model found in editor");const r=t.getValue(),o=r.replace(/export default (async )?function/,"export default $1function __default")+`
11
+ `},Oe=At(Nt)(De),Vt={config:Dt},zt=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(o){return r.reduceRight(function(i,l){return l(i)},o)}};function Ie(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],Ie(e[r],t[r]))}),Re(Re({},e),t)}var Wt={type:"cancelation",msg:"operation is manually canceled"};function he(e){var t=!1,r=new Promise(function(n,o){e.then(function(i){return t?o(Wt):n(i)}),e.catch(o)});return r.cancel=function(){return t=!0},r}var Ht=["monaco"],$t=_t.create({config:Mt,isInitialized:!1,resolve:null,reject:null,monaco:null}),Ne=ft($t,2),Q=Ne[0],le=Ne[1];function kt(e){var t=Vt.config(e),r=t.monaco,n=ut(t,Ht);le(function(o){return{config:Ie(o.config,n),monaco:r}})}function Ut(){var e=Q(function(t){var r=t.monaco,n=t.isInitialized,o=t.resolve;return{monaco:r,isInitialized:n,resolve:o}});if(!e.isInitialized){if(le({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),he(me);if(window.monaco&&window.monaco.editor)return Ve(window.monaco),e.resolve(window.monaco),he(me);zt(Ft,Yt)(Xt)}return he(me)}function Ft(e){return document.body.appendChild(e)}function Bt(e){var t=document.createElement("script");return e&&(t.src=e),t}function Yt(e){var t=Q(function(n){var o=n.config,i=n.reject;return{config:o,reject:i}}),r=Bt("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function Xt(){var e=Q(function(r){var n=r.config,o=r.resolve,i=r.reject;return{config:n,resolve:o,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;Ve(n),e.resolve(n)},function(r){e.reject(r)})}function Ve(e){Q().monaco||le({monaco:e})}function qt(){return Q(function(e){var t=e.monaco;return t})}var me=new Promise(function(e,t){return le({resolve:e,reject:t})}),ae={config:kt,init:Ut,__getMonacoInstance:qt},Kt={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ge=Kt,Jt={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Qt=Jt;function Gt({children:e}){return k.createElement("div",{style:Qt.container},e)}var Zt=Gt,er=Zt;function tr({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:l}){return k.createElement("section",{style:{...ge.wrapper,width:e,height:t},...l},!r&&k.createElement(er,null,n),k.createElement("div",{ref:o,style:{...ge.fullWidth,...!r&&ge.hide},className:i}))}var rr=tr,ze=a.memo(rr);function nr(e){a.useEffect(e,[])}var We=nr;function or(e,t,r=!0){let n=a.useRef(!0);a.useEffect(n.current||!r?()=>{n.current=!1}:e,t)}var M=or;function q(){}function H(e,t,r,n){return ir(e,n)||lr(e,t,r,n)}function ir(e,t){return e.editor.getModel(He(e,t))}function lr(e,t,r,n){return e.editor.createModel(t,r,n?He(e,n):void 0)}function He(e,t){return e.Uri.parse(t)}function ar({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:l,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:f={},height:p="100%",width:v="100%",className:R,wrapperProps:A={},beforeMount:D=q,onMount:T=q}){let[P,x]=a.useState(!1),[y,w]=a.useState(!0),S=a.useRef(null),b=a.useRef(null),j=a.useRef(null),g=a.useRef(T),m=a.useRef(D),_=a.useRef(!1);We(()=>{let E=ae.init();return E.then(C=>(b.current=C)&&w(!1)).catch(C=>C?.type!=="cancelation"&&console.error("Monaco initialization: error:",C)),()=>S.current?Y():E.cancel()}),M(()=>{if(S.current&&b.current){let E=S.current.getOriginalEditor(),C=H(b.current,e||"",n||r||"text",i||"");C!==E.getModel()&&E.setModel(C)}},[i],P),M(()=>{if(S.current&&b.current){let E=S.current.getModifiedEditor(),C=H(b.current,t||"",o||r||"text",l||"");C!==E.getModel()&&E.setModel(C)}},[l],P),M(()=>{let E=S.current.getModifiedEditor();E.getOption(b.current.editor.EditorOption.readOnly)?E.setValue(t||""):t!==E.getValue()&&(E.executeEdits("",[{range:E.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),E.pushUndoStop())},[t],P),M(()=>{S.current?.getModel()?.original.setValue(e||"")},[e],P),M(()=>{let{original:E,modified:C}=S.current.getModel();b.current.editor.setModelLanguage(E,n||r||"text"),b.current.editor.setModelLanguage(C,o||r||"text")},[r,n,o],P),M(()=>{b.current?.editor.setTheme(u)},[u],P),M(()=>{S.current?.updateOptions(f)},[f],P);let B=a.useCallback(()=>{if(!b.current)return;m.current(b.current);let E=H(b.current,e||"",n||r||"text",i||""),C=H(b.current,t||"",o||r||"text",l||"");S.current?.setModel({original:E,modified:C})},[r,t,o,e,n,i,l]),G=a.useCallback(()=>{!_.current&&j.current&&(S.current=b.current.editor.createDiffEditor(j.current,{automaticLayout:!0,...f}),B(),b.current?.editor.setTheme(u),x(!0),_.current=!0)},[f,u,B]);a.useEffect(()=>{P&&g.current(S.current,b.current)},[P]),a.useEffect(()=>{!y&&!P&&G()},[y,P,G]);function Y(){let E=S.current?.getModel();s||E?.original?.dispose(),c||E?.modified?.dispose(),S.current?.dispose()}return k.createElement(ze,{width:v,height:p,isEditorReady:P,loading:d,_ref:j,className:R,wrapperProps:A})}var cr=ar;a.memo(cr);function sr(e){let t=a.useRef();return a.useEffect(()=>{t.current=e},[e]),t.current}var ur=sr,ee=new Map;function dr({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:l="light",line:s,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:p=!1,width:v="100%",height:R="100%",className:A,wrapperProps:D={},beforeMount:T=q,onMount:P=q,onChange:x,onValidate:y=q}){let[w,S]=a.useState(!1),[b,j]=a.useState(!0),g=a.useRef(null),m=a.useRef(null),_=a.useRef(null),B=a.useRef(P),G=a.useRef(T),Y=a.useRef(),E=a.useRef(n),C=ur(i),ye=a.useRef(!1),ue=a.useRef(!1);We(()=>{let O=ae.init();return O.then(N=>(g.current=N)&&j(!1)).catch(N=>N?.type!=="cancelation"&&console.error("Monaco initialization: error:",N)),()=>m.current?et():O.cancel()}),M(()=>{let O=H(g.current,e||n||"",t||o||"",i||r||"");O!==m.current?.getModel()&&(f&&ee.set(C,m.current?.saveViewState()),m.current?.setModel(O),f&&m.current?.restoreViewState(ee.get(i)))},[i],w),M(()=>{m.current?.updateOptions(u)},[u],w),M(()=>{!m.current||n===void 0||(m.current.getOption(g.current.editor.EditorOption.readOnly)?m.current.setValue(n):n!==m.current.getValue()&&(ue.current=!0,m.current.executeEdits("",[{range:m.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),m.current.pushUndoStop(),ue.current=!1))},[n],w),M(()=>{let O=m.current?.getModel();O&&o&&g.current?.editor.setModelLanguage(O,o)},[o],w),M(()=>{s!==void 0&&m.current?.revealLine(s)},[s],w),M(()=>{g.current?.editor.setTheme(l)},[l],w);let Ee=a.useCallback(()=>{if(!(!_.current||!g.current)&&!ye.current){G.current(g.current);let O=i||r,N=H(g.current,n||e||"",t||o||"",O||"");m.current=g.current?.editor.create(_.current,{model:N,automaticLayout:!0,...u},d),f&&m.current.restoreViewState(ee.get(O)),g.current.editor.setTheme(l),s!==void 0&&m.current.revealLine(s),S(!0),ye.current=!0}},[e,t,r,n,o,i,u,d,f,l,s]);a.useEffect(()=>{w&&B.current(m.current,g.current)},[w]),a.useEffect(()=>{!b&&!w&&Ee()},[b,w,Ee]),E.current=n,a.useEffect(()=>{w&&x&&(Y.current?.dispose(),Y.current=m.current?.onDidChangeModelContent(O=>{ue.current||x(m.current.getValue(),O)}))},[w,x]),a.useEffect(()=>{if(w){let O=g.current.editor.onDidChangeMarkers(N=>{let de=m.current.getModel()?.uri;if(de&&N.find(fe=>fe.path===de.path)){let fe=g.current.editor.getModelMarkers({resource:de});y?.(fe)}});return()=>{O?.dispose()}}return()=>{}},[w,y]);function et(){Y.current?.dispose(),p?f&&ee.set(i,m.current.saveViewState()):m.current.getModel()?.dispose(),m.current.dispose()}return k.createElement(ze,{width:v,height:R,isEditorReady:w,loading:c,_ref:_,className:A,wrapperProps:D})}var fr=dr,pr=a.memo(fr),hr=pr;async function mr(e){const t=e.getModel();if(!t)throw new Error("[Monaco] No model found in editor");const r=t.getValue(),o=r.replace(/export default (async )?function/,"export default $1function __default")+`
12
12
  type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
13
13
  ? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
14
14
  : T extends object
@@ -16,4 +16,4 @@ type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
16
16
  : T;
17
17
  type __InferredOutput = __ExpandRecursively<Awaited<ReturnType<typeof __default>>>;
18
18
  declare const __outputValue: __InferredOutput;
19
- `;t.setValue(o);const i=t.findMatches("__outputValue",!1,!1,!1,null,!1);if(!i||i.length===0)return t.setValue(r),null;const l=i[0];if(!l)return t.setValue(r),null;const s={lineNumber:l.range.startLineNumber,column:l.range.startColumn+1};try{const u=await(await ae.init()).languages.typescript.getTypeScriptWorker();if(!u)return t.setValue(r),null;const d=await u(t.uri);await new Promise(v=>setTimeout(v,100));const f=t.getOffsetAt(s),p=await d.getQuickInfoAtPosition(t.uri.toString(),f);if(t.setValue(r),p){const R=p.displayParts.map(D=>D.text).join("").replace(/^const __outputValue:\s*/,"");return $(R)}else return null}catch(c){return t.setValue(r),console.error("Error getting return type:",c),null}}function $(e){if(e=e.trim(),e==="string")return{type:"string"};if(e==="number")return{type:"number"};if(e==="boolean")return{type:"boolean"};if(e==="null")return{type:"null"};if(e==="undefined")return{type:"null"};if(e==="unknown"||e==="any")return{};if(e==="never")return{not:{}};if(e.endsWith("[]")){const n=e.slice(0,-2);return{type:"array",items:$(n)}}const t=e.match(/^Array<(.+)>$/);if(t&&t[1])return{type:"array",items:$(t[1])};const r=e.match(/^Record<(.+),\s*(.+)>$/);if(r&&r[2])return{type:"object",additionalProperties:$(r[2].trim())};if(e.includes("|")){const n=gr(e);if(n.length>1)return n.every(i=>/^["']/.test(i.trim()))?{type:"string",enum:n.map(i=>i.trim().replace(/^["']|["']$/g,""))}:{anyOf:n.map(i=>$(i.trim()))}}return/^["'].*["']$/.test(e)?{type:"string",const:e.slice(1,-1)}:/^-?\d+(\.\d+)?$/.test(e)?{type:"number",const:parseFloat(e)}:e.startsWith("{")&&e.endsWith("}")?vr(e):{description:`TypeScript type: ${e}`}}function gr(e){const t=[];let r=0,n="";for(let o=0;o<e.length;o++){const i=e[o];if(i==="{"||i==="<"||i==="("||i==="[")r++;else if(i==="}"||i===">"||i===")"||i==="]")r--;else if(i==="|"&&r===0){t.push(n.trim()),n="";continue}n+=i}return n.trim()&&t.push(n.trim()),t}function vr(e){const t=e.slice(1,-1).trim();if(!t)return{type:"object",properties:{}};const r={},n=[];let o=0,i="";for(let s=0;s<t.length;s++){const c=t[s];if(c==="{"||c==="<"||c==="("||c==="[")o++;else if(c==="}"||c===">"||c===")"||c==="]")o--;else if(c===";"&&o===0){i.trim()&&Te(i.trim(),r,n),i="";continue}i+=c}i.trim()&&Te(i.trim(),r,n);const l={type:"object",properties:r};return n.length>0&&(l.required=n),l}function Te(e,t,r){const n=e.match(/^(\w+)(\?)?:\s*(.+)$/s);if(n){const o=n[1],i=n[2],l=n[3];o&&l&&(t[o]=$(l.trim()),i||r.push(o))}}class br extends a.Component{constructor(t){super(t),this.state={hasError:!1,mountKey:0}}static getDerivedStateFromError(t){if(t.message?.includes("InstantiationService has been disposed"))return{hasError:!0};throw t}componentDidCatch(t){t.message?.includes("InstantiationService has been disposed")&&this.setState(r=>({hasError:!1,mountKey:r.mountKey+1}))}render(){return this.state.hasError?h.jsx("div",{className:"flex items-center justify-center h-full w-full bg-[#1e1e1e] text-gray-400",children:h.jsx(Le,{size:"sm"})}):a.cloneElement(this.props.children,{mountKey:this.state.mountKey})}}let te=null;const wr=async()=>{if(te)return te;const[e,t,r]=await Promise.all([pe(()=>import("./standalone-DS4gw9AE.js"),[]),pe(()=>import("./typescript-Ca_eWjgL.js"),[]),pe(()=>import("./estree-CwOGYdhi.js"),[])]);return te={format:e.format,plugins:[t.default,r.default]},te};ae.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const Sr={parser:"typescript",semi:!0,singleQuote:!1,tabWidth:2,trailingComma:"es5",printWidth:80},Me={fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,stickyScroll:{enabled:!1},wordWrap:"on",folding:!0,bracketPairColorization:{enabled:!0},suggestOnTriggerCharacters:!0,quickSuggestions:{other:!0,comments:!1,strings:!0},minimap:{enabled:!1},parameterHints:{enabled:!0},inlineSuggest:{enabled:!0},autoClosingBrackets:"always",autoClosingQuotes:"always",autoSurround:"languageDefined",padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8},theme:"light"},yr=h.jsx("div",{className:"flex items-center justify-center h-full w-full text-gray-400",children:h.jsx(Le,{size:"sm"})}),Er=a.memo(function({code:t,onChange:r,onSave:n,readOnly:o=!1,height:i=300,language:l="typescript",foldOnMount:s=!1,mountKey:c=0}){const u=a.useRef(null),d=a.useRef(null),f=a.useRef(n);f.current=n;const p=a.useRef(l);p.current=l;const v=a.useId(),R=`${v}-${c}`,A=l==="typescript"?`file:///workflow-${v.replace(/:/g,"-")}-${c}.tsx`:void 0,D=o?{...Me,readOnly:!0}:Me,T=async x=>{const y=x.getModel();if(!y){console.warn("No model found");return}const w=y.getValue();if(p.current==="json"){try{const b=JSON.parse(w),j=JSON.stringify(b,null,2);if(j!==w){const g=y.getFullModelRange();x.executeEdits("json-format",[{range:g,text:j}])}}catch(b){console.error("JSON formatting failed:",b)}return}try{const{format:b,plugins:j}=await wr(),g=await b(w,{...Sr,plugins:j});if(g!==w){const m=y.getFullModelRange();x.executeEdits("prettier",[{range:m,text:g}])}}catch(b){console.error("Prettier formatting failed:",b)}},P=async(x,y)=>{u.current=x,s&&d.current&&(d.current.style.visibility="hidden",await x.getAction("editor.foldLevel2")?.run(),d.current.style.visibility="visible"),l==="typescript"&&(y.languages.typescript.typescriptDefaults.setCompilerOptions({target:y.languages.typescript.ScriptTarget.ESNext,module:y.languages.typescript.ModuleKind.ESNext,moduleResolution:y.languages.typescript.ModuleResolutionKind.NodeJs,allowNonTsExtensions:!0,allowJs:!0,strict:!1,noEmit:!0,esModuleInterop:!0,jsx:y.languages.typescript.JsxEmit.React,allowSyntheticDefaultImports:!0}),y.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1})),x.addCommand(y.KeyMod.CtrlCmd|y.KeyCode.KeyS,async()=>{await T(x);const w=await mr(x),S=x.getValue();f.current?.(S,w)})};return h.jsx("div",{ref:d,className:"h-full",children:h.jsx(hr,{height:i,language:l,value:t,path:A,onChange:r,onMount:P,loading:yr,options:D},R)})}),$r=a.memo(function(t){const r=ve.c(2);let n;return r[0]!==t?(n=h.jsx(br,{children:h.jsx(Er,{...t})}),r[0]=t,r[1]=n):n=r[1],n});function Pr(e,t){return a.useReducer((r,n)=>t[r][n]??r,e)}var be="ScrollArea",[$e]=rt(be),[xr,L]=$e(be),ke=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...l}=e,[s,c]=a.useState(null),[u,d]=a.useState(null),[f,p]=a.useState(null),[v,R]=a.useState(null),[A,D]=a.useState(null),[T,P]=a.useState(0),[x,y]=a.useState(0),[w,S]=a.useState(!1),[b,j]=a.useState(!1),g=F(t,M=>c(M)),m=tt(o);return h.jsx(xr,{scope:r,type:n,dir:m,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:v,onScrollbarXChange:R,scrollbarXEnabled:w,onScrollbarXEnabledChange:S,scrollbarY:A,onScrollbarYChange:D,scrollbarYEnabled:b,onScrollbarYEnabledChange:j,onCornerWidthChange:P,onCornerHeightChange:y,children:h.jsx(J.div,{dir:m,...l,ref:g,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});ke.displayName=be;var Ue="ScrollAreaViewport",Fe=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,l=L(Ue,r),s=a.useRef(null),c=F(t,s,l.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),h.jsx(J.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:h.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Fe.displayName=Ue;var I="ScrollAreaScrollbar",Be=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=L(I,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=o,s=e.orientation==="horizontal";return a.useEffect(()=>(s?i(!0):l(!0),()=>{s?i(!1):l(!1)}),[s,i,l]),o.type==="hover"?h.jsx(Rr,{...n,ref:t,forceMount:r}):o.type==="scroll"?h.jsx(Cr,{...n,ref:t,forceMount:r}):o.type==="auto"?h.jsx(Ye,{...n,ref:t,forceMount:r}):o.type==="always"?h.jsx(we,{...n,ref:t}):null});Be.displayName=I;var Rr=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=L(I,e.__scopeScrollArea),[i,l]=a.useState(!1);return a.useEffect(()=>{const s=o.scrollArea;let c=0;if(s){const u=()=>{window.clearTimeout(c),l(!0)},d=()=>{c=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),h.jsx(ie,{present:r||i,children:h.jsx(Ye,{"data-state":i?"visible":"hidden",...n,ref:t})})}),Cr=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=L(I,e.__scopeScrollArea),i=e.orientation==="horizontal",l=se(()=>c("SCROLL_END"),100),[s,c]=Pr("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,c]),a.useEffect(()=>{const u=o.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const p=()=>{const v=u[d];f!==v&&(c("SCROLL"),l()),f=v};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,c,l]),h.jsx(ie,{present:r||s!=="hidden",children:h.jsx(we,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:W(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:W(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Ye=a.forwardRef((e,t)=>{const r=L(I,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,l]=a.useState(!1),s=e.orientation==="horizontal",c=se(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;l(s?u:d)}},10);return U(r.viewport,c),U(r.content,c),h.jsx(ie,{present:n||i,children:h.jsx(we,{"data-state":i?"visible":"hidden",...o,ref:t})})}),we=a.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=L(I,e.__scopeScrollArea),i=a.useRef(null),l=a.useRef(0),[s,c]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Qe(s.viewport,s.content),d={...n,sizes:s,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:p=>l.current=p};function f(p,v){return Ar(p,l.current,s,v)}return r==="horizontal"?h.jsx(jr,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,v=_e(p,s,o.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=f(p,o.dir))}}):r==="vertical"?h.jsx(Or,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,v=_e(p,s);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=f(p))}}):null}),jr=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=L(I,e.__scopeScrollArea),[l,s]=a.useState(),c=a.useRef(null),u=F(t,c,i.onScrollbarXChange);return a.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),h.jsx(qe,{"data-orientation":"horizontal",...o,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ce(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const p=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),Ze(p,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&l&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:oe(l.paddingLeft),paddingEnd:oe(l.paddingRight)}})}})}),Or=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=L(I,e.__scopeScrollArea),[l,s]=a.useState(),c=a.useRef(null),u=F(t,c,i.onScrollbarYChange);return a.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),h.jsx(qe,{"data-orientation":"vertical",...o,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ce(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const p=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),Ze(p,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&l&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:oe(l.paddingTop),paddingEnd:oe(l.paddingBottom)}})}})}),[Tr,Xe]=$e(I),qe=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=e,v=L(I,r),[R,A]=a.useState(null),D=F(t,g=>A(g)),T=a.useRef(null),P=a.useRef(""),x=v.viewport,y=n.content-n.viewport,w=z(d),S=z(c),b=se(f,10);function j(g){if(T.current){const m=g.clientX-T.current.left,M=g.clientY-T.current.top;u({x:m,y:M})}}return a.useEffect(()=>{const g=m=>{const M=m.target;R?.contains(M)&&w(m,y)};return document.addEventListener("wheel",g,{passive:!1}),()=>document.removeEventListener("wheel",g,{passive:!1})},[x,R,y,w]),a.useEffect(S,[n,S]),U(R,b),U(v.content,b),h.jsx(Tr,{scope:r,scrollbar:R,hasThumb:o,onThumbChange:z(i),onThumbPointerUp:z(l),onThumbPositionChange:S,onThumbPointerDown:z(s),children:h.jsx(J.div,{...p,ref:D,style:{position:"absolute",...p.style},onPointerDown:W(e.onPointerDown,g=>{g.button===0&&(g.target.setPointerCapture(g.pointerId),T.current=R.getBoundingClientRect(),P.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),j(g))}),onPointerMove:W(e.onPointerMove,j),onPointerUp:W(e.onPointerUp,g=>{const m=g.target;m.hasPointerCapture(g.pointerId)&&m.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=P.current,v.viewport&&(v.viewport.style.scrollBehavior=""),T.current=null})})})}),ne="ScrollAreaThumb",Ke=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Xe(ne,e.__scopeScrollArea);return h.jsx(ie,{present:r||o.hasThumb,children:h.jsx(Mr,{ref:t,...n})})}),Mr=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=L(ne,r),l=Xe(ne,r),{onThumbPositionChange:s}=l,c=F(t,f=>l.onThumbChange(f)),u=a.useRef(void 0),d=se(()=>{u.current&&(u.current(),u.current=void 0)},100);return a.useEffect(()=>{const f=i.viewport;if(f){const p=()=>{if(d(),!u.current){const v=Lr(f,s);u.current=v,s()}};return s(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[i.viewport,d,s]),h.jsx(J.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:W(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),R=f.clientX-v.left,A=f.clientY-v.top;l.onThumbPointerDown({x:R,y:A})}),onPointerUp:W(e.onPointerUp,l.onThumbPointerUp)})});Ke.displayName=ne;var Se="ScrollAreaCorner",Je=a.forwardRef((e,t)=>{const r=L(Se,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?h.jsx(_r,{...e,ref:t}):null});Je.displayName=Se;var _r=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=L(Se,r),[i,l]=a.useState(0),[s,c]=a.useState(0),u=!!(i&&s);return U(o.scrollbarX,()=>{const d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),c(d)}),U(o.scrollbarY,()=>{const d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),l(d)}),u?h.jsx(J.div,{...n,ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function oe(e){return e?parseInt(e,10):0}function Qe(e,t){const r=e/t;return isNaN(r)?0:r}function ce(e){const t=Qe(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Ar(e,t,r,n="ltr"){const o=ce(r),i=o/2,l=t||i,s=o-l,c=r.scrollbar.paddingStart+l,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return Ge([c,u],f)(e)}function _e(e,t,r="ltr"){const n=ce(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,l=t.content-t.viewport,s=i-n,c=r==="ltr"?[0,l]:[l*-1,0],u=ot(e,c);return Ge([0,l],[0,s])(u)}function Ge(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Ze(e,t){return e>0&&e<t}var Lr=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){const i={left:e.scrollLeft,top:e.scrollTop},l=r.left!==i.left,s=r.top!==i.top;(l||s)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)};function se(e,t){const r=z(e),n=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(n.current),[]),a.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function U(e,t){const r=z(t);nt(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var Dr=ke,Ir=Fe,Nr=Je;function kr(e){const t=ve.c(17);let r,n,o,i;t[0]!==e?({className:n,children:r,hideScrollbar:i,...o}=e,t[0]=e,t[1]=r,t[2]=n,t[3]=o,t[4]=i):(r=t[1],n=t[2],o=t[3],i=t[4]);const l=i===void 0?!1:i;let s;t[5]!==n?(s=Ae("relative h-full w-full",n),t[5]=n,t[6]=s):s=t[6];let c;t[7]!==r?(c=h.jsx(Ir,{"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-ring/50",children:h.jsx("div",{className:"flex min-w-0 flex-col",children:r})}),t[7]=r,t[8]=c):c=t[8];let u;t[9]!==l?(u=h.jsx(Vr,{hideScrollbar:l}),t[9]=l,t[10]=u):u=t[10];let d;t[11]===Symbol.for("react.memo_cache_sentinel")?(d=h.jsx(Nr,{}),t[11]=d):d=t[11];let f;return t[12]!==o||t[13]!==s||t[14]!==c||t[15]!==u?(f=h.jsxs(Dr,{"data-slot":"scroll-area",className:s,...o,children:[c,u,d]}),t[12]=o,t[13]=s,t[14]=c,t[15]=u,t[16]=f):f=t[16],f}function Vr(e){const t=ve.c(15);let r,n,o,i;t[0]!==e?({className:r,orientation:o,hideScrollbar:i,...n}=e,t[0]=e,t[1]=r,t[2]=n,t[3]=o,t[4]=i):(r=t[1],n=t[2],o=t[3],i=t[4]);const l=o===void 0?"vertical":o,s=i===void 0?!1:i,c=l==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",d=s&&"hidden";let f;t[5]!==r||t[6]!==c||t[7]!==u||t[8]!==d?(f=Ae("select-none touch-none p-px transition-colors",c,u,d,r),t[5]=r,t[6]=c,t[7]=u,t[8]=d,t[9]=f):f=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=h.jsx(Ke,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),t[10]=p):p=t[10];let v;return t[11]!==l||t[12]!==n||t[13]!==f?(v=h.jsx(Be,{"data-slot":"scroll-area-scrollbar",orientation:l,className:f,...n,children:p}),t[11]=l,t[12]=n,t[13]=f,t[14]=v):v=t[14],v}export{$r as M,Vr as S,kr as a,it as n};
19
+ `;t.setValue(o);const i=t.findMatches("__outputValue",!1,!1,!1,null,!1);if(!i||i.length===0)return t.setValue(r),null;const l=i[0];if(!l)return t.setValue(r),null;const s={lineNumber:l.range.startLineNumber,column:l.range.startColumn+1};try{const u=await(await ae.init()).languages.typescript.getTypeScriptWorker();if(!u)return t.setValue(r),null;const d=await u(t.uri);await new Promise(v=>setTimeout(v,100));const f=t.getOffsetAt(s),p=await d.getQuickInfoAtPosition(t.uri.toString(),f);if(t.setValue(r),p){const R=p.displayParts.map(D=>D.text).join("").replace(/^const __outputValue:\s*/,"");return $(R)}else return null}catch(c){return t.setValue(r),console.error("Error getting return type:",c),null}}function $(e){if(e=e.trim(),e==="string")return{type:"string"};if(e==="number")return{type:"number"};if(e==="boolean")return{type:"boolean"};if(e==="null")return{type:"null"};if(e==="undefined")return{type:"null"};if(e==="unknown"||e==="any")return{};if(e==="never")return{not:{}};if(e.endsWith("[]")){const n=e.slice(0,-2);return{type:"array",items:$(n)}}const t=e.match(/^Array<(.+)>$/);if(t&&t[1])return{type:"array",items:$(t[1])};const r=e.match(/^Record<(.+),\s*(.+)>$/);if(r&&r[2])return{type:"object",additionalProperties:$(r[2].trim())};if(e.includes("|")){const n=gr(e);if(n.length>1)return n.every(i=>/^["']/.test(i.trim()))?{type:"string",enum:n.map(i=>i.trim().replace(/^["']|["']$/g,""))}:{anyOf:n.map(i=>$(i.trim()))}}return/^["'].*["']$/.test(e)?{type:"string",const:e.slice(1,-1)}:/^-?\d+(\.\d+)?$/.test(e)?{type:"number",const:parseFloat(e)}:e.startsWith("{")&&e.endsWith("}")?vr(e):{description:`TypeScript type: ${e}`}}function gr(e){const t=[];let r=0,n="";for(let o=0;o<e.length;o++){const i=e[o];if(i==="{"||i==="<"||i==="("||i==="[")r++;else if(i==="}"||i===">"||i===")"||i==="]")r--;else if(i==="|"&&r===0){t.push(n.trim()),n="";continue}n+=i}return n.trim()&&t.push(n.trim()),t}function vr(e){const t=e.slice(1,-1).trim();if(!t)return{type:"object",properties:{}};const r={},n=[];let o=0,i="";for(let s=0;s<t.length;s++){const c=t[s];if(c==="{"||c==="<"||c==="("||c==="[")o++;else if(c==="}"||c===">"||c===")"||c==="]")o--;else if(c===";"&&o===0){i.trim()&&Te(i.trim(),r,n),i="";continue}i+=c}i.trim()&&Te(i.trim(),r,n);const l={type:"object",properties:r};return n.length>0&&(l.required=n),l}function Te(e,t,r){const n=e.match(/^(\w+)(\?)?:\s*(.+)$/s);if(n){const o=n[1],i=n[2],l=n[3];o&&l&&(t[o]=$(l.trim()),i||r.push(o))}}class br extends a.Component{constructor(t){super(t),this.state={hasError:!1,mountKey:0}}static getDerivedStateFromError(t){if(t.message?.includes("InstantiationService has been disposed"))return{hasError:!0};throw t}componentDidCatch(t){t.message?.includes("InstantiationService has been disposed")&&this.setState(r=>({hasError:!1,mountKey:r.mountKey+1}))}render(){return this.state.hasError?h.jsx("div",{className:"flex items-center justify-center h-full w-full bg-[#1e1e1e] text-gray-400",children:h.jsx(Le,{size:"sm"})}):a.cloneElement(this.props.children,{mountKey:this.state.mountKey})}}let te=null;const wr=async()=>{if(te)return te;const[e,t,r]=await Promise.all([pe(()=>import("./standalone-DS4gw9AE.js"),[]),pe(()=>import("./typescript-Ca_eWjgL.js"),[]),pe(()=>import("./estree-CwOGYdhi.js"),[])]);return te={format:e.format,plugins:[t.default,r.default]},te};ae.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const Sr={parser:"typescript",semi:!0,singleQuote:!1,tabWidth:2,trailingComma:"es5",printWidth:80},_e={fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,stickyScroll:{enabled:!1},wordWrap:"on",folding:!0,bracketPairColorization:{enabled:!0},suggestOnTriggerCharacters:!0,quickSuggestions:{other:!0,comments:!1,strings:!0},minimap:{enabled:!1},parameterHints:{enabled:!0},inlineSuggest:{enabled:!0},autoClosingBrackets:"always",autoClosingQuotes:"always",autoSurround:"languageDefined",padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8},theme:"light"},yr=h.jsx("div",{className:"flex items-center justify-center h-full w-full text-gray-400",children:h.jsx(Le,{size:"sm"})}),Er=a.memo(function({code:t,onChange:r,onSave:n,readOnly:o=!1,height:i=300,language:l="typescript",foldOnMount:s=!1,mountKey:c=0}){const u=a.useRef(null),d=a.useRef(null),f=a.useRef(n);f.current=n;const p=a.useRef(l);p.current=l;const v=a.useId(),R=`${v}-${c}`,A=l==="typescript"?`file:///workflow-${v.replace(/:/g,"-")}-${c}.tsx`:void 0,D=o?{..._e,readOnly:!0}:_e,T=async x=>{const y=x.getModel();if(!y){console.warn("No model found");return}const w=y.getValue();if(p.current==="json"){try{const b=JSON.parse(w),j=JSON.stringify(b,null,2);if(j!==w){const g=y.getFullModelRange();x.executeEdits("json-format",[{range:g,text:j}])}}catch(b){console.error("JSON formatting failed:",b)}return}try{const{format:b,plugins:j}=await wr(),g=await b(w,{...Sr,plugins:j});if(g!==w){const m=y.getFullModelRange();x.executeEdits("prettier",[{range:m,text:g}])}}catch(b){console.error("Prettier formatting failed:",b)}},P=async(x,y)=>{u.current=x,s&&d.current&&(d.current.style.visibility="hidden",await x.getAction("editor.foldLevel2")?.run(),d.current.style.visibility="visible"),l==="typescript"&&(y.languages.typescript.typescriptDefaults.setCompilerOptions({target:y.languages.typescript.ScriptTarget.ESNext,module:y.languages.typescript.ModuleKind.ESNext,moduleResolution:y.languages.typescript.ModuleResolutionKind.NodeJs,allowNonTsExtensions:!0,allowJs:!0,strict:!1,noEmit:!0,esModuleInterop:!0,jsx:y.languages.typescript.JsxEmit.React,allowSyntheticDefaultImports:!0}),y.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1})),x.addCommand(y.KeyMod.CtrlCmd|y.KeyCode.KeyS,async()=>{await T(x);const w=await mr(x),S=x.getValue();f.current?.(S,w)})};return h.jsx("div",{ref:d,className:"h-full",children:h.jsx(hr,{height:i,language:l,value:t,path:A,onChange:r,onMount:P,loading:yr,options:D},R)})}),$r=a.memo(function(t){const r=ve.c(2);let n;return r[0]!==t?(n=h.jsx(br,{children:h.jsx(Er,{...t})}),r[0]=t,r[1]=n):n=r[1],n});function Pr(e,t){return a.useReducer((r,n)=>t[r][n]??r,e)}var be="ScrollArea",[$e]=rt(be),[xr,L]=$e(be),ke=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...l}=e,[s,c]=a.useState(null),[u,d]=a.useState(null),[f,p]=a.useState(null),[v,R]=a.useState(null),[A,D]=a.useState(null),[T,P]=a.useState(0),[x,y]=a.useState(0),[w,S]=a.useState(!1),[b,j]=a.useState(!1),g=F(t,_=>c(_)),m=tt(o);return h.jsx(xr,{scope:r,type:n,dir:m,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:v,onScrollbarXChange:R,scrollbarXEnabled:w,onScrollbarXEnabledChange:S,scrollbarY:A,onScrollbarYChange:D,scrollbarYEnabled:b,onScrollbarYEnabledChange:j,onCornerWidthChange:P,onCornerHeightChange:y,children:h.jsx(J.div,{dir:m,...l,ref:g,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});ke.displayName=be;var Ue="ScrollAreaViewport",Fe=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,l=L(Ue,r),s=a.useRef(null),c=F(t,s,l.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),h.jsx(J.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:h.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Fe.displayName=Ue;var I="ScrollAreaScrollbar",Be=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=L(I,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=o,s=e.orientation==="horizontal";return a.useEffect(()=>(s?i(!0):l(!0),()=>{s?i(!1):l(!1)}),[s,i,l]),o.type==="hover"?h.jsx(Rr,{...n,ref:t,forceMount:r}):o.type==="scroll"?h.jsx(Cr,{...n,ref:t,forceMount:r}):o.type==="auto"?h.jsx(Ye,{...n,ref:t,forceMount:r}):o.type==="always"?h.jsx(we,{...n,ref:t}):null});Be.displayName=I;var Rr=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=L(I,e.__scopeScrollArea),[i,l]=a.useState(!1);return a.useEffect(()=>{const s=o.scrollArea;let c=0;if(s){const u=()=>{window.clearTimeout(c),l(!0)},d=()=>{c=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),h.jsx(ie,{present:r||i,children:h.jsx(Ye,{"data-state":i?"visible":"hidden",...n,ref:t})})}),Cr=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=L(I,e.__scopeScrollArea),i=e.orientation==="horizontal",l=se(()=>c("SCROLL_END"),100),[s,c]=Pr("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,c]),a.useEffect(()=>{const u=o.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const p=()=>{const v=u[d];f!==v&&(c("SCROLL"),l()),f=v};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,c,l]),h.jsx(ie,{present:r||s!=="hidden",children:h.jsx(we,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:W(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:W(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Ye=a.forwardRef((e,t)=>{const r=L(I,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,l]=a.useState(!1),s=e.orientation==="horizontal",c=se(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;l(s?u:d)}},10);return U(r.viewport,c),U(r.content,c),h.jsx(ie,{present:n||i,children:h.jsx(we,{"data-state":i?"visible":"hidden",...o,ref:t})})}),we=a.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=L(I,e.__scopeScrollArea),i=a.useRef(null),l=a.useRef(0),[s,c]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Qe(s.viewport,s.content),d={...n,sizes:s,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:p=>l.current=p};function f(p,v){return Ar(p,l.current,s,v)}return r==="horizontal"?h.jsx(jr,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,v=Me(p,s,o.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=f(p,o.dir))}}):r==="vertical"?h.jsx(Or,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,v=Me(p,s);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=f(p))}}):null}),jr=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=L(I,e.__scopeScrollArea),[l,s]=a.useState(),c=a.useRef(null),u=F(t,c,i.onScrollbarXChange);return a.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),h.jsx(qe,{"data-orientation":"horizontal",...o,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ce(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const p=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),Ze(p,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&l&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:oe(l.paddingLeft),paddingEnd:oe(l.paddingRight)}})}})}),Or=a.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=L(I,e.__scopeScrollArea),[l,s]=a.useState(),c=a.useRef(null),u=F(t,c,i.onScrollbarYChange);return a.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),h.jsx(qe,{"data-orientation":"vertical",...o,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ce(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const p=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),Ze(p,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&l&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:oe(l.paddingTop),paddingEnd:oe(l.paddingBottom)}})}})}),[Tr,Xe]=$e(I),qe=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=e,v=L(I,r),[R,A]=a.useState(null),D=F(t,g=>A(g)),T=a.useRef(null),P=a.useRef(""),x=v.viewport,y=n.content-n.viewport,w=z(d),S=z(c),b=se(f,10);function j(g){if(T.current){const m=g.clientX-T.current.left,_=g.clientY-T.current.top;u({x:m,y:_})}}return a.useEffect(()=>{const g=m=>{const _=m.target;R?.contains(_)&&w(m,y)};return document.addEventListener("wheel",g,{passive:!1}),()=>document.removeEventListener("wheel",g,{passive:!1})},[x,R,y,w]),a.useEffect(S,[n,S]),U(R,b),U(v.content,b),h.jsx(Tr,{scope:r,scrollbar:R,hasThumb:o,onThumbChange:z(i),onThumbPointerUp:z(l),onThumbPositionChange:S,onThumbPointerDown:z(s),children:h.jsx(J.div,{...p,ref:D,style:{position:"absolute",...p.style},onPointerDown:W(e.onPointerDown,g=>{g.button===0&&(g.target.setPointerCapture(g.pointerId),T.current=R.getBoundingClientRect(),P.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),j(g))}),onPointerMove:W(e.onPointerMove,j),onPointerUp:W(e.onPointerUp,g=>{const m=g.target;m.hasPointerCapture(g.pointerId)&&m.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=P.current,v.viewport&&(v.viewport.style.scrollBehavior=""),T.current=null})})})}),ne="ScrollAreaThumb",Ke=a.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Xe(ne,e.__scopeScrollArea);return h.jsx(ie,{present:r||o.hasThumb,children:h.jsx(_r,{ref:t,...n})})}),_r=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=L(ne,r),l=Xe(ne,r),{onThumbPositionChange:s}=l,c=F(t,f=>l.onThumbChange(f)),u=a.useRef(void 0),d=se(()=>{u.current&&(u.current(),u.current=void 0)},100);return a.useEffect(()=>{const f=i.viewport;if(f){const p=()=>{if(d(),!u.current){const v=Lr(f,s);u.current=v,s()}};return s(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[i.viewport,d,s]),h.jsx(J.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:W(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),R=f.clientX-v.left,A=f.clientY-v.top;l.onThumbPointerDown({x:R,y:A})}),onPointerUp:W(e.onPointerUp,l.onThumbPointerUp)})});Ke.displayName=ne;var Se="ScrollAreaCorner",Je=a.forwardRef((e,t)=>{const r=L(Se,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?h.jsx(Mr,{...e,ref:t}):null});Je.displayName=Se;var Mr=a.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=L(Se,r),[i,l]=a.useState(0),[s,c]=a.useState(0),u=!!(i&&s);return U(o.scrollbarX,()=>{const d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),c(d)}),U(o.scrollbarY,()=>{const d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),l(d)}),u?h.jsx(J.div,{...n,ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function oe(e){return e?parseInt(e,10):0}function Qe(e,t){const r=e/t;return isNaN(r)?0:r}function ce(e){const t=Qe(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Ar(e,t,r,n="ltr"){const o=ce(r),i=o/2,l=t||i,s=o-l,c=r.scrollbar.paddingStart+l,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return Ge([c,u],f)(e)}function Me(e,t,r="ltr"){const n=ce(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,l=t.content-t.viewport,s=i-n,c=r==="ltr"?[0,l]:[l*-1,0],u=ot(e,c);return Ge([0,l],[0,s])(u)}function Ge(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Ze(e,t){return e>0&&e<t}var Lr=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){const i={left:e.scrollLeft,top:e.scrollTop},l=r.left!==i.left,s=r.top!==i.top;(l||s)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)};function se(e,t){const r=z(e),n=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(n.current),[]),a.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function U(e,t){const r=z(t);nt(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var Dr=ke,Ir=Fe,Nr=Je;function kr(e){const t=ve.c(17);let r,n,o,i;t[0]!==e?({className:n,children:r,hideScrollbar:i,...o}=e,t[0]=e,t[1]=r,t[2]=n,t[3]=o,t[4]=i):(r=t[1],n=t[2],o=t[3],i=t[4]);const l=i===void 0?!1:i;let s;t[5]!==n?(s=Ae("relative h-full w-full",n),t[5]=n,t[6]=s):s=t[6];let c;t[7]!==r?(c=h.jsx(Ir,{"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:ring-ring/50",children:h.jsx("div",{className:"flex min-w-0 flex-col",children:r})}),t[7]=r,t[8]=c):c=t[8];let u;t[9]!==l?(u=h.jsx(Vr,{hideScrollbar:l}),t[9]=l,t[10]=u):u=t[10];let d;t[11]===Symbol.for("react.memo_cache_sentinel")?(d=h.jsx(Nr,{}),t[11]=d):d=t[11];let f;return t[12]!==o||t[13]!==s||t[14]!==c||t[15]!==u?(f=h.jsxs(Dr,{"data-slot":"scroll-area",className:s,...o,children:[c,u,d]}),t[12]=o,t[13]=s,t[14]=c,t[15]=u,t[16]=f):f=t[16],f}function Vr(e){const t=ve.c(15);let r,n,o,i;t[0]!==e?({className:r,orientation:o,hideScrollbar:i,...n}=e,t[0]=e,t[1]=r,t[2]=n,t[3]=o,t[4]=i):(r=t[1],n=t[2],o=t[3],i=t[4]);const l=o===void 0?"vertical":o,s=i===void 0?!1:i,c=l==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",d=s&&"hidden";let f;t[5]!==r||t[6]!==c||t[7]!==u||t[8]!==d?(f=Ae("select-none touch-none p-px transition-colors",c,u,d,r),t[5]=r,t[6]=c,t[7]=u,t[8]=d,t[9]=f):f=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=h.jsx(Ke,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),t[10]=p):p=t[10];let v;return t[11]!==l||t[12]!==n||t[13]!==f?(v=h.jsx(Be,{"data-slot":"scroll-area-scrollbar",orientation:l,className:f,...n,children:p}),t[11]=l,t[12]=n,t[13]=f,t[14]=v):v=t[14],v}export{$r as M,Vr as S,kr as a,it as n};