openpond 0.2.67 → 0.2.68

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 (564) hide show
  1. package/dist/app-server.d.ts +668 -1
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{account-context-TIJOM22A.js → account-context-MWB6HN6I.js} +1 -1
  4. package/dist/chunks/{acp-NASAJV5E.js → acp-2OIXATRY.js} +1 -1
  5. package/dist/chunks/{acp-agent-C3CRF6DT.js → acp-agent-PAGX2B47.js} +1 -1
  6. package/dist/chunks/actions-command-2VE6YI4W.js +2 -0
  7. package/dist/chunks/{app-layer-XIEZ6ALX.js → app-layer-YNEUEOEP.js} +1 -1
  8. package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-TZOAUOYR.js} +1 -1
  9. package/dist/chunks/app-server-evaluations-RRLYWLPK.js +2 -0
  10. package/dist/chunks/app-server-harness-services-XXM336NU.js +2 -0
  11. package/dist/chunks/app-server-runtime-GBX65JJ7.js +2 -0
  12. package/dist/chunks/apps-RSFEJOQN.js +2 -0
  13. package/dist/chunks/chunk-2PXKSAG6.js +2 -0
  14. package/dist/chunks/{chunk-XEU4J4GJ.js → chunk-2TGHZXJE.js} +2 -2
  15. package/dist/chunks/{chunk-AXO6OHJB.js → chunk-3A2Y7UK3.js} +1 -1
  16. package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
  17. package/dist/chunks/{chunk-V3T2OJBZ.js → chunk-4BUM6JEC.js} +2 -2
  18. package/dist/chunks/chunk-4G3GTEVS.js +23 -0
  19. package/dist/chunks/{chunk-43QYVOYA.js → chunk-4KNPCJR4.js} +1 -1
  20. package/dist/chunks/chunk-4KTGYHCE.js +2 -0
  21. package/dist/chunks/chunk-4PUOWSDE.js +13 -0
  22. package/dist/chunks/chunk-55YD4UTW.js +2 -0
  23. package/dist/chunks/chunk-5G7BQAUA.js +2 -0
  24. package/dist/chunks/chunk-65FJWWXG.js +2 -0
  25. package/dist/chunks/{chunk-4EZI4KCT.js → chunk-65WRWLUD.js} +1 -1
  26. package/dist/chunks/chunk-6D3FI2XT.js +2 -0
  27. package/dist/chunks/chunk-73TW6BKK.js +6 -0
  28. package/dist/chunks/{chunk-5TPYBXWM.js → chunk-7NCM6GBN.js} +1 -1
  29. package/dist/chunks/chunk-7OFD6TFD.js +2 -0
  30. package/dist/chunks/chunk-7OKZCJHS.js +3 -0
  31. package/dist/chunks/{chunk-ADOCQA4D.js → chunk-7PKDJHT6.js} +1 -1
  32. package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
  33. package/dist/chunks/{chunk-YR5URT73.js → chunk-7RSQOC5M.js} +3 -3
  34. package/dist/chunks/{chunk-FVK4W27G.js → chunk-AFH462DO.js} +1 -1
  35. package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
  36. package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
  37. package/dist/chunks/{chunk-U3MVH2YT.js → chunk-APKXXAUF.js} +1 -1
  38. package/dist/chunks/chunk-AQUZCWM3.js +2 -0
  39. package/dist/chunks/chunk-AUO5DCEU.js +2 -0
  40. package/dist/chunks/chunk-AYOMVI7J.js +2 -0
  41. package/dist/chunks/{chunk-RWRKUO5D.js → chunk-B66QCXH2.js} +1 -1
  42. package/dist/chunks/{chunk-SODAOLAP.js → chunk-BHKXPWFB.js} +1 -1
  43. package/dist/chunks/chunk-BU6MW65V.js +10 -0
  44. package/dist/chunks/{chunk-P6NQYXN6.js → chunk-CCZ276IA.js} +1 -1
  45. package/dist/chunks/{chunk-YONDU5TN.js → chunk-CIZI6Z7D.js} +1 -1
  46. package/dist/chunks/{chunk-ATFV2NA4.js → chunk-CO23RRN7.js} +1 -1
  47. package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
  48. package/dist/chunks/chunk-DDOIPTOM.js +2 -0
  49. package/dist/chunks/{chunk-CSU7RDA5.js → chunk-DKOVZ6R2.js} +3 -3
  50. package/dist/chunks/chunk-DRLP7GIU.js +2 -0
  51. package/dist/chunks/{chunk-DAEUVT2I.js → chunk-DRTHKWHK.js} +1 -1
  52. package/dist/chunks/{chunk-XDFXKRTI.js → chunk-DWF3FCY4.js} +1 -1
  53. package/dist/chunks/{chunk-W3ZILZUL.js → chunk-DWM5G7BU.js} +1 -1
  54. package/dist/chunks/chunk-DXJC3QW7.js +2 -0
  55. package/dist/chunks/{chunk-IDILAYCW.js → chunk-E2JB5OCO.js} +1 -1
  56. package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
  57. package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
  58. package/dist/chunks/{chunk-CX7HKSQ4.js → chunk-EGP6DF34.js} +2 -2
  59. package/dist/chunks/{chunk-D5OFN47Z.js → chunk-ESYPMD7Q.js} +1 -1
  60. package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
  61. package/dist/chunks/{chunk-R6VI7MX5.js → chunk-EYTTZ5H4.js} +1 -1
  62. package/dist/chunks/chunk-FKUWCJ73.js +161 -0
  63. package/dist/chunks/{chunk-WD6ANOLL.js → chunk-FNGZ4UDZ.js} +1 -1
  64. package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
  65. package/dist/chunks/{chunk-36FNNR5N.js → chunk-GEYZVOGD.js} +1 -1
  66. package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
  67. package/dist/chunks/{chunk-CWAQOFLP.js → chunk-GYYJ47GX.js} +1 -1
  68. package/dist/chunks/chunk-HG2YFMVU.js +4 -0
  69. package/dist/chunks/{chunk-YQBL5P6R.js → chunk-HKVFU3B3.js} +1 -1
  70. package/dist/chunks/{chunk-VEXJV5H5.js → chunk-IIT66347.js} +4 -4
  71. package/dist/chunks/{chunk-B2K5WQZE.js → chunk-IO5DZUKL.js} +1 -1
  72. package/dist/chunks/chunk-J256AEEE.js +2 -0
  73. package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
  74. package/dist/chunks/{chunk-7P5SH3CI.js → chunk-JPUSTFZC.js} +1 -1
  75. package/dist/chunks/{chunk-YMCF5GR2.js → chunk-JQOVC35K.js} +1 -1
  76. package/dist/chunks/{chunk-6LFTQBXP.js → chunk-JT5YQ52I.js} +1 -1
  77. package/dist/chunks/chunk-JVMSN7LH.js +2 -0
  78. package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
  79. package/dist/chunks/{chunk-WDKZMXIU.js → chunk-K7KBFM2T.js} +1 -1
  80. package/dist/chunks/{chunk-UBTP3QWI.js → chunk-KCLMA2IH.js} +1 -1
  81. package/dist/chunks/chunk-KDER7R45.js +2 -0
  82. package/dist/chunks/{chunk-IXZ5ZGIL.js → chunk-KOC3YJEU.js} +2 -2
  83. package/dist/chunks/{chunk-R6MMWEH4.js → chunk-KP2MYTP5.js} +1 -1
  84. package/dist/chunks/{chunk-TV2LE2BD.js → chunk-KU4TPDPH.js} +2 -2
  85. package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
  86. package/dist/chunks/chunk-LVXL7T5O.js +2 -0
  87. package/dist/chunks/{chunk-TSQ2I6XV.js → chunk-M4A7G4S5.js} +2 -2
  88. package/dist/chunks/{chunk-MX7KV5DA.js → chunk-M4ZHFDRJ.js} +1 -1
  89. package/dist/chunks/{chunk-26ID6A5C.js → chunk-MEJLWNRS.js} +1 -1
  90. package/dist/chunks/{chunk-XT5WUQGT.js → chunk-MIFVX5PK.js} +1 -1
  91. package/dist/chunks/{chunk-4VZJQRQI.js → chunk-MOXIGLN2.js} +1 -1
  92. package/dist/chunks/{chunk-UKSSFB4Q.js → chunk-N5EAVX4G.js} +1 -1
  93. package/dist/chunks/{chunk-4B7EGNYX.js → chunk-NMMHXYDJ.js} +1 -1
  94. package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
  95. package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
  96. package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
  97. package/dist/chunks/chunk-OIH2LPIT.js +2 -0
  98. package/dist/chunks/chunk-OUJ63LMU.js +2 -0
  99. package/dist/chunks/{chunk-SD2XDZQW.js → chunk-P4QM63L3.js} +1 -1
  100. package/dist/chunks/chunk-PACLKDTN.js +2 -0
  101. package/dist/chunks/{chunk-VPAEFG7X.js → chunk-PAYFJHPO.js} +1 -1
  102. package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
  103. package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
  104. package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
  105. package/dist/chunks/{chunk-UNE52L3Y.js → chunk-PNPV2LDE.js} +1 -1
  106. package/dist/chunks/{chunk-2RSGVLZT.js → chunk-PSY6IRJE.js} +8 -8
  107. package/dist/chunks/{chunk-SVNEPXU3.js → chunk-Q73RKX7I.js} +1 -1
  108. package/dist/chunks/{chunk-IF5A3XWP.js → chunk-Q7FBVLLB.js} +1 -1
  109. package/dist/chunks/{chunk-V5AOM5MZ.js → chunk-Q7P34B2O.js} +1 -1
  110. package/dist/chunks/{chunk-375PADDM.js → chunk-QLGP2OAQ.js} +1 -1
  111. package/dist/chunks/{chunk-QQLS5FB7.js → chunk-QUNQM2E3.js} +1 -1
  112. package/dist/chunks/chunk-R2FYCJL6.js +2 -0
  113. package/dist/chunks/{chunk-6HQUIKC5.js → chunk-R4EEGWXB.js} +1 -1
  114. package/dist/chunks/chunk-RBTDSI4L.js +11 -0
  115. package/dist/chunks/chunk-RCQYEHHD.js +2 -0
  116. package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
  117. package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
  118. package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
  119. package/dist/chunks/{chunk-K3LS5SK7.js → chunk-SDHG6CKU.js} +1 -1
  120. package/dist/chunks/{chunk-XKZ4PFMQ.js → chunk-SO4GMSNP.js} +1 -1
  121. package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
  122. package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
  123. package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
  124. package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
  125. package/dist/chunks/{chunk-N54CPLVD.js → chunk-UANH7U3Y.js} +1 -1
  126. package/dist/chunks/{chunk-BUZ7CBJC.js → chunk-UGFSAG4U.js} +1 -1
  127. package/dist/chunks/chunk-ULTV6INR.js +2 -0
  128. package/dist/chunks/{chunk-V3ILZQER.js → chunk-UMAVVMXL.js} +7 -7
  129. package/dist/chunks/chunk-V24VHT76.js +2 -0
  130. package/dist/chunks/chunk-VEBW7NKD.js +2 -0
  131. package/dist/chunks/chunk-VJR2GNRY.js +2 -0
  132. package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
  133. package/dist/chunks/{chunk-H2XG5N7D.js → chunk-VWWKWYSQ.js} +1 -1
  134. package/dist/chunks/chunk-WCNPGKST.js +2 -0
  135. package/dist/chunks/chunk-WD4KAKEX.js +2 -0
  136. package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
  137. package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
  138. package/dist/chunks/{chunk-RS526BG7.js → chunk-WZ35ICTE.js} +3 -3
  139. package/dist/chunks/chunk-XHACK2KR.js +2 -0
  140. package/dist/chunks/chunk-XOPHFUUY.js +2 -0
  141. package/dist/chunks/{chunk-YKTJPCYZ.js → chunk-XQAUHXL4.js} +4 -4
  142. package/dist/chunks/{chunk-ZVMQLIRA.js → chunk-XT4CSKHM.js} +1 -1
  143. package/dist/chunks/{chunk-KQD36SBJ.js → chunk-XY7HFXLH.js} +1 -1
  144. package/dist/chunks/{chunk-UXO33ST5.js → chunk-XYZV3FKD.js} +1 -1
  145. package/dist/chunks/{chunk-GC6RJBRZ.js → chunk-Y2WNZWT2.js} +1 -1
  146. package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
  147. package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
  148. package/dist/chunks/chunk-YI6ME6PU.js +22 -0
  149. package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
  150. package/dist/chunks/{chunk-QFL2VQKX.js → chunk-Z33RVGP6.js} +1 -1
  151. package/dist/chunks/{chunk-OY4B7Y3T.js → chunk-ZDEIVUUI.js} +1 -1
  152. package/dist/chunks/{chunk-XGJG2ZKE.js → chunk-ZIQJDTQB.js} +1 -1
  153. package/dist/chunks/{chunk-IR2Y2VQY.js → chunk-ZYLLPRPU.js} +1 -1
  154. package/dist/chunks/cli-R7TAP6Z2.js +2 -0
  155. package/dist/chunks/{command-NWOZXU57.js → command-LNOVZQSK.js} +3 -3
  156. package/dist/chunks/{configuration-command-ZEIBQKB3.js → configuration-command-CNITTZRP.js} +1 -1
  157. package/dist/chunks/connected-app-executor-FGWCLOJO.js +2 -0
  158. package/dist/chunks/connected-evidence-5VZBYNWN.js +2 -0
  159. package/dist/chunks/{connected-starting-assets-66Y46ZPM.js → connected-starting-assets-KWOFEIE4.js} +1 -1
  160. package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
  161. package/dist/chunks/{continual-TNPTWTKK.js → continual-FVOLGGOE.js} +1 -1
  162. package/dist/chunks/core-commands-BPYXVT7O.js +2 -0
  163. package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
  164. package/dist/chunks/datasets-E5TXSVIY.js +2 -0
  165. package/dist/chunks/desktop-test-FX7DTY4N.js +3 -0
  166. package/dist/chunks/dist-2MKJC6HN.js +2 -0
  167. package/dist/chunks/{dist-GR56E3QK.js → dist-DKE7RJZN.js} +1 -1
  168. package/dist/chunks/evaluation-coordination-KUTZEEPB.js +2 -0
  169. package/dist/chunks/experiment-improvements-PQNR5YHN.js +2 -0
  170. package/dist/chunks/experiments-Z4BJWT3Y.js +2 -0
  171. package/dist/chunks/experiments-signal-3GCLKUWZ.js +2 -0
  172. package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
  173. package/dist/chunks/{help-O53DTZGN.js → help-K6YLZ3KL.js} +1 -1
  174. package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +2 -0
  175. package/dist/chunks/host-profile-external-dataset-KSEPXY2S.js +2 -0
  176. package/dist/chunks/hosted-app-server-composition-LA3BZ4SE.js +2 -0
  177. package/dist/chunks/hosted-experiment-improvement-VG2WE7XZ.js +3 -0
  178. package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +2 -0
  179. package/dist/chunks/hosted-profile-candidate-PTGQLPZO.js +3 -0
  180. package/dist/chunks/hosted-profile-compiler-FS5R6CHJ.js +2 -0
  181. package/dist/chunks/hosted-profile-evaluation-control-UUEZEMXU.js +2 -0
  182. package/dist/chunks/hosted-profile-evaluation-inspection-4F7OEF4T.js +3 -0
  183. package/dist/chunks/hosted-profile-evaluation-preparation-LIJJZDHQ.js +3 -0
  184. package/dist/chunks/hosted-tasksets-NXVF4AQA.js +2 -0
  185. package/dist/chunks/human-review-2ZOB7CJZ.js +2 -0
  186. package/dist/chunks/{import-OBAKUJPM.js → import-YHYKZ6JN.js} +2 -2
  187. package/dist/chunks/{learning-CRR6NRPN.js → learning-LAXMGWSQ.js} +1 -1
  188. package/dist/chunks/learning-Y3UKNUGE.js +2 -0
  189. package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
  190. package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
  191. package/dist/chunks/{model-projects-HP4DELCP.js → model-projects-6YWVD2TS.js} +1 -1
  192. package/dist/chunks/opchat-XXI2ZM53.js +3 -0
  193. package/dist/chunks/opchat-bounded-chat-3MZGCRLY.js +2 -0
  194. package/dist/chunks/organizations-W7HI2JA4.js +2 -0
  195. package/dist/chunks/{profile-3WZJ65CT.js → profile-P2SJPBOJ.js} +1 -1
  196. package/dist/chunks/project-action-payload-LTIQBX77.js +2 -0
  197. package/dist/chunks/project-agent-XRIXMXQK.js +2 -0
  198. package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
  199. package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
  200. package/dist/chunks/{runtime-XP4DEGR3.js → runtime-Q7JUJO4D.js} +2 -2
  201. package/dist/chunks/sandbox-command-HVA5FJU4.js +2 -0
  202. package/dist/chunks/{sandbox-template-YFMHEMUQ.js → sandbox-template-U536EEWY.js} +1 -1
  203. package/dist/chunks/saved-work-KSIQPXC2.js +2 -0
  204. package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
  205. package/dist/chunks/setup-RMZ2BHLM.js +2 -0
  206. package/dist/chunks/{src-GQPWOPYA.js → src-C3ZUESMK.js} +1 -1
  207. package/dist/chunks/src-SGQYVBNQ.js +424 -0
  208. package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
  209. package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
  210. package/dist/chunks/{store-continual-support-reviews-VVRQO2JK.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
  211. package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
  212. package/dist/chunks/{store-create-improve-2XI36AET.js → store-create-improve-UTCLBXF2.js} +1 -1
  213. package/dist/chunks/{store-datasets-UFY422NG.js → store-datasets-4AQOVAQY.js} +1 -1
  214. package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
  215. package/dist/chunks/{store-harness-workspaces-SGUEYDO2.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
  216. package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
  217. package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
  218. package/dist/chunks/{store-learning-BFOT4QVT.js → store-learning-SIUQIY5C.js} +1 -1
  219. package/dist/chunks/{store-learning-credentials-DYTMWQTC.js → store-learning-credentials-BUHR7SN6.js} +1 -1
  220. package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
  221. package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
  222. package/dist/chunks/{store-model-configuration-NJFWSYSA.js → store-model-configuration-6L3OYXF4.js} +1 -1
  223. package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
  224. package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
  225. package/dist/chunks/{store-preference-comparison-MZAYONCK.js → store-preference-comparison-5YVIQNVB.js} +1 -1
  226. package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
  227. package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
  228. package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
  229. package/dist/chunks/{store-task-inbox-3BREANOX.js → store-task-inbox-L6IQTY26.js} +1 -1
  230. package/dist/chunks/{store-task-inventory-5HRZCDUT.js → store-task-inventory-QWS2C656.js} +1 -1
  231. package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
  232. package/dist/chunks/{store-training-S3FXWLT6.js → store-training-FYXZU2FE.js} +1 -1
  233. package/dist/chunks/{store-training-jobs-2LCXPA7G.js → store-training-jobs-3N3VKPIY.js} +1 -1
  234. package/dist/chunks/{store-training-models-7AMKS7ZW.js → store-training-models-VOFVGPZR.js} +1 -1
  235. package/dist/chunks/{taskset-PLKWRT4X.js → taskset-UDDLFYKV.js} +1 -1
  236. package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
  237. package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
  238. package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
  239. package/dist/chunks/{teams-bot-VQXUA7U4.js → teams-bot-MPWL2PP4.js} +1 -1
  240. package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
  241. package/dist/chunks/training-5NT2YB2L.js +2 -0
  242. package/dist/chunks/training-5UMT45UL.js +2 -0
  243. package/dist/chunks/training-UY6KRG4M.js +2 -0
  244. package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
  245. package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
  246. package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
  247. package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
  248. package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
  249. package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
  250. package/dist/chunks/{training-hosted-learning-WQ2IP5FP.js → training-hosted-learning-E2N32YU5.js} +1 -1
  251. package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
  252. package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
  253. package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
  254. package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
  255. package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
  256. package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
  257. package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
  258. package/dist/cli.js +1 -1
  259. package/dist/index.js +1 -1
  260. package/dist/sandbox/types/billing.d.ts +87 -6
  261. package/dist/sandbox/types/io.d.ts +3 -0
  262. package/dist/sandbox-template/manifest.js +1 -1
  263. package/dist/skills/manifest.json +3 -3
  264. package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
  265. package/dist/web/assets/App-CCuh99JW.js +54 -0
  266. package/dist/web/assets/{AppDialog-BvskhHE9.js → AppDialog-CxjDHVk9.js} +1 -1
  267. package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
  268. package/dist/web/assets/{AppToastContext-D2788RqX.js → AppToastContext-EpiT1dHs.js} +1 -1
  269. package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
  270. package/dist/web/assets/{AttachmentTypeIcon-DVluUHuc.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
  271. package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
  272. package/dist/web/assets/{CartesianChart-DdBZ69lI.js → CartesianChart-brqLBqnF.js} +1 -1
  273. package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
  274. package/dist/web/assets/{CollaborationTabs-ba6WupeJ.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
  275. package/dist/web/assets/{CommandMenu-D7wTaEgl.js → CommandMenu-DkWpXR55.js} +1 -1
  276. package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
  277. package/dist/web/assets/{ComposerAttachments-aO90qXYz.js → ComposerAttachments-BdJGCYzI.js} +1 -1
  278. package/dist/web/assets/{ComposerCreateImproveStrip-BPUJBSyS.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
  279. package/dist/web/assets/{ConversationImportsSettings-Bo836wKJ.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
  280. package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
  281. package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
  282. package/dist/web/assets/{FilePagePreview-C6wIp6uX.js → FilePagePreview-BRhhz99q.js} +2 -2
  283. package/dist/web/assets/{GetStartedView-CxMv8q-h.js → GetStartedView-CLVD-qEi.js} +1 -1
  284. package/dist/web/assets/{GettingStartedDialog-CEb0cS-o.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
  285. package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
  286. package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
  287. package/dist/web/assets/{HtmlVisual-CCuUkYT8.js → HtmlVisual-D5y2WG9L.js} +10 -10
  288. package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
  289. package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
  290. package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
  291. package/dist/web/assets/{LabSkillSidebar-CFROlATQ.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
  292. package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
  293. package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
  294. package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
  295. package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
  296. package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
  297. package/dist/web/assets/{MainPane-BOWkynGB.css → MainPane-BZlNLfTM.css} +1 -1
  298. package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
  299. package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
  300. package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
  301. package/dist/web/assets/{NativeSkillSidebar-MAJWS4mL.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
  302. package/dist/web/assets/{NewProjectDialog-MQiUBVx3.js → NewProjectDialog-DcnGzEd9.js} +1 -1
  303. package/dist/web/assets/{OutputsPage-DpF-aRTu.js → OutputsPage-Cmk15Vt_.js} +1 -1
  304. package/dist/web/assets/{PageChrome-8gH2hyDb.js → PageChrome-Cz_fCqtn.js} +1 -1
  305. package/dist/web/assets/{ProjectsPage-BQ98oGyu.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
  306. package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
  307. package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
  308. package/dist/web/assets/{ScheduledWorkPage-CGCqZz_H.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
  309. package/dist/web/assets/{SettingsView-CqpMFLxy.js → SettingsView-DvQXGw3_.js} +3 -3
  310. package/dist/web/assets/{TasksetDraftEditorPrimitives-DJvIvzBb.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
  311. package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
  312. package/dist/web/assets/{TerminalOverlay-D--M876l.js → TerminalOverlay-DlaM9d8F.js} +1 -1
  313. package/dist/web/assets/{TrainingCreationPanel-DDUoHQHU.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
  314. package/dist/web/assets/{TrainingDraftPanel-CwLXn3Z7.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
  315. package/dist/web/assets/{UsageSettingsSection-CGwPregx.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
  316. package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
  317. package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
  318. package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
  319. package/dist/web/assets/{WorkspaceFileLocation-D-ctFM4d.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
  320. package/dist/web/assets/{WorkspaceGitDialogs-CQ28j3R7.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
  321. package/dist/web/assets/{WorkspaceMonacoEditor-BrZs6-EW.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
  322. package/dist/web/assets/{WorkspacePdfPreview-CU6PSjjN.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
  323. package/dist/web/assets/{WorkspacePresentationPreview-IjXVXpIy.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
  324. package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
  325. package/dist/web/assets/{app-models-CKXrDTEU.js → app-models-BUdzQbXo.js} +1 -1
  326. package/dist/web/assets/bot-Doyx3T4j.js +1 -0
  327. package/dist/web/assets/{browser-sidebar-links-D9v2cyJa.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
  328. package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
  329. package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
  330. package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
  331. package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
  332. package/dist/web/assets/{chunk-TLSP5JKG-BrrVo5rJ.js → chunk-3BYFS4RO-ztZjcMmt.js} +1 -1
  333. package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
  334. package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
  335. package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
  336. package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
  337. package/dist/web/assets/{chunk-H3JZ3P5T-CzpTARDY.js → chunk-H3JZ3P5T-DolwEJXo.js} +2 -2
  338. package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
  339. package/dist/web/assets/client-DwZ92xtu.js +1 -0
  340. package/dist/web/assets/{client-choice-storage-DUWsS4X0.js → client-choice-storage-DitqKiIT.js} +1 -1
  341. package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
  342. package/dist/web/assets/common-BWVSBnpX.js +1 -0
  343. package/dist/web/assets/copy-DTQhoBNg.js +1 -0
  344. package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
  345. package/dist/web/assets/{cssMode-SclUkqPt.js → cssMode-BRTtfXxU.js} +1 -1
  346. package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
  347. package/dist/web/assets/external-link-H1629UU6.js +1 -0
  348. package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
  349. package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
  350. package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
  351. package/dist/web/assets/{htmlMode-X3mQtOeh.js → htmlMode-BVaCcL76.js} +1 -1
  352. package/dist/web/assets/icons-Bk2b68aC.js +1 -0
  353. package/dist/web/assets/image-0DPVY6Ev.js +1 -0
  354. package/dist/web/assets/{index-LXNhSUEL.js → index-B6XX_0h3.js} +2 -2
  355. package/dist/web/assets/info-C8b_tafZ.js +1 -0
  356. package/dist/web/assets/{intake-contracts-wCkD2ErR.js → intake-contracts-B8JZKYwb.js} +1 -1
  357. package/dist/web/assets/{jsonMode-BoKiIdHd.js → jsonMode-BCKKQmmV.js} +1 -1
  358. package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
  359. package/dist/web/assets/{lspLanguageFeatures-CO2mzpy1.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
  360. package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
  361. package/dist/web/assets/message-square-C889vRqm.js +1 -0
  362. package/dist/web/assets/{monaco.contribution-wacA5FjV.js → monaco.contribution-B9q6qbbo.js} +2 -2
  363. package/dist/web/assets/{monaco.contribution-CVe3mWSY.js → monaco.contribution-BITdsRbn.js} +2 -2
  364. package/dist/web/assets/{monaco.contribution-hrusiaZi.js → monaco.contribution-BqA-XZ44.js} +2 -2
  365. package/dist/web/assets/{monaco.contribution-C7CAQIKF.js → monaco.contribution-DxAV1oS5.js} +2 -2
  366. package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
  367. package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
  368. package/dist/web/assets/{pdf-Ct3M2mVw.js → pdf-perlzwEB.js} +1 -1
  369. package/dist/web/assets/play-CHXXdkuO.js +1 -0
  370. package/dist/web/assets/plus-DFFWjhPw.js +1 -0
  371. package/dist/web/assets/{ponder-desktop-D-zB6X4L.js → ponder-desktop-Ca-9KggQ.js} +1 -1
  372. package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
  373. package/dist/web/assets/{profile-ref-CCxrOCio.js → profile-ref-D8lxL7dW.js} +1 -1
  374. package/dist/web/assets/{python-C0-pUUAU.js → python-B9hOnkOI.js} +1 -1
  375. package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
  376. package/dist/web/assets/{requests-DjSt-duM.js → requests-DmeUYik4.js} +1 -1
  377. package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
  378. package/dist/web/assets/save-iEMNZoPe.js +1 -0
  379. package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
  380. package/dist/web/assets/settings-BC-bzgk6.js +21 -0
  381. package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
  382. package/dist/web/assets/square-BE_4JMR3.js +1 -0
  383. package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
  384. package/dist/web/assets/{submit-issue-command-Gk3RKrY-.js → submit-issue-command-HfKzyxg5.js} +1 -1
  385. package/dist/web/assets/{toggleHighContrast-BnYUBgZB.js → toggleHighContrast-ClsXu39R.js} +1 -1
  386. package/dist/web/assets/training-DWfghwfZ.js +1 -0
  387. package/dist/web/assets/{training-model-data-CxR3xpmK.js → training-model-data-CIysl8wH.js} +4 -4
  388. package/dist/web/assets/{tsMode-BVNyOY8h.js → tsMode-nbmaMc-D.js} +1 -1
  389. package/dist/web/assets/upload-C6ug8RD-.js +1 -0
  390. package/dist/web/assets/{useAccountSettings-4_XfwJQi.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
  391. package/dist/web/assets/{useAgentInventory-CVuamyT3.js → useAgentInventory-ByCk2JAv.js} +1 -1
  392. package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
  393. package/dist/web/assets/{useLocalAgentSchedules-CmwN4ohy.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
  394. package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
  395. package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
  396. package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
  397. package/dist/web/assets/{workers-CjtQ2aBD.js → workers-DKvM2NdM.js} +1 -1
  398. package/dist/web/assets/x-Jx2jlP9u.js +1 -0
  399. package/dist/web/assets/{yaml-N1KUjBZ8.js → yaml-C02vq4ar.js} +1 -1
  400. package/dist/web/index.html +1 -1
  401. package/docs/command-reference.md +93 -3
  402. package/package.json +1 -1
  403. package/dist/chunks/actions-command-BYPLSGZL.js +0 -2
  404. package/dist/chunks/app-server-evaluations-5YZUFXQ2.js +0 -2
  405. package/dist/chunks/app-server-harness-services-N5F5QVZI.js +0 -2
  406. package/dist/chunks/app-server-runtime-HJ2N57DL.js +0 -2
  407. package/dist/chunks/apps-WJTW64NW.js +0 -2
  408. package/dist/chunks/chunk-263WS3TB.js +0 -2
  409. package/dist/chunks/chunk-2UZHLO2V.js +0 -23
  410. package/dist/chunks/chunk-2W22IXHB.js +0 -2
  411. package/dist/chunks/chunk-46RMTR2Z.js +0 -2
  412. package/dist/chunks/chunk-4JJ4RYIB.js +0 -6
  413. package/dist/chunks/chunk-4NN5OLKW.js +0 -161
  414. package/dist/chunks/chunk-543QHE3D.js +0 -2
  415. package/dist/chunks/chunk-5QOFUGYQ.js +0 -2
  416. package/dist/chunks/chunk-5ZNE43XC.js +0 -10
  417. package/dist/chunks/chunk-6IS5OLI5.js +0 -2
  418. package/dist/chunks/chunk-7HAGSE7L.js +0 -2
  419. package/dist/chunks/chunk-AXYAEWWA.js +0 -2
  420. package/dist/chunks/chunk-B7XJBP4U.js +0 -2
  421. package/dist/chunks/chunk-BBIA24GD.js +0 -10
  422. package/dist/chunks/chunk-CJDGLPNX.js +0 -4
  423. package/dist/chunks/chunk-FCXDPVGJ.js +0 -3
  424. package/dist/chunks/chunk-FE2ENE3U.js +0 -2
  425. package/dist/chunks/chunk-H6EUFJJK.js +0 -2
  426. package/dist/chunks/chunk-IOSBGCRT.js +0 -2
  427. package/dist/chunks/chunk-K6DB5QWG.js +0 -2
  428. package/dist/chunks/chunk-LI56PPCN.js +0 -2
  429. package/dist/chunks/chunk-OE2OOWEQ.js +0 -2
  430. package/dist/chunks/chunk-OYIFH2OM.js +0 -2
  431. package/dist/chunks/chunk-QOUOU7FE.js +0 -22
  432. package/dist/chunks/chunk-R5GRESW3.js +0 -2
  433. package/dist/chunks/chunk-TERKCK4I.js +0 -2
  434. package/dist/chunks/chunk-TS5HNRZB.js +0 -2
  435. package/dist/chunks/chunk-V3KEG6MI.js +0 -2
  436. package/dist/chunks/chunk-WGISITX6.js +0 -4
  437. package/dist/chunks/chunk-XD4ZIQZ2.js +0 -2
  438. package/dist/chunks/chunk-XHU4BZQY.js +0 -13
  439. package/dist/chunks/chunk-ZWEY66RT.js +0 -2
  440. package/dist/chunks/cli-HV32F7HD.js +0 -2
  441. package/dist/chunks/connected-app-executor-DFHWNMRM.js +0 -2
  442. package/dist/chunks/connected-evidence-WOM6N5HO.js +0 -2
  443. package/dist/chunks/core-commands-GWRHH53F.js +0 -2
  444. package/dist/chunks/dataset-preparation-authoring-WJ2XEUO7.js +0 -4
  445. package/dist/chunks/datasets-XIMF54QN.js +0 -2
  446. package/dist/chunks/desktop-test-HF42V2EP.js +0 -3
  447. package/dist/chunks/dist-T6ES2TSM.js +0 -2
  448. package/dist/chunks/evaluation-coordination-WZT6FDMS.js +0 -2
  449. package/dist/chunks/experiment-improvements-H35VS6XZ.js +0 -2
  450. package/dist/chunks/experiments-F54C32EE.js +0 -2
  451. package/dist/chunks/experiments-signal-ONIGTGYR.js +0 -2
  452. package/dist/chunks/host-profile-evaluation-tools-LMCJ3MDJ.js +0 -2
  453. package/dist/chunks/host-profile-external-dataset-4HOXANWK.js +0 -2
  454. package/dist/chunks/hosted-app-server-composition-Y64A2A2B.js +0 -2
  455. package/dist/chunks/hosted-experiment-improvement-B2V2WIUI.js +0 -3
  456. package/dist/chunks/hosted-harness-runtime-C7I4KSDK.js +0 -2
  457. package/dist/chunks/hosted-profile-candidate-CXPVEEYQ.js +0 -3
  458. package/dist/chunks/hosted-profile-compiler-FGCI2VRW.js +0 -2
  459. package/dist/chunks/hosted-profile-evaluation-control-INNUYMBD.js +0 -2
  460. package/dist/chunks/hosted-profile-evaluation-inspection-UPTBRYMS.js +0 -3
  461. package/dist/chunks/hosted-profile-evaluation-preparation-TIQSVKLQ.js +0 -3
  462. package/dist/chunks/hosted-tasksets-7VMYOTIO.js +0 -2
  463. package/dist/chunks/human-review-7XC77NQP.js +0 -2
  464. package/dist/chunks/learning-3XDGIYUL.js +0 -2
  465. package/dist/chunks/local-harness-improvement-runtime-UIKQSAMM.js +0 -2
  466. package/dist/chunks/local-harness-taskset-review-6KJN3EQL.js +0 -2
  467. package/dist/chunks/opchat-NWYWWIA7.js +0 -3
  468. package/dist/chunks/opchat-bounded-chat-ICURZM6R.js +0 -2
  469. package/dist/chunks/organizations-7DBQGCCV.js +0 -2
  470. package/dist/chunks/project-action-payload-7DRABTHY.js +0 -2
  471. package/dist/chunks/project-agent-AXJOWXRU.js +0 -2
  472. package/dist/chunks/published-experiment-source-YBBPLNF2.js +0 -2
  473. package/dist/chunks/refiner-profile-service-ATEFPF5O.js +0 -2
  474. package/dist/chunks/sandbox-command-CF2PJCFX.js +0 -2
  475. package/dist/chunks/saved-work-3OAVRBH3.js +0 -2
  476. package/dist/chunks/setup-RHIMFI2Y.js +0 -2
  477. package/dist/chunks/src-V236S6MV.js +0 -424
  478. package/dist/chunks/standalone-experiment-turn-owner-CDRMGLWW.js +0 -2
  479. package/dist/chunks/store-chat-resources-P4EKCLSY.js +0 -2
  480. package/dist/chunks/store-conversation-serving-YFEZYQD3.js +0 -2
  481. package/dist/chunks/store-evaluation-results-VBH4R2U7.js +0 -7
  482. package/dist/chunks/store-human-review-RFCVZ3HP.js +0 -7
  483. package/dist/chunks/store-learned-preference-migration-validation-FNBGGZU6.js +0 -2
  484. package/dist/chunks/store-local-experiments-XPXGYXNM.js +0 -97
  485. package/dist/chunks/store-model-batch-review-J2L5JQV2.js +0 -2
  486. package/dist/chunks/store-model-project-preparation-OCLIFKI2.js +0 -2
  487. package/dist/chunks/store-taskset-drafts-BNKUVHPA.js +0 -9
  488. package/dist/chunks/taskset-packages-SXBLYHSP.js +0 -2
  489. package/dist/chunks/taskset-packages-V5T4V7YN.js +0 -2
  490. package/dist/chunks/tool-learning-47XQKELE.js +0 -2
  491. package/dist/chunks/training-7VQNCOGH.js +0 -2
  492. package/dist/chunks/training-VKLPNCMC.js +0 -2
  493. package/dist/chunks/training-hosted-NNE6BP6S.js +0 -2
  494. package/dist/chunks/training-hosted-serving-report-VZ4SMLMG.js +0 -2
  495. package/dist/chunks/training-model-start-G7YDZ7ZG.js +0 -2
  496. package/dist/chunks/web-search-56QRZGPR.js +0 -2
  497. package/dist/web/assets/App-DmEA-Lia.js +0 -53
  498. package/dist/web/assets/AppTerminalPanel-ScQKJV4z.js +0 -2
  499. package/dist/web/assets/AppsView-B1uNg9IQ.js +0 -1
  500. package/dist/web/assets/BrowserSidebar-DfVQoJHn.js +0 -1
  501. package/dist/web/assets/ChatTimelineEntry-Bbc6HRks.js +0 -8
  502. package/dist/web/assets/CommunityView-mO58f2B0.js +0 -1
  503. package/dist/web/assets/HostedModelLearningReview-BQIS7hkd.js +0 -1
  504. package/dist/web/assets/HostedModelLearningSettings-BQ-YeFMT.js +0 -1
  505. package/dist/web/assets/LabModelVersionDetailPage-BkHeVbAx.js +0 -1
  506. package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
  507. package/dist/web/assets/LabsRoute-YA9YckKj.js +0 -101
  508. package/dist/web/assets/MainChatThread-DpyPgGKW.js +0 -2
  509. package/dist/web/assets/MainPane-WOeodByM.js +0 -10
  510. package/dist/web/assets/NativeSetupTerminal-fmG2c65K.js +0 -2
  511. package/dist/web/assets/RightChatPanelStack-Bs7A4dLs.js +0 -1
  512. package/dist/web/assets/RightSidebarHomePanel-C-D4kba2.js +0 -1
  513. package/dist/web/assets/TeamChatView-DjmIaLO1.js +0 -1
  514. package/dist/web/assets/TrainingRunLineage-CtYe1KGX.js +0 -1
  515. package/dist/web/assets/WorkSidebarPanel-C6wWuo7U.js +0 -1
  516. package/dist/web/assets/WorkspaceDiffPanel-JDOUmrC-.js +0 -11
  517. package/dist/web/assets/WorkspaceEnvironmentMenu-sfL5LZeB.js +0 -35
  518. package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
  519. package/dist/web/assets/bot-Cd761lRF.js +0 -1
  520. package/dist/web/assets/chat-resources-BUDXdoG0.js +0 -1
  521. package/dist/web/assets/chevron-down-DEbd6Ek-.js +0 -1
  522. package/dist/web/assets/chevron-right-DLYNg_Oq.js +0 -1
  523. package/dist/web/assets/chevron-up-DFJJccDl.js +0 -1
  524. package/dist/web/assets/chunk-GHPCQXG5-DKDBSd8H.js +0 -9
  525. package/dist/web/assets/chunk-GJRXJL6G-luaxRTYI.js +0 -1
  526. package/dist/web/assets/chunk-JDQVAG3R-C0-rh1aR.js +0 -1
  527. package/dist/web/assets/chunk-XMVSQIK4-BBU7r_NH.js +0 -1
  528. package/dist/web/assets/client-BNjO4Xi8.js +0 -1
  529. package/dist/web/assets/cloud-upload-CoM1FGeB.js +0 -1
  530. package/dist/web/assets/common-CFsO2ppZ.js +0 -1
  531. package/dist/web/assets/copy-BGOhV6Pk.js +0 -1
  532. package/dist/web/assets/create-pipeline-DRR0Qeec.js +0 -1
  533. package/dist/web/assets/createLucideIcon-Bv-_eGcE.js +0 -1
  534. package/dist/web/assets/external-link-CVXsNeO3.js +0 -1
  535. package/dist/web/assets/folder-open-MnOmh19D.js +0 -1
  536. package/dist/web/assets/folder-plus-BRddLBtO.js +0 -1
  537. package/dist/web/assets/git-commit-horizontal-Bm4rkXug.js +0 -1
  538. package/dist/web/assets/icons-CZxmQtZs.js +0 -1
  539. package/dist/web/assets/image-BViGUAiq.js +0 -1
  540. package/dist/web/assets/info-DYPIbKKD.js +0 -1
  541. package/dist/web/assets/loader-circle-JFgFNsP5.js +0 -1
  542. package/dist/web/assets/maximize-2-DXZCQO0b.js +0 -1
  543. package/dist/web/assets/message-square-cOCAL8J1.js +0 -1
  544. package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
  545. package/dist/web/assets/monitor-B35XSAvn.js +0 -1
  546. package/dist/web/assets/paperclip-CKgDxioG.js +0 -1
  547. package/dist/web/assets/play-DzqLr7fM.js +0 -1
  548. package/dist/web/assets/plus-Ddp1vXnw.js +0 -1
  549. package/dist/web/assets/presentation-B0S9v7ib.js +0 -1
  550. package/dist/web/assets/refresh-cw-D45mW-vs.js +0 -1
  551. package/dist/web/assets/reward-checks-D139zwha.js +0 -7
  552. package/dist/web/assets/save-Gu4R_82E.js +0 -1
  553. package/dist/web/assets/schemas-C9IwV7NS.js +0 -64
  554. package/dist/web/assets/settings-DdonLCIN.js +0 -21
  555. package/dist/web/assets/settings-lists-CFHFtO0D.js +0 -5
  556. package/dist/web/assets/square-Dqduqyyu.js +0 -1
  557. package/dist/web/assets/square-terminal-DS3zwi6X.js +0 -1
  558. package/dist/web/assets/training-QBuGBGJd.js +0 -2
  559. package/dist/web/assets/upload-ABSJxuUM.js +0 -1
  560. package/dist/web/assets/useQuery-CCjwL8VI.js +0 -1
  561. package/dist/web/assets/wifi-off-DGJH7Pke.js +0 -1
  562. package/dist/web/assets/work-outputs-CnbRtTLg.js +0 -1
  563. package/dist/web/assets/x-B-_zJVOZ.js +0 -1
  564. /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{f as t,g as n,h as r,m as i}from"./index-LXNhSUEL.js";import{n as a}from"./api-client-Dgz-fOMl.js";import"./icons-CZxmQtZs.js";import{t as o}from"./createLucideIcon-Bv-_eGcE.js";import{t as s}from"./copy-BGOhV6Pk.js";import{t as c}from"./x-B-_zJVOZ.js";import{An as l,Bt as u,O as d,b as f,bn as p,dn as m,k as h,on as g,x as _}from"./App-DmEA-Lia.js";var v=o(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),y=o(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),b=o(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),x=o(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),S=o(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),C=o(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),ee=o(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),te=o(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ne=o(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),re=o(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),w=e(n(),1);async function ie(e){if(!e)return!1;try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard write failed`,e)}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.left=`-1000px`,t.style.top=`-1000px`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return t.remove(),n}catch(e){return console.warn(`Clipboard fallback failed`,e),!1}}var ae=e=>/\.html?(?:[?#].*)?$/i.test(e);async function oe(e,t,n,r=`local`){return(await a(e,`/v1/${r===`sandbox`?`sandboxes`:`workspaces`}/${encodeURIComponent(t)}/html-preview`,{method:`POST`,body:JSON.stringify({path:n})})).url}async function se(e,t,n){return(await a(e,`/v1/html-previews`,{method:`POST`,body:JSON.stringify({name:t,content:n})})).url}var ce=new Set(`bash.c.cc.cjs.cpp.css.csv.docx.env.gif.go.graphql.h.hpp.html.htm.ico.java.jpeg.jpg.js.json.jsx.lock.lockb.md.mdx.m4v.mjs.mov.mp4.pdf.pptx.png.py.rs.scss.sh.sql.svg.toml.ts.tsx.txt.xlsx.webp.webm.yaml.yml.zsh`.split(`.`)),le=new Set([`AGENTS.md`,`Dockerfile`,`LICENSE`,`Makefile`,`README`]),ue=String.raw`[A-Za-z0-9_.@+-]+`,de=new RegExp(String.raw`^(?:(?:\.{1,2}|~)?[\\/]|[A-Za-z]:[\\/])?(?:${ue}[\\/])+${ue}(?::\d+(?::\d+)?)?`),fe=new RegExp(String.raw`^${ue}(?::\d+(?::\d+)?)?`),pe=/^(?:workspace|sandbox):file:[^\s<>()]+/;function me({projectTargetDetail:e,projectTargetValue:t,workspaceRepoPath:n,workspaceTargetValue:r}){return n?.trim()||(r!==`local`||!t.startsWith(`local:`)?null:e.trim()||null)}function he(e,t,n={}){if(!xe(e[t-1]))return null;let r=e.slice(t),i=pe.exec(r),a=i?null:de.exec(r),o=i||a?null:fe.exec(r),s=Se((i??a??o)?.[0]??``);if(!s)return null;let c=ge(s,n);return c?{...c,end:t+s.length}:null}function ge(e,t={}){let n=Se(e.trim().replace(/^['"`]+|['"`]+$/g,``));if(!n||/^https?:\/\//i.test(n))return null;let r=ve(_e(n),t.href).replace(/:\d+(?::\d+)?$/,``);return be(r.replace(/(\.html?)[?#].*$/i,`$1`),t.href)?{displayPath:n,path:ye(t.fileBasePath&&!/^(?:workspace|sandbox):file:/i.test(n)&&!/^(?:[~/\\]|[A-Za-z]:|(?:workspace|sandbox):file:)/.test(r)?`${t.fileBasePath.replace(/[\\/]+$/,``)}/${r.replace(/^\.\//,``)}`:r)}:null}function _e(e){let t=/^(workspace|sandbox):file:(.*)$/i.exec(e);if(!t)return e;let n=t[1]?.toLowerCase(),r=t[2]??``;return n===`sandbox`&&(r=r.replace(/^\/workspace\/app\//,``).replace(/^\/workspace\//,``)),r}function ve(e,t=!1){if(!/^file:\/\//i.test(e)){if(t)try{return decodeURIComponent(e)}catch{}return e}try{let t=new URL(e);return decodeURIComponent(t.pathname)+(/\.html?$/i.test(t.pathname)?t.search+t.hash:``)}catch{return e.replace(/^file:\/\//i,``)}}function ye(e){return e.replace(/\\/g,`/`).replace(/^\.\/+/,``)}function be(e,t=!1){if(/[\n\r]/.test(e)||!t&&/^[^/\\]*\s/.test(e)||/[=;?<>|]/.test(e))return!1;if(/[\\/]$/.test(e)&&/[^.~/\\]/.test(e))return!0;let n=e.replace(/\\/g,`/`).split(`/`).filter(Boolean).at(-1)??e;if(le.has(n)||/^\.[A-Za-z_]/.test(n))return!0;let r=n.includes(`.`)?n.split(`.`).at(-1)?.toLowerCase():null;return!!(r&&ce.has(r))}function xe(e){return!e||/[\s([{<"'`]/.test(e)}function Se(e){return e.replace(/[.,;!?]+$/,``).replace(/[\])}]+$/,``)}function Ce(e){return/^(?:#{1,6}\s*)?(?:\*\*)?(?:(?:the|both|all)\s+)?(?:updated\s+)?(?:files|outputs|deliverables|everything|slide\s+and\s+deck)(?:\*\*)?\s*(?:(?:is|are)\s+)?(?:\(\s*)?(?:in|at|under|:)\s*`((?:~[\/]|[\/]|[A-Za-z]:[\/])[^`\n]+[\/])`/i.exec(e.trim())?.[1]??null}function we(e,t,n){let[r,i]=(0,w.useState)({key:t,url:null,status:`loading`}),a=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!e||!t)return;_.activateConnection(e);let r=_.watch(t,n,e=>i({...e,key:t}));a.current=r;let o=()=>{document.visibilityState!==`hidden`&&r.refresh()};return window.addEventListener(`focus`,o),window.addEventListener(`openpond-runtime-connected`,o),document.addEventListener(`visibilitychange`,o),()=>{r.close(),a.current=null,window.removeEventListener(`focus`,o),window.removeEventListener(`openpond-runtime-connected`,o),document.removeEventListener(`visibilitychange`,o)}},[e,t,n]);let o=(0,w.useCallback)(()=>a.current?.refresh(!0),[]);return{...r.key===t&&e&&t?r:{url:null,status:`loading`},retry:o}}function Te(e,t){return Ee(e,t).url}function Ee(e,t){let n=(0,w.useCallback)(()=>p.signLocalImageUrl(e,{path:t}),[e,t]);return we(e,e&&t?f(e,`local-image`,t):null,n)}function De(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)(t=>!e||!t?null:(_.activateConnection(e),_.get(f(e,`local-image`,t))),[e]),r=(0,w.useCallback)(async n=>{if(!e||!n)return null;_.activateConnection(e);let r=f(e,`local-image`,n);return _.load(r,()=>p.signLocalImageUrl(e,{path:n})).finally(()=>t(e=>e+1))},[e]);return(0,w.useMemo)(()=>({getUrl:n,loadUrl:r}),[n,r])}function Oe(e,t,n){return/^(?:[~/\\]|[A-Za-z]:|file:\/\/)/.test(n)?p.signLocalImageUrl(e,{path:n}):p.signWorkspaceImageUrl(e,{appId:t,path:n})}function ke(e,t,n){return Ae(e,t,n).url}function Ae(e,t,n){let r=(0,w.useCallback)(()=>Oe(e,t,n),[e,t,n]);return we(e,e&&t&&n?f(e,`workspace-image`,t,n):null,r)}function je(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)((t,n)=>!e||!t||!n?null:(_.activateConnection(e),_.get(f(e,`workspace-image`,t,n))),[e]),r=(0,w.useCallback)(async(n,r)=>{if(!e||!n||!r)return null;_.activateConnection(e);let i=f(e,`workspace-image`,n,r);return _.load(i,()=>Oe(e,n,r)).finally(()=>t(e=>e+1))},[e]),i=(0,w.useCallback)((e,t)=>{r(e,t)},[r]);return(0,w.useMemo)(()=>({ensureUrl:i,getUrl:n,loadUrl:r}),[i,n,r])}var Me=r();async function Ne(e,t){let n=window.openpond?.files?.saveImage;if(n){let r=await n({url:new URL(e,window.location.href).href,suggestedName:t});if(!r.ok&&!r.canceled)throw Error(r.error||`Could not save image.`);return}let r=window.showSaveFilePicker,i;try{i=r?await r.call(window,{suggestedName:t}):void 0}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;throw e}let a=await fetch(e);if(!a.ok)throw Error(`Image download failed (${a.status}).`);let o=await a.blob();if(i){let e=await i.createWritable();try{await e.write(o),await e.close()}catch(t){throw await e.abort().catch(()=>void 0),t}return}let s=URL.createObjectURL(o),c=document.createElement(`a`);c.href=s,c.download=t,document.body.appendChild(c),c.click(),c.remove(),setTimeout(()=>URL.revokeObjectURL(s),6e4)}var T=i();function Pe({open:e,src:t,title:n,onClose:r}){let[i,a]=(0,w.useState)(!1),[o,s]=(0,w.useState)(!1),[l,d]=(0,w.useState)(null);if((0,w.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[r,e]),(0,w.useEffect)(()=>{a(!1),d(null)},[t]),!e||!t)return null;let f=(()=>{let e=n.split(`/`).pop()?.trim();if(e&&/\.[A-Za-z0-9]+$/.test(e))return e;try{let e=new URL(t,window.location.href),n=(e.searchParams.get(`path`)??e.searchParams.get(`storageName`)??e.pathname).split(/[\\/]/).pop()?.trim();if(n&&/\.[A-Za-z0-9]+$/.test(n))return n}catch{}return`image.png`})();return(0,Me.createPortal)((0,T.jsx)(`div`,{className:`image-lightbox-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&r()},children:(0,T.jsxs)(`section`,{"aria-label":n?`Image preview: ${n}`:`Image preview`,"aria-modal":`true`,className:`image-lightbox-dialog`,role:`dialog`,children:[(0,T.jsxs)(`header`,{className:`image-lightbox-header`,children:[(0,T.jsx)(`span`,{title:n,children:n}),(0,T.jsxs)(`div`,{className:`image-lightbox-actions`,children:[(0,T.jsx)(`button`,{type:`button`,"aria-label":`Download image`,title:`Download`,disabled:o,"aria-busy":o,onClick:async()=>{if(!o){s(!0),d(null);try{await Ne(t,f)}catch(e){d(e instanceof Error?e.message:`Could not save image.`)}finally{s(!1)}}},children:(0,T.jsx)(g,{size:16})}),(0,T.jsx)(`button`,{type:`button`,"aria-label":`Close image preview`,title:`Close`,onClick:r,children:(0,T.jsx)(c,{size:16})})]})]}),l&&(0,T.jsx)(u,{error:l}),(0,T.jsx)(`div`,{className:`image-lightbox-frame`,children:i?(0,T.jsx)(u,{error:`Image preview unavailable`}):(0,T.jsx)(`img`,{alt:n||`Image preview`,decoding:`async`,draggable:!1,src:t,onError:()=>a(!0)})})]})}),document.body)}function Fe(e){let t=e.replace(/\r\n/g,`
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{f as t,g as n,h as r,m as i}from"./index-B6XX_0h3.js";import{n as a}from"./api-client-DJRVOFzS.js";import{t as o}from"./icons-Bk2b68aC.js";import{t as s}from"./copy-DTQhoBNg.js";import{t as c}from"./x-Jx2jlP9u.js";import{Gt as l,O as u,Tn as d,b as f,dn as p,dr as m,gn as h,k as g,x as _}from"./App-CCuh99JW.js";var v=o(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),y=o(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),b=o(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),x=o(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),S=o(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),C=o(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),ee=o(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),te=o(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ne=o(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),re=o(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),w=e(n(),1);async function ie(e){if(!e)return!1;try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard write failed`,e)}try{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.left=`-1000px`,t.style.top=`-1000px`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return t.remove(),n}catch(e){return console.warn(`Clipboard fallback failed`,e),!1}}var ae=e=>/\.html?(?:[?#].*)?$/i.test(e);async function oe(e,t,n,r=`local`){return(await a(e,`/v1/${r===`sandbox`?`sandboxes`:`workspaces`}/${encodeURIComponent(t)}/html-preview`,{method:`POST`,body:JSON.stringify({path:n})})).url}async function se(e,t,n){return(await a(e,`/v1/html-previews`,{method:`POST`,body:JSON.stringify({name:t,content:n})})).url}var ce=new Set(`bash.c.cc.cjs.cpp.css.csv.docx.env.gif.go.graphql.h.hpp.html.htm.ico.java.jpeg.jpg.js.json.jsx.lock.lockb.md.mdx.m4v.mjs.mov.mp4.pdf.pptx.png.py.rs.scss.sh.sql.svg.toml.ts.tsx.txt.xlsx.webp.webm.yaml.yml.zsh`.split(`.`)),le=new Set([`AGENTS.md`,`Dockerfile`,`LICENSE`,`Makefile`,`README`]),ue=String.raw`[A-Za-z0-9_.@+-]+`,de=new RegExp(String.raw`^(?:(?:\.{1,2}|~)?[\\/]|[A-Za-z]:[\\/])?(?:${ue}[\\/])+${ue}(?::\d+(?::\d+)?)?`),fe=new RegExp(String.raw`^${ue}(?::\d+(?::\d+)?)?`),pe=/^(?:workspace|sandbox):file:[^\s<>()]+/;function me({projectTargetDetail:e,projectTargetValue:t,workspaceRepoPath:n,workspaceTargetValue:r}){return n?.trim()||(r!==`local`||!t.startsWith(`local:`)?null:e.trim()||null)}function he(e,t,n={}){if(!xe(e[t-1]))return null;let r=e.slice(t),i=pe.exec(r),a=i?null:de.exec(r),o=i||a?null:fe.exec(r),s=Se((i??a??o)?.[0]??``);if(!s)return null;let c=ge(s,n);return c?{...c,end:t+s.length}:null}function ge(e,t={}){let n=Se(e.trim().replace(/^['"`]+|['"`]+$/g,``));if(!n||/^https?:\/\//i.test(n))return null;let r=ve(_e(n),t.href).replace(/:\d+(?::\d+)?$/,``);return be(r.replace(/(\.html?)[?#].*$/i,`$1`),t.href)?{displayPath:n,path:ye(t.fileBasePath&&!/^(?:workspace|sandbox):file:/i.test(n)&&!/^(?:[~/\\]|[A-Za-z]:|(?:workspace|sandbox):file:)/.test(r)?`${t.fileBasePath.replace(/[\\/]+$/,``)}/${r.replace(/^\.\//,``)}`:r)}:null}function _e(e){let t=/^(workspace|sandbox):file:(.*)$/i.exec(e);if(!t)return e;let n=t[1]?.toLowerCase(),r=t[2]??``;return n===`sandbox`&&(r=r.replace(/^\/workspace\/app\//,``).replace(/^\/workspace\//,``)),r}function ve(e,t=!1){if(!/^file:\/\//i.test(e)){if(t)try{return decodeURIComponent(e)}catch{}return e}try{let t=new URL(e);return decodeURIComponent(t.pathname)+(/\.html?$/i.test(t.pathname)?t.search+t.hash:``)}catch{return e.replace(/^file:\/\//i,``)}}function ye(e){return e.replace(/\\/g,`/`).replace(/^\.\/+/,``)}function be(e,t=!1){if(/[\n\r]/.test(e)||!t&&/^[^/\\]*\s/.test(e)||/[=;?<>|]/.test(e))return!1;if(/[\\/]$/.test(e)&&/[^.~/\\]/.test(e))return!0;let n=e.replace(/\\/g,`/`).split(`/`).filter(Boolean).at(-1)??e;if(le.has(n)||/^\.[A-Za-z_]/.test(n))return!0;let r=n.includes(`.`)?n.split(`.`).at(-1)?.toLowerCase():null;return!!(r&&ce.has(r))}function xe(e){return!e||/[\s([{<"'`]/.test(e)}function Se(e){return e.replace(/[.,;!?]+$/,``).replace(/[\])}]+$/,``)}function Ce(e){return/^(?:#{1,6}\s*)?(?:\*\*)?(?:(?:the|both|all)\s+)?(?:updated\s+)?(?:files|outputs|deliverables|everything|slide\s+and\s+deck)(?:\*\*)?\s*(?:(?:is|are)\s+)?(?:\(\s*)?(?:in|at|under|:)\s*`((?:~[\/]|[\/]|[A-Za-z]:[\/])[^`\n]+[\/])`/i.exec(e.trim())?.[1]??null}function we(e,t,n){let[r,i]=(0,w.useState)({key:t,url:null,status:`loading`}),a=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!e||!t)return;_.activateConnection(e);let r=_.watch(t,n,e=>i({...e,key:t}));a.current=r;let o=()=>{document.visibilityState!==`hidden`&&r.refresh()};return window.addEventListener(`focus`,o),window.addEventListener(`openpond-runtime-connected`,o),document.addEventListener(`visibilitychange`,o),()=>{r.close(),a.current=null,window.removeEventListener(`focus`,o),window.removeEventListener(`openpond-runtime-connected`,o),document.removeEventListener(`visibilitychange`,o)}},[e,t,n]);let o=(0,w.useCallback)(()=>a.current?.refresh(!0),[]);return{...r.key===t&&e&&t?r:{url:null,status:`loading`},retry:o}}function Te(e,t){return Ee(e,t).url}function Ee(e,t){let n=(0,w.useCallback)(()=>d.signLocalImageUrl(e,{path:t}),[e,t]);return we(e,e&&t?f(e,`local-image`,t):null,n)}function De(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)(t=>!e||!t?null:(_.activateConnection(e),_.get(f(e,`local-image`,t))),[e]),r=(0,w.useCallback)(async n=>{if(!e||!n)return null;_.activateConnection(e);let r=f(e,`local-image`,n);return _.load(r,()=>d.signLocalImageUrl(e,{path:n})).finally(()=>t(e=>e+1))},[e]);return(0,w.useMemo)(()=>({getUrl:n,loadUrl:r}),[n,r])}function Oe(e,t,n){return/^(?:[~/\\]|[A-Za-z]:|file:\/\/)/.test(n)?d.signLocalImageUrl(e,{path:n}):d.signWorkspaceImageUrl(e,{appId:t,path:n})}function ke(e,t,n){return Ae(e,t,n).url}function Ae(e,t,n){let r=(0,w.useCallback)(()=>Oe(e,t,n),[e,t,n]);return we(e,e&&t&&n?f(e,`workspace-image`,t,n):null,r)}function je(e){let[,t]=(0,w.useState)(0),n=(0,w.useCallback)((t,n)=>!e||!t||!n?null:(_.activateConnection(e),_.get(f(e,`workspace-image`,t,n))),[e]),r=(0,w.useCallback)(async(n,r)=>{if(!e||!n||!r)return null;_.activateConnection(e);let i=f(e,`workspace-image`,n,r);return _.load(i,()=>Oe(e,n,r)).finally(()=>t(e=>e+1))},[e]),i=(0,w.useCallback)((e,t)=>{r(e,t)},[r]);return(0,w.useMemo)(()=>({ensureUrl:i,getUrl:n,loadUrl:r}),[i,n,r])}var Me=r();async function Ne(e,t){let n=window.openpond?.files?.saveImage;if(n){let r=await n({url:new URL(e,window.location.href).href,suggestedName:t});if(!r.ok&&!r.canceled)throw Error(r.error||`Could not save image.`);return}let r=window.showSaveFilePicker,i;try{i=r?await r.call(window,{suggestedName:t}):void 0}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;throw e}let a=await fetch(e);if(!a.ok)throw Error(`Image download failed (${a.status}).`);let o=await a.blob();if(i){let e=await i.createWritable();try{await e.write(o),await e.close()}catch(t){throw await e.abort().catch(()=>void 0),t}return}let s=URL.createObjectURL(o),c=document.createElement(`a`);c.href=s,c.download=t,document.body.appendChild(c),c.click(),c.remove(),setTimeout(()=>URL.revokeObjectURL(s),6e4)}var T=i();function Pe({open:e,src:t,title:n,onClose:r}){let[i,a]=(0,w.useState)(!1),[o,s]=(0,w.useState)(!1),[u,d]=(0,w.useState)(null);if((0,w.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[r,e]),(0,w.useEffect)(()=>{a(!1),d(null)},[t]),!e||!t)return null;let f=(()=>{let e=n.split(`/`).pop()?.trim();if(e&&/\.[A-Za-z0-9]+$/.test(e))return e;try{let e=new URL(t,window.location.href),n=(e.searchParams.get(`path`)??e.searchParams.get(`storageName`)??e.pathname).split(/[\\/]/).pop()?.trim();if(n&&/\.[A-Za-z0-9]+$/.test(n))return n}catch{}return`image.png`})();return(0,Me.createPortal)((0,T.jsx)(`div`,{className:`image-lightbox-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&r()},children:(0,T.jsxs)(`section`,{"aria-label":n?`Image preview: ${n}`:`Image preview`,"aria-modal":`true`,className:`image-lightbox-dialog`,role:`dialog`,children:[(0,T.jsxs)(`header`,{className:`image-lightbox-header`,children:[(0,T.jsx)(`span`,{title:n,children:n}),(0,T.jsxs)(`div`,{className:`image-lightbox-actions`,children:[(0,T.jsx)(`button`,{type:`button`,"aria-label":`Download image`,title:`Download`,disabled:o,"aria-busy":o,onClick:async()=>{if(!o){s(!0),d(null);try{await Ne(t,f)}catch(e){d(e instanceof Error?e.message:`Could not save image.`)}finally{s(!1)}}},children:(0,T.jsx)(p,{size:16})}),(0,T.jsx)(`button`,{type:`button`,"aria-label":`Close image preview`,title:`Close`,onClick:r,children:(0,T.jsx)(c,{size:16})})]})]}),u&&(0,T.jsx)(l,{error:u}),(0,T.jsx)(`div`,{className:`image-lightbox-frame`,children:i?(0,T.jsx)(l,{error:`Image preview unavailable`}):(0,T.jsx)(`img`,{alt:n||`Image preview`,decoding:`async`,draggable:!1,src:t,onError:()=>a(!0)})})]})}),document.body)}function Fe(e){let t=e.replace(/\r\n/g,`
2
2
  `).split(`
3
3
  `),n=[],r=[],i=[],a=[],o=!1,s,c=null,l,u=0,d=null;function f(){r.length!==0&&(n.push({type:`paragraph`,content:r.join(`
4
4
  `).trim()}),r=[])}function p(){i.length!==0&&(n.push({type:`blockquote`,content:i.join(`
@@ -264,10 +264,10 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
264
264
  |[ \r ]+
265
265
  ?)[ \r ]*`,yo=`[̀-ͯ]`,bo=RegExp(yo+`+$`),xo=`(`+mo+`+)|`+(vo+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(yo+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(yo+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+_o)+(`|`+go+`)`),So=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(xo,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Sa(`EOF`,new xa(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new E(`Unexpected character: '`+e[t]+`'`,new Sa(e[t],new xa(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
266
266
  `,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new Sa(r,new xa(this,t,this.tokenRegex.lastIndex))}},Co=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new E(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},wo=ba;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var To={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new E("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=To[t.text],r==null||r>=n)throw new E(`Invalid base-`+n+` digit `+t.text);for(var i;(i=To[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var Eo=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new E(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new E(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new E(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new E(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};$(`\\newcommand`,e=>Eo(e,!1,!0,!1)),$(`\\renewcommand`,e=>Eo(e,!0,!1,!1)),$(`\\providecommand`,e=>Eo(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),po[n],A.math[n],A.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var Do={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Oo=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in Do?t=Do[n]:(n.slice(0,4)===`\\not`||n in A.math&&Oo.has(A.math[n].group))&&(t=`\\dotsb`),t});var ko={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in ko?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in ko&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in ko?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new E(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var Ao=k(fn[`Main-Regular`][84][1]-.7*fn[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Ao+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Ao+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var jo=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,jo(!1)),$(`\\bra@set`,jo(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var Mo={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},No=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Co(wo,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new So(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new Sa(`EOF`,n.loc)),this.pushTokens(r),new Sa(``,xa.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new E(`Extra }`,i)}else if(i.text===`EOF`)throw new E(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new E(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new E(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new E(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new E(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new E(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new E(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Sa(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new So(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(po,e)||Object.prototype.hasOwnProperty.call(A.math,e)||Object.prototype.hasOwnProperty.call(A.text,e)||Object.prototype.hasOwnProperty.call(Mo,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(po,e)&&!po[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},Po=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Fo=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Io={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Lo={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Ro=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new No(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new E(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Sa(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&po[i.text]&&po[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new E(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new E(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new E(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new E(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new E(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new E(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(Fo[i.text]){var s=Po.test(i.text),c=[];for(c.push(new Sa(Fo[i.text])),this.consume();;){var l=this.fetch().text;if(!Fo[l]||Po.test(l)!==s)break;c.unshift(new Sa(Fo[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n&&r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:r?{type:`supsub`,mode:this.mode,base:t,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=po[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new E(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new E(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new E(`Can't use function '`+r+`' in math mode`,n);var a=this.parseArguments(r,i),o=a.args,s=a.optArgs;return this.callFunction(r,o,s,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=po[e];if(o&&o.handler)return o.handler(a,t,n);throw new E(`No function handler for `+e)}parseArguments(e,t){var n=t.numOptionalArgs??0,r=t.numArgs+n;if(r===0)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=t.argTypes?.[o],c=o<n;(`primitive`in t&&t.primitive&&s==null||t.type===`sqrt`&&o===1&&a[0]==null)&&(s=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,s,c);if(c)a.push(l);else if(l!=null)i.push(l);else throw new E(`Null argument, please report this as a bug`)}return{args:i,optArgs:a}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new E(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new E(`Expected group as `+e,this.fetch());return a;case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new E(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){var t=this.gullet.scanArgument(e);if(t==null)return null;for(var n=``,r;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new E(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new E(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new E(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!qt(i))throw new E(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:xa.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!Object.prototype.hasOwnProperty.call(Mo,r)){if(this.settings.throwOnError)throw new E(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:xa.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:xa.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:xa.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new E(`\\verb assertion failed --
267
- please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(Lo,t[0])&&!A[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=Lo[t[0]]+t.slice(1));var i=bo.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(A[this.mode][t]){this.settings.strict&&this.mode===`math`&&In.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=A[this.mode][t].group,s=xa.range(e);a=gi(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(kt(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:xa.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!Io[l])throw new E(`Unknown accent ' `+l+`'`,e);var u=Io[l][this.mode]||Io[l].text;if(!u)throw new E(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:xa.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};Ro.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var zo=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new Ro(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new E(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new Sa(`\\df@tag`)])}]}return r};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`);var Bo=function(e,t){return Ho(e,t).toMarkup()},Vo=function(e,t,n){if(n.throwOnError||!(e instanceof E))throw e;var r=W([`katex-error`],[new an(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Ho=function(e,t){var n=new lt(t);try{return ai(zo(e,n),e,n)}catch(t){return Vo(t,e,n)}};function Uo({display:e=!1,source:t}){let n=(0,w.useMemo)(()=>Bo(t,{displayMode:e,output:`htmlAndMathml`,strict:`ignore`,throwOnError:!1,trust:!1}),[e,t]);return(0,T.jsx)(e?`div`:`span`,{className:e?`markdown-math-block`:`markdown-math-inline`,dangerouslySetInnerHTML:{__html:n}})}var Wo=new Set([`.avif`,`.gif`,`.ico`,`.jpeg`,`.jpg`,`.png`,`.svg`,`.webp`]);function Go({checked:e,inline:t=!1}){return(0,T.jsx)(`input`,{"aria-label":e?`Checked item`:`Unchecked item`,checked:e,className:`markdown-checkbox ${t?`inline`:``}`,disabled:!0,readOnly:!0,type:`checkbox`})}function Ko(e,t){let n=[],r=0,i=0,a=null,o=t=>{t>i&&n.push(e.slice(i,t))};for(;r<e.length;){let s=e[r];if(s===`:`){let a=Ye(e,r);if(a){o(r),n.push(Qo(a.label,a.path,a.path,t,n.length)),r=a.end,i=r;continue}}if(s==="`"){let s=e.indexOf("`",r+1);if(s>r+1){let c=e.slice(r+1,s),l=a&&a.path.lastIndexOf(`/`)>0&&/^(?:\s*(?:\.\.\.|…)\s*)$/.test(e.slice(a.end,r))&&!/[\/]/.test(c)?a.path.slice(0,a.path.lastIndexOf(`/`)):null,u=t.onOpenFileInSidebar?ge(c,{workspaceRootPath:t.workspaceRootPath,fileBasePath:l||t.fileBasePath}):null;o(r),n.push(u?Qo(u.displayPath,u.path,u.displayPath,t,n.length):(0,T.jsx)(`code`,{children:c},n.length)),a=u?{path:u.path,end:s+1}:null,r=s+1,i=r;continue}}let c=qo(e,r);if(c){o(r),n.push((0,T.jsx)(Uo,{source:c.content},n.length)),r=c.end,i=r;continue}let l=s===`<`||e.startsWith(`!<img`,r)?is(e,r):null;if(l){let e=ds(l.src,t);if(e){o(r),n.push(Xo(l.alt,e,t,n.length)),r=l.end,i=r;continue}}let u=s===`<`?os(e,r):null;if(u){o(r),n.push(Yo(u.label,u.href,t,n.length)),r=u.end,i=r;continue}let d=s===`<`?ss(e,r):null;if(d){o(r),n.push(Yo(d.href,d.href,t,n.length)),r=d.end,i=r;continue}let f=s===`[`?as(e,r):null;if(f){o(r),n.push((0,T.jsx)(Go,{checked:f.checked,inline:!0},n.length)),r=f.end,i=r;continue}let p=e.startsWith(`![`,r)?ts(e,r):null;if(p){let e=ds(p.href,t);o(r),n.push(e?Xo(p.label,e,t,n.length):Yo(p.label||p.href,p.href,t,n.length)),r=p.end,i=r;continue}let m=s===`[`?ns(e,r):null;if(m){o(r),n.push(Yo(m.label,m.href,t,n.length)),r=m.end,i=r;continue}let h=Jo(e,r);if(h){o(r),n.push(Yo(h.href,h.href,t,n.length)),r=h.end,i=r;continue}let g=t.onOpenFileInSidebar?he(e,r,{workspaceRootPath:t.workspaceRootPath,fileBasePath:t.fileBasePath}):null;if(g)o(r),n.push(Qo(g.displayPath,g.path,g.displayPath,t,n.length)),r=g.end,i=r;else{if(e.startsWith(`**`,r)){let a=e.indexOf(`**`,r+2);if(a>r+2){o(r),n.push((0,T.jsx)(`strong`,{children:Ko(e.slice(r+2,a),t)},n.length)),r=a+2,i=r;continue}}if(e.startsWith(`__`,r)){let a=e.indexOf(`__`,r+2);if(a>r+2){o(r),n.push((0,T.jsx)(`strong`,{children:Ko(e.slice(r+2,a),t)},n.length)),r=a+2,i=r;continue}}r+=1}}return o(e.length),n}function qo(e,t){if(e.startsWith(`\\(`,t)){let n=e.indexOf(`\\)`,t+2);return n<=t+2?null:{content:e.slice(t+2,n),end:n+2}}if(e[t]!==`$`||e[t+1]===`$`||/\s/.test(e[t+1]??``))return null;let n=t+1;for(;(n=e.indexOf(`$`,n+1))>=0;)if(e[n-1]!==`\\`&&!(e[n+1]===`$`||/\d/.test(e[n+1]??``)||/\s/.test(e[n-1]??``)))return{content:e.slice(t+1,n),end:n+1};return null}function Jo(e,t){let n=t>0?e[t-1]:``;if(n&&!/[\s([{<]/.test(n))return null;let r=e.slice(t),i=/^(?:https?:\/\/|www\.)[^\s<>()]+(?:\([^\s<>()]*\)[^\s<>()]*)*/i.exec(r);if(!i)return null;let a=i[0];for(;/[.,;:!?]$/.test(a);)a=a.slice(0,-1);return a?{href:/^www\./i.test(a)?`https://${a}`:a,end:t+a.length}:null}function Yo(e,t,n,r){let i=n.conversationLinks?.get(t);if(i)return(0,T.jsx)(`a`,{href:`/tasks/${encodeURIComponent(i.conversationId)}`,onClick:e=>{n.onOpenConversation&&(e.preventDefault(),n.onOpenConversation(i.conversationId))},children:e===t?i.title:Ko(e,n)},r);let a=hs(t),o=ds(a,n),s=/^https?:\/\//i.test(a),c=o?.kind===`url`?o.src:o?.src??a,l=n.onOpenFileInSidebar?ge(a,{href:!0,workspaceRootPath:n.workspaceRootPath,fileBasePath:n.fileBasePath}):null;return!o&&l?Qo(e,l.path,l.displayPath,n,r):(0,T.jsx)(`a`,{href:s||o?c:`#`,className:o?`markdown-image-link`:void 0,onBlur:()=>{o&&n.onPreviewImage(null)},onClick:e=>{o?(e.preventDefault(),xs(o,n),n.onPreviewImage(null)):s&&n.onOpenBrowserLink?(e.preventDefault(),n.onOpenBrowserLink(c)):s||e.preventDefault()},onContextMenu:e=>{e.preventDefault(),n.onPreviewImage(null),n.onOpenLinkMenu(ws(c,a,e.clientX,e.clientY))},onFocus:e=>{o&&Ss(o,n,e.currentTarget)},onMouseEnter:e=>{o&&Ss(o,n,e.currentTarget)},onMouseLeave:()=>{o&&n.onPreviewImage(null)},rel:s?`noreferrer`:void 0,target:s?`_blank`:void 0,title:a,children:e},r)}function Xo(e,t,n,r){return(0,T.jsx)(Zo,{context:n,image:t,label:e},r)}function Zo({context:e,image:t,label:n}){let r=ke(e.connection,t.kind===`workspace`?t.appId:null,t.kind===`workspace`?t.path:null),i=Te(e.connection,t.kind===`local`?t.path:null),a=t.kind===`url`?t.src:t.kind===`local`?i:r,o=n.trim()||t.title;return(0,T.jsx)(`button`,{type:`button`,className:`markdown-inline-image ${a?`ready`:`loading`}`,onClick:()=>{t.kind===`url`?e.onOpenImage({src:t.src,title:o}):a?e.onOpenImage({src:a,title:o}):t.kind!==`local`&&e.onOpenWorkspaceImage({appId:t.appId,path:t.path,title:o})},title:o,children:a?(0,T.jsx)(`img`,{alt:o,decoding:`async`,loading:`lazy`,src:a}):(0,T.jsx)(`span`,{"aria-hidden":`true`})})}function Qo(e,t,n,r,i){let a=fs(t,n,r);return a?(0,T.jsx)(es,{context:r,displayPath:n,image:a,label:e,path:t},i):(0,T.jsx)($o,{context:r,displayPath:n,label:e,path:t},i)}function $o({context:e,displayPath:t,label:n,path:r}){return(0,T.jsx)(`a`,{href:`#`,className:`markdown-file-link`,onClick:t=>{t.preventDefault(),e.onOpenFileInSidebar?.(r)},onContextMenu:n=>{n.preventDefault(),e.onPreviewImage(null),e.onOpenLinkMenu(Ts(r,t,n.clientX,n.clientY))},title:r,children:n})}function es({context:e,displayPath:t,image:n,label:r,path:i}){let a=Ae(e.connection,n.kind===`workspace`?n.appId:null,n.kind===`workspace`?n.path:null),o=Ee(e.connection,n.kind===`local`?n.path:null),s=n.kind===`local`?o:a,c=n.kind===`url`?n.src:s.url,[l,u]=(0,w.useState)(null),d=!!(c&&l===c)||n.kind!==`url`&&s.status===`error`,f=n.title||t;return(0,T.jsxs)(`span`,{className:`markdown-file-image-reference`,children:[(0,T.jsx)($o,{context:e,displayPath:t,label:r,path:i}),(0,T.jsx)(`button`,{type:`button`,className:`markdown-file-image-preview ${d?`error`:c?`ready`:`loading`}`,onClick:()=>{if(d){if(e.onOpenFileInSidebar&&n.kind!==`url`){e.onOpenFileInSidebar(i);return}u(null),n.kind!==`url`&&s.retry()}else n.kind===`url`?e.onOpenImage({src:n.src,title:f}):c?e.onOpenImage({src:c,title:f}):n.kind!==`local`&&e.onOpenWorkspaceImage({appId:n.appId,path:n.path,title:f})},title:f,"aria-label":d?`Retry preview for ${f}`:`Preview ${f}`,children:d?(0,T.jsx)(`span`,{children:`Preview unavailable · Retry`}):c?(0,T.jsx)(`img`,{alt:f,decoding:`async`,loading:`lazy`,src:c,onError:()=>u(c)}):(0,T.jsx)(`span`,{children:`Loading preview…`})})]})}function ts(e,t){if(!e.startsWith(`![`,t))return null;let n=t+2,r=e.indexOf(`]`,n);if(r<n||e[r+1]!==`(`)return null;let i=rs(e,r+2);return i?{label:e.slice(n,r),href:i.href,end:i.end}:null}function ns(e,t){let n=e.indexOf(`]`,t+1);if(n<=t+1||e[n+1]!==`(`)return null;let r=rs(e,n+2);return r?{label:e.slice(t+1,n),href:r.href,end:r.end}:null}function rs(e,t){if(e[t]===`<`){let n=e.indexOf(`>`,t+1);return n<0||e[n+1]!==`)`?null:{href:e.slice(t+1,n),end:n+2}}let n=0;for(let r=t;r<e.length;r+=1){let i=e[r];if(i===`\\`)r+=1;else if(i===`(`)n+=1;else if(i===`)`){if(n===0)return{href:e.slice(t,r),end:r+1};--n}}return null}function is(e,t){let n=e[t]===`!`?t+1:t;if(!/^<img\b/i.test(e.slice(n)))return null;let r=e.indexOf(`>`,n+4);if(r<0)return null;let i=e.slice(n,r+1),a=ls(i,`src`);return a?{src:a,alt:ls(i,`alt`)??ls(i,`title`)??``,end:r+1}:null}function as(e,t){let n=e.slice(t,t+3);return n===`[ ]`?{checked:!1,end:t+3}:n===`[x]`||n===`[X]`?{checked:!0,end:t+3}:null}function os(e,t){let n=e.slice(t),r=/^<a\s+[^>]*href\s*=\s*(["'])(.*?)\1[^>]*>(.*?)<\/a>/i.exec(n);return r?{href:r[2]??``,label:cs(r[3]??``),end:t+r[0].length}:null}function ss(e,t){let n=e.indexOf(`>`,t+1);if(n<=t+1)return null;let r=e.slice(t+1,n).trim();return us(r)?{href:r,end:n+1}:null}function cs(e){return e.replace(/<[^>]+>/g,``).trim()||e}function ls(e,t){let n=RegExp(`\\s${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`,`i`).exec(e);return n?.[1]??n?.[2]??n?.[3]??null}function us(e){return/^(https?:\/\/|file:\/\/|(?:workspace|sandbox):file:|\/|\.{1,2}\/)/i.test(e)}function ds(e,t){let n=hs(e);if(!n)return null;if(/^https?:\/\//i.test(n))try{let e=new URL(n);return bs(e,t)||(ys(e,t.connection)?{kind:`url`,src:n,title:h(e.searchParams.get(`path`)??e.pathname)}:null)}catch{return null}let r=gs(ge(n,{href:!0,fileBasePath:t.fileBasePath})?.path??n),i=ps(r??n,t.workspaceRootPath);if(i)return{kind:`url`,src:i,title:h(r??n)};if(!r||!d(r)||!t.connection)return null;if(_s(r))return{kind:`local`,path:r,src:t.localImageUrls.getUrl(r),title:h(r)};if(!t.activeWorkspaceAppId)return null;let a=vs(r,t.workspaceRootPath);return!a||!d(a)?null:{kind:`workspace`,appId:t.activeWorkspaceAppId,path:a,src:t.workspaceImageUrls.getUrl(t.activeWorkspaceAppId,a),title:h(a)}}function fs(e,t,n){let r=ps(e,n.workspaceRootPath)??ps(t,n.workspaceRootPath);if(r)return{kind:`url`,src:r,title:h(t)};if(!d(e)||!n.connection)return null;if(_s(e))return{kind:`local`,path:e,src:n.localImageUrls.getUrl(e),title:h(e)};if(!n.activeWorkspaceAppId)return null;let i=vs(e,n.workspaceRootPath);return!i||!d(i)?null:{kind:`workspace`,appId:n.activeWorkspaceAppId,path:i,src:n.workspaceImageUrls.getUrl(n.activeWorkspaceAppId,i),title:h(i)}}function ps(e,n){let r=vs(e,n);if(!r?.startsWith(`apps/web/public/`))return null;let i=r.slice(16);return!i||!ms(i)?null:t(i.split(`/`).map(encodeURIComponent).join(`/`))}function ms(e){let t=e.split(`?`)[0]?.split(`#`)[0]??e,n=t.lastIndexOf(`.`);return n<0?!1:Wo.has(t.slice(n).toLowerCase())}function hs(e){return e.trim().replace(/^['"`]+|['"`]+$/g,``)}function gs(e){let t=e.trim();if(!t)return null;if(t.startsWith(`file://`))try{return decodeURIComponent(new URL(t).pathname)}catch{return t.replace(/^file:\/\//,``)}if(_s(t))return t;let n=t.indexOf(`#`);n>=0&&(t=t.slice(0,n));let r=t.indexOf(`?`);return r>=0&&(t=t.slice(0,r)),t}function _s(e){return/^file:\/\//i.test(e)||/^(?:\/|~\/)/.test(e)||/^[A-Za-z]:[\\/]/.test(e)}function vs(e,t){let n=e.trim().replace(/^['"`]+|['"`]+$/g,``);if(!n)return null;if(n.startsWith(`file://`))try{n=decodeURIComponent(new URL(n).pathname)}catch{n=n.replace(/^file:\/\//,``)}if(n=n.replace(/\\/g,`/`),_s(n)){let e=t?.trim().replace(/\\/g,`/`).replace(/\/+$/,``);if(!e||!n.startsWith(`${e}/`))return null;n=n.slice(e.length+1)}n=n.replace(/^\.\/+/,``);let r=n.split(`/`).filter(Boolean);return r.length===0||r.some(e=>e===`.`||e===`..`||e===`.git`)?null:r.join(`/`)}function ys(e,t){if(t){let n=new URL(t.serverUrl);if(e.origin===n.origin){if(e.pathname===`/v1/local-image`||/\/v1\/workspaces\/[^/]+\/file-image$/.test(e.pathname))return!1;if(e.pathname===`/v1/assets/workspace-image`||e.pathname===`/v1/assets/chat-attachment-image`)return!0}}if(d(e.pathname))return!0;let n=e.searchParams.get(`path`);return!!(n&&d(n))}function bs(e,t){if(!t.connection)return null;let n=new URL(t.connection.serverUrl);if(e.origin!==n.origin)return null;let r=e.pathname===`/v1/assets/workspace-image`?e.searchParams.get(`path`):null;if(r&&d(r))return{kind:`url`,src:e.toString(),title:h(r)};let i=e.pathname===`/v1/assets/chat-attachment-image`?e.searchParams.get(`storageName`):null;if(i&&d(i))return{kind:`url`,src:e.toString(),title:h(i)};let a=/^\/v1\/workspaces\/([^/]+)\/file-image$/.exec(e.pathname),o=a?e.searchParams.get(`path`):null;if(!a||!o||!d(o))return null;let s=decodeURIComponent(a[1]),c=vs(o,t.workspaceRootPath);return!c||!d(c)?null:{kind:`workspace`,appId:s,path:c,src:t.workspaceImageUrls.getUrl(s,c),title:h(c)}}function xs(e,t){e.kind===`url`?t.onOpenImage(e):e.kind===`local`?e.src?t.onOpenImage({src:e.src,title:e.title}):t.onOpenFileInSidebar?.(e.path):e.src?t.onOpenImage({src:e.src,title:e.title}):t.onOpenFileInSidebar?t.onOpenFileInSidebar(e.path):t.onOpenWorkspaceImage({appId:e.appId,path:e.path,title:e.title})}function Ss(e,t,n){if(e.kind===`url`)t.onPreviewImage(Cs(e,n));else if(e.kind===`local`){if(e.src){t.onPreviewImage(Cs({src:e.src,title:e.title},n));return}t.localImageUrls.loadUrl(e.path).then(r=>{r&&n.matches(`:hover`)&&t.onPreviewImage(Cs({src:r,title:e.title},n))})}else e.src?t.onPreviewImage(Cs({src:e.src,title:e.title},n)):t.workspaceImageUrls.loadUrl(e.appId,e.path).then(r=>{r&&n.matches(`:hover`)&&t.onPreviewImage(Cs({src:r,title:e.title},n))})}function Cs(e,t){let n=t.getBoundingClientRect(),r=Math.max(12,Math.min(n.left,window.innerWidth-236-12)),i=n.bottom+8,a=i+172<=window.innerHeight-12?i:Math.max(12,n.top-172-8);return{...e,x:r,y:a}}function ws(e,t,n,r){return{kind:`browser`,browserHref:e,displayHref:t,x:Math.max(8,Math.min(n,window.innerWidth-220-8)),y:Math.max(8,Math.min(r,window.innerHeight-142-8))}}function Ts(e,t,n,r){return{kind:`file`,path:e,displayPath:t,x:Math.max(8,Math.min(n,window.innerWidth-220-8)),y:Math.max(8,Math.min(r,window.innerHeight-72-8))}}async function Es(e){let t=e.trim();if(!t)return!1;let n=window.openpond?.files;if(!n)return!1;try{return(await n.reveal({path:t})).ok}catch{return!1}}async function Ds(e,t){let n=e.trim(),r=window.openpond?.files;if(!n||!r?.saveAs)return{ok:!1,canceled:!1,path:null};try{let e=await r.saveAs({path:n,suggestedName:t});return{ok:e.ok,canceled:e.canceled,path:e.path??null}}catch{return{ok:!1,canceled:!1,path:null}}}var Os={bash:`Bash`,css:`CSS`,html:`HTML`,javascript:`JavaScript`,js:`JavaScript`,json:`JSON`,jsx:`JSX`,markdown:`Markdown`,md:`Markdown`,python:`Python`,py:`Python`,sh:`Shell`,shell:`Shell`,sql:`SQL`,ts:`TypeScript`,tsx:`TSX`,typescript:`TypeScript`,yaml:`YAML`,yml:`YAML`},ks=(0,w.memo)(function({content:e,language:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(!1),o=As(t);return(0,w.useEffect)(()=>{if(!n)return;let e=window.setTimeout(()=>r(!1),1800);return()=>window.clearTimeout(e)},[n]),(0,T.jsxs)(`section`,{className:`markdown-code-block${i?` wrap-lines`:``}`,"aria-label":`${o} code block`,children:[(0,T.jsxs)(`header`,{className:`markdown-code-header`,children:[(0,T.jsxs)(`span`,{className:`markdown-code-language`,children:[(0,T.jsx)(x,{"aria-hidden":!0,size:15,strokeWidth:1.8}),(0,T.jsx)(`span`,{children:o})]}),(0,T.jsxs)(`span`,{className:`markdown-code-actions`,children:[(0,T.jsx)(`button`,{"aria-label":i?`Stop wrapping code`:`Wrap code`,"aria-pressed":i,className:`markdown-code-action`,title:i?`Stop wrapping`:`Wrap lines`,type:`button`,onClick:()=>a(e=>!e),children:(0,T.jsx)(re,{"aria-hidden":!0,size:15})}),(0,T.jsx)(`button`,{"aria-label":n?`Code copied`:`Copy code`,className:`markdown-code-action`,title:n?`Copied`:`Copy code`,type:`button`,onClick:()=>{ie(e).then(e=>{e&&r(!0)})},children:n?(0,T.jsx)(m,{"aria-hidden":!0,size:15}):(0,T.jsx)(s,{"aria-hidden":!0,size:15})})]})]}),(0,T.jsx)(`pre`,{className:`markdown-code-content`,children:(0,T.jsx)(`code`,{children:e})})]})});function As(e){let t=e?.trim().toLowerCase();return t?Os[t]??t.charAt(0).toUpperCase()+t.slice(1):`Code`}function js({activeWorkspaceAppId:e=null,connection:t=null,content:n,finalizedContent:r,mutableContent:i,onOpenBrowserLink:a,onOpenFileInSidebar:o,conversationLinks:s,onOpenConversation:c,workspaceRootPath:l=null}){let u=r!==void 0||i!==void 0,d=(0,w.useMemo)(()=>u?[]:Fe(n),[n,u]),f=(0,w.useMemo)(()=>u&&r?Fe(r):[],[r,u]),p=(0,w.useMemo)(()=>u&&i?Fe(i):[],[i,u]),m=(0,w.useMemo)(()=>u?[...f,...p]:d,[u,f,p,d]),[h,g]=(0,w.useState)(null),[_,v]=(0,w.useState)(null),[y,b]=(0,w.useState)(null),x=De(t),S=je(t),C=(0,w.useMemo)(()=>new Map(s?.flatMap(e=>[[e.conversationId,e],[`/tasks/${encodeURIComponent(e.conversationId)}`,e]])??[]),[s]),ee=(0,w.useCallback)(e=>{S.loadUrl(e.appId,e.path).then(t=>{t&&g({src:t,title:e.title})})},[S]),te=(0,w.useMemo)(()=>({conversationLinks:C,onOpenConversation:c,activeWorkspaceAppId:e,connection:t,onOpenBrowserLink:a,onOpenFileInSidebar:o,onOpenLinkMenu:b,onOpenImage:g,onOpenWorkspaceImage:ee,onPreviewImage:v,localImageUrls:x,workspaceImageUrls:S,workspaceRootPath:l}),[C,c,e,t,ee,x,a,o,S,l]);return(0,w.useEffect)(()=>{if(!y)return;let e=()=>b(null),t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`scroll`,e,!0)}},[y]),(0,T.jsxs)(`div`,{className:`markdown-message`,children:[(0,T.jsx)(Ms,{blocks:m,context:te,keyPrefix:`block`,workspaceRootPath:l}),_&&(0,T.jsx)(Is,{preview:_}),y&&(0,T.jsx)(Ls,{menu:y,onClose:()=>b(null),onOpenBrowserLink:a,onOpenFileInSidebar:o}),(0,T.jsx)(Pe,{open:!!h,src:h?.src??null,title:h?.title??``,onClose:()=>g(null)})]})}var Ms=(0,w.memo)(function({blocks:e,context:t,keyPrefix:n,workspaceRootPath:r}){return Ps(e,t,r,n)});function Ns(e,t){return t.type===`list`?e:`content`in t&&typeof t.content==`string`&&t.type!==`code`?Ce(t.content):null}function Ps(e,t,n,r=`block`){let i=t.fileBasePath??null;return e.map((e,a)=>{i=Ns(i,e);let o={...t,fileBasePath:i},s=`${r}-${a}`;if(e.type===`blockquote`)return(0,T.jsx)(`blockquote`,{className:`markdown-blockquote`,children:Ps(Fe(e.content),t,n,`${s}-quote`)},s);if(e.type===`code`){let t=Fs(e.content,n);return t?(0,T.jsx)(`div`,{className:`markdown-file-reference-block`,children:t.map((e,t)=>(0,T.jsx)(`div`,{className:`markdown-file-reference-line`,children:Ko(e,o)},t))},s):(0,T.jsx)(ks,{content:e.content,language:e.language},s)}if(e.type===`math`)return(0,T.jsx)(Uo,{display:!0,source:e.content},s);if(e.type===`list`){let t=e.items.map((t,n)=>(0,T.jsxs)(`li`,{className:t.checked===null?void 0:`markdown-task-list-item`,value:e.ordered?t.ordinal??void 0:void 0,children:[t.checked===null?null:(0,T.jsx)(Go,{checked:t.checked}),(0,T.jsx)(`span`,{children:Ko(t.content,o)})]},n));return e.ordered?(0,T.jsx)(`ol`,{className:`markdown-list`,start:e.start,children:t},s):(0,T.jsx)(`ul`,{className:`markdown-list`,children:t},s)}if(e.type===`heading`){let t=e.level===1?`h1`:e.level===2?`h2`:e.level===3?`h3`:`h4`;return(0,T.jsx)(t,{className:`markdown-heading`,children:Ko(e.content,o)},s)}return e.type===`table`?(0,T.jsx)(`div`,{className:`markdown-table-wrap`,children:(0,T.jsxs)(`table`,{className:`markdown-table`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsx)(`tr`,{children:e.headers.map((e,t)=>(0,T.jsx)(`th`,{children:Ko(e,o)},t))})}),(0,T.jsx)(`tbody`,{children:e.rows.map((n,r)=>(0,T.jsx)(`tr`,{children:e.headers.map((e,r)=>(0,T.jsx)(`td`,{children:Ko(n[r]??``,t)},r))},r))})]})},s):(0,T.jsx)(`p`,{className:`markdown-paragraph`,children:Ko(e.content,o)},s)})}function Fs(e,t){let n=e.split(`
268
- `),r=[];for(let e of n){let n=e.trim();if(!n)continue;let i=n.replace(/^(?:[-*]|\d+[.)])\s+/,``).trim().replace(/^`+|`+$/g,``).trim();if(!i||!ge(i,{workspaceRootPath:t}))return null;r.push(i)}return r.length>0?r:null}function Is({preview:e}){let[t,n]=(0,w.useState)(!1);return(0,w.useEffect)(()=>{n(!1)},[e.src]),(0,T.jsxs)(`div`,{className:`markdown-image-hover-preview ${t?`unavailable`:``}`,style:{left:e.x,top:e.y},children:[t?(0,T.jsx)(`span`,{children:`Preview unavailable`}):(0,T.jsx)(`img`,{alt:``,src:e.src,onError:()=>n(!0)}),(0,T.jsx)(`span`,{children:e.title})]})}function Ls({menu:e,onClose:t,onOpenBrowserLink:n,onOpenFileInSidebar:r}){return e.kind===`file`?(0,T.jsxs)(`div`,{className:`markdown-link-menu`,role:`menu`,style:{left:e.x,top:e.y},onClick:e=>e.stopPropagation(),children:[(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{r?.(e.path),t()},children:/[\\/]$/.test(e.path)?`Open folder`:ae(e.path)?`Open in browser`:`Open in sidebar`}),ae(e.path)&&(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{r?.(e.path,{source:!0}),t()},children:`View source`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{Es(e.path),t()},children:`Open externally`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{ie(e.displayPath),t()},children:`Copy path`})]}):(0,T.jsxs)(`div`,{className:`markdown-link-menu`,role:`menu`,style:{left:e.x,top:e.y},onClick:e=>e.stopPropagation(),children:[(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{n?n(e.browserHref):window.open(e.browserHref,`_blank`,`noopener,noreferrer`),t()},children:`Open in sidebar`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{n?n(e.browserHref,{newTab:!0}):window.open(e.browserHref,`_blank`,`noopener,noreferrer`),t()},children:`Open in new tab`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{window.open(e.browserHref,`_blank`,`noopener,noreferrer`),t()},children:`Open externally`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{ie(e.displayHref),t()},children:`Copy link`})]})}function Rs(e){let t=e.replace(/\\/g,`/`);if(!/^(?:\/|[A-Za-z]:\/)/.test(t))return null;let n=t.lastIndexOf(`/`),r=n===2&&/^[A-Za-z]:/.test(t)?t.slice(0,3):t.slice(0,n)||`/`;return l(r)}async function zs(e){let t=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),n=await crypto.subtle.digest(`SHA-256`,t.buffer);return`sha256:${Array.from(new Uint8Array(n),e=>e.toString(16).padStart(2,`0`)).join(``)}`}var Bs=`
267
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Object.prototype.hasOwnProperty.call(Lo,t[0])&&!A[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=Lo[t[0]]+t.slice(1));var i=bo.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(A[this.mode][t]){this.settings.strict&&this.mode===`math`&&In.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=A[this.mode][t].group,s=xa.range(e);a=gi(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(kt(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:xa.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!Io[l])throw new E(`Unknown accent ' `+l+`'`,e);var u=Io[l][this.mode]||Io[l].text;if(!u)throw new E(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:xa.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};Ro.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var zo=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new Ro(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new E(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new Sa(`\\df@tag`)])}]}return r};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`);var Bo=function(e,t){return Ho(e,t).toMarkup()},Vo=function(e,t,n){if(n.throwOnError||!(e instanceof E))throw e;var r=W([`katex-error`],[new an(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Ho=function(e,t){var n=new lt(t);try{return ai(zo(e,n),e,n)}catch(t){return Vo(t,e,n)}};function Uo({display:e=!1,source:t}){let n=(0,w.useMemo)(()=>Bo(t,{displayMode:e,output:`htmlAndMathml`,strict:`ignore`,throwOnError:!1,trust:!1}),[e,t]);return(0,T.jsx)(e?`div`:`span`,{className:e?`markdown-math-block`:`markdown-math-inline`,dangerouslySetInnerHTML:{__html:n}})}var Wo=new Set([`.avif`,`.gif`,`.ico`,`.jpeg`,`.jpg`,`.png`,`.svg`,`.webp`]);function Go({checked:e,inline:t=!1}){return(0,T.jsx)(`input`,{"aria-label":e?`Checked item`:`Unchecked item`,checked:e,className:`markdown-checkbox ${t?`inline`:``}`,disabled:!0,readOnly:!0,type:`checkbox`})}function Ko(e,t){let n=[],r=0,i=0,a=null,o=t=>{t>i&&n.push(e.slice(i,t))};for(;r<e.length;){let s=e[r];if(s===`:`){let a=Ye(e,r);if(a){o(r),n.push(Qo(a.label,a.path,a.path,t,n.length)),r=a.end,i=r;continue}}if(s==="`"){let s=e.indexOf("`",r+1);if(s>r+1){let c=e.slice(r+1,s),l=a&&a.path.lastIndexOf(`/`)>0&&/^(?:\s*(?:\.\.\.|…)\s*)$/.test(e.slice(a.end,r))&&!/[\/]/.test(c)?a.path.slice(0,a.path.lastIndexOf(`/`)):null,u=t.onOpenFileInSidebar?ge(c,{workspaceRootPath:t.workspaceRootPath,fileBasePath:l||t.fileBasePath}):null;o(r),n.push(u?Qo(u.displayPath,u.path,u.displayPath,t,n.length):(0,T.jsx)(`code`,{children:c},n.length)),a=u?{path:u.path,end:s+1}:null,r=s+1,i=r;continue}}let c=qo(e,r);if(c){o(r),n.push((0,T.jsx)(Uo,{source:c.content},n.length)),r=c.end,i=r;continue}let l=s===`<`||e.startsWith(`!<img`,r)?is(e,r):null;if(l){let e=ds(l.src,t);if(e){o(r),n.push(Xo(l.alt,e,t,n.length)),r=l.end,i=r;continue}}let u=s===`<`?os(e,r):null;if(u){o(r),n.push(Yo(u.label,u.href,t,n.length)),r=u.end,i=r;continue}let d=s===`<`?ss(e,r):null;if(d){o(r),n.push(Yo(d.href,d.href,t,n.length)),r=d.end,i=r;continue}let f=s===`[`?as(e,r):null;if(f){o(r),n.push((0,T.jsx)(Go,{checked:f.checked,inline:!0},n.length)),r=f.end,i=r;continue}let p=e.startsWith(`![`,r)?ts(e,r):null;if(p){let e=ds(p.href,t);o(r),n.push(e?Xo(p.label,e,t,n.length):Yo(p.label||p.href,p.href,t,n.length)),r=p.end,i=r;continue}let m=s===`[`?ns(e,r):null;if(m){o(r),n.push(Yo(m.label,m.href,t,n.length)),r=m.end,i=r;continue}let h=Jo(e,r);if(h){o(r),n.push(Yo(h.href,h.href,t,n.length)),r=h.end,i=r;continue}let g=t.onOpenFileInSidebar?he(e,r,{workspaceRootPath:t.workspaceRootPath,fileBasePath:t.fileBasePath}):null;if(g)o(r),n.push(Qo(g.displayPath,g.path,g.displayPath,t,n.length)),r=g.end,i=r;else{if(e.startsWith(`**`,r)){let a=e.indexOf(`**`,r+2);if(a>r+2){o(r),n.push((0,T.jsx)(`strong`,{children:Ko(e.slice(r+2,a),t)},n.length)),r=a+2,i=r;continue}}if(e.startsWith(`__`,r)){let a=e.indexOf(`__`,r+2);if(a>r+2){o(r),n.push((0,T.jsx)(`strong`,{children:Ko(e.slice(r+2,a),t)},n.length)),r=a+2,i=r;continue}}r+=1}}return o(e.length),n}function qo(e,t){if(e.startsWith(`\\(`,t)){let n=e.indexOf(`\\)`,t+2);return n<=t+2?null:{content:e.slice(t+2,n),end:n+2}}if(e[t]!==`$`||e[t+1]===`$`||/\s/.test(e[t+1]??``))return null;let n=t+1;for(;(n=e.indexOf(`$`,n+1))>=0;)if(e[n-1]!==`\\`&&!(e[n+1]===`$`||/\d/.test(e[n+1]??``)||/\s/.test(e[n-1]??``)))return{content:e.slice(t+1,n),end:n+1};return null}function Jo(e,t){let n=t>0?e[t-1]:``;if(n&&!/[\s([{<]/.test(n))return null;let r=e.slice(t),i=/^(?:https?:\/\/|www\.)[^\s<>()]+(?:\([^\s<>()]*\)[^\s<>()]*)*/i.exec(r);if(!i)return null;let a=i[0];for(;/[.,;:!?]$/.test(a);)a=a.slice(0,-1);return a?{href:/^www\./i.test(a)?`https://${a}`:a,end:t+a.length}:null}function Yo(e,t,n,r){let i=n.conversationLinks?.get(t);if(i)return(0,T.jsx)(`a`,{href:`/tasks/${encodeURIComponent(i.conversationId)}`,onClick:e=>{n.onOpenConversation&&(e.preventDefault(),n.onOpenConversation(i.conversationId))},children:e===t?i.title:Ko(e,n)},r);let a=hs(t),o=ds(a,n),s=/^https?:\/\//i.test(a),c=o?.kind===`url`?o.src:o?.src??a,l=n.onOpenFileInSidebar?ge(a,{href:!0,workspaceRootPath:n.workspaceRootPath,fileBasePath:n.fileBasePath}):null;return!o&&l?Qo(e,l.path,l.displayPath,n,r):(0,T.jsx)(`a`,{href:s||o?c:`#`,className:o?`markdown-image-link`:void 0,onBlur:()=>{o&&n.onPreviewImage(null)},onClick:e=>{o?(e.preventDefault(),xs(o,n),n.onPreviewImage(null)):s&&n.onOpenBrowserLink?(e.preventDefault(),n.onOpenBrowserLink(c)):s||e.preventDefault()},onContextMenu:e=>{e.preventDefault(),n.onPreviewImage(null),n.onOpenLinkMenu(ws(c,a,e.clientX,e.clientY))},onFocus:e=>{o&&Ss(o,n,e.currentTarget)},onMouseEnter:e=>{o&&Ss(o,n,e.currentTarget)},onMouseLeave:()=>{o&&n.onPreviewImage(null)},rel:s?`noreferrer`:void 0,target:s?`_blank`:void 0,title:a,children:e},r)}function Xo(e,t,n,r){return(0,T.jsx)(Zo,{context:n,image:t,label:e},r)}function Zo({context:e,image:t,label:n}){let r=ke(e.connection,t.kind===`workspace`?t.appId:null,t.kind===`workspace`?t.path:null),i=Te(e.connection,t.kind===`local`?t.path:null),a=t.kind===`url`?t.src:t.kind===`local`?i:r,o=n.trim()||t.title;return(0,T.jsx)(`button`,{type:`button`,className:`markdown-inline-image ${a?`ready`:`loading`}`,onClick:()=>{t.kind===`url`?e.onOpenImage({src:t.src,title:o}):a?e.onOpenImage({src:a,title:o}):t.kind!==`local`&&e.onOpenWorkspaceImage({appId:t.appId,path:t.path,title:o})},title:o,children:a?(0,T.jsx)(`img`,{alt:o,decoding:`async`,loading:`lazy`,src:a}):(0,T.jsx)(`span`,{"aria-hidden":`true`})})}function Qo(e,t,n,r,i){let a=fs(t,n,r);return a?(0,T.jsx)(es,{context:r,displayPath:n,image:a,label:e,path:t},i):(0,T.jsx)($o,{context:r,displayPath:n,label:e,path:t},i)}function $o({context:e,displayPath:t,label:n,path:r}){return(0,T.jsx)(`a`,{href:`#`,className:`markdown-file-link`,onClick:t=>{t.preventDefault(),e.onOpenFileInSidebar?.(r)},onContextMenu:n=>{n.preventDefault(),e.onPreviewImage(null),e.onOpenLinkMenu(Ts(r,t,n.clientX,n.clientY))},title:r,children:n})}function es({context:e,displayPath:t,image:n,label:r,path:i}){let a=Ae(e.connection,n.kind===`workspace`?n.appId:null,n.kind===`workspace`?n.path:null),o=Ee(e.connection,n.kind===`local`?n.path:null),s=n.kind===`local`?o:a,c=n.kind===`url`?n.src:s.url,[l,u]=(0,w.useState)(null),d=!!(c&&l===c)||n.kind!==`url`&&s.status===`error`,f=n.title||t;return(0,T.jsxs)(`span`,{className:`markdown-file-image-reference`,children:[(0,T.jsx)($o,{context:e,displayPath:t,label:r,path:i}),(0,T.jsx)(`button`,{type:`button`,className:`markdown-file-image-preview ${d?`error`:c?`ready`:`loading`}`,onClick:()=>{if(d){if(e.onOpenFileInSidebar&&n.kind!==`url`){e.onOpenFileInSidebar(i);return}u(null),n.kind!==`url`&&s.retry()}else n.kind===`url`?e.onOpenImage({src:n.src,title:f}):c?e.onOpenImage({src:c,title:f}):n.kind!==`local`&&e.onOpenWorkspaceImage({appId:n.appId,path:n.path,title:f})},title:f,"aria-label":d?`Retry preview for ${f}`:`Preview ${f}`,children:d?(0,T.jsx)(`span`,{children:`Preview unavailable · Retry`}):c?(0,T.jsx)(`img`,{alt:f,decoding:`async`,loading:`lazy`,src:c,onError:()=>u(c)}):(0,T.jsx)(`span`,{children:`Loading preview…`})})]})}function ts(e,t){if(!e.startsWith(`![`,t))return null;let n=t+2,r=e.indexOf(`]`,n);if(r<n||e[r+1]!==`(`)return null;let i=rs(e,r+2);return i?{label:e.slice(n,r),href:i.href,end:i.end}:null}function ns(e,t){let n=e.indexOf(`]`,t+1);if(n<=t+1||e[n+1]!==`(`)return null;let r=rs(e,n+2);return r?{label:e.slice(t+1,n),href:r.href,end:r.end}:null}function rs(e,t){if(e[t]===`<`){let n=e.indexOf(`>`,t+1);return n<0||e[n+1]!==`)`?null:{href:e.slice(t+1,n),end:n+2}}let n=0;for(let r=t;r<e.length;r+=1){let i=e[r];if(i===`\\`)r+=1;else if(i===`(`)n+=1;else if(i===`)`){if(n===0)return{href:e.slice(t,r),end:r+1};--n}}return null}function is(e,t){let n=e[t]===`!`?t+1:t;if(!/^<img\b/i.test(e.slice(n)))return null;let r=e.indexOf(`>`,n+4);if(r<0)return null;let i=e.slice(n,r+1),a=ls(i,`src`);return a?{src:a,alt:ls(i,`alt`)??ls(i,`title`)??``,end:r+1}:null}function as(e,t){let n=e.slice(t,t+3);return n===`[ ]`?{checked:!1,end:t+3}:n===`[x]`||n===`[X]`?{checked:!0,end:t+3}:null}function os(e,t){let n=e.slice(t),r=/^<a\s+[^>]*href\s*=\s*(["'])(.*?)\1[^>]*>(.*?)<\/a>/i.exec(n);return r?{href:r[2]??``,label:cs(r[3]??``),end:t+r[0].length}:null}function ss(e,t){let n=e.indexOf(`>`,t+1);if(n<=t+1)return null;let r=e.slice(t+1,n).trim();return us(r)?{href:r,end:n+1}:null}function cs(e){return e.replace(/<[^>]+>/g,``).trim()||e}function ls(e,t){let n=RegExp(`\\s${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`,`i`).exec(e);return n?.[1]??n?.[2]??n?.[3]??null}function us(e){return/^(https?:\/\/|file:\/\/|(?:workspace|sandbox):file:|\/|\.{1,2}\/)/i.test(e)}function ds(e,t){let n=hs(e);if(!n)return null;if(/^https?:\/\//i.test(n))try{let e=new URL(n);return bs(e,t)||(ys(e,t.connection)?{kind:`url`,src:n,title:g(e.searchParams.get(`path`)??e.pathname)}:null)}catch{return null}let r=gs(ge(n,{href:!0,fileBasePath:t.fileBasePath})?.path??n),i=ps(r??n,t.workspaceRootPath);if(i)return{kind:`url`,src:i,title:g(r??n)};if(!r||!u(r)||!t.connection)return null;if(_s(r))return{kind:`local`,path:r,src:t.localImageUrls.getUrl(r),title:g(r)};if(!t.activeWorkspaceAppId)return null;let a=vs(r,t.workspaceRootPath);return!a||!u(a)?null:{kind:`workspace`,appId:t.activeWorkspaceAppId,path:a,src:t.workspaceImageUrls.getUrl(t.activeWorkspaceAppId,a),title:g(a)}}function fs(e,t,n){let r=ps(e,n.workspaceRootPath)??ps(t,n.workspaceRootPath);if(r)return{kind:`url`,src:r,title:g(t)};if(!u(e)||!n.connection)return null;if(_s(e))return{kind:`local`,path:e,src:n.localImageUrls.getUrl(e),title:g(e)};if(!n.activeWorkspaceAppId)return null;let i=vs(e,n.workspaceRootPath);return!i||!u(i)?null:{kind:`workspace`,appId:n.activeWorkspaceAppId,path:i,src:n.workspaceImageUrls.getUrl(n.activeWorkspaceAppId,i),title:g(i)}}function ps(e,n){let r=vs(e,n);if(!r?.startsWith(`apps/web/public/`))return null;let i=r.slice(16);return!i||!ms(i)?null:t(i.split(`/`).map(encodeURIComponent).join(`/`))}function ms(e){let t=e.split(`?`)[0]?.split(`#`)[0]??e,n=t.lastIndexOf(`.`);return n<0?!1:Wo.has(t.slice(n).toLowerCase())}function hs(e){return e.trim().replace(/^['"`]+|['"`]+$/g,``)}function gs(e){let t=e.trim();if(!t)return null;if(t.startsWith(`file://`))try{return decodeURIComponent(new URL(t).pathname)}catch{return t.replace(/^file:\/\//,``)}if(_s(t))return t;let n=t.indexOf(`#`);n>=0&&(t=t.slice(0,n));let r=t.indexOf(`?`);return r>=0&&(t=t.slice(0,r)),t}function _s(e){return/^file:\/\//i.test(e)||/^(?:\/|~\/)/.test(e)||/^[A-Za-z]:[\\/]/.test(e)}function vs(e,t){let n=e.trim().replace(/^['"`]+|['"`]+$/g,``);if(!n)return null;if(n.startsWith(`file://`))try{n=decodeURIComponent(new URL(n).pathname)}catch{n=n.replace(/^file:\/\//,``)}if(n=n.replace(/\\/g,`/`),_s(n)){let e=t?.trim().replace(/\\/g,`/`).replace(/\/+$/,``);if(!e||!n.startsWith(`${e}/`))return null;n=n.slice(e.length+1)}n=n.replace(/^\.\/+/,``);let r=n.split(`/`).filter(Boolean);return r.length===0||r.some(e=>e===`.`||e===`..`||e===`.git`)?null:r.join(`/`)}function ys(e,t){if(t){let n=new URL(t.serverUrl);if(e.origin===n.origin){if(e.pathname===`/v1/local-image`||/\/v1\/workspaces\/[^/]+\/file-image$/.test(e.pathname))return!1;if(e.pathname===`/v1/assets/workspace-image`||e.pathname===`/v1/assets/chat-attachment-image`)return!0}}if(u(e.pathname))return!0;let n=e.searchParams.get(`path`);return!!(n&&u(n))}function bs(e,t){if(!t.connection)return null;let n=new URL(t.connection.serverUrl);if(e.origin!==n.origin)return null;let r=e.pathname===`/v1/assets/workspace-image`?e.searchParams.get(`path`):null;if(r&&u(r))return{kind:`url`,src:e.toString(),title:g(r)};let i=e.pathname===`/v1/assets/chat-attachment-image`?e.searchParams.get(`storageName`):null;if(i&&u(i))return{kind:`url`,src:e.toString(),title:g(i)};let a=/^\/v1\/workspaces\/([^/]+)\/file-image$/.exec(e.pathname),o=a?e.searchParams.get(`path`):null;if(!a||!o||!u(o))return null;let s=decodeURIComponent(a[1]),c=vs(o,t.workspaceRootPath);return!c||!u(c)?null:{kind:`workspace`,appId:s,path:c,src:t.workspaceImageUrls.getUrl(s,c),title:g(c)}}function xs(e,t){e.kind===`url`?t.onOpenImage(e):e.kind===`local`?e.src?t.onOpenImage({src:e.src,title:e.title}):t.onOpenFileInSidebar?.(e.path):e.src?t.onOpenImage({src:e.src,title:e.title}):t.onOpenFileInSidebar?t.onOpenFileInSidebar(e.path):t.onOpenWorkspaceImage({appId:e.appId,path:e.path,title:e.title})}function Ss(e,t,n){if(e.kind===`url`)t.onPreviewImage(Cs(e,n));else if(e.kind===`local`){if(e.src){t.onPreviewImage(Cs({src:e.src,title:e.title},n));return}t.localImageUrls.loadUrl(e.path).then(r=>{r&&n.matches(`:hover`)&&t.onPreviewImage(Cs({src:r,title:e.title},n))})}else e.src?t.onPreviewImage(Cs({src:e.src,title:e.title},n)):t.workspaceImageUrls.loadUrl(e.appId,e.path).then(r=>{r&&n.matches(`:hover`)&&t.onPreviewImage(Cs({src:r,title:e.title},n))})}function Cs(e,t){let n=t.getBoundingClientRect(),r=Math.max(12,Math.min(n.left,window.innerWidth-236-12)),i=n.bottom+8,a=i+172<=window.innerHeight-12?i:Math.max(12,n.top-172-8);return{...e,x:r,y:a}}function ws(e,t,n,r){return{kind:`browser`,browserHref:e,displayHref:t,x:Math.max(8,Math.min(n,window.innerWidth-220-8)),y:Math.max(8,Math.min(r,window.innerHeight-142-8))}}function Ts(e,t,n,r){return{kind:`file`,path:e,displayPath:t,x:Math.max(8,Math.min(n,window.innerWidth-220-8)),y:Math.max(8,Math.min(r,window.innerHeight-72-8))}}async function Es(e){let t=e.trim();if(!t)return!1;let n=window.openpond?.files;if(!n)return!1;try{return(await n.reveal({path:t})).ok}catch{return!1}}async function Ds(e,t){let n=e.trim(),r=window.openpond?.files;if(!n||!r?.saveAs)return{ok:!1,canceled:!1,path:null};try{let e=await r.saveAs({path:n,suggestedName:t});return{ok:e.ok,canceled:e.canceled,path:e.path??null}}catch{return{ok:!1,canceled:!1,path:null}}}var Os={bash:`Bash`,css:`CSS`,html:`HTML`,javascript:`JavaScript`,js:`JavaScript`,json:`JSON`,jsx:`JSX`,markdown:`Markdown`,md:`Markdown`,python:`Python`,py:`Python`,sh:`Shell`,shell:`Shell`,sql:`SQL`,ts:`TypeScript`,tsx:`TSX`,typescript:`TypeScript`,yaml:`YAML`,yml:`YAML`},ks=(0,w.memo)(function({content:e,language:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(!1),o=As(t);return(0,w.useEffect)(()=>{if(!n)return;let e=window.setTimeout(()=>r(!1),1800);return()=>window.clearTimeout(e)},[n]),(0,T.jsxs)(`section`,{className:`markdown-code-block${i?` wrap-lines`:``}`,"aria-label":`${o} code block`,children:[(0,T.jsxs)(`header`,{className:`markdown-code-header`,children:[(0,T.jsxs)(`span`,{className:`markdown-code-language`,children:[(0,T.jsx)(x,{"aria-hidden":!0,size:15,strokeWidth:1.8}),(0,T.jsx)(`span`,{children:o})]}),(0,T.jsxs)(`span`,{className:`markdown-code-actions`,children:[(0,T.jsx)(`button`,{"aria-label":i?`Stop wrapping code`:`Wrap code`,"aria-pressed":i,className:`markdown-code-action`,title:i?`Stop wrapping`:`Wrap lines`,type:`button`,onClick:()=>a(e=>!e),children:(0,T.jsx)(re,{"aria-hidden":!0,size:15})}),(0,T.jsx)(`button`,{"aria-label":n?`Code copied`:`Copy code`,className:`markdown-code-action`,title:n?`Copied`:`Copy code`,type:`button`,onClick:()=>{ie(e).then(e=>{e&&r(!0)})},children:n?(0,T.jsx)(h,{"aria-hidden":!0,size:15}):(0,T.jsx)(s,{"aria-hidden":!0,size:15})})]})]}),(0,T.jsx)(`pre`,{className:`markdown-code-content`,children:(0,T.jsx)(`code`,{children:e})})]})});function As(e){let t=e?.trim().toLowerCase();return t?Os[t]??t.charAt(0).toUpperCase()+t.slice(1):`Code`}function js({activeWorkspaceAppId:e=null,connection:t=null,content:n,finalizedContent:r,mutableContent:i,onOpenBrowserLink:a,onOpenFileInSidebar:o,conversationLinks:s,onOpenConversation:c,workspaceRootPath:l=null}){let u=r!==void 0||i!==void 0,d=(0,w.useMemo)(()=>u?[]:Fe(n),[n,u]),f=(0,w.useMemo)(()=>u&&r?Fe(r):[],[r,u]),p=(0,w.useMemo)(()=>u&&i?Fe(i):[],[i,u]),m=(0,w.useMemo)(()=>u?[...f,...p]:d,[u,f,p,d]),[h,g]=(0,w.useState)(null),[_,v]=(0,w.useState)(null),[y,b]=(0,w.useState)(null),x=De(t),S=je(t),C=(0,w.useMemo)(()=>new Map(s?.flatMap(e=>[[e.conversationId,e],[`/tasks/${encodeURIComponent(e.conversationId)}`,e]])??[]),[s]),ee=(0,w.useCallback)(e=>{S.loadUrl(e.appId,e.path).then(t=>{t&&g({src:t,title:e.title})})},[S]),te=(0,w.useMemo)(()=>({conversationLinks:C,onOpenConversation:c,activeWorkspaceAppId:e,connection:t,onOpenBrowserLink:a,onOpenFileInSidebar:o,onOpenLinkMenu:b,onOpenImage:g,onOpenWorkspaceImage:ee,onPreviewImage:v,localImageUrls:x,workspaceImageUrls:S,workspaceRootPath:l}),[C,c,e,t,ee,x,a,o,S,l]);return(0,w.useEffect)(()=>{if(!y)return;let e=()=>b(null),t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`scroll`,e,!0)}},[y]),(0,T.jsxs)(`div`,{className:`markdown-message`,children:[(0,T.jsx)(Ms,{blocks:m,context:te,keyPrefix:`block`,workspaceRootPath:l}),_&&(0,T.jsx)(Is,{preview:_}),y&&(0,T.jsx)(Ls,{menu:y,onClose:()=>b(null),onOpenBrowserLink:a,onOpenFileInSidebar:o}),(0,T.jsx)(Pe,{open:!!h,src:h?.src??null,title:h?.title??``,onClose:()=>g(null)})]})}var Ms=(0,w.memo)(function({blocks:e,context:t,keyPrefix:n,workspaceRootPath:r}){return Ps(e,t,r,n)});function Ns(e,t){return t.type===`list`?e:`content`in t&&typeof t.content==`string`&&t.type!==`code`?Ce(t.content):null}function Ps(e,t,n,r=`block`){let i=t.fileBasePath??null;return e.map((e,a)=>{i=Ns(i,e);let o={...t,fileBasePath:i},s=`${r}-${a}`;if(e.type===`blockquote`)return(0,T.jsx)(`blockquote`,{className:`markdown-blockquote`,children:Ps(Fe(e.content),t,n,`${s}-quote`)},s);if(e.type===`code`){let t=Fs(e.content,n);return t?(0,T.jsx)(`div`,{className:`markdown-file-reference-block`,children:t.map((e,t)=>(0,T.jsx)(`div`,{className:`markdown-file-reference-line`,children:Ko(e,o)},t))},s):(0,T.jsx)(ks,{content:e.content,language:e.language},s)}if(e.type===`math`)return(0,T.jsx)(Uo,{display:!0,source:e.content},s);if(e.type===`list`){let t=e.items.map((t,n)=>(0,T.jsxs)(`li`,{className:t.checked===null?void 0:`markdown-task-list-item`,value:e.ordered?t.ordinal??void 0:void 0,children:[t.checked===null?null:(0,T.jsx)(Go,{checked:t.checked}),(0,T.jsx)(`span`,{children:Ko(t.content,o)})]},n));return e.ordered?(0,T.jsx)(`ol`,{className:`markdown-list`,start:e.start,children:t},s):(0,T.jsx)(`ul`,{className:`markdown-list`,children:t},s)}if(e.type===`heading`){let t=e.level===1?`h1`:e.level===2?`h2`:e.level===3?`h3`:`h4`;return(0,T.jsx)(t,{className:`markdown-heading`,children:Ko(e.content,o)},s)}return e.type===`table`?(0,T.jsx)(`div`,{className:`markdown-table-wrap`,children:(0,T.jsxs)(`table`,{className:`markdown-table`,children:[(0,T.jsx)(`thead`,{children:(0,T.jsx)(`tr`,{children:e.headers.map((e,t)=>(0,T.jsx)(`th`,{children:Ko(e,o)},t))})}),(0,T.jsx)(`tbody`,{children:e.rows.map((n,r)=>(0,T.jsx)(`tr`,{children:e.headers.map((e,r)=>(0,T.jsx)(`td`,{children:Ko(n[r]??``,t)},r))},r))})]})},s):(0,T.jsx)(`p`,{className:`markdown-paragraph`,children:Ko(e.content,o)},s)})}function Fs(e,t){let n=e.split(`
268
+ `),r=[];for(let e of n){let n=e.trim();if(!n)continue;let i=n.replace(/^(?:[-*]|\d+[.)])\s+/,``).trim().replace(/^`+|`+$/g,``).trim();if(!i||!ge(i,{workspaceRootPath:t}))return null;r.push(i)}return r.length>0?r:null}function Is({preview:e}){let[t,n]=(0,w.useState)(!1);return(0,w.useEffect)(()=>{n(!1)},[e.src]),(0,T.jsxs)(`div`,{className:`markdown-image-hover-preview ${t?`unavailable`:``}`,style:{left:e.x,top:e.y},children:[t?(0,T.jsx)(`span`,{children:`Preview unavailable`}):(0,T.jsx)(`img`,{alt:``,src:e.src,onError:()=>n(!0)}),(0,T.jsx)(`span`,{children:e.title})]})}function Ls({menu:e,onClose:t,onOpenBrowserLink:n,onOpenFileInSidebar:r}){return e.kind===`file`?(0,T.jsxs)(`div`,{className:`markdown-link-menu`,role:`menu`,style:{left:e.x,top:e.y},onClick:e=>e.stopPropagation(),children:[(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{r?.(e.path),t()},children:/[\\/]$/.test(e.path)?`Open folder`:ae(e.path)?`Open in browser`:`Open in sidebar`}),ae(e.path)&&(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{r?.(e.path,{source:!0}),t()},children:`View source`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{Es(e.path),t()},children:`Open externally`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{ie(e.displayPath),t()},children:`Copy path`})]}):(0,T.jsxs)(`div`,{className:`markdown-link-menu`,role:`menu`,style:{left:e.x,top:e.y},onClick:e=>e.stopPropagation(),children:[(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{n?n(e.browserHref):window.open(e.browserHref,`_blank`,`noopener,noreferrer`),t()},children:`Open in sidebar`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{n?n(e.browserHref,{newTab:!0}):window.open(e.browserHref,`_blank`,`noopener,noreferrer`),t()},children:`Open in new tab`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{window.open(e.browserHref,`_blank`,`noopener,noreferrer`),t()},children:`Open externally`}),(0,T.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{ie(e.displayHref),t()},children:`Copy link`})]})}function Rs(e){let t=e.replace(/\\/g,`/`);if(!/^(?:\/|[A-Za-z]:\/)/.test(t))return null;let n=t.lastIndexOf(`/`),r=n===2&&/^[A-Za-z]:/.test(t)?t.slice(0,3):t.slice(0,n)||`/`;return m(r)}async function zs(e){let t=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),n=await crypto.subtle.digest(`SHA-256`,t.buffer);return`sha256:${Array.from(new Uint8Array(n),e=>e.toString(16).padStart(2,`0`)).join(``)}`}var Bs=`
269
269
 
270
- [file truncated]`,Vs=`openpond.sandboxSourceReadback.v1`;async function Hs(e,t,n,r=[]){let i;try{i=await p.sandboxDownloadFile(e,t,n,{maxBytes:/\.(?:pdf|docx?|pptx)$/i.test(n)?20971520:d(n)?10485760:262144})}catch(i){let a=i instanceof Error?i.message:String(i);if(!Us(a))throw i;let o=Ks(r,t,n);if(o)return o;let s=!!qs(r,t)?.artifact,c=await p.sandbox(e,t).catch(()=>null);throw Error(Ws(n,c?.sandbox??null,a,{hasReadbackArtifact:s}))}let a=i.file.isBinary?i.file.contentsBase64||null:`${i.contents}${i.file.truncated?Bs:``}`;if(i.file.isBinary&&i.file.truncated)throw Error(`This file is too large to preview completely.`);return{path:i.file.path,readStamp:`${i.file.sizeBytes}:${i.file.updatedAt}`,readVersion:await zs(i.file.contentsBase64),status:``,additions:0,deletions:0,patch:``,content:a,...i.file.isBinary?{contentEncoding:`base64`}:{}}}function Us(e){return e.includes(`sandbox_not_ready`)&&e.includes(`placement_stale`)||e.includes(`sandbox_not_running`)}function Ws(e,t,n=`sandbox_not_ready:placement_stale`,r={}){let i=t?Zs(t):null,a=e||`this file`;if(r.hasReadbackArtifact)return`Sandbox file content is unavailable because the stopped runtime placement is stale. The latest source checkpoint has a saved readback artifact, but ${a} was not captured as text. Resume the sandbox to inspect it. ${n}`;if(!i)return`Sandbox file content is unavailable because the stopped runtime placement is stale. Resume the sandbox to inspect ${a}. ${n}`;let o=i.preservedSha?i.preservedSha.slice(0,12):null,s=i.sourceRef?` (${i.sourceRef})`:``;return`Sandbox file content is unavailable because the stopped runtime placement is stale. The latest source checkpoint is saved${o?` at ${o}`:``}${s}, but this Desktop app cannot read file bodies from preserved source refs yet. Resume the sandbox to inspect ${a}.`}function Gs(e,t){if(!t)return null;let n=qs(e,t);if(!n)return null;let r=Ys(n.artifact),i=new Map;for(let e of rc(r))i.set(e.path,e);for(let e of Xs(n.artifact)){let t=Js(n.artifact,e.path);t&&i.set(e.path,t)}let a=[...i.values()].sort((e,t)=>e.path.localeCompare(t.path)),o=[...new Set(a.map(e=>e.path))].sort((e,t)=>e.localeCompare(t));return{appId:t,repoPath:``,initialized:!0,dirty:!1,filesChanged:a.length,additions:a.reduce((e,t)=>e+t.additions,0),deletions:a.reduce((e,t)=>e+t.deletions,0),repoFiles:o,files:a,error:null,updatedAt:$s(Qs(n.artifact)?.createdAt)??n.event.timestamp}}function Ks(e,t,n){if(!t)return null;let r=qs(e,t);return r?Js(r.artifact,n):null}function qs(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(r?.name!==`workspace_action_result`)continue;let i=Qs(Qs(Qs(r.data)?.sourcePreservation)?.sourceReadbackArtifact);if(i&&i.schemaVersion===Vs&&i.sandboxId===t)return{artifact:i,event:r}}return null}function Js(e,t){let n=rc(Ys(e)).find(e=>e.path===t),r=Xs(e).find(e=>e.path===t);if(!n&&!r)return null;let i=typeof r?.content==`string`?`${r.content}${r.truncated?Bs:``}`:null;return{path:r?.path??n?.path??t,status:n?.status??`M`,additions:n?.additions??0,deletions:n?.deletions??0,patch:n?.patch??``,content:i}}function Ys(e){let t=Qs(e.patch);return typeof t?.text==`string`?t.text:``}function Xs(e){return(Array.isArray(e.files)?e.files:[]).map(e=>{let t=Qs(e),n=$s(t?.path);return n?{path:n,...typeof t?.content==`string`?{content:t.content}:{},...t?.truncated===!0?{truncated:!0}:{}}:null}).filter(e=>!!e)}function Zs(e){let t=Qs(e.metadata)??{},n=Qs(t.sourcePreservation)??Qs(t.sourcePreserve),r=Qs(t.sourceChangeDetection),i=$s(n?.preservedSha)??$s(r?.preservedSha)??null,a=$s(n?.sourceRef)??$s(r?.sourceRef)??(typeof e.repoRef==`string`?e.repoRef:null);return!i&&!a?null:{preservedSha:i,sourceRef:a}}function Qs(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:null}function $s(e){return typeof e==`string`&&e.trim()?e.trim():null}async function ec(e,t,n,r){let i=await p.sandboxUploadFile(e,t,{path:n,contents:r});return await p.preserveSandboxSource(e,t,{message:`Auto-preserve source after right sidebar save`}),{path:i.file.path,status:`M`,additions:0,deletions:0,patch:``,content:r}}function tc(e){return e.filter(e=>e.type===`file`).map(e=>e.path).sort((e,t)=>e.localeCompare(t))}function nc(e,t){let n=new Map;for(let t of rc(e?.diff??``))n.set(t.path,t);for(let e of ic(t?.porcelain??``))n.has(e.path)||n.set(e.path,e);return[...n.values()].sort((e,t)=>e.path.localeCompare(t.path))}function rc(e){let t=[],n=null,r=()=>{n&&=(t.push({path:n.path,status:n.status,additions:n.additions,deletions:n.deletions,patch:n.patchLines.join(`
270
+ [file truncated]`,Vs=`openpond.sandboxSourceReadback.v1`;async function Hs(e,t,n,r=[]){let i;try{i=await d.sandboxDownloadFile(e,t,n,{maxBytes:/\.(?:pdf|docx?|pptx)$/i.test(n)?20971520:u(n)?10485760:262144})}catch(i){let a=i instanceof Error?i.message:String(i);if(!Us(a))throw i;let o=Ks(r,t,n);if(o)return o;let s=!!qs(r,t)?.artifact,c=await d.sandbox(e,t).catch(()=>null);throw Error(Ws(n,c?.sandbox??null,a,{hasReadbackArtifact:s}))}let a=i.file.isBinary?i.file.contentsBase64||null:`${i.contents}${i.file.truncated?Bs:``}`;if(i.file.isBinary&&i.file.truncated)throw Error(`This file is too large to preview completely.`);return{path:i.file.path,readStamp:`${i.file.sizeBytes}:${i.file.updatedAt}`,readVersion:await zs(i.file.contentsBase64),status:``,additions:0,deletions:0,patch:``,content:a,...i.file.isBinary?{contentEncoding:`base64`}:{}}}function Us(e){return e.includes(`sandbox_not_ready`)&&e.includes(`placement_stale`)||e.includes(`sandbox_not_running`)}function Ws(e,t,n=`sandbox_not_ready:placement_stale`,r={}){let i=t?Zs(t):null,a=e||`this file`;if(r.hasReadbackArtifact)return`Sandbox file content is unavailable because the stopped runtime placement is stale. The latest source checkpoint has a saved readback artifact, but ${a} was not captured as text. Resume the sandbox to inspect it. ${n}`;if(!i)return`Sandbox file content is unavailable because the stopped runtime placement is stale. Resume the sandbox to inspect ${a}. ${n}`;let o=i.preservedSha?i.preservedSha.slice(0,12):null,s=i.sourceRef?` (${i.sourceRef})`:``;return`Sandbox file content is unavailable because the stopped runtime placement is stale. The latest source checkpoint is saved${o?` at ${o}`:``}${s}, but this Desktop app cannot read file bodies from preserved source refs yet. Resume the sandbox to inspect ${a}.`}function Gs(e,t){if(!t)return null;let n=qs(e,t);if(!n)return null;let r=Ys(n.artifact),i=new Map;for(let e of rc(r))i.set(e.path,e);for(let e of Xs(n.artifact)){let t=Js(n.artifact,e.path);t&&i.set(e.path,t)}let a=[...i.values()].sort((e,t)=>e.path.localeCompare(t.path)),o=[...new Set(a.map(e=>e.path))].sort((e,t)=>e.localeCompare(t));return{appId:t,repoPath:``,initialized:!0,dirty:!1,filesChanged:a.length,additions:a.reduce((e,t)=>e+t.additions,0),deletions:a.reduce((e,t)=>e+t.deletions,0),repoFiles:o,files:a,error:null,updatedAt:$s(Qs(n.artifact)?.createdAt)??n.event.timestamp}}function Ks(e,t,n){if(!t)return null;let r=qs(e,t);return r?Js(r.artifact,n):null}function qs(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(r?.name!==`workspace_action_result`)continue;let i=Qs(Qs(Qs(r.data)?.sourcePreservation)?.sourceReadbackArtifact);if(i&&i.schemaVersion===Vs&&i.sandboxId===t)return{artifact:i,event:r}}return null}function Js(e,t){let n=rc(Ys(e)).find(e=>e.path===t),r=Xs(e).find(e=>e.path===t);if(!n&&!r)return null;let i=typeof r?.content==`string`?`${r.content}${r.truncated?Bs:``}`:null;return{path:r?.path??n?.path??t,status:n?.status??`M`,additions:n?.additions??0,deletions:n?.deletions??0,patch:n?.patch??``,content:i}}function Ys(e){let t=Qs(e.patch);return typeof t?.text==`string`?t.text:``}function Xs(e){return(Array.isArray(e.files)?e.files:[]).map(e=>{let t=Qs(e),n=$s(t?.path);return n?{path:n,...typeof t?.content==`string`?{content:t.content}:{},...t?.truncated===!0?{truncated:!0}:{}}:null}).filter(e=>!!e)}function Zs(e){let t=Qs(e.metadata)??{},n=Qs(t.sourcePreservation)??Qs(t.sourcePreserve),r=Qs(t.sourceChangeDetection),i=$s(n?.preservedSha)??$s(r?.preservedSha)??null,a=$s(n?.sourceRef)??$s(r?.sourceRef)??(typeof e.repoRef==`string`?e.repoRef:null);return!i&&!a?null:{preservedSha:i,sourceRef:a}}function Qs(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:null}function $s(e){return typeof e==`string`&&e.trim()?e.trim():null}async function ec(e,t,n,r){let i=await d.sandboxUploadFile(e,t,{path:n,contents:r});return await d.preserveSandboxSource(e,t,{message:`Auto-preserve source after right sidebar save`}),{path:i.file.path,status:`M`,additions:0,deletions:0,patch:``,content:r}}function tc(e){return e.filter(e=>e.type===`file`).map(e=>e.path).sort((e,t)=>e.localeCompare(t))}function nc(e,t){let n=new Map;for(let t of rc(e?.diff??``))n.set(t.path,t);for(let e of ic(t?.porcelain??``))n.has(e.path)||n.set(e.path,e);return[...n.values()].sort((e,t)=>e.path.localeCompare(t.path))}function rc(e){let t=[],n=null,r=()=>{n&&=(t.push({path:n.path,status:n.status,additions:n.additions,deletions:n.deletions,patch:n.patchLines.join(`
271
271
  `),content:null}),null)};for(let t of e.split(`
272
272
  `))if(t.startsWith(`diff --git `))r(),n={path:oc(t)??`changed-file`,status:`M`,additions:0,deletions:0,patchLines:[t]};else if(n){if(n.patchLines.push(t),t.startsWith(`+++ `)){let e=sc(t.slice(4));e&&(n.path=e)}else if(t.startsWith(`--- `)){let e=sc(t.slice(4));e&&n.path===`changed-file`&&(n.path=e)}else t.startsWith(`new file mode `)&&(n.status=`A`),t.startsWith(`deleted file mode `)&&(n.status=`D`),t.startsWith(`rename to `)&&(n.status=`R`,n.path=t.slice(10).trim()||n.path),t.startsWith(`+`)&&!t.startsWith(`+++`)&&(n.additions+=1),t.startsWith(`-`)&&!t.startsWith(`---`)&&(n.deletions+=1)}return r(),t}function ic(e){let t=[];for(let n of e.split(`
273
273
  `)){if(!n.trim())continue;let e=ac(n);e&&t.push({path:e,status:n.slice(0,2).trim()||`M`,additions:0,deletions:0,patch:``,content:null})}return t}function ac(e){let t=e.slice(3).trim();return t?t.split(` -> `).pop()?.trim()||t:null}function oc(e){let t=/^diff --git a\/(.+) b\/(.+)$/.exec(e.trim());return t?.[2]??t?.[1]??null}function sc(e){let t=e.trim();return!t||t===`/dev/null`?null:t.startsWith(`a/`)||t.startsWith(`b/`)?t.slice(2):t}function cc(e){if(!e)return[];let t=new Map(e.plans.map(e=>[e.id,e]));return e.tasksets.map(n=>{let r=e.plans.filter(e=>e.tasksetId===n.id),i=new Set(r.map(e=>e.id)),a=e.jobs.filter(e=>i.has(e.planId)).sort(bc),o=a[0]??null,s=e.models.filter(e=>e.tasksetId===n.id&&e.status===`imported`).sort((e,t)=>t.importedAt.localeCompare(e.importedAt))[0]??null,c=o?t.get(o.planId)??null:r.sort(bc)[0]??null,l=uc(n);return{taskset:n,name:mc(n.name,l),primaryMethod:l,latestRunLabel:c?dc(n,c):s?`Imported adapter`:`Not started`,latestPlan:c,latestJob:o,localModel:s,runCount:a.length,status:o?hc(o.status):n.readiness?.ready?`Ready`:`Needs review`,updatedAt:o?.updatedAt??n.updatedAt}}).sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt))}function lc(e,t){if(!e)return[];let n=new Set(e.plans.filter(e=>e.tasksetId===t).map(e=>e.id));return e.jobs.filter(e=>n.has(e.planId)).sort(bc)}function uc(e){let t=e.metadata.trainingMethod;return typeof t==`string`&&t!==`none`?t:e.readiness?.recommendedMethod&&e.readiness.recommendedMethod!==`none`?e.readiness.recommendedMethod:e.capabilities.compatibleMethods.find(e=>![`none`,`retrieval`].includes(e))??`sft`}function dc(e,t){if(!t)return`Not started`;let n=t.recipe.method,r=e.readiness?.trainingPath;return n===`sft`&&r?.primaryMethod!==`sft`&&r?.bootstrap?.method===`sft`?`SFT bootstrap`:fc(n)}function fc(e){return e===`grpo`?`RFT`:e===`dpo`?`DPO`:e===`ppo`?`PPO`:e===`sft`?`SFT`:e?.toUpperCase()??`Review`}function pc(e){return e===`grpo`||e===`ppo`?`Reinforcement`:e===`dpo`?`Preference`:e===`sft`?`Supervised`:`Training`}function mc(e,t){return/\b(model|adapter)\s*$/i.test(e.trim())?e.trim():`${e.trim()} model`}function hc(e){return e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase())}function gc(e){return{export:`Export only`,openpond_managed:`OpenPond Managed`}[e]??e.replaceAll(`_`,` `).replace(/^./,e=>e.toUpperCase())}function _c(e){return e?new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(e)):`Not started`}function vc(e,t){if(!e)return`Not started`;let n=t?new Date(t).getTime():Date.now(),r=Math.max(0,Math.round((n-new Date(e).getTime())/1e3));if(r<60)return`${r}s`;let i=Math.floor(r/60);if(i<60)return`${i}m ${r%60}s`;let a=Math.floor(i/60);return a<24?`${a}h ${i%60}m`:`${Math.floor(a/24)}d ${a%24}h`}function yc(e,t,n){return t||([`succeeded`,`failed`,`cancelled`].includes(e)?n:null)}function bc(e,t){return t.createdAt.localeCompare(e.createdAt)}export{se as A,b as B,Ds as C,Te as D,ke as E,te as F,v as H,ee as I,C as L,ae as M,ie as N,ge as O,ne as P,S as R,Es as S,Pe as T,y as V,Gs as _,mc as a,Rs as b,yc as c,cc as d,dc as f,tc as g,nc as h,lc as i,oe as j,me as k,fc as l,Hs as m,_c as n,hc as o,Bs as p,vc as r,uc as s,gc as t,pc as u,ec as v,Le as w,js as x,zs as y,x as z};
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,i as n,o as r,r as i,s as a}from"./WorkspaceMonacoEditor-BrZs6-EW.js";import"./toggleHighContrast-BnYUBgZB.js";import{t as o}from"./workers-CjtQ2aBD.js";import{typescriptDefaults as s}from"./monaco.contribution-C7CAQIKF.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=o({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-CwbYC1F9.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(a.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;e<n;e++)r+=` `}if(r+=e.messageText,n++,e.next)for(let i of e.next)r+=u(i,t,n);return r}function d(e){return e?e.map(e=>e.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e?e.path.indexOf(`/lib.`)===0&&!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let t=r.parse(e),n=a.getModel(t);if(n)return n;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return a.createModel(this._libFiles[t.path.slice(1)],`typescript`,t);let i=s.getExtraLibs()[e];return i?a.createModel(i.content,`typescript`,t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,t,n,r){super(r),this._libFiles=e,this._defaults=t,this._selector=n,this._disposables=[],this._listener=Object.create(null);let i=e=>{if(e.getLanguageId()!==n)return;let t=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},r,i=e.onDidChangeContent(()=>{clearTimeout(r),r=window.setTimeout(t,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:n}=this._defaults.getDiagnosticsOptions();n&&(e.isAttachedToEditor()?t():a.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){i.dispose(),o.dispose(),clearTimeout(r)}},t()},o=e=>{a.setModelMarkers(e,this._selector,[]);let t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(a.onDidCreateModel(e=>i(e))),this._disposables.push(a.onWillDisposeModel(o)),this._disposables.push(a.onDidChangeModelLanguage(e=>{o(e.model),i(e.model)})),this._disposables.push({dispose(){for(let e of a.getModels())o(e)}});let s=()=>{for(let e of a.getModels())o(e),i(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),a.getModels().forEach(e=>i(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let n=[],{noSyntaxValidation:i,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();i||n.push(t.getSyntacticDiagnostics(e.uri.toString())),o||n.push(t.getSemanticDiagnostics(e.uri.toString())),s||n.push(t.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(n);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?r.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&a.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(e,t){let r=t.start||0,i=t.length||1,{lineNumber:a,column:o}=e.getPositionAt(r),{lineNumber:s,column:c}=e.getPositionAt(r+i),l=[];return t.reportsUnnecessary&&l.push(n.Unnecessary),t.reportsDeprecated&&l.push(n.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(t.messageText,`
1
+ import{a as e,c as t,i as n,o as r,r as i,s as a}from"./WorkspaceMonacoEditor-CC4sfOiU.js";import"./toggleHighContrast-ClsXu39R.js";import{t as o}from"./workers-DKvM2NdM.js";import{typescriptDefaults as s}from"./monaco.contribution-DxAV1oS5.js";var c=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||=(async()=>(this._worker=o({moduleId:`vs/language/typescript/tsWorker`,createWorker:()=>new Worker(new URL(`/assets/ts.worker-CwbYC1F9.js`,``+import.meta.url),{type:`module`}),label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(a.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))(),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},l={};l[`lib.d.ts`]=!0,l[`lib.decorators.d.ts`]=!0,l[`lib.decorators.legacy.d.ts`]=!0,l[`lib.dom.asynciterable.d.ts`]=!0,l[`lib.dom.d.ts`]=!0,l[`lib.dom.iterable.d.ts`]=!0,l[`lib.es2015.collection.d.ts`]=!0,l[`lib.es2015.core.d.ts`]=!0,l[`lib.es2015.d.ts`]=!0,l[`lib.es2015.generator.d.ts`]=!0,l[`lib.es2015.iterable.d.ts`]=!0,l[`lib.es2015.promise.d.ts`]=!0,l[`lib.es2015.proxy.d.ts`]=!0,l[`lib.es2015.reflect.d.ts`]=!0,l[`lib.es2015.symbol.d.ts`]=!0,l[`lib.es2015.symbol.wellknown.d.ts`]=!0,l[`lib.es2016.array.include.d.ts`]=!0,l[`lib.es2016.d.ts`]=!0,l[`lib.es2016.full.d.ts`]=!0,l[`lib.es2016.intl.d.ts`]=!0,l[`lib.es2017.arraybuffer.d.ts`]=!0,l[`lib.es2017.d.ts`]=!0,l[`lib.es2017.date.d.ts`]=!0,l[`lib.es2017.full.d.ts`]=!0,l[`lib.es2017.intl.d.ts`]=!0,l[`lib.es2017.object.d.ts`]=!0,l[`lib.es2017.sharedmemory.d.ts`]=!0,l[`lib.es2017.string.d.ts`]=!0,l[`lib.es2017.typedarrays.d.ts`]=!0,l[`lib.es2018.asyncgenerator.d.ts`]=!0,l[`lib.es2018.asynciterable.d.ts`]=!0,l[`lib.es2018.d.ts`]=!0,l[`lib.es2018.full.d.ts`]=!0,l[`lib.es2018.intl.d.ts`]=!0,l[`lib.es2018.promise.d.ts`]=!0,l[`lib.es2018.regexp.d.ts`]=!0,l[`lib.es2019.array.d.ts`]=!0,l[`lib.es2019.d.ts`]=!0,l[`lib.es2019.full.d.ts`]=!0,l[`lib.es2019.intl.d.ts`]=!0,l[`lib.es2019.object.d.ts`]=!0,l[`lib.es2019.string.d.ts`]=!0,l[`lib.es2019.symbol.d.ts`]=!0,l[`lib.es2020.bigint.d.ts`]=!0,l[`lib.es2020.d.ts`]=!0,l[`lib.es2020.date.d.ts`]=!0,l[`lib.es2020.full.d.ts`]=!0,l[`lib.es2020.intl.d.ts`]=!0,l[`lib.es2020.number.d.ts`]=!0,l[`lib.es2020.promise.d.ts`]=!0,l[`lib.es2020.sharedmemory.d.ts`]=!0,l[`lib.es2020.string.d.ts`]=!0,l[`lib.es2020.symbol.wellknown.d.ts`]=!0,l[`lib.es2021.d.ts`]=!0,l[`lib.es2021.full.d.ts`]=!0,l[`lib.es2021.intl.d.ts`]=!0,l[`lib.es2021.promise.d.ts`]=!0,l[`lib.es2021.string.d.ts`]=!0,l[`lib.es2021.weakref.d.ts`]=!0,l[`lib.es2022.array.d.ts`]=!0,l[`lib.es2022.d.ts`]=!0,l[`lib.es2022.error.d.ts`]=!0,l[`lib.es2022.full.d.ts`]=!0,l[`lib.es2022.intl.d.ts`]=!0,l[`lib.es2022.object.d.ts`]=!0,l[`lib.es2022.regexp.d.ts`]=!0,l[`lib.es2022.string.d.ts`]=!0,l[`lib.es2023.array.d.ts`]=!0,l[`lib.es2023.collection.d.ts`]=!0,l[`lib.es2023.d.ts`]=!0,l[`lib.es2023.full.d.ts`]=!0,l[`lib.es2023.intl.d.ts`]=!0,l[`lib.es2024.arraybuffer.d.ts`]=!0,l[`lib.es2024.collection.d.ts`]=!0,l[`lib.es2024.d.ts`]=!0,l[`lib.es2024.full.d.ts`]=!0,l[`lib.es2024.object.d.ts`]=!0,l[`lib.es2024.promise.d.ts`]=!0,l[`lib.es2024.regexp.d.ts`]=!0,l[`lib.es2024.sharedmemory.d.ts`]=!0,l[`lib.es2024.string.d.ts`]=!0,l[`lib.es5.d.ts`]=!0,l[`lib.es6.d.ts`]=!0,l[`lib.esnext.array.d.ts`]=!0,l[`lib.esnext.collection.d.ts`]=!0,l[`lib.esnext.d.ts`]=!0,l[`lib.esnext.decorators.d.ts`]=!0,l[`lib.esnext.disposable.d.ts`]=!0,l[`lib.esnext.error.d.ts`]=!0,l[`lib.esnext.float16.d.ts`]=!0,l[`lib.esnext.full.d.ts`]=!0,l[`lib.esnext.intl.d.ts`]=!0,l[`lib.esnext.iterator.d.ts`]=!0,l[`lib.esnext.promise.d.ts`]=!0,l[`lib.esnext.sharedmemory.d.ts`]=!0,l[`lib.scripthost.d.ts`]=!0,l[`lib.webworker.asynciterable.d.ts`]=!0,l[`lib.webworker.d.ts`]=!0,l[`lib.webworker.importscripts.d.ts`]=!0,l[`lib.webworker.iterable.d.ts`]=!0;function u(e,t,n=0){if(typeof e==`string`)return e;if(e===void 0)return``;let r=``;if(n){r+=t;for(let e=0;e<n;e++)r+=` `}if(r+=e.messageText,n++,e.next)for(let i of e.next)r+=u(i,t,n);return r}function d(e){return e?e.map(e=>e.text).join(``):``}var f=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:i,column:a}=n,{lineNumber:o,column:s}=r;return{startLineNumber:i,startColumn:a,endLineNumber:o,endColumn:s}}},p=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e?e.path.indexOf(`/lib.`)===0&&!!l[e.path.slice(1)]:!1}getOrCreateModel(e){let t=r.parse(e),n=a.getModel(t);if(n)return n;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return a.createModel(this._libFiles[t.path.slice(1)],`typescript`,t);let i=s.getExtraLibs()[e];return i?a.createModel(i.content,`typescript`,t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}),this._fetchLibFilesPromise}},m=class extends f{constructor(e,t,n,r){super(r),this._libFiles=e,this._defaults=t,this._selector=n,this._disposables=[],this._listener=Object.create(null);let i=e=>{if(e.getLanguageId()!==n)return;let t=()=>{let{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)},r,i=e.onDidChangeContent(()=>{clearTimeout(r),r=window.setTimeout(t,500)}),o=e.onDidChangeAttached(()=>{let{onlyVisible:n}=this._defaults.getDiagnosticsOptions();n&&(e.isAttachedToEditor()?t():a.setModelMarkers(e,this._selector,[]))});this._listener[e.uri.toString()]={dispose(){i.dispose(),o.dispose(),clearTimeout(r)}},t()},o=e=>{a.setModelMarkers(e,this._selector,[]);let t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(a.onDidCreateModel(e=>i(e))),this._disposables.push(a.onWillDisposeModel(o)),this._disposables.push(a.onDidChangeModelLanguage(e=>{o(e.model),i(e.model)})),this._disposables.push({dispose(){for(let e of a.getModels())o(e)}});let s=()=>{for(let e of a.getModels())o(e),i(e)};this._disposables.push(this._defaults.onDidChange(s)),this._disposables.push(this._defaults.onDidExtraLibsChange(s)),a.getModels().forEach(e=>i(e))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let n=[],{noSyntaxValidation:i,noSemanticValidation:o,noSuggestionDiagnostics:s}=this._defaults.getDiagnosticsOptions();i||n.push(t.getSyntacticDiagnostics(e.uri.toString())),o||n.push(t.getSemanticDiagnostics(e.uri.toString())),s||n.push(t.getSuggestionDiagnostics(e.uri.toString()));let c=await Promise.all(n);if(!c||e.isDisposed())return;let l=c.reduce((e,t)=>t.concat(e),[]).filter(e=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)===-1),u=l.map(e=>e.relatedInformation||[]).reduce((e,t)=>t.concat(e),[]).map(e=>e.file?r.parse(e.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&a.setModelMarkers(e,this._selector,l.map(t=>this._convertDiagnostics(e,t)))}_convertDiagnostics(e,t){let r=t.start||0,i=t.length||1,{lineNumber:a,column:o}=e.getPositionAt(r),{lineNumber:s,column:c}=e.getPositionAt(r+i),l=[];return t.reportsUnnecessary&&l.push(n.Unnecessary),t.reportsDeprecated&&l.push(n.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:a,startColumn:o,endLineNumber:s,endColumn:c,message:u(t.messageText,`
2
2
  `),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let n=[];return t.forEach(t=>{let r=e;if(t.file&&(r=this._libFiles.getOrCreateModel(t.file.fileName)),!r)return;let i=t.start||0,a=t.length||1,{lineNumber:o,column:s}=r.getPositionAt(i),{lineNumber:c,column:l}=r.getPositionAt(i+a);n.push({resource:r.uri,startLineNumber:o,startColumn:s,endLineNumber:c,endColumn:l,message:u(t.messageText,`
3
3
  `)})}),n}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return i.Error;case 3:return i.Info;case 0:return i.Warning;case 2:return i.Hint}return i.Info}},h=class n extends f{get triggerCharacters(){return[`.`]}async provideCompletionItems(r,i,a,o){let s=r.getWordUntilPosition(i),c=new e(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=r.uri,u=r.getOffsetAt(i),d=await this._worker(l);if(r.isDisposed())return;let f=await d.getCompletionsAtPosition(l.toString(),u);if(f&&!r.isDisposed())return{suggestions:f.entries.map(a=>{let o=c;if(a.replacementSpan){let t=r.getPositionAt(a.replacementSpan.start),n=r.getPositionAt(a.replacementSpan.start+a.replacementSpan.length);o=new e(t.lineNumber,t.column,n.lineNumber,n.column)}let s=[];return a.kindModifiers!==void 0&&a.kindModifiers.indexOf(`deprecated`)!==-1&&s.push(t.CompletionItemTag.Deprecated),{uri:l,position:i,offset:u,range:o,label:a.name,insertText:a.name,sortText:a.sortText,kind:n.convertKind(a.kind),tags:s}})}}async resolveCompletionItem(e,t){let r=e,i=r.uri,a=r.position,o=r.offset,s=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),o,r.label);return s?{uri:i,position:a,label:s.name,kind:n.convertKind(s.kind),detail:d(s.displayParts),documentation:{value:n.createDocumentationString(s)}}:r}static convertKind(e){switch(e){case C.primitiveType:case C.keyword:return t.CompletionItemKind.Keyword;case C.variable:case C.localVariable:return t.CompletionItemKind.Variable;case C.memberVariable:case C.memberGetAccessor:case C.memberSetAccessor:return t.CompletionItemKind.Field;case C.function:case C.memberFunction:case C.constructSignature:case C.callSignature:case C.indexSignature:return t.CompletionItemKind.Function;case C.enum:return t.CompletionItemKind.Enum;case C.module:return t.CompletionItemKind.Module;case C.class:return t.CompletionItemKind.Class;case C.interface:return t.CompletionItemKind.Interface;case C.warning:return t.CompletionItemKind.File}return t.CompletionItemKind.Property}static createDocumentationString(e){let t=d(e.documentation);if(e.tags)for(let n of e.tags)t+=`
4
4
 
@@ -0,0 +1 @@
1
+ import{t as e}from"./icons-Bk2b68aC.js";var t=e(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);export{t};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-LXNhSUEL.js";import{bn as n}from"./App-DmEA-Lia.js";var r=e(t(),1);function i({connection:e,onError:t,onPayload:i}){let[a,o]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1);async function l(r,a){if(e){o(!0),t(null);try{i(await n.switchOpenPondAccount(e,{handle:r,baseUrl:a??null}))}catch(e){t(e instanceof Error?e.message:String(e))}finally{o(!1)}}}async function u(r,a){if(!e)return!1;o(!0),t(null);try{return i(await n.removeOpenPondAccount(e,{handle:r,baseUrl:a??null})),!0}catch(e){return t(e instanceof Error?e.message:String(e)),!1}finally{o(!1)}}async function d(r){if(e&&r.apiKey.trim()){o(!0),t(null);try{let t=r.handle?.trim(),a=r.environment?.trim();i(await n.saveOpenPondAccount(e,{apiKey:r.apiKey.trim(),handle:t||void 0,baseUrl:r.baseUrl,apiBaseUrl:r.apiBaseUrl,environment:a||`custom`,setActive:!0}))}catch(e){throw t(e instanceof Error?e.message:String(e)),e}finally{o(!1)}}}async function f(){if(e){c(!0),t(null);try{i(await n.refreshOpenPondAccounts(e))}catch(e){t(e instanceof Error?e.message:String(e))}finally{c(!1)}}}return{refreshingAccounts:s,saving:a,refreshAccounts:f,removeAccount:u,saveAccount:d,switchAccount:l}}export{i as t};
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-B6XX_0h3.js";import{Tn as n}from"./App-CCuh99JW.js";var r=e(t(),1);function i({connection:e,onError:t,onPayload:i}){let[a,o]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1);async function l(r,a){if(e){o(!0),t(null);try{i(await n.switchOpenPondAccount(e,{handle:r,baseUrl:a??null}))}catch(e){t(e instanceof Error?e.message:String(e))}finally{o(!1)}}}async function u(r,a){if(!e)return!1;o(!0),t(null);try{return i(await n.removeOpenPondAccount(e,{handle:r,baseUrl:a??null})),!0}catch(e){return t(e instanceof Error?e.message:String(e)),!1}finally{o(!1)}}async function d(r){if(e&&r.apiKey.trim()){o(!0),t(null);try{let t=r.handle?.trim(),a=r.environment?.trim();i(await n.saveOpenPondAccount(e,{apiKey:r.apiKey.trim(),handle:t||void 0,baseUrl:r.baseUrl,apiBaseUrl:r.apiBaseUrl,environment:a||`custom`,setActive:!0}))}catch(e){throw t(e instanceof Error?e.message:String(e)),e}finally{o(!1)}}}async function f(){if(e){c(!0),t(null);try{i(await n.refreshOpenPondAccounts(e))}catch(e){t(e instanceof Error?e.message:String(e))}finally{c(!1)}}}return{refreshingAccounts:s,saving:a,refreshAccounts:f,removeAccount:u,saveAccount:d,switchAccount:l}}export{i as t};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,s as n}from"./index-LXNhSUEL.js";import{n as r}from"./api-client-Dgz-fOMl.js";var i=[{id:`openpond_chat`,name:`Pal`,icon:n},{id:`codex`,name:`Codex`,icon:`/agent-sources/codex.svg`,provider:`codex`},{id:`claude_code`,name:`Claude Code`,icon:`/agent-sources/claude-code.svg`,provider:`claude-code`},{id:`opencode`,name:`OpenCode`,icon:`/agent-sources/opencode.svg`,provider:`opencode`},{id:`grok_build`,name:`Grok Build`,icon:`/agent-sources/grok-build.svg`,provider:`grok-build`},{id:`hermes`,name:`Hermes`,icon:`/agent-sources/hermes.png`},{id:`pi`,name:`Pi`,icon:`/agent-sources/pi.svg`},{id:`openclaw`,name:`OpenClaw`,icon:`/agent-sources/openclaw.svg`},{id:`oh_my_pi`,name:`Oh My Pi`,icon:`/agent-sources/oh-my-pi.svg`}];function a(e,t){if(e.state===`disconnected`)return`Disconnected`;if(e.state===`paused`)return`Paused`;if(e.selectedConversations===0)return`Choose conversations to upload`;if(t.running&&e.run?.state===`running`)return`Importing conversations`;if(e.error||e.run?.state===`failed`)return`Needs attention`;let n=e.schedule;return n?.frequency===`hourly`?`Hourly`:n?.frequency===`cron`?`Cron: ${n.expression}`:n?.frequency===`daily`?`Daily at ${n.time}`:n?.frequency===`weekly`?`Weekly on ${[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`][n.day]} at ${n.time}`:`Manual imports`}var o=e(t(),1),s=new WeakMap;function c(e){let[t,n]=(0,o.useState)(null),[i,a]=(0,o.useState)(null),[c,l]=(0,o.useState)(!1),u=(0,o.useRef)(0),d=(0,o.useRef)(null),f=(0,o.useCallback)(async()=>{if(!e||d.current)return;let t=new AbortController;d.current=t;let i=u.current;l(!0);try{let o=await r(e,`/v1/native-history/collector`,{method:`POST`,body:JSON.stringify({command:`inventory`}),signal:t.signal});if(i!==u.current||t.signal.aborted)return;s.set(e,o),n({connection:e,value:o}),a(null)}catch(e){i===u.current&&!t.signal.aborted&&a(e instanceof Error?e.message:`Unable to read agent connections.`)}finally{d.current===t&&(d.current=null),i===u.current&&l(!1)}},[e]);return(0,o.useEffect)(()=>{u.current++,a(null),f();let e=window.setInterval(()=>{document.hidden||f()},1e4),t=()=>{f()};return window.addEventListener(`focus`,t),()=>{u.current++,d.current?.abort(),d.current=null,window.clearInterval(e),window.removeEventListener(`focus`,t)}},[f]),{inventory:t?.connection===e?t.value:e?s.get(e)??null:null,loading:c,error:i,refresh:f}}export{i as n,a as r,c as t};
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,s as n}from"./index-B6XX_0h3.js";import{n as r}from"./api-client-DJRVOFzS.js";var i=[{id:`openpond_chat`,name:`Pal`,icon:n},{id:`codex`,name:`Codex`,icon:`/agent-sources/codex.svg`,provider:`codex`},{id:`claude_code`,name:`Claude Code`,icon:`/agent-sources/claude-code.svg`,provider:`claude-code`},{id:`opencode`,name:`OpenCode`,icon:`/agent-sources/opencode.svg`,provider:`opencode`},{id:`grok_build`,name:`Grok Build`,icon:`/agent-sources/grok-build.svg`,provider:`grok-build`},{id:`hermes`,name:`Hermes`,icon:`/agent-sources/hermes.png`},{id:`pi`,name:`Pi`,icon:`/agent-sources/pi.svg`},{id:`openclaw`,name:`OpenClaw`,icon:`/agent-sources/openclaw.svg`},{id:`oh_my_pi`,name:`Oh My Pi`,icon:`/agent-sources/oh-my-pi.svg`}];function a(e,t){if(e.state===`disconnected`)return`Disconnected`;if(e.state===`paused`)return`Paused`;if(e.selectedConversations===0)return`Choose conversations to upload`;if(t.running&&e.run?.state===`running`)return`Importing conversations`;if(e.error||e.run?.state===`failed`)return`Needs attention`;let n=e.schedule;return n?.frequency===`hourly`?`Hourly`:n?.frequency===`cron`?`Cron: ${n.expression}`:n?.frequency===`daily`?`Daily at ${n.time}`:n?.frequency===`weekly`?`Weekly on ${[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`][n.day]} at ${n.time}`:`Manual imports`}var o=e(t(),1),s=new WeakMap;function c(e){let[t,n]=(0,o.useState)(null),[i,a]=(0,o.useState)(null),[c,l]=(0,o.useState)(!1),u=(0,o.useRef)(0),d=(0,o.useRef)(null),f=(0,o.useCallback)(async()=>{if(!e||d.current)return;let t=new AbortController;d.current=t;let i=u.current;l(!0);try{let o=await r(e,`/v1/native-history/collector`,{method:`POST`,body:JSON.stringify({command:`inventory`}),signal:t.signal});if(i!==u.current||t.signal.aborted)return;s.set(e,o),n({connection:e,value:o}),a(null)}catch(e){i===u.current&&!t.signal.aborted&&a(e instanceof Error?e.message:`Unable to read agent connections.`)}finally{d.current===t&&(d.current=null),i===u.current&&l(!1)}},[e]);return(0,o.useEffect)(()=>{u.current++,a(null),f();let e=window.setInterval(()=>{document.hidden||f()},1e4),t=()=>{f()};return window.addEventListener(`focus`,t),()=>{u.current++,d.current?.abort(),d.current=null,window.clearInterval(e),window.removeEventListener(`focus`,t)}},[f]),{inventory:t?.connection===e?t.value:e?s.get(e)??null:null,loading:c,error:i,refresh:f}}export{i as n,a as r,c as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-B6XX_0h3.js";import{P as n,d as r,m as i,n as a,p as o,t as s}from"./useQuery-D2MQ7e5U.js";import{C as c,a as l,d as u,m as d,p as f,r as p,v as m}from"./schemas-Brv9Vmnk.js";import{C as h,N as g,O as _,Q as v,R as y,ft as b,m as x,p as S,v as C}from"./training-DWfghwfZ.js";import{nt as w}from"./chunk-GCUWJUUM-Dy6oUNJ6.js";import{a as T,n as E}from"./chat-resources-Beh5lB36.js";import{t as D}from"./query-scope-BRpcgljO.js";import{It as O,Wt as k}from"./App-CCuh99JW.js";var A=class extends r{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:a,isRefetching:s,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=a&&u===`forward`,p=c&&u===`backward`,m=a&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:o(t,n.data),hasPreviousPage:i(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function j(e,t){return a(e,A,t)}var M=v,N=new Set([`training_result`,`managed_modification_result`,`engram_result`,`decision_result`,`alphaedit_result`,`neuron_training_result`]),P=d({kind:p([`dataset`,`experiment`,`model`,`training`,`training_result`,`managed_modification_result`,`engram_result`,`decision_result`,`alphaedit_result`,`neuron_training_result`]),id:m().trim().min(1).max(240),draft:x.optional(),storedDraft:u(!0).optional(),revision:f().int().positive().optional(),location:p([`local`,`cloud`]).default(`local`),teamId:m().min(1).max(240).optional(),apiOrigin:c().max(2e3).optional(),scopeId:m().min(1).max(240).optional(),sessionId:m().min(1).max(240).optional(),result:M.optional()}).strict().superRefine((e,t)=>{(N.has(e.kind)?!e.result||e.result.kind!==e.kind||e.location!==`cloud`||e.id!==(e.result.kind===`training_result`?e.result.jobId:e.result.executionId)||e.teamId!==e.result.owner.teamId||e.apiOrigin!==e.result.apiOrigin||e.draft||e.storedDraft||e.revision||e.scopeId||e.sessionId:e.result!==void 0)&&t.addIssue({code:`custom`,path:[`result`],message:`Retain the exact completed result in its original hosted account.`}),e.draft&&(e.kind!==`experiment`||e.id!==e.draft.id||e.location!==`local`||e.scopeId||e.sessionId||e.revision||e.teamId||e.apiOrigin||e.storedDraft)&&t.addIssue({code:`custom`,path:[`draft`],message:`An unsaved draft requires its own local experiment identity.`}),e.storedDraft&&(e.kind!==`experiment`||e.location!==`cloud`||!e.teamId||!e.apiOrigin||e.scopeId||e.sessionId||e.revision)&&t.addIssue({code:`custom`,path:[`storedDraft`],message:`A stored experiment requires its canonical account reference.`})}),F=d({target:P,label:m().max(500),detail:m().max(2e3)}).strict(),I=F.extend({draft:x.optional(),draftRevision:f().int().positive().optional(),storedDraft:S.optional(),resource:E.optional(),dataset:E.optional(),graders:l(E).optional(),training:T.optional(),results:l(M).max(1).optional(),trainingResult:b.optional(),managedModificationResult:g.optional(),engramResult:_.optional(),decisionResult:h.optional(),alphaEditResult:C.optional(),neuronTrainingResult:y.optional(),model:d({id:m(),name:m(),portableProjectId:m(),baseModel:m().nullable(),trainingDataset:d({id:m(),revision:f().int().positive(),name:m()}).nullable(),evaluationDataset:d({id:m(),revision:f().int().positive(),name:m()}).nullable()}).strict().optional()}).strict().superRefine((e,t)=>{let n=e.target.kind,r=e.target.result,i=n===`decision_result`?e.decisionResult:n===`alphaedit_result`?e.alphaEditResult:n===`neuron_training_result`?e.neuronTrainingResult:void 0,a=[e.trainingResult,e.managedModificationResult,e.engramResult,e.decisionResult,e.alphaEditResult,e.neuronTrainingResult].filter(e=>e!==void 0);if(!N.has(n)){(a.length||e.results!==void 0)&&t.addIssue({code:`custom`,message:`Retained results require their exact result selection.`});return}let o=e.results?.[0],s=()=>t.addIssue({code:`custom`,message:`The selected evidence differs from its exact completed result.`});if(!r||!o||w(o)!==w(r)||a.length!==1){s();return}if(r.kind===`training_result`){let t=e.trainingResult,i=t?.candidate,a=i?{artifact:i.artifact,checkpointId:i.checkpointId,composition:i.composition,parent:i.parent}:null;(n!==r.kind||!t||t.candidateState!==`retained`||!i||t.job.id!==r.jobId||t.teamId!==r.owner.teamId||t.job.modelProjectId!==r.modelProjectId||t.job.portableProjectId!==r.portableProjectId||t.job.submissionHash!==r.submissionHash||w(a)!==w(r.candidate)||!t.outputs.receipt||t.outputs.receipt.id!==r.executionReceipt.id||!t.outputs.outputs.some(e=>e.kind===`receipt`&&e.id===`${t.outputs.receipt.id}:output`&&e.contentHash===r.executionReceipt.contentHash))&&s();return}if(r.kind===`managed_modification_result`||r.kind===`engram_result`){let t=r.kind===`engram_result`?e.engramResult:e.managedModificationResult;(n!==r.kind||!t||t.phase!==`completed`||!t.result||t.id!==r.executionId||t.teamId!==r.owner.teamId||t.ownerUserId!==r.owner.actorId||t.projectId!==r.projectId||t.plan.inputHash!==r.inputHash||t.plan.runtimeHash!==r.runtimeHash||t.result.contentHash!==r.resultHash||r.kind===`managed_modification_result`&&(t.method!==r.method||!e.managedModificationResult)||r.kind===`engram_result`&&(!e.engramResult||w({id:e.engramResult.result?.artifact.id,contentHash:e.engramResult.result?.artifact.contentHash})!==w(r.artifact)))&&s();return}let c=i?.result;(!r||r.kind!==n||!o||a.length!==1||!i||!c||i.phase!==`completed`||i.id!==r.executionId||i.teamId!==r.owner.teamId||i.ownerUserId!==r.owner.actorId||i.projectId!==r.projectId||i.plan.inputHash!==r.inputHash||c.modelHash!==r.modelHash||c.runtimeHash!==r.runtimeHash||c.contentHash!==r.resultHash||w(o)!==w(r)||i.schemaVersion===`openpond.managedDecisionExecution.v1`&&(r.kind!==`decision_result`||i.mode!==r.mode)||w(c.artifact?{id:c.artifact.id,contentHash:c.artifact.contentHash}:null)!==w(r.artifact))&&t.addIssue({code:`custom`,message:`The selected evidence differs from its exact completed result.`})}),L=e(t(),1),R=(0,L.createContext)(null),z=(0,L.createContext)(`default`),B=`openpond-chat-context-selected`,V=new Map,H=new Set,U=new Map,W=new Set;function G(e,t){V.set(e,t);for(let e of W)e()}var K=e=>(W.add(e),()=>{W.delete(e)});function q(e,t,r){let i=(0,L.useContext)(z),a=(0,L.useContext)(R),o=`${e?D(e):`disconnected`}:${r??i}`,c=`${o}:${t??`new`}`,l=(0,L.useRef)(c);l.current=c;let u=n(),d=(0,L.useRef)(null),f=(0,L.useSyncExternalStore)(K,()=>V.get(c),()=>void 0),p=(0,L.useSyncExternalStore)(K,()=>H.has(c),()=>!1),m=(0,L.useSyncExternalStore)(K,()=>U.get(c)??null,()=>null),h=j({queryKey:[`chat-context-catalog`,`pages`,o,t],enabled:!!e,staleTime:3e4,initialPageParam:void 0,getNextPageParam:e=>e.nextDraftCursor??void 0,queryFn:async({signal:n,pageParam:r})=>{let i=await k(e,`dataset`,{action:`context_catalog`,payload:{...t?{sessionId:t}:{},...r?{draftCursor:r}:{}}},n);return{...i,options:F.array().parse(i.options)}}}),g={...h,data:(0,L.useMemo)(()=>h.data?{options:[...new Map(h.data.pages.flatMap(e=>e.options).map(e=>[w(e.target),e])).values()],warning:[...new Set(h.data.pages.map(e=>e.warning).filter(Boolean))].join(` `)||null}:void 0,[h.data])},_=s({queryKey:[`chat-context-selection`,c],enabled:!!(e&&t&&!p),refetchInterval:1e4,queryFn:async({signal:n})=>{let r=await k(e,`dataset`,{action:`context_selection`,payload:{sessionId:t}},n),i=r.selection?I.parse(r.selection):null,a=u.getQueryData([`chat-context-catalog`,`pages`,o,t]);return i?.target.scopeId&&a&&!a.pages.some(e=>e.options.some(e=>e.target.scopeId===i.target.scopeId))&&u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),i}}),v=t?_.data===void 0?f??null:_.data:f??null;(0,L.useEffect)(()=>{if(!e||!t)return;let n=e=>{e.detail?.sessionId===t&&u.invalidateQueries({queryKey:[`chat-context-selection`,c]})};return window.addEventListener(`openpond-resource-focus-changed`,n),()=>window.removeEventListener(`openpond-resource-focus-changed`,n)},[e,t,c,u]);let y=v?.training?v.training.location===`cloud`?{kind:`model`,id:v.training.job.modelProjectId,location:`cloud`,teamId:v.training.owner.teamId,apiOrigin:v.training.apiOrigin}:{kind:`model`,id:v.training.modelId,location:`local`}:v?.model?v.target:null,b=s({queryKey:[`chat-context-model-runs`,o,y],enabled:!!(e&&y),queryFn:async({signal:t})=>{let n=await k(e,`dataset`,{action:`context_runs`,payload:{target:y}},t);return{runs:F.array().parse(n.runs)}}}),S=(0,L.useCallback)(async(n,r)=>{if(!e)throw Error(`Connect before selecting experiment context.`);if(H.has(c))throw Error(`Wait for the current context selection to finish.`);let i=!1;if(await O(()=>{i=!0}),!i||l.current!==c)return!1;if(H.has(c))throw Error(`Wait for the current context selection to finish.`);H.add(c);for(let e of W)e();try{await u.cancelQueries({queryKey:[`chat-context-selection`,c]});let i=await k(e,`dataset`,{action:`context_select`,payload:{target:n,...r?.newExperiment?{newExperiment:!0}:{},...t?{sessionId:t}:{}}}),a=i.selection?I.parse(i.selection):null;return l.current===c&&(r?.newExperiment&&a?.draft?U.set(c,a.draft.id):U.delete(c),await u.cancelQueries({queryKey:[`chat-context-selection`,c]}),G(c,a),t&&u.setQueryData([`chat-context-selection`,c],a),r?.newExperiment&&u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}})),a&&window.dispatchEvent(new CustomEvent(B,{detail:{sessionId:t,scope:o,targetKey:JSON.stringify(a.target)}})),!0)}finally{H.delete(c);for(let e of W)e()}},[e,c,u,o,t]),C=(0,L.useCallback)(async(n,r,i)=>{if(!e||!a?.teamId)throw Error(`The originating account is unavailable.`);await u.cancelQueries({queryKey:[`chat-context-selection`,c]});let o=await k(e,`dataset`,{action:`context_select`,payload:{target:{kind:`training`,id:n,location:`cloud`,teamId:a.teamId,apiOrigin:r},...t?{sessionId:t,sourceDraftId:i}:{}}}),s=o.selection?I.parse(o.selection):null;l.current===c&&(U.delete(c),G(c,s),t&&u.setQueryData([`chat-context-selection`,c],s),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}})))},[e,a?.teamId,c,t,u]),T=(0,L.useCallback)(e=>{let n=V.get(c);if(n!==void 0){let t=U.get(c);t&&U.set(`${o}:${e}`,t),G(`${o}:${e}`,n),u.setQueryData([`chat-context-selection`,`${o}:${e}`],n)}t||(U.delete(c),G(c,null))},[c,o,u,t]),E=(0,L.useCallback)(async(n,r)=>{if(v?.draft?.hostedEvaluationForm)throw Error(`Open this saved evaluation in its hosted editor to preserve its native settings.`);let i=x.parse(n);if(!e||!v?.draft||v.draft.id!==i.id||!a?.teamId)throw Error(`Reopen the intended experiment in an OpenPond workspace before saving settings.`);if(H.has(c))throw Error(`Wait for the current experiment action to finish.`);H.add(c);for(let e of W)e();try{await u.cancelQueries({queryKey:[`chat-context-selection`,c]});async function n(n){let r=await k(e,`dataset`,{action:`context_save_draft`,payload:{...t?{sessionId:t}:{},target:n.target,update:n.update}});return{saved:I.parse(r.saved),currentSaved:I.parse(r.currentSaved),focused:r.selection?I.parse(r.selection):null}}let s=r===void 0?v.storedDraft??null:r,f=null;if(d.current?.key===c&&(f=await n(d.current),s=f.saved.storedDraft??null,d.current=null),l.current!==c)throw Error(`The active chat or account changed. The draft remains in Experiments.`);if((!f||!s||w(s.draft)!==w(i))&&(d.current={key:c,target:v.target,update:{schemaVersion:`openpond.experimentDraftSave.v1`,teamId:a.teamId,projectId:s?.projectId??null,operationId:`draft-save-${crypto.randomUUID()}`,expectedRevision:s?.revision??0,draft:i}},f=await n(d.current),d.current=null),!f.saved.storedDraft||w(f.saved.draft)!==w(i)||f.currentSaved.storedDraft?.contentHash!==f.saved.storedDraft.contentHash)throw Error(`This experiment changed elsewhere. Your edits are still here; reopen the saved draft to load its current settings.`);return l.current===c&&(await u.cancelQueries({queryKey:[`chat-context-selection`,c]}),G(c,f.focused),t&&u.setQueryData([`chat-context-selection`,c],f.focused),u.invalidateQueries({queryKey:[`chat-context-catalog`,`pages`,o,t]}),u.invalidateQueries({queryKey:[`unified-experiments`]}),t&&window.dispatchEvent(new CustomEvent(`openpond-resource-focus-changed`,{detail:{sessionId:t}}))),f.saved}finally{H.delete(c);for(let e of W)e()}},[e,v,a?.teamId,c,u,o,t]);return{associateTraining:C,selection:v,selecting:p,configureDraftId:m,closeDraftEditor:(0,L.useCallback)(()=>{U.delete(c);for(let e of W)e()},[c]),catalog:g,runs:b,select:S,saveDraft:E,selectionError:_.error,moveToSession:T,scope:o}}export{I as a,R as i,z as n,P as o,q as r,j as s,B as t};
@@ -1 +1 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-LXNhSUEL.js";import{bn as n}from"./App-DmEA-Lia.js";var r=e(t(),1),i=5e3;function a(e){let[t,a]=(0,r.useState)([]),[s,c]=(0,r.useState)(!1),[l,u]=(0,r.useState)(null),[d,f]=(0,r.useState)(()=>new Set);(0,r.useEffect)(()=>{if(!e){a([]),u(null),c(!1);return}let t=e,r=!1;async function s(e){if(!r){e&&c(!0);try{let e=await n.localAgentSchedules(t);if(r)return;a(e.schedules),u(null)}catch(e){r||u(o(e))}finally{!r&&e&&c(!1)}}}s(!0);let l=window.setInterval(()=>void s(!1),i);return()=>{r=!0,window.clearInterval(l)}},[e]);async function p(){if(e){c(!0);try{let t=await n.syncLocalAgentSchedules(e);a(t.schedules),u(null)}catch(e){u(o(e))}finally{c(!1)}}}async function m(t){if(e&&!d.has(t.id)){g(t.id,!0);try{await n.runLocalAgentSchedule(e,t.id);let r=await n.localAgentSchedules(e);a(r.schedules),u(null)}catch(e){u(o(e))}finally{g(t.id,!1)}}}async function h(t){if(e&&!d.has(t.id)){g(t.id,!0);try{await n.patchLocalAgentSchedule(e,t.id,{enabled:!t.enabled});let r=await n.localAgentSchedules(e);a(r.schedules),u(null)}catch(e){u(o(e))}finally{g(t.id,!1)}}}function g(e,t){f(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})}return{error:l,loading:s,pendingScheduleIds:d,refresh:p,run:m,schedules:t,toggle:h}}function o(e){return e instanceof Error?e.message:String(e)}export{a as t};
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t}from"./index-B6XX_0h3.js";import{Tn as n}from"./App-CCuh99JW.js";var r=e(t(),1),i=5e3;function a(e){let[t,a]=(0,r.useState)([]),[s,c]=(0,r.useState)(!1),[l,u]=(0,r.useState)(null),[d,f]=(0,r.useState)(()=>new Set);(0,r.useEffect)(()=>{if(!e){a([]),u(null),c(!1);return}let t=e,r=!1;async function s(e){if(!r){e&&c(!0);try{let e=await n.localAgentSchedules(t);if(r)return;a(e.schedules),u(null)}catch(e){r||u(o(e))}finally{!r&&e&&c(!1)}}}s(!0);let l=window.setInterval(()=>void s(!1),i);return()=>{r=!0,window.clearInterval(l)}},[e]);async function p(){if(e){c(!0);try{let t=await n.syncLocalAgentSchedules(e);a(t.schedules),u(null)}catch(e){u(o(e))}finally{c(!1)}}}async function m(t){if(e&&!d.has(t.id)){g(t.id,!0);try{await n.runLocalAgentSchedule(e,t.id);let r=await n.localAgentSchedules(e);a(r.schedules),u(null)}catch(e){u(o(e))}finally{g(t.id,!1)}}}async function h(t){if(e&&!d.has(t.id)){g(t.id,!0);try{await n.patchLocalAgentSchedule(e,t.id,{enabled:!t.enabled});let r=await n.localAgentSchedules(e);a(r.schedules),u(null)}catch(e){u(o(e))}finally{g(t.id,!1)}}}function g(e,t){f(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})}return{error:l,loading:s,pendingScheduleIds:d,refresh:p,run:m,schedules:t,toggle:h}}function o(e){return e instanceof Error?e.message:String(e)}export{a as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-B6XX_0h3.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let t=r.useContext(a);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},s=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(a.Provider,{value:e,children:t})),c={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},l=new class{#e=c;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function u(e){setTimeout(e,0)}var d=typeof window>`u`||`Deno`in globalThis;function f(){}function p(e,t){return typeof e==`function`?e(t):e}function m(e){return typeof e==`number`&&e>=0&&e!==1/0}function h(e,t){return Math.max(e+(t||0)-Date.now(),0)}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==y(o,t.options))return!1}else if(!x(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(a))return!1}else if(!x(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function y(e,t){return(t?.queryKeyHashFn||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function x(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!x(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!x(e[r],t[r]))return!1;return!0}return!1}var ee=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{l.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var O=Symbol();function k(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===O?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function A(e,t){return typeof e==`function`?e(...t):!!e}function ie(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var ae=()=>d,j=()=>ae(),M=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},N=new class extends M{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},oe=u;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=se(),F=new class extends M{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)!==`online`||F.isOnline()}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(f);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new L(t);g(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},p=()=>N.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),m=()=>I(e.networkMode)&&e.canRun(),h=e=>{c()||(r?.(),i=`resolved`,a(e))},g=e=>{c()||(r?.(),i=`rejected`,o(e))},_=()=>new Promise(t=>{r=e=>{(c()||p())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),v=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(h).catch(r=>{if(c())return;let i=e.retry??(j()?0:3),a=e.retryDelay??ce,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?g(r):(n++,e.onFail?.(n,r),te(o).then(()=>p()?void 0:_()).then(()=>{t?g(r):v()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?v():_().then(v),s)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m(this.gcTime)&&(this.#e=l.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(j()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(l.clearTimeout(this.#e),this.#e=void 0)}};function le(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ie(e,()=>t.signal,()=>n=!0)},u=k(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?V:B,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:B(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ue(e,t){return t?B(e,t)!=null:!1}function de(e,t){return!t||!e.getPreviousPageParam?!1:V(e,t)!=null}var fe=class extends z{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=W(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=W(this.options);e.data!==void 0&&(this.setState(U(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(f).catch(f):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>g(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>g(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!h(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=k(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?le(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...H(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...U(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function U(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function W(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var G=class extends M{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return C(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(f)),t}#h(e){return!j()&&g(this.options.enabled,this.#t)!==!1&&m(e)}#g(){this.#b();let e=g(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=h(this.#r.dataUpdatedAt,e)+1;this.#u=l.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=l.setInterval(()=>{(this.options.refetchIntervalInBackground||N.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(l.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(l.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&K(e,t),o=i&&J(e,n,t,r);(a||o)&&(l={...l,...H(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=D(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:Y(e,t),refetch:this.refetch,isEnabled:g(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),C(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();P.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function pe(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||g(t.retryOnMount,e)!==!1)}function K(e,t){return pe(e,t)||e.state.data!==void 0&&q(e,t,t.refetchOnMount)}function q(e,t,n){if(g(t.enabled,e)!==!1&&g(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y(e,t)}return!1}function J(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y(e,n)}function Y(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(g(t.staleTime,e))}var X=r.createContext(!1),Z=()=>r.useContext(X);X.Provider;function me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var he=r.createContext(me()),ge=()=>r.useContext(he),_e=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?A(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Q=e=>{r.useEffect(()=>{e.clearReset()},[e])},ve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||A(n,[e.error,r])),ye=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},be=(e,t)=>e?.suspense&&t.isPending,xe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $(e,t,n){let i=Z(),a=ge(),s=o(n),c=s.defaultQueryOptions(e),l=s.getQueryCache().get(c.queryHash),u=e.subscribed!==!1;c._optimisticResults=i?`isRestoring`:u?`optimistic`:void 0,ye(c),_e(c,a,l),Q(a);let[d]=r.useState(()=>new t(s,c)),p=d.getOptimisticResult(c),m=!i&&u;if(r.useSyncExternalStore(r.useCallback(e=>{let t=m?d.subscribe(P.batchCalls(e)):f;return d.updateResult(),t},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),r.useEffect(()=>{d.setOptions(c)},[c,d]),be(c,p))throw xe(c,d,a);if(ve({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw p.error;return c.notifyOnChangeProps?p:d.trackResult(p)}function Se(e,t){return $(e,G,t)}export{C as A,y as C,x as D,f as E,O as M,s as N,S as O,o as P,b as S,_ as T,F as _,be as a,M as b,Q as c,G as d,fe as f,R as g,z as h,xe as i,A as j,g as k,ge as l,de as m,$ as n,_e as o,ue as p,ye as r,ve as s,Se as t,Z as u,P as v,v as w,p as x,N as y};
@@ -0,0 +1 @@
1
+ import{t as e}from"./icons-Bk2b68aC.js";var t=e(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),n=e(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),r=e(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),i=e(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]);export{t as i,r as n,n as r,i as t};
@@ -0,0 +1 @@
1
+ import{S as e,a as t,c as n,d as r,g as i,m as a,p as o,r as s,v as c}from"./schemas-Brv9Vmnk.js";var l=a({id:c().trim().min(1).max(200),title:c().trim().min(1).max(240),sourceTaskId:c().trim().min(1).max(200),sourceTurnId:c().trim().min(1).max(200),revision:o().int().positive().default(1),createdAt:c().datetime()}),u=a({kind:s([`structural`,`visual`,`test`,`user_review`]),status:s([`passed`,`failed`,`not_run`]),label:c().trim().min(1).max(240),detail:c().trim().max(4e3).nullable().optional(),ref:c().trim().max(4096).nullable().optional()}),d=a({kind:r(`local`),path:c().trim().min(1).max(4096),deviceId:c().trim().min(1).max(200)}),f=a({kind:r(`managed`),fileId:c().trim().min(1).max(200),downloadPath:c().trim().min(1).max(4096)}),p=a({kind:r(`external`),provider:c().trim().min(1).max(120),resourceId:c().trim().min(1).max(500),url:c().url().nullable()}),m=l.extend({kind:r(`file`),contentType:c().trim().min(1).max(200),sizeBytes:o().int().nonnegative(),sha256:c().regex(/^[a-f0-9]{64}$/),location:n(`kind`,[d,f,p]),validation:t(u).max(32).default([])}),h=l.extend({kind:r(`source_change`),projectId:c().trim().min(1).max(200),ref:c().trim().min(1).max(500),url:c().url().nullable(),validation:t(u).max(32).default([])}),g=l.extend({kind:r(`deployment`),deploymentId:c().trim().min(1).max(200),url:c().url(),validation:t(u).max(32).default([])}),_=l.extend({kind:r(`external_resource`),provider:c().trim().min(1).max(120),resourceId:c().trim().min(1).max(500),url:c().url(),contentType:c().trim().min(1).max(200).nullable(),validation:t(u).max(32).default([])}),v=a({id:c().trim().min(1).max(191),label:c().trim().min(1).max(160).nullable(),description:c().trim().max(1e3).nullable(),inputSchema:i(c(),e()).nullable(),outputSchema:i(c(),e()).nullable(),schedulePolicy:i(c(),e()).nullable()}),y=a({base:c().trim().min(1).max(200),resources:i(c(),e()),modelPolicy:i(c(),e()).nullable(),setup:i(c(),e()).nullable()}),b=a({id:c().trim().min(1).max(200),kind:s([`sdk_validation`,`sdk_eval`]),status:s([`passed`,`failed`]),summary:c().trim().min(1).max(2e3),artifactPath:c().trim().min(1).max(4096),artifactSha256:c().regex(/^[a-f0-9]{64}$/)}),x=a({path:c().trim().min(1).max(4096),sizeBytes:o().int().nonnegative(),sha256:c().regex(/^[a-f0-9]{64}$/),contentsBase64:c()});a({schema:r(`openpond.agent-package.v1`),agentId:c().trim().min(1).max(191),versionId:c().trim().min(1).max(200),digest:c().regex(/^[a-f0-9]{64}$/),title:c().trim().min(1).max(240),source:a({files:t(x).min(1).max(1e3),totalSizeBytes:o().int().nonnegative()}),manifest:i(c(),e()),actions:t(v).min(1).max(256),runtimeRequirements:y,receipts:t(b).min(2).max(64)});var S=l.extend({kind:r(`agent_package`),agentId:c().trim().min(1).max(191),versionId:c().trim().min(1).max(200),digest:c().regex(/^[a-f0-9]{64}$/),packageFileId:c().trim().min(1).max(200),manifestFileId:c().trim().min(1).max(200),actions:t(v).min(1).max(256),runtimeRequirements:y,validationReceiptIds:t(c().trim().min(1).max(200)).min(1).max(32),evalReceiptIds:t(c().trim().min(1).max(200)).min(1).max(32),sourceFileCount:o().int().positive(),sourceSizeBytes:o().int().nonnegative(),location:n(`kind`,[d,f]),validation:t(u).max(32).default([])}),C=n(`kind`,[m,h,g,_,S]);a({outputs:t(m)});export{C as n,m as t};
@@ -1 +1 @@
1
- import{s as e}from"./WorkspaceMonacoEditor-BrZs6-EW.js";import"./toggleHighContrast-BnYUBgZB.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t};
1
+ import{s as e}from"./WorkspaceMonacoEditor-CC4sfOiU.js";import"./toggleHighContrast-ClsXu39R.js";function t(e,t){let n=globalThis.MonacoEnvironment;if(n?.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}var n=typeof self==`object`&&self.constructor&&self.constructor.name===`DedicatedWorkerGlobalScope`&&globalThis.workerttPolicy!==void 0?globalThis.workerttPolicy:t(`defaultWorkerFactory`,{createScriptURL:e=>e});function r(e){let t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker==`function`)return r.getWorker(`workerMain.js`,t);if(typeof r.getWorkerUrl==`function`){let e=r.getWorkerUrl(`workerMain.js`,t);return new Worker(n?n.createScriptURL(e):e,{name:t,type:`module`})}}if(e.createWorker)return e.createWorker();throw Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function i(t){let n=Promise.resolve(r({label:t.label??`monaco-editor-worker`,moduleId:t.moduleId,createWorker:t.createWorker})).then(e=>(e.postMessage(`ignore`),e.postMessage(t.createData),e));return e.createWebWorker({worker:n,host:t.host,keepIdleModels:t.keepIdleModels})}export{i as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./icons-Bk2b68aC.js";var t=e(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
@@ -1 +1 @@
1
- import{c as e}from"./WorkspaceMonacoEditor-BrZs6-EW.js";import"./toggleHighContrast-BnYUBgZB.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language};
1
+ import{c as e}from"./WorkspaceMonacoEditor-CC4sfOiU.js";import"./toggleHighContrast-ClsXu39R.js";var t={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},n={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{t as conf,n as language};
@@ -9,7 +9,7 @@
9
9
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
10
10
  <link rel="apple-touch-icon" href="/openpond-icon.png" />
11
11
  <title>OpenPond App</title>
12
- <script type="module" crossorigin src="/assets/index-LXNhSUEL.js"></script>
12
+ <script type="module" crossorigin src="/assets/index-B6XX_0h3.js"></script>
13
13
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dd_uD5pT.js">
14
14
  <link rel="stylesheet" crossorigin href="/assets/index-g7UqJhnX.css">
15
15
  </head>