shopify 3.94.2 → 4.0.0

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 (295) hide show
  1. package/bin/run.js +5 -1
  2. package/dist/analytics-6IHHYAV6.js +1 -0
  3. package/dist/analytics-KKVP5DT3.js +1 -0
  4. package/dist/bootstrap.d.ts +5 -0
  5. package/dist/bootstrap.js +3 -0
  6. package/dist/chunk-22PCRFG4.js +1 -0
  7. package/dist/chunk-26D72ZNV.js +1 -0
  8. package/dist/chunk-2APPXD5Z.js +2 -0
  9. package/dist/chunk-2I4PRX2I.js +1 -0
  10. package/dist/chunk-2VQJQ36C.js +103 -0
  11. package/dist/chunk-323UTVMM.js +1 -0
  12. package/dist/chunk-3DQIVE24.js +9 -0
  13. package/dist/chunk-3F6NZK7S.js +2 -0
  14. package/dist/chunk-3LVGAQB4.js +1 -0
  15. package/dist/chunk-3TNEIDOD.js +1 -0
  16. package/dist/chunk-3VZEETAV.js +1 -0
  17. package/dist/chunk-4G7J6HIV.js +1 -0
  18. package/dist/chunk-4HHXSMD7.js +10 -0
  19. package/dist/chunk-4LNCYIS3.js +1 -0
  20. package/dist/chunk-4ZGSSQC6.js +1 -0
  21. package/dist/chunk-52GC6XUT.js +1 -0
  22. package/dist/chunk-5CH3B62S.js +2 -0
  23. package/dist/chunk-5Y7GIF2W.js +1 -0
  24. package/dist/chunk-66RJ5T7A.js +102 -0
  25. package/dist/chunk-6B53BWJW.js +1 -0
  26. package/dist/chunk-6BMMB2UO.js +1 -0
  27. package/dist/chunk-6HBRBQAN.js +6 -0
  28. package/dist/chunk-6M3ZYNGO.js +451 -0
  29. package/dist/chunk-6TZAAS5H.js +1 -0
  30. package/dist/chunk-72F3YBNA.js +1 -0
  31. package/dist/chunk-74HYYXXE.js +17 -0
  32. package/dist/chunk-75VPUOC5.js +1 -0
  33. package/dist/chunk-7BGM2GAH.js +1 -0
  34. package/dist/chunk-7UYZQN4V.js +18 -0
  35. package/dist/chunk-A74GETYC.js +1 -0
  36. package/dist/chunk-AIV5RI3X.js +1 -0
  37. package/dist/chunk-ALKTLKQ6.js +5 -0
  38. package/dist/chunk-B2EHO7ZC.js +847 -0
  39. package/dist/chunk-B2IVY4V5.js +1 -0
  40. package/dist/chunk-BDVAE5MS.js +28 -0
  41. package/dist/chunk-CERXUPGC.js +14 -0
  42. package/dist/chunk-D3TSJA5S.js +1 -0
  43. package/dist/chunk-D6JARNEH.js +1 -0
  44. package/dist/chunk-DFMQWJQ3.js +3 -0
  45. package/dist/chunk-DJONKJSZ.js +1 -0
  46. package/dist/chunk-DJQVNH7P.js +567 -0
  47. package/dist/chunk-DU4WR4OP.js +1 -0
  48. package/dist/chunk-ELVFJ7BR.js +4 -0
  49. package/dist/chunk-ELYP4KFP.js +8 -0
  50. package/dist/chunk-FFQ5EWII.js +294 -0
  51. package/dist/chunk-FUOIGXI4.js +1 -0
  52. package/dist/chunk-GD7FWXJ5.js +2 -0
  53. package/dist/chunk-GFEAKSGV.js +374 -0
  54. package/dist/chunk-GFJ7UV74.js +1 -0
  55. package/dist/chunk-GNPS5SBU.js +1 -0
  56. package/dist/chunk-GOJ2QHSR.js +1 -0
  57. package/dist/chunk-HSK7YMRE.js +359 -0
  58. package/dist/chunk-HUZUORYM.js +19 -0
  59. package/dist/chunk-HZA6IAA4.js +1 -0
  60. package/dist/chunk-IASVAERO.js +1 -0
  61. package/dist/chunk-IIIVWD4R.js +1 -0
  62. package/dist/chunk-INEU4XKS.js +6 -0
  63. package/dist/chunk-IOLVEXM6.js +1 -0
  64. package/dist/chunk-IU2ZQ6TE.js +2 -0
  65. package/dist/chunk-IX5ICOBV.js +7 -0
  66. package/dist/chunk-J3KVONB3.js +6 -0
  67. package/dist/chunk-JGXWQULI.js +1 -0
  68. package/dist/chunk-JHPRFW5B.js +19 -0
  69. package/dist/chunk-JLBH7RCF.js +4 -0
  70. package/dist/chunk-JPGO36XP.js +1 -0
  71. package/dist/chunk-JUVAGMIH.js +1 -0
  72. package/dist/chunk-JVIKCGDY.js +1 -0
  73. package/dist/chunk-K2WUCOQJ.js +32 -0
  74. package/dist/chunk-K5YV6UVF.js +4 -0
  75. package/dist/chunk-KBQ4LGFB.js +1 -0
  76. package/dist/chunk-KGXQS7LS.js +1 -0
  77. package/dist/chunk-KL5Z3T6L.js +1 -0
  78. package/dist/chunk-KLMDWDT2.js +1 -0
  79. package/dist/chunk-KNVM7N3U.js +1 -0
  80. package/dist/chunk-KWJ562F2.js +12 -0
  81. package/dist/chunk-LALIKZPS.js +5 -0
  82. package/dist/chunk-LAZJ47DZ.js +6 -0
  83. package/dist/chunk-LDGAHMS7.js +159 -0
  84. package/dist/chunk-LNHLDRC5.js +1 -0
  85. package/dist/chunk-LW7U753G.js +1 -0
  86. package/dist/chunk-LX3ZOW52.js +12 -0
  87. package/dist/chunk-LXFJDCNG.js +1 -0
  88. package/dist/chunk-MBAFWQSZ.js +7 -0
  89. package/dist/chunk-MOA33ZFO.js +1 -0
  90. package/dist/chunk-MQNYGGAM.js +1 -0
  91. package/dist/chunk-N5YIPQ6J.js +1 -0
  92. package/dist/chunk-N7RBSKYT.js +1 -0
  93. package/dist/chunk-NF2ABOOU.js +1 -0
  94. package/dist/chunk-NRAFVIU3.js +1 -0
  95. package/dist/chunk-OCOY5MV2.js +1 -0
  96. package/dist/chunk-ODNGDO4H.js +50 -0
  97. package/dist/chunk-OHY4ZL3U.js +2 -0
  98. package/dist/chunk-OLZHWPZP.js +1 -0
  99. package/dist/chunk-OUOYKNMY.js +1 -0
  100. package/dist/chunk-OXPWCC7I.js +64 -0
  101. package/dist/chunk-P5VVOLGV.js +1 -0
  102. package/dist/chunk-P6XE4MH5.js +1 -0
  103. package/dist/chunk-P7R7FBY2.js +3 -0
  104. package/dist/chunk-PD5ZHJWI.js +1 -0
  105. package/dist/chunk-PIBY5DDZ.js +1 -0
  106. package/dist/chunk-Q7ING5F5.js +1 -0
  107. package/dist/chunk-QFWIDATO.js +1 -0
  108. package/dist/chunk-QRRNOVJ3.js +1 -0
  109. package/dist/chunk-QSTEVZFQ.js +1 -0
  110. package/dist/chunk-R466TU3N.js +2 -0
  111. package/dist/chunk-RF2DPBA6.js +1 -0
  112. package/dist/chunk-RFG5RMPL.js +1 -0
  113. package/dist/chunk-RM5SJJN6.js +559 -0
  114. package/dist/chunk-RVNMVBPM.js +1 -0
  115. package/dist/chunk-SBEZBZM7.js +144 -0
  116. package/dist/chunk-SGQ6D3LU.js +15 -0
  117. package/dist/chunk-SRCQVUMC.js +1 -0
  118. package/dist/chunk-TFSBQ4RY.js +5 -0
  119. package/dist/chunk-TQYMC7TH.js +1 -0
  120. package/dist/chunk-UGDBJTLP.js +6 -0
  121. package/dist/chunk-UGXYQ23Y.js +1411 -0
  122. package/dist/chunk-UWJ73J4B.js +1 -0
  123. package/dist/chunk-V2CNCPIE.js +2 -0
  124. package/dist/chunk-VBUZWRUL.js +1 -0
  125. package/dist/chunk-VS3T5YOG.js +264 -0
  126. package/dist/chunk-VWYM4OWK.js +1 -0
  127. package/dist/chunk-VY6SNDKW.js +3 -0
  128. package/dist/chunk-WDC3KIZT.js +2 -0
  129. package/dist/chunk-WFXRSKRK.js +1 -0
  130. package/dist/chunk-WXVZJJOR.js +16 -0
  131. package/dist/chunk-WZBSLU4Q.js +6 -0
  132. package/dist/chunk-XBXMPFXM.js +1 -0
  133. package/dist/chunk-XEFQQPL4.js +1 -0
  134. package/dist/chunk-XLELNRFF.js +3 -0
  135. package/dist/chunk-XNO6DZYP.js +1 -0
  136. package/dist/chunk-Y5JKV2AI.js +1 -0
  137. package/dist/chunk-YC6G4MHD.js +3 -0
  138. package/dist/chunk-YI232QLS.js +1 -0
  139. package/dist/chunk-YMWHHINU.js +1 -0
  140. package/dist/chunk-YOZNRLFC.js +1 -0
  141. package/dist/chunk-YZDDTYTU.js +11 -0
  142. package/dist/chunk-Z35BTAM6.js +2 -0
  143. package/dist/chunk-ZR76GGZ6.js +5 -0
  144. package/dist/chunk-ZTMSBSYD.js +1 -0
  145. package/dist/chunk-ZV6NCNI4.js +586 -0
  146. package/dist/chunk-ZVJVDCIM.js +1 -0
  147. package/dist/cli/commands/app/app-logs/sources.js +2 -0
  148. package/dist/cli/commands/app/build.js +1 -0
  149. package/dist/cli/commands/app/bulk/cancel.js +1 -0
  150. package/dist/cli/commands/app/bulk/execute.js +9 -0
  151. package/dist/cli/commands/app/bulk/status.js +5 -0
  152. package/dist/cli/commands/app/config/link.js +4 -0
  153. package/dist/cli/commands/app/config/pull.js +1 -0
  154. package/dist/cli/commands/app/config/use.js +1 -0
  155. package/dist/cli/commands/app/config/validate.js +3 -0
  156. package/dist/cli/commands/app/demo/watcher.js +1 -0
  157. package/dist/cli/commands/app/deploy.js +22 -0
  158. package/dist/cli/commands/app/dev/clean.js +5 -0
  159. package/dist/cli/commands/app/dev.js +320 -0
  160. package/dist/cli/commands/app/env/pull.js +11 -0
  161. package/dist/cli/commands/app/env/show.js +1 -0
  162. package/dist/cli/commands/app/execute.js +1 -0
  163. package/dist/cli/commands/app/function/build.js +1 -0
  164. package/dist/cli/commands/app/function/info.js +16 -0
  165. package/dist/cli/commands/app/function/replay.js +5 -0
  166. package/dist/cli/commands/app/function/run.js +1 -0
  167. package/dist/cli/commands/app/function/schema.js +1 -0
  168. package/dist/cli/commands/app/function/typegen.js +1 -0
  169. package/dist/cli/commands/app/generate/extension.js +5 -0
  170. package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
  171. package/dist/cli/commands/app/import-extensions.js +1 -0
  172. package/dist/cli/commands/app/info.js +11 -0
  173. package/dist/cli/commands/app/init.js +10 -0
  174. package/dist/cli/commands/app/logs.js +2 -0
  175. package/dist/cli/commands/app/release.js +4 -0
  176. package/dist/cli/commands/app/versions/list.js +1 -0
  177. package/dist/cli/commands/app/webhook/trigger.js +25 -0
  178. package/dist/cli/commands/auth/login.js +1 -20
  179. package/dist/cli/commands/auth/logout.js +1 -12
  180. package/dist/cli/commands/cache/clear.js +1 -11
  181. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
  182. package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
  183. package/dist/cli/commands/config/autoupgrade/off.js +1 -22
  184. package/dist/cli/commands/config/autoupgrade/on.js +1 -22
  185. package/dist/cli/commands/config/autoupgrade/status.js +1 -30
  186. package/dist/cli/commands/debug/command-flags.js +1 -79
  187. package/dist/cli/commands/docs/generate.js +1 -157
  188. package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
  189. package/dist/cli/commands/doctor-release/theme/index.js +1 -56
  190. package/dist/cli/commands/help.js +1 -26
  191. package/dist/cli/commands/kitchen-sink/async.js +1 -16
  192. package/dist/cli/commands/kitchen-sink/index.js +1 -21
  193. package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
  194. package/dist/cli/commands/kitchen-sink/static.js +1 -16
  195. package/dist/cli/commands/notifications/generate.js +1 -11
  196. package/dist/cli/commands/notifications/list.js +1 -33
  197. package/dist/cli/commands/organization/list.js +1 -0
  198. package/dist/cli/commands/search.js +1 -27
  199. package/dist/cli/commands/theme/check.js +1 -0
  200. package/dist/cli/commands/theme/console.js +15 -0
  201. package/dist/cli/commands/theme/delete.js +7 -0
  202. package/dist/cli/commands/theme/dev.js +26 -0
  203. package/dist/cli/commands/theme/duplicate.js +32 -0
  204. package/dist/cli/commands/theme/info.js +1 -0
  205. package/dist/cli/commands/theme/init.js +8 -0
  206. package/dist/cli/commands/theme/language-server.js +1 -0
  207. package/dist/cli/commands/theme/list.js +1 -0
  208. package/dist/cli/commands/theme/metafields/pull.js +3 -0
  209. package/dist/cli/commands/theme/open.js +8 -0
  210. package/dist/cli/commands/theme/package.js +7 -0
  211. package/dist/cli/commands/theme/preview.js +1 -0
  212. package/dist/cli/commands/theme/profile.js +3 -0
  213. package/dist/cli/commands/theme/publish.js +7 -0
  214. package/dist/cli/commands/theme/pull.js +3 -0
  215. package/dist/cli/commands/theme/push.js +28 -0
  216. package/dist/cli/commands/theme/rename.js +6 -0
  217. package/dist/cli/commands/theme/share.js +3 -0
  218. package/dist/cli/commands/upgrade.js +1 -17
  219. package/dist/cli/commands/version.js +1 -10
  220. package/dist/command-registry.d.ts +8 -0
  221. package/dist/command-registry.js +1 -0
  222. package/dist/conf-store-U5ZITKJN.js +1 -0
  223. package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
  224. package/dist/deprecations-TU5UQJVV.js +1 -0
  225. package/dist/dist-2Z5TND4U.js +1 -0
  226. package/dist/dist-GYHFDHKP.js +1 -0
  227. package/dist/environments-Z5PR7DSI.js +1 -0
  228. package/dist/error-IJGNYKZ3.js +1 -0
  229. package/dist/error-handler-WSCGNS2P.js +1 -0
  230. package/dist/fs-5BDEA2KD.js +1 -0
  231. package/dist/hooks/app-init.d.ts +9 -0
  232. package/dist/hooks/app-init.js +1 -0
  233. package/dist/hooks/did-you-mean.d.ts +1 -0
  234. package/dist/hooks/did-you-mean.js +1 -0
  235. package/dist/hooks/hydrogen-init.d.ts +7 -0
  236. package/dist/hooks/hydrogen-init.js +1 -0
  237. package/dist/hooks/plugin-plugins.d.ts +1 -0
  238. package/dist/hooks/plugin-plugins.js +1 -0
  239. package/dist/hooks/postrun.js +1 -1
  240. package/dist/hooks/prerun.js +1 -1
  241. package/dist/hooks/public-metadata.d.ts +1 -0
  242. package/dist/hooks/public-metadata.js +1 -0
  243. package/dist/hooks/sensitive-metadata.d.ts +1 -0
  244. package/dist/hooks/sensitive-metadata.js +1 -0
  245. package/dist/hooks/tunnel-provider.d.ts +1 -0
  246. package/dist/hooks/tunnel-provider.js +1 -0
  247. package/dist/hooks/tunnel-start.d.ts +1 -0
  248. package/dist/hooks/tunnel-start.js +1 -0
  249. package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
  250. package/dist/index.js +254 -3668
  251. package/dist/is-global-V4ZRHQG2.js +1 -0
  252. package/dist/latest-version-EFWBOTWM.js +49 -0
  253. package/dist/lib-5L7UKDEK.js +1 -0
  254. package/dist/lib-C3VO2BQW.js +1 -0
  255. package/dist/lib-QB6I6CTC.js +1 -0
  256. package/dist/local-6QPX4GCJ.js +1 -0
  257. package/dist/local-storage-JLXBZVWO.js +1 -0
  258. package/dist/metadata-UDMOTRS7.js +1 -0
  259. package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
  260. package/dist/node-package-manager-HAFRYGUM.js +1 -0
  261. package/dist/notifications-system-MP7WDOCS.js +1 -0
  262. package/dist/npa-ICFSA3NL.js +1 -0
  263. package/dist/output-YGMHXEIS.js +1 -0
  264. package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
  265. package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
  266. package/dist/system-KLXD4FXF.js +1 -0
  267. package/dist/tsconfig.tsbuildinfo +1 -1
  268. package/dist/typescript-K5CWIA4V.js +1 -0
  269. package/dist/ui-GHG3UGB3.js +1 -0
  270. package/dist/upgrade-OPZGPM5J.js +1 -0
  271. package/dist/version-D5PJZIRW.js +1 -0
  272. package/dist/version-KRQBMYCH.js +1 -0
  273. package/dist/workerd-L2EJKIAQ.js +18 -0
  274. package/oclif.manifest.json +5247 -6056
  275. package/package.json +17 -41
  276. package/dist/chunk-2E6Y4J4T.js +0 -3
  277. package/dist/chunk-45T5XUIM.js +0 -1
  278. package/dist/chunk-52KHWFYF.js +0 -1
  279. package/dist/chunk-FU2Y2M3M.js +0 -5
  280. package/dist/chunk-JBSYWYIP.js +0 -2
  281. package/dist/chunk-KVWHPGOA.js +0 -415
  282. package/dist/chunk-LH4VO6EV.js +0 -63
  283. package/dist/chunk-PRNHS74J.js +0 -847
  284. package/dist/chunk-RXF32AET.js +0 -396
  285. package/dist/chunk-SVA22NZQ.js +0 -607
  286. package/dist/chunk-YPE4BWWD.js +0 -3
  287. package/dist/error-handler-CRWXGODM.js +0 -1
  288. package/dist/http-proxy-node16-TTURN6MD.js +0 -38
  289. package/dist/lib-3WHF5XD3.js +0 -1
  290. package/dist/local-7MUCLBBI.js +0 -1
  291. package/dist/node-package-manager-GFIGZZ24.js +0 -1
  292. package/dist/npa-OKDXXRCU.js +0 -1
  293. package/dist/ui-AOFJCTTO.js +0 -1
  294. package/dist/workerd-VBG5LYNX.js +0 -18
  295. /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
@@ -0,0 +1,359 @@
1
+ import{a as Nc,e as Mc,f as jc}from"./chunk-P7R7FBY2.js";import{a as Lc}from"./chunk-ELYP4KFP.js";import{c as Bc,i as Rc,o as ly}from"./chunk-7MUKLZOL.js";import{b as cy}from"./chunk-5Y7GIF2W.js";import{N as Ec,P as bc,Q as Dc,fa as Cc,ma as Oc,p as wc,z as un}from"./chunk-B2EHO7ZC.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as ho}from"./chunk-LAZJ47DZ.js";import{b as hn}from"./chunk-YZDDTYTU.js";import{A as rt,D as Pc,F as Sr,d as uy,r as Be,u as mt,v as Cr,w as Xe,y as cn,z as tt}from"./chunk-BDVAE5MS.js";import{d as I,g as ln}from"./chunk-JPGO36XP.js";import{a as yc,c as vc,d as ao,e as Dr,f as ey,g as uo,h as ty,i as ry,j as xc,k as co,m as sy,n as lo,o as oy,q as ay}from"./chunk-LDGAHMS7.js";import{b as Z0,c as et}from"./chunk-ZR76GGZ6.js";import{b as Q0}from"./chunk-EENHXSWU.js";import{a as ny}from"./chunk-6M3ZYNGO.js";import{c as iy}from"./chunk-QYR5VPQA.js";import{$ as hc,$a as pc,Ca as oo,Ea as an,Gb as gt,Hb as Ic,Ib as Ar,Nb as it,Qb as me,Ta as U,U as uc,Wa as dc,X as cc,Z as lc,ma as X,pa as br,qb as mc,sb as gc,tb as W,ua as V,wa as sn,ya as on,zb as Sc}from"./chunk-GFEAKSGV.js";import{a as K0,b as fc}from"./chunk-T4M5CWAO.js";import{d as M,f as J,g as kt,i as le,j as Tt,k as nn,n as ac}from"./chunk-IU2ZQ6TE.js";import{a as F,c as E,e as rn,g as y}from"./chunk-VPRTJUIN.js";var Ot=E(fo=>{"use strict";y();Object.defineProperty(fo,"__esModule",{value:!0});var dy=e=>{process.stdout.write(e)},py=e=>{process.stderr.write(e)};fo.default={stderr:py,stdout:dy}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var Hc=F("node:fs"),po=F("node:fs/promises"),my=async e=>{let t;try{t=await(0,po.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=my;var gy=async e=>{let t;try{t=await(0,po.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=gy;async function zc(e){let t=await(0,po.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=zc;function yy(e,t=!0){let r=(0,Hc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=yy;async function vy(e){try{return await zc(e)}catch{}}Ce.safeReadJson=vy;function xy(e){return(0,Hc.existsSync)(e)}Ce.existsSync=xy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function wy(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=wy;function Ey(e){return e.filter(t=>!!t)}q.compact=Ey;function by(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=by;function Dy(e){if(e)return e.at(-1)}q.last=Dy;function mo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=mo(e[0],t[0]);return r!==0?r:mo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Cy(e,t){return e.sort((r,i)=>mo(t(r),t(i)))}q.sortBy=Cy;function Sy(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Sy;function Ay(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=Ay;function _y(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=_y;function Fy(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=Fy;function ky(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=ky;function Ty(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Ty;function Oy(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Oy;function Py(e){return[...new Set(e)].sort()}q.uniq=Py;function Iy(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Iy;function Ny(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function My(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(Ny(r,t)??{})).reverse())}q.mergeNestedObjects=My});var Wc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var jy=F("node:url"),Jc=yt(),By=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,By.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Jc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Jc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new jy.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ry=Vt({});ge.string=Ry});var Gc=E((rT,Ly)=>{Ly.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(yo=>{"use strict";y();Object.defineProperty(yo,"__esModule",{value:!0});var $y=F("node:fs"),qy=F("node:path"),go=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Gc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,$y.readFileSync)((0,qy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};yo.default=go});var Pt=E(fn=>{"use strict";y();Object.defineProperty(fn,"__esModule",{value:!0});fn.settings=void 0;global.oclif||(global.oclif={});fn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Uy=Pt();function Xc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Vc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Uy.settings.columns;_r.stdtermwidth=Vc||Xc(process.stdout);_r.errtermwidth=Vc||Xc(process.stderr)});var wo=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.Logger=void 0;var Yc=F("node:fs/promises"),Hy=F("node:path"),zy=Dr(),Jy=()=>new Date().toISOString(),vo,Wy=e=>new Promise(t=>{vo&&vo.unref(),vo=setTimeout(()=>t(null),e)});function Gy(e){return e.endsWith(`
2
+ `)?e.replace(/\n$/,""):e}var xo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Wy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Yc.mkdir)((0,Hy.dirname)(this.file),{recursive:!0}),await(0,Yc.appendFile)(this.file,r.join(`
3
+ `)+`
4
+ `)}),await this.flushing}log(t){t=zy(Gy(t));let r=t.split(`
5
+ `).map(i=>`${Jy()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};dn.Logger=xo});var Kt=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.config=void 0;var di=Pt(),Xy=wo();function Vy(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}pn.config={get debug(){return!!di.settings.debug},set debug(e){di.settings.debug=e,e&&Vy()},get errlog(){return di.settings.errlog},set errlog(e){e?(this.errorLogger=new Xy.Logger(e),di.settings.errlog=e):(delete this.errorLogger,delete di.settings.errlog)},errorLogger:void 0}});var Qt=E(vt=>{"use strict";y();var mi=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.CLIError=vt.addOclifExitCode=void 0;var Kc=mi(Be()),Yy=mi(vc()),Eo=mi(ao()),Ky=mi(co()),Qy=mi(Ve()),Zy=Yt(),ev=Kt();function Qc(e,t){return"oclif"in e||(e.oclif={}),e.oclif.exit=t?.exit===void 0?Qy.default.getInstance().get("exitCodes")?.default??2:t.exit,e}vt.addOclifExitCode=Qc;var pi=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(t,r={}){super(t instanceof Error?t.message:t),Qc(this,r),this.code=r.code,this.suggestions=r.suggestions}get bang(){try{return Kc.default.red(process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Yy.default)(super.stack,{pretty:!0})}render(){if(ev.config.debug)return this.stack;let t=`${this.name}: ${this.message}`;return t=(0,Ky.default)(t,Zy.errtermwidth-6,{hard:!0,trim:!1}),t=(0,Eo.default)(t,3),t=(0,Eo.default)(t,1,{includeEmptyLines:!0,indent:this.bang}),t=(0,Eo.default)(t,1),t}};vt.CLIError=pi;(function(e){class t extends e{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return Kc.default.yellow(process.platform==="win32"?"\xBB":"\u203A")}catch{}}}e.Warn=t})(pi||(vt.CLIError=pi={}))});var gn=E(mn=>{"use strict";y();Object.defineProperty(mn,"__esModule",{value:!0});mn.ExitError=void 0;var tv=Qt(),bo=class extends tv.CLIError{code="EEXIT";constructor(t=1){super(`EEXIT: ${t}`,{exit:t})}render(){return""}};mn.ExitError=bo});var vn=E(Zt=>{"use strict";y();var Zc=Zt&&Zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.applyPrettyPrintOptions=void 0;var yn=Zc(ao()),rv=Zc(co()),iv=Yt(),nv=Kt();function sv(e,t){let r=["message","code","ref","suggestions"];for(let i of r)!(i in e)&&t[i]&&(e[i]=t[i]);return e}Zt.applyPrettyPrintOptions=sv;var ov=e=>{let t="Try this:";if(!e||e.length===0)return;if(e.length===1)return`${t} ${e[0]}`;let r=e.map(i=>`* ${i}`).join(`
6
+ `);return`${t}
7
+ ${(0,yn.default)(r,2)}`};function av(e){if(nv.config.debug)return e.stack;let{bang:t,code:r,message:i,name:n,ref:o,suggestions:s}=e,c=i?`${n||"Error"}: ${i}`:void 0,h=r?`Code: ${r}`:void 0,g=ov(s),d=o?`Reference: ${o}`:void 0,f=[c,h,g,d].filter(Boolean).join(`
8
+ `),p=(0,rv.default)(f,iv.errtermwidth-6,{hard:!0,trim:!1});return p=(0,yn.default)(p,3),p=(0,yn.default)(p,1,{includeEmptyLines:!0,indent:t||""}),p=(0,yn.default)(p,1),p}Zt.default=av});var Do=E(Oe=>{"use strict";y();var uv=Oe&&Oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),cv=Oe&&Oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lv=Oe&&Oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&uv(t,e,r);return cv(t,e),t},hv=Oe&&Oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.error=void 0;var fv=hv(Ot()),el=Kt(),tl=Qt(),rl=lv(vn());function il(e,t={}){let r;if(typeof e=="string")r=new tl.CLIError(e,t);else if(e instanceof Error)r=(0,tl.addOclifExitCode)(e,t);else throw new TypeError("first argument must be a string or instance of Error");if(r=(0,rl.applyPrettyPrintOptions)(r,t),t.exit===!1){let i=(0,rl.default)(r);i&&fv.default.stderr(i+`
9
+ `),el.config.errorLogger&&el.config.errorLogger.log(r?.stack??"")}else throw r}Oe.error=il;Oe.default=il});var So=E(xn=>{"use strict";y();Object.defineProperty(xn,"__esModule",{value:!0});xn.ModuleLoadError=void 0;var dv=Qt(),Co=class extends dv.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};xn.ModuleLoadError=Co});var sl=E((DT,nl)=>{y();nl.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var ul=E((ST,al)=>{"use strict";y();var pv=sl(),mv=Array.prototype.concat,gv=Array.prototype.slice,ol=al.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];pv(o)?r=mv.call(r,gv.call(o)):r.push(o)}return r};ol.wrap=function(e){return function(){return e(ol(arguments))}}});var fl=E((_T,hl)=>{y();var gi=ty(),yi=ul(),cl=Object.hasOwnProperty,ll=Object.create(null);for(wn in gi)cl.call(gi,wn)&&(ll[gi[wn]]=wn);var wn,Pe=hl.exports={to:{},get:{}};Pe.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=Pe.get.hsl(e),i="hsl";break;case"hwb":r=Pe.get.hwb(e),i="hwb";break;default:r=Pe.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};Pe.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],c,h,g;if(c=e.match(r)){for(g=c[2],c=c[1],h=0;h<3;h++){var d=h*2;s[h]=parseInt(c.slice(d,d+2),16)}g&&(s[3]=parseInt(g,16)/255)}else if(c=e.match(t)){for(c=c[1],g=c[3],h=0;h<3;h++)s[h]=parseInt(c[h]+c[h],16);g&&(s[3]=parseInt(g+g,16)/255)}else if(c=e.match(i)){for(h=0;h<3;h++)s[h]=parseInt(c[h+1],0);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else if(c=e.match(n)){for(h=0;h<3;h++)s[h]=Math.round(parseFloat(c[h+1])*2.55);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else return(c=e.match(o))?c[1]==="transparent"?[0,0,0,0]:cl.call(gi,c[1])?(s=gi[c[1]],s[3]=1,s):null:null;for(h=0;h<3;h++)s[h]=It(s[h],0,255);return s[3]=It(s[3],0,1),s};Pe.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.to.hex=function(){var e=yi(arguments);return"#"+En(e[0])+En(e[1])+En(e[2])+(e[3]<1?En(Math.round(e[3]*255)):"")};Pe.to.rgb=function(){var e=yi(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Pe.to.rgb.percent=function(){var e=yi(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};Pe.to.hsl=function(){var e=yi(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Pe.to.hwb=function(){var e=yi(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pe.to.keyword=function(e){return ll[e.slice(0,3)]};function It(e,t,r){return Math.min(Math.max(t,e),r)}function En(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var ml=E((kT,pl)=>{y();var Fr=fl(),Ie=ry(),dl=["keyword","gray","hex"],Ao={};for(let e of Object.keys(Ie))Ao[[...Ie[e].labels].sort().join("")]=e;var bn={};function he(e,t){if(!(this instanceof he))return new he(e,t);if(t&&t in dl&&(t=null),t&&!(t in Ie))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof he)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Fr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=Ie[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=Ie[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=_o(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Ao))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ao[o];let{labels:s}=Ie[this.model],c=[];for(r=0;r<s.length;r++)c.push(e[s[r]]);this.color=_o(c)}if(bn[this.model])for(i=Ie[this.model].channels,r=0;r<i;r++){let n=bn[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}he.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Fr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Ie[this.model],{labels:r}=Ie[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new he([...this.color.map(vv(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new he([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Y("rgb",0,ae(255)),green:Y("rgb",1,ae(255)),blue:Y("rgb",2,ae(255)),hue:Y(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Y("hsl",1,ae(100)),lightness:Y("hsl",2,ae(100)),saturationv:Y("hsv",1,ae(100)),value:Y("hsv",2,ae(100)),chroma:Y("hcg",1,ae(100)),gray:Y("hcg",2,ae(100)),white:Y("hwb",1,ae(100)),wblack:Y("hwb",2,ae(100)),cyan:Y("cmyk",0,ae(100)),magenta:Y("cmyk",1,ae(100)),yellow:Y("cmyk",2,ae(100)),black:Y("cmyk",3,ae(100)),x:Y("xyz",0,ae(95.047)),y:Y("xyz",1,ae(100)),z:Y("xyz",2,ae(108.833)),l:Y("lab",0,ae(100)),a:Y("lab",1),b:Y("lab",2),keyword(e){return e!==void 0?new he(e):Ie[this.model].keyword(this.color)},hex(e){return e!==void 0?new he(e):Fr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new he(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Fr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return he.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,h=1-c;return he.rgb(c*r.red()+h*i.red(),c*r.green()+h*i.green(),c*r.blue()+h*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(Ie)){if(dl.includes(e))continue;let{channels:t}=Ie[e];he.prototype[e]=function(...r){return this.model===e?new he(this):r.length>0?new he(r,e):new he([...xv(Ie[this.model][e].raw(this.color)),this.valpha],e)},he[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=_o(r,t)),new he(i,e)}}function yv(e,t){return Number(e.toFixed(t))}function vv(e){return function(t){return yv(t,e)}}function Y(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(bn[i]||(bn[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function ae(e){return function(t){return Math.max(0,Math.min(e,t))}}function xv(e){return Array.isArray(e)?e:[e]}function _o(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}pl.exports=he});var gl=E(kr=>{"use strict";y();Object.defineProperty(kr,"__esModule",{value:!0});kr.THEME_KEYS=kr.STANDARD_CHALK=void 0;kr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];kr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var er=E(ye=>{"use strict";y();var wv=ye&&ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Ev=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bv=ye&&ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&wv(t,e,r);return Ev(t,e),t},Dv=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.getColor=ye.parseTheme=ye.colorize=void 0;var yl=Dv(Be()),Cv=bv(ml()),Sv=gl();function vl(e){return Sv.STANDARD_CHALK.includes(e)}function Av(e,t){return vl(e)?yl.default[e](t):e?yl.default.hex(e)(t):t}ye.colorize=Av;function _v(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,xl(r)]).filter(([t,r])=>r))}ye.parseTheme=_v;function xl(e){try{return vl(e)?e:new Cv.default(e).hex()}catch{}}ye.getColor=xl});var Dn=E(xt=>{"use strict";y();var Dl=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.memoizedWarn=xt.warn=void 0;var Fv=Dl(Ot()),wl=Kt(),El=Qt(),kv=Dl(vn());function Fo(e){let t;if(typeof e=="string")t=new El.CLIError.Warn(e);else if(e instanceof Error)t=(0,El.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,kv.default)(t);r&&Fv.default.stderr(r+`
10
+ `),wl.config.errorLogger&&wl.config.errorLogger.log(t?.stack??"")}xt.warn=Fo;var bl=new Set;function Tv(e){bl.has(e)||Fo(e),bl.add(e)}xt.memoizedWarn=Tv;xt.default=Fo});var kl=E(Tr=>{"use strict";y();var Ov=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.readTSConfig=void 0;var Pv=Ov(et()),Cl=F("node:fs/promises"),_l=F("node:path"),Iv=Dn(),Sl=oe(),Nv=(0,Pv.default)("read-tsconfig");function Al(e,t){try{return F.resolve(t,{paths:[e]})}catch{}}async function Fl(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,_l.dirname)(e);if(i!==e)return Fl(i,t)}async function Mv(e,t="tsconfig.json"){let r=[],i;try{i=ny()}catch{try{i=F(e+"/node_modules/typescript")}catch{}}if(!i){(0,Iv.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await Fl(o,async c=>(await(0,Cl.readdir)(c)).includes("package.json"));if(s)try{let c=await(0,Cl.readFile)(o,"utf8"),h=i?.parseConfigFileTextToJson(o,c).config;if(r.push(h),h.extends){if(h.extends.startsWith(".")){let d=Al(s,h.extends);return d?n(d):void 0}let g=Al(s,h.extends);if(g)return n(g)}return h}catch(c){Nv(c)}};return await n((0,_l.join)(e,t)),{compilerOptions:(0,Sl.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Sl.mergeNestedObjects)(r,"ts-node")}}Tr.readTSConfig=Mv});var Or=E(nt=>{"use strict";y();Object.defineProperty(nt,"__esModule",{value:!0});nt.collectUsableIds=nt.getCommandIdPermutations=nt.getPermutations=nt.Debug=void 0;var Tl=et();function jv(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Bv(...e){if(!Tl)return(...r)=>{};let t=Tl(["config",...e].join(":"));return t.enabled&&jv(),(...r)=>t(...r)}nt.Debug=Bv;function ko(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=ko(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let c=0,h=s.length;c<=h;c++){let g=s.slice(0,c),d=s.slice(c),f=[...g,i,...d];t.push(f)}}return t}nt.getPermutations=ko;function Rv(e){return ko(e.split(":")).flatMap(t=>t.join(":"))}nt.getCommandIdPermutations=Rv;var Lv=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));nt.collectUsableIds=Lv});var Pr=E(Re=>{"use strict";y();var $v=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.tsPath=Re.TS_CONFIGS=void 0;var Ol=F("node:fs/promises"),Se=F("node:path"),qv=$v(Ve()),vi=Dn(),Pl=Pt(),Uv=yt(),Hv=kl(),Nl=oe(),zv=Or(),te=(0,zv.Debug)("ts-path");Re.TS_CONFIGS={};var Il=new Set;function Jv(){return process.execPath.split(Se.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("ts-node")||process.execArgv[0].split(Se.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("tsx")?"tsx":"node"}var Cn=Jv();function Wv(e){return"code"in e&&e.code==="ENOENT"}async function Gv(e){try{if(Re.TS_CONFIGS[e])return Re.TS_CONFIGS[e];let t=await(0,Hv.readTSConfig)(e);return t?(te("tsconfig: %O",t),Re.TS_CONFIGS[e]=t,Re.TS_CONFIGS[e]):void 0}catch(t){if(Wv(t))return;te(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,vi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Xv(e,t){if(Il.has(e))return;te("registering ts-node at",e);let r=F.resolve("ts-node",{paths:[e,__dirname]});te("ts-node path:",r);let i;try{i=F(r)}catch{te(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,vi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Se.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Se.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Se.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Se.join)(e,t.compilerOptions.baseUrl)):o.push((0,Se.join)(e,"src"));let{baseUrl:s,rootDir:c,...h}=t.compilerOptions,g={compilerOptions:{...h,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};te("ts-node options: %O",g),i.register(g),Il.add(e)}function Vv(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Yv(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return Cn==="ts-node"&&i>=20}async function Kv(e,t){let r=await Gv(e);if(!r)return t;te(`Determining path for ${t}`),Cn==="tsx"||Cn==="bun"?te(`Skipping ts-node registration for ${e} because the runtime is: ${Cn}`):await Xv(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,c=o??(s??[])[0]??i;if(!c)return te(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return te(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let h=(0,Se.join)(e,n),g=(0,Se.join)(e,c),d=(0,Se.relative)(h,t),f=(0,Se.join)(g,d).replace(/\.js$/,"");return te(`lib dir: ${h}`),te(`src dir: ${g}`),te(`src directory to find: ${f}`),(0,Uv.existsSync)(f)?(te(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Ol.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Ol.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(te(`Found source file for ${t} at ${f}`),f):(te(`No source file found. Returning default path ${t}`),(0,Nl.isProd)()||(0,vi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Qv(e,t,r){let i=r?.options.isRoot?r:qv.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Se.join)(e,t);let n=Pl.settings.enableAutoTranspile??Pl.settings.tsnodeEnabled;if(n===!1)return te(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Nl.isProd)();if(n===void 0&&o&&r?.type!=="link")return te(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Vv(i,r,o))return te(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,vi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Yv(e,r,o))return te(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,vi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Kv(e,t)}catch(s){return te(s),t}}Re.tsPath=Qv});var xi=E(st=>{"use strict";y();Object.defineProperty(st,"__esModule",{value:!0});st.isPathModule=st.loadWithDataFromManifest=st.loadWithData=st.load=void 0;var Zv=F("node:fs"),Sn=F("node:path"),Po=F("node:url"),Ml=Pr(),To=So(),Bl=yt(),ex=sy(),tx=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],rx=e=>e.type!==void 0;function Io(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new To.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function ix(e,t){let r,i;try{return{filePath:r,isESM:i}=await Rl(e,t),i?await import((0,Po.pathToFileURL)(r).href):F(r)}catch(n){Io(n,i,r??t)}}st.load=ix;async function nx(e,t){let r,i;try{({filePath:r,isESM:i}=await Rl(e,t));let n=i?await import((0,Po.pathToFileURL)(r).href):F(r);return{filePath:r,isESM:i,module:n}}catch(n){Io(n,i,r??t)}}st.loadWithData=nx;async function sx(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new To.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new To.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,Sn.join)(t,n.join(Sn.sep));try{let s=i?await import((0,Po.pathToFileURL)(o).href):F(o);return{filePath:o,isESM:i,module:s}}catch(s){Io(s,i,o??t)}}st.loadWithDataFromManifest=sx;function Oo(e){switch((0,Sn.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return ex.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}st.isPathModule=Oo;async function Rl(e,t){let r,i;try{i=F.resolve(t),r=Oo(i)}catch{i=(rx(e)?await(0,Ml.tsPath)(e.root,t,e):await(0,Ml.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Bl.existsSync)(i)){n=!0;try{(0,Zv.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=jl(i);!s&&o&&(s=jl((0,Sn.join)(i,"index"))),s&&(i=s)}r=Oo(i)}return{filePath:i,isESM:r}}function jl(e){for(let t of tx){let r=`${e}${t}`;if((0,Bl.existsSync)(r))return r}return null}});var _n=E(An=>{"use strict";y();Object.defineProperty(An,"__esModule",{value:!0});An.SINGLE_COMMAND_CLI_SYMBOL=void 0;An.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var No=E(Fn=>{"use strict";y();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.cacheDefaultValue=void 0;var ox=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};Fn.cacheDefaultValue=ox});var Nr=E(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toConfiguredId=Ir.toStandardizedId=void 0;function ax(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Ir.toStandardizedId=ax;function ux(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Ir.toConfiguredId=ux});var Tn=E(kn=>{"use strict";y();Object.defineProperty(kn,"__esModule",{value:!0});kn.ensureArgObject=void 0;function cx(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}kn.ensureArgObject=cx});var Ll=E(On=>{"use strict";y();Object.defineProperty(On,"__esModule",{value:!0});On.DocOpts=void 0;var lx=Tn(),Mo=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,lx.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,c)=>s||this.flagMap[c]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let c=`${s}${o}`;t[n.name]=c,i.push(c)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};On.DocOpts=Mo});var Mr=E(ie=>{"use strict";y();var hx=ie&&ie.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),fx=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dx=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&hx(t,e,r);return fx(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.normalizeArgv=ie.formatCommandDeprecationWarning=ie.formatFlagDeprecationWarning=ie.getHelpFlagAdditions=ie.standardizeIDFromArgv=ie.template=void 0;var px=dx(yc()),mx=Or(),gx=Nr();function yx(e){function t(r){return px.render(r,e)}return t}ie.template=yx;var vx=e=>e.startsWith("-"),xx=e=>e.includes("=");function wx(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,mx.collectUsableIds)(t.commandIDs),s=[],c=d=>o.has(d),h=d=>(d?[...s,d]:s).filter(Boolean).join(":"),g=()=>{let d=h();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(c(h(d)))s.push(d);else{if(xx(d)||vx(d)||g())break;s.push(d)}return h()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function $l(e,t){return e.length===0||(t.topicSeparator===" "?e=wx(e,t):t.topicSeparator!==":"&&(e[0]=(0,gx.toStandardizedId)(e[0],t))),e}ie.standardizeIDFromArgv=$l;function Ex(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}ie.getHelpFlagAdditions=Ex;function bx(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}ie.formatFlagDeprecationWarning=bx;function Dx(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}ie.formatCommandDeprecationWarning=Dx;function Cx(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=$l(t,e)),t}ie.normalizeArgv=Cx});var Pn=E(jr=>{"use strict";y();var Br=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HelpFormatter=void 0;var Sx=Br(Be()),Ax=Br(ao()),_x=Br(uo()),wi=Br(Dr()),Fx=Br(oy()),kx=Br(co()),ql=er(),Tx=Yt(),Ox=Mr(),jo=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Tx.stdtermwidth,...r},this.render=(0,Ox.template)(this)}indent(t,r=this.indentSpacing){return(0,Ax.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let h="";for(let[g,d]of t)!g&&!d||(g&&(r.stripAnsi&&(g=(0,wi.default)(g)),h+=this.wrap(g.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,wi.default)(d)),h+=`
11
+ `,h+=this.indent(this.wrap(d.trim(),r.indentation+2),4)),h+=`
12
+
13
+ `);return h.trim()};if(r.multiline)return i();let n=(0,Fx.default)(t.map(h=>h[0]).join(`
14
+ `)),o="",s=r.spacer||`
15
+ `,c="";for(let[h,g]of t){let d=g;if(c&&(o+=s,o+=c),c=h||"",r.stripAnsi&&(c=(0,wi.default)(c)),!d){c=c.trim();continue}r.stripAnsi&&(d=(0,wi.default)(d)),d=this.wrap(d.trim(),r.indentation+n+2);let[f,...p]=d.split(`
16
+ `).map(a=>a.trim());if(c+=" ".repeat(n-(0,_x.default)(c)+2),c+=f,p.length!==0){if(p.length>4)return i();r.spacer||(s=`
17
+ `),c+=`
18
+ `,c+=this.indent(p.join(`
19
+ `),n+2)}}return c&&(o+=s,o+=c),o.trim()}section(t,r){let i;if(typeof r=="string")i=this.render(r);else if(Array.isArray(r))i=r.map(o=>{if("name"in o){let h=o;return[this.render(h.name),this.render(h.description)]}let[s,c]=o;return[this.render(s),c&&this.render(c)]});else{if("header"in r)return this.section(r.header,r.body);i=r.map(o=>[o.name,o.description]).map(([o,s])=>[this.render(o),s&&this.render(s)])}let n=[(0,ql.colorize)(this.config?.theme?.sectionHeader,Sx.default.bold(t)),(0,ql.colorize)(this.config?.theme?.sectionDescription,this.indent(Array.isArray(i)?this.renderList(i,{indentation:2,stripAnsi:this.opts.stripAnsi}):i))].join(`
20
+ `);return this.opts.stripAnsi?(0,wi.default)(n):n}wrap(t,r=this.indentSpacing){return(0,kx.default)(this.render(t),this.opts.maxWidth-r,{hard:!0})}};jr.HelpFormatter=jo});var Bo=E(tr=>{"use strict";y();var Hl=tr&&tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0});tr.CommandHelp=void 0;var Px=Hl(Be()),Ix=Hl(Dr()),ue=er(),Nx=Tn(),Ul=Nr(),Rr=oe(),Mx=Ll(),jx=Pn(),Lr=/\r\n|\n/;function Bx(e){return e==="alphabetical"?"alphabetical":e==="none"?"none":"alphabetical"}var In=class extends jx.HelpFormatter{command;config;opts;constructor(t,r,i){super(r,i),this.command=t,this.config=r,this.opts=i}aliases(t){return!t||t.length===0?void 0:t.map(i=>[(0,ue.colorize)(this.config?.theme?.dollarSign,"$"),(0,ue.colorize)(this.config?.theme?.bin,this.config.bin),(0,ue.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
21
+ `)}arg(t){let r=t.name.toUpperCase();return t.required?`${r}`:`[${r}]`}args(t){if(t.filter(r=>r.description).length!==0)return t.map(r=>{let i=this.command.strict===!1?`${r.name.toUpperCase()}...`:r.name.toUpperCase(),n=r.description||"";return r.default&&(n=`${(0,ue.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${r.default}]`)} ${n}`),r.options&&(n=`${(0,ue.colorize)(this.config?.theme?.flagOptions,`(${r.options.join("|")})`)} ${n}`),[(0,ue.colorize)(this.config?.theme?.flag,i),n?(0,ue.colorize)(this.config?.theme?.sectionDescription,n):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?Mx.DocOpts.generate(this.command):(0,Rr.compact)([this.command.id,Object.values(this.command.args??{})?.filter(t=>!t.hidden).map(t=>this.arg(t)).join(" ")]).join(" ")}description(){let t=this.command,r;if(this.opts.hideCommandSummaryInDescription)r=(t.description||"").split(Lr).slice(1);else if(t.description){let i=t.summary?`${t.summary}
22
+ `:null;r=i?[...i.split(Lr),...(t.description||"").split(Lr)]:(t.description||"").split(Lr)}if(r)return this.wrap(r.join(`
23
+ `))}examples(t){return!t||t.length===0?void 0:(0,Rr.castArray)(t).map(i=>{let n,o;if(typeof i=="string"){let g=i.split(Lr).filter(Boolean);if(g.length>=2&&!this.isCommand(g[0])&&g.slice(1).every(d=>this.isCommand(d)))n=g[0],o=g.slice(1);else return g.map(d=>this.formatIfCommand(d)).join(`
24
+ `)}else n=i.description,o=[i.command];let s=this.config.platform==="win32"?this.config.shell.includes("powershell")?"`":"^":"\\",c=this.indentSpacing*2,h=o.map(g=>this.indent(this.wrap(this.formatIfCommand(g),c+4)).split(Lr).join(` ${s}
25
+ `)).join(`
26
+ `);return`${this.wrap(n,c)}
27
+
28
+ ${h}`}).join(`
29
+
30
+ `)}flagHelpLabel(t,r=!1){let i=t.helpLabel;if(!i){let n=[];n.push(t.char?`-${t.char[0]}`:" "),t.name&&(t.type==="boolean"&&t.allowNo?n.push(`--[no-]${t.name.trim()}`):n.push(`--${t.name.trim()}`)),i=n.join(t.char?(0,ue.colorize)(this.config?.theme?.flagSeparator,", "):" ")}if(t.type==="option"){let n=t.helpValue||(this.opts.showFlagNameInTitle?t.name:"<value>");!t.helpValue&&t.options&&(n=r||this.opts.showFlagOptionsInTitle?`${t.options.join("|")}`:"<option>"),t.multiple&&(n+="..."),n.includes("|")||(n=Px.default.underline(n)),i+=`=${n}`}return(0,ue.colorize)(this.config.theme?.flag,i)}flags(t){if(t.length===0)return;let r=t.reduce((i,n)=>i&&n.char===void 0,!0);return t.map(i=>{let n=this.flagHelpLabel(i);r&&(n=n.replace(" ",""));let o=i.summary||i.description||"";return i.type==="option"&&i.default&&(o=`${(0,ue.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${i.default}]`)} ${o}`),i.required&&(o=`${(0,ue.colorize)(this.config?.theme?.flagRequired,"(required)")} ${o}`),i.type==="option"&&i.options&&!i.helpValue&&!this.opts.showFlagOptionsInTitle&&(o+=(0,ue.colorize)(this.config?.theme?.flagOptions,`
31
+ <options: ${i.options.join("|")}>`)),[n,(0,ue.colorize)(this.config?.theme?.sectionDescription,o.trim())]})}flagsDescriptions(t){let r=t.filter(n=>n.summary&&n.description);return r.length===0?void 0:r.map(n=>{let o=n.summary||"",s=this.flagHelpLabel(n,!0);return n.char||(s=s.replace(" ","")),s+=s.length+o.length+2<this.opts.maxWidth?" "+o:`
32
+
33
+ `+this.indent(this.wrap(o,this.indentSpacing*2)),`${s}
34
+
35
+ ${this.indent(this.wrap(n.description||"",this.indentSpacing*2))}`}).join(`
36
+
37
+ `)}generate(){let t=this.command,r=Object.entries(t.flags||{}).filter(([,s])=>!s.hidden).map(([s,c])=>(c.name=s,c)),i=Bx(this.opts.flagSortOrder)==="alphabetical"?(0,Rr.sortBy)(r,s=>[!s.char,s.char,s.name]):r,n=Object.values((0,Nx.ensureArgObject)(t.args)).filter(s=>!s.hidden);return(0,Rr.compact)(this.sections().map(({generate:s,header:c})=>{let h=s({args:n,cmd:t,flags:i},c);return Array.isArray(h)?h.map(g=>g&&g.body&&this.section(g.header,g.body)).join(`
38
+
39
+ `):h&&this.section(c,h)})).join(`
40
+
41
+ `)}groupFlags(t){let r=[],i={};for(let n of t){let o=n.helpGroup;o?(i[o]||(i[o]=[]),i[o].push(n)):r.push(n)}return{flagGroups:i,mainFlags:r}}sections(){let t=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},n)=>[{body:this.args(i),header:n}],header:"ARGUMENTS"},{generate:({flags:i},n)=>{let{flagGroups:o,mainFlags:s}=this.groupFlags(i),c=[],h=this.flags(s);h&&c.push({body:h,header:n});for(let[g,d]of Object.entries(o)){let f=this.flags(d);f&&c.push({body:f,header:`${g.toUpperCase()} ${n}`})}return(0,Rr.compact)(c)},header:"FLAGS"},{generate:()=>this.description(),header:"DESCRIPTION"},{generate:({cmd:i})=>this.aliases(i.aliases),header:"ALIASES"},{generate:({cmd:i})=>{let n=i.examples||i.example;return this.examples(n)},header:"EXAMPLES"},{generate:({flags:i})=>this.flagsDescriptions(i),header:"FLAG DESCRIPTIONS"}],r=this.opts.sections?.map(i=>i.toLowerCase());return t.filter(({header:i})=>!r||r.includes(i.toLowerCase()))}usage(){let{id:t,usage:r}=this.command,i=(0,Ul.toStandardizedId)(t,this.config),n=(0,Ul.toConfiguredId)(t,this.config);return(r?(0,Rr.castArray)(r):[this.defaultUsage()]).map(s=>{let c=this.opts.maxWidth-this.indentSpacing,h=(0,ue.colorize)(this.config?.theme?.dollarSign,"$"),g=(0,ue.colorize)(this.config?.theme?.bin,this.config.bin),d=(0,ue.colorize)(this.config?.theme?.command,"<%= command.id %>"),f=(0,ue.colorize)(this.config?.theme?.sectionDescription,s.replace("<%= command.id %>","").replace(i,"").replace(n,"").trim()),p=`${h} ${g} ${d} ${f}`.trim();if(p.length>c){let a=p.slice(0,Math.max(0,c)).lastIndexOf(" ");return p.slice(0,Math.max(0,a))+`
42
+ `+this.indent(this.wrap(p.slice(Math.max(0,a)),this.indentSpacing*2))}return this.wrap(p)}).join(`
43
+ `)}formatIfCommand(t){t=this.render(t);let r=(0,ue.colorize)(this.config?.theme?.dollarSign,"$");return t.startsWith(this.config.bin)?`${r} ${t}`:t.startsWith(`$ ${this.config.bin}`)?`${r}${t.replace("$","")}`:t}isCommand(t){return(0,Ix.default)(this.formatIfCommand(t)).startsWith(`${(0,ue.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};tr.CommandHelp=In;tr.default=In});var zl=E(Ei=>{"use strict";y();var Rx=Ei&&Ei.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ei,"__esModule",{value:!0});var Lx=Rx(Dr()),$r=er(),$x=oe(),qx=Pn(),Ro=class extends qx.HelpFormatter{config;opts;constructor(t,r){super(t,r),this.config=t,this.opts=r}description(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";if(t=this.render(t),t=t.split(`
44
+ `).slice(1).join(`
45
+ `),!!t)return this.section("DESCRIPTION",this.wrap((0,$r.colorize)(this.config?.theme?.sectionDescription,t)))}root(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";t=this.render(t),t=t.split(`
46
+ `)[0];let r=(0,$x.compact)([(0,$r.colorize)(this.config?.theme?.commandSummary,t),this.version(),this.usage(),this.description()]).join(`
47
+
48
+ `);return this.opts.stripAnsi&&(r=(0,Lx.default)(r)),r}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,$r.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,$r.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,$r.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,$r.colorize)(this.config?.theme?.version,this.config.userAgent)))}};Ei.default=Ro});var Ci=E(fe=>{"use strict";y();var Lo=fe&&fe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fe,"__esModule",{value:!0});fe.loadHelpClass=fe.Help=fe.HelpBase=fe.standardizeIDFromArgv=fe.normalizeArgv=fe.getHelpFlagAdditions=fe.CommandHelp=void 0;var Jl=F("node:util"),Wl=Lo(Dr()),ot=er(),Gl=Lo(Ot()),Ux=Pr(),Hx=Do(),zx=xi(),Xl=_n(),Jx=No(),Vl=Nr(),bi=oe(),Wx=Bo(),Gx=Pn(),Xx=Lo(zl()),Di=Mr(),Vx=Bo();Object.defineProperty(fe,"CommandHelp",{enumerable:!0,get:function(){return Vx.CommandHelp}});var $o=Mr();Object.defineProperty(fe,"getHelpFlagAdditions",{enumerable:!0,get:function(){return $o.getHelpFlagAdditions}});Object.defineProperty(fe,"normalizeArgv",{enumerable:!0,get:function(){return $o.normalizeArgv}});Object.defineProperty(fe,"standardizeIDFromArgv",{enumerable:!0,get:function(){return $o.standardizeIDFromArgv}});function Yx(e,t){let r=(0,Di.getHelpFlagAdditions)(t);for(let i of e){if(i==="--")return;if(!(r.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var Nn=class extends Gx.HelpFormatter{constructor(t,r={}){super(t,r),t.topicSeparator||(t.topicSeparator=":")}};fe.HelpBase=Nn;var Mn=class extends Nn{CommandHelpClass=Wx.CommandHelp;constructor(t,r={}){super(t,r)}get sortedCommands(){let{commands:t}=this.config;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,bi.sortBy)(t,r=>r.id),t=(0,bi.uniqBy)(t,r=>r.id),t}get sortedTopics(){let t=this._topics;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,bi.sortBy)(t,r=>r.name),t=(0,bi.uniqBy)(t,r=>r.name),t}command(t){return this.formatCommand(t)}description(t){let r=this.render(t.description||"");return t.summary?r:r.split(`
49
+ `).slice(1).join(`
50
+ `)}formatCommand(t){return this.config.topicSeparator!==":"&&(t.id=t.id.replaceAll(":",this.config.topicSeparator),t.aliases=t.aliases&&t.aliases.map(i=>i.replaceAll(":",this.config.topicSeparator))),this.getCommandHelpClass(t).generate()}formatCommands(t){if(t.length===0)return"";let r=this.renderList(t.filter(i=>this.opts.hideAliasesFromRoot?!i.aliases?.includes(i.id):!0).map(i=>{this.config.topicSeparator!==":"&&(i.id=i.id.replaceAll(":",this.config.topicSeparator));let n=this.summary(i);return[(0,ot.colorize)(this.config?.theme?.command,i.id),n&&(0,ot.colorize)(this.config?.theme?.sectionDescription,(0,Wl.default)(n))]}),{indentation:2,spacer:`
51
+ `,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",r)}formatRoot(){return new Xx.default(this.config,this.opts).root()}formatTopic(t){let r=this.render(t.description||""),i=r.split(`
52
+ `)[0];r=r.split(`
53
+ `).slice(1).join(`
54
+ `);let n=`${t.name}:COMMAND`;this.config.topicSeparator!==":"&&(n=n.replaceAll(":",this.config.topicSeparator));let o=(0,bi.compact)([(0,ot.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,ot.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ot.colorize)(this.config?.theme?.bin,this.config.bin)} ${n}`),r&&this.section("DESCRIPTION",this.wrap((0,ot.colorize)(this.config?.theme?.sectionDescription,r)))]).join(`
55
+
56
+ `);return this.opts.stripAnsi&&(o=(0,Wl.default)(o)),o+`
57
+ `}formatTopics(t){if(t.length===0)return"";let r=this.renderList(t.map(i=>(this.config.topicSeparator!==":"&&(i.name=i.name.replaceAll(":",this.config.topicSeparator)),[(0,ot.colorize)(this.config?.theme?.topic,i.name),i.description&&this.render((0,ot.colorize)(this.config?.theme?.sectionDescription,i.description.split(`
58
+ `)[0]))])),{indentation:2,spacer:`
59
+ `,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",r)}getCommandHelpClass(t){return new this.CommandHelpClass(t,this.config,this.opts)}log(...t){this.opts.sendToStderr?Gl.default.stderr(Jl.format.apply(this,t)+`
60
+ `):Gl.default.stdout(Jl.format.apply(this,t)+`
61
+ `)}async showCommandHelp(t){let r=t.id,i=r.split(":").length,n=this.sortedTopics.filter(g=>g.name.startsWith(r+":")&&g.name.split(":").length===i+1),o=this.sortedCommands.filter(g=>g.id.startsWith(r+":")&&g.id.split(":").length===i+1),s=this.config.plugins.get(t.pluginName),c=this.config.pjson?.oclif?.state||s?.pjson?.oclif?.state||t.state;if(c&&this.log(c==="deprecated"?`${(0,Di.formatCommandDeprecationWarning)((0,Vl.toConfiguredId)(r,this.config),t.deprecationOptions)}
62
+ `:`This command is in ${c}.
63
+ `),t.deprecateAliases&&t.aliases.includes(r)){let g=this.config.commands.find(f=>f.aliases.includes(r)),d={...t.deprecationOptions,...g?{to:g.id}:{}};this.log(`${(0,Di.formatCommandDeprecationWarning)((0,Vl.toConfiguredId)(r,this.config),d)}
64
+ `)}let h=this.summary(t);if(h&&this.log(h+`
65
+ `),this.log(this.formatCommand(t)),this.log(""),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0){let g=[],d=o.filter(f=>(g.push(...f.aliases),!g.includes(f.id)));this.log(this.formatCommands(d)),this.log("")}}async showHelp(t){let r=t.slice(1);t=t.filter(s=>!(0,Di.getHelpFlagAdditions)(this.config).includes(s)),this.config.topicSeparator!==":"&&(t=(0,Di.standardizeIDFromArgv)(t,this.config));let i=Yx(t,this.config);if(!i){if(this.config.isSingleCommandCLI){let s=this.config.findCommand(Xl.SINGLE_COMMAND_CLI_SYMBOL);if(s){await this.showCommandHelp(s);return}}await this.showRootHelp();return}let n=this.config.findCommand(i);if(n){if(n.id===Xl.SINGLE_COMMAND_CLI_SYMBOL&&(n.id=""),n.hasDynamicHelp&&n.pluginType!=="jit"){let s=await n.load();for(let[c,h]of Object.entries(s.flags??{}))h.type!=="boolean"&&(n.flags[c].default=await(0,Jx.cacheDefaultValue)(h,!1));await this.showCommandHelp(n)}else await this.showCommandHelp(n);return}let o=this.config.findTopic(i);if(o){await this.showTopicHelp(o);return}if(this.config.flexibleTaxonomy){let s=this.config.findMatches(i,r);if(s.length>0&&(await this.config.runHook("command_incomplete",{argv:r.filter(h=>!i.split(":").includes(h)),id:i,matches:s})).successes.length>0)return}(0,Hx.error)(`Command ${i} not found.`)}async showRootHelp(){let t=this.sortedTopics,r=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
66
+ `),this.log(this.formatRoot()),this.log(""),this.opts.all||(t=t.filter(n=>!n.name.includes(":")),r=r.filter(n=>!n.id.includes(":"))),t.length>0&&(this.log(this.formatTopics(t)),this.log("")),r.length>0&&(r=r.filter(n=>n.id),this.log(this.formatCommands(r)),this.log(""))}async showTopicHelp(t){let{name:r}=t,i=r.split(":").length,n=this.sortedTopics.filter(c=>c.name.startsWith(r+":")&&c.name.split(":").length===i+1),o=this.sortedCommands.filter(c=>c.id.startsWith(r+":")&&c.id.split(":").length===i+1),s=this.config.pjson?.oclif?.state;s&&this.log(`This topic is in ${s}.
67
+ `),this.log(this.formatTopic(t)),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0&&(this.log(this.formatCommands(o)),this.log(""))}summary(t){if(!(this.opts.sections&&!this.opts.sections.map(r=>r.toLowerCase()).includes("summary")))return t.summary?(0,ot.colorize)(this.config?.theme?.commandSummary,this.render(t.summary.split(`
68
+ `)[0])):t.description&&(0,ot.colorize)(this.config?.theme?.commandSummary,this.render(t.description).split(`
69
+ `)[0])}get _topics(){return this.config.topics.filter(t=>this.config.topics.some(i=>i.name.includes(`${t.name}:`)))}};fe.Help=Mn;function Kx(e){return e&&e.default?e.default:e}async function Qx(e){let{pjson:t}=e,r=t.oclif?.helpClass;if(r)try{let i=await(0,Ux.tsPath)(e.root,r)??r,n=await(0,zx.load)(e,i);return Kx(n)}catch(i){throw new Error(`Unable to load configured help class "${r}", failed with message:
70
+ ${i.message}`)}return Mn}fe.loadHelpClass=Qx});var jn=E(Le=>{"use strict";y();var Uo=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handle=Le.Exit=void 0;var Zx=Uo(vc()),ew=Uo(Ve()),tw=Ci(),qo=Kt(),rw=Qt(),iw=gn(),nw=Uo(vn());Le.Exit={exit(e=0){process.exit(e)}};async function sw(e){try{e||(e=new rw.CLIError("no error?")),e.message==="SIGINT"&&Le.Exit.exit(1);let t=!(e instanceof iw.ExitError)&&!e.skipOclifErrorHandling,r=(0,nw.default)(e),i=(0,Zx.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=ew.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},c=new tw.Help(o,s);console.error(),await c.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;qo.config.errorLogger&&e.code!=="EEXIT"?(i&&qo.config.errorLogger.log(i),await qo.config.errorLogger.flush().then(()=>Le.Exit.exit(n)).catch(console.error)):Le.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Le.Exit.exit(1)}}Le.handle=sw});var $e=E(ne=>{"use strict";y();Object.defineProperty(ne,"__esModule",{value:!0});ne.warn=ne.exit=ne.Logger=ne.handle=ne.ModuleLoadError=ne.ExitError=ne.CLIError=ne.error=ne.config=void 0;var ow=gn(),aw=Kt();Object.defineProperty(ne,"config",{enumerable:!0,get:function(){return aw.config}});var uw=Do();Object.defineProperty(ne,"error",{enumerable:!0,get:function(){return uw.error}});var cw=Qt();Object.defineProperty(ne,"CLIError",{enumerable:!0,get:function(){return cw.CLIError}});var lw=gn();Object.defineProperty(ne,"ExitError",{enumerable:!0,get:function(){return lw.ExitError}});var hw=So();Object.defineProperty(ne,"ModuleLoadError",{enumerable:!0,get:function(){return hw.ModuleLoadError}});var fw=jn();Object.defineProperty(ne,"handle",{enumerable:!0,get:function(){return fw.handle}});var dw=wo();Object.defineProperty(ne,"Logger",{enumerable:!0,get:function(){return dw.Logger}});function pw(e=0){throw new ow.ExitError(e)}ne.exit=pw;var mw=Dn();Object.defineProperty(ne,"warn",{enumerable:!0,get:function(){return mw.warn}})});var Rn=E(Bn=>{"use strict";y();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ActionBase=void 0;var Yl=F("node:util"),Kl=oe(),Ho=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
71
+ `&&this._write(r,`
72
+ `)}catch(t){this._write("stderr",(0,Yl.inspect)(t))}}_pause(t){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(t){throw new Error("not implemented")}_stdout(t){try{if(t){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...r)=>(this.stdmocks.push(["stdout",r]),!0),process.stderr.write=(...r)=>(this.stdmocks.push(["stderr",r]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(r){this._write("stderr",(0,Yl.inspect)(r))}}_stop(t){throw new Error("not implemented")}_updateStatus(t,r){}_write(t,r){switch(t){case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,Kl.castArray)(r));break}case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,Kl.castArray)(r));break}default:throw new Error(`invalid std: ${t}`)}}get globals(){global.ux=global.ux||{};let t=global.ux;return t.action=t.action||{},t}};Bn.ActionBase=Ho});var Ql=E(Jo=>{"use strict";y();Object.defineProperty(Jo,"__esModule",{value:!0});var gw=Rn(),zo=class extends gw.ActionBase{type="simple";_flush(){this._write(this.std,`
73
+ `),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Jo.default=zo});var Zl=E(Wo=>{"use strict";y();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var th=E(Ye=>{"use strict";y();var yw=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),vw=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xw=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&yw(t,e,r);return vw(t,e),t},Ln=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});var ww=Ln(xc()),Ew=Ln(Be()),bw=Ln(Dr()),Go=xw(Z0()),Dw=Yt(),Cw=Rn(),eh=Ln(Zl()),Xo=lo();function Sw(e){return Go?(Go.stdout?Go.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${ww.default.reset.open}`:Ew.default.magenta(e):e}var Vo=class extends Cw.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,Sw(t)}_lines(t){return(0,bw.default)(t).split(`
74
+ `).map(r=>Math.ceil(r.length/Dw.errtermwidth)).reduce((r,i)=>r+i,0)}_pause(t){this.spinner&&clearInterval(this.spinner),this._reset(),t&&this._render(` ${t}`),this.output=void 0}_render(t){if(!this.task)return;this._reset(),this._flushStdout();let r=t==="spinner"?` ${this._frame()}`:t||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${r}${i}
75
+ `,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,Xo.cursorLeft+Xo.cursorUp(t)+Xo.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?eh.default[t.style].frames:eh.default[process.platform==="win32"?"line":"dots2"].frames}};Ye.default=Vo});var qn=E(at=>{"use strict";y();var Yo=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.config=at.Config=void 0;var Aw=Yo(Ve()),_w=Yo(Ql()),Fw=Yo(th()),rh=global,Nt=rh.ux||(rh.ux={}),kw=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",Tw=kw==="spinner"?Fw.default:_w.default,$n=class{action=new Tw;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Nt.context||{}}set context(t){Nt.context=t}get debug(){return Nt.debug||process.env.DEBUG==="*"}set debug(t){Nt.debug=t}};at.Config=$n;function Ow(){let t=Aw.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Nt[t]||(Nt[t]=new $n),Nt[t]}at.config=Ow();at.default=at.config});var Hn=E(Un=>{"use strict";y();Object.defineProperty(Un,"__esModule",{value:!0});Un.flush=void 0;var Pw=$e();function Iw(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,Pw.error)("timed out"))])}async function Nw(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function Mw(e=1e4){await Iw(Nw(),e)}Un.flush=Mw});var sh=E((TO,nh)=>{"use strict";y();var Mt=process.stdin,ut=process.stderr,zn={hide:(e,t={})=>zn.raw(e,!1,t),mask:(e,t={})=>zn.raw(e,!0,t),raw:(e,t,r={})=>!Mt.setRawMode||process.env.TERM==="dumb"?zn.notty(e):new Promise(function(i,n){let o=lo(),s="";ut.write(o.eraseLine),ut.write(o.cursorLeft),ut.write(e),Mt.resume(),Mt.setRawMode(!0);function c(){t?ut.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
76
+ `+o.cursorShow):ut.write(`
77
+ `),Mt.removeListener("data",p),Mt.setRawMode(!1),Mt.pause()}function h(){r.required&&s.length===0||(c(),s=s.replace(/\r$/,""),s=s||r.default,i(s))}function g(){n(new Error("SIGINT")),c()}function d(){s.length!==0&&(s=s.substr(0,s.length-1),ut.write(o.cursorBackward(1)),ut.write(o.eraseEndLine))}function f(a){s+=a,ut.write(t?a:"*".repeat(a.length))}let p=function(a){switch(a){case"":case"\r":case`
78
+ `:return h();case"":return g();default:return a.charCodeAt(0)===127?d():f(a)}};Mt.on("data",p)}),notty:e=>new Promise((t,r)=>{let i=uy();ut.write(e);let n=i.sync("sh",["-c","read -s PASS && echo $PASS"],{stdio:["inherit","pipe","inherit"],encoding:"utf8"});if(ut.write(`
79
+ `),n.error)return r(n.error);t(n.stdout.trim())})};function ih(e,t={}){return t=Object.assign({method:"mask",required:t.default===void 0,default:""},t),Mt.setEncoding("utf8"),zn[t.method](e,t).then(r=>r||(t.required?ih(e):""))}nh.exports=ih});var hh=E(ve=>{"use strict";y();var jw=ve&&ve.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Bw=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Rw=ve&&ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&jw(t,e,r);return Bw(t,e),t},Lw=ve&&ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ve,"__esModule",{value:!0});ve.anykey=ve.confirm=ve.prompt=void 0;var Si=Lw(Be()),oh=Rw($e()),uh=qn();function Ko(e,t=100){if(t<0)throw new Error("no input");return new Promise((r,i)=>{let n;e.timeout&&(n=setTimeout(()=>{process.stdin.pause(),i(new Error("Prompt timeout"))},e.timeout),n.unref()),process.stdin.setEncoding("utf8"),process.stderr.write(e.prompt),process.stdin.resume(),process.stdin.once("data",o=>{n&&clearTimeout(n),process.stdin.pause();let s=(typeof o=="string"?o:o.toString()).trim();!e.default&&e.required&&s===""?r(Ko(e,t-1)):r(s||e.default)})})}function ah(e,t,r){let i="> ";return r&&t==="hide"&&(r="*".repeat(r.length)),e&&r?i=e+" "+Si.default.yellow("["+r+"]")+": ":e&&(i=`${e}: `),i}async function $w(e){let t=process.stdin.isRaw;process.stdin.setRawMode&&process.stdin.setRawMode(!0),e.required=e.required??!1;let r=await Ko(e);return process.stdin.setRawMode&&process.stdin.setRawMode(!!t),r}function qw(e){let t=lo();process.stderr.write(t.cursorHide+t.cursorUp(1)+t.cursorLeft+e+t.cursorDown(1)+t.cursorLeft+t.cursorShow)}async function ch(e,t={}){let r=ah(e,t.type,t.default),i={default:"",isTTY:!!(process.env.TERM!=="dumb"&&process.stdin.isTTY),name:e,prompt:r,required:!0,type:"normal",...t},n=sh();switch(i.type){case"normal":return Ko(i);case"single":return $w(i);case"mask":return n(i.prompt,{default:i.default,method:i.type,required:i.required}).then(o=>(qw(ah(e,"hide",t.default)),o));case"hide":return n(i.prompt,{default:i.default,method:i.type,required:i.required});default:throw new Error(`unexpected type ${i.type}`)}}async function lh(e,t={}){return uh.config.action.pauseAsync(()=>ch(e,t),Si.default.cyan("?"))}ve.prompt=lh;function Uw(e){return uh.config.action.pauseAsync(async()=>{let t=async()=>{let i=(await ch(e)).toLowerCase();return["n","no"].includes(i)?!1:["y","yes"].includes(i)?!0:t()};return t()},Si.default.cyan("?"))}ve.confirm=Uw;async function Hw(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${Si.default.yellow("q")} to exit`:`Press enter to continue or ${Si.default.yellow("q")} to exit`);let r=await lh(e,{required:!1,type:"single"});return t&&process.stderr.write(`
80
+ `),r==="q"&&oh.error("quit"),r===""&&oh.error("ctrl-c"),r}ve.anykey=Hw});var dh=E(Ai=>{"use strict";y();var zw=Ai&&Ai.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ai,"__esModule",{value:!0});var Jw=zw(Be()),fh=F("node:util");function Ww(e,t){let r=[],i=Object.keys(e).map(c=>c.toString().length),n=Math.max(...i)+2;function o(c){return typeof c=="string"||typeof c=="number"?c:typeof c=="object"?Object.keys(c).map(h=>h+": "+(0,fh.inspect)(c[h])).join(", "):(0,fh.inspect)(c)}let s=(c,h)=>`${Jw.default.blue(c)}:`+" ".repeat(n-c.length-1)+o(h);for(let c of t||Object.keys(e).sort()){let h=e[c];if(Array.isArray(h)){if(h.length>0){r.push(s(c,h[0]));for(let g of h.slice(1))r.push(" ".repeat(n)+o(g))}}else h!=null&&r.push(s(c,h))}return r.join(`
81
+ `)}Ai.default=Ww});var mh=E((jO,ph)=>{y();var Qo=class{constructor(t,r,i){this.etaBufferLength=t||100,this.valueBuffer=[i],this.timeBuffer=[r],this.eta="0"}update(t,r,i){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(i-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,i=Math.min(this.etaBufferLength,r),n=this.valueBuffer[r-1]-this.valueBuffer[r-i],o=this.timeBuffer[r-1]-this.timeBuffer[r-i],s=n/o;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let c=Math.ceil(t/s/1e3);isNaN(c)?this.eta="NULL":isFinite(c)?c>1e7?this.eta="INF":c<0?this.eta=0:this.eta=c:this.eta="INF"}};ph.exports=Qo});var ea=E((RO,gh)=>{y();var rr=F("readline"),Zo=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&rr.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,rr.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(rr.moveCursor(this.stream,0,-this.dy),rr.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&rr.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&rr.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&rr.clearScreenDown(this.stream)}newline(){this.stream.write(`
82
+ `),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};gh.exports=Zo});var ta=E(($O,yh)=>{y();yh.exports=function(t,r,i){if(r.autopadding!==!0)return t;function n(o,s){return(r.autopaddingChar+o).slice(-s)}return i==="percentage"?n(t,3):t}});var ra=E((UO,vh)=>{y();vh.exports=function(t,r){let i=Math.round(t*r.barsize),n=r.barsize-i;return r.barCompleteString.substr(0,i)+r.barGlue+r.barIncompleteString.substr(0,n)}});var ia=E((zO,xh)=>{y();xh.exports=function(t,r,i){function n(s){return i?i*Math.round(s/i):s}function o(s){return(r.autopaddingChar+s).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}});var na=E((WO,wh)=>{y();var Gw=uo(),Xw=ta(),Vw=ra(),Yw=ia();wh.exports=function(t,r,i){let n=t.format,o=t.formatTime||Yw,s=t.formatValue||Xw,c=t.formatBar||Vw,h=Math.floor(r.progress*100)+"",g=r.stopTime||Date.now(),d=Math.round((g-r.startTime)/1e3),f=Object.assign({},i,{bar:c(r.progress,t),percentage:s(h,t,"percentage"),total:s(r.total,t,"total"),value:s(r.value,t,"value"),eta:s(r.eta,t,"eta"),eta_formatted:o(r.eta,t,5),duration:s(d,t,"duration"),duration_formatted:o(d,t,1)});n=n.replace(/\{(\w+)\}/g,function(u,l){return typeof f[l]<"u"?f[l]:u});let p=Math.max(0,r.maxWidth-Gw(n)-2),a=Math.floor(p/2);switch(t.align){case"right":n=p>0?" ".repeat(p)+n:n;break;case"center":n=a>0?" ".repeat(a)+n:n;break;default:break}return n}});var Jn=E((XO,Eh)=>{y();function H(e,t){return typeof e>"u"||e===null?t:e}Eh.exports={parse:function(t,r){let i={},n=Object.assign({},r,t);return i.throttleTime=1e3/H(n.fps,10),i.stream=H(n.stream,process.stderr),i.terminal=H(n.terminal,null),i.clearOnComplete=H(n.clearOnComplete,!1),i.stopOnComplete=H(n.stopOnComplete,!1),i.barsize=H(n.barsize,40),i.align=H(n.align,"left"),i.hideCursor=H(n.hideCursor,!1),i.linewrap=H(n.linewrap,!1),i.barGlue=H(n.barGlue,""),i.barCompleteChar=H(n.barCompleteChar,"="),i.barIncompleteChar=H(n.barIncompleteChar,"-"),i.format=H(n.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),i.formatTime=H(n.formatTime,null),i.formatValue=H(n.formatValue,null),i.formatBar=H(n.formatBar,null),i.etaBufferLength=H(n.etaBuffer,10),i.etaAsynchronousUpdate=H(n.etaAsynchronousUpdate,!1),i.progressCalculationRelative=H(n.progressCalculationRelative,!1),i.synchronousUpdate=H(n.synchronousUpdate,!0),i.noTTYOutput=H(n.noTTYOutput,!1),i.notTTYSchedule=H(n.notTTYSchedule,2e3),i.emptyOnZero=H(n.emptyOnZero,!1),i.forceRedraw=H(n.forceRedraw,!1),i.autopadding=H(n.autopadding,!1),i.gracefulExit=H(n.gracefulExit,!1),i},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?H(t.autopaddingChar," "):"",t}}});var sa=E((KO,Dh)=>{y();var bh=mh(),Kw=ea(),Qw=na(),Zw=Jn(),eE=F("events");Dh.exports=class extends eE{constructor(t){super(),this.options=Zw.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new Kw(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new bh(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:Qw}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let i=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=i)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(i),this.terminal.clearRight(),this.lastDrawnString=i,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,i){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=i||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new bh(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let i=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let n in i)this.payload[n]=i[n];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Sh=E((eP,Ch)=>{y();var tE=sa(),rE=Jn();Ch.exports=class extends tE{constructor(t,r){super(rE.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,i){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,i),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var _h=E((iP,Ah)=>{y();var iE=ea(),nE=sa(),sE=Jn(),oE=F("events");Ah.exports=class extends oE{constructor(t,r){super(),this.bars=[],this.options=sE.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new iE(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,i,n={}){let o=new nE(Object.assign({},this.options,{terminal:this.terminal},n));return this.bars.push(o),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(t,r,i),this.emit("start")),o}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var kh=E((sP,Fh)=>{y();Fh.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Oh=E((aP,Th)=>{y();Th.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Ih=E((cP,Ph)=>{y();Ph.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Mh=E((hP,Nh)=>{y();Nh.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Bh=E((dP,jh)=>{y();var aE=kh(),uE=Oh(),cE=Ih(),lE=Mh();jh.exports={legacy:aE,shades_classic:uE,shades_grey:cE,rect:lE}});var $h=E((mP,Lh)=>{y();var Rh=Sh(),hE=_h(),fE=Bh(),dE=na(),pE=ta(),mE=ra(),gE=ia();Lh.exports={Bar:Rh,SingleBar:Rh,MultiBar:hE,Presets:fE,Format:{Formatter:dE,BarFormat:mE,ValueFormat:pE,TimeFormat:gE}}});var qh=E(oa=>{"use strict";y();Object.defineProperty(oa,"__esModule",{value:!0});var yE=$h();function vE(e={}){return new yE.SingleBar({noTTYOutput:process.env.TERM==="dumb"||!process.stdin.isTTY,...e})}oa.default=vE});var nr=E((xP,ir)=>{"use strict";y();function Uh(e){return typeof e>"u"||e===null}function xE(e){return typeof e=="object"&&e!==null}function wE(e){return Array.isArray(e)?e:Uh(e)?[]:[e]}function EE(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function bE(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function DE(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}ir.exports.isNothing=Uh;ir.exports.isObject=xE;ir.exports.toArray=wE;ir.exports.repeat=bE;ir.exports.isNegativeZero=DE;ir.exports.extend=EE});var qr=E((EP,Hh)=>{"use strict";y();function _i(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_i.prototype=Object.create(Error.prototype);_i.prototype.constructor=_i;_i.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};Hh.exports=_i});var Wh=E((DP,Jh)=>{"use strict";y();var zh=nr();function aa(e,t,r,i,n){this.name=e,this.buffer=t,this.position=r,this.line=i,this.column=n}aa.prototype.getSnippet=function(t,r){var i,n,o,s,c;if(!this.buffer)return null;for(t=t||4,r=r||75,i="",n=this.position;n>0&&`\0\r
83
+ \x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>r/2-1){i=" ... ",n+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
84
+ \x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>r/2-1){o=" ... ",s-=5;break}return c=this.buffer.slice(n,s),zh.repeat(" ",t)+i+c+o+`
85
+ `+zh.repeat(" ",t+this.position-n+i.length)+"^"};aa.prototype.toString=function(t){var r,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(i+=`:
86
+ `+r)),i};Jh.exports=aa});var ce=E((SP,Xh)=>{"use strict";y();var Gh=qr(),CE=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],SE=["scalar","sequence","mapping"];function AE(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function _E(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(CE.indexOf(r)===-1)throw new Gh('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=AE(t.styleAliases||null),SE.indexOf(this.kind)===-1)throw new Gh('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Xh.exports=_E});var sr=E((_P,Yh)=>{"use strict";y();var Vh=nr(),Wn=qr(),FE=ce();function ua(e,t,r){var i=[];return e.include.forEach(function(n){r=ua(n,t,r)}),e[t].forEach(function(n){r.forEach(function(o,s){o.tag===n.tag&&o.kind===n.kind&&i.push(s)}),r.push(n)}),r.filter(function(n,o){return i.indexOf(o)===-1})}function kE(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function i(n){e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function Ur(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Wn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=ua(this,"implicit",[]),this.compiledExplicit=ua(this,"explicit",[]),this.compiledTypeMap=kE(this.compiledImplicit,this.compiledExplicit)}Ur.DEFAULT=null;Ur.create=function(){var t,r;switch(arguments.length){case 1:t=Ur.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new Wn("Wrong number of arguments for Schema.create function")}if(t=Vh.toArray(t),r=Vh.toArray(r),!t.every(function(i){return i instanceof Ur}))throw new Wn("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof FE}))throw new Wn("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ur({include:t,explicit:r})};Yh.exports=Ur});var Qh=E((kP,Kh)=>{"use strict";y();var TE=ce();Kh.exports=new TE("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var ef=E((OP,Zh)=>{"use strict";y();var OE=ce();Zh.exports=new OE("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var rf=E((IP,tf)=>{"use strict";y();var PE=ce();tf.exports=new PE("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Gn=E((MP,nf)=>{"use strict";y();var IE=sr();nf.exports=new IE({explicit:[Qh(),ef(),rf()]})});var of=E((BP,sf)=>{"use strict";y();var NE=ce();function ME(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function jE(){return null}function BE(e){return e===null}sf.exports=new NE("tag:yaml.org,2002:null",{kind:"scalar",resolve:ME,construct:jE,predicate:BE,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var uf=E((LP,af)=>{"use strict";y();var RE=ce();function LE(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function $E(e){return e==="true"||e==="True"||e==="TRUE"}function qE(e){return Object.prototype.toString.call(e)==="[object Boolean]"}af.exports=new RE("tag:yaml.org,2002:bool",{kind:"scalar",resolve:LE,construct:$E,predicate:qE,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var lf=E((qP,cf)=>{"use strict";y();var UE=nr(),HE=ce();function zE(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function JE(e){return 48<=e&&e<=55}function WE(e){return 48<=e&&e<=57}function GE(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!zE(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}for(;r<t;r++)if(n=e[r],n!=="_"){if(!JE(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(n===":")break;if(!WE(e.charCodeAt(r)))return!1;i=!0}return!i||n==="_"?!1:n!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(r))}function XE(e){var t=e,r=1,i,n,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0"?0:i==="0"?t[1]==="b"?r*parseInt(t.slice(2),2):t[1]==="x"?r*parseInt(t,16):r*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,n=1,o.forEach(function(s){t+=s*n,n*=60}),r*t):r*parseInt(t,10)}function VE(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!UE.isNegativeZero(e)}cf.exports=new HE("tag:yaml.org,2002:int",{kind:"scalar",resolve:GE,construct:XE,predicate:VE,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var df=E((HP,ff)=>{"use strict";y();var hf=nr(),YE=ce(),KE=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function QE(e){return!(e===null||!KE.test(e)||e[e.length-1]==="_")}function ZE(e){var t,r,i,n;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,n=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){n.unshift(parseFloat(o,10))}),t=0,i=1,n.forEach(function(o){t+=o*i,i*=60}),r*t):r*parseFloat(t,10)}var eb=/^[-+]?[0-9]+e/;function tb(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(hf.isNegativeZero(e))return"-0.0";return r=e.toString(10),eb.test(r)?r.replace("e",".e"):r}function rb(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||hf.isNegativeZero(e))}ff.exports=new YE("tag:yaml.org,2002:float",{kind:"scalar",resolve:QE,construct:ZE,predicate:rb,represent:tb,defaultStyle:"lowercase"})});var ca=E((JP,pf)=>{"use strict";y();var ib=sr();pf.exports=new ib({include:[Gn()],implicit:[of(),uf(),lf(),df()]})});var la=E((GP,mf)=>{"use strict";y();var nb=sr();mf.exports=new nb({include:[ca()]})});var xf=E((VP,vf)=>{"use strict";y();var sb=ce(),gf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),yf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ob(e){return e===null?!1:gf.exec(e)!==null||yf.exec(e)!==null}function ab(e){var t,r,i,n,o,s,c,h=0,g=null,d,f,p;if(t=gf.exec(e),t===null&&(t=yf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(o=+t[4],s=+t[5],c=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(d=+t[10],f=+(t[11]||0),g=(d*60+f)*6e4,t[9]==="-"&&(g=-g)),p=new Date(Date.UTC(r,i,n,o,s,c,h)),g&&p.setTime(p.getTime()-g),p}function ub(e){return e.toISOString()}vf.exports=new sb("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ob,construct:ab,instanceOf:Date,represent:ub})});var Ef=E((KP,wf)=>{"use strict";y();var cb=ce();function lb(e){return e==="<<"||e===null}wf.exports=new cb("tag:yaml.org,2002:merge",{kind:"scalar",resolve:lb})});var Cf=E((ZP,Df)=>{"use strict";y();var or;try{bf=F,or=bf("buffer").Buffer}catch{}var bf,hb=ce(),ha=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
87
+ \r`;function fb(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=ha;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function db(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=ha,s=0,c=[];for(t=0;t<n;t++)t%4===0&&t&&(c.push(s>>16&255),c.push(s>>8&255),c.push(s&255)),s=s<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(c.push(s>>16&255),c.push(s>>8&255),c.push(s&255)):r===18?(c.push(s>>10&255),c.push(s>>2&255)):r===12&&c.push(s>>4&255),or?or.from?or.from(c):new or(c):c}function pb(e){var t="",r=0,i,n,o=e.length,s=ha;for(i=0;i<o;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function mb(e){return or&&or.isBuffer(e)}Df.exports=new hb("tag:yaml.org,2002:binary",{kind:"scalar",resolve:fb,construct:db,predicate:mb,represent:pb})});var Af=E((r2,Sf)=>{"use strict";y();var gb=ce(),yb=Object.prototype.hasOwnProperty,vb=Object.prototype.toString;function xb(e){if(e===null)return!0;var t=[],r,i,n,o,s,c=e;for(r=0,i=c.length;r<i;r+=1){if(n=c[r],s=!1,vb.call(n)!=="[object Object]")return!1;for(o in n)if(yb.call(n,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function wb(e){return e!==null?e:[]}Sf.exports=new gb("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xb,construct:wb})});var Ff=E((n2,_f)=>{"use strict";y();var Eb=ce(),bb=Object.prototype.toString;function Db(e){if(e===null)return!0;var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],bb.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function Cb(e){if(e===null)return[];var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}_f.exports=new Eb("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Db,construct:Cb})});var Tf=E((o2,kf)=>{"use strict";y();var Sb=ce(),Ab=Object.prototype.hasOwnProperty;function _b(e){if(e===null)return!0;var t,r=e;for(t in r)if(Ab.call(r,t)&&r[t]!==null)return!1;return!0}function Fb(e){return e!==null?e:{}}kf.exports=new Sb("tag:yaml.org,2002:set",{kind:"mapping",resolve:_b,construct:Fb})});var Hr=E((u2,Of)=>{"use strict";y();var kb=sr();Of.exports=new kb({include:[la()],implicit:[xf(),Ef()],explicit:[Cf(),Af(),Ff(),Tf()]})});var If=E((l2,Pf)=>{"use strict";y();var Tb=ce();function Ob(){return!0}function Pb(){}function Ib(){return""}function Nb(e){return typeof e>"u"}Pf.exports=new Tb("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Ob,construct:Pb,predicate:Nb,represent:Ib})});var Mf=E((f2,Nf)=>{"use strict";y();var Mb=ce();function jb(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),i="";return!(t[0]==="/"&&(r&&(i=r[1]),i.length>3||t[t.length-i.length-1]!=="/"))}function Bb(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return t[0]==="/"&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function Rb(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function Lb(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Nf.exports=new Mb("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:jb,construct:Bb,predicate:Lb,represent:Rb})});var Rf=E((p2,Bf)=>{"use strict";y();var Xn;try{jf=F,Xn=jf("esprima")}catch{typeof window<"u"&&(Xn=window.esprima)}var jf,$b=ce();function qb(e){if(e===null)return!1;try{var t="("+e+")",r=Xn.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Ub(e){var t="("+e+")",r=Xn.parse(t,{range:!0}),i=[],n;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){i.push(o.name)}),n=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(i,t.slice(n[0]+1,n[1]-1)):new Function(i,"return "+t.slice(n[0],n[1]))}function Hb(e){return e.toString()}function zb(e){return Object.prototype.toString.call(e)==="[object Function]"}Bf.exports=new $b("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:qb,construct:Ub,predicate:zb,represent:Hb})});var Fi=E((y2,$f)=>{"use strict";y();var Lf=sr();$f.exports=Lf.DEFAULT=new Lf({include:[Hr()],explicit:[If(),Mf(),Rf()]})});var od=E((x2,ki)=>{"use strict";y();var wt=nr(),Gf=qr(),Jb=Wh(),Xf=Hr(),Wb=Fi(),Bt=Object.prototype.hasOwnProperty,Vn=1,Vf=2,Yf=3,Yn=4,fa=1,Gb=2,qf=3,Xb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Vb=/[\x85\u2028\u2029]/,Yb=/[,\[\]\{\}]/,Kf=/^(?:!|!!|![a-z\-]+!)$/i,Qf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Uf(e){return Object.prototype.toString.call(e)}function ct(e){return e===10||e===13}function ur(e){return e===9||e===32}function Ae(e){return e===9||e===32||e===10||e===13}function zr(e){return e===44||e===91||e===93||e===123||e===125}function Kb(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Qb(e){return e===120?2:e===117?4:e===85?8:0}function Zb(e){return 48<=e&&e<=57?e-48:-1}function Hf(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
88
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function eD(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Zf(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var ed=new Array(256),td=new Array(256);for(ar=0;ar<256;ar++)ed[ar]=Hf(ar)?1:0,td[ar]=Hf(ar);var ar;function tD(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Wb,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function rd(e,t){return new Gf(t,new Jb(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function N(e,t){throw rd(e,t)}function Kn(e,t){e.onWarning&&e.onWarning.call(null,rd(e,t))}var zf={YAML:function(t,r,i){var n,o,s;t.version!==null&&N(t,"duplication of %YAML directive"),i.length!==1&&N(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&N(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),o!==1&&N(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Kn(t,"unsupported YAML version of the document")},TAG:function(t,r,i){var n,o;i.length!==2&&N(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],Kf.test(n)||N(t,"ill-formed tag handle (first argument) of the TAG directive"),Bt.call(t.tagMap,n)&&N(t,'there is a previously declared suffix for "'+n+'" tag handle'),Qf.test(o)||N(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=o}};function jt(e,t,r,i){var n,o,s,c;if(t<r){if(c=e.input.slice(t,r),i)for(n=0,o=c.length;n<o;n+=1)s=c.charCodeAt(n),s===9||32<=s&&s<=1114111||N(e,"expected valid JSON character");else Xb.test(c)&&N(e,"the stream contains non-printable characters");e.result+=c}}function Jf(e,t,r,i){var n,o,s,c;for(wt.isObject(r)||N(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,c=n.length;s<c;s+=1)o=n[s],Bt.call(t,o)||(Zf(t,o,r[o]),i[o]=!0)}function Jr(e,t,r,i,n,o,s,c){var h,g;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),h=0,g=n.length;h<g;h+=1)Array.isArray(n[h])&&N(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Uf(n[h])==="[object Object]"&&(n[h]="[object Object]");if(typeof n=="object"&&Uf(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(h=0,g=o.length;h<g;h+=1)Jf(e,t,o[h],r);else Jf(e,t,o,r);else!e.json&&!Bt.call(r,n)&&Bt.call(t,n)&&(e.line=s||e.line,e.position=c||e.position,N(e,"duplicated mapping key")),Zf(t,n,o),delete r[n];return t}function da(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):N(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function se(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;ur(n);)n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(ct(n))for(da(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Kn(e,"deficient indentation"),i}function Qn(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Ae(r)))}function pa(e,t){t===1?e.result+=" ":t>1&&(e.result+=wt.repeat(`
89
+ `,t-1))}function rD(e,t,r){var i,n,o,s,c,h,g,d,f=e.kind,p=e.result,a;if(a=e.input.charCodeAt(e.position),Ae(a)||zr(a)||a===35||a===38||a===42||a===33||a===124||a===62||a===39||a===34||a===37||a===64||a===96||(a===63||a===45)&&(n=e.input.charCodeAt(e.position+1),Ae(n)||r&&zr(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,c=!1;a!==0;){if(a===58){if(n=e.input.charCodeAt(e.position+1),Ae(n)||r&&zr(n))break}else if(a===35){if(i=e.input.charCodeAt(e.position-1),Ae(i))break}else{if(e.position===e.lineStart&&Qn(e)||r&&zr(a))break;if(ct(a))if(h=e.line,g=e.lineStart,d=e.lineIndent,se(e,!1,-1),e.lineIndent>=t){c=!0,a=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=h,e.lineStart=g,e.lineIndent=d;break}}c&&(jt(e,o,s,!1),pa(e,e.line-h),o=s=e.position,c=!1),ur(a)||(s=e.position+1),a=e.input.charCodeAt(++e.position)}return jt(e,o,s,!1),e.result?!0:(e.kind=f,e.result=p,!1)}function iD(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(jt(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ct(r)?(jt(e,i,n,!0),pa(e,se(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Qn(e)?N(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);N(e,"unexpected end of the stream within a single quoted scalar")}function nD(e,t){var r,i,n,o,s,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return jt(e,r,e.position,!0),e.position++,!0;if(c===92){if(jt(e,r,e.position,!0),c=e.input.charCodeAt(++e.position),ct(c))se(e,!1,t);else if(c<256&&ed[c])e.result+=td[c],e.position++;else if((s=Qb(c))>0){for(n=s,o=0;n>0;n--)c=e.input.charCodeAt(++e.position),(s=Kb(c))>=0?o=(o<<4)+s:N(e,"expected hexadecimal character");e.result+=eD(o),e.position++}else N(e,"unknown escape sequence");r=i=e.position}else ct(c)?(jt(e,r,i,!0),pa(e,se(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Qn(e)?N(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}N(e,"unexpected end of the stream within a double quoted scalar")}function sD(e,t){var r=!0,i,n=e.tag,o,s=e.anchor,c,h,g,d,f,p={},a,u,l,m;if(m=e.input.charCodeAt(e.position),m===91)h=93,f=!1,o=[];else if(m===123)h=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),m=e.input.charCodeAt(++e.position);m!==0;){if(se(e,!0,t),m=e.input.charCodeAt(e.position),m===h)return e.position++,e.tag=n,e.anchor=s,e.kind=f?"mapping":"sequence",e.result=o,!0;r||N(e,"missed comma between flow collection entries"),u=a=l=null,g=d=!1,m===63&&(c=e.input.charCodeAt(e.position+1),Ae(c)&&(g=d=!0,e.position++,se(e,!0,t))),i=e.line,Wr(e,t,Vn,!1,!0),u=e.tag,a=e.result,se(e,!0,t),m=e.input.charCodeAt(e.position),(d||e.line===i)&&m===58&&(g=!0,m=e.input.charCodeAt(++e.position),se(e,!0,t),Wr(e,t,Vn,!1,!0),l=e.result),f?Jr(e,o,p,u,a,l):g?o.push(Jr(e,null,p,u,a,l)):o.push(a),se(e,!0,t),m=e.input.charCodeAt(e.position),m===44?(r=!0,m=e.input.charCodeAt(++e.position)):r=!1}N(e,"unexpected end of the stream within a flow collection")}function oD(e,t){var r,i,n=fa,o=!1,s=!1,c=t,h=0,g=!1,d,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)fa===n?n=f===43?qf:Gb:N(e,"repeat of a chomping mode identifier");else if((d=Zb(f))>=0)d===0?N(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?N(e,"repeat of an indentation width identifier"):(c=t+d-1,s=!0);else break;if(ur(f)){do f=e.input.charCodeAt(++e.position);while(ur(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!ct(f)&&f!==0)}for(;f!==0;){for(da(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndent<c)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>c&&(c=e.lineIndent),ct(f)){h++;continue}if(e.lineIndent<c){n===qf?e.result+=wt.repeat(`
90
+ `,o?1+h:h):n===fa&&o&&(e.result+=`
91
+ `);break}for(i?ur(f)?(g=!0,e.result+=wt.repeat(`
92
+ `,o?1+h:h)):g?(g=!1,e.result+=wt.repeat(`
93
+ `,h+1)):h===0?o&&(e.result+=" "):e.result+=wt.repeat(`
94
+ `,h):e.result+=wt.repeat(`
95
+ `,o?1+h:h),o=!0,s=!0,h=0,r=e.position;!ct(f)&&f!==0;)f=e.input.charCodeAt(++e.position);jt(e,r,e.position,!1)}return!0}function Wf(e,t){var r,i=e.tag,n=e.anchor,o=[],s,c=!1,h;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),h=e.input.charCodeAt(e.position);h!==0&&!(h!==45||(s=e.input.charCodeAt(e.position+1),!Ae(s)));){if(c=!0,e.position++,se(e,!0,-1)&&e.lineIndent<=t){o.push(null),h=e.input.charCodeAt(e.position);continue}if(r=e.line,Wr(e,t,Yf,!1,!0),o.push(e.result),se(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&h!==0)N(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return c?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=o,!0):!1}function aD(e,t,r){var i,n,o,s,c=e.tag,h=e.anchor,g={},d={},f=null,p=null,a=null,u=!1,l=!1,m;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),m=e.input.charCodeAt(e.position);m!==0;){if(i=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(m===63||m===58)&&Ae(i))m===63?(u&&(Jr(e,g,d,f,p,null),f=p=a=null),l=!0,u=!0,n=!0):u?(u=!1,n=!0):N(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,m=i;else if(Wr(e,r,Vf,!1,!0))if(e.line===o){for(m=e.input.charCodeAt(e.position);ur(m);)m=e.input.charCodeAt(++e.position);if(m===58)m=e.input.charCodeAt(++e.position),Ae(m)||N(e,"a whitespace character is expected after the key-value separator within a block mapping"),u&&(Jr(e,g,d,f,p,null),f=p=a=null),l=!0,u=!1,n=!1,f=e.tag,p=e.result;else if(l)N(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(l)N(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0;else break;if((e.line===o||e.lineIndent>t)&&(Wr(e,t,Yn,!0,n)&&(u?p=e.result:a=e.result),u||(Jr(e,g,d,f,p,a,o,s),f=p=a=null),se(e,!0,-1),m=e.input.charCodeAt(e.position)),e.lineIndent>t&&m!==0)N(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return u&&Jr(e,g,d,f,p,null),l&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=g),l}function uD(e){var t,r=!1,i=!1,n,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&N(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):N(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Ae(s);)s===33&&(i?N(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Kf.test(n)||N(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Yb.test(o)&&N(e,"tag suffix cannot contain flow indicator characters")}return o&&!Qf.test(o)&&N(e,"tag name cannot contain such characters: "+o),r?e.tag=o:Bt.call(e.tagMap,n)?e.tag=e.tagMap[n]+o:n==="!"?e.tag="!"+o:n==="!!"?e.tag="tag:yaml.org,2002:"+o:N(e,'undeclared tag handle "'+n+'"'),!0}function cD(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&N(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ae(r)&&!zr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function lD(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Ae(i)&&!zr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Bt.call(e.anchorMap,r)||N(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],se(e,!0,-1),!0}function Wr(e,t,r,i,n){var o,s,c,h=1,g=!1,d=!1,f,p,a,u,l;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=c=Yn===r||Yf===r,i&&se(e,!0,-1)&&(g=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),h===1)for(;uD(e)||cD(e);)se(e,!0,-1)?(g=!0,c=o,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):c=!1;if(c&&(c=g||n),(h===1||Yn===r)&&(Vn===r||Vf===r?u=t:u=t+1,l=e.position-e.lineStart,h===1?c&&(Wf(e,l)||aD(e,l,u))||sD(e,u)?d=!0:(s&&oD(e,u)||iD(e,u)||nD(e,u)?d=!0:lD(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&N(e,"alias node should not have any properties")):rD(e,u,Vn===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(d=c&&Wf(e,l))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&N(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,p=e.implicitTypes.length;f<p;f+=1)if(a=e.implicitTypes[f],a.resolve(e.result)){e.result=a.construct(e.result),e.tag=a.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Bt.call(e.typeMap[e.kind||"fallback"],e.tag)?(a=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&a.kind!==e.kind&&N(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+a.kind+'", not "'+e.kind+'"'),a.resolve(e.result)?(e.result=a.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):N(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):N(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function hD(e){var t=e.position,r,i,n,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(se(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Ae(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&N(e,"directive name must not be less than one character in length");s!==0;){for(;ur(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!ct(s));break}if(ct(s))break;for(r=e.position;s!==0&&!Ae(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&da(e),Bt.call(zf,i)?zf[i](e,i,n):Kn(e,'unknown document directive "'+i+'"')}if(se(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,se(e,!0,-1)):o&&N(e,"directives end mark is expected"),Wr(e,e.lineIndent-1,Yn,!1,!0),se(e,!0,-1),e.checkLineBreaks&&Vb.test(e.input.slice(t,e.position))&&Kn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Qn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,se(e,!0,-1));return}if(e.position<e.length-1)N(e,"end of the stream or a document separator is expected");else return}function id(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
96
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new tD(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,N(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)hD(r);return r.documents}function nd(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=id(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function sd(e,t){var r=id(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Gf("expected a single document in the stream, but found more")}}function fD(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),nd(e,t,wt.extend({schema:Xf},r))}function dD(e,t){return sd(e,wt.extend({schema:Xf},t))}ki.exports.loadAll=nd;ki.exports.load=sd;ki.exports.safeLoadAll=fD;ki.exports.safeLoad=dD});var kd=E((E2,va)=>{"use strict";y();var Oi=nr(),Pi=qr(),pD=Fi(),mD=Hr(),pd=Object.prototype.toString,md=Object.prototype.hasOwnProperty,gD=9,Ti=10,yD=13,vD=32,xD=33,wD=34,gd=35,ED=37,bD=38,DD=39,CD=42,yd=44,SD=45,vd=58,AD=61,_D=62,FD=63,kD=64,xd=91,wd=93,TD=96,Ed=123,OD=124,bd=125,xe={};xe[0]="\\0";xe[7]="\\a";xe[8]="\\b";xe[9]="\\t";xe[10]="\\n";xe[11]="\\v";xe[12]="\\f";xe[13]="\\r";xe[27]="\\e";xe[34]='\\"';xe[92]="\\\\";xe[133]="\\N";xe[160]="\\_";xe[8232]="\\L";xe[8233]="\\P";var PD=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function ID(e,t){var r,i,n,o,s,c,h;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)s=i[n],c=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),h=e.compiledTypeMap.fallback[s],h&&md.call(h.styleAliases,c)&&(c=h.styleAliases[c]),r[s]=c;return r}function ad(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Pi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Oi.repeat("0",i-t.length)+t}function ND(e){this.schema=e.schema||pD,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Oi.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ID(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ud(e,t){for(var r=Oi.repeat(" ",t),i=0,n=-1,o="",s,c=e.length;i<c;)n=e.indexOf(`
97
+ `,i),n===-1?(s=e.slice(i),i=c):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
98
+ `&&(o+=r),o+=s;return o}function ma(e,t){return`
99
+ `+Oi.repeat(" ",e.indent*t)}function MD(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function ya(e){return e===vD||e===gD}function Gr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function jD(e){return Gr(e)&&!ya(e)&&e!==65279&&e!==yD&&e!==Ti}function cd(e,t){return Gr(e)&&e!==65279&&e!==yd&&e!==xd&&e!==wd&&e!==Ed&&e!==bd&&e!==vd&&(e!==gd||t&&jD(t))}function BD(e){return Gr(e)&&e!==65279&&!ya(e)&&e!==SD&&e!==FD&&e!==vd&&e!==yd&&e!==xd&&e!==wd&&e!==Ed&&e!==bd&&e!==gd&&e!==bD&&e!==CD&&e!==xD&&e!==OD&&e!==AD&&e!==_D&&e!==DD&&e!==wD&&e!==ED&&e!==kD&&e!==TD}function Dd(e){var t=/^\n* /;return t.test(e)}var Cd=1,Sd=2,Ad=3,_d=4,Zn=5;function RD(e,t,r,i,n){var o,s,c,h=!1,g=!1,d=i!==-1,f=-1,p=BD(e.charCodeAt(0))&&!ya(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!Gr(s))return Zn;c=o>0?e.charCodeAt(o-1):null,p=p&&cd(s,c)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===Ti)h=!0,d&&(g=g||o-f-1>i&&e[f+1]!==" ",f=o);else if(!Gr(s))return Zn;c=o>0?e.charCodeAt(o-1):null,p=p&&cd(s,c)}g=g||d&&o-f-1>i&&e[f+1]!==" "}return!h&&!g?p&&!n(e)?Cd:Sd:r>9&&Dd(e)?Zn:g?_d:Ad}function LD(e,t,r,i){e.dump=(function(){if(t.length===0)return"''";if(!e.noCompatMode&&PD.indexOf(t)!==-1)return"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(h){return MD(e,h)}switch(RD(t,s,e.indent,o,c)){case Cd:return t;case Sd:return"'"+t.replace(/'/g,"''")+"'";case Ad:return"|"+ld(t,e.indent)+hd(ud(t,n));case _d:return">"+ld(t,e.indent)+hd(ud($D(t,o),n));case Zn:return'"'+qD(t,o)+'"';default:throw new Pi("impossible error: invalid scalar style")}})()}function ld(e,t){var r=Dd(e)?String(t):"",i=e[e.length-1]===`
100
+ `,n=i&&(e[e.length-2]===`
101
+ `||e===`
102
+ `),o=n?"+":i?"":"-";return r+o+`
103
+ `}function hd(e){return e[e.length-1]===`
104
+ `?e.slice(0,-1):e}function $D(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var g=e.indexOf(`
105
+ `);return g=g!==-1?g:e.length,r.lastIndex=g,fd(e.slice(0,g),t)})(),n=e[0]===`
106
+ `||e[0]===" ",o,s;s=r.exec(e);){var c=s[1],h=s[2];o=h[0]===" ",i+=c+(!n&&!o&&h!==""?`
107
+ `:"")+fd(h,t),n=o}return i}function fd(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,o,s=0,c=0,h="";i=r.exec(e);)c=i.index,c-n>t&&(o=s>n?s:c,h+=`
108
+ `+e.slice(n,o),n=o+1),s=c;return h+=`
109
+ `,e.length-n>t&&s>n?h+=e.slice(n,s)+`
110
+ `+e.slice(s+1):h+=e.slice(n),h.slice(1)}function qD(e){for(var t="",r,i,n,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(i=e.charCodeAt(o+1),i>=56320&&i<=57343)){t+=ad((r-55296)*1024+i-56320+65536),o++;continue}n=xe[r],t+=!n&&Gr(r)?e[o]:n||ad(r)}return t}function UD(e,t,r){var i="",n=e.tag,o,s;for(o=0,s=r.length;o<s;o+=1)cr(e,t,r[o],!1,!1)&&(o!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function HD(e,t,r,i){var n="",o=e.tag,s,c;for(s=0,c=r.length;s<c;s+=1)cr(e,t+1,r[s],!0,!0)&&((!i||s!==0)&&(n+=ma(e,t)),e.dump&&Ti===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function zD(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,c,h,g,d;for(s=0,c=o.length;s<c;s+=1)d="",s!==0&&(d+=", "),e.condenseFlow&&(d+='"'),h=o[s],g=r[h],cr(e,t,h,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),cr(e,t,g,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}function JD(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),c,h,g,d,f,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Pi("sortKeys must be a boolean or a function");for(c=0,h=s.length;c<h;c+=1)p="",(!i||c!==0)&&(p+=ma(e,t)),g=s[c],d=r[g],cr(e,t+1,g,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Ti===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=ma(e,t)),cr(e,t+1,d,!0,f)&&(e.dump&&Ti===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,n+=p));e.tag=o,e.dump=n||"{}"}function dd(e,t,r){var i,n,o,s,c,h;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(c=n[o],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(e.tag=r?c.tag:"?",c.represent){if(h=e.styleMap[c.tag]||c.defaultStyle,pd.call(c.represent)==="[object Function]")i=c.represent(t,h);else if(md.call(c.represent,h))i=c.represent[h](t,h);else throw new Pi("!<"+c.tag+'> tag resolver accepts not "'+h+'" style');e.dump=i}return!0}return!1}function cr(e,t,r,i,n,o){e.tag=null,e.dump=r,dd(e,r,!1)||dd(e,r,!0);var s=pd.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var c=s==="[object Object]"||s==="[object Array]",h,g;if(c&&(h=e.duplicates.indexOf(r),g=h!==-1),(e.tag!==null&&e.tag!=="?"||g||e.indent!==2&&t>0)&&(n=!1),g&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(c&&g&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(JD(e,t,e.dump,n),g&&(e.dump="&ref_"+h+e.dump)):(zD(e,t,e.dump),g&&(e.dump="&ref_"+h+" "+e.dump));else if(s==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(HD(e,d,e.dump,n),g&&(e.dump="&ref_"+h+e.dump)):(UD(e,d,e.dump),g&&(e.dump="&ref_"+h+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&LD(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Pi("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function WD(e,t){var r=[],i=[],n,o;for(ga(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function ga(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)ga(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)ga(e[i[n]],t,r)}function Fd(e,t){t=t||{};var r=new ND(t);return r.noRefs||WD(e,r),cr(r,0,e,!0,!0)?r.dump+`
111
+ `:""}function GD(e,t){return Fd(e,Oi.extend({schema:mD},t))}va.exports.dump=Fd;va.exports.safeDump=GD});var Od=E((D2,K)=>{"use strict";y();var es=od(),Td=kd();function ts(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}K.exports.Type=ce();K.exports.Schema=sr();K.exports.FAILSAFE_SCHEMA=Gn();K.exports.JSON_SCHEMA=ca();K.exports.CORE_SCHEMA=la();K.exports.DEFAULT_SAFE_SCHEMA=Hr();K.exports.DEFAULT_FULL_SCHEMA=Fi();K.exports.load=es.load;K.exports.loadAll=es.loadAll;K.exports.safeLoad=es.safeLoad;K.exports.safeLoadAll=es.safeLoadAll;K.exports.dump=Td.dump;K.exports.safeDump=Td.safeDump;K.exports.YAMLException=qr();K.exports.MINIMAL_SCHEMA=Gn();K.exports.SAFE_SCHEMA=Hr();K.exports.DEFAULT_SCHEMA=Fi();K.exports.scan=ts("scan");K.exports.parse=ts("parse");K.exports.compose=ts("compose");K.exports.addConstructor=ts("addConstructor")});var Id=E((S2,Pd)=>{"use strict";y();var XD=Od();Pd.exports=XD});var qd=E(rs=>{"use strict";y();Object.defineProperty(rs,"__esModule",{value:!0});var Bd=function(t,r){return t<r?-1:t>r?1:0},VD=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Rd=/^\s+|\s+$/g,YD=/\s+/g,KD=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,QD=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,ZD=/^0+[1-9]{1}[0-9]*$/,eC=/[^\x00-\x80]/,tC=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Nd=function(t,r){return t<r?-1:t>r?1:0},rC=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var c=t[s],h=r[s];if(c.normalizedString!==h.normalizedString){if(c.normalizedString===""!=(h.normalizedString===""))return c.normalizedString===""?-1:1;if(c.parsedNumber!==void 0&&h.parsedNumber!==void 0){var g=Bd(c.parsedNumber,h.parsedNumber);return g===0?Nd(c.normalizedString,h.normalizedString):g}else return c.parsedNumber!==void 0||h.parsedNumber!==void 0?c.parsedNumber!==void 0?-1:1:eC.test(c.normalizedString+h.normalizedString)&&c.normalizedString.localeCompare?tC(c.normalizedString,h.normalizedString):Nd(c.normalizedString,h.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},iC=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},Ld=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Bd(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?rC(t.chunks,r.chunks):iC(t,r)},nC=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,c=r.values,h=o.length,g=i.length,d=0;d<h;d++){var f=d<g?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,c[d].value);if(p)return p}else{var a=Ld(o[d],c[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},sC=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},oC=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Rd,""):""},$d=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},aC=function(t){if(QD.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},uC=function(t){var r=$d(t);return r!==void 0?r:aC(t)},cC=function(t){return t.replace(VD,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},lC=function(t){return t.replace(YD," ").replace(Rd,"")},hC=function(t,r,i){if(KD.test(t)&&(!ZD.test(t)||r===0||i[r-1]!=="."))return $d(t)||0},fC=function(t,r,i){return{parsedNumber:hC(t,r,i),normalizedString:lC(t)}},dC=function(t){var r=cC(t).map(fC);return r},pC=function(t){return typeof t=="function"},Md=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},mC=function(t){return t===null},gC=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},yC=function(t){return typeof t=="symbol"},vC=function(t){return t===void 0},xa=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!Md(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=oC(t),i=uC(r),n=dC(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:pC(t),isNaN:Md(t),isNull:mC(t),isObject:gC(t),isSymbol:yC(t),isUndefined:vC(t),value:t}},xC=function(t,r){return r(t)},wC=function(t,r){return t[r]},EC=function(t,r,i){var n=r.length?r.map(sC):[function(s){return s}],o=t.map(function(s,c){var h=n.map(function(g){return xC(s,g)}).map(xa);return{index:c,values:h}});return o.sort(function(s,c){return nC(s,c,i)}),o.map(function(s){return wC(t,s.index)})},bC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},DC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function CC(e,t,r){if(!e||!Array.isArray(e))return[];var i=bC(t),n=DC(r);return EC(e,i,n)}var SC=function(t){return function(r,i){var n=xa(r),o=xa(i),s=Ld(n,o);return s*(t.order==="desc"?-1:1)}},jd=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},AC=function(t){var r="asc";return typeof t=="string"&&jd(t)?r=t:t&&typeof t=="object"&&t.order&&jd(t.order)&&(r=t.order),{order:r}};function _C(e){var t=AC(e);return SC(t)}rs.orderBy=CC;rs.compare=_C});var zd=E((k2,Hd)=>{"use strict";y();var Ud="[\uD800-\uDBFF][\uDC00-\uDFFF]",FC=e=>e&&e.exact?new RegExp(`^${Ud}$`):new RegExp(Ud,"g");Hd.exports=FC});var Vd=E((O2,Xd)=>{"use strict";y();var kC=ey(),TC=zd(),Jd=xc(),Gd=["\x1B","\x9B"],is=e=>`${Gd[0]}[${e}m`,Wd=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Jd.codes.get(Number.parseInt(n,10));if(s){let c=e.indexOf(s.toString());c===-1?i.push(is(t?s:o)):e.splice(c,1)}else if(t){i.push(is(0));break}else i.push(is(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=is(Jd.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Xd.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,c,h=0,g="";for(let[d,f]of i.entries()){let p=!1;if(Gd.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));c=a&&a.length>0?a[0]:void 0,h<o&&(s=!0,c!==void 0&&n.push(c))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&h++,!TC({exact:!0}).test(f)&&kC(f.codePointAt())&&(h++,typeof r!="number"&&o++),h>t&&h<=o)g+=f;else if(h===t&&!s&&c!==void 0)g=Wd(n);else if(h>=o){g+=Wd(n,!0,c);break}}return g}});var ss=E(Q=>{"use strict";y();Object.defineProperty(Q,"__esModule",{value:!0});Q.option=Q.help=Q.version=Q.string=Q.url=Q.file=Q.directory=Q.integer=Q.boolean=Q.custom=void 0;var OC=F("node:url"),ns=$e(),PC=Ci(),Yd=yt();function Xr(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}Q.custom=Xr;function wa(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}Q.boolean=wa;Q.integer=Xr({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new ns.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new ns.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new ns.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Q.directory=Xr({async parse(e,t,r){return r.exists?(0,Yd.dirExists)(e):e}});Q.file=Xr({async parse(e,t,r){return r.exists?(0,Yd.fileExists)(e):e}});Q.url=Xr({async parse(e){try{return new OC.URL(e)}catch{throw new ns.CLIError(`Expected a valid url but received: ${e}`)}}});Q.string=Xr();var IC=(e={})=>wa({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});Q.version=IC;var NC=(e={})=>wa({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,PC.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});Q.help=NC;function MC(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}Q.option=MC});var Qd=E(Ne=>{"use strict";y();var jC=Ne&&Ne.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),BC=Ne&&Ne.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),RC=Ne&&Ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&jC(t,e,r);return BC(t,e),t},os=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.table=void 0;var Kd=os(Be()),LC=Id(),$C=qd(),qC=F("node:util"),UC=os(Vd()),lr=os(uo()),Rt=RC(ss()),HC=Yt(),Ea=oe(),zC=os(Ot()),ba=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],u=a.extended??!1,l=a.get??(x=>x[p]??""),m=typeof a.header=="string"?a.header:(0,Ea.capitalize)(p.replaceAll("_"," ")),v=Math.max(a.minWidth??0,(0,lr.default)(m)+1);return{extended:u,get:l,header:m,key:p,minWidth:v}});let{columns:n,csv:o,extended:s,filter:c,output:h,printLine:g,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:c,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":h,printLine:g??(p=>zC.default.stdout(p+`
112
+ `)),rowStart:" ",sort:d,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,qC.inspect)(o,{breakLength:Number.POSITIVE_INFINITY})),i[n.key]=o}return i});if(this.options.filter){let[r,i]=this.options.filter.split("="),n=r[0]==="-";n&&(r=r.slice(1));let o=this.findColumnFromHeader(r);if(!o||!i)throw new Error("Filter flag has an invalid value");t=t.filter(s=>{let c=new RegExp(i),g=s[o.key].match(c);return n?!g:g})}if(this.options.sort){let r=this.options.sort.split(","),i=r.map(s=>s[0]==="-"?s.slice(1):s),n=this.filterColumnsFromHeaders(i).map(s=>c=>c[s.key]),o=r.map(s=>s[0]==="-"?"desc":"asc");t=(0,$C.orderBy)(t,n,o)}if(this.options.columns){let r=this.options.columns.split(",");this.columns=this.filterColumnsFromHeaders(r)}else this.options.extended||(this.columns=this.columns.filter(r=>!r.extended));switch(this.data=t,this.options.output){case"csv":{this.outputCSV();break}case"json":{this.outputJSON();break}case"yaml":{this.outputYAML();break}default:this.outputTable()}}filterColumnsFromHeaders(t){t=[...new Set(t)];let r=[];for(let i of t){let n=this.columns.find(o=>o.header.toLowerCase()===i.toLowerCase());n&&r.push(n)}return r}findColumnFromHeader(t){return this.columns.find(r=>r.header.toLowerCase()===t.toLowerCase())}getCSVRow(t){let r=this.columns.map(n=>t[n.key]||""),i=r.find(n=>n.includes('"')||n.includes(`
113
+ `)||n.includes(`\r
114
+ `)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let c=Math.max((0,lr.default)(".".padEnd(s.minWidth-1)),(0,lr.default)(s.header),JC(t,s.key))+1;return{...s,maxWidth:c,width:c}}),n=HC.stdtermwidth-2;if((()=>{if(r["no-truncate"]||!process.stdout.isTTY&&!process.env.CLI_UX_SKIP_TTY_CHECK||(0,Ea.sumBy)(i,f=>f.width)-n<=0)return;for(let f of i)f.width=f.minWidth;let h=(0,Ea.sumBy)(i,f=>f.minWidth);if(h>=n)return;let g=n-h,d=i.map(f=>({key:f.key,needs:f.maxWidth-f.width})).sort((f,p)=>f.needs-p.needs);for(let{key:f,needs:p}of d){if(!p)continue;let a=i.find(u=>f===u.key);a&&(g>p?(a.width=a.width+p,g-=p):g&&(a.width=a.width+g,g=0))}})(),r.title&&(r.printLine(r.title),r.printLine("".padEnd(i.reduce((s,c)=>s+c.width,1),"=")),r.rowStart="| "),!r["no-header"]){let s=r.rowStart;for(let h of i){let g=h.header;s+=g.padEnd(h.width)}r.printLine(Kd.default.bold(s));let c=r.rowStart;for(let h of i){let g="".padEnd(h.width-1,"\u2500")+" ";c+=g.padEnd(h.width)}r.printLine(Kd.default.bold(c))}for(let s of t){let c=1;for(let g of i){let f=s[g.key].split(`
115
+ `).length;f>c&&(c=f)}let h=[...new Array(c).keys()];for(let g of h){let d=r.rowStart;for(let f of i){let p=f.width,a=s[f.key];a=a.split(`
116
+ `)[g]||"";let u=(0,lr.default)(a),l=a.length-u,m=a.padEnd(p+l);(m.length-l>p||u===p)&&(m=(0,UC.default)(m,0,p-2)+"\u2026 ",m+=" ".repeat(p-(0,lr.default)(m))),d+=m}r.printLine(d)}}}outputYAML(){this.options.printLine((0,LC.safeDump)(this.resolveColumnsToObjectArray()))}resolveColumnsToObjectArray(){let{columns:t,data:r}=this;return r.map(i=>Object.fromEntries(t.map(n=>[n.key,i[n.key]??""])))}};function Da(e,t,r={}){new ba(e,t,r).display()}Ne.table=Da;(function(e){e.Flags={columns:Rt.string({description:"only show provided columns (comma-separated)",exclusive:["extended"]}),csv:Rt.boolean({description:"output is csv format [alias: --output=csv]",exclusive:["no-truncate"]}),extended:Rt.boolean({char:"x",description:"show extra columns",exclusive:["columns"]}),filter:Rt.string({description:"filter property by partial string matching, ex: name=foo"}),"no-header":Rt.boolean({description:"hide table header from output",exclusive:["csv"]}),"no-truncate":Rt.boolean({description:"do not truncate output to fit screen",exclusive:["csv"]}),output:Rt.string({description:"output in a more machine friendly format",exclusive:["no-truncate","csv"],options:["csv","json","yaml"]}),sort:Rt.string({description:"property to sort by (prepend '-' for descending)"})};function t(r){if(r){let i={},n=(r.only&&typeof r.only=="string"?[r.only]:r.only)||Object.keys(e.Flags),o=(r.except&&typeof r.except=="string"?[r.except]:r.except)||[];for(let s of n)o.includes(s)||(i[s]=e.Flags[s]);return i}return e.Flags}e.flags=t})(Da||(Ne.table=Da={}));var JC=(e,t)=>e.reduce((r,i)=>{let n=i[t],o=n.split(`
117
+ `);return Math.max(r,o.length>1?Math.max(...o.map(s=>(0,lr.default)(s))):(0,lr.default)(n))},0)});var ep=E((B2,Zd)=>{"use strict";y();var hr=console.assert,WC=e=>{let t={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",sortFn:null,...e};return hr(Object.keys(t).length===6,"Unexpected Option(s) provided"),hr(typeof t.joined=="boolean",'Option "joined" has invalid format'),hr(typeof t.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),hr(typeof t.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),hr(typeof t.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),hr(typeof t.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),hr(typeof t.sortFn=="function"||t.sortFn===null,'Option "sortFn" has invalid format'),t};Zd.exports=(e,t={})=>{let r=WC(t),i=[],n=h=>r.sortFn===null?h.reverse():h.sort((g,d)=>r.sortFn(d,g)),o=[],s=n(Object.keys(e)).map(h=>[h]),c=[e];for(;s.length!==0;){let h=s.pop(),g=c[h.length-1][h[h.length-1]];o[h.length-1]=s.length!==0&&s[s.length-1].length===h.length,i.push([o.slice(0,h.length-1).map(d=>d?r.spacerNeighbour:r.spacerNoNeighbour).join(""),o[h.length-1]?r.keyNeighbour:r.keyNoNeighbour,h[h.length-1],["boolean","string","number"].includes(typeof g)?`: ${g}`:""].join("")),g instanceof Object&&!Array.isArray(g)&&(s.push(...n(Object.keys(g)).map(d=>h.concat(d))),c[h.length]=g)}return r.joined===!0?i.join(`
118
+ `):i}});var tp=E(Ii=>{"use strict";y();Object.defineProperty(Ii,"__esModule",{value:!0});Ii.Tree=void 0;var GC=ep(),as=class e{nodes={};display(t=console.log){let r=function(n){let o={};for(let s of Object.keys(n))o[s]=r(n[s].nodes);return o},i=r(this.nodes);t(GC(i))}insert(t,r=new e){return this.nodes[t]=r,this}search(t){for(let r of Object.keys(this.nodes)){if(r===t)return this.nodes[r];let i=this.nodes[r].search(t);if(i)return i}}};Ii.Tree=as;function XC(){return new as}Ii.default=XC});var Sa=E(de=>{"use strict";y();var VC=de&&de.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),YC=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),KC=de&&de.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&VC(t,e,r);return YC(t,e),t},Ca=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(de,"__esModule",{value:!0});de.tree=de.Table=de.progress=de.styledObject=void 0;var QC=dh();Object.defineProperty(de,"styledObject",{enumerable:!0,get:function(){return Ca(QC).default}});var ZC=qh();Object.defineProperty(de,"progress",{enumerable:!0,get:function(){return Ca(ZC).default}});de.Table=KC(Qd());var eS=tp();Object.defineProperty(de,"tree",{enumerable:!0,get:function(){return Ca(eS).default}})});var rp=E(Aa=>{"use strict";y();Object.defineProperty(Aa,"__esModule",{value:!0});Aa.default=(e=1e3)=>new Promise(t=>{setTimeout(t,e)})});var np=E((J2,ip)=>{"use strict";y();ip.exports=(e,t,r)=>(r=r||{},["\x1B]","8",";",Object.keys(r).map(i=>i+"="+r[i]).join(":"),";",t,"\x07",e,"\x1B]","8",";",";","\x07"].join(""))});var sp=E((Ni,_a)=>{y();(function(t,r){typeof Ni=="object"&&typeof _a=="object"?_a.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Ni=="object"?Ni.esprima=r():t.esprima=r()})(Ni,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)})([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),n=r(3),o=r(8),s=r(15);function c(p,a,u){var l=null,m=function(B,L){u&&u(B,L),l&&l.visit(B,L)},v=typeof u=="function"?m:null,x=!1;if(a){x=typeof a.comment=="boolean"&&a.comment;var w=typeof a.attachComment=="boolean"&&a.attachComment;(x||w)&&(l=new i.CommentHandler,l.attach=w,a.comment=!0,v=m)}var C=!1;a&&typeof a.sourceType=="string"&&(C=a.sourceType==="module");var S;a&&typeof a.jsx=="boolean"&&a.jsx?S=new n.JSXParser(p,a,v):S=new o.Parser(p,a,v);var T=C?S.parseModule():S.parseScript(),P=T;return x&&l&&(P.comments=l.comments),S.config.tokens&&(P.tokens=S.tokens),S.config.tolerant&&(P.errors=S.errorHandler.errors),P}t.parse=c;function h(p,a,u){var l=a||{};return l.sourceType="module",c(p,l,u)}t.parseModule=h;function g(p,a,u){var l=a||{};return l.sourceType="script",c(p,l,u)}t.parseScript=g;function d(p,a,u){var l=new s.Tokenizer(p,a),m;m=[];try{for(;;){var v=l.getNextToken();if(!v)break;u&&(v=u(v)),m.push(v)}}catch(x){l.errorHandler.tolerate(x)}return l.errorHandler.tolerant&&(m.errors=l.errors()),m}t.tokenize=d;var f=r(2);t.Syntax=f.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(s,c){if(s.type===i.Syntax.BlockStatement&&s.body.length===0){for(var h=[],g=this.leading.length-1;g>=0;--g){var d=this.leading[g];c.end.offset>=d.start&&(h.unshift(d.comment),this.leading.splice(g,1),this.trailing.splice(g,1))}h.length&&(s.innerComments=h)}},o.prototype.findTrailingComments=function(s){var c=[];if(this.trailing.length>0){for(var h=this.trailing.length-1;h>=0;--h){var g=this.trailing[h];g.start>=s.end.offset&&c.unshift(g.comment)}return this.trailing.length=0,c}var d=this.stack[this.stack.length-1];if(d&&d.node.trailingComments){var f=d.node.trailingComments[0];f&&f.range[0]>=s.end.offset&&(c=d.node.trailingComments,delete d.node.trailingComments)}return c},o.prototype.findLeadingComments=function(s){for(var c=[],h;this.stack.length>0;){var g=this.stack[this.stack.length-1];if(g&&g.start>=s.start.offset)h=g.node,this.stack.pop();else break}if(h){for(var d=h.leadingComments?h.leadingComments.length:0,f=d-1;f>=0;--f){var p=h.leadingComments[f];p.range[1]<=s.start.offset&&(c.unshift(p),h.leadingComments.splice(f,1))}return h.leadingComments&&h.leadingComments.length===0&&delete h.leadingComments,c}for(var f=this.leading.length-1;f>=0;--f){var g=this.leading[f];g.start<=s.start.offset&&(c.unshift(g.comment),this.leading.splice(f,1))}return c},o.prototype.visitNode=function(s,c){if(!(s.type===i.Syntax.Program&&s.body.length>0)){this.insertInnerComments(s,c);var h=this.findTrailingComments(c),g=this.findLeadingComments(c);g.length>0&&(s.leadingComments=g),h.length>0&&(s.trailingComments=h),this.stack.push({node:s,start:c.start.offset})}},o.prototype.visitComment=function(s,c){var h=s.type[0]==="L"?"Line":"Block",g={type:h,value:s.value};if(s.range&&(g.range=s.range),s.loc&&(g.loc=s.loc),this.comments.push(g),this.attach){var d={comment:{type:h,value:s.value,range:[c.start.offset,c.end.offset]},start:c.start.offset};s.loc&&(d.comment.loc=s.loc),s.type=h,this.leading.push(d),this.trailing.push(d)}},o.prototype.visit=function(s,c){s.type==="LineComment"?this.visitComment(s,c):s.type==="BlockComment"?this.visitComment(s,c):this.attach&&this.visitNode(s,c)},o})();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var m in l)l.hasOwnProperty(m)&&(u[m]=l[m])};return function(u,l){a(u,l);function m(){this.constructor=u}u.prototype=l===null?Object.create(l):(m.prototype=l.prototype,new m)}})();Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(5),s=r(6),c=r(7),h=r(8),g=r(13),d=r(14);g.TokenName[100]="JSXIdentifier",g.TokenName[101]="JSXText";function f(a){var u;switch(a.type){case s.JSXSyntax.JSXIdentifier:var l=a;u=l.name;break;case s.JSXSyntax.JSXNamespacedName:var m=a;u=f(m.namespace)+":"+f(m.name);break;case s.JSXSyntax.JSXMemberExpression:var v=a;u=f(v.object)+"."+f(v.property);break;default:break}return u}var p=(function(a){i(u,a);function u(l,m,v){return a.call(this,l,m,v)||this}return u.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():a.prototype.parsePrimaryExpression.call(this)},u.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},u.prototype.finishJSX=function(){this.nextToken()},u.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},u.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},u.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},u.prototype.scanXHTMLEntity=function(l){for(var m="&",v=!0,x=!1,w=!1,C=!1;!this.scanner.eof()&&v&&!x;){var S=this.scanner.source[this.scanner.index];if(S===l)break;if(x=S===";",m+=S,++this.scanner.index,!x)switch(m.length){case 2:w=S==="#";break;case 3:w&&(C=S==="x",v=C||n.Character.isDecimalDigit(S.charCodeAt(0)),w=w&&!C);break;default:v=v&&!(w&&!n.Character.isDecimalDigit(S.charCodeAt(0))),v=v&&!(C&&!n.Character.isHexDigit(S.charCodeAt(0)));break}}if(v&&x&&m.length>2){var T=m.substr(1,m.length-2);w&&T.length>1?m=String.fromCharCode(parseInt(T.substr(1),10)):C&&T.length>2?m=String.fromCharCode(parseInt("0"+T.substr(1),16)):!w&&!C&&d.XHTMLEntities[T]&&(m=d.XHTMLEntities[T])}return m},u.prototype.lexJSX=function(){var l=this.scanner.source.charCodeAt(this.scanner.index);if(l===60||l===62||l===47||l===58||l===61||l===123||l===125){var m=this.scanner.source[this.scanner.index++];return{type:7,value:m,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(l===34||l===39){for(var v=this.scanner.index,x=this.scanner.source[this.scanner.index++],w="";!this.scanner.eof();){var C=this.scanner.source[this.scanner.index++];if(C===x)break;C==="&"?w+=this.scanXHTMLEntity(x):w+=C}return{type:8,value:w,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}if(l===46){var S=this.scanner.source.charCodeAt(this.scanner.index+1),T=this.scanner.source.charCodeAt(this.scanner.index+2),m=S===46&&T===46?"...":".",v=this.scanner.index;return this.scanner.index+=m.length,{type:7,value:m,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}if(l===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(l)&&l!==92){var v=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var C=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(C)&&C!==92)++this.scanner.index;else if(C===45)++this.scanner.index;else break}var P=this.scanner.source.slice(v,this.scanner.index);return{type:100,value:P,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}return this.scanner.lex()},u.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var l=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(l)),l},u.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var l=this.scanner.index,m="";!this.scanner.eof();){var v=this.scanner.source[this.scanner.index];if(v==="{"||v==="<")break;++this.scanner.index,m+=v,n.Character.isLineTerminator(v.charCodeAt(0))&&(++this.scanner.lineNumber,v==="\r"&&this.scanner.source[this.scanner.index]===`
119
+ `&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var x={type:101,value:m,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:l,end:this.scanner.index};return m.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(x)),x},u.prototype.peekJSXToken=function(){var l=this.scanner.saveState();this.scanner.scanComments();var m=this.lexJSX();return this.scanner.restoreState(l),m},u.prototype.expectJSX=function(l){var m=this.nextJSXToken();(m.type!==7||m.value!==l)&&this.throwUnexpectedToken(m)},u.prototype.matchJSX=function(l){var m=this.peekJSXToken();return m.type===7&&m.value===l},u.prototype.parseJSXIdentifier=function(){var l=this.createJSXNode(),m=this.nextJSXToken();return m.type!==100&&this.throwUnexpectedToken(m),this.finalize(l,new o.JSXIdentifier(m.value))},u.prototype.parseJSXElementName=function(){var l=this.createJSXNode(),m=this.parseJSXIdentifier();if(this.matchJSX(":")){var v=m;this.expectJSX(":");var x=this.parseJSXIdentifier();m=this.finalize(l,new o.JSXNamespacedName(v,x))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var w=m;this.expectJSX(".");var C=this.parseJSXIdentifier();m=this.finalize(l,new o.JSXMemberExpression(w,C))}return m},u.prototype.parseJSXAttributeName=function(){var l=this.createJSXNode(),m,v=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=v;this.expectJSX(":");var w=this.parseJSXIdentifier();m=this.finalize(l,new o.JSXNamespacedName(x,w))}else m=v;return m},u.prototype.parseJSXStringLiteralAttribute=function(){var l=this.createJSXNode(),m=this.nextJSXToken();m.type!==8&&this.throwUnexpectedToken(m);var v=this.getTokenRaw(m);return this.finalize(l,new c.Literal(m.value,v))},u.prototype.parseJSXExpressionAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var m=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXExpressionContainer(m))},u.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},u.prototype.parseJSXNameValueAttribute=function(){var l=this.createJSXNode(),m=this.parseJSXAttributeName(),v=null;return this.matchJSX("=")&&(this.expectJSX("="),v=this.parseJSXAttributeValue()),this.finalize(l,new o.JSXAttribute(m,v))},u.prototype.parseJSXSpreadAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var m=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXSpreadAttribute(m))},u.prototype.parseJSXAttributes=function(){for(var l=[];!this.matchJSX("/")&&!this.matchJSX(">");){var m=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();l.push(m)}return l},u.prototype.parseJSXOpeningElement=function(){var l=this.createJSXNode();this.expectJSX("<");var m=this.parseJSXElementName(),v=this.parseJSXAttributes(),x=this.matchJSX("/");return x&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(m,x,v))},u.prototype.parseJSXBoundaryElement=function(){var l=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var m=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(l,new o.JSXClosingElement(m))}var v=this.parseJSXElementName(),x=this.parseJSXAttributes(),w=this.matchJSX("/");return w&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(v,w,x))},u.prototype.parseJSXEmptyExpression=function(){var l=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(l,new o.JSXEmptyExpression)},u.prototype.parseJSXExpressionContainer=function(){var l=this.createJSXNode();this.expectJSX("{");var m;return this.matchJSX("}")?(m=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),m=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(l,new o.JSXExpressionContainer(m))},u.prototype.parseJSXChildren=function(){for(var l=[];!this.scanner.eof();){var m=this.createJSXChildNode(),v=this.nextJSXText();if(v.start<v.end){var x=this.getTokenRaw(v),w=this.finalize(m,new o.JSXText(v.value,x));l.push(w)}if(this.scanner.source[this.scanner.index]==="{"){var C=this.parseJSXExpressionContainer();l.push(C)}else break}return l},u.prototype.parseComplexJSXElement=function(l){for(var m=[];!this.scanner.eof();){l.children=l.children.concat(this.parseJSXChildren());var v=this.createJSXChildNode(),x=this.parseJSXBoundaryElement();if(x.type===s.JSXSyntax.JSXOpeningElement){var w=x;if(w.selfClosing){var C=this.finalize(v,new o.JSXElement(w,[],null));l.children.push(C)}else m.push(l),l={node:v,opening:w,closing:null,children:[]}}if(x.type===s.JSXSyntax.JSXClosingElement){l.closing=x;var S=f(l.opening.name),T=f(l.closing.name);if(S!==T&&this.tolerateError("Expected corresponding JSX closing tag for %0",S),m.length>0){var C=this.finalize(l.node,new o.JSXElement(l.opening,l.children,l.closing));l=m[m.length-1],l.children.push(C),m.pop()}else break}}return l},u.prototype.parseJSXElement=function(){var l=this.createJSXNode(),m=this.parseJSXOpeningElement(),v=[],x=null;if(!m.selfClosing){var w=this.parseComplexJSXElement({node:l,opening:m,closing:x,children:v});v=w.children,x=w.closing}return this.finalize(l,new o.JSXElement(m,v,x))},u.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var l=this.parseJSXElement();return this.finishJSX(),l},u.prototype.isStartOfExpression=function(){return a.prototype.isStartOfExpression.call(this)||this.match("<")},u})(h.Parser);t.JSXParser=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),n=(function(){function l(m){this.type=i.JSXSyntax.JSXClosingElement,this.name=m}return l})();t.JSXClosingElement=n;var o=(function(){function l(m,v,x){this.type=i.JSXSyntax.JSXElement,this.openingElement=m,this.children=v,this.closingElement=x}return l})();t.JSXElement=o;var s=(function(){function l(){this.type=i.JSXSyntax.JSXEmptyExpression}return l})();t.JSXEmptyExpression=s;var c=(function(){function l(m){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=m}return l})();t.JSXExpressionContainer=c;var h=(function(){function l(m){this.type=i.JSXSyntax.JSXIdentifier,this.name=m}return l})();t.JSXIdentifier=h;var g=(function(){function l(m,v){this.type=i.JSXSyntax.JSXMemberExpression,this.object=m,this.property=v}return l})();t.JSXMemberExpression=g;var d=(function(){function l(m,v){this.type=i.JSXSyntax.JSXAttribute,this.name=m,this.value=v}return l})();t.JSXAttribute=d;var f=(function(){function l(m,v){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=m,this.name=v}return l})();t.JSXNamespacedName=f;var p=(function(){function l(m,v,x){this.type=i.JSXSyntax.JSXOpeningElement,this.name=m,this.selfClosing=v,this.attributes=x}return l})();t.JSXOpeningElement=p;var a=(function(){function l(m){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=m}return l})();t.JSXSpreadAttribute=a;var u=(function(){function l(m,v){this.type=i.JSXSyntax.JSXText,this.value=m,this.raw=v}return l})();t.JSXText=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function b(D){this.type=i.Syntax.ArrayExpression,this.elements=D}return b})();t.ArrayExpression=n;var o=(function(){function b(D){this.type=i.Syntax.ArrayPattern,this.elements=D}return b})();t.ArrayPattern=o;var s=(function(){function b(D,A,R){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=A,this.generator=!1,this.expression=R,this.async=!1}return b})();t.ArrowFunctionExpression=s;var c=(function(){function b(D,A,R){this.type=i.Syntax.AssignmentExpression,this.operator=D,this.left=A,this.right=R}return b})();t.AssignmentExpression=c;var h=(function(){function b(D,A){this.type=i.Syntax.AssignmentPattern,this.left=D,this.right=A}return b})();t.AssignmentPattern=h;var g=(function(){function b(D,A,R){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=A,this.generator=!1,this.expression=R,this.async=!0}return b})();t.AsyncArrowFunctionExpression=g;var d=(function(){function b(D,A,R){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=A,this.body=R,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionDeclaration=d;var f=(function(){function b(D,A,R){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=A,this.body=R,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionExpression=f;var p=(function(){function b(D){this.type=i.Syntax.AwaitExpression,this.argument=D}return b})();t.AwaitExpression=p;var a=(function(){function b(D,A,R){var Te=D==="||"||D==="&&";this.type=Te?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=D,this.left=A,this.right=R}return b})();t.BinaryExpression=a;var u=(function(){function b(D){this.type=i.Syntax.BlockStatement,this.body=D}return b})();t.BlockStatement=u;var l=(function(){function b(D){this.type=i.Syntax.BreakStatement,this.label=D}return b})();t.BreakStatement=l;var m=(function(){function b(D,A){this.type=i.Syntax.CallExpression,this.callee=D,this.arguments=A}return b})();t.CallExpression=m;var v=(function(){function b(D,A){this.type=i.Syntax.CatchClause,this.param=D,this.body=A}return b})();t.CatchClause=v;var x=(function(){function b(D){this.type=i.Syntax.ClassBody,this.body=D}return b})();t.ClassBody=x;var w=(function(){function b(D,A,R){this.type=i.Syntax.ClassDeclaration,this.id=D,this.superClass=A,this.body=R}return b})();t.ClassDeclaration=w;var C=(function(){function b(D,A,R){this.type=i.Syntax.ClassExpression,this.id=D,this.superClass=A,this.body=R}return b})();t.ClassExpression=C;var S=(function(){function b(D,A){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=D,this.property=A}return b})();t.ComputedMemberExpression=S;var T=(function(){function b(D,A,R){this.type=i.Syntax.ConditionalExpression,this.test=D,this.consequent=A,this.alternate=R}return b})();t.ConditionalExpression=T;var P=(function(){function b(D){this.type=i.Syntax.ContinueStatement,this.label=D}return b})();t.ContinueStatement=P;var B=(function(){function b(){this.type=i.Syntax.DebuggerStatement}return b})();t.DebuggerStatement=B;var L=(function(){function b(D,A){this.type=i.Syntax.ExpressionStatement,this.expression=D,this.directive=A}return b})();t.Directive=L;var z=(function(){function b(D,A){this.type=i.Syntax.DoWhileStatement,this.body=D,this.test=A}return b})();t.DoWhileStatement=z;var G=(function(){function b(){this.type=i.Syntax.EmptyStatement}return b})();t.EmptyStatement=G;var pe=(function(){function b(D){this.type=i.Syntax.ExportAllDeclaration,this.source=D}return b})();t.ExportAllDeclaration=pe;var _t=(function(){function b(D){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=D}return b})();t.ExportDefaultDeclaration=_t;var wr=(function(){function b(D,A,R){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=D,this.specifiers=A,this.source=R}return b})();t.ExportNamedDeclaration=wr;var Wt=(function(){function b(D,A){this.type=i.Syntax.ExportSpecifier,this.exported=A,this.local=D}return b})();t.ExportSpecifier=Wt;var io=(function(){function b(D){this.type=i.Syntax.ExpressionStatement,this.expression=D}return b})();t.ExpressionStatement=io;var no=(function(){function b(D,A,R){this.type=i.Syntax.ForInStatement,this.left=D,this.right=A,this.body=R,this.each=!1}return b})();t.ForInStatement=no;var fi=(function(){function b(D,A,R){this.type=i.Syntax.ForOfStatement,this.left=D,this.right=A,this.body=R}return b})();t.ForOfStatement=fi;var Gt=(function(){function b(D,A,R,Te){this.type=i.Syntax.ForStatement,this.init=D,this.test=A,this.update=R,this.body=Te}return b})();t.ForStatement=Gt;var dt=(function(){function b(D,A,R,Te){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=A,this.body=R,this.generator=Te,this.expression=!1,this.async=!1}return b})();t.FunctionDeclaration=dt;var pt=(function(){function b(D,A,R,Te){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=A,this.body=R,this.generator=Te,this.expression=!1,this.async=!1}return b})();t.FunctionExpression=pt;var tn=(function(){function b(D){this.type=i.Syntax.Identifier,this.name=D}return b})();t.Identifier=tn;var Er=(function(){function b(D,A,R){this.type=i.Syntax.IfStatement,this.test=D,this.consequent=A,this.alternate=R}return b})();t.IfStatement=Er;var Xt=(function(){function b(D,A){this.type=i.Syntax.ImportDeclaration,this.specifiers=D,this.source=A}return b})();t.ImportDeclaration=Xt;var re=(function(){function b(D){this.type=i.Syntax.ImportDefaultSpecifier,this.local=D}return b})();t.ImportDefaultSpecifier=re;var De=(function(){function b(D){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=D}return b})();t.ImportNamespaceSpecifier=De;var We=(function(){function b(D,A){this.type=i.Syntax.ImportSpecifier,this.local=D,this.imported=A}return b})();t.ImportSpecifier=We;var je=(function(){function b(D,A){this.type=i.Syntax.LabeledStatement,this.label=D,this.body=A}return b})();t.LabeledStatement=je;var Ge=(function(){function b(D,A){this.type=i.Syntax.Literal,this.value=D,this.raw=A}return b})();t.Literal=Ge;var Ft=(function(){function b(D,A){this.type=i.Syntax.MetaProperty,this.meta=D,this.property=A}return b})();t.MetaProperty=Ft;var E0=(function(){function b(D,A,R,Te,so){this.type=i.Syntax.MethodDefinition,this.key=D,this.computed=A,this.value=R,this.kind=Te,this.static=so}return b})();t.MethodDefinition=E0;var b0=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="module"}return b})();t.Module=b0;var D0=(function(){function b(D,A){this.type=i.Syntax.NewExpression,this.callee=D,this.arguments=A}return b})();t.NewExpression=D0;var C0=(function(){function b(D){this.type=i.Syntax.ObjectExpression,this.properties=D}return b})();t.ObjectExpression=C0;var S0=(function(){function b(D){this.type=i.Syntax.ObjectPattern,this.properties=D}return b})();t.ObjectPattern=S0;var A0=(function(){function b(D,A,R,Te,so,Y0){this.type=i.Syntax.Property,this.key=A,this.computed=R,this.value=Te,this.kind=D,this.method=so,this.shorthand=Y0}return b})();t.Property=A0;var _0=(function(){function b(D,A,R,Te){this.type=i.Syntax.Literal,this.value=D,this.raw=A,this.regex={pattern:R,flags:Te}}return b})();t.RegexLiteral=_0;var F0=(function(){function b(D){this.type=i.Syntax.RestElement,this.argument=D}return b})();t.RestElement=F0;var k0=(function(){function b(D){this.type=i.Syntax.ReturnStatement,this.argument=D}return b})();t.ReturnStatement=k0;var T0=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="script"}return b})();t.Script=T0;var O0=(function(){function b(D){this.type=i.Syntax.SequenceExpression,this.expressions=D}return b})();t.SequenceExpression=O0;var P0=(function(){function b(D){this.type=i.Syntax.SpreadElement,this.argument=D}return b})();t.SpreadElement=P0;var I0=(function(){function b(D,A){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=D,this.property=A}return b})();t.StaticMemberExpression=I0;var N0=(function(){function b(){this.type=i.Syntax.Super}return b})();t.Super=N0;var M0=(function(){function b(D,A){this.type=i.Syntax.SwitchCase,this.test=D,this.consequent=A}return b})();t.SwitchCase=M0;var j0=(function(){function b(D,A){this.type=i.Syntax.SwitchStatement,this.discriminant=D,this.cases=A}return b})();t.SwitchStatement=j0;var B0=(function(){function b(D,A){this.type=i.Syntax.TaggedTemplateExpression,this.tag=D,this.quasi=A}return b})();t.TaggedTemplateExpression=B0;var R0=(function(){function b(D,A){this.type=i.Syntax.TemplateElement,this.value=D,this.tail=A}return b})();t.TemplateElement=R0;var L0=(function(){function b(D,A){this.type=i.Syntax.TemplateLiteral,this.quasis=D,this.expressions=A}return b})();t.TemplateLiteral=L0;var $0=(function(){function b(){this.type=i.Syntax.ThisExpression}return b})();t.ThisExpression=$0;var q0=(function(){function b(D){this.type=i.Syntax.ThrowStatement,this.argument=D}return b})();t.ThrowStatement=q0;var U0=(function(){function b(D,A,R){this.type=i.Syntax.TryStatement,this.block=D,this.handler=A,this.finalizer=R}return b})();t.TryStatement=U0;var H0=(function(){function b(D,A){this.type=i.Syntax.UnaryExpression,this.operator=D,this.argument=A,this.prefix=!0}return b})();t.UnaryExpression=H0;var z0=(function(){function b(D,A,R){this.type=i.Syntax.UpdateExpression,this.operator=D,this.argument=A,this.prefix=R}return b})();t.UpdateExpression=z0;var J0=(function(){function b(D,A){this.type=i.Syntax.VariableDeclaration,this.declarations=D,this.kind=A}return b})();t.VariableDeclaration=J0;var W0=(function(){function b(D,A){this.type=i.Syntax.VariableDeclarator,this.id=D,this.init=A}return b})();t.VariableDeclarator=W0;var G0=(function(){function b(D,A){this.type=i.Syntax.WhileStatement,this.test=D,this.body=A}return b})();t.WhileStatement=G0;var X0=(function(){function b(D,A){this.type=i.Syntax.WithStatement,this.object=D,this.body=A}return b})();t.WithStatement=X0;var V0=(function(){function b(D,A){this.type=i.Syntax.YieldExpression,this.argument=D,this.delegate=A}return b})();t.YieldExpression=V0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(10),o=r(11),s=r(7),c=r(12),h=r(2),g=r(13),d="ArrowParameterPlaceHolder",f=(function(){function p(a,u,l){u===void 0&&(u={}),this.config={range:typeof u.range=="boolean"&&u.range,loc:typeof u.loc=="boolean"&&u.loc,source:null,tokens:typeof u.tokens=="boolean"&&u.tokens,comment:typeof u.comment=="boolean"&&u.comment,tolerant:typeof u.tolerant=="boolean"&&u.tolerant},this.config.loc&&u.source&&u.source!==null&&(this.config.source=String(u.source)),this.delegate=l,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new c.Scanner(a,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return p.prototype.throwError=function(a){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var m=Array.prototype.slice.call(arguments,1),v=a.replace(/%(\d)/g,function(S,T){return i.assert(T<m.length,"Message reference must be in range"),m[T]}),x=this.lastMarker.index,w=this.lastMarker.line,C=this.lastMarker.column+1;throw this.errorHandler.createError(x,w,C,v)},p.prototype.tolerateError=function(a){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var m=Array.prototype.slice.call(arguments,1),v=a.replace(/%(\d)/g,function(S,T){return i.assert(T<m.length,"Message reference must be in range"),m[T]}),x=this.lastMarker.index,w=this.scanner.lineNumber,C=this.lastMarker.column+1;this.errorHandler.tolerateError(x,w,C,v)},p.prototype.unexpectedTokenError=function(a,u){var l=u||o.Messages.UnexpectedToken,m;if(a?(u||(l=a.type===2?o.Messages.UnexpectedEOS:a.type===3?o.Messages.UnexpectedIdentifier:a.type===6?o.Messages.UnexpectedNumber:a.type===8?o.Messages.UnexpectedString:a.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,a.type===4&&(this.scanner.isFutureReservedWord(a.value)?l=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(a.value)&&(l=o.Messages.StrictReservedWord))),m=a.value):m="ILLEGAL",l=l.replace("%0",m),a&&typeof a.lineNumber=="number"){var v=a.start,x=a.lineNumber,w=this.lastMarker.index-this.lastMarker.column,C=a.start-w+1;return this.errorHandler.createError(v,x,C,l)}else{var v=this.lastMarker.index,x=this.lastMarker.line,C=this.lastMarker.column+1;return this.errorHandler.createError(v,x,C,l)}},p.prototype.throwUnexpectedToken=function(a,u){throw this.unexpectedTokenError(a,u)},p.prototype.tolerateUnexpectedToken=function(a,u){this.errorHandler.tolerate(this.unexpectedTokenError(a,u))},p.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var a=this.scanner.scanComments();if(a.length>0&&this.delegate)for(var u=0;u<a.length;++u){var l=a[u],m=void 0;m={type:l.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(l.slice[0],l.slice[1])},this.config.range&&(m.range=l.range),this.config.loc&&(m.loc=l.loc);var v={start:{line:l.loc.start.line,column:l.loc.start.column,offset:l.range[0]},end:{line:l.loc.end.line,column:l.loc.end.column,offset:l.range[1]}};this.delegate(m,v)}}},p.prototype.getTokenRaw=function(a){return this.scanner.source.slice(a.start,a.end)},p.prototype.convertToken=function(a){var u={type:g.TokenName[a.type],value:this.getTokenRaw(a)};if(this.config.range&&(u.range=[a.start,a.end]),this.config.loc&&(u.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),a.type===9){var l=a.pattern,m=a.flags;u.regex={pattern:l,flags:m}}return u},p.prototype.nextToken=function(){var a=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var u=this.scanner.lex();return this.hasLineTerminator=a.lineNumber!==u.lineNumber,u&&this.context.strict&&u.type===3&&this.scanner.isStrictModeReservedWord(u.value)&&(u.type=4),this.lookahead=u,this.config.tokens&&u.type!==2&&this.tokens.push(this.convertToken(u)),a},p.prototype.nextRegexToken=function(){this.collectComments();var a=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(a))),this.lookahead=a,this.nextToken(),a},p.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},p.prototype.startNode=function(a,u){u===void 0&&(u=0);var l=a.start-a.lineStart,m=a.lineNumber;return l<0&&(l+=u,m--),{index:a.start,line:m,column:l}},p.prototype.finalize=function(a,u){if(this.config.range&&(u.range=[a.index,this.lastMarker.index]),this.config.loc&&(u.loc={start:{line:a.line,column:a.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(u.loc.source=this.config.source)),this.delegate){var l={start:{line:a.line,column:a.column,offset:a.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(u,l)}return u},p.prototype.expect=function(a){var u=this.nextToken();(u.type!==7||u.value!==a)&&this.throwUnexpectedToken(u)},p.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var a=this.lookahead;a.type===7&&a.value===","?this.nextToken():a.type===7&&a.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(a)):this.tolerateUnexpectedToken(a,o.Messages.UnexpectedToken)}else this.expect(",")},p.prototype.expectKeyword=function(a){var u=this.nextToken();(u.type!==4||u.value!==a)&&this.throwUnexpectedToken(u)},p.prototype.match=function(a){return this.lookahead.type===7&&this.lookahead.value===a},p.prototype.matchKeyword=function(a){return this.lookahead.type===4&&this.lookahead.value===a},p.prototype.matchContextualKeyword=function(a){return this.lookahead.type===3&&this.lookahead.value===a},p.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var a=this.lookahead.value;return a==="="||a==="*="||a==="**="||a==="/="||a==="%="||a==="+="||a==="-="||a==="<<="||a===">>="||a===">>>="||a==="&="||a==="^="||a==="|="},p.prototype.isolateCoverGrammar=function(a){var u=this.context.isBindingElement,l=this.context.isAssignmentTarget,m=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var v=a.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=u,this.context.isAssignmentTarget=l,this.context.firstCoverInitializedNameError=m,v},p.prototype.inheritCoverGrammar=function(a){var u=this.context.isBindingElement,l=this.context.isAssignmentTarget,m=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var v=a.call(this);return this.context.isBindingElement=this.context.isBindingElement&&u,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&l,this.context.firstCoverInitializedNameError=m||this.context.firstCoverInitializedNameError,v},p.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},p.prototype.parsePrimaryExpression=function(){var a=this.createNode(),u,l,m;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),u=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(a,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),m=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(l.value,m));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),m=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(l.value==="true",m));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),m=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(null,m));break;case 10:u=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,u=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":u=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":u=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,l=this.nextRegexToken(),m=this.getTokenRaw(l),u=this.finalize(a,new s.RegexLiteral(l.regex,m,l.pattern,l.flags));break;default:u=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?u=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?u=this.finalize(a,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?u=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),u=this.finalize(a,new s.ThisExpression)):this.matchKeyword("class")?u=this.parseClassExpression():u=this.throwUnexpectedToken(this.nextToken()));break;default:u=this.throwUnexpectedToken(this.nextToken())}return u},p.prototype.parseSpreadElement=function(){var a=this.createNode();this.expect("...");var u=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(a,new s.SpreadElement(u))},p.prototype.parseArrayInitializer=function(){var a=this.createNode(),u=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),u.push(null);else if(this.match("...")){var l=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),u.push(l)}else u.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(a,new s.ArrayExpression(u))},p.prototype.parsePropertyMethod=function(a){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var u=this.context.strict,l=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var m=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&a.firstRestricted&&this.tolerateUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),this.context.strict=u,this.context.allowStrictDirective=l,m},p.prototype.parsePropertyMethodFunction=function(){var a=!1,u=this.createNode(),l=this.context.allowYield;this.context.allowYield=!0;var m=this.parseFormalParameters(),v=this.parsePropertyMethod(m);return this.context.allowYield=l,this.finalize(u,new s.FunctionExpression(null,m.params,v,a))},p.prototype.parsePropertyMethodAsyncFunction=function(){var a=this.createNode(),u=this.context.allowYield,l=this.context.await;this.context.allowYield=!1,this.context.await=!0;var m=this.parseFormalParameters(),v=this.parsePropertyMethod(m);return this.context.allowYield=u,this.context.await=l,this.finalize(a,new s.AsyncFunctionExpression(null,m.params,v))},p.prototype.parseObjectPropertyKey=function(){var a=this.createNode(),u=this.nextToken(),l;switch(u.type){case 8:case 6:this.context.strict&&u.octal&&this.tolerateUnexpectedToken(u,o.Messages.StrictOctalLiteral);var m=this.getTokenRaw(u);l=this.finalize(a,new s.Literal(u.value,m));break;case 3:case 1:case 5:case 4:l=this.finalize(a,new s.Identifier(u.value));break;case 7:u.value==="["?(l=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):l=this.throwUnexpectedToken(u);break;default:l=this.throwUnexpectedToken(u)}return l},p.prototype.isPropertyKey=function(a,u){return a.type===h.Syntax.Identifier&&a.name===u||a.type===h.Syntax.Literal&&a.value===u},p.prototype.parseObjectProperty=function(a){var u=this.createNode(),l=this.lookahead,m,v=null,x=null,w=!1,C=!1,S=!1,T=!1;if(l.type===3){var P=l.value;this.nextToken(),w=this.match("["),T=!this.hasLineTerminator&&P==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),v=T?this.parseObjectPropertyKey():this.finalize(u,new s.Identifier(P))}else this.match("*")?this.nextToken():(w=this.match("["),v=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(l.type===3&&!T&&l.value==="get"&&B)m="get",w=this.match("["),v=this.parseObjectPropertyKey(),this.context.allowYield=!1,x=this.parseGetterMethod();else if(l.type===3&&!T&&l.value==="set"&&B)m="set",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseSetterMethod();else if(l.type===7&&l.value==="*"&&B)m="init",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseGeneratorMethod(),C=!0;else if(v||this.throwUnexpectedToken(this.lookahead),m="init",this.match(":")&&!T)!w&&this.isPropertyKey(v,"__proto__")&&(a.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),a.value=!0),this.nextToken(),x=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))x=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0;else if(l.type===3){var P=this.finalize(u,new s.Identifier(l.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),S=!0;var L=this.isolateCoverGrammar(this.parseAssignmentExpression);x=this.finalize(u,new s.AssignmentPattern(P,L))}else S=!0,x=P}else this.throwUnexpectedToken(this.nextToken());return this.finalize(u,new s.Property(m,v,w,x,C,S))},p.prototype.parseObjectInitializer=function(){var a=this.createNode();this.expect("{");for(var u=[],l={value:!1};!this.match("}");)u.push(this.parseObjectProperty(l)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(a,new s.ObjectExpression(u))},p.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var a=this.createNode(),u=this.nextToken(),l=u.value,m=u.cooked;return this.finalize(a,new s.TemplateElement({raw:l,cooked:m},u.tail))},p.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var a=this.createNode(),u=this.nextToken(),l=u.value,m=u.cooked;return this.finalize(a,new s.TemplateElement({raw:l,cooked:m},u.tail))},p.prototype.parseTemplateLiteral=function(){var a=this.createNode(),u=[],l=[],m=this.parseTemplateHead();for(l.push(m);!m.tail;)u.push(this.parseExpression()),m=this.parseTemplateElement(),l.push(m);return this.finalize(a,new s.TemplateLiteral(l,u))},p.prototype.reinterpretExpressionAsPattern=function(a){switch(a.type){case h.Syntax.Identifier:case h.Syntax.MemberExpression:case h.Syntax.RestElement:case h.Syntax.AssignmentPattern:break;case h.Syntax.SpreadElement:a.type=h.Syntax.RestElement,this.reinterpretExpressionAsPattern(a.argument);break;case h.Syntax.ArrayExpression:a.type=h.Syntax.ArrayPattern;for(var u=0;u<a.elements.length;u++)a.elements[u]!==null&&this.reinterpretExpressionAsPattern(a.elements[u]);break;case h.Syntax.ObjectExpression:a.type=h.Syntax.ObjectPattern;for(var u=0;u<a.properties.length;u++)this.reinterpretExpressionAsPattern(a.properties[u].value);break;case h.Syntax.AssignmentExpression:a.type=h.Syntax.AssignmentPattern,delete a.operator,this.reinterpretExpressionAsPattern(a.left);break;default:break}},p.prototype.parseGroupExpression=function(){var a;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),a={type:d,params:[],async:!1};else{var u=this.lookahead,l=[];if(this.match("..."))a=this.parseRestElement(l),this.expect(")"),this.match("=>")||this.expect("=>"),a={type:d,params:[a],async:!1};else{var m=!1;if(this.context.isBindingElement=!0,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var v=[];for(this.context.isAssignmentTarget=!1,v.push(a);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var x=0;x<v.length;x++)this.reinterpretExpressionAsPattern(v[x]);m=!0,a={type:d,params:v,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),v.push(this.parseRestElement(l)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var x=0;x<v.length;x++)this.reinterpretExpressionAsPattern(v[x]);m=!0,a={type:d,params:v,async:!1}}else v.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(m)break}m||(a=this.finalize(this.startNode(u),new s.SequenceExpression(v)))}if(!m){if(this.expect(")"),this.match("=>")&&(a.type===h.Syntax.Identifier&&a.name==="yield"&&(m=!0,a={type:d,params:[a],async:!1}),!m)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),a.type===h.Syntax.SequenceExpression)for(var x=0;x<a.expressions.length;x++)this.reinterpretExpressionAsPattern(a.expressions[x]);else this.reinterpretExpressionAsPattern(a);var w=a.type===h.Syntax.SequenceExpression?a.expressions:[a];a={type:d,params:w,async:!1}}this.context.isBindingElement=!1}}}return a},p.prototype.parseArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var u=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(a.push(u),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.isIdentifierName=function(a){return a.type===3||a.type===4||a.type===1||a.type===5},p.prototype.parseIdentifierName=function(){var a=this.createNode(),u=this.nextToken();return this.isIdentifierName(u)||this.throwUnexpectedToken(u),this.finalize(a,new s.Identifier(u.value))},p.prototype.parseNewExpression=function(){var a=this.createNode(),u=this.parseIdentifierName();i.assert(u.name==="new","New expression must start with `new`");var l;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var m=this.parseIdentifierName();l=new s.MetaProperty(u,m)}else this.throwUnexpectedToken(this.lookahead);else{var v=this.isolateCoverGrammar(this.parseLeftHandSideExpression),x=this.match("(")?this.parseArguments():[];l=new s.NewExpression(v,x),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(a,l)},p.prototype.parseAsyncArgument=function(){var a=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,a},p.prototype.parseAsyncArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var u=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(a.push(u),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.parseLeftHandSideExpressionAllowCall=function(){var a=this.lookahead,u=this.matchContextualKeyword("async"),l=this.context.allowIn;this.context.allowIn=!0;var m;for(this.matchKeyword("super")&&this.context.inFunctionBody?(m=this.createNode(),this.nextToken(),m=this.finalize(m,new s.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):m=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var v=this.parseIdentifierName();m=this.finalize(this.startNode(a),new s.StaticMemberExpression(m,v))}else if(this.match("(")){var x=u&&a.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var w=x?this.parseAsyncArguments():this.parseArguments();if(m=this.finalize(this.startNode(a),new s.CallExpression(m,w)),x&&this.match("=>")){for(var C=0;C<w.length;++C)this.reinterpretExpressionAsPattern(w[C]);m={type:d,params:w,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var v=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),m=this.finalize(this.startNode(a),new s.ComputedMemberExpression(m,v))}else if(this.lookahead.type===10&&this.lookahead.head){var S=this.parseTemplateLiteral();m=this.finalize(this.startNode(a),new s.TaggedTemplateExpression(m,S))}else break;return this.context.allowIn=l,m},p.prototype.parseSuper=function(){var a=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(a,new s.Super)},p.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var a=this.startNode(this.lookahead),u=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var l=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),u=this.finalize(a,new s.ComputedMemberExpression(u,l))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var l=this.parseIdentifierName();u=this.finalize(a,new s.StaticMemberExpression(u,l))}else if(this.lookahead.type===10&&this.lookahead.head){var m=this.parseTemplateLiteral();u=this.finalize(a,new s.TaggedTemplateExpression(u,m))}else break;return u},p.prototype.parseUpdateExpression=function(){var a,u=this.lookahead;if(this.match("++")||this.match("--")){var l=this.startNode(u),m=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&a.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var v=!0;a=this.finalize(l,new s.UpdateExpression(m.value,a,v)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(a=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&a.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=this.nextToken().value,v=!1;a=this.finalize(this.startNode(u),new s.UpdateExpression(x,a,v))}return a},p.prototype.parseAwaitExpression=function(){var a=this.createNode();this.nextToken();var u=this.parseUnaryExpression();return this.finalize(a,new s.AwaitExpression(u))},p.prototype.parseUnaryExpression=function(){var a;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var u=this.startNode(this.lookahead),l=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),a=this.finalize(u,new s.UnaryExpression(l.value,a)),this.context.strict&&a.operator==="delete"&&a.argument.type===h.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?a=this.parseAwaitExpression():a=this.parseUpdateExpression();return a},p.prototype.parseExponentiationExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseUnaryExpression);if(u.type!==h.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var l=u,m=this.isolateCoverGrammar(this.parseExponentiationExpression);u=this.finalize(this.startNode(a),new s.BinaryExpression("**",l,m))}return u},p.prototype.binaryPrecedence=function(a){var u=a.value,l;return a.type===7?l=this.operatorPrecedence[u]||0:a.type===4?l=u==="instanceof"||this.context.allowIn&&u==="in"?7:0:l=0,l},p.prototype.parseBinaryExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseExponentiationExpression),l=this.lookahead,m=this.binaryPrecedence(l);if(m>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var v=[a,this.lookahead],x=u,w=this.isolateCoverGrammar(this.parseExponentiationExpression),C=[x,l.value,w],S=[m];m=this.binaryPrecedence(this.lookahead),!(m<=0);){for(;C.length>2&&m<=S[S.length-1];){w=C.pop();var T=C.pop();S.pop(),x=C.pop(),v.pop();var P=this.startNode(v[v.length-1]);C.push(this.finalize(P,new s.BinaryExpression(T,x,w)))}C.push(this.nextToken().value),S.push(m),v.push(this.lookahead),C.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=C.length-1;u=C[B];for(var L=v.pop();B>1;){var z=v.pop(),G=L&&L.lineStart,P=this.startNode(z,G),T=C[B-1];u=this.finalize(P,new s.BinaryExpression(T,C[B-2],u)),B-=2,L=z}}return u},p.prototype.parseConditionalExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var l=this.context.allowIn;this.context.allowIn=!0;var m=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=l,this.expect(":");var v=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(this.startNode(a),new s.ConditionalExpression(u,m,v)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return u},p.prototype.checkPatternParam=function(a,u){switch(u.type){case h.Syntax.Identifier:this.validateParam(a,u,u.name);break;case h.Syntax.RestElement:this.checkPatternParam(a,u.argument);break;case h.Syntax.AssignmentPattern:this.checkPatternParam(a,u.left);break;case h.Syntax.ArrayPattern:for(var l=0;l<u.elements.length;l++)u.elements[l]!==null&&this.checkPatternParam(a,u.elements[l]);break;case h.Syntax.ObjectPattern:for(var l=0;l<u.properties.length;l++)this.checkPatternParam(a,u.properties[l].value);break;default:break}a.simple=a.simple&&u instanceof s.Identifier},p.prototype.reinterpretAsCoverFormalsList=function(a){var u=[a],l,m=!1;switch(a.type){case h.Syntax.Identifier:break;case d:u=a.params,m=a.async;break;default:return null}l={simple:!0,paramSet:{}};for(var v=0;v<u.length;++v){var x=u[v];x.type===h.Syntax.AssignmentPattern?x.right.type===h.Syntax.YieldExpression&&(x.right.argument&&this.throwUnexpectedToken(this.lookahead),x.right.type=h.Syntax.Identifier,x.right.name="yield",delete x.right.argument,delete x.right.delegate):m&&x.type===h.Syntax.Identifier&&x.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(l,x),u[v]=x}if(this.context.strict||!this.context.allowYield)for(var v=0;v<u.length;++v){var x=u[v];x.type===h.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(l.message===o.Messages.StrictParamDupe){var w=this.context.strict?l.stricted:l.firstRestricted;this.throwUnexpectedToken(w,l.message)}return{simple:l.simple,params:u,stricted:l.stricted,firstRestricted:l.firstRestricted,message:l.message}},p.prototype.parseAssignmentExpression=function(){var a;if(!this.context.allowYield&&this.matchKeyword("yield"))a=this.parseYieldExpression();else{var u=this.lookahead,l=u;if(a=this.parseConditionalExpression(),l.type===3&&l.lineNumber===this.lookahead.lineNumber&&l.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var m=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(m),a={type:d,params:[m],async:!0}}if(a.type===d||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var v=a.async,x=this.reinterpretAsCoverFormalsList(a);if(x){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var w=this.context.strict,C=this.context.allowStrictDirective;this.context.allowStrictDirective=x.simple;var S=this.context.allowYield,T=this.context.await;this.context.allowYield=!0,this.context.await=v;var P=this.startNode(u);this.expect("=>");var B=void 0;if(this.match("{")){var L=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=L}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var z=B.type!==h.Syntax.BlockStatement;this.context.strict&&x.firstRestricted&&this.throwUnexpectedToken(x.firstRestricted,x.message),this.context.strict&&x.stricted&&this.tolerateUnexpectedToken(x.stricted,x.message),a=v?this.finalize(P,new s.AsyncArrowFunctionExpression(x.params,B,z)):this.finalize(P,new s.ArrowFunctionExpression(x.params,B,z)),this.context.strict=w,this.context.allowStrictDirective=C,this.context.allowYield=S,this.context.await=T}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&a.type===h.Syntax.Identifier){var G=a;this.scanner.isRestrictedWord(G.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(G.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(a):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),l=this.nextToken();var pe=l.value,_t=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(u),new s.AssignmentExpression(pe,a,_t)),this.context.firstCoverInitializedNameError=null}}return a},p.prototype.parseExpression=function(){var a=this.lookahead,u=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var l=[];for(l.push(u);this.lookahead.type!==2&&this.match(",");)this.nextToken(),l.push(this.isolateCoverGrammar(this.parseAssignmentExpression));u=this.finalize(this.startNode(a),new s.SequenceExpression(l))}return u},p.prototype.parseStatementListItem=function(){var a;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),a=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),a=this.parseImportDeclaration();break;case"const":a=this.parseLexicalDeclaration({inFor:!1});break;case"function":a=this.parseFunctionDeclaration();break;case"class":a=this.parseClassDeclaration();break;case"let":a=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:a=this.parseStatement();break}else a=this.parseStatement();return a},p.prototype.parseBlock=function(){var a=this.createNode();this.expect("{");for(var u=[];!this.match("}");)u.push(this.parseStatementListItem());return this.expect("}"),this.finalize(a,new s.BlockStatement(u))},p.prototype.parseLexicalBinding=function(a,u){var l=this.createNode(),m=[],v=this.parsePattern(m,a);this.context.strict&&v.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(v.name)&&this.tolerateError(o.Messages.StrictVarName);var x=null;return a==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!u.inFor&&v.type!==h.Syntax.Identifier||this.match("="))&&(this.expect("="),x=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(l,new s.VariableDeclarator(v,x))},p.prototype.parseBindingList=function(a,u){for(var l=[this.parseLexicalBinding(a,u)];this.match(",");)this.nextToken(),l.push(this.parseLexicalBinding(a,u));return l},p.prototype.isLexicalDeclaration=function(){var a=this.scanner.saveState();this.scanner.scanComments();var u=this.scanner.lex();return this.scanner.restoreState(a),u.type===3||u.type===7&&u.value==="["||u.type===7&&u.value==="{"||u.type===4&&u.value==="let"||u.type===4&&u.value==="yield"},p.prototype.parseLexicalDeclaration=function(a){var u=this.createNode(),l=this.nextToken().value;i.assert(l==="let"||l==="const","Lexical declaration must be either let or const");var m=this.parseBindingList(l,a);return this.consumeSemicolon(),this.finalize(u,new s.VariableDeclaration(m,l))},p.prototype.parseBindingRestElement=function(a,u){var l=this.createNode();this.expect("...");var m=this.parsePattern(a,u);return this.finalize(l,new s.RestElement(m))},p.prototype.parseArrayPattern=function(a,u){var l=this.createNode();this.expect("[");for(var m=[];!this.match("]");)if(this.match(","))this.nextToken(),m.push(null);else{if(this.match("...")){m.push(this.parseBindingRestElement(a,u));break}else m.push(this.parsePatternWithDefault(a,u));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(l,new s.ArrayPattern(m))},p.prototype.parsePropertyPattern=function(a,u){var l=this.createNode(),m=!1,v=!1,x=!1,w,C;if(this.lookahead.type===3){var S=this.lookahead;w=this.parseVariableIdentifier();var T=this.finalize(l,new s.Identifier(S.value));if(this.match("=")){a.push(S),v=!0,this.nextToken();var P=this.parseAssignmentExpression();C=this.finalize(this.startNode(S),new s.AssignmentPattern(T,P))}else this.match(":")?(this.expect(":"),C=this.parsePatternWithDefault(a,u)):(a.push(S),v=!0,C=T)}else m=this.match("["),w=this.parseObjectPropertyKey(),this.expect(":"),C=this.parsePatternWithDefault(a,u);return this.finalize(l,new s.Property("init",w,m,C,x,v))},p.prototype.parseObjectPattern=function(a,u){var l=this.createNode(),m=[];for(this.expect("{");!this.match("}");)m.push(this.parsePropertyPattern(a,u)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(l,new s.ObjectPattern(m))},p.prototype.parsePattern=function(a,u){var l;return this.match("[")?l=this.parseArrayPattern(a,u):this.match("{")?l=this.parseObjectPattern(a,u):(this.matchKeyword("let")&&(u==="const"||u==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),a.push(this.lookahead),l=this.parseVariableIdentifier(u)),l},p.prototype.parsePatternWithDefault=function(a,u){var l=this.lookahead,m=this.parsePattern(a,u);if(this.match("=")){this.nextToken();var v=this.context.allowYield;this.context.allowYield=!0;var x=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=v,m=this.finalize(this.startNode(l),new s.AssignmentPattern(m,x))}return m},p.prototype.parseVariableIdentifier=function(a){var u=this.createNode(),l=this.nextToken();return l.type===4&&l.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(l):l.type!==3?this.context.strict&&l.type===4&&this.scanner.isStrictModeReservedWord(l.value)?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):(this.context.strict||l.value!=="let"||a!=="var")&&this.throwUnexpectedToken(l):(this.context.isModule||this.context.await)&&l.type===3&&l.value==="await"&&this.tolerateUnexpectedToken(l),this.finalize(u,new s.Identifier(l.value))},p.prototype.parseVariableDeclaration=function(a){var u=this.createNode(),l=[],m=this.parsePattern(l,"var");this.context.strict&&m.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(m.name)&&this.tolerateError(o.Messages.StrictVarName);var v=null;return this.match("=")?(this.nextToken(),v=this.isolateCoverGrammar(this.parseAssignmentExpression)):m.type!==h.Syntax.Identifier&&!a.inFor&&this.expect("="),this.finalize(u,new s.VariableDeclarator(m,v))},p.prototype.parseVariableDeclarationList=function(a){var u={inFor:a.inFor},l=[];for(l.push(this.parseVariableDeclaration(u));this.match(",");)this.nextToken(),l.push(this.parseVariableDeclaration(u));return l},p.prototype.parseVariableStatement=function(){var a=this.createNode();this.expectKeyword("var");var u=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(a,new s.VariableDeclaration(u,"var"))},p.prototype.parseEmptyStatement=function(){var a=this.createNode();return this.expect(";"),this.finalize(a,new s.EmptyStatement)},p.prototype.parseExpressionStatement=function(){var a=this.createNode(),u=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ExpressionStatement(u))},p.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},p.prototype.parseIfStatement=function(){var a=this.createNode(),u,l=null;this.expectKeyword("if"),this.expect("(");var m=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),u=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),l=this.parseIfClause())),this.finalize(a,new s.IfStatement(m,u,l))},p.prototype.parseDoWhileStatement=function(){var a=this.createNode();this.expectKeyword("do");var u=this.context.inIteration;this.context.inIteration=!0;var l=this.parseStatement();this.context.inIteration=u,this.expectKeyword("while"),this.expect("(");var m=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(a,new s.DoWhileStatement(l,m))},p.prototype.parseWhileStatement=function(){var a=this.createNode(),u;this.expectKeyword("while"),this.expect("(");var l=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var m=this.context.inIteration;this.context.inIteration=!0,u=this.parseStatement(),this.context.inIteration=m}return this.finalize(a,new s.WhileStatement(l,u))},p.prototype.parseForStatement=function(){var a=null,u=null,l=null,m=!0,v,x,w=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){a=this.createNode(),this.nextToken();var C=this.context.allowIn;this.context.allowIn=!1;var S=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=C,S.length===1&&this.matchKeyword("in")){var T=S[0];T.init&&(T.id.type===h.Syntax.ArrayPattern||T.id.type===h.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.nextToken(),v=a,x=this.parseExpression(),a=null}else S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.nextToken(),v=a,x=this.parseAssignmentExpression(),a=null,m=!1):(a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){a=this.createNode();var P=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")a=this.finalize(a,new s.Identifier(P)),this.nextToken(),v=a,x=this.parseExpression(),a=null;else{var C=this.context.allowIn;this.context.allowIn=!1;var S=this.parseBindingList(P,{inFor:!0});this.context.allowIn=C,S.length===1&&S[0].init===null&&this.matchKeyword("in")?(a=this.finalize(a,new s.VariableDeclaration(S,P)),this.nextToken(),v=a,x=this.parseExpression(),a=null):S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(S,P)),this.nextToken(),v=a,x=this.parseAssignmentExpression(),a=null,m=!1):(this.consumeSemicolon(),a=this.finalize(a,new s.VariableDeclaration(S,P)))}}else{var B=this.lookahead,C=this.context.allowIn;if(this.context.allowIn=!1,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=C,this.matchKeyword("in"))(!this.context.isAssignmentTarget||a.type===h.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(a),v=a,x=this.parseExpression(),a=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||a.type===h.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(a),v=a,x=this.parseAssignmentExpression(),a=null,m=!1;else{if(this.match(",")){for(var L=[a];this.match(",");)this.nextToken(),L.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(B),new s.SequenceExpression(L))}this.expect(";")}}typeof v>"u"&&(this.match(";")||(u=this.parseExpression()),this.expect(";"),this.match(")")||(l=this.parseExpression()));var z;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),z=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var G=this.context.inIteration;this.context.inIteration=!0,z=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=G}return typeof v>"u"?this.finalize(w,new s.ForStatement(a,u,l,z)):m?this.finalize(w,new s.ForInStatement(v,x,z)):this.finalize(w,new s.ForOfStatement(v,x,z))},p.prototype.parseContinueStatement=function(){var a=this.createNode();this.expectKeyword("continue");var u=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier();u=l;var m="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,m)||this.throwError(o.Messages.UnknownLabel,l.name)}return this.consumeSemicolon(),u===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(a,new s.ContinueStatement(u))},p.prototype.parseBreakStatement=function(){var a=this.createNode();this.expectKeyword("break");var u=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier(),m="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,m)||this.throwError(o.Messages.UnknownLabel,l.name),u=l}return this.consumeSemicolon(),u===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(a,new s.BreakStatement(u))},p.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var a=this.createNode();this.expectKeyword("return");var u=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,l=u?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(a,new s.ReturnStatement(l))},p.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var a=this.createNode(),u;this.expectKeyword("with"),this.expect("(");var l=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),u=this.parseStatement()),this.finalize(a,new s.WithStatement(l,u))},p.prototype.parseSwitchCase=function(){var a=this.createNode(),u;this.matchKeyword("default")?(this.nextToken(),u=null):(this.expectKeyword("case"),u=this.parseExpression()),this.expect(":");for(var l=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)l.push(this.parseStatementListItem());return this.finalize(a,new s.SwitchCase(u,l))},p.prototype.parseSwitchStatement=function(){var a=this.createNode();this.expectKeyword("switch"),this.expect("(");var u=this.parseExpression();this.expect(")");var l=this.context.inSwitch;this.context.inSwitch=!0;var m=[],v=!1;for(this.expect("{");!this.match("}");){var x=this.parseSwitchCase();x.test===null&&(v&&this.throwError(o.Messages.MultipleDefaultsInSwitch),v=!0),m.push(x)}return this.expect("}"),this.context.inSwitch=l,this.finalize(a,new s.SwitchStatement(u,m))},p.prototype.parseLabelledStatement=function(){var a=this.createNode(),u=this.parseExpression(),l;if(u.type===h.Syntax.Identifier&&this.match(":")){this.nextToken();var m=u,v="$"+m.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,v)&&this.throwError(o.Messages.Redeclaration,"Label",m.name),this.context.labelSet[v]=!0;var x=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),x=this.parseClassDeclaration();else if(this.matchKeyword("function")){var w=this.lookahead,C=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(w,o.Messages.StrictFunction):C.generator&&this.tolerateUnexpectedToken(w,o.Messages.GeneratorInLegacyContext),x=C}else x=this.parseStatement();delete this.context.labelSet[v],l=new s.LabeledStatement(m,x)}else this.consumeSemicolon(),l=new s.ExpressionStatement(u);return this.finalize(a,l)},p.prototype.parseThrowStatement=function(){var a=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var u=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ThrowStatement(u))},p.prototype.parseCatchClause=function(){var a=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var u=[],l=this.parsePattern(u),m={},v=0;v<u.length;v++){var x="$"+u[v].value;Object.prototype.hasOwnProperty.call(m,x)&&this.tolerateError(o.Messages.DuplicateBinding,u[v].value),m[x]=!0}this.context.strict&&l.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(l.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var w=this.parseBlock();return this.finalize(a,new s.CatchClause(l,w))},p.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},p.prototype.parseTryStatement=function(){var a=this.createNode();this.expectKeyword("try");var u=this.parseBlock(),l=this.matchKeyword("catch")?this.parseCatchClause():null,m=this.matchKeyword("finally")?this.parseFinallyClause():null;return!l&&!m&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(a,new s.TryStatement(u,l,m))},p.prototype.parseDebuggerStatement=function(){var a=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(a,new s.DebuggerStatement)},p.prototype.parseStatement=function(){var a;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:a=this.parseExpressionStatement();break;case 7:var u=this.lookahead.value;u==="{"?a=this.parseBlock():u==="("?a=this.parseExpressionStatement():u===";"?a=this.parseEmptyStatement():a=this.parseExpressionStatement();break;case 3:a=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":a=this.parseBreakStatement();break;case"continue":a=this.parseContinueStatement();break;case"debugger":a=this.parseDebuggerStatement();break;case"do":a=this.parseDoWhileStatement();break;case"for":a=this.parseForStatement();break;case"function":a=this.parseFunctionDeclaration();break;case"if":a=this.parseIfStatement();break;case"return":a=this.parseReturnStatement();break;case"switch":a=this.parseSwitchStatement();break;case"throw":a=this.parseThrowStatement();break;case"try":a=this.parseTryStatement();break;case"var":a=this.parseVariableStatement();break;case"while":a=this.parseWhileStatement();break;case"with":a=this.parseWithStatement();break;default:a=this.parseExpressionStatement();break}break;default:a=this.throwUnexpectedToken(this.lookahead)}return a},p.prototype.parseFunctionSourceElements=function(){var a=this.createNode();this.expect("{");var u=this.parseDirectivePrologues(),l=this.context.labelSet,m=this.context.inIteration,v=this.context.inSwitch,x=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)u.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=l,this.context.inIteration=m,this.context.inSwitch=v,this.context.inFunctionBody=x,this.finalize(a,new s.BlockStatement(u))},p.prototype.validateParam=function(a,u,l){var m="$"+l;this.context.strict?(this.scanner.isRestrictedWord(l)&&(a.stricted=u,a.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(a.paramSet,m)&&(a.stricted=u,a.message=o.Messages.StrictParamDupe)):a.firstRestricted||(this.scanner.isRestrictedWord(l)?(a.firstRestricted=u,a.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(l)?(a.firstRestricted=u,a.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(a.paramSet,m)&&(a.stricted=u,a.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(a.paramSet,m,{value:!0,enumerable:!0,writable:!0,configurable:!0}):a.paramSet[m]=!0},p.prototype.parseRestElement=function(a){var u=this.createNode();this.expect("...");var l=this.parsePattern(a);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(u,new s.RestElement(l))},p.prototype.parseFormalParameter=function(a){for(var u=[],l=this.match("...")?this.parseRestElement(u):this.parsePatternWithDefault(u),m=0;m<u.length;m++)this.validateParam(a,u[m],u[m].value);a.simple=a.simple&&l instanceof s.Identifier,a.params.push(l)},p.prototype.parseFormalParameters=function(a){var u;if(u={simple:!0,params:[],firstRestricted:a},this.expect("("),!this.match(")"))for(u.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(u),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:u.simple,params:u.params,stricted:u.stricted,firstRestricted:u.firstRestricted,message:u.message}},p.prototype.matchAsyncFunction=function(){var a=this.matchContextualKeyword("async");if(a){var u=this.scanner.saveState();this.scanner.scanComments();var l=this.scanner.lex();this.scanner.restoreState(u),a=u.lineNumber===l.lineNumber&&l.type===4&&l.value==="function"}return a},p.prototype.parseFunctionDeclaration=function(a){var u=this.createNode(),l=this.matchContextualKeyword("async");l&&this.nextToken(),this.expectKeyword("function");var m=l?!1:this.match("*");m&&this.nextToken();var v,x=null,w=null;if(!a||!this.match("(")){var C=this.lookahead;x=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(w=C,v=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(w=C,v=o.Messages.StrictReservedWord)}var S=this.context.await,T=this.context.allowYield;this.context.await=l,this.context.allowYield=!m;var P=this.parseFormalParameters(w),B=P.params,L=P.stricted;w=P.firstRestricted,P.message&&(v=P.message);var z=this.context.strict,G=this.context.allowStrictDirective;this.context.allowStrictDirective=P.simple;var pe=this.parseFunctionSourceElements();return this.context.strict&&w&&this.throwUnexpectedToken(w,v),this.context.strict&&L&&this.tolerateUnexpectedToken(L,v),this.context.strict=z,this.context.allowStrictDirective=G,this.context.await=S,this.context.allowYield=T,l?this.finalize(u,new s.AsyncFunctionDeclaration(x,B,pe)):this.finalize(u,new s.FunctionDeclaration(x,B,pe,m))},p.prototype.parseFunctionExpression=function(){var a=this.createNode(),u=this.matchContextualKeyword("async");u&&this.nextToken(),this.expectKeyword("function");var l=u?!1:this.match("*");l&&this.nextToken();var m,v=null,x,w=this.context.await,C=this.context.allowYield;if(this.context.await=u,this.context.allowYield=!l,!this.match("(")){var S=this.lookahead;v=!this.context.strict&&!l&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(S.value)&&this.tolerateUnexpectedToken(S,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(S.value)?(x=S,m=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(S.value)&&(x=S,m=o.Messages.StrictReservedWord)}var T=this.parseFormalParameters(x),P=T.params,B=T.stricted;x=T.firstRestricted,T.message&&(m=T.message);var L=this.context.strict,z=this.context.allowStrictDirective;this.context.allowStrictDirective=T.simple;var G=this.parseFunctionSourceElements();return this.context.strict&&x&&this.throwUnexpectedToken(x,m),this.context.strict&&B&&this.tolerateUnexpectedToken(B,m),this.context.strict=L,this.context.allowStrictDirective=z,this.context.await=w,this.context.allowYield=C,u?this.finalize(a,new s.AsyncFunctionExpression(v,P,G)):this.finalize(a,new s.FunctionExpression(v,P,G,l))},p.prototype.parseDirective=function(){var a=this.lookahead,u=this.createNode(),l=this.parseExpression(),m=l.type===h.Syntax.Literal?this.getTokenRaw(a).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(u,m?new s.Directive(l,m):new s.ExpressionStatement(l))},p.prototype.parseDirectivePrologues=function(){for(var a=null,u=[];;){var l=this.lookahead;if(l.type!==8)break;var m=this.parseDirective();u.push(m);var v=m.directive;if(typeof v!="string")break;v==="use strict"?(this.context.strict=!0,a&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(l,o.Messages.IllegalLanguageModeDirective)):!a&&l.octal&&(a=l)}return u},p.prototype.qualifiedPropertyName=function(a){switch(a.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return a.value==="[";default:break}return!1},p.prototype.parseGetterMethod=function(){var a=this.createNode(),u=!1,l=this.context.allowYield;this.context.allowYield=!u;var m=this.parseFormalParameters();m.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var v=this.parsePropertyMethod(m);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,m.params,v,u))},p.prototype.parseSetterMethod=function(){var a=this.createNode(),u=!1,l=this.context.allowYield;this.context.allowYield=!u;var m=this.parseFormalParameters();m.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):m.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var v=this.parsePropertyMethod(m);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,m.params,v,u))},p.prototype.parseGeneratorMethod=function(){var a=this.createNode(),u=!0,l=this.context.allowYield;this.context.allowYield=!0;var m=this.parseFormalParameters();this.context.allowYield=!1;var v=this.parsePropertyMethod(m);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,m.params,v,u))},p.prototype.isStartOfExpression=function(){var a=!0,u=this.lookahead.value;switch(this.lookahead.type){case 7:a=u==="["||u==="("||u==="{"||u==="+"||u==="-"||u==="!"||u==="~"||u==="++"||u==="--"||u==="/"||u==="/=";break;case 4:a=u==="class"||u==="delete"||u==="function"||u==="let"||u==="new"||u==="super"||u==="this"||u==="typeof"||u==="void"||u==="yield";break;default:break}return a},p.prototype.parseYieldExpression=function(){var a=this.createNode();this.expectKeyword("yield");var u=null,l=!1;if(!this.hasLineTerminator){var m=this.context.allowYield;this.context.allowYield=!1,l=this.match("*"),l?(this.nextToken(),u=this.parseAssignmentExpression()):this.isStartOfExpression()&&(u=this.parseAssignmentExpression()),this.context.allowYield=m}return this.finalize(a,new s.YieldExpression(u,l))},p.prototype.parseClassElement=function(a){var u=this.lookahead,l=this.createNode(),m="",v=null,x=null,w=!1,C=!1,S=!1,T=!1;if(this.match("*"))this.nextToken();else{w=this.match("["),v=this.parseObjectPropertyKey();var P=v;if(P.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(u=this.lookahead,S=!0,w=this.match("["),this.match("*")?this.nextToken():v=this.parseObjectPropertyKey()),u.type===3&&!this.hasLineTerminator&&u.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(T=!0,u=this.lookahead,v=this.parseObjectPropertyKey(),u.type===3&&u.value==="constructor"&&this.tolerateUnexpectedToken(u,o.Messages.ConstructorIsAsync))}}var L=this.qualifiedPropertyName(this.lookahead);return u.type===3?u.value==="get"&&L?(m="get",w=this.match("["),v=this.parseObjectPropertyKey(),this.context.allowYield=!1,x=this.parseGetterMethod()):u.value==="set"&&L&&(m="set",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseSetterMethod()):u.type===7&&u.value==="*"&&L&&(m="init",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseGeneratorMethod(),C=!0),!m&&v&&this.match("(")&&(m="init",x=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0),m||this.throwUnexpectedToken(this.lookahead),m==="init"&&(m="method"),w||(S&&this.isPropertyKey(v,"prototype")&&this.throwUnexpectedToken(u,o.Messages.StaticPrototype),!S&&this.isPropertyKey(v,"constructor")&&((m!=="method"||!C||x&&x.generator)&&this.throwUnexpectedToken(u,o.Messages.ConstructorSpecialMethod),a.value?this.throwUnexpectedToken(u,o.Messages.DuplicateConstructor):a.value=!0,m="constructor")),this.finalize(l,new s.MethodDefinition(v,w,x,m,S))},p.prototype.parseClassElementList=function(){var a=[],u={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():a.push(this.parseClassElement(u));return this.expect("}"),a},p.prototype.parseClassBody=function(){var a=this.createNode(),u=this.parseClassElementList();return this.finalize(a,new s.ClassBody(u))},p.prototype.parseClassDeclaration=function(a){var u=this.createNode(),l=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var m=a&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),v=null;this.matchKeyword("extends")&&(this.nextToken(),v=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=l,this.finalize(u,new s.ClassDeclaration(m,v,x))},p.prototype.parseClassExpression=function(){var a=this.createNode(),u=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var l=this.lookahead.type===3?this.parseVariableIdentifier():null,m=null;this.matchKeyword("extends")&&(this.nextToken(),m=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var v=this.parseClassBody();return this.context.strict=u,this.finalize(a,new s.ClassExpression(l,m,v))},p.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var a=this.createNode(),u=this.parseDirectivePrologues();this.lookahead.type!==2;)u.push(this.parseStatementListItem());return this.finalize(a,new s.Module(u))},p.prototype.parseScript=function(){for(var a=this.createNode(),u=this.parseDirectivePrologues();this.lookahead.type!==2;)u.push(this.parseStatementListItem());return this.finalize(a,new s.Script(u))},p.prototype.parseModuleSpecifier=function(){var a=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var u=this.nextToken(),l=this.getTokenRaw(u);return this.finalize(a,new s.Literal(u.value,l))},p.prototype.parseImportSpecifier=function(){var a=this.createNode(),u,l;return this.lookahead.type===3?(u=this.parseVariableIdentifier(),l=u,this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseVariableIdentifier())):(u=this.parseIdentifierName(),l=u,this.matchContextualKeyword("as")?(this.nextToken(),l=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(a,new s.ImportSpecifier(l,u))},p.prototype.parseNamedImports=function(){this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),a},p.prototype.parseImportDefaultSpecifier=function(){var a=this.createNode(),u=this.parseIdentifierName();return this.finalize(a,new s.ImportDefaultSpecifier(u))},p.prototype.parseImportNamespaceSpecifier=function(){var a=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var u=this.parseIdentifierName();return this.finalize(a,new s.ImportNamespaceSpecifier(u))},p.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var a=this.createNode();this.expectKeyword("import");var u,l=[];if(this.lookahead.type===8)u=this.parseModuleSpecifier();else{if(this.match("{")?l=l.concat(this.parseNamedImports()):this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(l.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.match("{")?l=l.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var m=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(m,this.lookahead.value)}this.nextToken(),u=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(a,new s.ImportDeclaration(l,u))},p.prototype.parseExportSpecifier=function(){var a=this.createNode(),u=this.parseIdentifierName(),l=u;return this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseIdentifierName()),this.finalize(a,new s.ExportSpecifier(u,l))},p.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var a=this.createNode();this.expectKeyword("export");var u;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var l=this.parseFunctionDeclaration(!0);u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.matchKeyword("class")){var l=this.parseClassDeclaration(!0);u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.matchContextualKeyword("async")){var l=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var l=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var m=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(m,this.lookahead.value)}this.nextToken();var v=this.parseModuleSpecifier();this.consumeSemicolon(),u=this.finalize(a,new s.ExportAllDeclaration(v))}else if(this.lookahead.type===4){var l=void 0;switch(this.lookahead.value){case"let":case"const":l=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":l=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}u=this.finalize(a,new s.ExportNamedDeclaration(l,[],null))}else if(this.matchAsyncFunction()){var l=this.parseFunctionDeclaration();u=this.finalize(a,new s.ExportNamedDeclaration(l,[],null))}else{var x=[],w=null,C=!1;for(this.expect("{");!this.match("}");)C=C||this.matchKeyword("default"),x.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),w=this.parseModuleSpecifier(),this.consumeSemicolon();else if(C){var m=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(m,this.lookahead.value)}else this.consumeSemicolon();u=this.finalize(a,new s.ExportNamedDeclaration(null,x,w))}return u},p})();t.Parser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,o){var s=new Error(n);try{throw s}catch(c){Object.create&&Object.defineProperty&&(s=Object.create(c),Object.defineProperty(s,"column",{value:o}))}return s},i.prototype.createError=function(n,o,s,c){var h="Line "+o+": "+c,g=this.constructError(h,s);return g.index=n,g.lineNumber=o,g.description=c,g},i.prototype.throwError=function(n,o,s,c){throw this.createError(n,o,s,c)},i.prototype.tolerateError=function(n,o,s,c){var h=this.createError(n,o,s,c);if(this.tolerant)this.recordError(h);else throw h},i})();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(4),o=r(11);function s(g){return"0123456789abcdef".indexOf(g.toLowerCase())}function c(g){return"01234567".indexOf(g)}var h=(function(){function g(d,f){this.source=d,this.errorHandler=f,this.trackComment=!1,this.isModule=!1,this.length=d.length,this.index=0,this.lineNumber=d.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return g.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},g.prototype.restoreState=function(d){this.index=d.index,this.lineNumber=d.lineNumber,this.lineStart=d.lineStart},g.prototype.eof=function(){return this.index>=this.length},g.prototype.throwUnexpectedToken=function(d){return d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},g.prototype.tolerateUnexpectedToken=function(d){d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},g.prototype.skipSingleLineComment=function(d){var f=[],p,a;for(this.trackComment&&(f=[],p=this.index-d,a={start:{line:this.lineNumber,column:this.index-this.lineStart-d},end:{}});!this.eof();){var u=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(u)){if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};var l={multiLine:!1,slice:[p+d,this.index-1],range:[p,this.index-1],loc:a};f.push(l)}return u===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f}}if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart};var l={multiLine:!1,slice:[p+d,this.index],range:[p,this.index],loc:a};f.push(l)}return f},g.prototype.skipMultiLineComment=function(){var d=[],f,p;for(this.trackComment&&(d=[],f=this.index-2,p={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(a))a===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(a===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:!0,slice:[f+2,this.index-2],range:[f,this.index],loc:p};d.push(u)}return d}++this.index}else++this.index}if(this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:!0,slice:[f+2,this.index],range:[f,this.index],loc:p};d.push(u)}return this.tolerateUnexpectedToken(),d},g.prototype.scanComments=function(){var d;this.trackComment&&(d=[]);for(var f=this.index===0;!this.eof();){var p=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(p))++this.index;else if(n.Character.isLineTerminator(p))++this.index,p===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f=!0;else if(p===47)if(p=this.source.charCodeAt(this.index+1),p===47){this.index+=2;var a=this.skipSingleLineComment(2);this.trackComment&&(d=d.concat(a)),f=!0}else if(p===42){this.index+=2;var a=this.skipMultiLineComment();this.trackComment&&(d=d.concat(a))}else break;else if(f&&p===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var a=this.skipSingleLineComment(3);this.trackComment&&(d=d.concat(a))}else break;else if(p===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var a=this.skipSingleLineComment(4);this.trackComment&&(d=d.concat(a))}else break;else break}return d},g.prototype.isFutureReservedWord=function(d){switch(d){case"enum":case"export":case"import":case"super":return!0;default:return!1}},g.prototype.isStrictModeReservedWord=function(d){switch(d){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},g.prototype.isRestrictedWord=function(d){return d==="eval"||d==="arguments"},g.prototype.isKeyword=function(d){switch(d.length){case 2:return d==="if"||d==="in"||d==="do";case 3:return d==="var"||d==="for"||d==="new"||d==="try"||d==="let";case 4:return d==="this"||d==="else"||d==="case"||d==="void"||d==="with"||d==="enum";case 5:return d==="while"||d==="break"||d==="catch"||d==="throw"||d==="const"||d==="yield"||d==="class"||d==="super";case 6:return d==="return"||d==="typeof"||d==="delete"||d==="switch"||d==="export"||d==="import";case 7:return d==="default"||d==="finally"||d==="extends";case 8:return d==="function"||d==="continue"||d==="debugger";case 10:return d==="instanceof";default:return!1}},g.prototype.codePointAt=function(d){var f=this.source.charCodeAt(d);if(f>=55296&&f<=56319){var p=this.source.charCodeAt(d+1);if(p>=56320&&p<=57343){var a=f;f=(a-55296)*1024+p-56320+65536}}return f},g.prototype.scanHexEscape=function(d){for(var f=d==="u"?4:2,p=0,a=0;a<f;++a)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))p=p*16+s(this.source[this.index++]);else return null;return String.fromCharCode(p)},g.prototype.scanUnicodeCodePointEscape=function(){var d=this.source[this.index],f=0;for(d==="}"&&this.throwUnexpectedToken();!this.eof()&&(d=this.source[this.index++],!!n.Character.isHexDigit(d.charCodeAt(0)));)f=f*16+s(d);return(f>1114111||d!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(f)},g.prototype.getIdentifier=function(){for(var d=this.index++;!this.eof();){var f=this.source.charCodeAt(this.index);if(f===92)return this.index=d,this.getComplexIdentifier();if(f>=55296&&f<57343)return this.index=d,this.getComplexIdentifier();if(n.Character.isIdentifierPart(f))++this.index;else break}return this.source.slice(d,this.index)},g.prototype.getComplexIdentifier=function(){var d=this.codePointAt(this.index),f=n.Character.fromCodePoint(d);this.index+=f.length;var p;for(d===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierStart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f=p);!this.eof()&&(d=this.codePointAt(this.index),!!n.Character.isIdentifierPart(d));)p=n.Character.fromCodePoint(d),f+=p,this.index+=p.length,d===92&&(f=f.substr(0,f.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierPart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f+=p);return f},g.prototype.octalToDecimal=function(d){var f=d!=="0",p=c(d);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(f=!0,p=p*8+c(this.source[this.index++]),"0123".indexOf(d)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(p=p*8+c(this.source[this.index++]))),{code:p,octal:f}},g.prototype.scanIdentifier=function(){var d,f=this.index,p=this.source.charCodeAt(f)===92?this.getComplexIdentifier():this.getIdentifier();if(p.length===1?d=3:this.isKeyword(p)?d=4:p==="null"?d=5:p==="true"||p==="false"?d=1:d=3,d!==3&&f+p.length!==this.index){var a=this.index;this.index=f,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=a}return{type:d,value:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.scanPunctuator=function(){var d=this.index,f=this.source[this.index];switch(f){case"(":case"{":f==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,f="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:f=this.source.substr(this.index,4),f===">>>="?this.index+=4:(f=f.substr(0,3),f==="==="||f==="!=="||f===">>>"||f==="<<="||f===">>="||f==="**="?this.index+=3:(f=f.substr(0,2),f==="&&"||f==="||"||f==="=="||f==="!="||f==="+="||f==="-="||f==="*="||f==="/="||f==="++"||f==="--"||f==="<<"||f===">>"||f==="&="||f==="|="||f==="^="||f==="%="||f==="<="||f===">="||f==="=>"||f==="**"?this.index+=2:(f=this.source[this.index],"<>=!+-*%&|^/".indexOf(f)>=0&&++this.index)))}return this.index===d&&this.throwUnexpectedToken(),{type:7,value:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanHexLiteral=function(d){for(var f="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+f,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanBinaryLiteral=function(d){for(var f="",p;!this.eof()&&(p=this.source[this.index],!(p!=="0"&&p!=="1"));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),this.eof()||(p=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(p)||n.Character.isDecimalDigit(p))&&this.throwUnexpectedToken()),{type:6,value:parseInt(f,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanOctalLiteral=function(d,f){var p="",a=!1;for(n.Character.isOctalDigit(d.charCodeAt(0))?(a=!0,p="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];return!a&&p.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(p,8),octal:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},g.prototype.isImplicitOctalLiteral=function(){for(var d=this.index+1;d<this.length;++d){var f=this.source[d];if(f==="8"||f==="9")return!1;if(!n.Character.isOctalDigit(f.charCodeAt(0)))return!0}return!0},g.prototype.scanNumericLiteral=function(){var d=this.index,f=this.source[d];i.assert(n.Character.isDecimalDigit(f.charCodeAt(0))||f===".","Numeric literal must start with a decimal digit or a decimal point");var p="";if(f!=="."){if(p=this.source[this.index++],f=this.source[this.index],p==="0"){if(f==="x"||f==="X")return++this.index,this.scanHexLiteral(d);if(f==="b"||f==="B")return++this.index,this.scanBinaryLiteral(d);if(f==="o"||f==="O")return this.scanOctalLiteral(f,d);if(f&&n.Character.isOctalDigit(f.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(f,d)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="."){for(p+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="e"||f==="E")if(p+=this.source[this.index++],f=this.source[this.index],(f==="+"||f==="-")&&(p+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(p),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanStringLiteral=function(){var d=this.index,f=this.source[d];i.assert(f==="'"||f==='"',"String literal must starts with a quote"),++this.index;for(var p=!1,a="";!this.eof();){var u=this.source[this.index++];if(u===f){f="";break}else if(u==="\\")if(u=this.source[this.index++],!u||!n.Character.isLineTerminator(u.charCodeAt(0)))switch(u){case"u":if(this.source[this.index]==="{")++this.index,a+=this.scanUnicodeCodePointEscape();else{var l=this.scanHexEscape(u);l===null&&this.throwUnexpectedToken(),a+=l}break;case"x":var m=this.scanHexEscape(u);m===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=m;break;case"n":a+=`
120
+ `;break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=u,this.tolerateUnexpectedToken();break;default:if(u&&n.Character.isOctalDigit(u.charCodeAt(0))){var v=this.octalToDecimal(u);p=v.octal||p,a+=String.fromCharCode(v.code)}else a+=u;break}else++this.lineNumber,u==="\r"&&this.source[this.index]===`
121
+ `&&++this.index,this.lineStart=this.index;else{if(n.Character.isLineTerminator(u.charCodeAt(0)))break;a+=u}}return f!==""&&(this.index=d,this.throwUnexpectedToken()),{type:8,value:a,octal:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.scanTemplate=function(){var d="",f=!1,p=this.index,a=this.source[p]==="`",u=!1,l=2;for(++this.index;!this.eof();){var m=this.source[this.index++];if(m==="`"){l=1,u=!0,f=!0;break}else if(m==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,f=!0;break}d+=m}else if(m==="\\")if(m=this.source[this.index++],n.Character.isLineTerminator(m.charCodeAt(0)))++this.lineNumber,m==="\r"&&this.source[this.index]===`
122
+ `&&++this.index,this.lineStart=this.index;else switch(m){case"n":d+=`
123
+ `;break;case"r":d+="\r";break;case"t":d+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,d+=this.scanUnicodeCodePointEscape();else{var v=this.index,x=this.scanHexEscape(m);x!==null?d+=x:(this.index=v,d+=m)}break;case"x":var w=this.scanHexEscape(m);w===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),d+=w;break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:m==="0"?(n.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),d+="\0"):n.Character.isOctalDigit(m.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):d+=m;break}else n.Character.isLineTerminator(m.charCodeAt(0))?(++this.lineNumber,m==="\r"&&this.source[this.index]===`
124
+ `&&++this.index,this.lineStart=this.index,d+=`
125
+ `):d+=m}return f||this.throwUnexpectedToken(),a||this.curlyStack.pop(),{type:10,value:this.source.slice(p+1,this.index-l),cooked:d,head:a,tail:u,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},g.prototype.testRegExp=function(d,f){var p="\uFFFF",a=d,u=this;f.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(l,m,v){var x=parseInt(m||v,16);return x>1114111&&u.throwUnexpectedToken(o.Messages.InvalidRegExp),x<=65535?String.fromCharCode(x):p}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p));try{RegExp(a)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(d,f)}catch{return null}},g.prototype.scanRegExpBody=function(){var d=this.source[this.index];i.assert(d==="/","Regular expression literal must start with a slash");for(var f=this.source[this.index++],p=!1,a=!1;!this.eof();)if(d=this.source[this.index++],f+=d,d==="\\")d=this.source[this.index++],n.Character.isLineTerminator(d.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f+=d;else if(n.Character.isLineTerminator(d.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(p)d==="]"&&(p=!1);else if(d==="/"){a=!0;break}else d==="["&&(p=!0);return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f.substr(1,f.length-2)},g.prototype.scanRegExpFlags=function(){for(var d="",f="";!this.eof();){var p=this.source[this.index];if(!n.Character.isIdentifierPart(p.charCodeAt(0)))break;if(++this.index,p==="\\"&&!this.eof())if(p=this.source[this.index],p==="u"){++this.index;var a=this.index,u=this.scanHexEscape("u");if(u!==null)for(f+=u,d+="\\u";a<this.index;++a)d+=this.source[a];else this.index=a,f+="u",d+="\\u";this.tolerateUnexpectedToken()}else d+="\\",this.tolerateUnexpectedToken();else f+=p,d+=p}return f},g.prototype.scanRegExp=function(){var d=this.index,f=this.scanRegExpBody(),p=this.scanRegExpFlags(),a=this.testRegExp(f,p);return{type:9,value:"",pattern:f,flags:p,regex:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},g.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var d=this.source.charCodeAt(this.index);return n.Character.isIdentifierStart(d)?this.scanIdentifier():d===40||d===41||d===59?this.scanPunctuator():d===39||d===34?this.scanStringLiteral():d===46?n.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():n.Character.isDecimalDigit(d)?this.scanNumericLiteral():d===96||d===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():d>=55296&&d<57343&&n.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},g})();t.Scanner=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(10),n=r(12),o=r(13),s=(function(){function h(){this.values=[],this.curly=this.paren=-1}return h.prototype.beforeFunctionExpression=function(g){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(g)>=0},h.prototype.isRegexStart=function(){var g=this.values[this.values.length-1],d=g!==null;switch(g){case"this":case"]":d=!1;break;case")":var f=this.values[this.paren-1];d=f==="if"||f==="while"||f==="for"||f==="with";break;case"}":if(d=!1,this.values[this.curly-3]==="function"){var p=this.values[this.curly-4];d=p?!this.beforeFunctionExpression(p):!1}else if(this.values[this.curly-4]==="function"){var p=this.values[this.curly-5];d=p?!this.beforeFunctionExpression(p):!0}break;default:break}return d},h.prototype.push=function(g){g.type===7||g.type===4?(g.value==="{"?this.curly=this.values.length:g.value==="("&&(this.paren=this.values.length),this.values.push(g.value)):this.values.push(null)},h})(),c=(function(){function h(g,d){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=d?typeof d.tolerant=="boolean"&&d.tolerant:!1,this.scanner=new n.Scanner(g,this.errorHandler),this.scanner.trackComment=d?typeof d.comment=="boolean"&&d.comment:!1,this.trackRange=d?typeof d.range=="boolean"&&d.range:!1,this.trackLoc=d?typeof d.loc=="boolean"&&d.loc:!1,this.buffer=[],this.reader=new s}return h.prototype.errors=function(){return this.errorHandler.errors},h.prototype.getNextToken=function(){if(this.buffer.length===0){var g=this.scanner.scanComments();if(this.scanner.trackComment)for(var d=0;d<g.length;++d){var f=g[d],p=this.scanner.source.slice(f.slice[0],f.slice[1]),a={type:f.multiLine?"BlockComment":"LineComment",value:p};this.trackRange&&(a.range=f.range),this.trackLoc&&(a.loc=f.loc),this.buffer.push(a)}if(!this.scanner.eof()){var u=void 0;this.trackLoc&&(u={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var l=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),m=l?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(m);var v={type:o.TokenName[m.type],value:this.scanner.source.slice(m.start,m.end)};if(this.trackRange&&(v.range=[m.start,m.end]),this.trackLoc&&(u.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},v.loc=u),m.type===9){var x=m.pattern,w=m.flags;v.regex={pattern:x,flags:w}}this.buffer.push(v)}}return this.buffer.shift()},h})();t.Tokenizer=c}])})});var op=E((X2,us)=>{y();(function(){"use strict";var e,t,r=Object.prototype.toString;typeof us=="object"&&typeof us.exports=="object"&&typeof F=="function"?(e=sp(),t=function(n){us.exports=n},i(e,t)):typeof define=="function"&&define.amd?define(["esprima"],function(n){return i(n)}):typeof window=="object"&&(window.redeyed=i(window.esprima));function i(n,o){function s(v){return r.call(v)==="[object Function]"}function c(v){return r.call(v)==="[object String]"}function h(v){return r.call(v)==="[object Object]"}function g(v,x){return function(w){return v+w+x}}function d(v){return v!=="_parent"}function f(v){var x=v.split(":");if(x.length===0||x.length>2)throw new Error("illegal string config: "+v+`
126
+ Should be of format "before:after"`);return x.length===1||x[1].length===0?x.indexOf(":")<0?{_before:x[0]}:{_after:x[0]}:{_before:x[0],_after:x[1]}}function p(v){function x(C,S){if(C._parent){if(C._parent._default&&C._parent._default[S])return C._parent._default[S];var T=C._parent._parent;if(T)return T._default?T._default[S]:void 0}}function w(C){var S=v[C];if(S&&!s(S)){if(c(S)&&(v[C]=S=f(S)),S._parent=v,h(S)){if(!S._before&&!S._after)return p(S);S._before=S._before||x(S,"_before"),S._after=S._after||x(S,"_after");return}throw new Error("nodes need to be either {String}, {Object} or {Function}."+S+" is neither.")}}v._default&&w("_default"),Object.keys(v).filter(function(C){return d(C)&&v.hasOwnProperty(C)&&C!=="_before"&&C!=="_after"&&C!=="_default"}).forEach(w)}function a(v){Object.keys(v).filter(function(x){return d(x)&&v.hasOwnProperty(x)}).forEach(function(x){var w=v[x];if(!s(w)&&h(w)){if(!w._before&&!w._after)return a(w);var C=w._before||"",S=w._after||"";return v[x]=g(C,S),v[x]}})}function u(v){p(v),a(v)}function l(v,x){var w={};function C(S){w[S.range[0]]=S}return v.forEach(C),x.forEach(C),Object.keys(w).map(function(S){return w[S]})}function m(v,x,w){w=w||{};var C=w.parser||n,S=!!w.jsx,T=S||!!w.buildAst,P="",B,L,z,G=0,pe=[],_t,wr,Wt;v[0]==="#"&&v[1]==="!"&&(P=v.substr(0,v.indexOf(`
127
+ `)+1),v=Array.apply(0,Array(P.length)).join(" ")+`
128
+ `+v.substr(P.length)),T?(B=C.parse(v,{tokens:!0,comment:!0,range:!0,loc:!0,tolerant:!0,jsx:!0}),L=B.tokens,z=B.comments):(L=[],z=[],C.tokenize(v,{range:!0,loc:!0,comment:!0},function(re){re.type==="LineComment"?(re.type="Line",z.push(re)):re.type==="BlockComment"?(re.type="Block",z.push(re)):(re.type==="Identifier"&&re.value==="static"&&(re.type="Keyword"),L.push(re))})),u(x);function io(re,De,We){var je,Ge=De.range[0];for(je=We;je<re.length;je++)if(re[je].range[0]===Ge)return je;throw new Error("Token %s not found at or after index: %d",De,We)}function no(re){var De,We,je,Ge=0,Ft;return De=re(v.slice(Er,Xt),Wt),h(De)?(pe.push(De.replacement),We=Wt.tokenIndex,je=io(Wt.tokens,De.skipPastToken,We),Ge=je-We,Ft=Ge>0?L[je-1].range[1]:Xt):(pe.push(De),Ft=Xt),{skip:Ge,splitEnd:Ft}}function fi(re,De,We,je){var Ge,Ft=0;if(!(re>=De))return We?(Ge=no(We),Ft=Ge.skip,G=Ge.splitEnd):(pe.push(v.slice(re,De)),G=De),Ft}wr=l(L,z);for(var Gt=0;Gt<wr.length;Gt++){var dt=wr[Gt],pt=x[dt.type],tn,Er,Xt;pt&&(tn=pt&&pt.hasOwnProperty(dt.value)&&pt[dt.value]&&s(pt[dt.value])?pt[dt.value]:pt._default,Er=dt.range[0],Xt=dt.range[1],fi(G,Er),Wt={tokenIndex:Gt,tokens:wr,ast:B,code:v},Gt+=fi(Er,Xt,tn,Wt))}return G<v.length&&fi(G,v.length),w.nojoin||(_t=pe.join(""),P.length>0&&(_t=P+_t.substr(P.length))),{ast:B,tokens:L,comments:z,splits:pe,code:_t}}return o?o(m):m}})()});var cs=E((K2,cp)=>{"use strict";y();var ap={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},up={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},Fa={},ka={},Mi={};Object.keys(ap).forEach(function(e){var t=Fa[e]="\x1B["+ap[e]+"m",r=ka[e]="\x1B[39m";Mi[e]=function(i){return t+i+r}});Object.keys(up).forEach(function(e){var t=Fa[e]="\x1B["+up[e]+"m",r=ka[e]="\x1B[49m";Mi[e]=function(i){return t+i+r}});cp.exports=Mi;Mi.open=Fa;Mi.close=ka});var hp=E((Z2,lp)=>{y();var j=cs();lp.exports={Boolean:{true:void 0,false:void 0,_default:j.brightRed},Identifier:{undefined:j.brightBlack,self:j.brightRed,console:j.blue,log:j.blue,warn:j.red,error:j.brightRed,_default:j.white},Null:{_default:j.brightBlack},Numeric:{_default:j.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?j.green(e):j.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:j.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:j.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:j.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:j.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:j.red,static:void 0,super:void 0,switch:void 0,this:j.brightRed,throw:void 0,try:j.cyan,typeof:void 0,var:j.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:j.brightBlue},Punctuator:{";":j.brightBlack,".":j.green,",":j.green,"{":j.yellow,"}":j.yellow,"(":j.brightBlack,")":j.brightBlack,"[":j.yellow,"]":j.yellow,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:j.brightYellow},Line:{_default:j.brightBlack},Block:{_default:j.brightBlack},JSXAttribute:{_default:j.magenta},JSXClosingElement:{_default:j.magenta},JSXElement:{_default:j.magenta},JSXEmptyExpression:{_default:j.magenta},JSXExpressionContainer:{_default:j.magenta},JSXIdentifier:{className:j.blue,_default:j.magenta},JSXMemberExpression:{_default:j.magenta},JSXNamespacedName:{_default:j.magenta},JSXOpeningElement:{_default:j.magenta},JSXSpreadAttribute:{_default:j.magenta},JSXText:{_default:j.brightGreen},_default:void 0}});var ls=E((tI,fp)=>{"use strict";y();var tS=op(),rS=hp(),iS=cs(),nS=iS.brightBlack,sS="\x1B[39m";function oS(e){for(var t=e.pop();!t||!t.length;)t=e.pop();t&&e.push(t)}function aS(e,t){var r=e.split(`
129
+ `);oS(r);var i=r.length,n=[],o,s;function c(d){return d<10?1:d<100?2:d<1e3?3:d<1e4?4:5}function h(d,f){var p=f-c(d);switch(p){case 0:return""+d;case 1:return" "+d;case 2:return" "+d;case 3:return" "+d;case 4:return" "+d;case 5:return" "+d}}o=c(i+t-1);for(var g=0;g<i;g++)s=nS(h(g+t,o)+": ").replace(sS,""),n.push(s+r[g]);return n.join(`
130
+ `)}fp.exports=function(t,r){r=r||{};try{var i=tS(t,r.theme||rS,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?aS(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var pp=E((iI,dp)=>{"use strict";y();var uS=F("fs"),cS=ls();function lS(e){return toString.call(e)==="[object Function]"}dp.exports=function(t,r,i){lS(r)&&(i=r,r={}),r=r||{},uS.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,cS(o,r))}catch(s){i(s)}})}});var gp=E((sI,mp)=>{"use strict";y();var hS=F("fs"),fS=ls();mp.exports=function(t,r){var i=hS.readFileSync(t,"utf-8");return r=r||{},fS(i,r)}});var vp=E((aI,yp)=>{"use strict";y();yp.exports={highlight:ls(),highlightFile:pp(),highlightFileSync:gp()}});var wp=E((cI,xp)=>{y();var $=cs();xp.exports={Boolean:{true:void 0,false:void 0,_default:$.brightRed},Identifier:{undefined:$.brightBlack,self:$.brightRed,console:$.blue,log:$.blue,warn:$.red,error:$.brightRed,_default:$.white},Null:{_default:$.brightBlack},Numeric:{_default:$.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?$.brightBlue(e):$.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:$.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:$.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:$.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:$.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:$.red,static:void 0,super:void 0,switch:void 0,this:$.brightRed,throw:void 0,try:$.cyan,typeof:void 0,var:$.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:$.brightBlue},Punctuator:{";":$.brightBlack,".":$.green,",":$.green,"{":$.brightWhite,"}":$.brightWhite,"(":$.brightBlack,")":$.brightBlack,"[":$.brightWhite,"]":$.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:$.brightYellow},Line:{_default:$.brightBlack},Block:{_default:$.brightBlack},_default:void 0}});var Ep=E(hs=>{"use strict";y();Object.defineProperty(hs,"__esModule",{value:!0});hs.ExitError=void 0;var Ta=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};hs.ExitError=Ta});var Bi=E(_=>{"use strict";y();var dS=_&&_.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),pS=_&&_.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Na=_&&_.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&dS(t,e,r);return pS(t,e),t},ps=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0});_.write=_.colorize=_.Table=_.ExitError=_.config=_.Config=_.ActionBase=_.warn=_.wait=_.url=_.tree=_.trace=_.table=_.styledObject=_.styledJSON=_.styledHeader=_.prompt=_.progress=_.logToStderr=_.log=_.info=_.flush=_.exit=_.error=_.done=_.debug=_.confirm=_.anykey=_.annotation=_.action=_.ux=void 0;var Oa=ps(Be()),fs=F("node:util"),mS=Na($e()),Pa=qn(),gS=Hn(),Ia=Na(hh()),ds=Na(Sa()),yS=ps(rp()),bp=ps(Ot()),vS=np(),ji=class{static config=Pa.config;static get action(){return Pa.config.action}static annotation(t,r){gc().stdout?this.log(`\x1B]1337;AddAnnotation=${t.length}|${r}\x07${t}`):this.log(t)}static get anykey(){return Ia.anykey}static get confirm(){return Ia.confirm}static debug(t,...r){["debug","trace"].includes(this.config.outputLevel)&&this.info((0,fs.format)(t,...r)+`
131
+ `)}static async done(){Pa.config.action.stop()}static async flush(t=1e4){await(0,gS.flush)(t)}static info(t,...r){bp.default.stdout((0,fs.format)(t,...r)+`
132
+ `)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){bp.default.stderr((0,fs.format)(t,...r)+`
133
+ `)}static get progress(){return ds.progress}static get prompt(){return Ia.prompt}static styledHeader(t){this.info(Oa.default.dim("=== ")+Oa.default.bold(t)+`
134
+ `)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!Oa.default.level){this.info(r);return}let i=vp(),n=wp();this.info(i.highlight(r,{json:!0,theme:n}))}static styledObject(t,r){this.info(ds.styledObject(t,r))}static get table(){return ds.Table.table}static trace(t,...r){this.config.outputLevel==="trace"&&this.info((0,fs.format)(t,...r)+`
135
+ `)}static get tree(){return ds.tree}static url(t,r,i={}){gc().stdout?this.log(vS(t,r,i)):this.log(r)}static get wait(){return yS.default}};_.ux=ji;var{action:xS,annotation:wS,anykey:ES,confirm:bS,debug:DS,done:CS,flush:SS,info:AS,log:_S,logToStderr:FS,progress:kS,prompt:TS,styledHeader:OS,styledJSON:PS,styledObject:IS,table:NS,trace:MS,tree:jS,url:BS,wait:RS}=ji;_.action=xS;_.annotation=wS;_.anykey=ES;_.confirm=bS;_.debug=DS;_.done=CS;_.flush=SS;_.info=AS;_.log=_S;_.logToStderr=FS;_.progress=kS;_.prompt=TS;_.styledHeader=OS;_.styledJSON=PS;_.styledObject=IS;_.table=NS;_.trace=MS;_.tree=jS;_.url=BS;_.wait=RS;var{error:LS,exit:$S,warn:qS}=mS;_.error=LS;_.exit=$S;_.warn=qS;var Dp=async()=>{try{await ji.done()}catch(e){console.error(e),process.exitCode=1}},US=process.listeners("exit").find(e=>e.name===Dp.name);US||process.once("exit",Dp);var HS=Rn();Object.defineProperty(_,"ActionBase",{enumerable:!0,get:function(){return HS.ActionBase}});var Cp=qn();Object.defineProperty(_,"Config",{enumerable:!0,get:function(){return Cp.Config}});Object.defineProperty(_,"config",{enumerable:!0,get:function(){return Cp.config}});var zS=Ep();Object.defineProperty(_,"ExitError",{enumerable:!0,get:function(){return zS.ExitError}});var JS=Sa();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return JS.Table}});var WS=er();Object.defineProperty(_,"colorize",{enumerable:!0,get:function(){return WS.colorize}});var GS=Ot();Object.defineProperty(_,"write",{enumerable:!0,get:function(){return ps(GS).default}})});var Sp=E(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.stderr=Vr.stdout=void 0;var ms=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};Vr.stdout=new ms("stdout");Vr.stderr=new ms("stderr")});var Yr=E(Ee=>{"use strict";y();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Performance=Ee.OCLIF_MARKER_OWNER=void 0;var Ri=F("node:perf_hooks"),XS=Pt();Ee.OCLIF_MARKER_OWNER="@oclif/core";var Ma=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,c]=n.split(".");this.module=s,this.method=c,this.scope=o,Ri.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){Ri.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Ri.performance.mark(this.stopMarker)}},ja=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new Ri.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},u=e._results.get(p.owner)??[];e._results.set(p.owner,[...u,a])}}let o=e._results.get(Ee.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),c=s?e.getResult(Ee.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,h=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),g=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let u=p.scope;f[u]||(f[u]={}),f[u].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:g,"oclif.commandLoadMs":c,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":g.init?.total??0,"oclif.initMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":g.postrun?.total??0,"oclif.prerunHookMs":g.prerun?.total??0,"oclif.runMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:h},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}Ri.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=et()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[c,h]of Object.entries(s))t(` ${c}: ${h.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=et()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let c of s)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static get enabled(){return XS.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ma(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Ee.OCLIF_MARKER_OWNER)):new Map}};Ee.Performance=ja});var _p=E(Kr=>{"use strict";y();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.getPlatform=Kr.getHomeDir=void 0;var Ap=F("node:os");function VS(){return(0,Ap.homedir)()}Kr.getHomeDir=VS;function YS(){return(0,Ap.platform)()}Kr.getPlatform=YS});var Fp=E(gs=>{"use strict";y();Object.defineProperty(gs,"__esModule",{value:!0});gs.assertValidPattern=void 0;var KS=1024*64,QS=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>KS)throw new TypeError("pattern is too long")};gs.assertValidPattern=QS});var Tp=E(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.parseClass=void 0;var ZS={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Li=e=>e.replace(/[[\]\\-]/g,"\\$&"),eA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),kp=e=>e.join(""),tA=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,c=!1,h=!1,g=!1,d=r,f="";e:for(;o<e.length;){let l=e.charAt(o);if((l==="!"||l==="^")&&o===r+1){g=!0,o++;continue}if(l==="]"&&s&&!h){d=o+1;break}if(s=!0,l==="\\"&&!h){h=!0,o++;continue}if(l==="["&&!h){for(let[m,[v,x,w]]of Object.entries(ZS))if(e.startsWith(m,o)){if(f)return["$.",!1,e.length-r,!0];o+=m.length,w?n.push(v):i.push(v),c=c||x;continue e}}if(h=!1,f){l>f?i.push(Li(f)+"-"+Li(l)):l===f&&i.push(Li(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(Li(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push(Li(l)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!g){let l=i[0].length===2?i[0].slice(-1):i[0];return[eA(l),!1,d-r,!1]}let p="["+(g?"^":"")+kp(i)+"]",a="["+(g?"":"^")+kp(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,c,d-r,!0]};ys.parseClass=tA});var xs=E(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.unescape=void 0;var rA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");vs.unescape=rA});var La=E(Ds=>{"use strict";y();var _e;Object.defineProperty(Ds,"__esModule",{value:!0});Ds.AST=void 0;var iA=Tp(),ws=xs(),nA=new Set(["!","?","+","*","@"]),Ba=e=>nA.has(e),Op=e=>Ba(e.type),sA=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),oA=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),aA=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Pp=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),uA="(?!(?:^|/)\\.\\.?(?:$|/))",Es="(?!\\.)",cA=new Set(["[","."]),lA=new Set(["..","."]),hA=new Set("().*{}+?[]^$\\!"),fA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ra="[^/]",Ip=Ra+"*?",Np=Ra+"+?",bs=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof _e&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof _e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new _e(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,c=!1,h=!1,g=-1,d=!1;if(r.type===null){let l=i,m="";for(;l<t.length;){let v=t.charAt(l++);if(c||v==="\\"){c=!c,m+=v;continue}if(h){l===g+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(l===g+2&&d)&&(h=!1),m+=v;continue}else if(v==="["){h=!0,g=l,d=!1,m+=v;continue}if(!n.noext&&Ba(v)&&t.charAt(l)==="("&&o<=s){r.push(m),m="";let w=new _e(v,r);l=_e.#h(t,w,l,n,o+1),r.push(w);continue}m+=v}return r.push(m),l}let f=i+1,p=new _e(null,r),a=[],u="";for(;f<t.length;){let l=t.charAt(f++);if(c||l==="\\"){c=!c,u+=l;continue}if(h){f===g+1?(l==="^"||l==="!")&&(d=!0):l==="]"&&!(f===g+2&&d)&&(h=!1),u+=l;continue}else if(l==="["){h=!0,g=f,d=!1,u+=l;continue}if(Ba(l)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(l))){let v=r&&r.#f(l)?0:1;p.push(u),u="";let x=new _e(l,p);p.push(x),f=_e.#h(t,x,f,n,o+v);continue}if(l==="|"){p.push(u),u="",a.push(p),p=new _e(null,r);continue}if(l===")")return u===""&&r.#e.length===0&&(r.#l=!0),p.push(u),u="",r.push(...a,p),f;u+=l}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#v(t){return this.#p(t,oA)}#p(t,r=sA){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=aA){return!!r.get(this.type)?.includes(t)}#x(t,r){let i=t.#e[0],n=new _e(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Pp.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Pp.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Op(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#v(n)?(r=!1,this.#x(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new _e(null,void 0,r);return _e.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let c=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Op(this)){let h=this.isStart()&&this.isEnd(),g=this.#e.map(a=>{let[u,l,m,v]=typeof a=="string"?_e.#D(a,this.#i,h):a.toRegExpSource(t);return this.#i=this.#i||m,this.#n=this.#n||v,u}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&lA.has(this.#e[0]))){let u=cA,l=r&&u.has(g.charAt(0))||g.startsWith("\\.")&&u.has(g.charAt(2))||g.startsWith("\\.\\.")&&u.has(g.charAt(4)),m=!r&&!t&&u.has(g.charAt(0));d=l?uA:m?Es:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+g+f,(0,ws.unescape)(g),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString(),g=this;return g.#e=[h],g.type=null,g.#i=void 0,[h,(0,ws.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!Es?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?Es:"")+Np;else{let h=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Es:"")+Ip+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=n+o+h}return[c,(0,ws.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#D(t,r,i=!1){let n=!1,o="",s=!1,c=!1;for(let h=0;h<t.length;h++){let g=t.charAt(h);if(n){n=!1,o+=(hA.has(g)?"\\":"")+g,c=!1;continue}if(g==="\\"){h===t.length-1?o+="\\\\":n=!0;continue}if(g==="["){let[d,f,p,a]=(0,iA.parseClass)(t,h);if(p){o+=d,s=s||f,h+=p-1,r=r||a,c=!1;continue}}if(g==="*"){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(t)?Np:Ip,r=!0;continue}else c=!1;if(g==="?"){o+=Ra,r=!0;continue}o+=fA(g)}return[o,(0,ws.unescape)(t),!!r,s]}};Ds.AST=bs;_e=bs});var $a=E(Cs=>{"use strict";y();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.escape=void 0;var dA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");Cs.escape=dA});var qp=E(k=>{"use strict";y();var pA=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var mA=pA(cy()),Ss=Fp(),Bp=La(),gA=$a(),yA=xs(),vA=(e,t,r={})=>((0,Ss.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new fr(t,r).match(e));k.minimatch=vA;var xA=/^\*+([^+@!?\*\[\(]*)$/,wA=e=>t=>!t.startsWith(".")&&t.endsWith(e),EA=e=>t=>t.endsWith(e),bA=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),DA=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),CA=/^\*+\.\*+$/,SA=e=>!e.startsWith(".")&&e.includes("."),AA=e=>e!=="."&&e!==".."&&e.includes("."),_A=/^\.\*+$/,FA=e=>e!=="."&&e!==".."&&e.startsWith("."),kA=/^\*+$/,TA=e=>e.length!==0&&!e.startsWith("."),OA=e=>e.length!==0&&e!=="."&&e!=="..",PA=/^\?+([^+@!?\*\[\(]*)?$/,IA=([e,t=""])=>{let r=Rp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},NA=([e,t=""])=>{let r=Lp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},MA=([e,t=""])=>{let r=Lp([e]);return t?i=>r(i)&&i.endsWith(t):r},jA=([e,t=""])=>{let r=Rp([e]);return t?i=>r(i)&&i.endsWith(t):r},Rp=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},Lp=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},$p=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Mp={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=$p==="win32"?Mp.win32.sep:Mp.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var BA="[^/]",RA=BA+"*?",LA="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$A="(?:(?!(?:\\/|^)\\.).)*?",qA=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=qA;k.minimatch.filter=k.filter;var qe=(e,t={})=>Object.assign({},e,t),UA=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,qe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,qe(e,o))}static defaults(n){return t.defaults(qe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,qe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,qe(e,o))}},unescape:(i,n={})=>t.unescape(i,qe(e,n)),escape:(i,n={})=>t.escape(i,qe(e,n)),filter:(i,n={})=>t.filter(i,qe(e,n)),defaults:i=>t.defaults(qe(e,i)),makeRe:(i,n={})=>t.makeRe(i,qe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,qe(e,n)),match:(i,n,o={})=>t.match(i,n,qe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=UA;k.minimatch.defaults=k.defaults;var HA=(e,t={})=>((0,Ss.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,mA.default)(e));k.braceExpand=HA;k.minimatch.braceExpand=k.braceExpand;var zA=(e,t={})=>new fr(e,t).makeRe();k.makeRe=zA;k.minimatch.makeRe=k.makeRe;var JA=(e,t,r={})=>{let i=new fr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=JA;k.minimatch.match=k.match;var jp=/[?*]|[+@!]\(.*?\)|\[|\]/,WA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,Ss.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||$p,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=o[0]===""&&o[1]===""&&(o[2]==="?"||!jp.test(o[2]))&&!jp.test(o[3]),g=/^[a-z]:/i.test(o[0]);if(h)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(g)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(h=>this.parse(h))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let c=i[n+1],h=i[n+2],g=i[n+3];if(c!==".."||!h||h==="."||h===".."||!g||g==="."||g==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let c=i[s];s===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let h=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...h),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],c="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(c==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),g=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!g&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=h?3:c?0:void 0,p=d?3:g?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,u]=[t[f],r[p]];a.toLowerCase()===u.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),c=r.lastIndexOf(k.GLOBSTAR),[h,g,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,c),r.slice(c+1)];if(h.length){let x=t.slice(n,n+h.length);if(!this.#n(x,h,i,0,0))return!1;n+=h.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let x=t.length-d.length;if(this.#n(t,d,i,x,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(x--,!this.#n(t,d,i,x,0)))return!1;f=d.length+1}}if(!g.length){let x=!!f;for(let w=n;w<t.length-f;w++){let C=String(t[w]);if(x=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||x}let p=[[[],0]],a=p[0],u=0,l=[0];for(let x of g)x===k.GLOBSTAR?(l.push(u),a=[[],0],p.push(a)):(a[0].push(x),u++);let m=p.length-1,v=t.length-f;for(let x of p)x[1]=v-(l[m--]+x[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,c){let h=r[n];if(!h){for(let f=i;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[g,d]=h;for(;i<=d;){if(this.#n(t.slice(0,i+g.length),g,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+g.length,n+1,o,s+1,c);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,c,h,g;for(s=n,c=o,g=t.length,h=r.length;s<g&&c<h;s++,c++){this.debug("matchOne loop");let d=r[c],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===g&&c===h)return!0;if(s===g)return i;if(c===h)return s===g-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,Ss.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(kA))?n=r.dot?OA:TA:(i=t.match(xA))?n=(r.nocase?r.dot?DA:bA:r.dot?EA:wA)(i[1]):(i=t.match(PA))?n=(r.nocase?r.dot?NA:IA:r.dot?MA:jA)(i):(i=t.match(CA))?n=r.dot?AA:SA:(i=t.match(_A))&&(n=FA);let o=Bp.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?RA:r.dot?LA:$A,n=new Set(r.nocase?["i"]:[]),o=t.map(h=>{let g=h.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?WA(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return g.forEach((d,f)=>{let p=g[f+1],a=g[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?g[f+1]="(?:\\/|"+i+"\\/)?"+p:g[f]=i:p===void 0?g[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(g[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,g[f+1]=k.GLOBSTAR))}),g.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let c=n.length-2;!s&&c>=0;c--)s=n[c];for(let c=0;c<o.length;c++){let h=o[c],g=n;if(i.matchBase&&h.length===1&&(g=[s]),this.matchOne(g,h,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=fr;var GA=La();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return GA.AST}});var XA=$a();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return XA.escape}});var VA=xs();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return VA.unescape}});k.minimatch.AST=Bp.AST;k.minimatch.Minimatch=fr;k.minimatch.escape=gA.escape;k.minimatch.unescape=yA.unescape});var Hp=E((MI,Up)=>{"use strict";y();Up.exports=(...e)=>[...new Set([].concat(...e))]});var Jp=E(dr=>{"use strict";y();var{promisify:YA}=F("util"),zp=F("fs");async function qa(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await YA(zp[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Ua(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return zp[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}dr.isFile=qa.bind(null,"stat","isFile");dr.isDirectory=qa.bind(null,"stat","isDirectory");dr.isSymlink=qa.bind(null,"lstat","isSymbolicLink");dr.isFileSync=Ua.bind(null,"statSync","isFile");dr.isDirectorySync=Ua.bind(null,"statSync","isDirectory");dr.isSymlinkSync=Ua.bind(null,"lstatSync","isSymbolicLink")});var Yp=E((LI,Ha)=>{"use strict";y();var pr=F("path"),Wp=Jp(),Gp=e=>e.length>1?`{${e.join(",")}}`:e[0],Xp=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return pr.isAbsolute(r)?r:pr.join(t,r)},KA=(e,t)=>pr.extname(e)?`**/${e}`:`**/${e}.${Gp(t)}`,Vp=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>pr.posix.join(e,KA(r,t.extensions))):t.files?t.files.map(r=>pr.posix.join(e,`**/${r}`)):t.extensions?[pr.posix.join(e,`**/*.${Gp(t.extensions)}`)]:[pr.posix.join(e,"**")]};Ha.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Wp.isDirectory(Xp(i,t.cwd))?Vp(i,t):i));return[].concat.apply([],r)};Ha.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Wp.isDirectorySync(Xp(i,t.cwd))?Vp(i,t):i);return[].concat.apply([],r)}});var sm=E((qI,nm)=>{y();function Kp(e){return Array.isArray(e)?e:[e]}var Wa="",Qp=" ",za="\\",QA=/^\s+$/,ZA=/(?:[^\\]|^)\\$/,e1=/^\\!/,t1=/^\\#/,r1=/\r?\n/g,i1=/^\.*\/|^\.+$/,Ja="/",tm="node-ignore";typeof Symbol<"u"&&(tm=Symbol.for("node-ignore"));var Zp=tm,n1=(e,t,r)=>Object.defineProperty(e,t,{value:r}),s1=/([0-z])-([0-z])/g,rm=()=>!1,o1=e=>e.replace(s1,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Wa),a1=e=>{let{length:t}=e;return e.slice(0,t-t%2)},u1=[[/^\uFEFF/,()=>Wa],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?Qp:Wa)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+Qp}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>za],[/\\\\/g,()=>za],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===za?`\\[${r}${a1(i)}${n}`:n==="]"&&i.length%2===0?`[${o1(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],em=Object.create(null),c1=(e,t)=>{let r=em[e];return r||(r=u1.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),em[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Va=e=>typeof e=="string",l1=e=>e&&Va(e)&&!QA.test(e)&&!ZA.test(e)&&e.indexOf("#")!==0,h1=e=>e.split(r1),Ga=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},f1=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(e1,"!").replace(t1,"#");let n=c1(e,t);return new Ga(r,e,i,n)},d1=(e,t)=>{throw new t(e)},Et=(e,t,r)=>Va(e)?e?Et.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),im=e=>i1.test(e);Et.isNotRelative=im;Et.convert=e=>e;var Xa=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){n1(this,Zp,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[Zp]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(l1(t)){let r=f1(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Kp(Va(t)?h1(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Et.convert(t);return Et(o,t,this._allowRelativePaths?rm:d1),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Ja)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Ja)+Ja,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Kp(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},As=e=>new Xa(e),p1=e=>Et(e&&Et.convert(e),e,rm);As.isPathValid=p1;As.default=As;nm.exports=As;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Et.convert=e;let t=/^[a-z]:\//i;Et.isNotRelative=r=>t.test(r)||im(r)}});var am=E((HI,om)=>{"use strict";y();om.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var pm=E((JI,Ya)=>{"use strict";y();var{promisify:m1}=F("util"),um=F("fs"),bt=F("path"),cm=fc(),g1=sm(),$i=am(),lm=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],y1=m1(um.readFile),v1=e=>t=>t.startsWith("!")?"!"+bt.posix.join(e,t.slice(1)):bt.posix.join(e,t),x1=(e,t)=>{let r=$i(bt.relative(t.cwd,bt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(v1(r))},hm=e=>{let t=g1();for(let r of e)t.add(x1(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},w1=(e,t)=>{if(e=$i(e),bt.isAbsolute(t)){if($i(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return bt.join(e,t)},fm=(e,t)=>r=>e.ignores($i(bt.relative(t,w1(t,r.path||r)))),E1=async(e,t)=>{let r=bt.join(t,e),i=await y1(r,"utf8");return{cwd:t,filePath:r,content:i}},b1=(e,t)=>{let r=bt.join(t,e),i=um.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},dm=({ignore:e=[],cwd:t=$i(process.cwd())}={})=>({ignore:e,cwd:t});Ya.exports=async e=>{e=dm(e);let t=await cm("**/.gitignore",{ignore:lm.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>E1(n,e.cwd))),i=hm(r);return fm(i,e.cwd)};Ya.exports.sync=e=>{e=dm(e);let r=cm.sync("**/.gitignore",{ignore:lm.concat(e.ignore),cwd:e.cwd}).map(n=>b1(n,e.cwd)),i=hm(r);return fm(i,e.cwd)}});var gm=E((GI,mm)=>{"use strict";y();var{Transform:D1}=F("stream"),_s=class extends D1{constructor(){super({objectMode:!0})}},Ka=class extends _s{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},Qa=class extends _s{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};mm.exports={FilterStream:Ka,UniqueStream:Qa}});var Em=E((VI,mr)=>{"use strict";y();var vm=F("fs"),Fs=Hp(),C1=K0(),ks=fc(),Ts=Yp(),Za=pm(),{FilterStream:S1,UniqueStream:A1}=gm(),xm=()=>!1,ym=e=>e[0]==="!",_1=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},F1=(e={})=>{if(!e.cwd)return;let t;try{t=vm.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},k1=e=>e.stats instanceof vm.Stats?e.path:e,Os=(e,t)=>{e=Fs([].concat(e)),_1(e),F1(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(ym(n))continue;let o=e.slice(i).filter(c=>ym(c)).map(c=>c.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},T1=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},eu=(e,t)=>e.options.expandDirectories?T1(e,t):[e.pattern],wm=e=>e&&e.gitignore?Za.sync({cwd:e.cwd,ignore:e.ignore}):xm,tu=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=Ts.sync(r.ignore)),{pattern:t,options:r}};mr.exports=async(e,t)=>{let r=Os(e,t),i=async()=>t&&t.gitignore?Za({cwd:t.cwd,ignore:t.ignore}):xm,n=async()=>{let h=await Promise.all(r.map(async g=>{let d=await eu(g,Ts);return Promise.all(d.map(tu(g)))}));return Fs(...h)},[o,s]=await Promise.all([i(),n()]),c=await Promise.all(s.map(h=>ks(h.pattern,h.options)));return Fs(...c).filter(h=>!o(k1(h)))};mr.exports.sync=(e,t)=>{let r=Os(e,t),i=[];for(let s of r){let c=eu(s,Ts.sync).map(tu(s));i.push(...c)}let n=wm(t),o=[];for(let s of i)o=Fs(o,ks.sync(s.pattern,s.options));return o.filter(s=>!n(s))};mr.exports.stream=(e,t)=>{let r=Os(e,t),i=[];for(let c of r){let h=eu(c,Ts.sync).map(tu(c));i.push(...h)}let n=wm(t),o=new S1(c=>!n(c)),s=new A1;return C1(i.map(c=>ks.stream(c.pattern,c.options))).pipe(o).pipe(s)};mr.exports.generateGlobTasks=Os;mr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>ks.isDynamicPattern(r,t));mr.exports.gitignore=Za});var ru=E(Ps=>{"use strict";y();Object.defineProperty(Ps,"__esModule",{value:!0});Ps.aggregateFlags=void 0;var O1=ss(),P1=(0,O1.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function I1(e,t,r){let i={...t,...e};return r?{json:P1,...i}:i}Ps.aggregateFlags=I1});var Cm=E(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.cacheCommand=void 0;var N1=ru(),bm=No(),M1=Tn(),j1=oe();function Dm(e,t){let r=Object.getPrototypeOf(t),i=(0,j1.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?Dm({...i,...e},r):e}async function B1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,bm.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function R1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,bm.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function L1(e,t,r=!1){let i=Dm(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,c]=await Promise.all([await B1((0,N1.aggregateFlags)(n,o,i.enableJsonFlag),r),await R1((0,M1.ensureArgObject)(i.args),r)]),h={aliases:i.aliases??[],args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},g=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(h),...g]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...h,...p}}Is.cacheCommand=L1});var Am=E(Qr=>{"use strict";y();var $1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.findRoot=void 0;var q1=$1(et()),Fe=F("node:path"),Ns=yt(),Me=(0,q1.default)("find-root");function*iu(e){for(;(0,Fe.dirname)(e)!==e;)yield e,e=(0,Fe.dirname)(e);yield e}async function Sm(e,t){if(Me.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of iu(e))if(r.endsWith((0,Fe.basename)(t)))return Me.extend(t)("Found root based on plugin name!"),r}for(let r of iu(e))if(!((0,Fe.basename)((0,Fe.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Fe.basename)(r))))try{let i=(0,Fe.join)(r,"package.json");if(Me.extend(t??"root-plugin")(`Checking ${i}`),await(0,Ns.safeReadJson)(i))return Me.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Fe.dirname)(i)}catch{}}async function U1(e,t){Me.extend(e??"root-plugin")("Finding root using legacy method");for(let r of iu(t)){let i;if(e){if(i=(0,Fe.join)(r,"node_modules",e,"package.json"),await(0,Ns.safeReadJson)(i))return(0,Fe.dirname)(i);if((await(0,Ns.safeReadJson)((0,Fe.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Fe.join)(r,"package.json"),await(0,Ns.safeReadJson)(i))return(0,Fe.dirname)(i)}}var Lt;function H1(e){if(Lt)return Lt;try{return Lt=F(F.resolve("pnpapi",{paths:[e]})),Lt}catch{}}var nu=e=>JSON.stringify(e),z1=(e,t,r)=>nu(e?.packageDependencies.get(r))===nu(t?.packageDependencies.get(r));function J1(e,t){if(H1(t),!Lt)return;Me.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=nu(n);if(r.has(s))return;let c=Lt.getPackageInformation(n);if(n.name===e)return c.packageLocation;r.add(s);for(let[h,g]of c.packageDependencies){if(g===null||o!==null&&z1(c,o,h))continue;let d=Lt.getLocator(h,g),f=i(d,c);if(f)return f}r.delete(s)};for(let n of Lt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function W1(e,t){if(e){Me.extend(e)(`Finding root using ${t}`);let i;try{i=F.resolve(e,{paths:[t]}),Me.extend(e)("Found starting point with require.resolve")}catch{Me.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await Sm((0,Fe.dirname)(i),e);if(o)return Me.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?J1(e,t):await U1(e,t);return Me.extend(e)(n?`Found root at ${n}`:"No root found!"),n}Me.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await Sm(t);return Me.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}Qr.findRoot=W1});var uu=E(ti=>{"use strict";y();var Im=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Plugin=void 0;var G1=Im(Em()),ei=F("node:path"),_m=F("node:util"),X1=Im(Ve()),qi=$e(),Ms=xi(),Zr=Yr(),Nm=_n(),V1=Cm(),Y1=Am(),Fm=yt(),km=oe(),su=Pr(),js=Or(),Tm=X1.default.getInstance().get("@oclif/core");function ou(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>ou(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...ou(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var K1=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Om=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Pm=e=>{if(e&&typeof e.run=="function")return e},Mm=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Q1(e){return e.map(t=>{let r=(0,ei.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Nm.SINGLE_COMMAND_CLI_SYMBOL:o})}function Z1(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:Mm,strategy:"pattern",target:e};if(!e.target)throw new qi.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new qi.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function e_(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var au=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${Tm.name}@${Tm.version}`;_debug=(0,js.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return ou(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let c,h,g;try{({filePath:g,isESM:h,module:c}=K1(this.manifest,t)?await(0,Ms.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,Ms.loadWithData)(this,(0,ei.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(h?"(import)":"(require)",g)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=Om(c);return d?(d.id=t,d.plugin=this,d.isESM=h,d.relativePath=(0,ei.relative)(this.root,g||"").split(ei.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),c=Pm(s?.[t]);return c?(c.id=t,c.plugin=this,c):void 0}})();return!o&&r.must&&(0,qi.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,Y1.findRoot)(this.options.name,this.options.root);if(!t)throw new qi.CLIError(`could not find package.json with ${(0,_m.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,Fm.readJson)((0,ei.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new qi.CLIError(`no name in package.json (${t})`);this._debug=(0,js.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,km.castArray)(i).map(n=>e_(n))])),this.commandDiscoveryOpts=Z1(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(c=!1)=>{try{let h=(0,ei.join)(this.root,`${c?".":""}oclif.manifest.json`),g=await(0,Fm.readJson)(h);if(!process.env.OCLIF_NEXT_VERSION&&g.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${g.version}
136
+ This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",h),this.hasManifest=!0,g}catch(h){if(h.code==="ENOENT"){if(!c)return n(!0)}else this.warn(h,"readManifest")}},o=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!t){let c=await n();if(c)return o?.addDetails({commandCount:Object.keys(c.commands).length,fromCache:!0}),o?.stop(),this.commandIDs=Object.keys(c.commands),c}this.commandIDs=await this.getCommandIDs();let s={commands:(await Promise.all(this.commandIDs.map(async c=>{try{let h=await this.findCommand(c,{must:!0}),g=await(0,V1.cacheCommand)(h,this,i);if(g.id=c,this.flexibleTaxonomy){let d=(0,js.getCommandIdPermutations)(c),f=g.aliases.flatMap(p=>(0,js.getCommandIdPermutations)(p));return[c,{...g,aliasPermutations:f,permutations:d}]}return[c,g]}catch(h){let g=`findCommand (${c})`;if(!r)this.warn(h,g);else throw this.addErrorScope(h,g)}}))).filter(c=>!!c).reduce((c,[h,g])=>(c[h]=g,c),{}),version:this.version};return o?.addDetails({commandCount:Object.keys(s.commands).length,fromCache:!1}),o?.stop(),s}addErrorScope(t,r){return t.name=t.name??(0,_m.inspect)(t).trim(),t.detail=(0,km.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,...t.code?[`code: ${t.code}`]:[],...t.message?[`message: ${t.message}`]:[],"See more details with DEBUG=*"]).join(`
137
+ `),t}async getCommandIDs(){let t=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,G1.default)(this.commandDiscoveryOpts?.globPatterns??Mm,{cwd:t});return Q1(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Pm(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,Ms.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,su.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,Ms.load)(this,t);return this.commandCache={[Nm.SINGLE_COMMAND_CLI_SYMBOL]:Om(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};ti.Plugin=au});var Rm=E(Dt=>{"use strict";y();var t_=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),r_=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i_=Dt&&Dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&t_(t,e,r);return r_(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var n_=qp(),cu=F("node:path"),ri=Yr(),lu=yt(),s_=oe(),jm=i_(uu()),o_=Or(),Bm=(0,o_.Debug)();function gr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,n_.minimatch)(r,i)))}var hu=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,"plugin.load#root");r=new jm.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=gr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lu.readJson)((0,cu.join)(n,"package.json")),s=gr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=gr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,s_.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lu.readJson)((0,cu.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},c=gr(s??{},i);await this.loadPlugins(n,"dev",c)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);Bm("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let c=typeof s=="string"?s:s.name,h={name:c,root:t,type:r};if(typeof s!="string"&&(h.tag=s.tag||h.tag,h.root=s.root||h.root,h.url=s.url),n&&(h.parent=n),this.plugins.has(c))return;let g=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`plugin.load#${c}`),d=new jm.Plugin(h);if(await d.load(),g?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),g?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=gr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(c){this.errors.push(c)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,cu.join)(t.dataDir,"package.json");Bm("reading user plugins pjson %s",r);let i=await(0,lu.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Dt.default=hu});var Jm=E((Ue,zm)=>{"use strict";y();var a_=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),u_=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),c_=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&a_(t,e,r);return u_(t,e),t},mu=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Config=void 0;var l_=c_(yc()),h_=mu(Q0()),ii=F("node:os"),Ct=F("node:path"),Lm=F("node:url"),Hm=mu(Ve()),f_=Bi(),d_=er(),ni=$e(),p_=Mr(),m_=xi(),we=Yr(),fu=Pt(),$m=yt(),qm=_p(),Bs=oe(),g_=mu(Rm()),y_=Pr(),Hi=Or(),Ui=(0,Hi.Debug)(),Um=Hm.default.getInstance().get("@oclif/core"),du=`${Um.name}@${Um.version}`,v_=new Set(["preparse"]);function x_(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function w_(e){return e&&!!e._base}var Rs=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,Hi.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},pu=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=du;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Rs;pluginLoader;rootPlugin;topicPermutations=new Rs;constructor(t){this.options=t}static async load(t=zm.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,Lm.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),w_(t)){if(du!==t._base){Ui(`reloading config from ${t._base} to ${du}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Bs.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,ii.type)()} ${(0,ii.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,Ct.join)(this.home,t==="data"?".local/share":"."+t);return(0,Ct.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,ni.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,p_.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let c=Object.entries(s.flags).flatMap(([h,g])=>g.char?[g.char,h]:[h]);return i.every(h=>c.includes(h))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){fu.settings.performanceEnabled=(fu.settings.performanceEnabled===void 0?this.options.enablePerf:fu.settings.performanceEnabled)??!1;let t=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new g_.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=Hm.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||x_(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,ii.arch)()==="ia32"?"x86":(0,ii.arch)(),this.platform=h_.default?"wsl":(0,qm.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,qm.getHomeDir)()||(0,ii.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,Ct.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),Ui("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,Ct.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,Ct.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,$m.safeReadJson)(t):void 0,await(0,$m.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,d_.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,Ct.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);Ui("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let h=this.flexibleTaxonomy?this.findMatches(t,r):[],g=this.flexibleTaxonomy&&h.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:h}):await this.runHook("command_not_found",{argv:r,id:t});if(g.successes[0])return g.successes[0].result;throw g.failures[0]?g.failures[0].error:new ni.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let h=o.pluginName,g=this.pjson.oclif.jitPlugins[h],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:h,pluginVersion:g});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new ni.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let c=await s.run(r,this);if(o.id==="plugins:uninstall")for(let h of r)this.plugins.delete(h);return await this.runHook("postrun",{Command:s,argv:r,result:c}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),c}async runHook(t,r,i,n){let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${t}`);Ui("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),c=async(f,p)=>{let a,u=new Promise((l,m)=>{a=setTimeout(()=>{m(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,u]).then(l=>(clearTimeout(a),l))},h={failures:[],successes:[]},d=(v_.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=et()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(l,m={}){(0,ni.error)(l,m)},exit(l=0){(0,ni.exit)(l)},log(l,...m){f_.ux.info(l,...m)},warn(l){(0,ni.warn)(l)}},u=f.hooks[t]||[];for(let l of u){let m=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${l.target})`);try{let{filePath:v,isESM:x,module:w}=await(0,m_.loadWithData)(f,await(0,y_.tsPath)(f.root,l.target,f));p("start",x?"(import)":"(require)",v);let C=w[l.identifier]??(l.identifier==="default"?s(w):void 0);if(!C){p("No hook found for hook definition:",l);continue}let S=i?await c(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});h.successes.push({plugin:f,result:S}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(S),p("done")}catch(v){if(h.failures.push({error:v,plugin:f}),p(v),!n&&v.oclif?.exit!==void 0&&v.oclif?.exit!==0&&v.code!=="MODULE_NOT_FOUND")throw v}m?.addDetails({event:t,hook:l.target,plugin:f.name}),m?.stop()}});return await Promise.all(d),Ui("%s hook done",t),o?.stop(),h}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return l_.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new Lm.URL(r);return i.pathname=(0,Ct.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Bs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
138
+ `),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,Bs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
139
+ `),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,Ct.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=et()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,ii.userInfo)().shell?.split(Ct.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",c=o.pluginAlias??"B-Cannot-Find-This",h=r.indexOf(s),g=r.indexOf(c);return n.pluginType==="core"&&o.pluginType==="core"?h-g:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,Hi.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,c=!1)=>{if(this._commands.has(s)){let g=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...g,id:s})}else this._commands.set(s,{...i,hidden:c,id:s});let h=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,Hi.getCommandIdPermutations)(s):i.permutations??[s];for(let g of h)this.commandPermutations.add(g,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Bs.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,Hi.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ue.Config=pu});var Ls=E($t=>{"use strict";y();Object.defineProperty($t,"__esModule",{value:!0});$t.tsPath=$t.Plugin=$t.Config=void 0;var E_=Jm();Object.defineProperty($t,"Config",{enumerable:!0,get:function(){return E_.Config}});var b_=uu();Object.defineProperty($t,"Plugin",{enumerable:!0,get:function(){return b_.Plugin}});var D_=Pr();Object.defineProperty($t,"tsPath",{enumerable:!0,get:function(){return D_.tsPath}})});var Wm=E($s=>{"use strict";y();Object.defineProperty($s,"__esModule",{value:!0});$s.renderList=void 0;var C_=Yt(),S_=oe(),A_=ay();function __(e,t){return A_(e,C_.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function F_(e){if(e.length===0)return"";let t=(0,S_.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=__(t+2,o),`${n} ${o}`):n}).join(`
140
+ `)}$s.renderList=F_});var Du=E(Z=>{"use strict";y();var Gm=Z&&Z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Z,"__esModule",{value:!0});Z.FailedFlagValidationError=Z.ArgInvalidOptionError=Z.FlagInvalidOptionError=Z.NonExistentFlagsError=Z.UnexpectedArgsError=Z.RequiredArgsError=Z.InvalidArgsSpecError=Z.CLIParseError=Z.CLIError=void 0;var k_=Gm(Be()),zi=Gm(Ve()),Xm=Wm(),T_=$e(),O_=oe(),P_=$e();Object.defineProperty(Z,"CLIError",{enumerable:!0,get:function(){return P_.CLIError}});var lt=class extends T_.CLIError{parse;showHelp=!1;constructor(t){t.message+=`
141
+ See more help with --help`,super(t.message,{exit:t.exit}),this.parse=t.parse}};Z.CLIParseError=lt;var gu=class extends lt{args;constructor({args:t,exit:r,parse:i}){let n="Invalid argument spec",o=Object.values(t).filter(s=>s.name);if(o.length>0){let s=(0,Xm.renderList)(o.map(c=>[`${c.name} (${c.required?"required":"optional"})`,c.description]));n+=`:
142
+ ${s}`}super({exit:zi.default.getInstance().get("exitCodes")?.invalidArgsSpec??r,message:n,parse:i}),this.args=t}};Z.InvalidArgsSpecError=gu;var yu=class extends lt{args;constructor({args:t,exit:r,flagsWithMultiple:i,parse:n}){let o=`Missing ${t.length} required arg${t.length===1?"":"s"}`,s=t.filter(c=>c.name);if(s.length>0){let c=(0,Xm.renderList)(s.map(h=>{let g=h.options?`(${h.options.join("|")}) ${h.description}`:h.description;return[h.name,g]}));o+=`:
143
+ ${c}`}if(i?.length){let c=i.map(h=>`--${h}`).join(", ");o+=`
144
+
145
+ Note: ${c} allow${i.length===1?"s":""} multiple values. Because of this you need to provide all arguments before providing ${i.length===1?"that flag":"those flags"}.`,o+=`
146
+ Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:zi.default.getInstance().get("exitCodes")?.requiredArgs??r,message:o,parse:n}),this.args=t,this.showHelp=!0}};Z.RequiredArgsError=yu;var vu=class extends lt{args;constructor({args:t,exit:r,parse:i}){let n=`Unexpected argument${t.length===1?"":"s"}: ${t.join(", ")}`;super({exit:zi.default.getInstance().get("exitCodes")?.unexpectedArgs??r,message:n,parse:i}),this.args=t,this.showHelp=!0}};Z.UnexpectedArgsError=vu;var xu=class extends lt{flags;constructor({exit:t,flags:r,parse:i}){let n=`Nonexistent flag${r.length===1?"":"s"}: ${r.join(", ")}`;super({exit:zi.default.getInstance().get("exitCodes")?.nonExistentFlag??t,message:n,parse:i}),this.flags=r,this.showHelp=!0}};Z.NonExistentFlagsError=xu;var wu=class extends lt{constructor(t,r){let i=`Expected --${t.name}=${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};Z.FlagInvalidOptionError=wu;var Eu=class extends lt{constructor(t,r){let i=`Expected ${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};Z.ArgInvalidOptionError=Eu;var bu=class extends lt{constructor({exit:t,failed:r,parse:i}){let n=r.map(h=>h.reason),o=(0,O_.uniq)(n),c=`The following ${o.length===1?"error":"errors"} occurred:
147
+ ${k_.default.dim(o.join(`
148
+ `))}`;super({exit:zi.default.getInstance().get("exitCodes")?.failedFlagValidation??t,message:c,parse:i})}};Z.FailedFlagValidationError=bu});var Ym=E(ht=>{"use strict";y();var I_=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.Parser=ht.readStdin=void 0;var N_=F("node:readline"),Vm=I_(Ve()),qt=oe(),yr=Du(),Ke;try{Ke=process.env.CLI_FLAGS_DEBUG==="1"?et()("../parser"):()=>{}}catch{Ke=()=>{}}var M_=async()=>{let{stdin:e,stdout:t}=process;return e.isTTY?null:global.oclif?.stdinCache?(Ke("resolved stdin from global cache",global.oclif.stdinCache),global.oclif.stdinCache):new Promise(r=>{let i="",n=new AbortController,{signal:o}=n,s=setTimeout(()=>n.abort(),10),c=(0,N_.createInterface)({input:e,output:t,terminal:!1});c.on("line",h=>{i+=h}),c.once("close",()=>{clearTimeout(s),Ke("resolved from stdin",i),global.oclif={...global.oclif,stdinCache:i},r(i)}),o.addEventListener("abort",()=>{Ke("stdin aborted"),clearTimeout(s),c.close(),r(null)},{once:!0})})};ht.readStdin=M_;function j_(e){return/^-\d/g.test(e)}var qs=(e,t)=>{if(e.options&&!e.options.includes(t))throw new yr.FlagInvalidOptionError(e,t);return t},Cu=class{input;argv;booleanFlags;context;currentFlag;flagAliases;raw=[];constructor(t){this.input=t,this.context=t.context??{},this.argv=[...t.argv],this._setNames(),this.booleanFlags=(0,qt.pickBy)(t.flags,r=>r.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(t.flags).flatMap(r=>[...r.aliases??[],...r.charAliases??[]].map(i=>[i,r])))}async parse(){this._debugInput();let t=async f=>{let{isLong:p,name:a}=this.findFlag(f);if(!a){let l=f.indexOf("=");if(l!==-1){let m=f.slice(l+1);this.argv.unshift(m);let v=await t(f.slice(0,l));return v||this.argv.shift(),v}return!1}let u=this.input.flags[a];if(u.type==="option"){if(!u.multiple&&this.raw.some(m=>m.type==="flag"&&m.flag===a))throw new yr.CLIError(`Flag --${a} can only be specified once`);this.currentFlag=u;let l=p||f.length<3?this.argv.shift():f.slice(f[2]==="="?3:2);if(u.allowStdin==="only"&&l!=="-"&&l!==void 0&&!this.findFlag(l).name)throw new yr.CLIError(`Flag --${a} can only be read from stdin. The value must be "-" or not provided at all.`);if(u.allowStdin&&l==="-"||u.allowStdin==="only"){let m=await(0,ht.readStdin)();m&&(l=m.trim())}if(typeof l!="string"||this.findFlag(l).name)throw u.options?new yr.CLIError(`Flag --${a} expects one of these values: ${u.options.join(", ")}`):new yr.CLIError(`Flag --${a} expects a value`);this.raw.push({flag:u.name,input:l,type:"flag"})}else this.raw.push({flag:u.name,input:f,type:"flag"}),!p&&f.length>2&&this.argv.unshift(`-${f.slice(2)}`);return!0},r=!0,i=[],n=!1,o=[...this.argv];for(;this.argv.length>0;){let f=this.argv.shift();if(r&&f.startsWith("-")&&f!=="-"){if(this.input["--"]!==!1&&f==="--"){r=!1;continue}if(await t(f))continue;if(f==="--"){n=!0;continue}if(this.input["--"]!==!1&&!j_(f)){i.push(f);continue}}if(r&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:f,type:"flag"});continue}let p=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:p,input:f,type:"arg"})}let[{args:s,argv:c},{flags:h,metadata:g}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(c,s,h);let d=n?[...c,...i,"--"]:[...c,...i];return{args:s,argv:d.sort((f,p)=>o.indexOf(f)-o.indexOf(p)),flags:h,metadata:g,nonExistentFlags:i,raw:this.raw}}async _args(){let t=[],r={},i=this._argTokens,n=!1,o=this.context;for(let[s,c]of Object.entries(this.input.args)){let h=i.find(g=>g.arg===s);if(o.token=h,h){if(c.options&&!c.options.includes(h.input))throw new yr.ArgInvalidOptionError(c,h.input);let g=await c.parse(h.input,o,c);t.push(g),r[h.arg]=g}else if(!c.ignoreStdin&&!n){let g=await(0,ht.readStdin)();if(g){g=g.trim();let d=await c.parse(g,o,c);t.push(d),r[s]=d}n=!0}if(!r[s]&&(c.default||c.default===!1))if(typeof c.default=="function"){let g=await c.default();t.push(g),r[s]=g}else t.push(c.default),r[s]=c.default}for(let s of i)r[s.arg]===void 0&&t.push(s.input);return{args:r,argv:t}}get _argTokens(){return this.raw.filter(t=>t.type==="arg")}_debugInput(){Ke("input: %s",this.argv.join(" "));let t=Object.keys(this.input.args);t.length>0&&Ke("available args: %s",t.join(" ")),Object.keys(this.input.flags).length!==0&&Ke("available flags: %s",Object.keys(this.input.flags).map(r=>`--${r}`).join(" "))}_debugOutput(t,r,i){i.length>0&&Ke("argv: %o",i),Object.keys(t).length>0&&Ke("args: %o",t),Object.keys(r).length>0&&Ke("flags: %o",r)}async _flags(){let t=async(f,p,a,u)=>{if(!p.parse)return f;let l={...a,error:a?.error,exit:a?.exit,log:a?.log,logToStderr:a?.logToStderr,token:u,warn:a?.warn};try{return p.type==="boolean"?await p.parse(f,l,p):await p.parse(f,l,p)}catch(m){throw m.message=`Parsing --${p.name}
149
+ ${m.message}
150
+ See more help with --help`,Vm.default.getInstance().get("exitCodes")?.failedFlagParsing&&(m.oclif={exit:Vm.default.getInstance().get("exitCodes")?.failedFlagParsing}),m}},r=f=>{if(f.tokens?.length){if(f.inputFlag.flag.type==="boolean"&&(0,qt.last)(f.tokens)?.input)return{...f,valueFunction:async a=>t((0,qt.last)(a.tokens)?.input!==`--no-${a.inputFlag.name}`,a.inputFlag.flag,this.context,(0,qt.last)(a.tokens))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.delimiter&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>(await Promise.all((a.tokens??[]).flatMap(u=>u.input.split(a.inputFlag.flag.delimiter??",")).map(u=>u.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async u=>t(u,a.inputFlag.flag,this.context,{...(0,qt.last)(a.tokens),input:u})))).map(u=>qs(a.inputFlag.flag,u))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>Promise.all((f.tokens??[]).map(u=>t(qs(a.inputFlag.flag,u.input),a.inputFlag.flag,this.context,u)))};if(f.inputFlag.flag.type==="option")return{...f,valueFunction:async a=>t(qs(a.inputFlag.flag,(0,qt.last)(f.tokens)?.input),a.inputFlag.flag,this.context,(0,qt.last)(f.tokens))}}if(f.inputFlag.flag.env&&process.env[f.inputFlag.flag.env]){let a=process.env[f.inputFlag.flag.env];if(f.inputFlag.flag.type==="option"&&a)return{...f,valueFunction:async u=>t(qs(u.inputFlag.flag,a),u.inputFlag.flag,this.context)};if(f.inputFlag.flag.type==="boolean")return{...f,valueFunction:async u=>(0,qt.isTruthy)(process.env[u.inputFlag.flag.env]??"false")}}return typeof f.inputFlag.flag.default!==void 0?{...f,metadata:{setFromDefault:!0},valueFunction:typeof f.inputFlag.flag.default=="function"?(a,u={})=>f.inputFlag.flag.default({flags:u,options:a.inputFlag.flag}):async()=>f.inputFlag.flag.default}:f},i=f=>f.inputFlag.flag.type==="option"&&f.inputFlag.flag.defaultHelp?{...f,helpFunction:typeof f.inputFlag.flag.defaultHelp=="function"?(p,a,...u)=>p.inputFlag.flag.defaultHelp({flags:a,options:p.inputFlag},...u):p=>p.inputFlag.flag.defaultHelp}:f,n=async f=>{let p=o(g.filter(a=>!a.metadata?.setFromDefault));return Promise.all(f.map(async a=>{try{if(a.helpFunction)return{...a,metadata:{...a.metadata,defaultHelp:await a.helpFunction?.(a,p,this.context)}}}catch{}return a}))},o=f=>Object.fromEntries(f.filter(p=>p.value!==void 0).map(p=>[p.inputFlag.name,p.value])),s=this.mapAndValidateFlags(),c=await Promise.all(Object.entries(this.input.flags).filter(([f,p])=>p.type==="boolean"||p.env||p.default!==void 0||"defaultHelp"in p||s.has(f)).map(([f,p])=>({inputFlag:{flag:p,name:f},tokens:s.get(f)})).map(f=>r(f)).filter(f=>f.valueFunction!==void 0).map(f=>i(f)).map(async f=>f.metadata?.setFromDefault?f:{...f,value:await f.valueFunction?.(f)})),h=o(c.filter(f=>!f.metadata?.setFromDefault)),g=await Promise.all(c.map(async f=>f.metadata?.setFromDefault?{...f,value:await f.valueFunction?.(f,h)}:f)),d=g.some(f=>typeof f.helpFunction=="function")?await n(g):g;return{flags:o(d),metadata:{flags:Object.fromEntries(d.filter(f=>f.metadata).map(f=>[f.inputFlag.name,f.metadata]))}}}_setNames(){for(let t of Object.keys(this.input.flags))this.input.flags[t].name=t;for(let t of Object.keys(this.input.args))this.input.args[t].name=t}findFlag(t){let r=t.startsWith("--"),i=r?!1:t.startsWith("-"),n=r?this.findLongFlag(t):i?this.findShortFlag(t):void 0;return{isLong:r,name:n}}findLongFlag(t){let r=t.slice(2);if(this.input.flags[r])return r;if(this.flagAliases[r])return this.flagAliases[r].name;if(t.startsWith("--no-")){let i=this.booleanFlags[t.slice(5)];if(i&&i.allowNo)return i.name}}findShortFlag([t,r]){return this.flagAliases[r]?this.flagAliases[r].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===r&&r!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let t=new Map;for(let r of this.raw.filter(i=>i.type==="flag")){if(!(r.flag in this.input.flags))throw new yr.CLIError(`Unexpected flag ${r.flag}`);let i=t.get(r.flag)??[];t.set(r.flag,[...i,r])}return t}};ht.Parser=Cu});var Km=E(Us=>{"use strict";y();Object.defineProperty(Us,"__esModule",{value:!0});Us.validate=void 0;var B_=oe(),Ji=Du();async function R_(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new Ji.NonExistentFlagsError({flags:e.output.nonExistentFlags,parse:e});let p=Object.keys(e.input.args).length;if(e.input.strict&&e.output.argv.length>p){let l=e.output.argv.slice(p);throw new Ji.UnexpectedArgsError({args:l,parse:e})}let a=[],u=!1;for(let[l,m]of Object.entries(e.input.args)){if(!m.required)u=!0;else if(u)throw new Ji.InvalidArgsSpecError({args:e.input.args,parse:e});m.required&&e.output.args[l]===void 0&&a.push(m)}if(a.length>0){let l=Object.entries(e.input.flags).filter(([m,v])=>v.type==="option"&&!!v.multiple).map(([m])=>m);throw new Ji.RequiredArgsError({args:a,flagsWithMultiple:l,parse:e})}}async function i(){let p=Object.entries(e.input.flags).flatMap(([l,m])=>e.output.flags[l]!==void 0?[...m.relationships?f(l,m):[],...m.dependsOn?[g(l,m.dependsOn)]:[],...m.exclusive?[c(l,m.exclusive)]:[],...m.exactlyOne?[h(l,m.exactlyOne)]:[]]:m.required?[{name:l,reason:`Missing required flag ${l}`,status:"failed",validationFn:"required"}]:m.exactlyOne&&m.exactlyOne.length>0?[s(m)]:[]),u=(await Promise.all(p)).filter(l=>l.status==="failed");if(u.length>0)throw new Ji.FailedFlagValidationError({failed:u,parse:e})}async function n(p){if(t)return t;let a=p.map(async l=>typeof l=="string"?[l,e.output.flags[l]]:await l.when(e.output.flags)?[l.name,e.output.flags[l.name]]:null),u=await Promise.all(a);return t=Object.fromEntries(u.filter(l=>l!==null)),t}let o=p=>Object.keys(p).filter(a=>a!==void 0);function s(p){let a={name:p.name,validationFn:"validateAcrossFlags"};if(Object.entries(e.input.flags).map(l=>l[0]).filter(l=>e.output.flags[l]!==void 0).filter(l=>p.exactlyOne&&p.exactlyOne.includes(l)).length===0){let m=`Exactly one of the following must be provided: ${(0,B_.uniq)(p.exactlyOne?.map(v=>`--${v}`)??[]).join(", ")}`;return{...a,reason:m,status:"failed"}}return{...a,status:"success"}}async function c(p,a){let u={name:p,validationFn:"validateExclusive"},l=await n(a),m=o(l);for(let v of m)if(!(e.output.metadata.flags&&e.output.metadata.flags[v]?.setFromDefault)&&!(e.output.metadata.flags&&e.output.metadata.flags[p]?.setFromDefault)&&e.output.flags[v]!==void 0){let x=e.output.metadata.flags?.[v]?.defaultHelp??e.output.flags[v];return{...u,reason:`--${v}=${x} cannot also be provided when using --${p}`,status:"failed"}}return{...u,status:"success"}}async function h(p,a){let u={name:p,validationFn:"validateExactlyOne"},l=await n(a),m=o(l);for(let v of m)if(v!==p&&e.output.flags[v]!==void 0)return{...u,reason:`--${v} cannot also be provided when using --${p}`,status:"failed"};return{...u,status:"success"}}async function g(p,a){let u={name:p,validationFn:"validateDependsOn"},l=await n(a);if(!Object.values(l).every(v=>v!==void 0)){let v=Object.keys(l).map(x=>`--${x}`).join(", ");return{...u,reason:`All of the following must be provided when using --${p}: ${v}`,status:"failed"}}return{...u,status:"success"}}async function d(p,a){let u={name:p,validationFn:"validateSome"},l=await n(a);if(!Object.values(l).some(Boolean)){let v=Object.keys(l).map(x=>`--${x}`).join(", ");return{...u,reason:`One of the following must be provided when using --${p}: ${v}`,status:"failed"}}return{...u,status:"success"}}function f(p,a){return(a.relationships??[]).map(u=>{switch(u.type){case"all":return g(p,u.flags);case"some":return d(p,u.flags);case"none":return c(p,u.flags);default:throw new Error(`Unknown relationship type: ${u.type}`)}})}return r(),i()}Us.validate=R_});var Zm=E(Ut=>{"use strict";y();var L_=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.flagUsages=Ut.flagUsage=void 0;var $_=L_(Be()),q_=oe();function Qm(e,t={}){let r=[];e.helpLabel?r.push(e.helpLabel):(e.char&&r.push(`-${e.char}`),e.name&&r.push(` --${e.name}`));let i=e.type==="option"?` ${e.name.toUpperCase()}`:"",n=e.summary||e.description||"";return t.displayRequired&&e.required&&(n=`(required) ${n}`),n=n?$_.default.dim(n):void 0,[` ${r.join(",").trim()}${i}`,n]}Ut.flagUsage=Qm;function U_(e,t={}){return e.length===0?[]:(0,q_.sortBy)(e,r=>[r.char?-1:1,r.char,r.name]).map(r=>Qm(r,t))}Ut.flagUsages=U_});var Su=E(si=>{"use strict";y();Object.defineProperty(si,"__esModule",{value:!0});si.parse=si.flagUsages=void 0;var H_=Ym(),z_=Km(),J_=Zm();Object.defineProperty(si,"flagUsages",{enumerable:!0,get:function(){return J_.flagUsages}});async function W_(e,t){let r={"--":t["--"],args:t.args??{},argv:e,context:t.context,flags:t.flags??{},strict:t.strict!==!1},n=await new H_.Parser(r).parse();return await(0,z_.validate)({input:r,output:n}),n}si.parse=W_});var og=E(He=>{"use strict";y();var G_=He&&He.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),X_=He&&He.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ig=He&&He.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&G_(t,e,r);return X_(t,e),t},ng=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(He,"__esModule",{value:!0});He.Command=void 0;var V_=ng(Be()),Y_=F("node:url"),eg=F("node:util"),sg=ng(Ve()),Hs=Bi(),K_=Ls(),oi=ig($e()),Wi=Mr(),Q_=ig(Su()),tg=ru(),Au=Nr(),Z_=oe(),rg=sg.default.getInstance().get("@oclif/core");process.stdout.on("error",e=>{if(!(e&&e.code==="EPIPE"))throw e});var _u=class{argv;config;static aliases=[];static args={};static baseFlags;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;static _base=`${rg.name}@${rg.version}`;constructor(t,r){this.argv=t,this.config=r,this.id=this.ctor.id;try{this.debug=et()(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(t,r){t||(t=process.argv.slice(2)),typeof r=="string"&&r.startsWith("file://")&&(r=(0,Y_.fileURLToPath)(r));let i=await K_.Config.load(r||F.main?.filename||__dirname),n=new this(t,i);if(!n.id){let o=n.constructor.name.toLowerCase();n.id=o,n.ctor.id=o}return n._run()}get ctor(){return this.constructor}async catch(t){if(process.exitCode=process.exitCode??t.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(t));else{if(!t.message)throw t;try{Hs.ux.action.stop(V_.default.bold.red("!"))}catch{}throw t}}error(t,r={}){return oi.error(t,r)}exit(t=0){oi.exit(t)}async finally(t){try{let{config:r}=oi;r.errorLogger&&await r.errorLogger.flush()}catch(r){console.error(r)}}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv),this.config.debug&&(oi.config.debug=!0),this.config.errlog&&(oi.config.errlog=this.config.errlog);let t=global;t["http-call"]=t["http-call"]||{},t["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let t=this.argv.indexOf("--"),r=this.argv.indexOf("--json");return t===-1?r>-1:r>-1&&r<t}log(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,eg.inspect)(t),Hs.ux.info(t,...r))}logJson(t){Hs.ux.styledJSON(t)}logToStderr(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,eg.inspect)(t),Hs.ux.logToStderr(t,...r))}async parse(t,r=this.argv){t||(t=this.ctor);let i={context:this,...t,flags:(0,tg.aggregateFlags)(t.flags,t.baseFlags,t.enableJsonFlag)},n=await this.config.runHook("preparse",{argv:[...r],options:i}),o=n.successes?.length?n.successes.find(c=>c.plugin.root===sg.default.getInstance().get("rootPlugin")?.root)?.result??r:r;this.argv=[...o];let s=await Q_.parse(o,i);return this.warnIfFlagDeprecated(s.flags??{}),s}toErrorJson(t){return{error:t}}toSuccessJson(t){return t}warn(t){return this.jsonEnabled()||oi.warn(t),t}warnIfCommandDeprecated(){let[t]=(0,Wi.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(t)){let r=(0,Au.toConfiguredId)(this.ctor.id,this.config),i=(0,Au.toConfiguredId)(t,this.config);this.warn((0,Wi.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,Au.toConfiguredId)(this.ctor.id,this.config);this.warn((0,Wi.formatCommandDeprecationWarning)(r,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(t){let r=(0,tg.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(t)){let n=r[i],o=n?.deprecated;if(o&&this.warn((0,Wi.formatFlagDeprecationWarning)(i,o)),n?.deprecateAliases){let c=(0,Z_.uniq)([...n?.aliases??[],...n?.charAliases??[]]).map(g=>g.length===1?`-${g}`:`--${g}`);if(c.length===0)return;let h=c.filter(g=>this.argv.some(d=>d.startsWith(g)));for(let g of h){let d=`--${n?.name}`;n?.char&&(d+=` | -${n?.char}`),this.warn((0,Wi.formatFlagDeprecationWarning)(g,{to:d}))}}}}async _run(){let t,r;try{this.removeEnvVar("REDIRECTED"),await this.init(),r=await this.run()}catch(i){t=i,await this.catch(i)}finally{await this.finally(t)}return r&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(r)),r}removeEnvVar(t){let r=[];try{r.push(...this.config.scopedEnvVarKeys(t))}catch{r.push(this.config.scopedEnvVarKey(t))}r.map(i=>delete process.env[i])}};He.Command=_u});var Tu=E(ze=>{"use strict";y();var eF=ze&&ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.run=ze.versionAddition=ze.helpAddition=void 0;var ag=F("node:url"),tF=eF(Ve()),rF=Bi(),iF=Ls(),ku=Ci(),ai=Yr(),nF=_n(),Fu=et()("oclif:main"),sF=(e,t)=>{if(e.length===0&&!t.isSingleCommandCLI)return!0;let r=(0,ku.getHelpFlagAdditions)(t);for(let i of e){if(r.includes(i))return!0;if(i==="--")return!1}return!1};ze.helpAddition=sF;var oF=(e,t)=>{let r=t?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...r]).values()].includes(e[0])};ze.versionAddition=oF;async function aF(e,t){let r=ai.Performance.mark(ai.OCLIF_MARKER_OWNER,"main.run"),i=ai.Performance.mark(ai.OCLIF_MARKER_OWNER,"main.run#init"),n=async()=>{r?.stop(),i?.stopped||i?.stop(),await ai.Performance.collect(),ai.Performance.debug()},o=async d=>{let f=await(0,ku.loadHelpClass)(s);await new f(s,s.pjson.oclif.helpOptions??s.pjson.helpOptions).showHelp(d)};Fu(`process.execPath: ${process.execPath}`),Fu(`process.execArgv: ${process.execArgv}`),Fu("process.argv: %O",process.argv),e=e??process.argv.slice(2),t&&(typeof t=="string"&&t.startsWith("file://")||t instanceof ag.URL)&&(t=(0,ag.fileURLToPath)(t));let s=await iF.Config.load(t??F.main?.filename??__dirname);tF.default.getInstance().set("config",s),s.isSingleCommandCLI&&(e=[nF.SINGLE_COMMAND_CLI_SYMBOL,...e]);let[c,...h]=(0,ku.normalizeArgv)(s,e);if(await s.runHook("init",{argv:h,id:c}),(0,ze.versionAddition)(e,s)){rF.ux.log(s.userAgent),await n();return}if((0,ze.helpAddition)(e,s)){await o(e),await n();return}let g=s.findCommand(c);if(!g&&(s.flexibleTaxonomy?null:s.findTopic(c))){await o([c]),await n();return}i?.stop();try{return await s.runCommand(c,h,g)}finally{await n()}}ze.run=aF});var ug=E(zs=>{"use strict";y();Object.defineProperty(zs,"__esModule",{value:!0});zs.execute=void 0;var uF=Hn(),cF=$e(),lF=jn(),hF=Tu(),fF=Pt();async function dF(e){if(!e.dir&&!e.loadOptions)throw new cF.CLIError("dir or loadOptions is required.");return e.development&&(process.env.NODE_ENV="development",fF.settings.debug=!0),(0,hF.run)(e.args??process.argv.slice(2),e.loadOptions??e.dir).then(async t=>((0,uF.flush)(),t)).catch(async t=>(0,lF.handle)(t))}zs.execute=dF});var lg=E(cg=>{"use strict";y();Object.defineProperty(cg,"__esModule",{value:!0})});var Ws=E(O=>{"use strict";y();var pF=O&&O.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),mF=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vr=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&pF(t,e,r);return mF(t,e),t},gF=O&&O.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O,"__esModule",{value:!0});O.toStandardizedId=O.toConfiguredId=O.settings=O.Performance=O.Parser=O.ModuleLoader=O.run=O.Interfaces=O.loadHelpClass=O.HelpBase=O.Help=O.CommandHelp=O.Flags=O.execute=O.handle=O.Errors=O.Plugin=O.Config=O.Command=O.stdout=O.stderr=O.flush=O.ux=O.Args=void 0;var yF=gF(Ot());function vF(){try{process.cwd()}catch(e){e.code==="ENOENT"&&yF.default.stderr(`WARNING: current directory does not exist
151
+ `)}}vF();O.Args=vr(Wc());O.ux=vr(Bi());var xF=Hn();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return xF.flush}});var hg=Sp();Object.defineProperty(O,"stderr",{enumerable:!0,get:function(){return hg.stderr}});Object.defineProperty(O,"stdout",{enumerable:!0,get:function(){return hg.stdout}});var wF=og();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return wF.Command}});var fg=Ls();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return fg.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return fg.Plugin}});O.Errors=vr($e());var EF=jn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return EF.handle}});var bF=ug();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return bF.execute}});O.Flags=vr(ss());var Js=Ci();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return Js.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return Js.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return Js.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return Js.loadHelpClass}});O.Interfaces=vr(lg());var DF=Tu();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return DF.run}});O.ModuleLoader=vr(xi());O.Parser=vr(Su());var CF=Yr();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return CF.Performance}});var SF=Pt();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return SF.settings}});var dg=Nr();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return dg.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return dg.toStandardizedId}})});y();import{createRequire as hy}from"node:module";import{pathToFileURL as $c}from"node:url";var qc=hy(import.meta.url);async function Uc(e){let t=qc.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]}),r=await kc(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=M(le(r.path),i);return import($c(n).href)}function fy(e,t){let r=qc.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import($c(r).href)}y();var c0=rn(Ws(),1);y();var ee=rn(Ws(),1);y();y();y();import{fileURLToPath as pg}from"node:url";import{existsSync as FF}from"node:fs";y();import{exec as AF}from"node:child_process";import{promisify as _F}from"node:util";var Qe=_F(AF);function BN(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Pu=new URL("../../..",import.meta.url).pathname,Gi=(()=>{try{let e=M(le(Pu),"templates","skeleton");return FF(e)}catch{return!1}})(),WN=Gi?Pu:void 0,kF="assets/hydrogen",TF="starter",Ht="routes",Ou;async function OF(){if(Ou??=await pc("package.json",{cwd:pg(import.meta.url),type:"file"}),!Ou)throw new I("Could not find assets directory","Please report this error.");return Ou}async function Ze(e,...t){return M(le(await OF()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${kF}`,e??"",...t)}async function Xi(e,t){t??=await Iu();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?pg(r):r.toString()}function Iu(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Gs():Ze(TF)}function Gs(){if(!Gi)throw new I("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return M(le(Pu),"templates","skeleton")}function PF(){return M(Gs(),"node_modules")}async function mg(){if(Gi)return PF();let{stdout:e}=await Qe("npm root");return e.trim()}var Nu=["tailwind","vanilla-extract","css-modules","postcss"];async function gg(e,t,r,i=(n,o)=>n){let n=await Ze(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let c=await X(M(n,o));await V(M(r,s),i(c,o))}))}async function yg(e,t,r){let i=Object.values(e).map(o=>U(M(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await rt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as IF}from"node:fs/promises";y();ly();import*as vg from"fs/promises";import*as xg from"path";var Mu={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function ft(e=process.cwd()){let t=(await vg.lstat(e)).isFile()?e:xg.resolve(e,"prettier.file");try{return await Bc(t)||Mu}catch{return Mu}}async function zt(e,t=Mu,r=""){let i=nn(r);return Rc(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function ui(e,t,r){let i=await r(await X(e));if(typeof i=="string")return t&&(i=await zt(i,t,e)),V(e,i)}var NF=["tsx","ts","jsx","js","mjs","cjs"];async function be(e,t,r=NF){let i=await IF(e);if(i.includes(t)){let n=J(e,t);if(!await an(n))return{filepath:n};for(let o of["ts","js"]){let s=J(e,`${t}/index.${o}`);if(await U(J(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:J(e,o),extension:n,astType:s}}}return{}}var wg=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Xs(e,t,r){let i=await ho(M(t,"package.json")),n=await ho(M(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(h=>!wg.includes(h));for(let h of s){if(o.has(h))continue;let g=n[h],d=i[h],f=Array.isArray(g)&&Array.isArray(d)?[...d,...g]:typeof g=="object"&&typeof d=="object"?{...d,...g}:g;i[h]=f}let c=Object.entries(i.dependencies||{}).find(([h])=>h.startsWith("@remix-run/"))?.[1];for(let h of wg)o.has(h)||n[h]&&(i[h]=[...new Set([...Object.keys(i[h]??{}),...Object.keys(n[h]??{})])].sort().reduce((g,d)=>{let f=n[h]?.[d]??i[h]?.[d];return d.startsWith("@remix-run/")&&c&&(f=c),g[d]=f,g},{}));await Tc(t,r?.onResult?.(i)??i)}y();y();async function Vi(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Eg(e,t,r){let{filepath:i,astType:n}=await be(e,"root");if(!i||!n)throw new I(`Could not find root file in ${e}`);await ui(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let h=(await Vi(n)).parse(o).root(),g=h.findAll({rule:{kind:"import_statement"}}).reverse(),d=g.find(l=>l.text().includes(".css"))||g.shift(),f=h.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!d||!f)throw new I('Could not find a "links" export in root file. Please add one and try again.');let p=d.text(),a=f.text(),u=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(p,p+`
152
+ `+s).replace(a,u+`
153
+ `+a)})}async function Vs(e,t,r,i){let{filepath:n,astType:o}=await be(e,"vite.config");if(!n||!o)throw new I(`Could not find vite.config file in ${e}`);await ui(n,t,async s=>{let c=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let g=(await Vi(o)).parse(s).root(),d=g.findAll({rule:{kind:"import_statement"}}).pop(),f=g.find(MF);if(!d||!f)throw new I('Could not find a "plugins" key in Vite config file. Please add one and try again.');let p=d.text(),a=f.text(),u=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(p,p+`
154
+ `+c).replace(a,a.replace("[",`[${u},`))})}var MF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var bg="styles/tailwind.css";async function Dg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":M(i,bg)};if(!await yg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Xs(await Ze("tailwind"),e),gg("tailwind",n,e),ft(e).then(s=>Promise.all([Eg(t,s,{name:"tailwindCss",path:`${bg}?url`,isDefault:!0}),Vs(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Cg({rootDirectory:e}){return{workPromise:Promise.all([Xs(await Ze("vanilla-extract"),e),ft(e).then(r=>Vs(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var ju=[...Nu,"none"],Bu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},RM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Sg(e,t,r){switch(e){case"tailwind":return Dg(t,r);case"vanilla-extract":return Cg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Ag(e){let t=Object.entries({...Bu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-EMYAITFM.js");return i(e,t,r)}y();var _g={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},jF=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(_g)]);function BF(e,t=!1){let r={compilerOptions:{..._g}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of jF)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function Ru(e,t=!0){let r=M(e,"app/routes.ts");if(await U(r)){let s=(await X(r)).replace("./layout.tsx","./layout.jsx");await V(r,s)}let i=await dc("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await ft();for(let o of i){if(o.endsWith(".d.ts")){t||await on(o);continue}let s=await X(o),c=await zt(await Jt(s,o,t),n);await on(o),await V(o.replace(/\.ts(x?)$/,".js$1"),c)}try{let o=M(e,"remix.config.js"),s=await X(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await V(o,s)}catch(o){me(`Could not change TS extensions in remix.config.js:
155
+ `+o.stack)}try{let o=M(e,"tsconfig.json"),s=await X(o),c=BF(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await on(o),await V(M(e,"jsconfig.json"),JSON.stringify(c,null,2))}catch(o){me(`Could not transpile tsconfig.json:
156
+ `+o.stack)}try{let o=JSON.parse(await X(M(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[c,h]of Object.entries(o.scripts||{}))typeof h=="string"&&h.includes("react-router typegen")&&(o.scripts[c]=h.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let h of Object.keys(o.devDependencies))h.startsWith("@types/")&&delete o.devDependencies[h];let c=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(c,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(c,""))}await V(M(e,"package.json"),JSON.stringify(o,null,2))}catch(o){me(`Could not remove TS dependencies from package.json:
157
+ `+o.stack)}try{let{filepath:o=M(e,".eslintrc.cjs")}=await be(e,".eslintrc",["cjs","js"]),s=await X(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await V(o,await zt(s,n))}catch(o){me(`Could not remove TS rules from .eslintrc:
158
+ `+o.stack)}}async function Fg({rootDirectory:e,contextCreate:t=M("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await LF({rootDirectory:e,contextCreate:t}),c=await X(i),h=await RF({rootDirectory:e,contextCreate:t},r,i);await ui(o,r,async g=>{let f=(await Vi(s)).parse(g).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",u=c.match(/^(export )?function (\w+)/m)?.[2];if(!u)throw new Error("Could not find the i18n function name");let l=`${u}(${a})`,m="@shopify/hydrogen",v="createHydrogenContext",x=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${m}$`}},has:{kind:"identifier",regex:`^${v}`}}}),[w,C]=x?.text().split(/\s+as\s+/)||[];if(w=C??w,!w)throw new I(`Could not find a Hydrogen import in ${t}`,`Please import "${v}" from "${m}"`);let S=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:w}}}}});if(!S)throw new I(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${w}({...})`);let P=S.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(P){if(P.text().includes(u))throw new I("An i18n strategy is already set up.",`Remove the existing i18n property in the ${w}({...}) call to set up a new one.`);let{start:G,end:pe}=P.range();g=g.slice(0,G.index)+l+g.slice(pe.index)}else{let{end:G}=S.range(),pe=g.slice(0,G.index-1);g=pe+((/,\s*$/.test(pe)?"":",")+`i18n: ${l}`)+g.slice(G.index-1)}let L=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},z=M("~",kt(M(e,"app"),h.slice(0,-nn(h).length)));return g=g.slice(0,L.end.index)+`import {getLocaleFromRequest} from "${z}";`+g.slice(L.end.index),g})}async function RF({rootDirectory:e,contextCreate:t=M("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=M(e,le(t),n?"i18n.js":"i18n.ts");if(await U(o))throw new I(`${o} already exist. Renamed or remove the existing file before continue.`);return await br(i,o),await ui(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await Jt(s,i)),s)),o}async function LF({rootDirectory:e,contextCreate:t=M("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:J(e,t),astType:r}:await be(e,M(t));if(!i||!n)throw new I(`Could not find a context create file at ${J(e,t)}`);return{filepath:i,astType:n}}var $F=["subfolders","domains","subdomains"],Lu={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},$u=[...$F,"none"];async function kg(e,t){let r=await Ze("i18n",`${e}.ts`);if(!await U(r))throw new Error("Unknown strategy");let i=await ft(t.rootDirectory);await Fg(t,i,r)}async function Tg(e){let t=Object.entries({...Lu,...e?.extraChoices});return tt({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var qF=3e3,UF=9229,Yi={path:{path:ee.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:ee.Flags.integer({description:`The port to run the server on. Defaults to ${qF}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:ee.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:ee.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>un(e)})},installDeps:{"install-deps":ee.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:ee.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":ee.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":ee.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:ee.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:ee.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":ee.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:ee.Flags.string({description:`Sets the styling strategy to use. One of ${ju.map(e=>`\`${e}\``).join(", ")}.`,choices:ju,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:ee.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${$u.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:$u,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:ee.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:ee.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":ee.Flags.integer({description:`The port where the inspector is available. Defaults to ${UF}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:ee.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":ee.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":ee.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":ee.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:ee.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function qu(e){return Object.entries(e).reduce((t,[r,i])=>(t[lc(r)]=i,t),{})}function Dj(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let c=o.replace(/^\-{1,2}/,""),h=!s||s.startsWith("-")?!0:s;h===!0&&c.startsWith("no-")&&(h=!1,c=c.replace("no-","")),i[t[c]||c]=h}}return qu(i)}function Cj(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();async function Je(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await Cc({query:e,api:i,url:n,token:t.token,variables:r})}catch(o){let s=o.errors;throw s?.some?.(c=>c.message.includes("app is not installed"))?new I("Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"):s?.some?.(c=>c.message.includes("Access denied for hydrogenStorefrontCreate field"))?new I("Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]):o}}y();var HF=/gid:\/\/shopify\/\w*\/(\d+)/;function Og(e){let t=HF.exec(e);if(t&&t[1]!==void 0)return t[1];throw new I(`Invalid Global ID: ${e}`)}var zF=`#graphql
159
+ query LinkStorefront {
160
+ hydrogenStorefronts {
161
+ id
162
+ title
163
+ productionUrl
164
+ }
165
+ }
166
+ `;async function Ys(e){let{hydrogenStorefronts:t}=await Je(zF,e);return t.map(r=>({...r,parsedId:Og(r.id)}))}y();var xr=".shopify",ci="project.json";async function Pg(e){let t=J(e,xr,ci);await U(t)&&await V(t,JSON.stringify({}))}async function li(e){let t=J(e,xr,ci);return await U(t)?JSON.parse(await X(t)):{}}async function Ig(e,{shop:t,shopName:r,email:i}){let n=J(e,xr,ci),o={};await U(n)?o=JSON.parse(await X(n)):await sn(le(n));let s={...o,shop:t,shopName:r,email:i};return await V(n,JSON.stringify(s)),await Ks(e),s}async function Ng(e,{id:t,title:r}){try{let i=J(e,xr,ci),o={...JSON.parse(await X(i)),storefront:{id:t,title:r}};return await V(i,JSON.stringify(o)),await Ks(e),o}catch{throw new I("Project configuration could not be found.")}}async function qj(e){try{let t=J(e,xr,ci),i={...JSON.parse(await X(t)),storefront:void 0};return await V(t,JSON.stringify(i)),await Ks(e),i}catch{throw new I("Project configuration could not be found.")}}async function Ks(e){try{let t=J(e,".gitignore"),r=await U(t)?await X(t):"";return r.includes(".shopify")?!1:(r.length>0&&(r+=`
167
+ `),r+=`${xr}\r
168
+ `,await V(t,r),!0)}catch{return!1}}async function Mg(e,t){try{let r=J(e,xr,ci),i=JSON.parse(await X(r)),n={...i,storefront:{...i.storefront,customerAccountConfig:t}};return await V(r,JSON.stringify(n)),await Ks(e),n}catch{throw new I("Project configuration could not be found.")}}y();var JF=`#graphql
169
+ mutation CreateStorefront($title: String!) {
170
+ hydrogenStorefrontCreate(title: $title) {
171
+ hydrogenStorefront {
172
+ id
173
+ title
174
+ productionUrl
175
+ }
176
+ userErrors {
177
+ code
178
+ field
179
+ message
180
+ }
181
+ jobId
182
+ }
183
+ }
184
+ `;async function jg(e,t){let{hydrogenStorefrontCreate:{hydrogenStorefront:r,userErrors:i,jobId:n}}=await Je(JF,e,{title:t});if(!r||!n||i.length>0){let o=i.map(({message:s})=>s).join(", ");throw new I("Could not create storefront. "+o)}return{jobId:n,storefront:r}}y();var WF=`#graphql
185
+ query FetchJob($id: ID!) {
186
+ hydrogenStorefrontJob(id: $id) {
187
+ id
188
+ done
189
+ errors {
190
+ code
191
+ message
192
+ }
193
+ }
194
+ }
195
+ `;async function GF(e,t){let{hydrogenStorefrontJob:r}=await Je(WF,e,{id:t});return r}function Bg(e,t){return new Promise((r,i)=>{let n=setInterval(async()=>{let o=await GF(e,t);if(o.errors.length>0)return clearInterval(n),i();if(o.done)return clearInterval(n),r()},500)})}y();function Qs(e=""){return e.replace(/[\W_]+/g," ").split(" ").filter(t=>t.length>0).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}y();import Hu from"node:os";var ke="h2",zu=()=>Hu.platform()==="win32",qg=()=>!!process.env.MINGW_PREFIX;function Ju(e){return e[0]==="~"?M(Hu.homedir(),e.slice(1)):e}function XF(e){try{return U(Ju(e))}catch{return!1}}async function VF(e){try{return await Qe(`which ${e}`),!0}catch{return!1}}function Ug(e){return e==="bash"?"~/.bashrc":e==="zsh"?"~/.zshrc":`~/.config/fish/functions/${ke}.fish`}async function Hg(e,t){let r=Ug(t);try{return t==="fish"?await XF(r):!!(await Qe(`grep 'alias ${e}' ${Ju(r)}`)).stdout}catch{return!1}}async function YF(e,t,r=!1){let i=Ug(e);t=`"${t}"`,t=t.replaceAll(`
196
+ `,"\\n"),zu()||(t=t.replaceAll("$","\\$"));try{return await Qe(`printf ${t} ${r?">>":">"} ${Ju(i)}`),!0}catch(n){return me(`Could not create or modify ${i}:
197
+ `+n.stack),!1}}async function Uu(e,t,r){return await VF(e)?await Hg(t,e)?!0:await YF(e,r,e!=="fish"):!1}async function Rg(e,t){try{return await Qe(e,{shell:t}),!0}catch(r){return me(`Could not run shell script for ${t}:
198
+ `+r.stack),!1}}function KF(e){return["zsh","bash","fish"].includes(e)}async function QF(){try{if(zu()&&!qg())await Qe(`Get-Alias -Name ${ke}`);else{let e=Hu.userInfo().shell?.split("/").pop()??"bash";return KF(e)?await Hg(ke,e):!1}return!0}catch{return!1}}async function zg(){return zu()&&!qg()?await rk():await ek()}var Lg=`
199
+ # Shopify Hydrogen alias to local projects
200
+ alias ${ke}='$(npm prefix -s)/node_modules/.bin/shopify hydrogen'
201
+ `,ZF=`
202
+ function ${ke} --wraps='shopify hydrogen' --description 'Shortcut for the Hydrogen CLI'
203
+ set npmPrefix (npm prefix -s)
204
+ $npmPrefix/node_modules/.bin/shopify hydrogen $argv
205
+ end
206
+ `;async function ek(){let e=[];return await Uu("zsh",ke,Lg)&&e.push("zsh"),await Uu("bash",ke,Lg)&&e.push("bash"),await Uu("fish",ke,ZF)&&e.push("fish"),e}var tk=`function Invoke-Local-H2 {$npmPrefix = npm prefix -s; Invoke-Expression "$npmPrefix\\node_modules\\.bin\\shopify.ps1 hydrogen $Args"}; Set-Alias -Name ${ke} -Value Invoke-Local-H2`,$g=`
207
+ if (!(Test-Path -Path $PROFILE)) {
208
+ New-Item -ItemType File -Path $PROFILE -Force
209
+ }
210
+
211
+ $profileContent = Get-Content -Path $PROFILE
212
+ if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
213
+ Add-Content -Path $PROFILE -Value '${tk}'
214
+ }
215
+ `;async function rk(){let e=[];return await Rg($g,"powershell.exe")&&e.push("PowerShell"),await Rg($g,"pwsh.exe")&&e.push("PowerShell 7+"),e}async function Zs(e=process.cwd(),t){if(await QF())return ke;let r="npx",i=t??await _c(e).catch(()=>null);return(i==="bun"||i==="pnpm"||i==="yarn")&&(r=i),`${r} shopify hydrogen`}y();y();var ik=`#graphql
216
+ query currentUserAccount {
217
+ currentUserAccount {
218
+ email
219
+ organizations(first: 100) {
220
+ edges {
221
+ node {
222
+ id
223
+ name
224
+ categories(handles: STORES) {
225
+ destinations(first: 100) {
226
+ edges {
227
+ node {
228
+ ...destinationFields
229
+ }
230
+ }
231
+ pageInfo {
232
+ endCursor
233
+ hasNextPage
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ pageInfo {
240
+ endCursor
241
+ hasNextPage
242
+ }
243
+ }
244
+ orphanDestinations {
245
+ categories(handles: STORES) {
246
+ destinations(first: 100) {
247
+ edges {
248
+ node {
249
+ ...destinationFields
250
+ }
251
+ }
252
+ pageInfo {
253
+ endCursor
254
+ hasNextPage
255
+ }
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+
262
+ fragment destinationFields on Destination {
263
+ name
264
+ status
265
+ webUrl
266
+ }
267
+ `;async function Jg(e){let{currentUserAccount:t}=await Oc(ik,e);if(!t)throw new I("Unable to get current user account");return{email:t.email,activeShops:[...t.organizations?.edges?.flatMap(r=>r.node?.categories.flatMap(i=>i?.destinations?.edges?.map(n=>n.node)))??[],...t.orphanDestinations?.categories?.flatMap(r=>r.destinations?.edges?.map(i=>i.node))??[]].filter(({status:r})=>r==="ACTIVE").map(({name:r,webUrl:i})=>({name:r,fqdn:i.replace(/^https?:\/\//,"").replace(/\/admin$/,"")}))}}y();y();function hi({host:e="",graphql:t}){let r=`${e.endsWith("/")?e.slice(0,-1):e}/graphiql`;if(t){let{query:i,variables:n}=t;typeof n!="string"&&(n=JSON.stringify(n)),r+=`?query=${encodeURIComponent(i)}${n?`&variables=${encodeURIComponent(n)}`:""}`,t.schema&&(r+=`&schema=${t.schema}`)}return r}var Wg={...console},Gg=new Set,Xg=new Set,Vg=[];function Ki(e,...t){Xg.has(e)||(Xg.add(e),Vg.push(...t))}var Wu=new Set;function nk(e,t){let r=e.map(i=>{let n=i?.message??i;return typeof n=="string"?n:""}).filter(Boolean).join("");return Wu.has(r)?!0:(Wu.add(r),t!==!0&&setTimeout(()=>Wu.delete(r),t??1e3),!1)}function Qi([e]){return typeof e=="string"&&/\[h2:(warn|info):(createStorefrontClient|createCustomerAccountClient)\]/.test(e)?!0:void 0}function St(e,t){Gg.has(e)||(Gg.add(e),console[e]=(...r)=>{if(t!==!1&&nk(r,t?.(r)))return;let i=Vg.reduce((o,[s,c])=>(s(r,o.length)&&o.push(c),o),[]);if(i.length===0)return Wg[e](...r);let n=i.reduce((o,s)=>o&&s(o),r);if(n)return Wg[e](...n)})}function wB({workerReload:e}={}){St("log"),St("error"),St("warn",Qi),St("debug",!1);let t=!0;Ki("dev-node",[([s])=>typeof s=="string"&&s.includes("[mf:"),s=>{let c=s[0];if(e!==!1&&c.includes("Worker reloaded")){if(t){t=!1;return}return[c.replace("[mf:inf] ","\u{1F504} ")+`
268
+ `,...s.slice(1)]}c.includes("[mf:err]")}]),Ki("dev-workerd",[([s])=>typeof s=="string"&&/^\x1B\[31m(workerd\/|stack:( (0|[a-f\d]{4,})){3,})/.test(s),()=>{}],[([s])=>typeof s=="string"&&/\$LLVM_SYMBOLIZER|recursive isolate lock/.test(s),()=>{}],[([s])=>typeof s=="string"&&/^A promise rejection/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/resolved to multiple addresses/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return typeof c=="string"&&/^Network connection lost/i.test(c)},()=>{}]);let r=!1,i=!1;Ki("dev-vite",[([s])=>typeof s=="string"&&/^Sourcemap for .*@remix-run/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^\[vite\] (connected|program reload)/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^Re-optimizing dependencies because/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return/virtual-routes/.test(c)&&/(Failed to load url|Could not resolve module for file)/i.test(c)},()=>{}],[([s])=>typeof s=="string"&&/^Generated an empty chunk:/i.test(s),()=>{}],[([s],c)=>{if(c===0&&typeof s=="string"){let h=/^\s+[A-Z]+\s+\d{3}\s+[a-z]+\s+\//.test(s.replace(/\u001b\[.*?m/g,""));!r&&(h&&!i||!h&&i)&&process.stdout.write(`
269
+ `),i=h,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function eo(e=!1){St("log",Qi),Ki("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(mc.eraseLines(e?5:6))}])}function EB(e){St("error"),St("warn",Qi),St("log",Qi),St("info",Qi),Ki("h2-warn",[([t])=>{let r=t?.message??t;return typeof r=="string"&&r.includes("[h2:")},t=>{let r=t[0],i=typeof r=="object"&&r.stack?r:void 0,n=i?.message??r;n.startsWith("[h2:info:createStorefrontClient]")&&n.includes("defaulting to mock.shop")&&(n+="\nRun `h2 link` to link your store.");let[,o,s,c]=n.match(/\[h2:([^:]+):([^\]]+)\]\s+(.*)$/ims)||[];if(!o||!s||!c)return t;let h=`In Hydrogen's \`${s.trim()}\`:
270
+
271
+ `,g=c.split(`
272
+ `),d=g.at(-1)??"",f=/https?:\/\//.test(d),p=/`h2 [^`]+`/.test(d);if(p&&d&&(d=d.replace(/`(h2) ([^`]+)`/g,W.magentaBright(`\`${e.cliCommand??"$1"} $2\``))),(f||p)&&g.pop(),o==="error"||i){let l=f||p?d:void 0,m=i?.stack,v=i?.cause;if(typeof v=="string")try{v=JSON.parse(v)}catch{}if(typeof v!="string"&&v?.graphql?.query){let P=hi({host:e.host,graphql:v.graphql}),[,B,L]=v.graphql.query.match(/(query|mutation)\s+(\w+)/)||[];l=(l?`${l}
273
+
274
+ `:"")+Ar`To debug the ${B||"query"}${L?` \`${W.whiteBright(L)}\``:""}, try it in ${gt.link(W.bold("GraphiQL"),P)}.`.value}let x=m?.split(`
275
+ `)??[],w=P=>P.includes(e.rootDirectory)&&!P.includes("node_modules"),C=x.findIndex(w),S=x.length-[...x].reverse().findIndex(w);C>0&&S>C&&(m=[x[0],...x.slice(C,S)].join(`
276
+ `).trim()||void 0);let T=new ln(h+W.bold(g.join(`
277
+ `).replace(" - Request",`
278
+ Request`)),l);T.cause=v,T.stack=m,cn(T);return}let a;if(f){a=[];for(let l of d.matchAll(/https?:\/\/[^\s]+/g))a.push(l[0])}(o==="warn"?Xe:mt)({body:h+W.bold(g.join(`
279
+ `)),reference:a,nextSteps:p?[d]:void 0})}])}function bB(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function DB(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function IB(e){await Dc(),await Pg(e)}async function At(e,t){eo(!1);let r=t===!0,i=e?await li(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await un(t)),!t||!o||!n||r||t!==i.shop){let h=await bc().catch(()=>{throw new I("Unable to authenticate with Shopify. Please report this issue.")}),g=await Jg(h),f=!r&&t&&g.activeShops.find(({fqdn:p})=>t===p)||await tt({message:"Select a shop to log in to",choices:g.activeShops.map(({name:p,fqdn:a})=>({label:`${p} (${a})`,value:{name:p,fqdn:a}}))});t=f.fqdn,o=f.name,n=g.email}let s=await Ec(t).catch(()=>{throw new I("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),c=e?await Ig(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:c}}function Yg(e){Cr({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as bk,readdir as Dk}from"node:fs/promises";y();import{readdir as i0}from"node:fs/promises";y();import{createRequire as sk}from"module";function Kg(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function BB(){try{return sk(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as hk}from"node:module";import to from"node:path";y();y();var Qg="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function ok(e){return!!(await be(e,"vite.config")).filepath}async function Xu(e){let t=await ok(e);return t&&await Gu(e)&&Xe({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function Zg(e,t){let r=await Uc(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:c,serverBuildFile:h,routes:g}=ak(s),d=s.build.outDir,f=d.replace(/server$/,"client"),p=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(p)?p[0]:p)??{},u=M(d,typeof a=="string"?a:h??"index.js"),l=t??s.build.ssr,m=J(s.root,typeof l=="string"?l:"server");return{clientOutDir:f,serverOutDir:d,serverOutFile:u,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:g??{},appDirectory:c??M(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await be(le(m),Tt(m))).filepath||m}}}function ak(e){try{return uk(e)}catch{return ck(e)}}function uk(e){if(!e.__reactRouterPluginContext)throw new Error("Could not resolve React Router config");let{appDirectory:t,serverBuildFile:r,routes:i}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,serverBuildFile:r,routes:i}}function ck(e){let{remixConfig:t}=lk(e)?.api?.getPluginOptions()??{};return t?{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}:{}}function e0(e,t){return e.plugins.find(r=>r.name===t)}function lk(e){return e0(e,"hydrogen:main")}function XB(e){return e0(e,"oxygen:main")}async function Gu(e){return!!(await be(e,"remix.config")).filepath}async function sR(e){return await Xu(e)?!1:Gu(e)}var fk="dist",dk="client",pk="worker";function oR(e){let t=e??process.cwd(),r=to.join(t,"public"),i=to.join(t,fk),n=to.join(i,dk),o=to.join(i,pk,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function aR(e){return be(e,"remix.config").then(({filepath:t})=>{if(!t)throw new I("No remix.config.js file found.");return hk(import.meta.url)(t)})}async function t0(e,t=process.env.NODE_ENV){if(!await Xu(e))throw new I(Qg);return(await Zg(e)).remixConfig}var mk=[/robots\.txt/],Yu={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"],tokenlessApi:"api.$version.[graphql.json]"},Vu=[];async function r0(e=Object.keys(Yu)){Vu.length===0&&(Vu=(await i0(await Xi(Ht))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=Yu[i];if(!n)throw new I(`No route found for ${i}. Try one of ${gk.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let c=s.replace("*","");t[i].push(...Vu.filter(h=>h.startsWith(c)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var gk=[...Object.keys(Yu),"all"];async function n0(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await r0():await r0([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await t0(e.directory),s=i.flatMap(p=>Ht+"/"+p),c=await ft(n),h=M(o,Ht),g=await yk(h,e),d=!!(e.typescript??await U(M(n,"tsconfig.json"))),f=[];for(let p of s)f.push(await Ku(p,{...e,typescript:d,localePrefix:g,rootDirectory:n,appDirectory:o,formatOptions:c}));return g&&await wk({typescript:d,localePrefix:g,routesDirectory:h,formatOptions:c,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:d,formatOptions:c}}async function yk(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await i0(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(c=>o.test(c));if(s)return s.match(o)?.[1]}async function Ku(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:c,localePrefix:h,v1RouteConvention:g=!1,signal:d,overwriteFileDeps:f=!0}){s??=await Iu();let p=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(p,"");let a=M(r,vk(e,h,{v1RouteConvention:g})+(i?p:p.replace(".ts",".js"))),u={operation:"created",sourceRoute:e,destinationRoute:ac(a,t)};if(!n&&await U(a)){if(!await rt({message:`The file ${u.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:d}))return{...u,operation:"skipped"};u.operation="replaced"}let l=await Xi(e+p,s),m=await xk(l,await Xi("",s));for(let v of m){let w=v.startsWith(Ht+"/")?a:M(r,v.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await U(w))continue;await U(le(w))||await sn(le(w));let C=await Xi(v,s);if(!/\.[jt]sx?$/.test(v)){await br(C,w);continue}let S=await X(C);i||(S=await Jt(S,C)),o&&(S=s0(S,o)),S=await zt(S,c,w),await V(w,S)}return u}function s0(e,t){return e.replace(/@shopify\/remix-oxygen/g,t)}function vk(e,t,r){let i=e.replace(Ht+"/",""),n=t&&!mk.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Ht+"/"+n+(r.v1RouteConvention?Kg(i):i)}async function xk(e,t){let r=new Set([e]),i=new Set([kt(t,e)]);for(let n of r){let o=(await X(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",kt(le(n),t)||"."),s.includes("/+types/")))continue;let c=J(le(n),s),h=(await be(le(c),Tt(c))).filepath||c;h.includes(`/${Ht}/`)||(i.add(kt(t,h)),/\.[jt]sx?$/.test(h)&&r.add(h))}}return[...i]}function wk({typescript:e,localePrefix:t,...r}){return Ek({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function Ek({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=M(r,t);if(await U(s))return;let c=await Ze("routes",e);if(!await U(c))throw new Error("Unknown strategy");let h=await X(c);o&&(h=s0(h,o)),n||(h=await Jt(h,c)),h=await zt(h,i,s),await V(s,h)}var Ck={js:"JavaScript",ts:"TypeScript"};async function JR(e,t,r){let i=r??await Tg({abortSignal:e.signal,extraChoices:{none:"Set up later "+W.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await kg(n,o)}}}function WR(e){return{setupRoutes:async(t,r,i)=>(await n0({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:M(t,"app")})).routeGroups}}function GR(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>Ku(t,e)))}async function XR(e,t,r){return t===ke?{}:r??await rt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:ke},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await zg()).length>0}catch(n){return me("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>mt({body:`You'll need to restart your terminal session to make \`${ke}\` alias available.`})}:{}}async function VR(e){eo(!0);let{session:t,config:r}=await At();Yg(r);let i=await Ys(t),n=await Qu(i),o;return n?o=n.title:o=await Sr({message:"New storefront name",defaultValue:Qs(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function Qu(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await tt({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function YR({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&hc(e.title),o=i??n??await Sr({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=J(process.cwd(),o);if(await o0(s)){if(!r&&n&&(o=await Sr({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=J(process.cwd(),o),await o0(s)||(r=!0)),!r&&!await rt({message:`The directory ${W.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){mt({body:`Destination path ${W.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await oo(s,{force:!0})}return{name:Tt(o),location:o,directory:s,storefrontTitle:e?.title}}async function KR(e,t,r){let i=r??await tt({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await Ru(e)}}}async function QR(e,t,r){let i=r??await Ag({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Sg(n,{rootDirectory:e,appDirectory:M(e,"app")},!0);o&&await o.workPromise}}}}async function ZR(e,t,r,i){let n=r??Ac(),o="npm";if(i!==!1)if(n==="unknown"){let s=await tt({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0&&(o=n,i=await rt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal}));return Gi&&(await br(M(Gs(),".npmrc"),M(e,".npmrc")).catch(()=>{}),i||await bk(await mg(),M(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Fc({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var Sk=`
280
+ node_modules
281
+ /.cache
282
+ /build
283
+ /dist
284
+ /public/build
285
+ /.mf
286
+ .env
287
+ .shopify
288
+ .react-router
289
+ `.slice(1);async function eL(e){try{return await Nc(e),await V(M(e,".gitignore"),Sk),process.env.NODE_ENV==="test"&&process.env.CI&&(await Qe('git config --global user.name "hydrogen"'),await Qe('git config --global user.email "hydrogen@shopify.com"')),Ak(e,"Scaffold Storefront")}catch(t){me(`Failed to initialize Git.
290
+ `+(t?.stack??t?.message??t))}}async function Ak(e,t){try{await Mc(e),await jc(t,{directory:e})}catch(r){me(`Failed to commit code.
291
+ `+(r?.stack??r?.message??r))}}async function tL(e,{language:t,packageManager:r,depsInstalled:i,cssStrategy:n,cliCommand:o,routes:s,i18n:c,depsError:h,i18nError:g,routesError:d}){let f=!!(h||g||d),p=[];e.storefrontTitle&&p.push(["Shopify",e.storefrontTitle]),t&&p.push(["Language",Ck[t]]),n&&p.push(["Styling",Bu[n]]),!g&&c&&p.push(["Markets",Lu[c].split(" (")[0]]);let a="";if(!d&&s&&Object.keys(s).length){p.push(["Routes",""]);for(let[m,v]of Object.entries(s)){v=Array.isArray(v)?v:[v];let x=[...new Set(v.map(w=>"/"+_k(w)))].sort();x.length>2&&(x=[...new Set(x.map(C=>C.split("/")[1]??""))].map(C=>"/"+C+"/*")),a+=`
292
+ \u2022 ${uc(m)} ${W.dim("("+x.join(" & ")+")")}`}}let u=1+p.reduce((m,[v])=>Math.max(m,v.length),0);(f?Xe:Cr)({headline:"Storefront setup complete"+(f?" with errors (see warnings below).":"!"),body:p.map(([m,v])=>` ${(m+":").padEnd(u," ")} ${W.dim(v)}`).join(`
293
+ `)+a,customSections:[f&&{title:`Warnings
294
+ `,body:[{list:{items:[h&&["Failed to install dependencies:",{subdued:h.message}],g&&["Failed to scaffold Markets:",{subdued:g.message}],d&&["Failed to scaffold routes:",{subdued:d.message}]].filter(m=>!!m)}}]},{title:`Next steps
295
+ `,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,Sc()?"npm run dev":Ic(r,"dev")].filter(Boolean).join(" && ")}]].filter(m=>!!m)}}]}].filter(m=>!!m)})}function rL(e,t){return async function(i){if(e.abort(),await Promise.resolve(),t?.directory&&await oo(t.directory,{force:!0}).catch(()=>{}),cn(new I("Failed to initialize project: "+(i?.message??""),i?.tryMessage??i?.stack)),process.env.SHOPIFY_UNIT_TEST&&process.exit.name!=="spy")throw console.error("Error during test before process.exit:",i),i;process.exit(1)}}async function o0(e){return await U(e)&&await an(e)&&(await Dk(e)).length>0}function _k(e){return e.replace(/(^|\.)_index$/,"").replace(/((^|\.)[^\.]+)_\./g,"$1.").replace(/\.(?!\w+\])/g,"/").replace(/\$$/g,":catchAll").replace(/\$/g,":").replace(/[\[\]]/g,"").replace(/:\w*Handle/i,":handle")}function a0(){function e(i){return i[Math.floor(Math.random()*i.length)]}let t=e(["Bay","Bend","Cape","Cliff","Cove","Creek","Dale","Dune","Fjord","Glade","Gulf","Hill","Isle","Knoll","Lake","Loch","Mesa","Peak","Pond","Quay","Reef","Ridge","Rise","River","Road","Shore","Strait","Stream","Vale","Valley","View","Vista"]);return`${e(["Crimson","Azure","Coral","Fuchsia","Indigo","Ivory","Lavender","Lime","Magenta","Maroon","Orchid","Peach","Plum","Quartz","Salmon","Teal","Turquoise","Violet","Yellow","Ebony","Jade","Lilac","Mint","Onyx","Pearl","Ruby","Sapphire","Topaz"])} ${t}`}var u0=class e extends hn{static descriptionWithMarkdown=`Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
296
+
297
+ Linking to a Hydrogen storefront enables you to run [dev](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-dev) and automatically inject your linked Hydrogen storefront's environment variables directly into the server runtime.
298
+
299
+ After you run the \`link\` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.`;static description="Link a local project to one of your shop's Hydrogen storefronts.";static flags={...Yi.force,...Yi.path,storefront:c0.Flags.string({description:`The name of a Hydrogen Storefront (e.g. "Jane's Apparel")`,env:"SHOPIFY_HYDROGEN_STOREFRONT"})};async run(){let{flags:t}=await this.parse(e);await Fk(t)}};async function Fk({force:e,path:t=process.cwd(),storefront:r}){let[{session:i,config:n},o]=await Promise.all([At(t),Zs()]),s=await Zu(t,i,n,{force:e,flagStorefront:r,cliCommand:o});s&&Cr({body:[{userInput:s.title},"is now linked"],nextSteps:[["Run",{command:`${o} dev`},"to start your local development server and start building"]]})}async function Zu(e,t,r,{force:i=!1,flagStorefront:n,cliCommand:o,storefronts:s}){if(!r.shop)throw new I("No shop found in local config, login first.");if(r.storefront?.id&&!i&&!await rt({message:`Your project is currently linked to ${r.storefront.title}. Do you want to link to a different Hydrogen storefront on Shopify?`}))return;s||(s=await Ys(t));let c;if(n){if(c=s.find(({title:h})=>h===n),!c){Xe({headline:`Couldn't find ${n}`,body:["There's no storefront matching",{userInput:n},"on your",{userInput:r.shop},"shop. To see all available Hydrogen storefronts, run",{command:`${o} list`}]});return}}else c=await Qu(s),c||(c=await kk(e,t,s));return await Ng(e,c),c}async function kk(e,t,r){let i=Tt(e),n=Qs(i);r.some(({title:g})=>g===n)&&(n=a0());let s=await Sr({message:"New storefront name",defaultValue:n}),c,h;if(await Pc([{title:"Creating storefront",task:async()=>{let g=await jg(t,s);c=g.storefront,h=g.jobId}},{title:"Creating API tokens",task:async()=>{try{await Bg(t,h)}catch{c=void 0}},skip:()=>!h}]),!c)throw new I("Unknown error ocurred. Please try again or contact support if the error persists.");return c}y();var Zi=rn(Ws(),1);y();var Tk=`#graphql
300
+ mutation CustomerApplicationUrlsReplace($storefrontId: ID!, $urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput!) {
301
+ hydrogenStorefrontCustomerApplicationUrlsReplace(
302
+ storefrontId: $storefrontId,
303
+ urlsReplaceInput: $urlsReplaceInput,
304
+ ) {
305
+ success
306
+ userErrors {
307
+ code
308
+ field
309
+ message
310
+ }
311
+ }
312
+ }
313
+ `;async function ec(e,t,r){let{hydrogenStorefrontCustomerApplicationUrlsReplace:{success:i,userErrors:n}}=await Je(Tk,e,{storefrontId:t,urlsReplaceInput:r});return{success:i,userErrors:n}}var l0=class e extends hn{static description="Push project configuration to admin";static flags={...Yi.path,"storefront-id":Zi.Flags.string({description:"The id of the storefront the configuration should be pushed to. Must start with 'gid://shopify/HydrogenStorefront/'"}),"dev-origin":Zi.Flags.string({description:"The development domain of your application.",required:!0}),"relative-redirect-uri":Zi.Flags.string({description:"The relative url of allowed callback url for Customer Account API OAuth flow. Default is '/account/authorize'"}),"relative-logout-uri":Zi.Flags.string({description:"The relative url of allowed url that will be redirected to post-logout for Customer Account API OAuth flow. Default to nothing."})};async run(){let{flags:t}=await this.parse(e);await tc({...qu(t)})}};async function tc({path:e=process.cwd(),storefrontId:t,devOrigin:r,redirectUriRelativeUrl:i="/account/authorize",logoutUriRelativeUrl:n}){let o=await rc(e,t);try{if(!o)throw new Error("No storefrontId was found in --storefront-id flag or .shopify/project.json");let s=i?new URL(i,r).toString():r,c=r,h=n?new URL(n,r).toString():r;if(!s&&!c&&!h)return;let{session:g,config:d}=await At(e),f=d?.storefront?.customerAccountConfig,{success:p,userErrors:a}=await ec(g,o,{redirectUri:{add:s?[s]:void 0,removeRegex:f?.redirectUri},javascriptOrigin:{add:c?[c]:void 0,removeRegex:f?.javascriptOrigin},logoutUris:{add:h?[h]:void 0,removeRegex:f?.logoutUri}});if(!p||a.length){let u=new Error("Customer Account Application setup update fail.");throw u.userErrors=a,u}return await Mg(e,{redirectUri:s,javascriptOrigin:c,logoutUri:h}),()=>Ok(g,o,{redirectUri:s,javascriptOrigin:c,logoutUri:h})}catch(s){let c=!1,h=s?.userErrors?.length?s.userErrors.map(d=>(/Javascript origin is not allowed for this application type/i.test(d.message)&&(c=!0),`${d.field}: ${d.message}`)):s.message?[s.message]:[],g=[{link:{label:"Manually update application setup",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen#update-the-application-setup"}}];throw c&&g.unshift({link:{label:"Enable Public access for Hydrogen",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/getting-started#step-1-enable-customer-account-api-access"}}),new I("Customer Account Application setup update fail.",h.length?[{list:{title:"The following error occurs during update:",items:h.map((d,f)=>`${f!=0?`
314
+
315
+ `:""}${d}`)}}]:void 0,g)}}async function Ok(e,t,r={}){Object.values(r).some(Boolean)&&(me(`Cleaning up Customer Application url "${r.redirectUri}"`),await ec(e,t,{redirectUri:{removeRegex:r?.redirectUri},javascriptOrigin:{removeRegex:r?.javascriptOrigin},logoutUris:{removeRegex:r?.logoutUri}}).catch(i=>{me(`Failed to clean up Customer Application url "${r.redirectUri}":
316
+ ${i?.message}`)}))}async function rc(e,t){if(t)return t;let{session:r,config:i}=await At(e);if(i.storefront?.id)return i.storefront.id;let n=await Zs();return await Zu(e,r,i,{cliCommand:n})?(await li(e)).storefront?.id:void 0}y();import ic from"node:path";import{EventEmitter as Pk}from"node:events";import{ReadableStream as Ik}from"node:stream/web";var h0=rn(iy(),1),RL="H2O_LOG_EVENT",f0;function LL(e){f0=e.Response}var sc=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),Nk={request:"Request",subrequest:"Sub request"};async function Mk(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var nc=new Pk,en=[];function ro(e="ok",t){return new f0(e,t)}function jk(e){return en.length=0,ro()}function $L(e){return async function(r){let i=new URL(r.url);if(sc.has(i.pathname))return ro();let{url:n,displayName:o,eventType:s,purpose:c,graphql:h,stackInfo:g,...d}=await Mk(r),f="",p=r.url,a=o;s==="subrequest"&&(a=a||h?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),p=n||r.url,h&&(f=hi({graphql:h})));let u=null,l=null;if(g?.file){e?.transformLocation&&(g.file=e.transformLocation(g.file));let{source:v,line:x,column:w}=(0,h0.mapSourcePosition)({source:g.file,line:g.line??0,column:g.column??0});u=`${v}:${x}:${w+1}`,l=`vscode://${ic.join("file",u)}`,u=u.split(ic.sep+"app"+ic.sep)[1]??u,g.func&&(u=`${g.func.replace(/\d+$/,"")} (${u})`)}let m={event:Nk[s]||s,data:JSON.stringify({...d,displayName:a,url:`${c} ${p}`.trim(),graphiqlLink:f,stackLine:u,stackLink:l})};return en.push(m),en.length>100&&en.shift(),nc.emit("request",m),ro()}}function Bk(e){let t=new Ik({start(r){let i=new TextEncoder,n=({event:c="message",data:h})=>{r.enqueue(i.encode(`event: ${c}
317
+ `)),r.enqueue(i.encode(`data: ${h}
318
+
319
+ `))};en.forEach(n),nc.addListener("request",n);let o=!1;function s(){o||(o=!0,e.signal.removeEventListener("abort",s),nc.removeListener("request",n),r.close())}if(e.signal.addEventListener("abort",s),e.signal.aborted)return s()}});return ro(t,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-store",Connection:"keep-alive"}})}function qL(e){return e.method==="DELETE"?jk():Bk(e)}y();var XL="/debug-network-server";function VL(){throw new I("Could not load MiniOxygen.","Please make sure you have `@shopify/mini-oxygen` installed.")}function YL({request:e,response:t,meta:r}){try{let i=new URL(e.url);if(!r.durationMs&&r.startTimeMs&&r.endTimeMs&&(r.durationMs=r.endTimeMs-r.startTimeMs),sc.has(i.pathname)||i.pathname==="/favicon.ico")return;let n=i.searchParams.has("_data"),o=e.url.replace(i.origin,""),s="",c="render";if(n){c=e.method==="GET"?"loader":"action";let g=i.searchParams.get("_data")?.replace("routes/","");o=i.pathname,s=`[${g}]`}let h=t.status<300?gt.green:t.status<400?gt.cyan:gt.errorText;it(Ar`${e.method.padStart(6)} ${h(String(t.status))} ${gt.italic(c.padEnd(7," "))} ${o} ${r.durationMs&&r.durationMs>0?W.dim(` ${r.durationMs}ms`):""}${s?" "+W.dim(s):""}${e.headers.purpose==="prefetch"?W.italic(W.dim(" prefetch")):""}`)}catch{e&&t?.status&&it(`${e.method} ${t.status} ${e.url}`)}}y();y();y();var Rk=`#graphql
320
+ query PullVariables($id: ID!, $handle: String) {
321
+ hydrogenStorefront(id: $id) {
322
+ id
323
+ environmentVariables(handle: $handle) {
324
+ id
325
+ isSecret
326
+ readOnly
327
+ key
328
+ value
329
+ }
330
+ }
331
+ }
332
+ `;async function d0(e,t,r){let{hydrogenStorefront:i}=await Je(Rk,e,{id:t,handle:r});return i}y();var Lk=`#graphql
333
+ query ListStorefronts($id: ID!) {
334
+ hydrogenStorefront(id: $id) {
335
+ id
336
+ productionUrl
337
+ environments {
338
+ branch
339
+ createdAt
340
+ id
341
+ name
342
+ handle
343
+ type
344
+ url
345
+ }
346
+ }
347
+ }
348
+ `;async function p0(e,t){let{hydrogenStorefront:r}=await Je(Lk,e,{id:t});return r}y();function a3(e){return[...e.filter(t=>t.type==="PREVIEW"),...e.filter(t=>t.type==="CUSTOM"),...e.filter(t=>t.type==="PRODUCTION")]}function u3(e,t,r){let i=Object.entries({handle:t,branch:r}).reduce((n,[o,s])=>(s&&n.push(`${o}: ${s}`),n),[]).join(", ");return`${e} ${W.dim(`(${i})`)}`}function c3(e,t){let r=e.find(({handle:i})=>i===t);if(!r)throw g0("handle",t);return r}function m0(e,t){let r=e.find(({branch:i})=>i===t);if(!r)throw g0("branch",t);return r}function g0(e,t){return new I("Environment not found",`We could not find an environment matching the ${e} '${t}'.`,[["Run",{command:"env list"},"to view a list of available environments."]])}var y0=()=>({remoteVariables:{},remoteSecrets:{}});async function D3({root:e,envHandle:t,envBranch:r,envFile:i,fetchRemote:n=!0,localVariables:o}){let[{remoteVariables:s,remoteSecrets:c},{variables:h}]=await Promise.all([n?$k(e,t,r).catch(a=>(Xe({headline:"Failed to load environment variables from Shopify. The development server will still start, but the following error occurred:",body:[a.message,a.tryMessage,a.nextSteps].filter(Boolean).join(`
349
+
350
+ `)}),y0())):y0(),o?{variables:o}:oc(e,i)]),g=Object.keys(c),d=Object.keys(s),f=Object.keys(h);function p(){(f.length>0||d.length+g.length>0)&&(it(`
351
+ Environment variables injected into MiniOxygen:
352
+ `),it(cc([...d.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...g.filter(a=>!f.includes(a)).map(a=>[W.dim(a),W.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:p,remoteVariables:s,remoteSecrets:c,localVariables:h,allVariables:{...c,...s,...h}}}async function $k(e,t,r){let{session:i,config:n}=await At(e);if(r){let h=(await p0(i,n.storefront.id))?.environments||[];t=m0(h,r).handle}let o=(await d0(i,n.storefront.id,t))?.environmentVariables||[],s={},c={};for(let{key:h,value:g,isSecret:d}of o)d?c[h]=g:s[h]=g;return{remoteVariables:s,remoteSecrets:c}}async function oc(e,t){let r=J(e,t);return await U(r).then(i=>i?Lc(r):{variables:{}})}y();async function v0(e,t,r){let i=await wc(e,"tunnel_start",{port:t,provider:r}),o=Object.values(i).filter(s=>!s?.isErr()||s.error.type!=="invalid-provider")[0];if(!o)throw new ln(`We couldn't find the ${r} tunnel plugin`);if(o.isErr())throw new I(`${r} failed to start the tunnel.
353
+ ${o.error.message}`);return o.value}async function x0(e){return new Promise((t,r)=>{let i=0,n=async()=>{let s=e.getTunnelStatus();if(me(`Polling tunnel status for ${e.provider} (attempt ${i}): ${s.status}`),s.status==="error")return r(new I(s.message,s.tryMessage));s.status==="connected"?t(s.url):(i+=1,o())},o=()=>{setTimeout(n,500)};n()})}function qk(e){return e.PUBLIC_STORE_DOMAIN==="mock.shop"||e.PUBLIC_STORE_DOMAIN===""}function $3(e){mt({headline:"Using mock.shop with `--customer-account-push` flag is not supported",body:"The functionalities of this flag are disabled.",nextSteps:["You may continue knowing Customer Account API (/account) interactions will fail.",["Or run",{command:`${e} env pull`},"to link to your store credentials."]]})}function q3(e,t,r){return oc(e,r).then(async({variables:i})=>{let n=t&&!qk(i);n&&await rc(e);let{shop:o,storefront:s}=await li(e),c=s?.id;return{storefrontId:c,customerAccountPush:n,fetchRemote:!!o&&!!c,localVariables:i,storefrontTitle:s?.title}})}var w0=Object.freeze({ORIGINAL:".trycloudflare.com",REBRANDED:".tryhydrogen.dev"});async function U3(e,t,r,i){it(`
354
+ Starting tunnel...
355
+ `);let n=await v0(t,r,"cloudflare"),o=await x0(n).then(c=>c.replace(w0.ORIGINAL,w0.REBRANDED)),s=await tc({path:e,devOrigin:o,storefrontId:i}).catch(c=>{c instanceof I&&mt({headline:"Customer Account Application setup update fail.",body:c.tryMessage||void 0,nextSteps:c.nextSteps})});return{host:o,cleanup:s}}function H3(e){let t=process.env.TERM_PROGRAM==="vscode",r="https://h2o.fyi/debugging/server-code"+(t?"#visual-studio-code":"#step-2-attach-a-debugger");return Ar`Debugging enabled on port ${String(e)}.\nAttach a ${gt.link(W.yellow(t?"VSCode debugger":"debugger"),r)} or open DevTools in http://localhost:${String(e)}.`.value}function z3(e){return e=e.endsWith("/")?e.slice(0,-1):e,[`View GraphiQL API browser:
356
+ ${hi({host:e})}`,`View server network requests:
357
+ ${e}/subrequest-profiler`].map((t,r)=>({subdued:`${r===0?"":`
358
+
359
+ `}${t}`}))}export{Ws as a,Qe as b,BN as c,Gi as d,WN as e,Ze as f,Xi as g,Iu as h,Gs as i,Nu as j,ft as k,zt as l,ui as m,Xs as n,Vi as o,ju as p,Bu as q,RM as r,Sg as s,Ag as t,$F as u,Lu as v,$u as w,kg as x,Tg as y,qF as z,UF as A,Yi as B,qu as C,Dj as D,Cj as E,Uc as F,fy as G,sR as H,oR as I,aR as J,t0 as K,Qg as L,ok as M,Xu as N,Zg as O,lk as P,XB as Q,Je as R,Og as S,Ys as T,li as U,Ig as V,Ng as W,qj as X,jg as Y,Bg as Z,ke as _,zg as $,Zs as aa,wB as ba,eo as ca,EB as da,bB as ea,DB as fa,IB as ga,At as ha,Yg as ia,BB as ja,gk as ka,n0 as la,Ck as ma,JR as na,WR as oa,GR as pa,XR as qa,VR as ra,YR as sa,KR as ta,QR as ua,ZR as va,eL as wa,Ak as xa,tL as ya,rL as za,u0 as Aa,Zu as Ba,l0 as Ca,RL as Da,LL as Ea,$L as Fa,qL as Ga,XL as Ha,VL as Ia,YL as Ja,a3 as Ka,u3 as La,c3 as Ma,m0 as Na,d0 as Oa,p0 as Pa,D3 as Qa,qk as Ra,$3 as Sa,q3 as Ta,w0 as Ua,U3 as Va,H3 as Wa,z3 as Xa};