openpond 0.2.42 → 0.2.44

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 (181) hide show
  1. package/dist/app-server.d.ts +4473 -653
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/actions-command-5IEZEP6W.js +2 -0
  4. package/dist/chunks/{app-layer-ETI5QXQ3.js → app-layer-7SPLENWD.js} +1 -1
  5. package/dist/chunks/app-server-runtime-NQ2BYPGK.js +2 -0
  6. package/dist/chunks/apps-XQ7PHJTD.js +2 -0
  7. package/dist/chunks/{chunk-NT2UKDF7.js → chunk-2CXJK2M3.js} +1 -1
  8. package/dist/chunks/{chunk-MOMDY22U.js → chunk-36RCXSEJ.js} +1 -1
  9. package/dist/chunks/chunk-3QC2DDQ5.js +2 -0
  10. package/dist/chunks/chunk-3XDFNA7W.js +2 -0
  11. package/dist/chunks/chunk-4S4WH65X.js +3 -0
  12. package/dist/chunks/chunk-4TMC5F2P.js +5 -0
  13. package/dist/chunks/{chunk-Z7VAZVC5.js → chunk-65QCNUGE.js} +283 -202
  14. package/dist/chunks/{chunk-JYM3O4G7.js → chunk-ANVOHBUV.js} +1 -1
  15. package/dist/chunks/chunk-ARJUNUH6.js +5 -0
  16. package/dist/chunks/{chunk-LRGLV6JX.js → chunk-B3O2GAQH.js} +1 -1
  17. package/dist/chunks/{chunk-BJSXEGWG.js → chunk-CEEZ7Y2J.js} +1 -1
  18. package/dist/chunks/{chunk-ZG7QX66E.js → chunk-CR6CDOKS.js} +8 -8
  19. package/dist/chunks/{chunk-AANEPCEZ.js → chunk-DZVVGU6K.js} +1 -1
  20. package/dist/chunks/chunk-HY2Q7EDK.js +4 -0
  21. package/dist/chunks/chunk-IT4AT6LB.js +42 -0
  22. package/dist/chunks/{chunk-VQG25QBJ.js → chunk-KPDWQCF6.js} +1 -1
  23. package/dist/chunks/chunk-KRC2S5QF.js +5 -0
  24. package/dist/chunks/{chunk-AT6XYNQ5.js → chunk-L6HCBIAU.js} +1 -1
  25. package/dist/chunks/chunk-LNEOLOK2.js +13 -0
  26. package/dist/chunks/chunk-NM2GYDPA.js +19 -0
  27. package/dist/chunks/{chunk-QZ4KTU65.js → chunk-OI2N2636.js} +1 -1
  28. package/dist/chunks/{chunk-6UGTLC7Z.js → chunk-OJVIH7J6.js} +1 -1
  29. package/dist/chunks/{chunk-TPMXLA5Y.js → chunk-OMM4ZO7E.js} +7 -7
  30. package/dist/chunks/{chunk-S2MLTFZF.js → chunk-OQPFFKU6.js} +1 -1
  31. package/dist/chunks/{chunk-VTWY3U4M.js → chunk-PEYA2Q7Q.js} +1 -1
  32. package/dist/chunks/{chunk-2VTXKZNK.js → chunk-QID62K65.js} +5 -5
  33. package/dist/chunks/{chunk-76YP4FDQ.js → chunk-RAWEO7SJ.js} +2 -2
  34. package/dist/chunks/{chunk-BAQ3DWH2.js → chunk-W5NQ2DI7.js} +12 -12
  35. package/dist/chunks/{chunk-ZLQQUZH7.js → chunk-X2B4MN6W.js} +1 -1
  36. package/dist/chunks/{chunk-EEJ3HL6O.js → chunk-YF6IDYTS.js} +1 -1
  37. package/dist/chunks/{chunk-R6YJY7F2.js → chunk-YOOPTMQK.js} +1 -1
  38. package/dist/chunks/{chunk-MJC26GOX.js → chunk-Z3D4C7BG.js} +6 -6
  39. package/dist/chunks/{chunk-QUNRWDVO.js → chunk-Z6ZR5O3J.js} +3 -3
  40. package/dist/chunks/{chunk-SUAT5DR4.js → chunk-ZEVARU6J.js} +5 -5
  41. package/dist/chunks/cli-OJU6NQSA.js +2 -0
  42. package/dist/chunks/{configuration-command-N2FD7DWB.js → configuration-command-LDPUCHVH.js} +1 -1
  43. package/dist/chunks/core-commands-UZL5RF2M.js +2 -0
  44. package/dist/chunks/datasets-42AZHVSV.js +13 -0
  45. package/dist/chunks/desktop-test-DI76HKS7.js +3 -0
  46. package/dist/chunks/dist-6YP37XI5.js +2 -0
  47. package/dist/chunks/experiments-Z3S35BYN.js +2 -0
  48. package/dist/chunks/{extension-7GYFAHRP.js → extension-JEUZZJ5X.js} +1 -1
  49. package/dist/chunks/{help-MD7Z72QS.js → help-4F4QGL4C.js} +1 -1
  50. package/dist/chunks/hosted-harness-runtime-VZNYNQ6T.js +2 -0
  51. package/dist/chunks/hosted-profile-compiler-JXLPR7SX.js +2 -0
  52. package/dist/chunks/{hosted-profile-evaluation-control-VV2NXFBE.js → hosted-profile-evaluation-control-Q54YXXIM.js} +1 -1
  53. package/dist/chunks/{hosted-profile-evaluation-inspection-XMPRKON6.js → hosted-profile-evaluation-inspection-7WESM3ZH.js} +1 -1
  54. package/dist/chunks/hosted-profile-evaluation-preparation-QP24PYBL.js +3 -0
  55. package/dist/chunks/opchat-UFWWVJL6.js +3 -0
  56. package/dist/chunks/organizations-SBBIOF6O.js +2 -0
  57. package/dist/chunks/{profile-BZDCYKGL.js → profile-ESULTWDN.js} +1 -1
  58. package/dist/chunks/project-agent-IBHUQ3JX.js +2 -0
  59. package/dist/chunks/sandbox-command-PAJAIMWM.js +2 -0
  60. package/dist/chunks/{sandbox-template-ZYXK4QCI.js → sandbox-template-7WHGNVM6.js} +1 -1
  61. package/dist/chunks/src-5MJSO3UD.js +326 -0
  62. package/dist/chunks/{src-5Z35O6L7.js → src-A3OVZOSV.js} +1 -1
  63. package/dist/chunks/{teams-bot-WXGP3PA6.js → teams-bot-YMCDLBGT.js} +1 -1
  64. package/dist/chunks/{workspaces-7WY3ZVQW.js → workspaces-ZZ7R5BUL.js} +1 -1
  65. package/dist/cli.js +1 -1
  66. package/dist/index.js +1 -1
  67. package/dist/profile/local-profile.d.ts +2 -0
  68. package/dist/web/assets/App-6AQXN2SM.js +226 -0
  69. package/dist/web/assets/{AppDialog-DMymIOcU.js → AppDialog-CV3ddujB.js} +1 -1
  70. package/dist/web/assets/AppTerminalPanel-dhbGOO_K.js +2 -0
  71. package/dist/web/assets/{AppsView-CUrRKOiz.js → AppsView-Bxa-9BF2.js} +1 -1
  72. package/dist/web/assets/{BrowserSidebar-C5psWtoF.js → BrowserSidebar-BLwL2FOG.js} +1 -1
  73. package/dist/web/assets/{CartesianChart-DVGs4fGn.js → CartesianChart-BOxN-Su1.js} +1 -1
  74. package/dist/web/assets/{CollaborationTabs-D6eqNw88.js → CollaborationTabs-DTmJvNJx.js} +1 -1
  75. package/dist/web/assets/{CommandMenu--GRjuf3j.js → CommandMenu-DggN2ygj.js} +1 -1
  76. package/dist/web/assets/{CommunityView-CHGceVA_.js → CommunityView-CuDrYOIf.js} +1 -1
  77. package/dist/web/assets/{ComposerCreateImproveStrip-D08PAaxI.js → ComposerCreateImproveStrip-BrduENlL.js} +1 -1
  78. package/dist/web/assets/{GetStartedView-BPZcWzsG.js → GetStartedView-Db1IEWzv.js} +1 -1
  79. package/dist/web/assets/HostedModelLearningReview-kofNdPAe.js +1 -0
  80. package/dist/web/assets/{HostedModelLearningSettings-BmEMKcoy.js → HostedModelLearningSettings-6ij3nwWD.js} +1 -1
  81. package/dist/web/assets/{LabModelVersionDetailPage-CX5pOLl2.js → LabModelVersionDetailPage-C7Maqcit.js} +1 -1
  82. package/dist/web/assets/{LabSkillSidebar-C4vAz_0b.js → LabSkillSidebar-Bz0U-Nmw.js} +1 -1
  83. package/dist/web/assets/LabsRoute-Ch1N-e2S.js +52 -0
  84. package/dist/web/assets/LabsRoute-Dw6-12kt.css +1 -0
  85. package/dist/web/assets/MainChatThread-BJbhZOvs.js +2 -0
  86. package/dist/web/assets/{MainPane-EwtIf5_E.js → MainPane-Cs2Kng_k.js} +4 -4
  87. package/dist/web/assets/{MarkdownText-Bj9uRWtM.js → MarkdownText-BhzHRq1J.js} +1 -1
  88. package/dist/web/assets/{NativeSkillSidebar-U7PHw5DO.js → NativeSkillSidebar-LU-PhEhW.js} +1 -1
  89. package/dist/web/assets/{NewExperienceSwitcher-DneuamYK.js → NewExperienceSwitcher-Bi_gpHLG.js} +1 -1
  90. package/dist/web/assets/{NewProjectDialog-CrpXYCYV.js → NewProjectDialog-B8pWvSkq.js} +1 -1
  91. package/dist/web/assets/{OutputsPage-C1SPqz45.js → OutputsPage-BkGI0kHp.js} +1 -1
  92. package/dist/web/assets/{ProjectsPage-CCW3mGQb.js → ProjectsPage-Ca8_iEWu.js} +1 -1
  93. package/dist/web/assets/{RightChatPanelStack-D7ECzLfp.js → RightChatPanelStack-DjEdxsq8.js} +1 -1
  94. package/dist/web/assets/{RightSidebarHomePanel-B-4r-yLc.js → RightSidebarHomePanel-6pygznxX.js} +1 -1
  95. package/dist/web/assets/{ScheduledWorkPage-XjmcT64Z.js → ScheduledWorkPage-BSiOxxAH.js} +1 -1
  96. package/dist/web/assets/{SettingsView-BEBpD7W0.js → SettingsView-1XN7KLBl.js} +3 -3
  97. package/dist/web/assets/{TeamChatView-n9GnPY4F.js → TeamChatView-BGLCPTen.js} +2 -2
  98. package/dist/web/assets/{TerminalOverlay-CNaaMo7W.js → TerminalOverlay-DHkS2cVJ.js} +1 -1
  99. package/dist/web/assets/{TrainingCreationPanel-CEEXMmC5.js → TrainingCreationPanel-Dneamjzh.js} +1 -1
  100. package/dist/web/assets/{TrainingDraftPanel-CwyoL_Dy.js → TrainingDraftPanel-Cfh59jLZ.js} +1 -1
  101. package/dist/web/assets/{UsageSettingsSection-BNjgosYd.js → UsageSettingsSection-C9l1KY-O.js} +1 -1
  102. package/dist/web/assets/{WorkSidebarPanel-BatJltaq.js → WorkSidebarPanel-CEnO-Txp.js} +1 -1
  103. package/dist/web/assets/{WorkspaceDiffPanel-Cbr7qcqm.js → WorkspaceDiffPanel-BiuQBflC.js} +3 -3
  104. package/dist/web/assets/{WorkspaceEnvironmentMenu-DYu-PXRv.js → WorkspaceEnvironmentMenu-Dr-E0c1j.js} +1 -1
  105. package/dist/web/assets/{WorkspaceGitDialogs-BoamHtgk.js → WorkspaceGitDialogs-mE3Og6Zo.js} +1 -1
  106. package/dist/web/assets/{WorkspaceMonacoEditor-yg83VXk5.js → WorkspaceMonacoEditor-DPZ0n0G9.js} +60 -60
  107. package/dist/web/assets/{arrow-up-right-CN9lcbsD.js → arrow-up-right-DU2KsZD-.js} +1 -1
  108. package/dist/web/assets/{clipboard-DfLDGpSz.js → clipboard-g2b4_k81.js} +1 -1
  109. package/dist/web/assets/{cloud-upload-hk4EBTu-.js → cloud-upload-P2bDOPsQ.js} +1 -1
  110. package/dist/web/assets/cssMode-CPbPVAUt.js +1 -0
  111. package/dist/web/assets/{folder-open-BmhusYOx.js → folder-open-BmsONNsr.js} +1 -1
  112. package/dist/web/assets/{folder-plus-Bedc_RqV.js → folder-plus-B18NgUxy.js} +1 -1
  113. package/dist/web/assets/{git-commit-horizontal-D2Zvz4i7.js → git-commit-horizontal-enxGCV_e.js} +1 -1
  114. package/dist/web/assets/htmlMode-DiV88uQv.js +1 -0
  115. package/dist/web/assets/index-B9VSiz_z.css +1 -0
  116. package/dist/web/assets/{index-CpTHPmvd.js → index-vfpCN9zy.js} +6 -6
  117. package/dist/web/assets/{info-CayXQYUk.js → info-DmuSBIYe.js} +1 -1
  118. package/dist/web/assets/{jsonMode-_Ywm0ZC4.js → jsonMode-BaeOjuKU.js} +4 -4
  119. package/dist/web/assets/{lspLanguageFeatures-Caw_TPYu.js → lspLanguageFeatures-D8To0CQA.js} +1 -1
  120. package/dist/web/assets/{minimize-2-sPQtjkx8.js → minimize-2-C2xnEzCe.js} +1 -1
  121. package/dist/web/assets/monaco.contribution-DbrACt99.js +2 -0
  122. package/dist/web/assets/{monaco.contribution-CngZuH1Z.js → monaco.contribution-DgTFvG2Q.js} +2 -2
  123. package/dist/web/assets/{monaco.contribution-DmEqb8O2.js → monaco.contribution-JW3MxX6k.js} +2 -2
  124. package/dist/web/assets/{monaco.contribution-Bqi-s2-g.js → monaco.contribution-bytkwn0O.js} +2 -2
  125. package/dist/web/assets/{monitor-BuaCDSIZ.js → monitor-mtHVW7gU.js} +1 -1
  126. package/dist/web/assets/{python-D6SoZF70.js → python-DAPe0Urm.js} +1 -1
  127. package/dist/web/assets/{refresh-cw-DmpWkVF6.js → refresh-cw-Dvm_Pq3U.js} +1 -1
  128. package/dist/web/assets/{save-Di43Sc13.js → save-B2eVAjW6.js} +1 -1
  129. package/dist/web/assets/{square-Cui64whj.js → square-16bX2k2i.js} +1 -1
  130. package/dist/web/assets/toggleHighContrast-BgpFWRpS.css +1 -0
  131. package/dist/web/assets/{toggleHighContrast-e8XiQRTr.js → toggleHighContrast-Ce0YhEQg.js} +1 -1
  132. package/dist/web/assets/{tsMode-Cvh0MpFm.js → tsMode-CnvMmHz6.js} +1 -1
  133. package/dist/web/assets/{upload-Dphgk6dy.js → upload-COPbAaD-.js} +1 -1
  134. package/dist/web/assets/{useLocalAgentSchedules-CDN8WQld.js → useLocalAgentSchedules-C-Wjm5HK.js} +1 -1
  135. package/dist/web/assets/{useSessionTurnCache-Bvcc_al6.js → useSessionTurnCache-BfVbncMB.js} +1 -1
  136. package/dist/web/assets/{wifi-off-CIWXrn3o.js → wifi-off-C9iLbCC-.js} +1 -1
  137. package/dist/web/assets/{workers-XU4YZxHD.js → workers-BXh_u8Fr.js} +1 -1
  138. package/dist/web/assets/{yaml-BZ0UGaZH.js → yaml-CRSr9x6_.js} +1 -1
  139. package/dist/web/index.html +5 -5
  140. package/docs/command-reference.md +8 -1
  141. package/package.json +4 -2
  142. package/dist/chunks/actions-command-6EMO4BIK.js +0 -2
  143. package/dist/chunks/app-server-runtime-CJ7SJTTF.js +0 -2
  144. package/dist/chunks/apps-LH5AJCUI.js +0 -2
  145. package/dist/chunks/chunk-2Z6H32OC.js +0 -2
  146. package/dist/chunks/chunk-3CKJETWW.js +0 -2
  147. package/dist/chunks/chunk-4F2Q4CFS.js +0 -4
  148. package/dist/chunks/chunk-ANCZVBMI.js +0 -42
  149. package/dist/chunks/chunk-AUOMUBLE.js +0 -3
  150. package/dist/chunks/chunk-GC4OCTP6.js +0 -2
  151. package/dist/chunks/chunk-KCENW4ME.js +0 -2
  152. package/dist/chunks/chunk-OUN6VQDO.js +0 -5
  153. package/dist/chunks/chunk-TPOW52DO.js +0 -13
  154. package/dist/chunks/chunk-VI3ZF54E.js +0 -5
  155. package/dist/chunks/chunk-XJAK6DDB.js +0 -5
  156. package/dist/chunks/chunk-ZQWXPDCB.js +0 -19
  157. package/dist/chunks/cli-FM3DESGO.js +0 -2
  158. package/dist/chunks/core-commands-D2MJ7QFZ.js +0 -2
  159. package/dist/chunks/datasets-UYIZCMNZ.js +0 -13
  160. package/dist/chunks/desktop-test-IWDHFDSZ.js +0 -3
  161. package/dist/chunks/dist-JPRXSUXC.js +0 -2
  162. package/dist/chunks/experiments-Q6TAHJV3.js +0 -2
  163. package/dist/chunks/hosted-harness-runtime-LMYM7PYZ.js +0 -2
  164. package/dist/chunks/hosted-profile-compiler-H2J5HFT3.js +0 -2
  165. package/dist/chunks/hosted-profile-evaluation-preparation-ZZ3MZJDR.js +0 -3
  166. package/dist/chunks/opchat-URWW53CK.js +0 -3
  167. package/dist/chunks/organizations-BPBJV7LZ.js +0 -2
  168. package/dist/chunks/project-agent-U6YNYPHS.js +0 -2
  169. package/dist/chunks/sandbox-command-TTLFWUXV.js +0 -2
  170. package/dist/chunks/src-NABQMSR3.js +0 -325
  171. package/dist/web/assets/App-BpYDvJ6x.js +0 -226
  172. package/dist/web/assets/AppTerminalPanel-CFsUD-di.js +0 -2
  173. package/dist/web/assets/HostedModelLearningReview-DiS-n3XW.js +0 -1
  174. package/dist/web/assets/LabsRoute-BL04wKhE.js +0 -52
  175. package/dist/web/assets/LabsRoute-Cq9XLVDP.css +0 -1
  176. package/dist/web/assets/MainChatThread-BSwHDALr.js +0 -2
  177. package/dist/web/assets/cssMode-DkhTpCaH.js +0 -1
  178. package/dist/web/assets/htmlMode-Bf3_KJ2b.js +0 -1
  179. package/dist/web/assets/index-DUIWDN8o.css +0 -1
  180. package/dist/web/assets/monaco.contribution-DKY5M77J.js +0 -2
  181. package/dist/web/assets/toggleHighContrast-B7NOMXDY.css +0 -1
@@ -1,4 +1,4 @@
1
- import{a as x,A as lt,C as E,I as fe,D as fa,b as Pe,g as Vw,M as V,c as U,d as bi,e as S,r as oe,f as pi,h as p,i as KL,j as we,R as J,S as G,k as ut,m as mi,n as ce,o as Q,p as D,q as M,K as He,s as A,t as T,u as qe,v as y,w as Y,O as Qi,x as Ve,P as H,y as Jg,z as Fd,B as Oi,F as Bw,G as xn,H as ag,J as an,L as Va,N as Gl,Q as et,U as ge,T as Uw,$ as F,V as re,W as se,X as ye,Y as X,Z as ze,_ as pa,a0 as k,a1 as Yf,a2 as zw,a3 as GL,a4 as Be,a5 as ZL,a6 as Wd,a7 as It,a8 as z,a9 as Is,aa as $,ab as Ps,ac as XL,ad as nt,ae as Qf,af as YL,ag as $w,ah as Re,ai as lg,aj as QL,ak as cv,al as hv,am as ie,an as JL,ao as Ke,ap as uv,aq as eD,ar as Ct,as as dg,at as Fn,au as Ko,av as ma,aw as Le,ax as tD,ay as pt,az as cg,aA as ht,aB as Go,aC as iD,aD as Wn,aE as ef,aF as Jf,aG as hg,aH as Qe,aI as gv,aJ as _a,aK as nD,aL as mt,aM as _i,aN as Ge,aO as ki,aP as sD,aQ as oD,aR as fv,aS as Hn,aT as jw,aU as Ut,aV as Gc,aW as rD,aX as aD,aY as Kb,aZ as $e,a_ as Ln,a$ as $t,b0 as ee,b1 as Cn,b2 as lD,b3 as nn,b4 as Ht,b5 as pv,b6 as Zl,b7 as va,b8 as qw,b9 as mv,ba as je,bb as q,bc as Hd,bd as Zo,be as tf,bf as Me,bg as ep,bh as Kw,bi as dD,bj as _v,bk as be,bl as vv,bm as ba,bn as ug,bo as cD,bp as Gw,bq as Xl,br as Xo,bs as Yl,bt as gg,bu as bv,bv as Cv,bw as ae,bx as Ci,by as hr,bz as hD,bA as Oc,bB as Sv,bC as uD,bD as Zc,bE as wv,bF as Ca,bG as Si,bH as Vn,bI as te,bJ as Sa,bK as Zw,bL as fg,bM as wa,bN as P,bO as K,bP as Ql,bQ as ve,bR as Jl,bS as Xc,bT as Ba,bU as tp,bV as Xw,bW as gD,bX as fD,bY as pD,bZ as Vd,b_ as Vt,b$ as xs,c0 as At,c1 as Ms,c2 as mD,c3 as _e,c4 as Fr,c5 as Gb,c6 as Bd,c7 as Yw,c8 as W,c9 as Wr,ca as _D,cb as ai,cc as ur,cd as Ji,ce as wi,cf as vD,cg as Qw,ch as Zb,ci as nf,cj as bD,ck as rt,cl as Jw,cm as CD,cn as ey,co as Ud,cp as SD,cq as Yc,cr as yv,cs as yi,ct as wD,cu as yD,cv as Ls,cw as Iv,cx as ID,cy as Xb,cz as Yb,cA as xD,cB as Hr,cC as ty,cD as LD,cE as DD,cF as Rn,cG as ED,cH as RD,cI as sn,cJ as xv,cK as Lv,cL as xt,cM as ks,cN as ed,cO as iy,cP as Zt,cQ as Ua,cR as za,cS as ND,cT as TD,cU as PD,cV as ny,cW as Ac,cX as Qb,cY as MD,cZ as Lt,c_ as Dv,c$ as sy,d0 as Ze,d1 as Ev,d2 as Rv,d3 as kD,d4 as OD,d5 as Jb,d6 as AD,d7 as zd,d8 as ip,d9 as Yo,da as We,db as Ds,dc as FD,dd as en,de as hi,df as Ft,dg as eC,dh as $a,di as Nn,dj as on,dk as WD,dl as Jt,dm as ya,dn as pg,dp as oy,dq as HD,dr as VD,ds as Nv,dt as BD,du as td,dv as UD,dw as zD,dx as Qc,dy as ry,dz as tC,dA as $D,dB as jD,dC as qD,dD as Tv,dE as ay,dF as ly,dG as dy,dH as cy,dI as KD,dJ as GD,dK as hy,dL as uy,dM as ZD,dN as mg,dO as XD,dP as YD,dQ as Te,dR as Pv,dS as Mv,dT as QD,dU as Zs,dV as iC,dW as JD,dX as e1,dY as t1,dZ as i1,d_ as n1,d$ as s1,e0 as o1,e1 as nC,e2 as gy,e3 as ft,e4 as sc,e5 as r1,e6 as kv,e7 as a1,e8 as l1,e9 as d1,ea as c1,eb as h1,ec as Ue,ed as vt,ee as u1,ef as Tn,eg as g1,eh as sC,ei as St,ej as _g,ek as ja,el as np,em as f1,en as p1,eo as oC,ep as sp,eq as m1,er as _1,es as v1,et as b1,eu as vg,ev as bg,ew as fy,ex as py,ey as C1,ez as rC,eA as S1,eB as qa,eC as w1,eD as gl,eE as Ov,eF as aC,eG as id,eH as Jc,eI as y1,eJ as I1,eK as my,eL as x1,eM as L1,eN as xl,eO as st,eP as Ll,eQ as Ia,eR as oc,eS as _y,eT as sf,eU as vy,eV as by,eW as D1,eX as E1,eY as Fc,eZ as Cy,e_ as R1,e$ as N1,f0 as T1,f1 as P1,f2 as Yr,f3 as of,f4 as M1,f5 as k1,f6 as O1,f7 as lC,f8 as dC,f9 as cC,fa as Fe,fb as A1,fc as F1,fd as Xi,fe as tn,ff as W1,fg as Qn,fh as H1,fi as Sy,fj as bt,fk as nd,fl as Dn,fm as V1,fn as B1,fo as U1,fp as z1,fq as op,fr as wy,fs as Bt,ft as Ye,fu as xa,fv as yy,fw as sd,fx as $1,fy as Vr,fz as Av,fA as j1,fB as q1,fC as K1,fD as G1,fE as Z1,fF as tl,fG as hC,fH as X1,fI as Y1,fJ as Q1,fK as J1,fL as En,fM as Iy,fN as eE,fO as od,fP as uC,fQ as tE,fR as iE,fS as nE,fT as xy,fU as sE,fV as oE,fW as Ly,fX as eh,fY as rE,fZ as gC,f_ as vn,f$ as fC,g0 as Qt,g1 as Ie,g2 as pC,g3 as Fv,g4 as aE,g5 as lE,g6 as dE,g7 as Cg,g8 as cE,g9 as rp,ga as Dy,gb as Ey,gc as hE,gd as uE,ge as gE,gf as fE,gg as pE,gh as mE,gi as _E,gj as vE,gk as Ry,gl as bE,gm as th,gn as Os,go as Ny,gp as CE,gq as Ty,gr as SE,gs as Py,gt as My,gu as wE,gv as mC,gw as ky,gx as _C,gy as yE,gz as rf,gA as vC,gB as IE,gC as xE,gD as LE,gE as Ka,gF as ap,gG as Ga,gH as Oy,gI as DE,gJ as Ay,gK as Fy,gL as EE,gM as Wy,gN as Hy,gO as Vy,gP as RE,gQ as gi,gR as NE,gS as eo,gT as Br,gU as rc,gV as By,gW as Uy,gX as TE,gY as PE,gZ as Sn,g_ as ME,g$ as bC,h0 as kE,h1 as zy,h2 as La,h3 as OE,h4 as AE,h5 as $y,h6 as FE,h7 as jy,h8 as CC,h9 as Dl,ha as WE,hb as Sg,hc as HE,hd as wg,he as yg,hf as Ig,hg as xg,hh as qy,hi as VE,hj as BE,hk as UE,hl as zE,hm as SC,hn as wC,ho as yC,hp as lp,hq as $E,hr as jE,hs as qE,ht as IC,hu as KE,hv as GE,hw as $d,hx as ZE,hy as XE,hz as Ky,hA as il,hB as YE,hC as QE,hD as Wc,hE as JE,hF as eR,hG as tR,hH as Wv,hI as Hv,hJ as iR,hK as nR,hL as sR,hM as oR,hN as Gy,hO as Lg,hP as rR,hQ as ih,hR as rs,hS as aR,hT as lR,hU as dR,hV as cR,hW as hR,hX as uR,hY as xC,hZ as Vv,h_ as dp,h$ as gR,i0 as fR,i1 as pR,i2 as mR,i3 as Bv,i4 as Zy,i5 as LC,i6 as DC,i7 as _R,i8 as vR,i9 as EC,ia as af,ib as bR,ic as CR,id as SR,ie as lf,ig as Xy,ih as Yy,ii as Qy,ij as Jy,ik as Pn,il as eI,im as Uv,io as RC,ip as wR,iq as tI,ir as yR,is as IR,it as Dg,iu as gr,iv as Eg,iw as jd,ix as xR,iy as Rg,iz as LR,iA as DR,iB as ER,iC as RR,iD as iI,iE as nl,iF as NR,iG as TR,iH as PR,iI as MR,iJ as qd,iK as kR,iL as nI,iM as sI,iN as oI,iO as cp,iP as OR,iQ as AR,iR as FR,iS as WR,iT as hp,iU as HR,iV as VR,iW as BR,iX as UR,iY as zR,iZ as $R,i_ as jR,i$ as qR,j0 as rI,j1 as KR,j2 as GR,j3 as ZR,j4 as NC,j5 as XR,j6 as YR}from"./WorkspaceMonacoEditor-yg83VXk5.js";class QR extends lt{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:x(85,"Toggle Collapse Unchanged Regions"),icon:U.map,toggled:E.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:E.has("isInDiffEditor"),menu:{when:E.has("isInDiffEditor"),id:V.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(fe),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class aI extends lt{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:x(86,"Toggle Show Moved Code Blocks"),precondition:E.has("isInDiffEditor")})}run(e,...t){const i=e.get(fe),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class lI extends lt{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:x(87,"Toggle Use Inline View When Space Is Limited"),precondition:E.has("isInDiffEditor")})}run(e,...t){const i=e.get(fe),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const Kd=x(88,"Diff Editor");class JR extends bi{constructor(){super({id:"diffEditor.switchSide",title:x(89,"Switch Side"),icon:U.arrowSwap,precondition:E.has("isInDiffEditor"),f1:!0,category:Kd})}runEditorCommand(e,t,i){const n=fr(e);if(n instanceof fa){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class e0 extends bi{constructor(){super({id:"diffEditor.exitCompareMove",title:x(90,"Exit Compare Move"),icon:U.close,precondition:S.comparingMovedCode,f1:!1,category:Kd,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=fr(e);n instanceof fa&&n.exitCompareMove()}}class t0 extends bi{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:x(91,"Collapse All Unchanged Regions"),icon:U.fold,precondition:E.has("isInDiffEditor"),f1:!0,category:Kd})}runEditorCommand(e,t,...i){const n=fr(e);n instanceof fa&&n.collapseAllUnchangedRegions()}}class i0 extends bi{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:x(92,"Show All Unchanged Regions"),icon:U.unfold,precondition:E.has("isInDiffEditor"),f1:!0,category:Kd})}runEditorCommand(e,t,...i){const n=fr(e);n instanceof fa&&n.showAllUnchangedRegions()}}class up extends lt{constructor(){super({id:"diffEditor.revert",title:x(93,"Revert"),f1:!0,category:Kd,precondition:E.has("isInDiffEditor")})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){const t=fr(e);t instanceof fa&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){const i=n0(e,t.originalUri,t.modifiedUri);i instanceof fa&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const dI=x(94,"Accessible Diff Viewer"),mu=class mu extends lt{constructor(){super({id:mu.id,title:x(95,"Go to Next Difference"),category:dI,precondition:E.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){fr(e)?.accessibleDiffViewerNext()}};mu.id="editor.action.accessibleDiffViewer.next";let rd=mu;const _u=class _u extends lt{constructor(){super({id:_u.id,title:x(96,"Go to Previous Difference"),category:dI,precondition:E.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){fr(e)?.accessibleDiffViewerPrev()}};_u.id="editor.action.accessibleDiffViewer.prev";let nh=_u;function n0(a,e,t){return a.get(Pe).listDiffEditors().find(s=>{const o=s.getModifiedEditor(),r=s.getOriginalEditor();return o&&o.getModel()?.uri.toString()===t.toString()&&r&&r.getModel()?.uri.toString()===e.toString()})||null}function fr(a){const t=a.get(Pe).listDiffEditors(),i=Vw();if(i){for(const n of t)if(n.getContainerDomNode().contains(i))return n}return null}oe(QR);oe(aI);oe(lI);pi.appendMenuItem(V.EditorTitle,{command:{id:new lI().desc.id,title:p(119,"Use Inline View When Space Is Limited"),toggled:E.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:E.has("isInDiffEditor")},order:11,group:"1_diff",when:E.and(S.diffEditorRenderSideBySideInlineBreakpointReached,E.has("isInDiffEditor"))});pi.appendMenuItem(V.EditorTitle,{command:{id:new aI().desc.id,title:p(120,"Show Moved Code Blocks"),icon:U.move,toggled:KL.create("config.diffEditor.experimental.showMoves",!0),precondition:E.has("isInDiffEditor")},order:10,group:"1_diff",when:E.has("isInDiffEditor")});oe(up);for(const a of[{icon:U.arrowRight,key:S.diffEditorInlineMode.toNegated()},{icon:U.discard,key:S.diffEditorInlineMode}])pi.appendMenuItem(V.DiffEditorHunkToolbar,{command:{id:new up().desc.id,title:p(121,"Revert Block"),icon:a.icon},when:E.and(S.diffEditorModifiedWritable,a.key),order:5,group:"primary"}),pi.appendMenuItem(V.DiffEditorSelectionToolbar,{command:{id:new up().desc.id,title:p(122,"Revert Selection"),icon:a.icon},when:E.and(S.diffEditorModifiedWritable,a.key),order:5,group:"primary"});oe(JR);oe(e0);oe(t0);oe(i0);pi.appendMenuItem(V.EditorTitle,{command:{id:rd.id,title:p(123,"Open Accessible Diff Viewer"),precondition:E.has("isInDiffEditor")},order:10,group:"2_diff",when:E.and(S.accessibleDiffViewerVisible.negate(),E.has("isInDiffEditor"))});we.registerCommandAlias("editor.action.diffReview.next",rd.id);oe(rd);we.registerCommandAlias("editor.action.diffReview.prev",nh.id);oe(nh);var s0=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},o0=function(a,e){return function(t,i){e(t,i,a)}},gp;const Ng=new J("selectionAnchorSet",!1);var ro;let Es=(ro=class{static get(e){return e.getContribution(gp.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Ng.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(G.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new ut().appendText(p(798,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),mi(p(799,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(G.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},gp=ro,ro.ID="editor.contrib.selectionAnchorController",ro);Es=gp=s0([o0(1,ce)],Es);class r0 extends M{constructor(){super({id:"editor.action.setSelectionAnchor",label:x(800,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:He(2089,2080),weight:100}})}async run(e,t){Es.get(t)?.setSelectionAnchor()}}class a0 extends M{constructor(){super({id:"editor.action.goToSelectionAnchor",label:x(801,"Go to Selection Anchor"),precondition:Ng})}async run(e,t){Es.get(t)?.goToSelectionAnchor()}}class l0 extends M{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:x(802,"Select from Anchor to Cursor"),precondition:Ng,kbOpts:{kbExpr:S.editorTextFocus,primary:He(2089,2089),weight:100}})}async run(e,t){Es.get(t)?.selectFromAnchorToCursor()}}class d0 extends M{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:x(803,"Cancel Selection Anchor"),precondition:Ng,kbOpts:{kbExpr:S.editorTextFocus,primary:9,weight:100}})}async run(e,t){Es.get(t)?.cancelSelectionAnchor()}}Q(Es.ID,Es,4);D(r0);D(a0);D(l0);D(d0);const c0=A("editorOverviewRuler.bracketMatchForeground","#A0A0A0",p(804,"Overview ruler marker color for matching brackets."));class h0 extends M{constructor(){super({id:"editor.action.jumpToBracket",label:x(806,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:3165,weight:100}})}run(e,t){Qo.get(t)?.jumpToBracket()}}class u0 extends M{constructor(){super({id:"editor.action.selectToBracket",label:x(807,"Select to Bracket"),precondition:void 0,metadata:{description:x(808,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let n=!0;i&&i.selectBrackets===!1&&(n=!1),Qo.get(t)?.selectToBracket(n)}}class g0 extends M{constructor(){super({id:"editor.action.removeBrackets",label:x(809,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){Qo.get(t)?.removeBrackets(this.id)}}class f0{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}const Kn=class Kn extends T{static get(e){return e.getContribution(Kn.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new qe(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let o=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?o=s[1].getStartPosition():s[1].containsPosition(n)&&(o=s[0].getStartPosition());else{const r=e.bracketPairs.findEnclosingBrackets(n);if(r)o=r[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(o=l.range.getStartPosition())}}return o?new G(o.lineNumber,o.column,o.lineNumber,o.column):new G(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let o=t.bracketPairs.matchBracket(s);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(s),!o)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(o=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let r=null,l=null;if(o){o.sort(y.compareRangesUsingStarts);const[d,c]=o;if(r=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=r;r=l,l=h}}r&&l&&i.push(new G(r.lineNumber,r.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let o=0;for(let h=0,u=e.length;h<u;h++){const g=e[h];g.isEmpty()&&(s[o++]=g.getStartPosition())}s.length>1&&s.sort(H.compare);const r=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const g=s[h];for(;d<c&&n[d].position.isBefore(g);)d++;if(d<c&&n[d].position.equals(g))r[l++]=n[d];else{let f=t.bracketPairs.matchBracket(g,20),m=Kn._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!f&&this._matchBrackets==="always"&&(f=t.bracketPairs.findEnclosingBrackets(g,20),m=Kn._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),r[l++]=new f0(g,f,m)}}this._lastBracketsData=r,this._lastVersionId=i}};Kn.ID="editor.contrib.bracketMatchingController",Kn._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Y.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Ve(c0),position:Qi.Center}}),Kn._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Y.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let Qo=Kn;Q(Qo.ID,Qo,1);D(u0);D(h0);D(g0);pi.appendMenuItem(V.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p(805,"Go to &&Bracket")},order:2});class p0{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const o=new y(i,n-1,i,n),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new y(i,s,i,s),r)}else{const o=new y(i,s,i,s+1),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new y(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new G(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new G(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class cI extends M{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new p0(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class m0 extends cI{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:x(810,"Move Selected Text Left"),precondition:S.writable})}}class _0 extends cI{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:x(811,"Move Selected Text Right"),precondition:S.writable})}}D(m0);D(_0);class v0 extends M{constructor(){super({id:"editor.action.transposeLetters",label:x(812,"Transpose Letters"),precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const o of s){if(!o.isEmpty())continue;const r=o.startLineNumber,l=o.startColumn,d=i.getLineMaxColumn(r);if(r===1&&(l===1||l===2&&d===2))continue;const c=l===d?o.getPosition():Jg.rightPosition(i,o.getPosition().lineNumber,o.getPosition().column),h=Jg.leftPosition(i,c),u=Jg.leftPosition(i,h),g=i.getValueInRange(y.fromPositions(u,h)),f=i.getValueInRange(y.fromPositions(h,c)),m=y.fromPositions(u,c);n.push(new Fd(m,f+g))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}D(v0);const b0=Oi("productService");function zv(a,e){return{id:e,asString:async()=>a,asFile:()=>{},value:typeof a=="string"?a:void 0}}function C0(a,e,t,i){const n={id:ag(),name:a,uri:e,data:t};return{id:i,asString:async()=>"",asFile:()=>n,value:void 0}}class hI{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return xn.some(this,([i,n])=>n.asFile())&&t.push("files"),uI(sh(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return sh(e)}}function sh(a){return a.toLowerCase()}function TC(a,e){return uI(sh(a),e.map(sh))}function uI(a,e){if(a==="*/*")return e.length>0;if(e.includes(a))return!0;const t=a.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(o=>o.startsWith(n+"/")):!1}const Tg=Object.freeze({create:a=>Bw(a.map(e=>e.toString())).join(`\r
1
+ import{a as x,A as lt,C as E,I as fe,D as fa,b as Pe,g as Vw,M as V,c as U,d as bi,e as S,r as oe,f as pi,h as p,i as KL,j as we,R as J,S as G,k as ut,m as mi,n as ce,o as Q,p as D,q as M,K as He,s as A,t as T,u as qe,v as y,w as Y,O as Qi,x as Ve,P as H,y as Jg,z as Fd,B as Oi,F as Bw,G as xn,H as ag,J as an,L as Va,N as Gl,Q as et,U as ge,T as Uw,$ as F,V as re,W as se,X as ye,Y as X,Z as ze,_ as pa,a0 as k,a1 as Yf,a2 as zw,a3 as GL,a4 as Be,a5 as ZL,a6 as Wd,a7 as It,a8 as z,a9 as Is,aa as $,ab as Ps,ac as XL,ad as nt,ae as Qf,af as YL,ag as $w,ah as Re,ai as lg,aj as QL,ak as cv,al as hv,am as ie,an as JL,ao as Ke,ap as uv,aq as eD,ar as Ct,as as dg,at as Fn,au as Ko,av as ma,aw as Le,ax as tD,ay as pt,az as cg,aA as ht,aB as Go,aC as iD,aD as Wn,aE as ef,aF as Jf,aG as hg,aH as Qe,aI as gv,aJ as _a,aK as nD,aL as mt,aM as _i,aN as Ge,aO as ki,aP as sD,aQ as oD,aR as fv,aS as Hn,aT as jw,aU as Ut,aV as Gc,aW as rD,aX as aD,aY as Kb,aZ as $e,a_ as Ln,a$ as $t,b0 as ee,b1 as Cn,b2 as lD,b3 as nn,b4 as Ht,b5 as pv,b6 as Zl,b7 as va,b8 as qw,b9 as mv,ba as je,bb as q,bc as Hd,bd as Zo,be as tf,bf as Me,bg as ep,bh as Kw,bi as dD,bj as _v,bk as be,bl as vv,bm as ba,bn as ug,bo as cD,bp as Gw,bq as Xl,br as Xo,bs as Yl,bt as gg,bu as bv,bv as Cv,bw as ae,bx as Ci,by as hr,bz as hD,bA as Oc,bB as Sv,bC as uD,bD as Zc,bE as wv,bF as Ca,bG as Si,bH as Vn,bI as te,bJ as Sa,bK as Zw,bL as fg,bM as wa,bN as P,bO as K,bP as Ql,bQ as ve,bR as Jl,bS as Xc,bT as Ba,bU as tp,bV as Xw,bW as gD,bX as fD,bY as pD,bZ as Vd,b_ as Vt,b$ as xs,c0 as At,c1 as Ms,c2 as mD,c3 as _e,c4 as Fr,c5 as Gb,c6 as Bd,c7 as Yw,c8 as W,c9 as Wr,ca as _D,cb as ai,cc as ur,cd as Ji,ce as wi,cf as vD,cg as Qw,ch as Zb,ci as nf,cj as bD,ck as rt,cl as Jw,cm as CD,cn as ey,co as Ud,cp as SD,cq as Yc,cr as yv,cs as yi,ct as wD,cu as yD,cv as Ls,cw as Iv,cx as ID,cy as Xb,cz as Yb,cA as xD,cB as Hr,cC as ty,cD as LD,cE as DD,cF as Rn,cG as ED,cH as RD,cI as sn,cJ as xv,cK as Lv,cL as xt,cM as ks,cN as ed,cO as iy,cP as Zt,cQ as Ua,cR as za,cS as ND,cT as TD,cU as PD,cV as ny,cW as Ac,cX as Qb,cY as MD,cZ as Lt,c_ as Dv,c$ as sy,d0 as Ze,d1 as Ev,d2 as Rv,d3 as kD,d4 as OD,d5 as Jb,d6 as AD,d7 as zd,d8 as ip,d9 as Yo,da as We,db as Ds,dc as FD,dd as en,de as hi,df as Ft,dg as eC,dh as $a,di as Nn,dj as on,dk as WD,dl as Jt,dm as ya,dn as pg,dp as oy,dq as HD,dr as VD,ds as Nv,dt as BD,du as td,dv as UD,dw as zD,dx as Qc,dy as ry,dz as tC,dA as $D,dB as jD,dC as qD,dD as Tv,dE as ay,dF as ly,dG as dy,dH as cy,dI as KD,dJ as GD,dK as hy,dL as uy,dM as ZD,dN as mg,dO as XD,dP as YD,dQ as Te,dR as Pv,dS as Mv,dT as QD,dU as Zs,dV as iC,dW as JD,dX as e1,dY as t1,dZ as i1,d_ as n1,d$ as s1,e0 as o1,e1 as nC,e2 as gy,e3 as ft,e4 as sc,e5 as r1,e6 as kv,e7 as a1,e8 as l1,e9 as d1,ea as c1,eb as h1,ec as Ue,ed as vt,ee as u1,ef as Tn,eg as g1,eh as sC,ei as St,ej as _g,ek as ja,el as np,em as f1,en as p1,eo as oC,ep as sp,eq as m1,er as _1,es as v1,et as b1,eu as vg,ev as bg,ew as fy,ex as py,ey as C1,ez as rC,eA as S1,eB as qa,eC as w1,eD as gl,eE as Ov,eF as aC,eG as id,eH as Jc,eI as y1,eJ as I1,eK as my,eL as x1,eM as L1,eN as xl,eO as st,eP as Ll,eQ as Ia,eR as oc,eS as _y,eT as sf,eU as vy,eV as by,eW as D1,eX as E1,eY as Fc,eZ as Cy,e_ as R1,e$ as N1,f0 as T1,f1 as P1,f2 as Yr,f3 as of,f4 as M1,f5 as k1,f6 as O1,f7 as lC,f8 as dC,f9 as cC,fa as Fe,fb as A1,fc as F1,fd as Xi,fe as tn,ff as W1,fg as Qn,fh as H1,fi as Sy,fj as bt,fk as nd,fl as Dn,fm as V1,fn as B1,fo as U1,fp as z1,fq as op,fr as wy,fs as Bt,ft as Ye,fu as xa,fv as yy,fw as sd,fx as $1,fy as Vr,fz as Av,fA as j1,fB as q1,fC as K1,fD as G1,fE as Z1,fF as tl,fG as hC,fH as X1,fI as Y1,fJ as Q1,fK as J1,fL as En,fM as Iy,fN as eE,fO as od,fP as uC,fQ as tE,fR as iE,fS as nE,fT as xy,fU as sE,fV as oE,fW as Ly,fX as eh,fY as rE,fZ as gC,f_ as vn,f$ as fC,g0 as Qt,g1 as Ie,g2 as pC,g3 as Fv,g4 as aE,g5 as lE,g6 as dE,g7 as Cg,g8 as cE,g9 as rp,ga as Dy,gb as Ey,gc as hE,gd as uE,ge as gE,gf as fE,gg as pE,gh as mE,gi as _E,gj as vE,gk as Ry,gl as bE,gm as th,gn as Os,go as Ny,gp as CE,gq as Ty,gr as SE,gs as Py,gt as My,gu as wE,gv as mC,gw as ky,gx as _C,gy as yE,gz as rf,gA as vC,gB as IE,gC as xE,gD as LE,gE as Ka,gF as ap,gG as Ga,gH as Oy,gI as DE,gJ as Ay,gK as Fy,gL as EE,gM as Wy,gN as Hy,gO as Vy,gP as RE,gQ as gi,gR as NE,gS as eo,gT as Br,gU as rc,gV as By,gW as Uy,gX as TE,gY as PE,gZ as Sn,g_ as ME,g$ as bC,h0 as kE,h1 as zy,h2 as La,h3 as OE,h4 as AE,h5 as $y,h6 as FE,h7 as jy,h8 as CC,h9 as Dl,ha as WE,hb as Sg,hc as HE,hd as wg,he as yg,hf as Ig,hg as xg,hh as qy,hi as VE,hj as BE,hk as UE,hl as zE,hm as SC,hn as wC,ho as yC,hp as lp,hq as $E,hr as jE,hs as qE,ht as IC,hu as KE,hv as GE,hw as $d,hx as ZE,hy as XE,hz as Ky,hA as il,hB as YE,hC as QE,hD as Wc,hE as JE,hF as eR,hG as tR,hH as Wv,hI as Hv,hJ as iR,hK as nR,hL as sR,hM as oR,hN as Gy,hO as Lg,hP as rR,hQ as ih,hR as rs,hS as aR,hT as lR,hU as dR,hV as cR,hW as hR,hX as uR,hY as xC,hZ as Vv,h_ as dp,h$ as gR,i0 as fR,i1 as pR,i2 as mR,i3 as Bv,i4 as Zy,i5 as LC,i6 as DC,i7 as _R,i8 as vR,i9 as EC,ia as af,ib as bR,ic as CR,id as SR,ie as lf,ig as Xy,ih as Yy,ii as Qy,ij as Jy,ik as Pn,il as eI,im as Uv,io as RC,ip as wR,iq as tI,ir as yR,is as IR,it as Dg,iu as gr,iv as Eg,iw as jd,ix as xR,iy as Rg,iz as LR,iA as DR,iB as ER,iC as RR,iD as iI,iE as nl,iF as NR,iG as TR,iH as PR,iI as MR,iJ as qd,iK as kR,iL as nI,iM as sI,iN as oI,iO as cp,iP as OR,iQ as AR,iR as FR,iS as WR,iT as hp,iU as HR,iV as VR,iW as BR,iX as UR,iY as zR,iZ as $R,i_ as jR,i$ as qR,j0 as rI,j1 as KR,j2 as GR,j3 as ZR,j4 as NC,j5 as XR,j6 as YR}from"./WorkspaceMonacoEditor-DPZ0n0G9.js";class QR extends lt{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:x(85,"Toggle Collapse Unchanged Regions"),icon:U.map,toggled:E.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:E.has("isInDiffEditor"),menu:{when:E.has("isInDiffEditor"),id:V.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(fe),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class aI extends lt{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:x(86,"Toggle Show Moved Code Blocks"),precondition:E.has("isInDiffEditor")})}run(e,...t){const i=e.get(fe),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class lI extends lt{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:x(87,"Toggle Use Inline View When Space Is Limited"),precondition:E.has("isInDiffEditor")})}run(e,...t){const i=e.get(fe),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const Kd=x(88,"Diff Editor");class JR extends bi{constructor(){super({id:"diffEditor.switchSide",title:x(89,"Switch Side"),icon:U.arrowSwap,precondition:E.has("isInDiffEditor"),f1:!0,category:Kd})}runEditorCommand(e,t,i){const n=fr(e);if(n instanceof fa){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class e0 extends bi{constructor(){super({id:"diffEditor.exitCompareMove",title:x(90,"Exit Compare Move"),icon:U.close,precondition:S.comparingMovedCode,f1:!1,category:Kd,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=fr(e);n instanceof fa&&n.exitCompareMove()}}class t0 extends bi{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:x(91,"Collapse All Unchanged Regions"),icon:U.fold,precondition:E.has("isInDiffEditor"),f1:!0,category:Kd})}runEditorCommand(e,t,...i){const n=fr(e);n instanceof fa&&n.collapseAllUnchangedRegions()}}class i0 extends bi{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:x(92,"Show All Unchanged Regions"),icon:U.unfold,precondition:E.has("isInDiffEditor"),f1:!0,category:Kd})}runEditorCommand(e,t,...i){const n=fr(e);n instanceof fa&&n.showAllUnchangedRegions()}}class up extends lt{constructor(){super({id:"diffEditor.revert",title:x(93,"Revert"),f1:!0,category:Kd,precondition:E.has("isInDiffEditor")})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){const t=fr(e);t instanceof fa&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){const i=n0(e,t.originalUri,t.modifiedUri);i instanceof fa&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const dI=x(94,"Accessible Diff Viewer"),mu=class mu extends lt{constructor(){super({id:mu.id,title:x(95,"Go to Next Difference"),category:dI,precondition:E.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){fr(e)?.accessibleDiffViewerNext()}};mu.id="editor.action.accessibleDiffViewer.next";let rd=mu;const _u=class _u extends lt{constructor(){super({id:_u.id,title:x(96,"Go to Previous Difference"),category:dI,precondition:E.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){fr(e)?.accessibleDiffViewerPrev()}};_u.id="editor.action.accessibleDiffViewer.prev";let nh=_u;function n0(a,e,t){return a.get(Pe).listDiffEditors().find(s=>{const o=s.getModifiedEditor(),r=s.getOriginalEditor();return o&&o.getModel()?.uri.toString()===t.toString()&&r&&r.getModel()?.uri.toString()===e.toString()})||null}function fr(a){const t=a.get(Pe).listDiffEditors(),i=Vw();if(i){for(const n of t)if(n.getContainerDomNode().contains(i))return n}return null}oe(QR);oe(aI);oe(lI);pi.appendMenuItem(V.EditorTitle,{command:{id:new lI().desc.id,title:p(119,"Use Inline View When Space Is Limited"),toggled:E.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:E.has("isInDiffEditor")},order:11,group:"1_diff",when:E.and(S.diffEditorRenderSideBySideInlineBreakpointReached,E.has("isInDiffEditor"))});pi.appendMenuItem(V.EditorTitle,{command:{id:new aI().desc.id,title:p(120,"Show Moved Code Blocks"),icon:U.move,toggled:KL.create("config.diffEditor.experimental.showMoves",!0),precondition:E.has("isInDiffEditor")},order:10,group:"1_diff",when:E.has("isInDiffEditor")});oe(up);for(const a of[{icon:U.arrowRight,key:S.diffEditorInlineMode.toNegated()},{icon:U.discard,key:S.diffEditorInlineMode}])pi.appendMenuItem(V.DiffEditorHunkToolbar,{command:{id:new up().desc.id,title:p(121,"Revert Block"),icon:a.icon},when:E.and(S.diffEditorModifiedWritable,a.key),order:5,group:"primary"}),pi.appendMenuItem(V.DiffEditorSelectionToolbar,{command:{id:new up().desc.id,title:p(122,"Revert Selection"),icon:a.icon},when:E.and(S.diffEditorModifiedWritable,a.key),order:5,group:"primary"});oe(JR);oe(e0);oe(t0);oe(i0);pi.appendMenuItem(V.EditorTitle,{command:{id:rd.id,title:p(123,"Open Accessible Diff Viewer"),precondition:E.has("isInDiffEditor")},order:10,group:"2_diff",when:E.and(S.accessibleDiffViewerVisible.negate(),E.has("isInDiffEditor"))});we.registerCommandAlias("editor.action.diffReview.next",rd.id);oe(rd);we.registerCommandAlias("editor.action.diffReview.prev",nh.id);oe(nh);var s0=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},o0=function(a,e){return function(t,i){e(t,i,a)}},gp;const Ng=new J("selectionAnchorSet",!1);var ro;let Es=(ro=class{static get(e){return e.getContribution(gp.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Ng.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(G.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new ut().appendText(p(798,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),mi(p(799,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(G.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}},gp=ro,ro.ID="editor.contrib.selectionAnchorController",ro);Es=gp=s0([o0(1,ce)],Es);class r0 extends M{constructor(){super({id:"editor.action.setSelectionAnchor",label:x(800,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:He(2089,2080),weight:100}})}async run(e,t){Es.get(t)?.setSelectionAnchor()}}class a0 extends M{constructor(){super({id:"editor.action.goToSelectionAnchor",label:x(801,"Go to Selection Anchor"),precondition:Ng})}async run(e,t){Es.get(t)?.goToSelectionAnchor()}}class l0 extends M{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:x(802,"Select from Anchor to Cursor"),precondition:Ng,kbOpts:{kbExpr:S.editorTextFocus,primary:He(2089,2089),weight:100}})}async run(e,t){Es.get(t)?.selectFromAnchorToCursor()}}class d0 extends M{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:x(803,"Cancel Selection Anchor"),precondition:Ng,kbOpts:{kbExpr:S.editorTextFocus,primary:9,weight:100}})}async run(e,t){Es.get(t)?.cancelSelectionAnchor()}}Q(Es.ID,Es,4);D(r0);D(a0);D(l0);D(d0);const c0=A("editorOverviewRuler.bracketMatchForeground","#A0A0A0",p(804,"Overview ruler marker color for matching brackets."));class h0 extends M{constructor(){super({id:"editor.action.jumpToBracket",label:x(806,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:3165,weight:100}})}run(e,t){Qo.get(t)?.jumpToBracket()}}class u0 extends M{constructor(){super({id:"editor.action.selectToBracket",label:x(807,"Select to Bracket"),precondition:void 0,metadata:{description:x(808,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let n=!0;i&&i.selectBrackets===!1&&(n=!1),Qo.get(t)?.selectToBracket(n)}}class g0 extends M{constructor(){super({id:"editor.action.removeBrackets",label:x(809,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:S.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){Qo.get(t)?.removeBrackets(this.id)}}class f0{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}const Kn=class Kn extends T{static get(e){return e.getContribution(Kn.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new qe(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let o=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?o=s[1].getStartPosition():s[1].containsPosition(n)&&(o=s[0].getStartPosition());else{const r=e.bracketPairs.findEnclosingBrackets(n);if(r)o=r[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(o=l.range.getStartPosition())}}return o?new G(o.lineNumber,o.column,o.lineNumber,o.column):new G(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const s=n.getStartPosition();let o=t.bracketPairs.matchBracket(s);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(s),!o)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(o=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let r=null,l=null;if(o){o.sort(y.compareRangesUsingStarts);const[d,c]=o;if(r=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=r;r=l,l=h}}r&&l&&i.push(new G(r.lineNumber,r.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let o=0;for(let h=0,u=e.length;h<u;h++){const g=e[h];g.isEmpty()&&(s[o++]=g.getStartPosition())}s.length>1&&s.sort(H.compare);const r=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const g=s[h];for(;d<c&&n[d].position.isBefore(g);)d++;if(d<c&&n[d].position.equals(g))r[l++]=n[d];else{let f=t.bracketPairs.matchBracket(g,20),m=Kn._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!f&&this._matchBrackets==="always"&&(f=t.bracketPairs.findEnclosingBrackets(g,20),m=Kn._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),r[l++]=new f0(g,f,m)}}this._lastBracketsData=r,this._lastVersionId=i}};Kn.ID="editor.contrib.bracketMatchingController",Kn._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Y.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Ve(c0),position:Qi.Center}}),Kn._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Y.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});let Qo=Kn;Q(Qo.ID,Qo,1);D(u0);D(h0);D(g0);pi.appendMenuItem(V.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p(805,"Go to &&Bracket")},order:2});class p0{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const o=new y(i,n-1,i,n),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new y(i,s,i,s),r)}else{const o=new y(i,s,i,s+1),r=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new y(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new G(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new G(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class cI extends M{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new p0(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class m0 extends cI{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:x(810,"Move Selected Text Left"),precondition:S.writable})}}class _0 extends cI{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:x(811,"Move Selected Text Right"),precondition:S.writable})}}D(m0);D(_0);class v0 extends M{constructor(){super({id:"editor.action.transposeLetters",label:x(812,"Transpose Letters"),precondition:S.writable,kbOpts:{kbExpr:S.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const o of s){if(!o.isEmpty())continue;const r=o.startLineNumber,l=o.startColumn,d=i.getLineMaxColumn(r);if(r===1&&(l===1||l===2&&d===2))continue;const c=l===d?o.getPosition():Jg.rightPosition(i,o.getPosition().lineNumber,o.getPosition().column),h=Jg.leftPosition(i,c),u=Jg.leftPosition(i,h),g=i.getValueInRange(y.fromPositions(u,h)),f=i.getValueInRange(y.fromPositions(h,c)),m=y.fromPositions(u,c);n.push(new Fd(m,f+g))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}D(v0);const b0=Oi("productService");function zv(a,e){return{id:e,asString:async()=>a,asFile:()=>{},value:typeof a=="string"?a:void 0}}function C0(a,e,t,i){const n={id:ag(),name:a,uri:e,data:t};return{id:i,asString:async()=>"",asFile:()=>n,value:void 0}}class hI{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return xn.some(this,([i,n])=>n.asFile())&&t.push("files"),uI(sh(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return sh(e)}}function sh(a){return a.toLowerCase()}function TC(a,e){return uI(sh(a),e.map(sh))}function uI(a,e){if(a==="*/*")return e.length>0;if(e.includes(a))return!0;const t=a.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(o=>o.startsWith(n+"/")):!1}const Tg=Object.freeze({create:a=>Bw(a.map(e=>e.toString())).join(`\r
2
2
  `),split:a=>a.split(`\r
3
3
  `),parse:a=>Tg.split(a).filter(e=>!e.startsWith("#"))}),Vi=class Vi{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+Vi.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new Vi((this.value?[this.value,...e]:e).join(Vi.sep))}};Vi.sep=".",Vi.None=new Vi("@@none@@"),Vi.Empty=new Vi("");let xe=Vi;const PC={EDITORS:"CodeEditors",FILES:"CodeFiles"};class S0{}const w0={DragAndDropContribution:"workbench.contributions.dragAndDrop"};an.add(w0.DragAndDropContribution,new S0);const $l=class $l{constructor(){}static getInstance(){return $l.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}};$l.INSTANCE=new $l;let fp=$l;function gI(a){if(Va&&typeof globalThis.vscode?.webUtils?.getPathForFile=="function")return globalThis.vscode?.webUtils?.getPathForFile(a)}function fI(a){const e=new hI;for(const t of a.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,zv(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,y0(n))}}return e}function y0(a){const e=gI(a),t=e?ge.parse(e):void 0;return C0(a.name,t,async()=>new Uint8Array(await a.arrayBuffer()))}const I0=Object.freeze([PC.EDITORS,PC.FILES,Gl.RESOURCES,Gl.INTERNAL_URI_LIST]);function pI(a,e=!1){const t=fI(a),i=t.get(Gl.INTERNAL_URI_LIST);if(i)t.replace(et.uriList,i);else if(e||!t.has(et.uriList)){const n=[];for(const s of a.items){const o=s.getAsFile();if(o){const r=gI(o);try{r?n.push(ge.file(r).toString()):n.push(ge.parse(o.name,!0).toString())}catch{}}}n.length&&t.replace(et.uriList,zv(Tg.create(n)))}for(const n of I0)t.delete(n);return t}var x0=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},L0=function(a,e){return function(t,i){e(t,i,a)}};const D0=Y.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:Uw,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}}),vu=class vu extends T{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=F(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=F("span.icon");this.domNode.append(t),t.classList.add(...re.asClassNameArray(U.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(75);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(61)||n.hasChanged(75))&&i()})),this._register(se(this.domNode,ye.CLICK,n=>{this.delegate.cancel()}))}getId(){return vu.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}};vu.baseId="editor.widget.inlineProgressWidget";let pp=vu,oh=class extends T{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new ze),this._currentWidget=this._register(new ze),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,s){const o=this._operationIdPool++;this._currentOperation=o,this.clear(),this._showPromise.value=pa(()=>{const r=y.fromPositions(e);this._currentDecorations.set([{range:r,options:D0}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(pp,this.id,this._editor,r,t,n))},s??this._showDelay);try{return await i}finally{this._currentOperation===o&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};oh=x0([L0(2,X)],oh);var E0=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},MC=function(a,e){return function(t,i){e(t,i,a)}},Hc,ls;let Et=(ls=class{static get(e){return e.getContribution(Hc.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new ze,this._messageListeners=new k,this._mouseOverMessage=!1,this._editor=e,this._visible=Hc.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(mi(Yf(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),Yf(e)){const n=this._messageListeners.add(zw(e,{actionHandler:(s,o)=>{this.closeMessage(),GL(this._openerService,s,o.isTrusted)}}));this._messageWidget.value=new df(this._editor,t,n.element)}else this._messageWidget.value=new df(this._editor,t,e);this._messageListeners.add(Be.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&ZL(Vw(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(se(this._messageWidget.value.getDomNode(),ye.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(se(this._messageWidget.value.getDomNode(),ye.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new y(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(df.fadeOut(this._messageWidget.value))}},Hc=ls,ls.ID="editor.contrib.messageController",ls.MESSAGE_VISIBLE=new J("messageVisible",!1,p(1287,"Whether the editor is currently showing an inline message")),ls);Et=Hc=E0([MC(1,ce),MC(2,Wd)],Et);const R0=It.bindToContribution(Et.get);z(new R0({id:"leaveEditorMessage",precondition:Et.MESSAGE_VISIBLE,handler:a=>a.closeMessage(),kbOpts:{weight:130,primary:9}}));let df=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");typeof n=="string"?(o.classList.add("message"),o.textContent=n):(n.classList.add("message"),o.appendChild(n)),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};Q(Et.ID,Et,4);var $v=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ad=function(a,e){return function(t,i){e(t,i,a)}};class jv{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,i,n,s){const o=await this.getEdit(i,s);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const s=await this.getEdit(i,n);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}}const bu=class bu extends jv{constructor(){super(xe.Empty.append("text","plain")),this.id=bu.id,this.dropMimeTypes=[et.text],this.pasteMimeTypes=[et.text]}async getEdit(e,t){const i=e.get(et.text);if(!i||e.has(et.uriList))return;const n=await i.asString();return{handledMimeType:et.text,title:p(926,"Insert Plain Text"),insertText:n,kind:this.kind}}};bu.id="text";let Jo=bu;class mI extends jv{constructor(){super(xe.Empty.append("uri","path","absolute")),this.dropMimeTypes=[et.uriList],this.pasteMimeTypes=[et.uriList]}async getEdit(e,t){const i=await _I(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:r,originalText:l})=>r.scheme===nt.file?r.fsPath:(n++,l)).join(" ");let o;return n>0?o=i.length>1?p(927,"Insert Uris"):p(928,"Insert Uri"):o=i.length>1?p(929,"Insert Paths"):p(930,"Insert Path"),{handledMimeType:et.uriList,insertText:s,title:o,kind:this.kind}}}let rh=class extends jv{constructor(e){super(xe.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[et.uriList],this.pasteMimeTypes=[et.uriList]}async getEdit(e,t){const i=await _I(e);if(!i.length||t.isCancellationRequested)return;const n=Ps(i.map(({uri:s})=>{const o=this._workspaceContextService.getWorkspaceFolder(s);return o?XL(o.uri,s):void 0}));if(n.length)return{handledMimeType:et.uriList,insertText:n.join(" "),title:i.length>1?p(931,"Insert Relative Paths"):p(932,"Insert Relative Path"),kind:this.kind}}};rh=$v([ad(0,Is)],rh);class N0{constructor(){this.kind=new xe("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:et.text}]}async provideDocumentPasteEdits(e,t,i,n,s){if(n.triggerKind!==Qf.PasteAs&&!n.only?.contains(this.kind))return;const r=await i.get("text/html")?.asString();if(!(!r||s.isCancellationRequested))return{dispose(){},edits:[{insertText:r,yieldTo:this._yieldTo,title:p(933,"Insert HTML"),kind:this.kind}]}}}async function _I(a){const e=a.get(et.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of Tg.parse(t))try{i.push({uri:ge.parse(n),originalText:n})}catch{}return i}const to={scheme:"*",hasAccessToAllModels:!0};let mp=class extends T{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(to,new Jo)),this._register(e.documentDropEditProvider.register(to,new mI)),this._register(e.documentDropEditProvider.register(to,new rh(t)))}};mp=$v([ad(0,$),ad(1,Is)],mp);let _p=class extends T{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(to,new Jo)),this._register(e.documentPasteEditProvider.register(to,new mI)),this._register(e.documentPasteEditProvider.register(to,new rh(t))),this._register(e.documentPasteEditProvider.register(to,new N0))}};_p=$v([ad(0,$),ad(1,Is)],_p);const si=class si{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=si._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(si.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(si.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(si.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(si.isVariableCharacter(i)||si.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof si._table[i]>"u"&&!si.isDigitCharacter(i)&&!si.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}};si._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};let vp=si;class Za{constructor(){this._children=[]}appendChild(e){return e instanceof gt&&this._children[this._children.length-1]instanceof gt?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,(function o(r,l){for(const d of r)d.parent=l,o(d.children,d)})(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Gd)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class gt extends Za{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new gt(this.value)}}class vI extends Za{}class Xt extends vI{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof Xa?this._children[0]:void 0}clone(){const e=new Xt(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class Xa extends Za{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof gt&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new Xa;return this.options.forEach(e.appendChild,e),e}}class qv extends Za{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof Ei&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Ei){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new qv;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class Ei extends Za{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Ei(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class ld extends vI{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new gt(t)],!0):!1}clone(){const e=new ld(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function kC(a,e){const t=[...a];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class Gd extends Za{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof Xt&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return kC([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof Xt&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof ld&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new Gd;return this._children=this.children.map(t=>t.clone()),e}walk(e){kC(this.children,e)}}class er{constructor(){this._scanner=new vp,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new Gd;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(l=>(l instanceof Xt&&(l.isFinalTabstop?n.set(0,void 0):!n.has(l.index)&&l.children.length>0?n.set(l.index,l.children):s.push(l)),!0));const o=(l,d)=>{const c=n.get(l.index);if(!c)return;const h=new Xt(l.index);h.transform=l.transform;for(const u of c){const g=u.clone();h.appendChild(g),g instanceof Xt&&n.has(g.index)&&!d.has(g.index)&&(d.add(g.index),o(g,d),d.delete(g.index))}t.replace(l,[h])},r=new Set;for(const l of s)o(l,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new Xt(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new gt(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Xt(Number(t)):new ld(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new Xt(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new gt("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const o=new Xa;for(;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(o),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new gt(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new ld(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new gt("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new qv;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new gt(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new Ei(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Ei(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Ei(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new Ei(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new Ei(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const o=this._until(4);if(o)return e.appendChild(new Ei(Number(n),void 0,s,o)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new Ei(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new gt(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function bI(a,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(i=>new YL(a,{range:i,text:typeof t.insertText=="string"?er.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function CI(a){function e(o,r){return"mimeType"in o?o.mimeType===r.handledMimeType:!!r.kind&&o.kind.contains(r.kind)}const t=new Map;for(const o of a)for(const r of o.yieldTo??[])for(const l of a)if(l!==o&&e(r,l)){let d=t.get(o);d||(d=[],t.set(o,d)),d.push(l)}if(!t.size)return Array.from(a);const i=new Set,n=[];function s(o){if(!o.length)return[];const r=o[0];if(n.includes(r))return console.warn("Yield to cycle detected",r),o;if(i.has(r))return s(o.slice(1));let l=[];const d=t.get(r);return d&&(n.push(r),l=s(d),n.pop()),i.add(r),[...l,r,...s(o.slice(1))]}return s(Array.from(a))}function cf(a,e){return e&&(a.stack||a.stacktrace)?p(29,"{0}: {1}",AC(a),OC(a.stack)||OC(a.stacktrace)):AC(a)}function OC(a){return Array.isArray(a)?a.join(`
4
4
  `):a}function AC(a){return a.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${a.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof a.code=="string"&&typeof a.errno=="number"&&typeof a.syscall=="string"?p(30,"A system error occurred ({0})",a.message):a.message||p(31,"An unknown error occurred. Please consult the log for more details.")}function ah(a=null,e=!1){if(!a)return p(32,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(a)){const t=Ps(a),i=ah(t[0],e);return t.length>1?p(33,"{0} ({1} errors in total)",i,t.length):i}if($w(a))return a;if(a.detail){const t=a.detail;if(t.error)return cf(t.error,e);if(t.exception)return cf(t.exception,e)}return a.stack?cf(a,e):a.message?a.message:p(34,"An unknown error occurred. Please consult the log for more details.")}var SI=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vc=function(a,e){return function(t,i){e(t,i,a)}};const wI="acceptSelectedCodeAction",yI="previewSelectedCodeAction";class T0{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??e.label??""}disposeTemplate(e){}}class P0{get templateId(){return"separator"}renderTemplate(e){e.classList.add("separator");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.label??""}disposeTemplate(e){}}let bp=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const n=document.createElement("span");n.className="description",e.append(n);const s=new cv(e,hv);return{container:e,icon:t,text:i,description:n,keybinding:s}}renderElement(e,t,i){if(e.group?.icon?(i.icon.className=re.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=ie(e.group.icon.color.id))):(i.icon.className=re.asClassName(U.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;JL(!e.hideIcon,i.icon),i.text.textContent=lh(e.label),e.keybinding?(i.description.textContent=e.keybinding.getLabel(),i.description.style.display="inline",i.description.style.letterSpacing="0.5px"):e.description?(i.description.textContent=lh(e.description),i.description.style.display="inline"):(i.description.textContent="",i.description.style.display="none");const n=this._keybindingService.lookupKeybinding(wI)?.getLabel(),s=this._keybindingService.lookupKeybinding(yI)?.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.tooltip?i.container.title=e.tooltip:e.disabled?i.container.title=e.label:n&&s?this._supportsPreview&&e.canPreview?i.container.title=p(1653,"{0} to Apply, {1} to Preview",n,s):i.container.title=p(1654,"{0} to Apply",n):i.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};bp=SI([Vc(1,Re)],bp);class M0 extends UIEvent{constructor(){super("acceptSelectedAction")}}class FC extends UIEvent{constructor(){super("previewSelectedAction")}}function k0(a){if(a.kind==="action")return a.label}let Cp=class extends T{constructor(e,t,i,n,s,o,r,l){super(),this._delegate=n,this._contextViewService=o,this._keybindingService=r,this._layoutService=l,this._actionLineHeight=28,this._headerLineHeight=28,this._separatorLineHeight=8,this.cts=this._register(new Ke),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const d={getHeight:c=>{switch(c.kind){case"header":return this._headerLineHeight;case"separator":return this._separatorLineHeight;default:return this._actionLineHeight}},getTemplateId:c=>c.kind};this._list=this._register(new uv(e,this.domNode,d,[new bp(t,this._keybindingService),new T0,new P0],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:k0},accessibilityProvider:{getAriaLabel:c=>{if(c.kind==="action"){let h=c.label?lh(c?.label):"";return c.description&&(h=h+", "+lh(c.description)),c.disabled&&(h=p(1655,"{0}, Disabled Reason: {1}",h,c.disabled)),h}return null},getWidgetAriaLabel:()=>p(1656,"Action Widget"),getRole:c=>{switch(c.kind){case"action":return"option";case"separator":return"separator";default:return"separator"}},getWidgetRole:()=>"listbox",...s}})),this._list.style(eD),this._register(this._list.onMouseClick(c=>this.onListClick(c))),this._register(this._list.onMouseOver(c=>this.onListHover(c))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(c=>this.onListSelection(c))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(c=>c.kind==="header").length,i=this._allMenuItems.filter(c=>c.kind==="separator").length,o=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight+i*this._separatorLineHeight-i*this._actionLineHeight;this._list.layout(o);let r=e;if(this._allMenuItems.length>=50)r=380;else{const c=this._allMenuItems.map((h,u)=>{const g=this.domNode.ownerDocument.getElementById(this._list.getElementID(u));if(g){g.style.width="auto";const f=g.getBoundingClientRect().width;return g.style.width="",f}return 0});r=Math.max(...c,e)}const d=Math.min(o,this._layoutService.getContainer(Ct(this.domNode)).clientHeight*.7);return this._list.layout(d,r),this.domNode.style.height=`${d}px`,this._list.domFocus(),r}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new FC:new M0;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof FC):this._list.setSelection([])}onFocus(){const e=this._list.getFocus();if(e.length===0)return;const t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const i=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=i?i.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};Cp=SI([Vc(5,lg),Vc(6,Re),Vc(7,QL)],Cp);function lh(a){return a.replace(/\r\n|\r|\n/g," ")}var O0=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hf=function(a,e){return function(t,i){e(t,i,a)}};A("actionBar.toggledBackground",dg,p(1657,"Background color for toggled action items in action bar."));const tr={Visible:new J("codeActionMenuVisible",!1,p(1658,"Whether the action widget list is visible"))},As=Oi("actionWidgetService");let ir=class extends T{get isVisible(){return tr.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new ze)}show(e,t,i,n,s,o,r,l){const d=tr.Visible.bindTo(this._contextKeyService),c=this._instantiationService.createInstance(Cp,e,t,i,n,l);this._contextViewService.showContextView({getAnchor:()=>s,render:h=>(d.set(!0),this._renderWidget(h,c,r??[])),onHide:h=>{d.reset(),this._onWidgetClosed(h)}},o,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,i){const n=document.createElement("div");if(n.classList.add("action-widget"),e.appendChild(n),this._list.value=t,this._list.value)n.appendChild(this._list.value.domNode);else throw new Error("List has no value");const s=new k,o=document.createElement("div"),r=e.appendChild(o);r.classList.add("context-view-block"),s.add(se(r,ye.MOUSE_DOWN,g=>g.stopPropagation()));const l=document.createElement("div"),d=e.appendChild(l);d.classList.add("context-view-pointerBlock"),s.add(se(d,ye.POINTER_MOVE,()=>d.remove())),s.add(se(d,ye.MOUSE_DOWN,()=>d.remove()));let c=0;if(i.length){const g=this._createActionBar(".action-widget-action-bar",i);g&&(n.appendChild(g.getContainer().parentElement),s.add(g),c=g.getContainer().offsetWidth)}const h=this._list.value?.layout(c);n.style.width=`${h}px`;const u=s.add(Ko(e));return s.add(u.onDidBlur(()=>this.hide(!0))),s}_createActionBar(e,t){if(!t.length)return;const i=F(e),n=new ma(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){this._list.value?.hide(e)}};ir=O0([hf(0,lg),hf(1,ce),hf(2,X)],ir);Fn(As,ir,1);const Zd=1100;oe(class extends lt{constructor(){super({id:"hideCodeActionWidget",title:x(1659,"Hide action widget"),precondition:tr.Visible,keybinding:{weight:Zd,primary:9,secondary:[1033]}})}run(a){a.get(As).hide(!0)}});oe(class extends lt{constructor(){super({id:"selectPrevCodeAction",title:x(1660,"Select previous action"),precondition:tr.Visible,keybinding:{weight:Zd,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(a){const e=a.get(As);e instanceof ir&&e.focusPrevious()}});oe(class extends lt{constructor(){super({id:"selectNextCodeAction",title:x(1661,"Select next action"),precondition:tr.Visible,keybinding:{weight:Zd,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(a){const e=a.get(As);e instanceof ir&&e.focusNext()}});oe(class extends lt{constructor(){super({id:wI,title:x(1662,"Accept selected action"),precondition:tr.Visible,keybinding:{weight:Zd,primary:3,secondary:[2137]}})}run(a){const e=a.get(As);e instanceof ir&&e.acceptSelected()}});oe(class extends lt{constructor(){super({id:yI,title:x(1663,"Preview selected action"),precondition:tr.Visible,keybinding:{weight:Zd,primary:2051}})}run(a){const e=a.get(As);e instanceof ir&&e.acceptSelected(!0)}});var II=function(a,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,e,t,i);else for(var r=a.length-1;r>=0;r--)(o=a[r])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qr=function(a,e){return function(t,i){e(t,i,a)}},Sp,ao;let wp=(ao=class extends T{constructor(e,t,i,n,s,o,r,l,d,c,h){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=o,this.onSelectNewEdit=r,this.additionalActions=l,this._keybindingService=c,this._actionWidgetService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(d),this.visibleContext.set(!0),this._register(Le(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Le((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(u=>{this.dispose()})),this._register(Be.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){const e=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=F(".post-edit-widget"),this.button=this._register(new tD(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(se(this.domNode,ye.CLICK,()=>this.showSelector()))}getId(){return Sp.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){const e=pt(this.button.element),t={x:e.left+e.width,y:e.top+e.height};this._actionWidgetService.show("postEditWidget",!1,this.edits.allEdits.map((i,n)=>({kind:"action",item:i,label:i.title,disabled:!1,canPreview:!1,group:{title:"",icon:re.fromId(n===this.edits.activeEditIndex?U.check.id:U.blank.id)}})),{onHide:()=>{this.editor.focus()},onSelect:i=>{this._actionWidgetService.hide(!1);const n=this.edits.allEdits.findIndex(s=>s===i);if(n!==this.edits.activeEditIndex)return this.onSelectNewEdit(n)}},t,this.editor.getDomNode()??void 0,this.additionalActions)}},Sp=ao,ao.baseId="editor.widget.postEditWidget",ao);wp=Sp=II([Qr(8,ce),Qr(9,Re),Qr(10,As)],wp);let dh=class extends T{constructor(e,t,i,n,s,o,r,l){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._getAdditionalActions=s,this._instantiationService=o,this._bulkEditService=r,this._notificationService=l,this._currentWidget=this._register(new ze),this._register(Be.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n,s){if(!e.length||!this._editor.hasModel())return;const o=this._editor.getModel(),r=t.allEdits.at(t.activeEditIndex);if(!r)return;const l=async v=>{const C=this._editor.getModel();C&&(await C.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:v,allEdits:t.allEdits},i,n,s))},d=(v,C)=>{Wn(v)||(this._notificationService.error(C),i&&this.show(e[0],t,l))},c=new Go(this._editor,3,void 0,s);let h;try{h=await iD(n(r,c.token),c.token)}catch(v){return d(v,p(937,`Error resolving edit '{0}':
@@ -1,4 +1,4 @@
1
- import{j7 as w,j8 as F,j9 as P,ja as v,l as f,jb as O}from"./WorkspaceMonacoEditor-yg83VXk5.js";import"./toggleHighContrast-e8XiQRTr.js";import{c as K}from"./workers-XU4YZxHD.js";import{typescriptDefaults as M}from"./monaco.contribution-Bqi-s2-g.js";import"./index-CpTHPmvd.js";class E{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(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=K({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL(""+new URL("ts.worker-BH9nVgjN.js",import.meta.url).href,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(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;i<t;i++)o+=" "}if(o+=c.messageText,t++,c.next)for(const i of c.next)o+=A(i,e,t);return o}function _(c){return c?c.map(e=>e.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=M.getExtraLibs()[e];return i?w.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._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class V extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,`
1
+ import{j7 as w,j8 as F,j9 as P,ja as v,l as f,jb as O}from"./WorkspaceMonacoEditor-DPZ0n0G9.js";import"./toggleHighContrast-Ce0YhEQg.js";import{c as K}from"./workers-BXh_u8Fr.js";import{typescriptDefaults as M}from"./monaco.contribution-bytkwn0O.js";import"./index-vfpCN9zy.js";class E{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(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=K({moduleId:"vs/language/typescript/tsWorker",createWorker:()=>new Worker(new URL("/assets/ts.worker-BH9nVgjN.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(w.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}}const s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.arraybuffer.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es2023.intl.d.ts"]=!0;s["lib.es2024.arraybuffer.d.ts"]=!0;s["lib.es2024.collection.d.ts"]=!0;s["lib.es2024.d.ts"]=!0;s["lib.es2024.full.d.ts"]=!0;s["lib.es2024.object.d.ts"]=!0;s["lib.es2024.promise.d.ts"]=!0;s["lib.es2024.regexp.d.ts"]=!0;s["lib.es2024.sharedmemory.d.ts"]=!0;s["lib.es2024.string.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.array.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.error.d.ts"]=!0;s["lib.esnext.float16.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.iterator.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.esnext.sharedmemory.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function A(c,e,t=0){if(typeof c=="string")return c;if(c===void 0)return"";let o="";if(t){o+=e;for(let i=0;i<t;i++)o+=" "}if(o+=c.messageText,t++,c.next)for(const i of c.next)o+=A(i,e,t);return o}function _(c){return c?c.map(e=>e.text).join(""):""}class y{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),i=e.getPositionAt(t.start+t.length),{lineNumber:l,column:p}=o,{lineNumber:n,column:r}=i;return{startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r}}}class H{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){const t=F.parse(e),o=w.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return w.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const i=M.getExtraLibs()[e];return i?w.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._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}}class V extends y{constructor(e,t,o,i){super(i),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);const l=r=>{if(r.getLanguageId()!==o)return;const u=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?r.isAttachedToEditor()&&this._doValidate(r):this._doValidate(r)};let d;const g=r.onDidChangeContent(()=>{clearTimeout(d),d=window.setTimeout(u,500)}),b=r.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(r.isAttachedToEditor()?u():w.setModelMarkers(r,this._selector,[]))});this._listener[r.uri.toString()]={dispose(){g.dispose(),b.dispose(),clearTimeout(d)}},u()},p=r=>{w.setModelMarkers(r,this._selector,[]);const u=r.uri.toString();this._listener[u]&&(this._listener[u].dispose(),delete this._listener[u])};this._disposables.push(w.onDidCreateModel(r=>l(r))),this._disposables.push(w.onWillDisposeModel(p)),this._disposables.push(w.onDidChangeModelLanguage(r=>{p(r.model),l(r.model)})),this._disposables.push({dispose(){for(const r of w.getModels())p(r)}});const n=()=>{for(const r of w.getModels())p(r),l(r)};this._disposables.push(this._defaults.onDidChange(n)),this._disposables.push(this._defaults.onDidExtraLibsChange(n)),w.getModels().forEach(r=>l(r))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const o=[],{noSyntaxValidation:i,noSemanticValidation:l,noSuggestionDiagnostics:p}=this._defaults.getDiagnosticsOptions();i||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),p||o.push(t.getSuggestionDiagnostics(e.uri.toString()));const n=await Promise.all(o);if(!n||e.isDisposed())return;const r=n.reduce((d,g)=>g.concat(d),[]).filter(d=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(d.code)===-1),u=r.map(d=>d.relatedInformation||[]).reduce((d,g)=>g.concat(d),[]).map(d=>d.file?F.parse(d.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(u),!e.isDisposed()&&w.setModelMarkers(e,this._selector,r.map(d=>this._convertDiagnostics(e,d)))}_convertDiagnostics(e,t){const o=t.start||0,i=t.length||1,{lineNumber:l,column:p}=e.getPositionAt(o),{lineNumber:n,column:r}=e.getPositionAt(o+i),u=[];return t.reportsUnnecessary&&u.push(P.Unnecessary),t.reportsDeprecated&&u.push(P.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:p,endLineNumber:n,endColumn:r,message:A(t.messageText,`
2
2
  `),code:t.code.toString(),tags:u,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const o=[];return t.forEach(i=>{let l=e;if(i.file&&(l=this._libFiles.getOrCreateModel(i.file.fileName)),!l)return;const p=i.start||0,n=i.length||1,{lineNumber:r,column:u}=l.getPositionAt(p),{lineNumber:d,column:g}=l.getPositionAt(p+n);o.push({resource:l.uri,startLineNumber:r,startColumn:u,endLineNumber:d,endColumn:g,message:A(i.messageText,`
3
3
  `)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return v.Error;case 3:return v.Info;case 0:return v.Warning;case 2:return v.Hint}return v.Info}}class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(e,t,o,i){const l=e.getWordUntilPosition(t),p=new O(t.lineNumber,l.startColumn,t.lineNumber,l.endColumn),n=e.uri,r=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const d=await u.getCompletionsAtPosition(n.toString(),r);return!d||e.isDisposed()?void 0:{suggestions:d.entries.map(b=>{let h=p;if(b.replacementSpan){const x=e.getPositionAt(b.replacementSpan.start),D=e.getPositionAt(b.replacementSpan.start+b.replacementSpan.length);h=new O(x.lineNumber,x.column,D.lineNumber,D.column)}const k=[];return b.kindModifiers!==void 0&&b.kindModifiers.indexOf("deprecated")!==-1&&k.push(f.CompletionItemTag.Deprecated),{uri:n,position:t,offset:r,range:h,label:b.name,insertText:b.name,sortText:b.sortText,kind:C.convertKind(b.kind),tags:k}})}}async resolveCompletionItem(e,t){const o=e,i=o.uri,l=o.position,p=o.offset,r=await(await this._worker(i)).getCompletionEntryDetails(i.toString(),p,o.label);return r?{uri:i,position:l,label:r.name,kind:C.convertKind(r.kind),detail:_(r.displayParts),documentation:{value:C.createDocumentationString(r)}}:o}static convertKind(e){switch(e){case a.primitiveType:case a.keyword:return f.CompletionItemKind.Keyword;case a.variable:case a.localVariable:return f.CompletionItemKind.Variable;case a.memberVariable:case a.memberGetAccessor:case a.memberSetAccessor:return f.CompletionItemKind.Field;case a.function:case a.memberFunction:case a.constructSignature:case a.callSignature:case a.indexSignature:return f.CompletionItemKind.Function;case a.enum:return f.CompletionItemKind.Enum;case a.module:return f.CompletionItemKind.Module;case a.class:return f.CompletionItemKind.Class;case a.interface:return f.CompletionItemKind.Interface;case a.warning:return f.CompletionItemKind.File}return f.CompletionItemKind.Property}static createDocumentationString(e){let t=_(e.documentation);if(e.tags)for(const o of e.tags)t+=`
4
4
 
@@ -1 +1 @@
1
- import{c as a}from"./App-BpYDvJ6x.js";const o=[["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"}]],t=a("upload",o);export{t as U};
1
+ import{c as a}from"./App-6AQXN2SM.js";const o=[["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"}]],t=a("upload",o);export{t as U};
@@ -1 +1 @@
1
- import{c as v,w as s}from"./App-BpYDvJ6x.js";import{r as c}from"./index-CpTHPmvd.js";const m=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],x=v("rotate-ccw",m),I=5e3;function C(t){const[S,n]=c.useState([]),[y,r]=c.useState(!1),[w,l]=c.useState(null),[o,p]=c.useState(()=>new Set);c.useEffect(()=>{if(!t){n([]),l(null),r(!1);return}const e=t;let a=!1;async function d(g){if(!a){g&&r(!0);try{const h=await s.localAgentSchedules(e);if(a)return;n(h.schedules),l(null)}catch(h){a||l(f(h))}finally{!a&&g&&r(!1)}}}d(!0);const u=window.setInterval(()=>{d(!1)},I);return()=>{a=!0,window.clearInterval(u)}},[t]);async function L(){if(t){r(!0);try{const e=await s.syncLocalAgentSchedules(t);n(e.schedules),l(null)}catch(e){l(f(e))}finally{r(!1)}}}async function A(e){if(!(!t||o.has(e.id))){i(e.id,!0);try{await s.runLocalAgentSchedule(t,e.id);const a=await s.localAgentSchedules(t);n(a.schedules),l(null)}catch(a){l(f(a))}finally{i(e.id,!1)}}}async function E(e){if(!(!t||o.has(e.id))){i(e.id,!0);try{await s.patchLocalAgentSchedule(t,e.id,{enabled:!e.enabled});const a=await s.localAgentSchedules(t);n(a.schedules),l(null)}catch(a){l(f(a))}finally{i(e.id,!1)}}}function i(e,a){p(d=>{const u=new Set(d);return a?u.add(e):u.delete(e),u})}return{error:w,loading:y,pendingScheduleIds:o,refresh:L,run:A,schedules:S,toggle:E}}function f(t){return t instanceof Error?t.message:String(t)}export{x as R,C as u};
1
+ import{c as v,w as s}from"./App-6AQXN2SM.js";import{r as c}from"./index-vfpCN9zy.js";const m=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],x=v("rotate-ccw",m),I=5e3;function C(t){const[S,n]=c.useState([]),[y,r]=c.useState(!1),[w,l]=c.useState(null),[o,p]=c.useState(()=>new Set);c.useEffect(()=>{if(!t){n([]),l(null),r(!1);return}const e=t;let a=!1;async function d(g){if(!a){g&&r(!0);try{const h=await s.localAgentSchedules(e);if(a)return;n(h.schedules),l(null)}catch(h){a||l(f(h))}finally{!a&&g&&r(!1)}}}d(!0);const u=window.setInterval(()=>{d(!1)},I);return()=>{a=!0,window.clearInterval(u)}},[t]);async function L(){if(t){r(!0);try{const e=await s.syncLocalAgentSchedules(t);n(e.schedules),l(null)}catch(e){l(f(e))}finally{r(!1)}}}async function A(e){if(!(!t||o.has(e.id))){i(e.id,!0);try{await s.runLocalAgentSchedule(t,e.id);const a=await s.localAgentSchedules(t);n(a.schedules),l(null)}catch(a){l(f(a))}finally{i(e.id,!1)}}}async function E(e){if(!(!t||o.has(e.id))){i(e.id,!0);try{await s.patchLocalAgentSchedule(t,e.id,{enabled:!e.enabled});const a=await s.localAgentSchedules(t);n(a.schedules),l(null)}catch(a){l(f(a))}finally{i(e.id,!1)}}}function i(e,a){p(d=>{const u=new Set(d);return a?u.add(e):u.delete(e),u})}return{error:w,loading:y,pendingScheduleIds:o,refresh:L,run:A,schedules:S,toggle:E}}function f(t){return t instanceof Error?t.message:String(t)}export{x as R,C as u};
@@ -1 +1 @@
1
- import{r as f}from"./index-CpTHPmvd.js";import{w as C}from"./App-BpYDvJ6x.js";function S(n,e,t){return new Set(n.filter(i=>{if(e.has(i.id))return!1;if(t===void 0)return!0;if(typeof i.timestamp!="string")return!1;const a=Date.parse(i.timestamp);return Number.isFinite(a)&&a>=t}).map(i=>i.id))}function h(n){let e=null;for(const t of n){if(typeof t.timestamp!="string")continue;const i=Date.parse(t.timestamp);Number.isFinite(i)&&(e=e===null?i:Math.max(e,i))}return e}function E(n,e){const t=f.useRef({scopeKey:e,ids:new Set(n.map(r=>r.id)),initialized:!1,liveCutoff:null}),i=t.current.scopeKey===e,d=i&&t.current.initialized?S(n,t.current.ids,t.current.liveCutoff??void 0):new Set;return f.useLayoutEffect(()=>{const r=t.current,s=r.scopeKey!==e,u=Date.now();t.current={scopeKey:e,ids:new Set(n.map(l=>l.id)),initialized:!s,liveCutoff:s?Math.max(u,h(n)??0):r.liveCutoff??Math.max(u,h(n)??0)}},[n,i,e]),d}const v=new Map,M=[200,600,1500];function x({connection:n,latestTurnId:e,sessionId:t,turnRunning:i}){const[a,d]=f.useState(()=>({sessionId:null,summaries:v}));return f.useEffect(()=>{if(!n||!t)return;let r=!1,s=null;const u=i?null:e,l=o=>{const c=M[o];c===void 0||r||(s=setTimeout(()=>{m(o+1)},c))},m=async o=>{try{const c=await C.usageTurnCache(n,t);if(r)return;const p=new Map(c.turns.map(w=>[w.turnId,w]));d({sessionId:t,summaries:p}),u&&!p.has(u)&&l(o)}catch{l(o)}};return m(0),()=>{r=!0,s!==null&&clearTimeout(s)}},[n,e,t,i]),a.sessionId===t?a.summaries:v}export{x as a,E as u};
1
+ import{r as f}from"./index-vfpCN9zy.js";import{w as C}from"./App-6AQXN2SM.js";function S(n,e,t){return new Set(n.filter(i=>{if(e.has(i.id))return!1;if(t===void 0)return!0;if(typeof i.timestamp!="string")return!1;const a=Date.parse(i.timestamp);return Number.isFinite(a)&&a>=t}).map(i=>i.id))}function h(n){let e=null;for(const t of n){if(typeof t.timestamp!="string")continue;const i=Date.parse(t.timestamp);Number.isFinite(i)&&(e=e===null?i:Math.max(e,i))}return e}function E(n,e){const t=f.useRef({scopeKey:e,ids:new Set(n.map(r=>r.id)),initialized:!1,liveCutoff:null}),i=t.current.scopeKey===e,d=i&&t.current.initialized?S(n,t.current.ids,t.current.liveCutoff??void 0):new Set;return f.useLayoutEffect(()=>{const r=t.current,s=r.scopeKey!==e,u=Date.now();t.current={scopeKey:e,ids:new Set(n.map(l=>l.id)),initialized:!s,liveCutoff:s?Math.max(u,h(n)??0):r.liveCutoff??Math.max(u,h(n)??0)}},[n,i,e]),d}const v=new Map,M=[200,600,1500];function x({connection:n,latestTurnId:e,sessionId:t,turnRunning:i}){const[a,d]=f.useState(()=>({sessionId:null,summaries:v}));return f.useEffect(()=>{if(!n||!t)return;let r=!1,s=null;const u=i?null:e,l=o=>{const c=M[o];c===void 0||r||(s=setTimeout(()=>{m(o+1)},c))},m=async o=>{try{const c=await C.usageTurnCache(n,t);if(r)return;const p=new Map(c.turns.map(w=>[w.turnId,w]));d({sessionId:t,summaries:p}),u&&!p.has(u)&&l(o)}catch{l(o)}};return m(0),()=>{r=!0,s!==null&&clearTimeout(s)}},[n,e,t,i]),a.sessionId===t?a.summaries:v}export{x as a,E as u};
@@ -1 +1 @@
1
- import{c as a}from"./App-BpYDvJ6x.js";const e=[["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"}]],y=a("bell",e);const t=[["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"}]],c=a("bell-off",t);const o=[["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"}]],k=a("scroll-text",o);const h=[["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"}]],p=a("wifi-off",h);export{c as B,k as S,p as W,y as a};
1
+ import{c as a}from"./App-6AQXN2SM.js";const e=[["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"}]],y=a("bell",e);const t=[["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"}]],c=a("bell-off",t);const o=[["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"}]],k=a("scroll-text",o);const h=[["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"}]],p=a("wifi-off",h);export{c as B,k as S,p as W,y as a};
@@ -1 +1 @@
1
- import{j7 as c}from"./WorkspaceMonacoEditor-yg83VXk5.js";import"./toggleHighContrast-e8XiQRTr.js";function a(e,o){const r=globalThis.MonacoEnvironment;if(r?.createTrustedTypesPolicy)try{return r.createTrustedTypesPolicy(e,o)}catch(t){console.error(t);return}try{return globalThis.trustedTypes?.createPolicy(e,o)}catch(t){console.error(t);return}}let n;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?n=globalThis.workerttPolicy:n=a("defaultWorkerFactory",{createScriptURL:e=>e});function l(e){const o=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker=="function")return r.getWorker("workerMain.js",o);if(typeof r.getWorkerUrl=="function"){const t=r.getWorkerUrl("workerMain.js",o);return new Worker(n?n.createScriptURL(t):t,{name:o,type:"module"})}}if(e.createWorker)return e.createWorker();throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function u(e){const o=Promise.resolve(l({label:e.label??"monaco-editor-worker",moduleId:e.moduleId,createWorker:e.createWorker})).then(r=>(r.postMessage("ignore"),r.postMessage(e.createData),r));return c.createWebWorker({worker:o,host:e.host,keepIdleModels:e.keepIdleModels})}export{u as c};
1
+ import{j7 as c}from"./WorkspaceMonacoEditor-DPZ0n0G9.js";import"./toggleHighContrast-Ce0YhEQg.js";function a(e,o){const r=globalThis.MonacoEnvironment;if(r?.createTrustedTypesPolicy)try{return r.createTrustedTypesPolicy(e,o)}catch(t){console.error(t);return}try{return globalThis.trustedTypes?.createPolicy(e,o)}catch(t){console.error(t);return}}let n;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?n=globalThis.workerttPolicy:n=a("defaultWorkerFactory",{createScriptURL:e=>e});function l(e){const o=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker=="function")return r.getWorker("workerMain.js",o);if(typeof r.getWorkerUrl=="function"){const t=r.getWorkerUrl("workerMain.js",o);return new Worker(n?n.createScriptURL(t):t,{name:o,type:"module"})}}if(e.createWorker)return e.createWorker();throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function u(e){const o=Promise.resolve(l({label:e.label??"monaco-editor-worker",moduleId:e.moduleId,createWorker:e.createWorker})).then(r=>(r.postMessage("ignore"),r.postMessage(e.createData),r));return c.createWebWorker({worker:o,host:e.host,keepIdleModels:e.keepIdleModels})}export{u as c};
@@ -1 +1 @@
1
- import{l as e}from"./WorkspaceMonacoEditor-yg83VXk5.js";import"./toggleHighContrast-e8XiQRTr.js";import"./index-CpTHPmvd.js";const r={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}}]},l={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{r as conf,l as language};
1
+ import{l as e}from"./WorkspaceMonacoEditor-DPZ0n0G9.js";import"./toggleHighContrast-Ce0YhEQg.js";import"./index-vfpCN9zy.js";const r={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}}]},l={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{r as conf,l as language};
@@ -3,12 +3,12 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png" />
7
- <link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png" />
8
- <link rel="apple-touch-icon" href="./openpond-icon.png" />
6
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
7
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
8
+ <link rel="apple-touch-icon" href="/openpond-icon.png" />
9
9
  <title>OpenPond App</title>
10
- <script type="module" crossorigin src="./assets/index-CpTHPmvd.js"></script>
11
- <link rel="stylesheet" crossorigin href="./assets/index-DUIWDN8o.css">
10
+ <script type="module" crossorigin src="/assets/index-vfpCN9zy.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-B9VSiz_z.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -26,17 +26,24 @@ Options:
26
26
 
27
27
  ```text
28
28
  Usage:
29
- openpond experiments <prepare-harness|save|read|list|executions|start|status|cancel|retry|score|passes|pass|cancel-pass|pass-result|result|compare> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>] [--json]
29
+ openpond experiments <prepare-harness|run|read|list|status|cancel|duplicate|score|passes|pass|cancel-pass|pass-result|result|compare|case> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>] [--local --server-url <loopback-origin>] [--receipt-id <id>] [--json]
30
30
 
31
31
  Options:
32
32
  --after-id <string>
33
+ --after-sequence <integer>
34
+ --content-hash <string>
33
35
  --dataset-hash <string>
34
36
  --input-file <string>
35
37
  --json
36
38
  --limit <integer>
39
+ --local
37
40
  --operation-id <string>
38
41
  --project <string>
42
+ --receipt-id <string>
43
+ --revision <integer>
39
44
  --search <string>
45
+ --server-url <string>
46
+ --status <string>
40
47
  --team <string>
41
48
  ```
42
49
  ## home
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openpond",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "openpondReleaseVersioned": true,
5
5
  "license": "MIT",
6
6
  "description": "OpenPond CLI and local harness",
@@ -77,6 +77,7 @@
77
77
  "@openpond/cloud": "workspace:*",
78
78
  "@openpond/continual-support": "workspace:*",
79
79
  "@openpond/contracts": "workspace:*",
80
+ "@openpond/evals": "workspace:*",
80
81
  "@openpond/local-server": "workspace:*",
81
82
  "@openpond/persistence": "workspace:*",
82
83
  "@openpond/runtime": "workspace:*",
@@ -95,6 +96,7 @@
95
96
  "@openpond/taskset-sdk",
96
97
  "openpond-sdk",
97
98
  "@openpond/terminal",
98
- "@openpond/persistence"
99
+ "@openpond/persistence",
100
+ "@openpond/evals"
99
101
  ]
100
102
  }
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as v}from"./chunk-65BW2QXY.js";import"./chunk-XWPC3AN4.js";import{f as b}from"./chunk-3M53YXEI.js";import{b as R,c as p,d as m}from"./chunk-XEOEKFG6.js";import{p as O}from"./chunk-XJAK6DDB.js";import{d as P}from"./chunk-DXAZUJPA.js";import"./chunk-GLUWATL5.js";import"./chunk-KCENW4ME.js";import"./chunk-2Z6H32OC.js";import"./chunk-MJC26GOX.js";import"./chunk-TPOW52DO.js";import"./chunk-QUNRWDVO.js";import"./chunk-ALZRXBEC.js";import"./chunk-MTJNKRXL.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import{a as c}from"./chunk-FTQLQJQV.js";import{promises as $,watch as C}from"node:fs";import y from"node:path";import{execFile as J}from"node:child_process";import{promisify as k}from"node:util";var K=k(J);async function G(t,n){let e=n[0]??"check",o=y.resolve(i(t,"cwd")??process.cwd()),l=i(t,"sourceDirectory"),u=i(t,"outputDirectory"),d=b(t.json);if(e==="check"||e==="build"){let r=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u});if(d){console.log(JSON.stringify({status:"passed",actionCount:r.registry.actions.length,registry:r.registry,manifest:r.manifest,outputDirectory:r.outputDirectory},null,2));return}console.log(`${e==="check"?"Validated":"Built"} ${r.registry.actions.length} Project Action${r.registry.actions.length===1?"":"s"}.`),console.log(`Registry: ${r.registryPath}`),console.log(`Bundle: ${r.bundlePath}`);return}if(e==="run"){let r=n[1];if(!r)throw new Error("usage: openpond actions run <action-id> [--input JSON|--input-file PATH]");let a=await m({projectRoot:o,sourceDirectory:l,outputDirectory:u,build:"always"}).run({actionId:r,input:await I(t,o),timeoutMs:A(t,"timeoutMs")});console.log(JSON.stringify(a,null,2));return}if(e==="dev"){let r=n[1]??null;await _({projectRoot:o,sourceDirectory:l,outputDirectory:u,actionId:r,options:t,json:d});return}if(e==="publish"){let r=j(t,"projectId"),s=j(t,"teamId"),a=i(t,"apiKey"),w=process.env.OPENPOND_API_KEY?.trim()||null,g=a||w?null:await P({account:i(t,"account")}),h=a??w??(g?v(g):null);if(!h)throw new Error("OpenPond API key is required. Select a saved OpenPond account, set OPENPOND_API_KEY, or pass --api-key.");let N=await p({projectRoot:o,sourceDirectory:l,outputDirectory:u}),E=i(t,"sourceCommitSha")??await D(o,["rev-parse","HEAD"]),S=i(t,"sourceRef")??await D(o,["rev-parse","--abbrev-ref","HEAD"]),f=await O({apiKey:h,baseUrl:i(t,"baseUrl")??(process.env.OPENPOND_API_URL?.trim()||g?.apiBaseUrl)}).actions.publish({projectId:r,teamId:s,sourceRef:S,sourceCommitSha:E,build:N});console.log(d?JSON.stringify({release:f},null,2):`Published Project Actions release ${f.id} from ${f.sourceCommitSha}.`);return}throw new Error("usage: openpond actions <check|build|run|dev|publish> [action-id]")}c(G,"runProjectActionsCommand");async function _(t){let n=!1,e=!1,o=c(async()=>{if(n){e=!0;return}n=!0;try{let r=m({projectRoot:t.projectRoot,sourceDirectory:t.sourceDirectory,outputDirectory:t.outputDirectory,build:"always"});if(t.actionId){let s=await r.run({actionId:t.actionId,input:await I(t.options,t.projectRoot),timeoutMs:A(t.options,"timeoutMs")});console.log(JSON.stringify(s,null,2))}else{let s=await r.build(),a={status:"ready",actionCount:s.registry.actions.length,bundleHash:s.manifest.bundleHash};console.log(t.json?JSON.stringify(a):`Ready with ${a.actionCount} Project Action${a.actionCount===1?"":"s"}.`)}}catch(r){console.error(r instanceof Error?r.message:String(r))}finally{n=!1,e&&(e=!1,await o())}},"execute");await o();let l=await R(t.projectRoot),u=y.resolve(t.projectRoot,t.sourceDirectory??l.sourceDirectory??"openpond/actions");console.log(`Watching ${u}`);let d=C(u,{recursive:!0},()=>{setTimeout(()=>{o()},50)});await new Promise(r=>{let s=c(()=>{d.close(),r()},"stop");process.once("SIGINT",s),process.once("SIGTERM",s)})}c(_,"runDev");async function I(t,n){let e=i(t,"input"),o=i(t,"inputFile");if(e&&o)throw new Error("Use either --input or --input-file, not both.");return e?JSON.parse(e):o?JSON.parse(await $.readFile(y.resolve(n,o),"utf8")):{}}c(I,"actionInput");function i(t,n){let e=t[n];return typeof e=="string"&&e.trim()?e.trim():void 0}c(i,"stringOption");function j(t,n){let e=i(t,n);if(!e)throw new Error(`--${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)} is required.`);return e}c(j,"requiredOption");async function D(t,n){let{stdout:e}=await K("git",n,{cwd:t}),o=e.trim();if(!o)throw new Error(`git ${n.join(" ")} returned no value.`);return o}c(D,"gitValue");function A(t,n){let e=i(t,n);if(e===void 0)return;let o=Number(e);if(!Number.isInteger(o)||o<=0)throw new Error(`--${n} must be a positive integer.`);return o}c(A,"integerOption");export{G as runProjectActionsCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{Qc as c,Rc as d}from"./chunk-Z7VAZVC5.js";import"./chunk-NT2UKDF7.js";import{e as b}from"./chunk-BJSXEGWG.js";import"./chunk-JYM3O4G7.js";import{i as a}from"./chunk-OUN6VQDO.js";import"./chunk-VTWY3U4M.js";import"./chunk-GC4OCTP6.js";import"./chunk-SUAT5DR4.js";import"./chunk-R6YJY7F2.js";import"./chunk-AT6XYNQ5.js";import"./chunk-2VTXKZNK.js";import"./chunk-EEJ3HL6O.js";import"./chunk-MOMDY22U.js";import"./chunk-S2MLTFZF.js";import"./chunk-BAQ3DWH2.js";import"./chunk-AANEPCEZ.js";import"./chunk-VI3ZF54E.js";import"./chunk-L3KS6MOV.js";import"./chunk-3CKJETWW.js";import"./chunk-XEOEKFG6.js";import"./chunk-ZQWXPDCB.js";import"./chunk-6MI4KKWF.js";import"./chunk-TPMXLA5Y.js";import"./chunk-KCENW4ME.js";import"./chunk-2Z6H32OC.js";import"./chunk-MJC26GOX.js";import"./chunk-TPOW52DO.js";import"./chunk-QUNRWDVO.js";import"./chunk-6FA3GG5B.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-ALZRXBEC.js";import"./chunk-MTJNKRXL.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-FTQLQJQV.js";export{a as AGENT_PROTOCOL_VERSION,c as APP_SERVER_COMPOSITION,d as createOpenPondAppServer,b as runAppServerJsonl};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{f as $,g as J,h as L,i as v,j as q}from"./chunk-LRGLV6JX.js";import{c as g}from"./chunk-65BW2QXY.js";import{f as m,h as y}from"./chunk-BSHAIAXY.js";import"./chunk-QZ4KTU65.js";import"./chunk-AUOMUBLE.js";import"./chunk-XWPC3AN4.js";import{a as S,f as w,j as T,k as j}from"./chunk-3M53YXEI.js";import"./chunk-OGPHXXCD.js";import"./chunk-XJAK6DDB.js";import{b as H,c as Q}from"./chunk-22UARBPW.js";import{J as C,K as G,L as k,O as W,Q as M,S as z,T as F,c as D,m as K,r as V,s as _}from"./chunk-Z2BYC6TP.js";import{d as f}from"./chunk-DXAZUJPA.js";import"./chunk-GLUWATL5.js";import"./chunk-KCENW4ME.js";import"./chunk-2Z6H32OC.js";import"./chunk-MJC26GOX.js";import"./chunk-TPOW52DO.js";import"./chunk-QUNRWDVO.js";import"./chunk-ALZRXBEC.js";import"./chunk-MTJNKRXL.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import{a as p}from"./chunk-FTQLQJQV.js";async function ie(){let e=await f(),s=m(e),t=await g(e,s),n=y(e),r=await L({apiBase:n,apiKey:t});console.log(JSON.stringify(r,null,2))}p(ie,"runAppsTools");async function se(e){let s=await f(),t=m(s),n=y(s),r=await g(s,t),i=typeof e.handle=="string"?String(e.handle):void 0,o=i?$(i):null,c=e.refresh!==void 0?w(e.refresh):void 0,l=await J({apiBase:n,apiKey:r,forceRefresh:c}),u=o?l.filter(a=>$(a.handle||a.gitOwner)===o):l;if(u.length===0){console.log("no apps found");return}if(w(e.json)){console.log(JSON.stringify({apps:u},null,2));return}for(let a of u){let d=a.handle||a.gitOwner||"unknown",h=a.repo||a.gitRepo||a.id,B=a.latestDeployment?.status||"no-deploy",R=a.latestDeployment?.gitBranch||a.defaultBranch||"-",I=a.codeVisibility||"unknown",E=a.sandbox?"yes":"no";console.log(`${d}/${h} ${B} ${R} code=${I} sandbox=${E} ${a.id}`)}}p(se,"runAppsList");async function oe(e,s){let t=typeof e.visibility=="string"?e.visibility.trim():typeof e.codeVisibility=="string"?e.codeVisibility.trim():"";if(t!=="public"&&t!=="private")throw new Error("usage: apps code-visibility <handle>/<repo> --visibility public|private");let n=await f(),r=m(n),i=y(n),o=await g(n,r),{app:c,handle:l,repo:u}=await v(i,o,s),a=await K(i,o,c.id,t);console.log(`${l}/${u} code_visibility=${a.app?.codeVisibility??t} app_id=${c.id}`)}p(oe,"runAppsCodeVisibility");async function ae(e){let s=await f(),t=m(s),n=await g(s,t),r=y(s),i=typeof e.appId=="string"?String(e.appId):void 0,o=await G(r,n,{appId:i});console.log(JSON.stringify(o,null,2))}p(ae,"runAppsPerformance");async function ce(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await k(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(ce,"runAppsSummary");async function le(e,s,t,n){let r=(typeof e.prompt=="string"?e.prompt:null)||n.join(" ");if(!r.trim())throw new Error("usage: apps assistant <plan|performance> <handle>/<repo> --prompt <text>");let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,t),a=await W(c,l,{appId:u.id,mode:s,prompt:r.trim()});console.log(JSON.stringify(a,null,2))}p(le,"runAppsAssistant");async function de(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),o=(typeof e.prompt=="string"?e.prompt:null)||s.join(" ");if(!o.trim())throw new Error("usage: apps agent create --prompt <text> [--team-id <id>]");let c=typeof e.templateRepoUrl=="string"?e.templateRepoUrl:void 0,l=typeof e.templateBranch=="string"?e.templateBranch:void 0,u=typeof e.templateLocalPath=="string"?e.templateLocalPath:void 0,a=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():void 0;if(u&&String(u).trim().length>0)throw new Error("templateLocalPath is not supported; use templateRepoUrl");let d=typeof e.env=="string"?S(e.env,"env"):void 0;if(d){if(typeof d!="object"||Array.isArray(d))throw new Error("env must be a JSON object");for(let[b,A]of Object.entries(d))if(typeof A!="string")throw new Error(`env value for ${b} must be a string`)}let h=c||l||d?{templateRepoUrl:c,templateBranch:l,envVars:d}:void 0,B=typeof e.deployEnvironment=="string"?e.deployEnvironment==="preview"?"preview":"production":void 0,R=e.deployDisabled!==void 0?w(e.deployDisabled):void 0,I=e.streamDeployLogs!==void 0?w(e.streamDeployLogs):!0,E=await C(i,r,{prompt:o.trim(),...a?{teamId:a}:{},...h?{template:h}:{},...B?{deployEnvironment:B}:{},...R!==void 0?{deployDisabled:R}:{},streamDeployLogs:I});if(!E.ok){let b=await E.text().catch(()=>"");throw new Error(`agent create failed: ${E.status} ${b}`)}let N=null,O=null,P=null;await H(E,{onConversationId:p(b=>{N=b},"onConversationId"),onItems:p(b=>{for(let A of b){let U=Q(A);U&&console.log(U);let x=A;!O&&typeof x.appId=="string"&&(O=x.appId),!P&&typeof x.deploymentId=="string"&&(P=x.deploymentId)}},"onItems")}),N&&console.log(`conversation_id: ${N}`),O&&console.log(`app_id: ${O}`),P&&console.log(`deployment_id: ${P}`);try{await J({apiBase:i,apiKey:r,forceRefresh:!0}),await L({apiBase:i,apiKey:r,forceRefresh:!0})}catch(b){console.warn("cache refresh failed",b)}}p(de,"runAppsAgentCreate");async function pe(e,s,t,n){let r=await f(),i=m(r),o=await g(r,i),c=y(r),l=typeof e.method=="string"?String(e.method).toUpperCase():void 0,u=l&&["GET","POST","PUT","DELETE"].includes(l)?l:void 0;if(l&&!u)throw new Error("method must be GET, POST, PUT, or DELETE");let a=typeof e.body=="string"?S(String(e.body),"body"):void 0,d=typeof e.headers=="string"?S(String(e.headers),"headers"):void 0,h=typeof e.scheduleId=="string"?String(e.scheduleId):void 0,B=w(e.notifyEmail),R=w(e.summary)||w(e.withSummary),I=await M(c,o,{appId:s,deploymentId:t,toolName:n,scheduleId:h,method:u,body:a,headers:d,notifyEmail:B||void 0});if(console.log(JSON.stringify(I,null,2)),R&&I.ok){let E=await k(c,o,s);console.log(JSON.stringify({summary:E},null,2))}}p(pe,"runAppsToolsExecute");async function ue(e,s){let t=typeof e.env=="string"?e.env:typeof e.vars=="string"?e.vars:typeof e.envVars=="string"?e.envVars:null;if(!t)throw new Error("usage: apps env set <handle>/<repo> --env <json>");let n=S(t,"env");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("env must be a JSON object");let r={};for(let[d,h]of Object.entries(n)){if(typeof h!="string")throw new Error(`env value for ${d} must be a string`);if(!d.startsWith("OPENTOOL_PUBLIC_"))throw new Error("only OPENTOOL_PUBLIC_ env vars can be set");r[d]=h}let i=await f(),o=m(i),c=y(i),l=await g(i,o),{app:u}=await v(c,l,s),a=await V(c,l,u.id,{envVars:r});console.log(JSON.stringify(a,null,2))}p(ue,"runAppsEnvSet");async function fe(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o}=await v(r,i,s),c=await _(r,i,o.id);console.log(JSON.stringify(c,null,2))}p(fe,"runAppsEnvGet");async function ge(e,s){let t=await f(),n=m(t),r=y(t),i=await g(t,n),{app:o,handle:c,repo:l}=await v(r,i,s),u=typeof e.env=="string"?e.env:typeof e.environment=="string"?e.environment:void 0,a=j(u),d=await D(r,i,o.id,{environment:a});console.log(JSON.stringify(d,null,2)),(w(e.watch)||w(e.wait)||w(e.follow))&&await q({baseUrl:r,apiKey:i,deploymentId:d.deploymentId,prefix:`[${c}/${l}] `,intervalMs:e.interval?Number(e.interval):void 0,timeoutMs:e.timeout?Number(e.timeout):void 0})}p(ge,"runAppsDeploy");function X(e){let s={};if(typeof e.params=="string"){let n=S(String(e.params),"params");if(!n||typeof n!="object"||Array.isArray(n))throw new Error("params must be a JSON object");for(let[r,i]of Object.entries(n))i!==void 0&&(s[r]=typeof i=="string"?i:JSON.stringify(i))}let t=p((n,r)=>{r===void 0||r===""||(s[n]=r)},"addParam");if(t("source",typeof e.source=="string"?e.source.trim():void 0),t("symbol",typeof e.symbol=="string"?e.symbol.trim():void 0),t("cursor",typeof e.cursor=="string"?e.cursor.trim():void 0),t("status",typeof e.status=="string"?e.status.trim():void 0),t("backtestRunId",typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():void 0),t("since",T(e.since,"since")),t("until",T(e.until,"until")),typeof e.limit=="string"&&e.limit.trim().length>0){let n=Number.parseInt(e.limit,10);if(!Number.isFinite(n))throw new Error("limit must be a number");t("limit",String(n))}return Object.keys(s).length?s:void 0}p(X,"resolveBacktestEventsParams");async function me(e,s){let t=await f(),n=m(t),r=await g(t,n),i=y(t),{app:o}=await v(i,r,s),c={...X(e)??{},appId:o.id},l=await z(i,r,{method:"GET",query:c});console.log(JSON.stringify(l,null,2))}p(me,"runBacktestEvents");async function ye(e,s){let t=typeof e.runId=="string"?e.runId.trim():typeof e.backtestRunId=="string"?e.backtestRunId.trim():"";if(!t)throw new Error("usage: backtest get <handle>/<repo> --run-id <id>");let n=await f(),r=m(n),i=await g(n,r),o=y(n),{app:c}=await v(o,i,s),l=await F(o,i,{appId:c.id,runId:t});console.log(JSON.stringify(l,null,2))}p(ye,"runBacktestGet");export{X as resolveBacktestEventsParams,de as runAppsAgentCreate,le as runAppsAssistant,oe as runAppsCodeVisibility,ge as runAppsDeploy,fe as runAppsEnvGet,ue as runAppsEnvSet,se as runAppsList,ae as runAppsPerformance,ce as runAppsSummary,ie as runAppsTools,pe as runAppsToolsExecute,me as runBacktestEvents,ye as runBacktestGet};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{$ as ve,A as ie,Aa as Ee,B as te,Ba as Te,C as ne,Ca as N,E as re,Ea as De,F as ae,Fa as qe,G as oe,I as se,K as ce,M as de,O as y,P as u,Q as me,R as le,S as ue,T as pe,U as ge,W as he,X as fe,Y as be,_ as xe,a as m,aa as we,b as H,ba as Se,ca as P,da as Re,ea as _e,fa as _,ga as I,ia as ke,ja as Ie,ka as ye,la as F,q as X,ra as Ae,s as Y,ta as B,ua as Le,w as Z,wa as Ce,x as ee,y as V,za as je}from"./chunk-TPOW52DO.js";import{a,b as E,c as l,e as C,l as k}from"./chunk-HZP5U2AA.js";import{b as e}from"./chunk-ES2ISFJC.js";import{a as c}from"./chunk-FTQLQJQV.js";var M=e.discriminatedUnion("kind",[e.object({kind:e.literal("manual"),identity:a}).strict(),e.object({kind:e.literal("schedule"),scheduledAt:l}).strict(),e.object({kind:e.literal("approved_count"),checkedAt:l}).strict()]),$=e.object({schemaVersion:e.literal("openpond.learningChain.v1"),id:a,revision:e.number().int().positive(),modelProjectId:a,activeIterationId:a.nullable(),acceptedParent:P.nullable().optional(),latestIterationId:a,lastReservedAt:l.nullable(),updatedAt:l}).strict(),K=e.object({eligible:e.number().int().nonnegative(),awaitingReview:e.number().int().nonnegative(),excluded:e.number().int().nonnegative(),consumed:e.number().int().nonnegative()}).strict(),Pe=e.object({schemaVersion:e.literal("openpond.learningConsumption.v1"),id:a,revision:e.literal(1),chainId:a,iterationId:a,evidence:u,decision:u,reservedAt:l}).strict(),Oe=e.object({schemaVersion:e.literal("openpond.learningIterationReservation.v1"),id:a,revision:e.number().int().positive(),chainId:a,iterationId:a,policy:u,trigger:M,requestHash:E,outcome:e.enum(["reserved","waiting_for_data","waiting_for_review"]),counts:K,budget:e.object({maximumSpendUsd:e.number().nonnegative(),reservedSpendUsd:e.number().nonnegative(),settledSpendUsd:e.number().nonnegative(),settledAt:l.nullable()}).strict(),createdAt:l,updatedAt:l}).strict();var v=e.object({operationId:a}),Ye=v.extend({action:e.literal("import_intake"),format:De,files:e.array(qe).min(1).max(100),expectedPreviewHash:e.string().length(64),name:e.string().trim().min(1).max(500),recordIds:e.array(e.string().min(1).max(200)).min(1).max(90)}).strict(),O=v.extend({action:e.literal("publish"),expectedRevision:e.number().int().nonnegative(),finalizeDraft:N.optional()}),He=e.discriminatedUnion("kind",[O.extend({kind:e.literal("asset"),content:Ie}).strict(),O.extend({kind:e.literal("definition"),content:me}).strict(),O.extend({kind:e.literal("reward"),content:ee}).strict(),O.extend({kind:e.literal("binding"),content:ie}).strict(),O.extend({kind:e.literal("source"),content:ue}).strict(),O.extend({kind:e.literal("policy"),content:we}).strict()]),Ze=v.extend({action:e.literal("publish_resources"),finalizeDraft:N.optional(),resources:e.array(e.union(He.options.map(t=>t.omit({operationId:!0,action:!0,finalizeDraft:!0})))).min(1).max(20)}).strict(),ei=v.extend({action:e.literal("submit_example"),example:ge}).strict(),ii=v.extend({action:e.literal("submit_feedback"),feedback:fe}).strict(),ti=v.extend({action:e.literal("apply_correction"),feedbackId:a,evidence:u}).strict(),ni=v.extend({action:e.literal("resolve_feedback"),feedbackId:a,expectedRevision:e.number().int().positive(),disposition:e.enum(["applied","rejected","superseded"]),decision:u.nullable(),note:e.string().max(2e4)}).strict(),ri=v.extend({action:e.literal("queue_grade"),evidence:u,target:e.enum(["observed","proposed_target"]),proposedTarget:y.nullable(),timeoutMs:e.number().int().min(100).max(3e5).default(3e4),maximumSpendUsd:e.number().nonnegative().max(1e3).default(0)}).strict(),ai=v.extend({action:e.literal("review"),evidence:u,expectedRevision:e.number().int().nonnegative(),disposition:e.enum(["approved","rejected","pending"]),targetApproval:e.enum(["approved","rejected","pending","not_required"]),approvedTarget:y.nullable(),observedGradeId:a.nullable(),targetGradeId:a.nullable(),note:e.string().max(2e4)}).strict(),oi=v.extend({action:e.literal("seal_batch"),batchId:a,taskDefinition:u,purpose:e.enum(["supervised_training","reward_training","evaluation"]),evidence:e.array(u).min(1).max(1e4),decisions:e.array(u).min(1).max(1e4)}).strict(),si=v.extend({action:e.literal("cancel_grade"),gradeId:a,expectedRevision:e.number().int().positive()}).strict(),ci=v.extend({action:e.literal("save_draft"),expectedRevision:e.number().int().nonnegative(),draft:Ee}).strict(),di=v.extend({action:e.literal("archive_draft"),draft:u}).strict(),mi=v.extend({action:e.literal("queue_reward_check"),draft:u,timeoutMs:e.number().int().min(100).max(3e5).default(3e4),maximumSpendUsd:e.number().nonnegative().max(1e3).default(0)}).strict(),li=v.extend({action:e.literal("cancel_reward_check"),checkId:a,expectedRevision:e.number().int().positive()}).strict(),ui=v.extend({action:e.literal("publish_checked_reward"),draft:u,checkId:a,checkRevision:e.number().int().positive()}).strict(),pi=v.extend({action:e.literal("reserve_iteration"),policy:u,trigger:M}).strict(),gi=v.extend({action:e.literal("cancel_iteration_reservation"),iterationId:a,expectedRevision:e.number().int().positive()}).strict(),hi=v.extend({action:e.literal("cancel_iteration"),iterationId:a,expectedRevision:e.number().int().positive()}).strict(),fi=v.extend({action:e.literal("retry_iteration_dispatch"),iterationId:a,expectedRevision:e.number().int().positive()}).strict(),Fe=e.union([ui,Ye,hi,fi,gi,pi,mi,li,ci,di,He,Ze,ei,ii,ti,ni,ri,ai,oi,si]);var bi=e.object({provider:a,protocol:a,payload:y}).strict(),Be=e.object({schemaVersion:e.literal("openpond.learningIterationDispatch.v1"),id:a,revision:e.number().int().positive(),iterationId:a,chainId:a,policy:u,batch:u,state:e.enum(["preparing","prepared","submitted","settled","blocked"]),submission:bi.nullable(),submissionHash:e.string().regex(/^[a-f0-9]{64}$/).nullable(),submissionStartedAt:l.nullable(),execution:C.nullable(),terminalReceipt:C.nullable(),cancelRequestedAt:l.nullable(),leaseOwner:a.nullable(),leaseGeneration:e.number().int().nonnegative(),leaseExpiresAt:l.nullable(),consecutiveFailures:e.number().int().nonnegative(),nextAttemptAt:l.nullable(),lastError:e.string().max(2e4).nullable(),createdAt:l,updatedAt:l}).strict().superRefine((t,i)=>{(!!t.submission!=!!t.submissionHash||t.submission&&k(t.submission)!==t.submissionHash)&&i.addIssue({code:"custom",path:["submissionHash"],message:"Dispatch submission identity changed."}),t.submissionStartedAt&&!t.submission&&i.addIssue({code:"custom",path:["submission"],message:"A started dispatch requires its persisted submission."}),t.execution&&!t.submissionStartedAt&&i.addIssue({code:"custom",path:["execution"],message:"An execution requires a started dispatch."}),["prepared","submitted"].includes(t.state)&&!t.submission&&i.addIssue({code:"custom",path:["state"],message:"A prepared dispatch requires its immutable submission."}),t.state==="submitted"&&!t.execution&&i.addIssue({code:"custom",path:["execution"],message:"A submitted dispatch requires an observed execution."}),t.state==="settled"&&t.submissionStartedAt&&!t.terminalReceipt&&i.addIssue({code:"custom",path:["terminalReceipt"],message:"A started dispatch requires terminal receipt evidence before settlement."}),!!t.leaseOwner!=!!t.leaseExpiresAt&&i.addIssue({code:"custom",path:["leaseOwner"],message:"Dispatch lease owner and expiration must be recorded together."})}),Ui=e.object({scope:a,dispatchId:a,submissionHash:e.string().regex(/^[a-f0-9]{64}$/),execution:C.nullable(),status:e.enum(["running","evaluating","succeeded","failed","cancelled"]),spendUsd:e.number().nonnegative(),cleanupComplete:e.boolean(),receipt:C.nullable(),evaluation:C.nullable(),candidate:C.nullable(),failure:e.string().max(2e4).nullable()}).strict().superRefine((t,i)=>{["succeeded","failed","cancelled"].includes(t.status)&&(!t.cleanupComplete||!t.receipt)&&i.addIssue({code:"custom",path:["receipt"],message:"Terminal execution requires an authoritative cleanup receipt."}),t.status!=="cancelled"&&!t.execution&&i.addIssue({code:"custom",path:["execution"],message:"The execution identity is required."}),t.candidate&&(t.status!=="succeeded"||!t.evaluation)&&i.addIssue({code:"custom",path:["candidate"],message:"A candidate requires successful retained evaluation."})});var Ue=e.object({schemaVersion:e.literal("openpond.learningSchedule.v1"),id:a,revision:e.number().int().positive(),policy:u,modelProjectId:a,executionOwner:e.enum(["local","hosted"]),state:e.enum(["scheduled","disabled","blocked"]),intervalSeconds:e.number().int().min(60).max(31536e3).nullable(),calendar:de.nullable().default(null),nextRunAt:l.nullable(),lastFire:u.nullable(),consecutiveFailures:e.number().int().nonnegative(),nextAttemptAt:l.nullable(),lastError:e.string().max(2e4).nullable(),createdAt:l,updatedAt:l}).strict().superRefine((t,i)=>{t.state!=="disabled"&&(!t.intervalSeconds&&!t.calendar||!t.nextRunAt)&&i.addIssue({code:"custom",path:["nextRunAt"],message:"An active timer must retain its cadence and due time."}),t.state==="disabled"&&t.nextRunAt&&i.addIssue({code:"custom",path:["nextRunAt"],message:"A disabled timer cannot have a pending occurrence."}),t.intervalSeconds&&t.calendar&&i.addIssue({code:"custom",path:["calendar"],message:"A timer uses either an interval or a nightly calendar."})}),Ve=e.object({schemaVersion:e.literal("openpond.learningScheduleFire.v1"),id:a,revision:e.literal(1),scheduleId:a,policy:u,scheduledAt:l,coalescedThroughAt:l,coalescedCount:e.number().int().nonnegative(),outcome:e.enum(["reserved","waiting_for_data","waiting_for_review","skipped"]),reason:e.enum(["active_iteration","cooldown","daily_budget"]).nullable(),iteration:e.object({id:a,revision:e.number().int().positive()}).strict().nullable(),createdAt:l,contentHash:E}).strict().superRefine((t,i)=>{(t.outcome==="skipped"!=!!t.reason||t.outcome!=="skipped"!=!!t.iteration)&&i.addIssue({code:"custom",path:["outcome"],message:"A fire retains either its reservation or its explicit skip reason."})});function Je(t){H(t,262144);let i=je.parse(t.fields),n=t.base?V.parse(t.base):null;if(n&&n.id!==t.id)throw new m("reward_authoring_base_mismatch",422);let o=i.fixtures?.length?F({text:JSON.stringify(i.fixtures),path:"reward-fixtures.json",mediaType:"application/json",visibility:"verifier"}):null,r=null,s,d;if(i.kind==="custom_verifier")r=F({text:i.code,path:"verifier.mjs",mediaType:"application/javascript",visibility:"verifier"}),s={kind:i.kind,verifierRef:r.asset,exportName:i.exportName,timeoutMs:T(i.timeout,"Time limit"),networkPolicy:"none",...n?.implementation.kind==="custom_verifier"&&n.implementation.runtime!==void 0?{runtime:n.implementation.runtime}:{}};else if(i.kind==="model_judge"||i.kind==="human"){if(!i.rubric.trim())throw new m("reward_rubric_required",422,"Write the rubric before checking or publishing this Reward.");if(r=F({text:i.rubric,path:"rubric.md",mediaType:"text/markdown",visibility:"verifier"}),i.kind==="human")s={kind:i.kind,rubricRef:r.asset,reviewerRole:i.reviewerRole};else{let h={providerId:i.providerId,modelId:i.modelId,revision:i.modelRevision.trim()||null},x=T(i.temperature,"Temperature"),w=n?.implementation,b=w?.kind==="model_judge"&&w.rubricRef.contentHash===r.asset.contentHash&&w.model?.providerId===h.providerId&&w.model?.modelId===h.modelId&&w.model?.revision===h.revision&&(w.temperature??0)===x&&n?.fixtureSetRef?.contentHash===o?.asset.contentHash;s={kind:i.kind,rubricRef:r.asset,model:h,temperature:x,calibrationStatus:b?w.calibrationStatus:"pending"},b&&(d=n?.calibrationCheckRef)}}else i.kind==="learned_model"?(D(i.inputContract,"Model input contract"),r=F({text:i.inputContract,path:"input-contract.json",mediaType:"application/json",visibility:"verifier"}),s={kind:i.kind,modelVersion:{id:i.learnedId,contentHash:i.learnedHash},inputContract:r.asset}):i.kind==="state"?s={kind:i.kind,config:{fields:$e(i.fields)}}:i.kind==="content"?s={kind:i.kind,config:{outputField:i.outputField,expectedField:i.expectedField,...i.expectedValue?{expectedValue:i.expectedValue}:{}}}:i.kind==="schema"?s={kind:i.kind,config:{jsonSchema:D(i.schema,"Output schema")}}:i.kind==="artifact"?s={kind:i.kind,config:{refIncludes:i.reference}}:s={kind:i.kind,config:{requiredEvents:$e(i.events)}};let g=[...r?[r]:[],...o?[o]:[]];return{reward:re({schemaVersion:"openpond.rewardRelease.v1",id:t.id,revision:(n?.revision??0)+1,name:i.name,description:i.description,feedbackKey:i.feedbackKey??Z({id:t.id}),implementation:s,rawScore:i.kind==="learned_model"?{minimum:T(i.minimum,"Minimum score"),maximum:T(i.maximum,"Maximum score")}:{minimum:0,maximum:1},assets:g.map(h=>h.asset),...o?{fixtureSetRef:o.asset}:{},...d?{calibrationCheckRef:d}:{}}),assets:g}}c(Je,"compileRewardAuthoring");function D(t,i){try{let n=JSON.parse(t);return H(n,131072),y.parse(n)}catch{throw new m("reward_authoring_json_invalid",422,`${i} must be a JSON object.`)}}c(D,"parseRewardAuthoringObject");function T(t,i){let n=Number(t);if(!t.trim()||!Number.isFinite(n))throw new m("reward_authoring_number_invalid",422,`${i} must be a finite number.`);return n}c(T,"authoringNumber");function $e(t){return t.split(",").map(i=>i.trim()).filter(Boolean)}c($e,"split");var ze=e.object({id:a,name:e.string().trim().min(1).max(500),input:y,output:y,expectedOutput:y.nullable(),evaluatorContext:y.nullable(),artifactRefs:e.array(a).max(100),runtimeEventRefs:e.array(a).max(100),infrastructureError:e.string().max(2e4).nullable(),expected:e.discriminatedUnion("status",[e.object({status:e.literal("scored"),minimum:e.number().finite(),maximum:e.number().finite(),passed:e.boolean().nullable()}).strict(),e.object({status:e.enum(["pending","unavailable","failed"])}).strict()])}).strict().superRefine((t,i)=>{t.expected.status==="scored"&&t.expected.minimum>t.expected.maximum&&i.addIssue({code:"custom",path:["expected"],message:"Expected score minimum must not exceed maximum."})}),xi=e.object({id:a,packageVersion:e.string().min(1).max(100),engine:e.string().min(1).max(200)}).strict(),Ne=e.object({fixture:e.object({id:a,contentHash:E}).strict(),result:ne,matchesExpectation:e.boolean()}).strict(),Me=e.object({schemaVersion:e.literal("openpond.rewardCheckRun.v1"),id:a,revision:e.number().int().positive(),draft:u,reward:u,snapshotHash:E,fixtureRefs:e.array(e.object({id:a,contentHash:E}).strict()).min(1).max(50),status:e.enum(["queued","running","completed","failed","cancelling","cancelled"]),runtime:xi.nullable(),results:e.array(Ne).max(50),matchesExpectations:e.boolean().nullable(),failure:e.string().max(2e4).nullable(),timeoutMs:e.number().int().min(100).max(3e5),maximumSpendUsd:e.number().nonnegative().max(1e3),judgeCalls:e.array(ce).max(1e3).optional(),requestedBy:a.optional(),leaseOwner:a.nullable(),leaseExpiresAt:l.nullable(),attemptCount:e.number().int().nonnegative(),createdAt:l,updatedAt:l}).strict();function vi(t){if(!t.length||t.length>50)throw new m("reward_check_fixtures_required",422,"Add between one and 50 fixtures before checking this Reward.");if(new Set(t.map(i=>i.id)).size!==t.length)throw new m("reward_fixture_id_duplicate",422);return t.map(i=>ze.parse({id:i.id,name:i.name,input:D(i.input,`${i.name}: input`),output:D(i.output,`${i.name}: output`),expectedOutput:i.expectedOutput.trim()?D(i.expectedOutput,`${i.name}: expected answer`):null,evaluatorContext:i.evaluatorContext.trim()?D(i.evaluatorContext,`${i.name}: evaluator context`):null,artifactRefs:i.artifactRefs.map(n=>n.trim()).filter(Boolean),runtimeEventRefs:i.runtimeEventRefs.map(n=>n.trim()).filter(Boolean),infrastructureError:i.infrastructureError||null,expected:i.expectedStatus==="scored"?{status:i.expectedStatus,minimum:T(i.minimumScore,`${i.name}: minimum score`),maximum:T(i.maximumScore,`${i.name}: maximum score`),passed:i.expectedPassed==="any"?null:i.expectedPassed==="true"}:{status:i.expectedStatus}}))}c(vi,"compileRewardFixtures");function lt(t,i){let n=Je({id:t.targetId,fields:t.fields,base:i}),o=vi(t.fields.fixtures??[]),r=o.map(s=>({id:s.id,contentHash:k(s)}));return{...n,fixtures:o,fixtureRefs:r,snapshotHash:k({reward:n.reward,fixtures:o})}}c(lt,"compileRewardCheck");async function ut(t){let i=ze.parse(t.fixture),n=X.parse({id:i.id,clusterKey:i.id,split:"validation",input:i.input,expectedOutput:i.expectedOutput,privilegedContextRef:null}),o=ae({schemaVersion:"openpond.rewardBinding.v1",id:`fixture-binding-${k(_(t.reward))}`,revision:1,sources:[{graderId:t.reward.id,reward:_(t.reward),role:"evaluation",normalization:t.reward.rawScore.minimum===0&&t.reward.rawScore.maximum===1?{kind:"identity"}:{kind:"linear",minimum:t.reward.rawScore.minimum,maximum:t.reward.rawScore.maximum,direction:"higher"},weight:1,required:!0,hardGate:!1,privileged:!0,fixtureRefs:[]}],aggregation:"weighted_mean",unscorable:"exclude_optional_require_all_required"},[t.reward]);return(await se({binding:o,rewards:[t.reward],task:n,evidence:{output:i.output,artifactRefs:i.artifactRefs,runtimeEventRefs:i.runtimeEventRefs,infrastructureError:i.infrastructureError},signal:t.signal,customVerifier:t.customVerifier,modelJudge:t.modelJudge,purpose:"fixture_calibration"})).results[0]}c(ut,"executeRewardFixture");function pt(t,i){let n=t.expected,o=i.status===n.status&&(n.status!=="scored"||i.rawScore!==null&&i.rawScore>=n.minimum&&i.rawScore<=n.maximum&&(n.passed===null||n.passed===i.passed));return Ne.parse({fixture:{id:t.id,contentHash:k(t)},result:i,matchesExpectation:o})}c(pt,"matchRewardFixture");var J={draft:Te,reward_check:Me,asset:ye,definition:le,reward:V,binding:te,source:pe,evidence:he,feedback:be,decision:xe,batch:ve,policy:Se,chain:$,consumption:Pe,reservation:Oe,dispatch:Be,schedule:Ue,schedule_fire:Ve,iteration:Re,grade:_e,package:Y},G=e.enum(Object.keys(J)),Ke=class extends m{static{c(this,"LearningConflictError")}kind;id;expectedRevision;currentRevision;constructor(i,n,o,r){super("learning_revision_conflict",409,`Revision conflict for ${i} ${n}: expected ${o}, current ${r}.`),this.kind=i,this.id=n,this.expectedRevision=o,this.currentRevision=r,this.name="LearningConflictError"}};async function L(t,i,n,o){let r=await t.get(i,n,o);if(!r)throw new m("learning_resource_not_found",404,`${i}:${n}`);return J[i].parse(r)}c(L,"requireLearningResource");async function S(t,i,n){let o=await L(t,i,n.id,n.revision);if(!("contentHash"in o)||o.contentHash!==n.contentHash)throw new m("learning_release_hash_mismatch",409,`${i}:${n.id}`);return ke(o),o}c(S,"requireLearningRelease");function Lt(t,i,n){return`evidence-${k([t,i,n])}`}c(Lt,"learningEvidenceId");function Ct(t,i){return k([t,i])}c(Ct,"learningOperationId");async function Ht(t,i,n,o){let{batch:r,release:s,evidence:d,definition:g}=await Q(t,i,n,o);for(let f of d)for(let h of B(f,g))await t.reserveFamilySplit(h.namespace,h.kind,h.key,h.split);return await t.put("batch",r,0,{parentId:g.id}),await t.put("package",s,0,{parentId:r.id}),[Ge("batch",r),Ge("package",s)]}c(Ht,"sealLearningBatch");async function Q(t,i,n,o){let r=await S(t,"definition",i.taskDefinition),s=await S(t,"binding",r.rewardBinding),d=await Promise.all(s.sources.map(b=>S(t,"reward",b.reward)));oe(s,d);let g=await Promise.all(i.evidence.map(b=>wi(t,b))),f=await Promise.all(i.decisions.map(async b=>{let R=await S(t,"decision",b),p=await L(t,"decision",b.id);if(!I(_(p),b))throw new m("task_admission_revision_stale",409);return R})),h=[];for(let b of g)for(let R of B(b,r)){let p=await t.familySplit(R.namespace,R.kind,R.key);p!==null&&h.push({...R,split:p})}let x=Le({id:i.batchId,definition:r,binding:s,rewards:d,purpose:i.purpose,evidence:g,decisions:f,priorSplits:h,actorId:n,now:o}),w=Ce({batch:x,definition:r,binding:s,rewards:d,evidence:g,decisions:f});return{batch:x,release:w,evidence:g,definition:r}}c(Q,"prepareLearningBatch");async function wi(t,i){let n=await S(t,"evidence",i),o=await L(t,"evidence",i.id);if(!I(_(o),i))throw new m("task_evidence_revision_stale",409);return n}c(wi,"requireCurrentLearningEvidence");function Ge(t,i){return{kind:t,id:i.id,revision:i.revision}}c(Ge,"pointer");async function Qe(t,i,n){let o=new Date(n).toISOString().slice(0,10),r=0,s=0,d;do{let g=await t.list("reservation",{parentId:i,limit:100,...d?{afterId:d}:{}});for(let{budget:f}of g.items)r+=f.reservedSpendUsd,f.settledAt&&new Date(f.settledAt).toISOString().slice(0,10)===o&&(s+=f.settledSpendUsd);d=g.nextCursor??void 0}while(d);return{reservedSpendUsd:r,settledSpendUsd:s,committedSpendUsd:r+s}}c(Qe,"readLearningIterationBudget");function W(t){return`chain-${k(t)}`}c(W,"learningChainId");function Si(t,i){return`consumption-${k([t,i.id,i.revision])}`}c(Si,"learningConsumptionId");async function z(t,i,n={}){let o=i.training.method==="sft"?"supervised_training":"reward_training";if(!["sft","grpo","ppo"].includes(i.training.method))throw new m("learning_batch_method_unsupported",422);if(i.admission.mode!=="human")throw new m("learning_automatic_admission_not_available",422);let r=await S(t,"definition",i.taskDefinition);if(!I(r.rewardBinding,i.rewardBinding))throw new m("learning_policy_binding_mismatch",422);let s={eligible:0,awaitingReview:0,excluded:0,consumed:0},d=[],g=[],f=W(i.modelProjectId),h=new Set,x=0;for(let w of i.sources){let b=await S(t,"source",w),R=await L(t,"source",b.id);if(!b.enabled||!R.enabled)throw new m("learning_source_disabled",409);if(!I(b.taskDefinition,i.taskDefinition))throw new m("learning_policy_source_definition_mismatch",422);let p;do{let j=await t.list("evidence",{parentId:b.id,limit:100,...p?{afterId:p}:{}});for(let A of j.items){if(h.has(A.id))continue;if(h.add(A.id),!i.sources.some(U=>I(A.source,U))||!I(A.submission.taskDefinition,i.taskDefinition)||A.submission.split!=="train"){s.excluded+=1;continue}if(await t.get("consumption",Si(f,A))){s.consumed+=1;continue}if(++x>i.limits.maxBacklogExamples)throw new m("learning_backlog_limit_exceeded",409);let q=await t.get("decision",`decision-${A.id}`);if(!q||!I(q.evidence,_(A))||q.taskAdmissibility==="pending"||q.actor.kind!=="human"){s.awaitingReview+=1;continue}try{Ae({decision:q,evidence:A,definition:r,purpose:o})}catch(U){if(!(U instanceof m))throw U;s.excluded+=1;continue}s.eligible+=1,n.collectEligible&&g.push(_(A)),d.length<i.limits.maxBatchExamples&&d.push({evidence:A,decision:q})}p=j.nextCursor??void 0}while(p)}return{counts:s,selected:d,purpose:o,eligibleEvidence:g}}c(z,"inspectIterationEligibility");async function We(t,i,n=!1){let o=null,r;do{let s=await t.list("iteration",{parentId:i,status:"accepted",limit:100,...r?{afterId:r}:{}});for(let d of s.items){if(!d.candidateVersion||!d.candidateDecision||!d.candidateDecisionAt||!d.trainingJob){if(n)throw new m("learning_accepted_parent_evidence_missing",409);continue}let g=P.parse({iterationId:d.id,iterationRevision:d.revision,candidate:d.candidateVersion,decision:d.candidateDecision,decidedAt:d.candidateDecisionAt}),f=[Date.parse(g.decidedAt),g.decision.id,g.decision.revision],h=o?[Date.parse(o.decidedAt),o.decision.id,o.decision.revision]:null;(!h||f[0]>h[0]||f[0]===h[0]&&(f[1]>h[1]||f[1]===h[1]&&f[2]>h[2]))&&(o=g)}r=s.nextCursor??void 0}while(r);return o}c(We,"latestAcceptedLearningParent");async function Xe(t,i,n){if(!n)return{trainingParent:i.trainingParent,trainingParentSelection:null};let o=await L(t,"iteration",n.iterationId,n.iterationRevision),r=await S(t,"policy",o.policy);if(o.status!=="accepted"||!o.candidateVersion||!o.candidateDecision||!o.trainingJob||o.candidateVersion.id!==n.candidate.id||o.candidateVersion.contentHash!==n.candidate.contentHash||!I(o.candidateDecision,n.decision)||o.candidateDecisionAt!==n.decidedAt||r.modelProjectId!==i.modelProjectId||r.executionOwner!==i.executionOwner)throw new m("learning_accepted_parent_evidence_mismatch",409);if(r.trainingParent.id!==i.trainingParent.id||r.trainingParent.contentHash!==i.trainingParent.contentHash||r.training.method!==i.training.method)throw new m("learning_accepted_parent_configuration_mismatch",409,"The accepted checkpoint belongs to a different starting model or training method.");return{trainingParent:n.candidate,trainingParentSelection:n}}c(Xe,"resolveLearningTrainingParent");var Ri=e.object({policy:u,modelProjectId:a,inspectedAt:l,chain:$.nullable(),trainingParent:e.object({reference:C,selection:P.nullable()}).strict().nullable().default(null),counts:K.nullable(),minimumApprovedExamples:e.number().int().positive(),canReserve:e.boolean(),blockers:e.array(e.object({code:e.string().min(1).max(200),message:e.string().min(1).max(2e4)}).strict()).max(20),cooldownUntil:l.nullable(),budget:e.object({reservedSpendUsd:e.number().nonnegative(),settledSpendUsd:e.number().nonnegative(),committedSpendUsd:e.number().nonnegative(),maximumIterationSpendUsd:e.number().nonnegative(),maximumDailySpendUsd:e.number().nonnegative()}).strict()}).strict();async function ln(t,i,n,o){let r=await S(t,"policy",i),s=await L(t,"policy",r.id);if(!I(_(s),i))throw new m("learning_policy_revision_stale",409);let d=W(r.modelProjectId),g=await t.get("chain",d),f=await Qe(t,d,o),h=[],x=c((p,j)=>{h.push({code:p,message:j})},"block");r.enabled||x("learning_policy_paused","Learning is paused."),(r.automation.accept||r.automation.serve)&&x("learning_automatic_acceptance_not_available","Candidates require explicit acceptance and serving selection."),g?.activeIterationId&&x("learning_iteration_active","An iteration is already active.");let w=g?.lastReservedAt&&Date.parse(o)-Date.parse(g.lastReservedAt)<r.limits.cooldownSeconds*1e3?new Date(Date.parse(g.lastReservedAt)+r.limits.cooldownSeconds*1e3).toISOString():null;w&&x("learning_iteration_cooldown","The training cooldown has not elapsed."),f.committedSpendUsd+r.limits.maxIterationSpendUsd>r.limits.maxDailySpendUsd&&x("learning_daily_budget_exhausted","The daily budget cannot cover another iteration's maximum spend.");let b=null;try{let p=await z(t,r);b=p.counts,b.eligible<r.admission.minimumApprovedExamples?b.awaitingReview>0?x("learning_waiting_for_review","More approved tasks are required before training."):x("learning_waiting_for_data","More eligible new tasks are required before training."):await Q(t,{action:"seal_batch",operationId:"policy-inspection",batchId:"policy-inspection",taskDefinition:r.taskDefinition,purpose:p.purpose,evidence:p.selected.map(j=>_(j.evidence)),decisions:p.selected.map(j=>_(j.decision))},n,o)}catch(p){if(!(p instanceof m))throw p;x(p.code,p.message.slice(0,2e4))}let R=null;try{let p=await Xe(t,r,await We(t,d,!0));R={reference:p.trainingParent,selection:p.trainingParentSelection}}catch(p){if(!(p instanceof m))throw p;x(p.code,p.message.slice(0,2e4))}return Ri.parse({policy:_(r),modelProjectId:r.modelProjectId,inspectedAt:o,chain:g,trainingParent:R,counts:b,minimumApprovedExamples:r.admission.minimumApprovedExamples,canReserve:h.length===0,blockers:h,cooldownUntil:w,budget:{...f,maximumIterationSpendUsd:r.limits.maxIterationSpendUsd,maximumDailySpendUsd:r.limits.maxDailySpendUsd}})}c(ln,"inspectLearningPolicy");var _i=e.object({modelProjectId:a.nullable(),inspectedAt:l,pendingTrainingCount:e.number().int().nonnegative().nullable(),issues:e.array(e.object({policyId:a,code:e.string(),message:e.string()}).strict())}).strict();async function wn(t,i,n){let o=new Set,r=[],s;do{let d=await t.list("policy",{limit:100,...i?{parentId:i}:{},...s?{afterId:s}:{}});for(let g of d.items)try{let f=await z(t,g,{collectEligible:!0}),h=await S(t,"definition",g.taskDefinition);for(let x of f.eligibleEvidence){let w=await S(t,"evidence",x),b=!1;for(let R of B(w,h)){let p=await t.familySplit(R.namespace,R.kind,R.key);if(p!==null&&p!=="train"){b=!0;break}}b||o.add(JSON.stringify([x.id,x.revision,x.contentHash]))}}catch(f){if(!(f instanceof m))throw f;r.push({policyId:g.id,code:f.code,message:f.message})}s=d.nextCursor??void 0}while(s);return _i.parse({modelProjectId:i,inspectedAt:n,pendingTrainingCount:r.length?null:o.size,issues:r})}c(wn,"inspectLearningTaskQueue");function jn(t){try{H(t,16777216)}catch(i){throw new m("learning_json_invalid",400,i instanceof Error?i.message:"Expected bounded JSON.")}}c(jn,"assertLearningRequestJson");var En=e.object({scope:a,command:Fe}).strict(),Tn=e.discriminatedUnion("action",[e.object({action:e.literal("inspect_task_queue"),scope:a,modelProjectId:a.nullable()}).strict(),e.object({action:e.literal("inspect_policy"),scope:a,policy:u}).strict(),e.object({action:e.literal("inspect_evidence"),scope:a,evidence:u}).strict(),e.object({action:e.literal("get"),scope:a,kind:G,id:a,revision:e.number().int().positive().optional()}).strict(),e.object({action:e.literal("list"),scope:a,kind:G,parentId:a.optional(),status:e.string().min(1).max(200).optional(),reviewState:e.enum(["inbox","reviewed"]).optional(),afterId:a.optional(),limit:e.number().int().min(1).max(100).default(50)}).strict()]),Dn=e.object({evidence:u,definition:u,inspection:e.object({evidenceValidity:e.enum(["valid","invalid"]),taskReady:e.boolean(),observedOutputValid:e.boolean().nullable(),issues:e.array(e.object({path:e.string(),code:e.string(),message:e.string()}).strict()).max(100)}).strict()}).strict(),qn=e.object({operationId:a,resources:e.array(e.union(Object.values(J))).max(100)}).strict();export{$ as a,Pe as b,Oe as c,Fe as d,Be as e,Ue as f,xi as g,Me as h,lt as i,ut as j,pt as k,J as l,Ke as m,L as n,S as o,Lt as p,Ct as q,Ht as r,wi as s,W as t,Si as u,z as v,Qe as w,We as x,Xe as y,Ri as z,ln as A,_i as B,wn as C,jn as D,En as E,Tn as F,Dn as G,qn as H};