patchright-core 1.57.0 → 1.59.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 (307) hide show
  1. package/ThirdPartyNotices.txt +2688 -297
  2. package/browsers.json +23 -22
  3. package/lib/bootstrap.js +77 -0
  4. package/lib/cli/browserActions.js +308 -0
  5. package/lib/cli/driver.js +3 -2
  6. package/lib/cli/installActions.js +171 -0
  7. package/lib/cli/program.js +48 -413
  8. package/lib/client/android.js +4 -4
  9. package/lib/client/api.js +3 -0
  10. package/lib/client/browser.js +11 -5
  11. package/lib/client/browserContext.js +20 -23
  12. package/lib/client/browserType.js +23 -54
  13. package/lib/client/cdpSession.js +6 -2
  14. package/lib/client/channelOwner.js +1 -1
  15. package/lib/client/clientHelper.js +2 -1
  16. package/lib/client/clock.js +0 -1
  17. package/lib/client/{webSocket.js → connect.js} +57 -7
  18. package/lib/client/connection.js +8 -0
  19. package/lib/client/consoleMessage.js +3 -0
  20. package/lib/client/debugger.js +57 -0
  21. package/lib/client/dialog.js +8 -1
  22. package/lib/client/disposable.js +76 -0
  23. package/lib/client/electron.js +1 -0
  24. package/lib/client/elementHandle.js +1 -1
  25. package/lib/client/events.js +3 -0
  26. package/lib/client/fetch.js +2 -4
  27. package/lib/client/frame.js +9 -13
  28. package/lib/client/harRouter.js +13 -1
  29. package/lib/client/jsHandle.js +4 -8
  30. package/lib/client/locator.js +13 -36
  31. package/lib/client/network.js +14 -11
  32. package/lib/client/page.js +44 -50
  33. package/lib/client/screencast.js +88 -0
  34. package/lib/client/selectors.js +3 -1
  35. package/lib/client/tracing.js +11 -5
  36. package/lib/client/video.js +13 -20
  37. package/lib/client/worker.js +6 -6
  38. package/lib/generated/bindingsControllerSource.js +1 -1
  39. package/lib/generated/clockSource.js +1 -1
  40. package/lib/generated/injectedScriptSource.js +1 -1
  41. package/lib/generated/pollingRecorderSource.js +1 -1
  42. package/lib/generated/storageScriptSource.js +1 -1
  43. package/lib/generated/utilityScriptSource.js +1 -1
  44. package/lib/mcpBundle.js +78 -0
  45. package/lib/mcpBundleImpl.js +91 -0
  46. package/lib/protocol/serializers.js +5 -0
  47. package/lib/protocol/validator.js +228 -58
  48. package/lib/protocol/validatorPrimitives.js +1 -1
  49. package/lib/remote/playwrightConnection.js +10 -8
  50. package/lib/remote/playwrightPipeServer.js +100 -0
  51. package/lib/remote/playwrightServer.js +14 -10
  52. package/lib/remote/playwrightWebSocketServer.js +73 -0
  53. package/lib/remote/serverTransport.js +96 -0
  54. package/lib/server/android/android.js +2 -2
  55. package/lib/server/artifact.js +1 -1
  56. package/lib/server/bidi/bidiBrowser.js +80 -14
  57. package/lib/server/bidi/bidiChromium.js +23 -14
  58. package/lib/server/bidi/bidiConnection.js +1 -0
  59. package/lib/server/bidi/bidiDeserializer.js +116 -0
  60. package/lib/server/bidi/bidiExecutionContext.js +75 -29
  61. package/lib/server/bidi/bidiFirefox.js +6 -8
  62. package/lib/server/bidi/bidiNetworkManager.js +40 -12
  63. package/lib/server/bidi/bidiPage.js +67 -40
  64. package/lib/server/bidi/third_party/bidiProtocolCore.js +1 -0
  65. package/lib/server/bidi/third_party/firefoxPrefs.js +3 -1
  66. package/lib/server/browser.js +84 -21
  67. package/lib/server/browserContext.js +137 -77
  68. package/lib/server/browserType.js +26 -16
  69. package/lib/server/chromium/chromium.js +28 -31
  70. package/lib/server/chromium/chromiumSwitches.js +16 -4
  71. package/lib/server/chromium/crBrowser.js +40 -27
  72. package/lib/server/chromium/crConnection.js +0 -5
  73. package/lib/server/chromium/crDevTools.js +1 -2
  74. package/lib/server/chromium/crNetworkManager.js +54 -229
  75. package/lib/server/chromium/crPage.js +74 -260
  76. package/lib/server/chromium/crServiceWorker.js +7 -14
  77. package/lib/server/clock.js +33 -41
  78. package/lib/server/codegen/javascript.js +6 -29
  79. package/lib/server/console.js +5 -1
  80. package/lib/server/debugController.js +12 -6
  81. package/lib/server/debugger.js +40 -47
  82. package/lib/server/deviceDescriptorsSource.json +137 -137
  83. package/lib/server/dispatchers/browserContextDispatcher.js +30 -30
  84. package/lib/server/dispatchers/browserDispatcher.js +11 -5
  85. package/lib/server/dispatchers/browserTypeDispatcher.js +7 -0
  86. package/lib/server/dispatchers/cdpSessionDispatcher.js +4 -1
  87. package/lib/server/dispatchers/debuggerDispatcher.js +84 -0
  88. package/lib/server/dispatchers/dispatcher.js +7 -14
  89. package/lib/server/dispatchers/disposableDispatcher.js +39 -0
  90. package/lib/server/dispatchers/electronDispatcher.js +2 -1
  91. package/lib/server/dispatchers/frameDispatcher.js +7 -7
  92. package/lib/server/dispatchers/localUtilsDispatcher.js +37 -1
  93. package/lib/server/dispatchers/networkDispatchers.js +6 -5
  94. package/lib/server/dispatchers/pageDispatcher.js +101 -34
  95. package/lib/server/dispatchers/webSocketRouteDispatcher.js +4 -5
  96. package/lib/server/disposable.js +41 -0
  97. package/lib/server/dom.js +56 -29
  98. package/lib/server/download.js +3 -2
  99. package/lib/server/electron/electron.js +17 -9
  100. package/lib/server/firefox/ffBrowser.js +9 -29
  101. package/lib/server/firefox/ffConnection.js +0 -5
  102. package/lib/server/firefox/ffInput.js +21 -5
  103. package/lib/server/firefox/ffNetworkManager.js +4 -4
  104. package/lib/server/firefox/ffPage.js +27 -33
  105. package/lib/server/firefox/firefox.js +6 -8
  106. package/lib/server/frameSelectors.js +14 -169
  107. package/lib/server/frames.js +263 -551
  108. package/lib/server/har/harRecorder.js +2 -2
  109. package/lib/server/har/harTracer.js +5 -4
  110. package/lib/server/input.js +49 -4
  111. package/lib/server/instrumentation.js +8 -0
  112. package/lib/server/javascript.js +6 -22
  113. package/lib/server/launchApp.js +0 -1
  114. package/lib/server/localUtils.js +6 -6
  115. package/lib/server/network.js +59 -20
  116. package/lib/server/overlay.js +138 -0
  117. package/lib/server/page.js +179 -157
  118. package/lib/server/progress.js +32 -6
  119. package/lib/server/recorder/recorderApp.js +84 -104
  120. package/lib/server/recorder.js +76 -40
  121. package/lib/server/registry/browserFetcher.js +6 -4
  122. package/lib/server/registry/index.js +222 -226
  123. package/lib/server/registry/nativeDeps.js +1 -0
  124. package/lib/server/registry/oopDownloadBrowserMain.js +3 -0
  125. package/lib/server/screencast.js +137 -0
  126. package/lib/server/trace/recorder/snapshotter.js +2 -2
  127. package/lib/server/trace/recorder/snapshotterInjected.js +21 -1
  128. package/lib/server/trace/recorder/tracing.js +98 -47
  129. package/lib/server/trace/viewer/traceViewer.js +24 -21
  130. package/lib/server/usKeyboardLayout.js +7 -0
  131. package/lib/server/utils/comparators.js +1 -1
  132. package/lib/server/utils/disposable.js +32 -0
  133. package/lib/server/utils/eventsHelper.js +3 -1
  134. package/lib/server/utils/expectUtils.js +87 -2
  135. package/lib/server/utils/fileUtils.js +16 -2
  136. package/lib/server/utils/happyEyeballs.js +15 -12
  137. package/lib/server/utils/httpServer.js +10 -23
  138. package/lib/server/utils/network.js +39 -29
  139. package/lib/server/utils/processLauncher.js +8 -6
  140. package/lib/server/utils/zipFile.js +2 -2
  141. package/lib/server/videoRecorder.js +194 -0
  142. package/lib/server/webkit/webkit.js +4 -6
  143. package/lib/server/webkit/wkBrowser.js +1 -10
  144. package/lib/server/webkit/wkConnection.js +1 -6
  145. package/lib/server/webkit/wkInterceptableRequest.js +29 -1
  146. package/lib/server/webkit/wkPage.js +88 -57
  147. package/lib/server/webkit/wkWorkers.js +2 -1
  148. package/lib/serverRegistry.js +156 -0
  149. package/lib/tools/backend/browserBackend.js +79 -0
  150. package/lib/tools/backend/common.js +63 -0
  151. package/lib/tools/backend/config.js +41 -0
  152. package/lib/tools/backend/console.js +66 -0
  153. package/lib/tools/backend/context.js +296 -0
  154. package/lib/tools/backend/cookies.js +152 -0
  155. package/lib/tools/backend/devtools.js +69 -0
  156. package/lib/tools/backend/dialogs.js +59 -0
  157. package/lib/tools/backend/evaluate.js +64 -0
  158. package/lib/tools/backend/files.js +60 -0
  159. package/lib/tools/backend/form.js +64 -0
  160. package/lib/tools/backend/keyboard.js +155 -0
  161. package/lib/tools/backend/logFile.js +95 -0
  162. package/lib/tools/backend/mouse.js +168 -0
  163. package/lib/tools/backend/navigate.js +106 -0
  164. package/lib/tools/backend/network.js +135 -0
  165. package/lib/tools/backend/pdf.js +48 -0
  166. package/lib/tools/backend/response.js +305 -0
  167. package/lib/tools/backend/route.js +140 -0
  168. package/lib/tools/backend/runCode.js +77 -0
  169. package/lib/tools/backend/screenshot.js +88 -0
  170. package/lib/tools/backend/sessionLog.js +74 -0
  171. package/lib/tools/backend/snapshot.js +208 -0
  172. package/lib/tools/backend/storage.js +68 -0
  173. package/lib/tools/backend/tab.js +445 -0
  174. package/lib/tools/backend/tabs.js +67 -0
  175. package/lib/tools/backend/tool.js +47 -0
  176. package/lib/tools/backend/tools.js +102 -0
  177. package/lib/tools/backend/tracing.js +78 -0
  178. package/lib/tools/backend/utils.js +83 -0
  179. package/lib/tools/backend/verify.js +151 -0
  180. package/lib/tools/backend/video.js +98 -0
  181. package/lib/tools/backend/wait.js +63 -0
  182. package/lib/tools/backend/webstorage.js +223 -0
  183. package/lib/tools/cli-client/cli.js +6 -0
  184. package/lib/tools/cli-client/help.json +399 -0
  185. package/lib/tools/cli-client/minimist.js +128 -0
  186. package/lib/tools/cli-client/program.js +350 -0
  187. package/lib/tools/cli-client/registry.js +176 -0
  188. package/lib/tools/cli-client/session.js +289 -0
  189. package/lib/tools/cli-client/skill/SKILL.md +328 -0
  190. package/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
  191. package/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
  192. package/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
  193. package/lib/tools/cli-client/skill/references/running-code.md +231 -0
  194. package/lib/tools/cli-client/skill/references/session-management.md +169 -0
  195. package/lib/tools/cli-client/skill/references/storage-state.md +275 -0
  196. package/lib/tools/cli-client/skill/references/test-generation.md +88 -0
  197. package/lib/tools/cli-client/skill/references/tracing.md +139 -0
  198. package/lib/tools/cli-client/skill/references/video-recording.md +143 -0
  199. package/lib/tools/cli-daemon/command.js +73 -0
  200. package/lib/tools/cli-daemon/commands.js +956 -0
  201. package/lib/tools/cli-daemon/daemon.js +157 -0
  202. package/lib/tools/cli-daemon/helpGenerator.js +177 -0
  203. package/lib/tools/cli-daemon/program.js +129 -0
  204. package/lib/tools/dashboard/appIcon.png +0 -0
  205. package/lib/tools/dashboard/dashboardApp.js +284 -0
  206. package/lib/tools/dashboard/dashboardController.js +296 -0
  207. package/lib/tools/exports.js +60 -0
  208. package/lib/tools/mcp/browserFactory.js +233 -0
  209. package/lib/tools/mcp/cdpRelay.js +352 -0
  210. package/lib/tools/mcp/cli-stub.js +7 -0
  211. package/lib/tools/mcp/config.d.js +16 -0
  212. package/lib/tools/mcp/config.js +446 -0
  213. package/lib/tools/mcp/configIni.js +189 -0
  214. package/lib/tools/mcp/extensionContextFactory.js +55 -0
  215. package/lib/tools/mcp/index.js +62 -0
  216. package/lib/tools/mcp/log.js +35 -0
  217. package/lib/tools/mcp/program.js +107 -0
  218. package/lib/tools/mcp/protocol.js +28 -0
  219. package/lib/tools/mcp/watchdog.js +44 -0
  220. package/lib/tools/trace/SKILL.md +171 -0
  221. package/lib/tools/trace/installSkill.js +48 -0
  222. package/lib/tools/trace/traceActions.js +142 -0
  223. package/lib/tools/trace/traceAttachments.js +69 -0
  224. package/lib/tools/trace/traceCli.js +87 -0
  225. package/lib/tools/trace/traceConsole.js +97 -0
  226. package/lib/tools/trace/traceErrors.js +55 -0
  227. package/lib/tools/trace/traceOpen.js +69 -0
  228. package/lib/tools/trace/traceParser.js +96 -0
  229. package/lib/tools/trace/traceRequests.js +182 -0
  230. package/lib/tools/trace/traceScreenshot.js +68 -0
  231. package/lib/tools/trace/traceSnapshot.js +149 -0
  232. package/lib/tools/trace/traceUtils.js +153 -0
  233. package/lib/tools/utils/connect.js +32 -0
  234. package/lib/tools/utils/mcp/http.js +152 -0
  235. package/lib/tools/utils/mcp/server.js +230 -0
  236. package/lib/tools/utils/mcp/tool.js +47 -0
  237. package/lib/tools/utils/socketConnection.js +108 -0
  238. package/lib/utils/isomorphic/ariaSnapshot.js +60 -2
  239. package/lib/utils/isomorphic/formatUtils.js +64 -0
  240. package/lib/utils/isomorphic/jsonSchema.js +89 -0
  241. package/lib/utils/isomorphic/lruCache.js +51 -0
  242. package/lib/utils/isomorphic/mimeType.js +7 -2
  243. package/lib/utils/isomorphic/protocolFormatter.js +2 -2
  244. package/lib/utils/isomorphic/protocolMetainfo.js +127 -98
  245. package/lib/utils/isomorphic/stringUtils.js +49 -0
  246. package/lib/utils/isomorphic/timeoutRunner.js +3 -3
  247. package/lib/utils/isomorphic/trace/entries.js +16 -0
  248. package/lib/utils/isomorphic/trace/snapshotRenderer.js +492 -0
  249. package/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
  250. package/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
  251. package/lib/utils/isomorphic/trace/traceLoader.js +132 -0
  252. package/lib/utils/isomorphic/trace/traceModel.js +366 -0
  253. package/lib/utils/isomorphic/trace/traceModernizer.js +401 -0
  254. package/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
  255. package/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
  256. package/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
  257. package/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
  258. package/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
  259. package/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
  260. package/lib/utils/isomorphic/urlMatch.js +54 -1
  261. package/lib/utils/isomorphic/utilityScriptSerializers.js +11 -0
  262. package/lib/utils/isomorphic/yaml.js +84 -0
  263. package/lib/utils.js +8 -2
  264. package/lib/utilsBundle.js +5 -26
  265. package/lib/utilsBundleImpl/index.js +172 -173
  266. package/lib/vite/dashboard/assets/index-BAOybkp8.js +50 -0
  267. package/lib/vite/dashboard/assets/index-CZAYOG76.css +1 -0
  268. package/lib/vite/dashboard/index.html +28 -0
  269. package/lib/vite/htmlReport/index.html +2 -70
  270. package/lib/vite/htmlReport/report.css +1 -0
  271. package/lib/vite/htmlReport/report.js +72 -0
  272. package/lib/vite/recorder/assets/codeMirrorModule-C8KMvO9L.js +32 -0
  273. package/lib/vite/recorder/assets/{codeMirrorModule-C3UTv-Ge.css → codeMirrorModule-DYBRYzYX.css} +1 -1
  274. package/lib/vite/recorder/assets/{index-Ri0uHF7I.css → index-BSjZa4pk.css} +1 -1
  275. package/lib/vite/recorder/assets/index-CqAYX1I3.js +193 -0
  276. package/lib/vite/recorder/index.html +2 -2
  277. package/lib/vite/traceViewer/assets/codeMirrorModule-DS0FLvoc.js +32 -0
  278. package/lib/vite/traceViewer/assets/defaultSettingsView-GTWI-W_B.js +262 -0
  279. package/lib/vite/traceViewer/{codeMirrorModule.C3UTv-Ge.css → codeMirrorModule.DYBRYzYX.css} +1 -1
  280. package/lib/vite/traceViewer/defaultSettingsView.B4dS75f0.css +1 -0
  281. package/lib/vite/traceViewer/index.CzXZzn5A.css +1 -0
  282. package/lib/vite/traceViewer/index.Dtstcb7U.js +2 -0
  283. package/lib/vite/traceViewer/index.html +4 -4
  284. package/lib/vite/traceViewer/sw.bundle.js +5 -3
  285. package/lib/vite/traceViewer/uiMode.Vipi55dB.js +6 -0
  286. package/lib/vite/traceViewer/uiMode.html +3 -3
  287. package/lib/zipBundleImpl.js +2 -2
  288. package/lib/zodBundle.js +39 -0
  289. package/lib/zodBundleImpl.js +40 -0
  290. package/package.json +7 -1
  291. package/types/protocol.d.ts +1696 -221
  292. package/types/types.d.ts +879 -112
  293. package/lib/server/bidi/third_party/bidiDeserializer.js +0 -98
  294. package/lib/server/chromium/videoRecorder.js +0 -115
  295. package/lib/server/pageBinding.js +0 -87
  296. package/lib/server/trace/test/inMemorySnapshotter.js +0 -87
  297. package/lib/utils/isomorphic/oldUtilityScriptSerializers.js +0 -248
  298. package/lib/vite/recorder/assets/codeMirrorModule-CBbSe-ZI.js +0 -25
  299. package/lib/vite/recorder/assets/index-CpZVd2nA.js +0 -193
  300. package/lib/vite/traceViewer/assets/codeMirrorModule-DHz0wP2C.js +0 -25
  301. package/lib/vite/traceViewer/assets/defaultSettingsView-WsZP88O6.js +0 -266
  302. package/lib/vite/traceViewer/defaultSettingsView.ConWv5KN.css +0 -1
  303. package/lib/vite/traceViewer/index.C4Y3Aw8n.css +0 -1
  304. package/lib/vite/traceViewer/index.C8xAeo93.js +0 -2
  305. package/lib/vite/traceViewer/uiMode.BltraIJB.js +0 -5
  306. /package/lib/{server/utils → utils/isomorphic}/imageUtils.js +0 -0
  307. /package/lib/utils/isomorphic/{traceUtils.js → trace/traceUtils.js} +0 -0
@@ -1,212 +1,211 @@
1
- "use strict";var ax=Object.create;var ga=Object.defineProperty;var ox=Object.getOwnPropertyDescriptor;var lx=Object.getOwnPropertyNames;var cx=Object.getPrototypeOf,ux=Object.prototype.hasOwnProperty;var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ll=(r,e)=>{for(var t in e)ga(r,t,{get:e[t],enumerable:!0})},Lh=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of lx(e))!ux.call(r,n)&&n!==t&&ga(r,n,{get:()=>e[n],enumerable:!(i=ox(e,n))||i.enumerable});return r};var Je=(r,e,t)=>(t=r!=null?ax(cx(r)):{},Lh(e||!r||!r.__esModule?ga(t,"default",{value:r,enumerable:!0}):t,r)),fx=r=>Lh(ga({},"__esModule",{value:!0}),r);var Mh=w((Q2,Ph)=>{var Rh={};Ph.exports=Rh;var Bh={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(Bh).forEach(function(r){var e=Bh[r],t=Rh[r]=[];t.open="\x1B["+e[0]+"m",t.close="\x1B["+e[1]+"m"})});var Fh=w((X2,Dh)=>{"use strict";Dh.exports=function(r,e){e=e||process.argv;var t=e.indexOf("--"),i=/^-{1,2}/.test(r)?"":"--",n=e.indexOf(i+r);return n!==-1&&(t===-1?!0:n<t)}});var jh=w((eL,qh)=>{"use strict";var hx=require("os"),nr=Fh(),yt=process.env,cn=void 0;nr("no-color")||nr("no-colors")||nr("color=false")?cn=!1:(nr("color")||nr("colors")||nr("color=true")||nr("color=always"))&&(cn=!0);"FORCE_COLOR"in yt&&(cn=yt.FORCE_COLOR.length===0||parseInt(yt.FORCE_COLOR,10)!==0);function dx(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function px(r){if(cn===!1)return 0;if(nr("color=16m")||nr("color=full")||nr("color=truecolor"))return 3;if(nr("color=256"))return 2;if(r&&!r.isTTY&&cn!==!0)return 0;var e=cn?1:0;if(process.platform==="win32"){var t=hx.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in yt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in yt})||yt.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in yt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(yt.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in yt){var i=parseInt((yt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(yt.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(yt.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(yt.TERM)||"COLORTERM"in yt?1:(yt.TERM==="dumb",e)}function Bl(r){var e=px(r);return dx(e)}qh.exports={supportsColor:Bl,stdout:Bl(process.stdout),stderr:Bl(process.stderr)}});var $h=w((tL,Uh)=>{Uh.exports=function(e,t){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var a=n[s]||[" "],o=Math.floor(Math.random()*a.length);typeof n[s]!="undefined"?i+=n[s][o]:i+=s}),i}});var Hh=w((rL,Vh)=>{Vh.exports=function(e,t){e=e||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(i.up,i.down,i.mid);function s(l){var c=Math.floor(Math.random()*l);return c}function a(l){var c=!1;return n.filter(function(u){c=u===l}),c}function o(l,c){var u="",f,p;c=c||{},c.up=typeof c.up!="undefined"?c.up:!0,c.mid=typeof c.mid!="undefined"?c.mid:!0,c.down=typeof c.down!="undefined"?c.down:!0,c.size=typeof c.size!="undefined"?c.size:"maxi",l=l.split("");for(p in l)if(!a(p)){switch(u=u+l[p],f={up:0,down:0,mid:0},c.size){case"mini":f.up=s(8),f.mid=s(2),f.down=s(8);break;case"maxi":f.up=s(16)+3,f.mid=s(4)+1,f.down=s(64)+3;break;default:f.up=s(8)+1,f.mid=s(6)/2,f.down=s(8)+1;break}var m=["up","mid","down"];for(var g in m)for(var y=m[g],_=0;_<=f[y];_++)c[y]&&(u=u+i[y][s(i[y].length)])}return u}return o(e,t)}});var Wh=w((iL,Gh)=>{Gh.exports=function(r){return function(e,t,i){if(e===" ")return e;switch(t%3){case 0:return r.red(e);case 1:return r.white(e);case 2:return r.blue(e)}}}});var Yh=w((nL,zh)=>{zh.exports=function(r){return function(e,t,i){return t%2===0?e:r.inverse(e)}}});var Zh=w((sL,Kh)=>{Kh.exports=function(r){var e=["red","yellow","green","blue","magenta"];return function(t,i,n){return t===" "?t:r[e[i++%e.length]](t)}}});var Qh=w((aL,Jh)=>{Jh.exports=function(r){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(t,i,n){return t===" "?t:r[e[Math.round(Math.random()*(e.length-2))]](t)}}});var nd=w((lL,id)=>{var Oe={};id.exports=Oe;Oe.themes={};var mx=require("util"),bi=Oe.styles=Mh(),ed=Object.defineProperties,gx=new RegExp(/[\r\n]+/g);Oe.supportsColor=jh().supportsColor;typeof Oe.enabled=="undefined"&&(Oe.enabled=Oe.supportsColor()!==!1);Oe.enable=function(){Oe.enabled=!0};Oe.disable=function(){Oe.enabled=!1};Oe.stripColors=Oe.strip=function(r){return(""+r).replace(/\x1B\[\d+m/g,"")};var oL=Oe.stylize=function(e,t){if(!Oe.enabled)return e+"";var i=bi[t];return!i&&t in Oe?Oe[t](e):i.open+e+i.close},vx=/[|\\{}()[\]^$+*?.]/g,yx=function(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(vx,"\\$&")};function td(r){var e=function t(){return bx.apply(t,arguments)};return e._styles=r,e.__proto__=_x,e}var rd=(function(){var r={};return bi.grey=bi.gray,Object.keys(bi).forEach(function(e){bi[e].closeRe=new RegExp(yx(bi[e].close),"g"),r[e]={get:function(){return td(this._styles.concat(e))}}}),r})(),_x=ed(function(){},rd);function bx(){var r=Array.prototype.slice.call(arguments),e=r.map(function(a){return a!=null&&a.constructor===String?a:mx.inspect(a)}).join(" ");if(!Oe.enabled||!e)return e;for(var t=e.indexOf(`
2
- `)!=-1,i=this._styles,n=i.length;n--;){var s=bi[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,t&&(e=e.replace(gx,function(a){return s.close+a+s.open}))}return e}Oe.setTheme=function(r){if(typeof r=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in r)(function(t){Oe[t]=function(i){if(typeof r[t]=="object"){var n=i;for(var s in r[t])n=Oe[r[t][s]](n);return n}return Oe[r[t]](i)}})(e)};function xx(){var r={};return Object.keys(rd).forEach(function(e){r[e]={get:function(){return td([e])}}}),r}var wx=function(e,t){var i=t.split("");return i=i.map(e),i.join("")};Oe.trap=$h();Oe.zalgo=Hh();Oe.maps={};Oe.maps.america=Wh()(Oe);Oe.maps.zebra=Yh()(Oe);Oe.maps.rainbow=Zh()(Oe);Oe.maps.random=Qh()(Oe);for(Xh in Oe.maps)(function(r){Oe[r]=function(e){return wx(Oe.maps[r],e)}})(Xh);var Xh;ed(Oe,xx())});var ad=w((cL,sd)=>{var Sx=nd();sd.exports=Sx});var ld=w((uL,od)=>{var un=1e3,fn=un*60,hn=fn*60,xi=hn*24,Ex=xi*7,kx=xi*365.25;od.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return Ox(r);if(t==="number"&&isFinite(r))return e.long?Tx(r):Cx(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function Ox(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*kx;case"weeks":case"week":case"w":return t*Ex;case"days":case"day":case"d":return t*xi;case"hours":case"hour":case"hrs":case"hr":case"h":return t*hn;case"minutes":case"minute":case"mins":case"min":case"m":return t*fn;case"seconds":case"second":case"secs":case"sec":case"s":return t*un;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Cx(r){var e=Math.abs(r);return e>=xi?Math.round(r/xi)+"d":e>=hn?Math.round(r/hn)+"h":e>=fn?Math.round(r/fn)+"m":e>=un?Math.round(r/un)+"s":r+"ms"}function Tx(r){var e=Math.abs(r);return e>=xi?va(r,e,xi,"day"):e>=hn?va(r,e,hn,"hour"):e>=fn?va(r,e,fn,"minute"):e>=un?va(r,e,un,"second"):r+" ms"}function va(r,e,t,i){var n=e>=t*1.5;return Math.round(r/t)+" "+i+(n?"s":"")}});var Rl=w((fL,cd)=>{function Ax(r){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=n,t.enabled=a,t.humanize=ld(),t.destroy=c,Object.keys(r).forEach(u=>{t[u]=r[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let f=0;for(let p=0;p<u.length;p++)f=(f<<5)-f+u.charCodeAt(p),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(u){let f,p=null,m,g;function y(..._){if(!y.enabled)return;let x=y,S=Number(new Date),O=S-(f||S);x.diff=O,x.prev=f,x.curr=S,f=S,_[0]=t.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let k=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(R,T)=>{if(R==="%%")return"%";k++;let A=t.formatters[T];if(typeof A=="function"){let C=_[k];R=A.call(x,C),_.splice(k,1),k--}return R}),t.formatArgs.call(x,_),(x.log||t.log).apply(x,_)}return y.namespace=u,y.useColors=t.useColors(),y.color=t.selectColor(u),y.extend=i,y.destroy=t.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(m!==t.namespaces&&(m=t.namespaces,g=t.enabled(u)),g),set:_=>{p=_}}),typeof t.init=="function"&&t.init(y),y}function i(u,f){let p=t(this.namespace+(typeof f=="undefined"?":":f)+u);return p.log=this.log,p}function n(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let f,p=(typeof u=="string"?u:"").split(/[\s,]+/),m=p.length;for(f=0;f<m;f++)p[f]&&(u=p[f].replace(/\*/g,".*?"),u[0]==="-"?t.skips.push(new RegExp("^"+u.slice(1)+"$")):t.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...t.names.map(o),...t.skips.map(o).map(f=>"-"+f)].join(",");return t.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let f,p;for(f=0,p=t.skips.length;f<p;f++)if(t.skips[f].test(u))return!1;for(f=0,p=t.names.length;f<p;f++)if(t.names[f].test(u))return!0;return!1}function o(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}cd.exports=Ax});var ud=w((Pt,ya)=>{Pt.formatArgs=Nx;Pt.save=Lx;Pt.load=Bx;Pt.useColors=Ix;Pt.storage=Rx();Pt.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Pt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ix(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Nx(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+ya.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,i=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(i=t))}),r.splice(i,0,e)}Pt.log=console.debug||console.log||(()=>{});function Lx(r){try{r?Pt.storage.setItem("debug",r):Pt.storage.removeItem("debug")}catch{}}function Bx(){let r;try{r=Pt.storage.getItem("debug")}catch{}return!r&&typeof process!="undefined"&&"env"in process&&(r=process.env.DEBUG),r}function Rx(){try{return localStorage}catch{}}ya.exports=Rl()(Pt);var{formatters:Px}=ya.exports;Px.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var hd=w((hL,fd)=>{"use strict";fd.exports=(r,e=process.argv)=>{let t=r.startsWith("-")?"":r.length===1?"-":"--",i=e.indexOf(t+r),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}});var md=w((dL,pd)=>{"use strict";var Mx=require("os"),dd=require("tty"),$t=hd(),{env:it}=process,_a;$t("no-color")||$t("no-colors")||$t("color=false")||$t("color=never")?_a=0:($t("color")||$t("colors")||$t("color=true")||$t("color=always"))&&(_a=1);function Dx(){if("FORCE_COLOR"in it)return it.FORCE_COLOR==="true"?1:it.FORCE_COLOR==="false"?0:it.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(it.FORCE_COLOR,10),3)}function Fx(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function qx(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let i=Dx();i!==void 0&&(_a=i);let n=t?_a:i;if(n===0)return 0;if(t){if($t("color=16m")||$t("color=full")||$t("color=truecolor"))return 3;if($t("color=256"))return 2}if(r&&!e&&n===void 0)return 0;let s=n||0;if(it.TERM==="dumb")return s;if(process.platform==="win32"){let a=Mx.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in it)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in it)||it.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in it)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(it.TEAMCITY_VERSION)?1:0;if(it.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in it){let a=Number.parseInt((it.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(it.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(it.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(it.TERM)||"COLORTERM"in it?1:s}function Pl(r,e={}){let t=qx(r,{streamIsTTY:r&&r.isTTY,...e});return Fx(t)}pd.exports={supportsColor:Pl,stdout:Pl({isTTY:dd.isatty(1)}),stderr:Pl({isTTY:dd.isatty(2)})}});var vd=w((lt,xa)=>{var jx=require("tty"),ba=require("util");lt.init=zx;lt.log=Hx;lt.formatArgs=$x;lt.save=Gx;lt.load=Wx;lt.useColors=Ux;lt.destroy=ba.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");lt.colors=[6,2,3,4,5,1];try{let r=md();r&&(r.stderr||r).level>=2&&(lt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}lt.inspectOpts=Object.keys(process.env).filter(r=>/^debug_/i.test(r)).reduce((r,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),r[t]=i,r},{});function Ux(){return"colors"in lt.inspectOpts?!!lt.inspectOpts.colors:jx.isatty(process.stderr.fd)}function $x(r){let{namespace:e,useColors:t}=this;if(t){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),s=` ${n};1m${e} \x1B[0m`;r[0]=s+r[0].split(`
1
+ "use strict";var o_=Object.create;var bs=Object.defineProperty;var a_=Object.getOwnPropertyDescriptor;var l_=Object.getOwnPropertyNames;var c_=Object.getPrototypeOf,u_=Object.prototype.hasOwnProperty;var O=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),Hf=(i,e)=>{for(var t in e)bs(i,t,{get:e[t],enumerable:!0})},Gf=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l_(e))!u_.call(i,n)&&n!==t&&bs(i,n,{get:()=>e[n],enumerable:!(r=a_(e,n))||r.enumerable});return i};var He=(i,e,t)=>(t=i!=null?o_(c_(i)):{},Gf(e||!i||!i.__esModule?bs(t,"default",{value:i,enumerable:!0}):t,i)),f_=i=>Gf(bs({},"__esModule",{value:!0}),i);var zf=O((mI,Kf)=>{var Yf={};Kf.exports=Yf;var Wf={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(Wf).forEach(function(i){var e=Wf[i],t=Yf[i]=[];t.open="\x1B["+e[0]+"m",t.close="\x1B["+e[1]+"m"})});var Zf=O((gI,Jf)=>{"use strict";Jf.exports=function(i,e){e=e||process.argv;var t=e.indexOf("--"),r=/^-{1,2}/.test(i)?"":"--",n=e.indexOf(r+i);return n!==-1&&(t===-1?!0:n<t)}});var Xf=O((yI,Qf)=>{"use strict";var h_=require("os"),Ut=Zf(),lt=process.env,vr=void 0;Ut("no-color")||Ut("no-colors")||Ut("color=false")?vr=!1:(Ut("color")||Ut("colors")||Ut("color=true")||Ut("color=always"))&&(vr=!0);"FORCE_COLOR"in lt&&(vr=lt.FORCE_COLOR.length===0||parseInt(lt.FORCE_COLOR,10)!==0);function p_(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function d_(i){if(vr===!1)return 0;if(Ut("color=16m")||Ut("color=full")||Ut("color=truecolor"))return 3;if(Ut("color=256"))return 2;if(i&&!i.isTTY&&vr!==!0)return 0;var e=vr?1:0;if(process.platform==="win32"){var t=h_.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in lt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in lt})||lt.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in lt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(lt.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in lt){var r=parseInt((lt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(lt.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(lt.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(lt.TERM)||"COLORTERM"in lt?1:(lt.TERM==="dumb",e)}function Ta(i){var e=d_(i);return p_(e)}Qf.exports={supportsColor:Ta,stdout:Ta(process.stdout),stderr:Ta(process.stderr)}});var th=O((vI,eh)=>{eh.exports=function(e,t){var r="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var o=n[s]||[" "],a=Math.floor(Math.random()*o.length);typeof n[s]!="undefined"?r+=n[s][a]:r+=s}),r}});var rh=O((bI,ih)=>{ih.exports=function(e,t){e=e||" he is here ";var r={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(r.up,r.down,r.mid);function s(l){var c=Math.floor(Math.random()*l);return c}function o(l){var c=!1;return n.filter(function(u){c=u===l}),c}function a(l,c){var u="",f,d;c=c||{},c.up=typeof c.up!="undefined"?c.up:!0,c.mid=typeof c.mid!="undefined"?c.mid:!0,c.down=typeof c.down!="undefined"?c.down:!0,c.size=typeof c.size!="undefined"?c.size:"maxi",l=l.split("");for(d in l)if(!o(d)){switch(u=u+l[d],f={up:0,down:0,mid:0},c.size){case"mini":f.up=s(8),f.mid=s(2),f.down=s(8);break;case"maxi":f.up=s(16)+3,f.mid=s(4)+1,f.down=s(64)+3;break;default:f.up=s(8)+1,f.mid=s(6)/2,f.down=s(8)+1;break}var g=["up","mid","down"];for(var y in g)for(var m=g[y],b=0;b<=f[m];b++)c[m]&&(u=u+r[m][s(r[m].length)])}return u}return a(e,t)}});var sh=O((_I,nh)=>{nh.exports=function(i){return function(e,t,r){if(e===" ")return e;switch(t%3){case 0:return i.red(e);case 1:return i.white(e);case 2:return i.blue(e)}}}});var ah=O((wI,oh)=>{oh.exports=function(i){return function(e,t,r){return t%2===0?e:i.inverse(e)}}});var ch=O((xI,lh)=>{lh.exports=function(i){var e=["red","yellow","green","blue","magenta"];return function(t,r,n){return t===" "?t:i[e[r++%e.length]](t)}}});var fh=O((SI,uh)=>{uh.exports=function(i){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(t,r,n){return t===" "?t:i[e[Math.round(Math.random()*(e.length-2))]](t)}}});var yh=O((OI,gh)=>{var ye={};gh.exports=ye;ye.themes={};var m_=require("util"),Wi=ye.styles=zf(),ph=Object.defineProperties,g_=new RegExp(/[\r\n]+/g);ye.supportsColor=Xf().supportsColor;typeof ye.enabled=="undefined"&&(ye.enabled=ye.supportsColor()!==!1);ye.enable=function(){ye.enabled=!0};ye.disable=function(){ye.enabled=!1};ye.stripColors=ye.strip=function(i){return(""+i).replace(/\x1B\[\d+m/g,"")};var EI=ye.stylize=function(e,t){if(!ye.enabled)return e+"";var r=Wi[t];return!r&&t in ye?ye[t](e):r.open+e+r.close},y_=/[|\\{}()[\]^$+*?.]/g,v_=function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(y_,"\\$&")};function dh(i){var e=function t(){return __.apply(t,arguments)};return e._styles=i,e.__proto__=b_,e}var mh=(function(){var i={};return Wi.grey=Wi.gray,Object.keys(Wi).forEach(function(e){Wi[e].closeRe=new RegExp(v_(Wi[e].close),"g"),i[e]={get:function(){return dh(this._styles.concat(e))}}}),i})(),b_=ph(function(){},mh);function __(){var i=Array.prototype.slice.call(arguments),e=i.map(function(o){return o!=null&&o.constructor===String?o:m_.inspect(o)}).join(" ");if(!ye.enabled||!e)return e;for(var t=e.indexOf(`
2
+ `)!=-1,r=this._styles,n=r.length;n--;){var s=Wi[r[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,t&&(e=e.replace(g_,function(o){return s.close+o+s.open}))}return e}ye.setTheme=function(i){if(typeof i=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in i)(function(t){ye[t]=function(r){if(typeof i[t]=="object"){var n=r;for(var s in i[t])n=ye[i[t][s]](n);return n}return ye[i[t]](r)}})(e)};function w_(){var i={};return Object.keys(mh).forEach(function(e){i[e]={get:function(){return dh([e])}}}),i}var x_=function(e,t){var r=t.split("");return r=r.map(e),r.join("")};ye.trap=th();ye.zalgo=rh();ye.maps={};ye.maps.america=sh()(ye);ye.maps.zebra=ah()(ye);ye.maps.rainbow=ch()(ye);ye.maps.random=fh()(ye);for(hh in ye.maps)(function(i){ye[i]=function(e){return x_(ye.maps[i],e)}})(hh);var hh;ph(ye,w_())});var bh=O((kI,vh)=>{var S_=yh();vh.exports=S_});var wh=O((CI,_h)=>{var br=1e3,_r=br*60,wr=_r*60,Yi=wr*24,E_=Yi*7,O_=Yi*365.25;_h.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return k_(i);if(t==="number"&&isFinite(i))return e.long?T_(i):C_(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function k_(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*O_;case"weeks":case"week":case"w":return t*E_;case"days":case"day":case"d":return t*Yi;case"hours":case"hour":case"hrs":case"hr":case"h":return t*wr;case"minutes":case"minute":case"mins":case"min":case"m":return t*_r;case"seconds":case"second":case"secs":case"sec":case"s":return t*br;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function C_(i){var e=Math.abs(i);return e>=Yi?Math.round(i/Yi)+"d":e>=wr?Math.round(i/wr)+"h":e>=_r?Math.round(i/_r)+"m":e>=br?Math.round(i/br)+"s":i+"ms"}function T_(i){var e=Math.abs(i);return e>=Yi?_s(i,e,Yi,"day"):e>=wr?_s(i,e,wr,"hour"):e>=_r?_s(i,e,_r,"minute"):e>=br?_s(i,e,br,"second"):i+" ms"}function _s(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var Aa=O((TI,xh)=>{function A_(i){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=n,t.enabled=o,t.humanize=wh(),t.destroy=c,Object.keys(i).forEach(u=>{t[u]=i[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let f=0;for(let d=0;d<u.length;d++)f=(f<<5)-f+u.charCodeAt(d),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(u){let f,d=null,g,y;function m(...b){if(!m.enabled)return;let w=m,x=Number(new Date),_=x-(f||x);w.diff=_,w.prev=f,w.curr=x,f=x,b[0]=t.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let k=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(R,T)=>{if(R==="%%")return"%";k++;let N=t.formatters[T];if(typeof N=="function"){let C=b[k];R=N.call(w,C),b.splice(k,1),k--}return R}),t.formatArgs.call(w,b),(w.log||t.log).apply(w,b)}return m.namespace=u,m.useColors=t.useColors(),m.color=t.selectColor(u),m.extend=r,m.destroy=t.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==t.namespaces&&(g=t.namespaces,y=t.enabled(u)),y),set:b=>{d=b}}),typeof t.init=="function"&&t.init(m),m}function r(u,f){let d=t(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function n(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),g=d.length;for(f=0;f<g;f++)d[f]&&(u=d[f].replace(/\*/g,".*?"),u[0]==="-"?t.skips.push(new RegExp("^"+u.slice(1)+"$")):t.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...t.names.map(a),...t.skips.map(a).map(f=>"-"+f)].join(",");return t.enable(""),u}function o(u){if(u[u.length-1]==="*")return!0;let f,d;for(f=0,d=t.skips.length;f<d;f++)if(t.skips[f].test(u))return!1;for(f=0,d=t.names.length;f<d;f++)if(t.names[f].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}xh.exports=A_});var Sh=O((xt,ws)=>{xt.formatArgs=N_;xt.save=B_;xt.load=L_;xt.useColors=I_;xt.storage=P_();xt.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();xt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function I_(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function N_(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+ws.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,r=0;i[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(r=t))}),i.splice(r,0,e)}xt.log=console.debug||console.log||(()=>{});function B_(i){try{i?xt.storage.setItem("debug",i):xt.storage.removeItem("debug")}catch{}}function L_(){let i;try{i=xt.storage.getItem("debug")}catch{}return!i&&typeof process!="undefined"&&"env"in process&&(i=process.env.DEBUG),i}function P_(){try{return localStorage}catch{}}ws.exports=Aa()(xt);var{formatters:R_}=ws.exports;R_.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Oh=O((AI,Eh)=>{"use strict";Eh.exports=(i,e=process.argv)=>{let t=i.startsWith("-")?"":i.length===1?"-":"--",r=e.indexOf(t+i),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)}});var Th=O((II,Ch)=>{"use strict";var M_=require("os"),kh=require("tty"),At=Oh(),{env:Je}=process,xs;At("no-color")||At("no-colors")||At("color=false")||At("color=never")?xs=0:(At("color")||At("colors")||At("color=true")||At("color=always"))&&(xs=1);function D_(){if("FORCE_COLOR"in Je)return Je.FORCE_COLOR==="true"?1:Je.FORCE_COLOR==="false"?0:Je.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Je.FORCE_COLOR,10),3)}function q_(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function F_(i,{streamIsTTY:e,sniffFlags:t=!0}={}){let r=D_();r!==void 0&&(xs=r);let n=t?xs:r;if(n===0)return 0;if(t){if(At("color=16m")||At("color=full")||At("color=truecolor"))return 3;if(At("color=256"))return 2}if(i&&!e&&n===void 0)return 0;let s=n||0;if(Je.TERM==="dumb")return s;if(process.platform==="win32"){let o=M_.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Je)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in Je)||Je.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Je)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Je.TEAMCITY_VERSION)?1:0;if(Je.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Je){let o=Number.parseInt((Je.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Je.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Je.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Je.TERM)||"COLORTERM"in Je?1:s}function Ia(i,e={}){let t=F_(i,{streamIsTTY:i&&i.isTTY,...e});return q_(t)}Ch.exports={supportsColor:Ia,stdout:Ia({isTTY:kh.isatty(1)}),stderr:Ia({isTTY:kh.isatty(2)})}});var Ih=O((tt,Es)=>{var j_=require("tty"),Ss=require("util");tt.init=Y_;tt.log=H_;tt.formatArgs=$_;tt.save=G_;tt.load=W_;tt.useColors=U_;tt.destroy=Ss.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");tt.colors=[6,2,3,4,5,1];try{let i=Th();i&&(i.stderr||i).level>=2&&(tt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}tt.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),i[t]=r,i},{});function U_(){return"colors"in tt.inspectOpts?!!tt.inspectOpts.colors:j_.isatty(process.stderr.fd)}function $_(i){let{namespace:e,useColors:t}=this;if(t){let r=this.color,n="\x1B[3"+(r<8?r:"8;5;"+r),s=` ${n};1m${e} \x1B[0m`;i[0]=s+i[0].split(`
3
3
  `).join(`
4
- `+s),r.push(n+"m+"+xa.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=Vx()+e+" "+r[0]}function Vx(){return lt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Hx(...r){return process.stderr.write(ba.format(...r)+`
5
- `)}function Gx(r){r?process.env.DEBUG=r:delete process.env.DEBUG}function Wx(){return process.env.DEBUG}function zx(r){r.inspectOpts={};let e=Object.keys(lt.inspectOpts);for(let t=0;t<e.length;t++)r.inspectOpts[e[t]]=lt.inspectOpts[e[t]]}xa.exports=Rl()(lt);var{formatters:gd}=xa.exports;gd.o=function(r){return this.inspectOpts.colors=this.useColors,ba.inspect(r,this.inspectOpts).split(`
6
- `).map(e=>e.trim()).join(" ")};gd.O=function(r){return this.inspectOpts.colors=this.useColors,ba.inspect(r,this.inspectOpts)}});var ts=w((pL,Ml)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ml.exports=ud():Ml.exports=vd()});var $d=w((mL,Aw)=>{Aw.exports={name:"dotenv",version:"16.4.5",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Wd=w((gL,Tr)=>{var Wl=require("fs"),zl=require("path"),Iw=require("os"),Nw=require("crypto"),Lw=$d(),Yl=Lw.version,Bw=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Rw(r){let e={},t=r.toString();t=t.replace(/\r\n?/mg,`
7
- `);let i;for(;(i=Bw.exec(t))!=null;){let n=i[1],s=i[2]||"";s=s.trim();let a=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),a==='"'&&(s=s.replace(/\\n/g,`
8
- `),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function Pw(r){let e=Gd(r),t=Qe.configDotenv({path:e});if(!t.parsed){let a=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw a.code="MISSING_DATA",a}let i=Hd(r).split(","),n=i.length,s;for(let a=0;a<n;a++)try{let o=i[a].trim(),l=Fw(t,o);s=Qe.decrypt(l.ciphertext,l.key);break}catch(o){if(a+1>=n)throw o}return Qe.parse(s)}function Mw(r){console.log(`[dotenv@${Yl}][INFO] ${r}`)}function Dw(r){console.log(`[dotenv@${Yl}][WARN] ${r}`)}function Ia(r){console.log(`[dotenv@${Yl}][DEBUG] ${r}`)}function Hd(r){return r&&r.DOTENV_KEY&&r.DOTENV_KEY.length>0?r.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function Fw(r,e){let t;try{t=new URL(e)}catch(o){if(o.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw o}let i=t.password;if(!i){let o=new Error("INVALID_DOTENV_KEY: Missing key part");throw o.code="INVALID_DOTENV_KEY",o}let n=t.searchParams.get("environment");if(!n){let o=new Error("INVALID_DOTENV_KEY: Missing environment part");throw o.code="INVALID_DOTENV_KEY",o}let s=`DOTENV_VAULT_${n.toUpperCase()}`,a=r.parsed[s];if(!a){let o=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw o.code="NOT_FOUND_DOTENV_ENVIRONMENT",o}return{ciphertext:a,key:i}}function Gd(r){let e=null;if(r&&r.path&&r.path.length>0)if(Array.isArray(r.path))for(let t of r.path)Wl.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=r.path.endsWith(".vault")?r.path:`${r.path}.vault`;else e=zl.resolve(process.cwd(),".env.vault");return Wl.existsSync(e)?e:null}function Vd(r){return r[0]==="~"?zl.join(Iw.homedir(),r.slice(1)):r}function qw(r){Mw("Loading env from encrypted .env.vault");let e=Qe._parseVault(r),t=process.env;return r&&r.processEnv!=null&&(t=r.processEnv),Qe.populate(t,e,r),{parsed:e}}function jw(r){let e=zl.resolve(process.cwd(),".env"),t="utf8",i=!!(r&&r.debug);r&&r.encoding?t=r.encoding:i&&Ia("No encoding is specified. UTF-8 is used by default");let n=[e];if(r&&r.path)if(!Array.isArray(r.path))n=[Vd(r.path)];else{n=[];for(let l of r.path)n.push(Vd(l))}let s,a={};for(let l of n)try{let c=Qe.parse(Wl.readFileSync(l,{encoding:t}));Qe.populate(a,c,r)}catch(c){i&&Ia(`Failed to load ${l} ${c.message}`),s=c}let o=process.env;return r&&r.processEnv!=null&&(o=r.processEnv),Qe.populate(o,a,r),s?{parsed:a,error:s}:{parsed:a}}function Uw(r){if(Hd(r).length===0)return Qe.configDotenv(r);let e=Gd(r);return e?Qe._configVault(r):(Dw(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),Qe.configDotenv(r))}function $w(r,e){let t=Buffer.from(e.slice(-64),"hex"),i=Buffer.from(r,"base64"),n=i.subarray(0,12),s=i.subarray(-16);i=i.subarray(12,-16);try{let a=Nw.createDecipheriv("aes-256-gcm",t,n);return a.setAuthTag(s),`${a.update(i)}${a.final()}`}catch(a){let o=a instanceof RangeError,l=a.message==="Invalid key length",c=a.message==="Unsupported state or unable to authenticate data";if(o||l){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(c){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw a}}function Vw(r,e,t={}){let i=!!(t&&t.debug),n=!!(t&&t.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(r,s)?(n===!0&&(r[s]=e[s]),i&&Ia(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):r[s]=e[s]}var Qe={configDotenv:jw,_configVault:qw,_parseVault:Pw,config:Uw,decrypt:$w,parse:Rw,populate:Vw};Tr.exports.configDotenv=Qe.configDotenv;Tr.exports._configVault=Qe._configVault;Tr.exports._parseVault=Qe._parseVault;Tr.exports.config=Qe.config;Tr.exports.decrypt=Qe.decrypt;Tr.exports.parse=Qe.parse;Tr.exports.populate=Qe.populate;Tr.exports=Qe});var Yd=w(zd=>{"use strict";var Hw=require("url").parse,Gw={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Ww=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function zw(r){var e=typeof r=="string"?Hw(r):r||{},t=e.protocol,i=e.host,n=e.port;if(typeof i!="string"||!i||typeof t!="string"||(t=t.split(":",1)[0],i=i.replace(/:\d*$/,""),n=parseInt(n)||Gw[t]||0,!Yw(i,n)))return"";var s=pn("npm_config_"+t+"_proxy")||pn(t+"_proxy")||pn("npm_config_proxy")||pn("all_proxy");return s&&s.indexOf("://")===-1&&(s=t+"://"+s),s}function Yw(r,e){var t=(pn("npm_config_no_proxy")||pn("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),s=n?n[1]:i,a=n?parseInt(n[2]):0;return a&&a!==e?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!Ww.call(r,s)):r!==s}):!0}function pn(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}zd.getProxyForUrl=zw});var Jd=w(Ot=>{"use strict";var Kw=Ot&&Ot.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),Zw=Ot&&Ot.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),Kd=Ot&&Ot.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Kw(e,r,t);return Zw(e,r),e};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.req=Ot.json=Ot.toBuffer=void 0;var Jw=Kd(require("http")),Qw=Kd(require("https"));async function Zd(r){let e=0,t=[];for await(let i of r)e+=i.length,t.push(i);return Buffer.concat(t,e)}Ot.toBuffer=Zd;async function Xw(r){let t=(await Zd(r)).toString("utf8");try{return JSON.parse(t)}catch(i){let n=i;throw n.message+=` (input: ${t})`,n}}Ot.json=Xw;function e1(r,e={}){let i=((typeof r=="string"?r:r.href).startsWith("https:")?Qw:Jw).request(r,e),n=new Promise((s,a)=>{i.once("response",s).once("error",a).end()});return i.then=n.then.bind(n),i}Ot.req=e1});var Zl=w(Mt=>{"use strict";var Xd=Mt&&Mt.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),t1=Mt&&Mt.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),ep=Mt&&Mt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&Xd(e,r,t);return t1(e,r),e},r1=Mt&&Mt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Xd(e,r,t)};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.Agent=void 0;var i1=ep(require("net")),Qd=ep(require("http")),n1=require("https");r1(Jd(),Mt);var fr=Symbol("AgentBaseInternalState"),Kl=class extends Qd.Agent{constructor(e){super(e),this[fr]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
9
- `).some(i=>i.indexOf("(https.js:")!==-1||i.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new i1.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let i=this.sockets[e],n=i.indexOf(t);n!==-1&&(i.splice(n,1),this.totalSocketCount--,i.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?n1.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,i){let n={...t,secureEndpoint:this.isSecureEndpoint(t)},s=this.getName(n),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(o=>{if(this.decrementSockets(s,a),o instanceof Qd.Agent)try{return o.addRequest(e,n)}catch(l){return i(l)}this[fr].currentSocket=o,super.createSocket(e,t,i)},o=>{this.decrementSockets(s,a),i(o)})}createConnection(){let e=this[fr].currentSocket;if(this[fr].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){var e;return(e=this[fr].defaultPort)!=null?e:this.protocol==="https:"?443:80}set defaultPort(e){this[fr]&&(this[fr].defaultPort=e)}get protocol(){var e;return(e=this[fr].protocol)!=null?e:this.isSecureEndpoint()?"https:":"http:"}set protocol(e){this[fr]&&(this[fr].protocol=e)}};Mt.Agent=Kl});var tp=w(mn=>{"use strict";var s1=mn&&mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0});mn.parseProxyResponse=void 0;var a1=s1(ts()),Na=(0,a1.default)("https-proxy-agent:parse-proxy-response");function o1(r){return new Promise((e,t)=>{let i=0,n=[];function s(){let u=r.read();u?c(u):r.once("readable",s)}function a(){r.removeListener("end",o),r.removeListener("error",l),r.removeListener("readable",s)}function o(){a(),Na("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}function l(u){a(),Na("onerror %o",u),t(u)}function c(u){n.push(u),i+=u.length;let f=Buffer.concat(n,i),p=f.indexOf(`\r
4
+ `+s),i.push(n+"m+"+Es.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=V_()+e+" "+i[0]}function V_(){return tt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function H_(...i){return process.stderr.write(Ss.format(...i)+`
5
+ `)}function G_(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function W_(){return process.env.DEBUG}function Y_(i){i.inspectOpts={};let e=Object.keys(tt.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=tt.inspectOpts[e[t]]}Es.exports=Aa()(tt);var{formatters:Ah}=Es.exports;Ah.o=function(i){return this.inspectOpts.colors=this.useColors,Ss.inspect(i,this.inspectOpts).split(`
6
+ `).map(e=>e.trim()).join(" ")};Ah.O=function(i){return this.inspectOpts.colors=this.useColors,Ss.inspect(i,this.inspectOpts)}});var nn=O((NI,Na)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Na.exports=Sh():Na.exports=Ih()});var Rh=O((BI,Ph)=>{var{hasOwnProperty:Ba}=Object.prototype,La=(i,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process!="undefined"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
7
+ `:`
8
+ `,r=e.whitespace?" = ":"=",n=[],s=e.sort?Object.keys(i).sort():Object.keys(i),o=0;e.align&&(o=oi(s.filter(c=>i[c]===null||Array.isArray(i[c])||typeof i[c]!="object").map(c=>Array.isArray(i[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>oi(c).length>=oi(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of s){let u=i[c];if(u&&Array.isArray(u))for(let f of u)a+=oi(`${c}${l}`).padEnd(o," ")+r+oi(f)+t;else u&&typeof u=="object"?n.push(c):a+=oi(c).padEnd(o," ")+r+oi(u)+t}e.section&&a.length&&(a="["+oi(e.section)+"]"+(e.newline?t+t:t)+a);for(let c of n){let u=Bh(c,".").join("\\."),f=(e.section?e.section+".":"")+u,d=La(i[c],{...e,section:f});a.length&&d.length&&(a+=t),a+=d}return a};function Bh(i,e){var t=0,r=0,n=0,s=[];do if(n=i.indexOf(e,t),n!==-1){if(t=n+e.length,n>0&&i[n-1]==="\\")continue;s.push(i.slice(r,n)),r=n+e.length}while(n!==-1);return s.push(i.slice(r)),s}var Nh=(i,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),r=t,n=null,s=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=i.split(/[\r\n]+/g),a={};for(let c of o){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let u=c.match(s);if(!u)continue;if(u[1]!==void 0){if(n=Os(u[1]),n==="__proto__"){r=Object.create(null);continue}r=t[n]=t[n]||Object.create(null);continue}let f=Os(u[2]),d;e.bracketedArray?d=f.length>2&&f.slice(-2)==="[]":(a[f]=((a==null?void 0:a[f])||0)+1,d=a[f]>1);let g=d&&f.endsWith("[]")?f.slice(0,-2):f;if(g==="__proto__")continue;let y=u[3]?Os(u[4]):!0,m=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;d&&(Ba.call(r,g)?Array.isArray(r[g])||(r[g]=[r[g]]):r[g]=[]),Array.isArray(r[g])?r[g].push(m):r[g]=m}let l=[];for(let c of Object.keys(t)){if(!Ba.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let u=Bh(c,".");r=t;let f=u.pop(),d=f.replace(/\\\./g,".");for(let g of u)g!=="__proto__"&&((!Ba.call(r,g)||typeof r[g]!="object")&&(r[g]=Object.create(null)),r=r[g]);r===t&&d===f||(r[d]=t[c],l.push(c))}for(let c of l)delete t[c];return t},Lh=i=>i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"),oi=i=>typeof i!="string"||i.match(/[=\r\n]/)||i.match(/^\[/)||i.length>1&&Lh(i)||i!==i.trim()?JSON.stringify(i):i.split(";").join("\\;").split("#").join("\\#"),Os=i=>{if(i=(i||"").trim(),Lh(i)){i.charAt(0)==="'"&&(i=i.slice(1,-1));try{i=JSON.parse(i)}catch{}}else{let e=!1,t="";for(let r=0,n=i.length;r<n;r++){let s=i.charAt(r);if(e)"\\;#".indexOf(s)!==-1?t+=s:t+="\\"+s,e=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?e=!0:t+=s}}return e&&(t+="\\"),t.trim()}return i};Ph.exports={parse:Nh,decode:Nh,stringify:La,encode:La,safe:oi,unsafe:Os}});var ip=O((k2,ew)=>{ew.exports={name:"dotenv",version:"16.4.5",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var op=O((C2,ai)=>{var ll=require("fs"),cl=require("path"),tw=require("os"),iw=require("crypto"),rw=ip(),ul=rw.version,nw=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function sw(i){let e={},t=i.toString();t=t.replace(/\r\n?/mg,`
9
+ `);let r;for(;(r=nw.exec(t))!=null;){let n=r[1],s=r[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
10
+ `),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function ow(i){let e=sp(i),t=Ge.configDotenv({path:e});if(!t.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=np(i).split(","),n=r.length,s;for(let o=0;o<n;o++)try{let a=r[o].trim(),l=cw(t,a);s=Ge.decrypt(l.ciphertext,l.key);break}catch(a){if(o+1>=n)throw a}return Ge.parse(s)}function aw(i){console.log(`[dotenv@${ul}][INFO] ${i}`)}function lw(i){console.log(`[dotenv@${ul}][WARN] ${i}`)}function Bs(i){console.log(`[dotenv@${ul}][DEBUG] ${i}`)}function np(i){return i&&i.DOTENV_KEY&&i.DOTENV_KEY.length>0?i.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function cw(i,e){let t;try{t=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let r=t.password;if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let n=t.searchParams.get("environment");if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let s=`DOTENV_VAULT_${n.toUpperCase()}`,o=i.parsed[s];if(!o){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:o,key:r}}function sp(i){let e=null;if(i&&i.path&&i.path.length>0)if(Array.isArray(i.path))for(let t of i.path)ll.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=i.path.endsWith(".vault")?i.path:`${i.path}.vault`;else e=cl.resolve(process.cwd(),".env.vault");return ll.existsSync(e)?e:null}function rp(i){return i[0]==="~"?cl.join(tw.homedir(),i.slice(1)):i}function uw(i){aw("Loading env from encrypted .env.vault");let e=Ge._parseVault(i),t=process.env;return i&&i.processEnv!=null&&(t=i.processEnv),Ge.populate(t,e,i),{parsed:e}}function fw(i){let e=cl.resolve(process.cwd(),".env"),t="utf8",r=!!(i&&i.debug);i&&i.encoding?t=i.encoding:r&&Bs("No encoding is specified. UTF-8 is used by default");let n=[e];if(i&&i.path)if(!Array.isArray(i.path))n=[rp(i.path)];else{n=[];for(let l of i.path)n.push(rp(l))}let s,o={};for(let l of n)try{let c=Ge.parse(ll.readFileSync(l,{encoding:t}));Ge.populate(o,c,i)}catch(c){r&&Bs(`Failed to load ${l} ${c.message}`),s=c}let a=process.env;return i&&i.processEnv!=null&&(a=i.processEnv),Ge.populate(a,o,i),s?{parsed:o,error:s}:{parsed:o}}function hw(i){if(np(i).length===0)return Ge.configDotenv(i);let e=sp(i);return e?Ge._configVault(i):(lw(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),Ge.configDotenv(i))}function pw(i,e){let t=Buffer.from(e.slice(-64),"hex"),r=Buffer.from(i,"base64"),n=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{let o=iw.createDecipheriv("aes-256-gcm",t,n);return o.setAuthTag(s),`${o.update(r)}${o.final()}`}catch(o){let a=o instanceof RangeError,l=o.message==="Invalid key length",c=o.message==="Unsupported state or unable to authenticate data";if(a||l){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(c){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw o}}function dw(i,e,t={}){let r=!!(t&&t.debug),n=!!(t&&t.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(i,s)?(n===!0&&(i[s]=e[s]),r&&Bs(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):i[s]=e[s]}var Ge={configDotenv:fw,_configVault:uw,_parseVault:ow,config:hw,decrypt:pw,parse:sw,populate:dw};ai.exports.configDotenv=Ge.configDotenv;ai.exports._configVault=Ge._configVault;ai.exports._parseVault=Ge._parseVault;ai.exports.config=Ge.config;ai.exports.decrypt=Ge.decrypt;ai.exports.parse=Ge.parse;ai.exports.populate=Ge.populate;ai.exports=Ge});var up=O(mt=>{"use strict";var vw=mt&&mt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),bw=mt&&mt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),lp=mt&&mt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&vw(e,i,t);return bw(e,i),e};Object.defineProperty(mt,"__esModule",{value:!0});mt.req=mt.json=mt.toBuffer=void 0;var _w=lp(require("http")),ww=lp(require("https"));async function cp(i){let e=0,t=[];for await(let r of i)e+=r.length,t.push(r);return Buffer.concat(t,e)}mt.toBuffer=cp;async function xw(i){let t=(await cp(i)).toString("utf8");try{return JSON.parse(t)}catch(r){let n=r;throw n.message+=` (input: ${t})`,n}}mt.json=xw;function Sw(i,e={}){let r=((typeof i=="string"?i:i.href).startsWith("https:")?ww:_w).request(i,e),n=new Promise((s,o)=>{r.once("response",s).once("error",o).end()});return r.then=n.then.bind(n),r}mt.req=Sw});var pl=O(St=>{"use strict";var hp=St&&St.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Ew=St&&St.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),pp=St&&St.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&hp(e,i,t);return Ew(e,i),e},Ow=St&&St.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&hp(e,i,t)};Object.defineProperty(St,"__esModule",{value:!0});St.Agent=void 0;var kw=pp(require("net")),fp=pp(require("http")),Cw=require("https");Ow(up(),St);var Kt=Symbol("AgentBaseInternalState"),hl=class extends fp.Agent{constructor(e){super(e),this[Kt]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
11
+ `).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new kw.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let r=this.sockets[e],n=r.indexOf(t);n!==-1&&(r.splice(n,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Cw.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){let n={...t,secureEndpoint:this.isSecureEndpoint(t)},s=this.getName(n),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(s,o),a instanceof fp.Agent)try{return a.addRequest(e,n)}catch(l){return r(l)}this[Kt].currentSocket=a,super.createSocket(e,t,r)},a=>{this.decrementSockets(s,o),r(a)})}createConnection(){let e=this[Kt].currentSocket;if(this[Kt].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){var e;return(e=this[Kt].defaultPort)!=null?e:this.protocol==="https:"?443:80}set defaultPort(e){this[Kt]&&(this[Kt].defaultPort=e)}get protocol(){var e;return(e=this[Kt].protocol)!=null?e:this.isSecureEndpoint()?"https:":"http:"}set protocol(e){this[Kt]&&(this[Kt].protocol=e)}};St.Agent=hl});var dp=O(Er=>{"use strict";var Tw=Er&&Er.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Er,"__esModule",{value:!0});Er.parseProxyResponse=void 0;var Aw=Tw(nn()),Ls=(0,Aw.default)("https-proxy-agent:parse-proxy-response");function Iw(i){return new Promise((e,t)=>{let r=0,n=[];function s(){let u=i.read();u?c(u):i.once("readable",s)}function o(){i.removeListener("end",a),i.removeListener("error",l),i.removeListener("readable",s)}function a(){o(),Ls("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}function l(u){o(),Ls("onerror %o",u),t(u)}function c(u){n.push(u),r+=u.length;let f=Buffer.concat(n,r),d=f.indexOf(`\r
10
12
  \r
11
- `);if(p===-1){Na("have not received end of HTTP headers yet..."),s();return}let m=f.slice(0,p).toString("ascii").split(`\r
12
- `),g=m.shift();if(!g)return r.destroy(),t(new Error("No header received from proxy CONNECT response"));let y=g.split(" "),_=+y[1],x=y.slice(2).join(" "),S={};for(let O of m){if(!O)continue;let k=O.indexOf(":");if(k===-1)return r.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${O}"`));let E=O.slice(0,k).toLowerCase(),R=O.slice(k+1).trimStart(),T=S[E];typeof T=="string"?S[E]=[T,R]:Array.isArray(T)?T.push(R):S[E]=R}Na("got proxy server response: %o %o",g,S),a(),e({connect:{statusCode:_,statusText:x,headers:S},buffered:f})}r.on("error",l),r.on("end",o),s()})}mn.parseProxyResponse=o1});var op=w(Ht=>{"use strict";var l1=Ht&&Ht.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),c1=Ht&&Ht.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),sp=Ht&&Ht.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&l1(e,r,t);return c1(e,r),e},ap=Ht&&Ht.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.HttpsProxyAgent=void 0;var La=sp(require("net")),rp=sp(require("tls")),u1=ap(require("assert")),f1=ap(ts()),h1=Zl(),d1=require("url"),p1=tp(),ss=(0,f1.default)("https-proxy-agent"),ip=r=>r.servername===void 0&&r.host&&!La.isIP(r.host)?{...r,servername:r.host}:r,Ba=class extends h1.Agent{constructor(e,t){var s;super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new d1.URL(e):e,this.proxyHeaders=(s=t==null?void 0:t.headers)!=null?s:{},ss("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let i=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?np(t,"headers"):null,host:i,port:n}}async connect(e,t){let{proxy:i}=this;if(!t.host)throw new TypeError('No "host" provided');let n;i.protocol==="https:"?(ss("Creating `tls.Socket`: %o",this.connectOpts),n=rp.connect(ip(this.connectOpts))):(ss("Creating `net.Socket`: %o",this.connectOpts),n=La.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=La.isIPv6(t.host)?`[${t.host}]`:t.host,o=`CONNECT ${a}:${t.port} HTTP/1.1\r
13
- `;if(i.username||i.password){let p=`${decodeURIComponent(i.username)}:${decodeURIComponent(i.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}s.Host=`${a}:${t.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(s))o+=`${p}: ${s[p]}\r
14
- `;let l=(0,p1.parseProxyResponse)(n);n.write(`${o}\r
15
- `);let{connect:c,buffered:u}=await l;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",m1),t.secureEndpoint?(ss("Upgrading socket connection to TLS"),rp.connect({...np(ip(t),"host","path","port"),socket:n})):n;n.destroy();let f=new La.Socket({writable:!1});return f.readable=!0,e.once("socket",p=>{ss("Replaying proxy buffer for failed request"),(0,u1.default)(p.listenerCount("data")>0),p.push(u),p.push(null)}),f}};Ba.protocols=["http","https"];Ht.HttpsProxyAgent=Ba;function m1(r){r.resume()}function np(r,...e){let t={},i;for(i in r)e.includes(i)||(t[i]=r[i]);return t}});var up=w((wL,Ra)=>{var cp=cp||function(r){return Buffer.from(r).toString("base64")};function g1(r){var e=this,t=Math.round,i=Math.floor,n=new Array(64),s=new Array(64),a=new Array(64),o=new Array(64),l,c,u,f,p=new Array(65535),m=new Array(65535),g=new Array(64),y=new Array(64),_=[],x=0,S=7,O=new Array(64),k=new Array(64),E=new Array(64),R=new Array(256),T=new Array(2048),A,C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],L=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],$=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],q=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],G=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],U=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Z=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function re(I){for(var te=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],ae=0;ae<64;ae++){var ne=i((te[ae]*I+50)/100);ne<1?ne=1:ne>255&&(ne=255),n[C[ae]]=ne}for(var pe=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],me=0;me<64;me++){var Ae=i((pe[me]*I+50)/100);Ae<1?Ae=1:Ae>255&&(Ae=255),s[C[me]]=Ae}for(var Ie=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ve=0,Fe=0;Fe<8;Fe++)for(var j=0;j<8;j++)a[Ve]=1/(n[C[Ve]]*Ie[Fe]*Ie[j]*8),o[Ve]=1/(s[C[Ve]]*Ie[Fe]*Ie[j]*8),Ve++}function Y(I,te){for(var ae=0,ne=0,pe=new Array,me=1;me<=16;me++){for(var Ae=1;Ae<=I[me];Ae++)pe[te[ne]]=[],pe[te[ne]][0]=ae,pe[te[ne]][1]=me,ne++,ae++;ae*=2}return pe}function we(){l=Y(L,P),c=Y(G,U),u=Y($,q),f=Y(H,Z)}function de(){for(var I=1,te=2,ae=1;ae<=15;ae++){for(var ne=I;ne<te;ne++)m[32767+ne]=ae,p[32767+ne]=[],p[32767+ne][1]=ae,p[32767+ne][0]=ne;for(var pe=-(te-1);pe<=-I;pe++)m[32767+pe]=ae,p[32767+pe]=[],p[32767+pe][1]=ae,p[32767+pe][0]=te-1+pe;I<<=1,te<<=1}}function ue(){for(var I=0;I<256;I++)T[I]=19595*I,T[I+256>>0]=38470*I,T[I+512>>0]=7471*I+32768,T[I+768>>0]=-11059*I,T[I+1024>>0]=-21709*I,T[I+1280>>0]=32768*I+8421375,T[I+1536>>0]=-27439*I,T[I+1792>>0]=-5329*I}function ve(I){for(var te=I[0],ae=I[1]-1;ae>=0;)te&1<<ae&&(x|=1<<S),ae--,S--,S<0&&(x==255?(N(255),N(0)):N(x),S=7,x=0)}function N(I){_.push(I)}function ie(I){N(I>>8&255),N(I&255)}function Pe(I,te){var ae,ne,pe,me,Ae,Ie,Ve,Fe,j=0,X,fe=8,je=64;for(X=0;X<fe;++X){ae=I[j],ne=I[j+1],pe=I[j+2],me=I[j+3],Ae=I[j+4],Ie=I[j+5],Ve=I[j+6],Fe=I[j+7];var he=ae+Fe,Se=ae-Fe,Be=ne+Ve,le=ne-Ve,Ne=pe+Ie,Ze=pe-Ie,qe=me+Ae,Et=me-Ae,jt=he+qe,Er=he-qe,Ur=Be+Ne,$r=Be-Ne;I[j]=jt+Ur,I[j+4]=jt-Ur;var hi=($r+Er)*.707106781;I[j+2]=Er+hi,I[j+6]=Er-hi,jt=Et+Ze,Ur=Ze+le,$r=le+Se;var di=(jt-$r)*.382683433,an=.5411961*jt+di,pi=1.306562965*$r+di,mi=Ur*.707106781,gi=Se+mi,vi=Se-mi;I[j+5]=vi+an,I[j+3]=vi-an,I[j+1]=gi+pi,I[j+7]=gi-pi,j+=8}for(j=0,X=0;X<fe;++X){ae=I[j],ne=I[j+8],pe=I[j+16],me=I[j+24],Ae=I[j+32],Ie=I[j+40],Ve=I[j+48],Fe=I[j+56];var ta=ae+Fe,es=ae-Fe,ra=ne+Ve,ia=ne-Ve,na=pe+Ie,sa=pe-Ie,aa=me+Ae,Cl=me-Ae,yi=ta+aa,kr=ta-aa,_i=ra+na,on=ra-na;I[j]=yi+_i,I[j+32]=yi-_i;var oa=(on+kr)*.707106781;I[j+16]=kr+oa,I[j+48]=kr-oa,yi=Cl+sa,_i=sa+ia,on=ia+es;var la=(yi-on)*.382683433,ca=.5411961*yi+la,ua=1.306562965*on+la,ur=_i*.707106781,fa=es+ur,ha=es-ur;I[j+40]=ha+ca,I[j+24]=ha-ca,I[j+8]=fa+ua,I[j+56]=fa-ua,j++}var ln;for(X=0;X<je;++X)ln=I[X]*te[X],g[X]=ln>0?ln+.5|0:ln-.5|0;return g}function Te(){ie(65504),ie(16),N(74),N(70),N(73),N(70),N(0),N(1),N(1),N(0),ie(1),ie(1),N(0),N(0)}function Ee(I){if(I){ie(65505),I[0]===69&&I[1]===120&&I[2]===105&&I[3]===102?ie(I.length+2):(ie(I.length+5+2),N(69),N(120),N(105),N(102),N(0));for(var te=0;te<I.length;te++)N(I[te])}}function ke(I,te){ie(65472),ie(17),N(8),ie(te),ie(I),N(3),N(1),N(17),N(0),N(2),N(17),N(1),N(3),N(17),N(1)}function ye(){ie(65499),ie(132),N(0);for(var I=0;I<64;I++)N(n[I]);N(1);for(var te=0;te<64;te++)N(s[te])}function Q(){ie(65476),ie(418),N(0);for(var I=0;I<16;I++)N(L[I+1]);for(var te=0;te<=11;te++)N(P[te]);N(16);for(var ae=0;ae<16;ae++)N($[ae+1]);for(var ne=0;ne<=161;ne++)N(q[ne]);N(1);for(var pe=0;pe<16;pe++)N(G[pe+1]);for(var me=0;me<=11;me++)N(U[me]);N(17);for(var Ae=0;Ae<16;Ae++)N(H[Ae+1]);for(var Ie=0;Ie<=161;Ie++)N(Z[Ie])}function V(I){typeof I=="undefined"||I.constructor!==Array||I.forEach(te=>{if(typeof te=="string"){ie(65534);var ae=te.length;ie(ae+2);var ne;for(ne=0;ne<ae;ne++)N(te.charCodeAt(ne))}})}function De(){ie(65498),ie(12),N(3),N(1),N(0),N(2),N(17),N(3),N(17),N(0),N(63),N(0)}function ce(I,te,ae,ne,pe){for(var me=pe[0],Ae=pe[240],Ie,Ve=16,Fe=63,j=64,X=Pe(I,te),fe=0;fe<j;++fe)y[C[fe]]=X[fe];var je=y[0]-ae;ae=y[0],je==0?ve(ne[0]):(Ie=32767+je,ve(ne[m[Ie]]),ve(p[Ie]));for(var he=63;he>0&&y[he]==0;he--);if(he==0)return ve(me),ae;for(var Se=1,Be;Se<=he;){for(var le=Se;y[Se]==0&&Se<=he;++Se);var Ne=Se-le;if(Ne>=Ve){Be=Ne>>4;for(var Ze=1;Ze<=Be;++Ze)ve(Ae);Ne=Ne&15}Ie=32767+y[Se],ve(pe[(Ne<<4)+m[Ie]]),ve(p[Ie]),Se++}return he!=Fe&&ve(me),ae}function _e(){for(var I=String.fromCharCode,te=0;te<256;te++)R[te]=I(te)}this.encode=function(I,te){var ae=new Date().getTime();te&&St(te),_=new Array,x=0,S=7,ie(65496),Te(),V(I.comments),Ee(I.exifBuffer),ye(),ke(I.width,I.height),Q(),De();var ne=0,pe=0,me=0;x=0,S=7,this.encode.displayName="_encode_";for(var Ae=I.data,Ie=I.width,Ve=I.height,Fe=Ie*4,j=Ie*3,X,fe=0,je,he,Se,Be,le,Ne,Ze,qe;fe<Ve;){for(X=0;X<Fe;){for(Be=Fe*fe+X,le=Be,Ne=-1,Ze=0,qe=0;qe<64;qe++)Ze=qe>>3,Ne=(qe&7)*4,le=Be+Ze*Fe+Ne,fe+Ze>=Ve&&(le-=Fe*(fe+1+Ze-Ve)),X+Ne>=Fe&&(le-=X+Ne-Fe+4),je=Ae[le++],he=Ae[le++],Se=Ae[le++],O[qe]=(T[je]+T[he+256>>0]+T[Se+512>>0]>>16)-128,k[qe]=(T[je+768>>0]+T[he+1024>>0]+T[Se+1280>>0]>>16)-128,E[qe]=(T[je+1280>>0]+T[he+1536>>0]+T[Se+1792>>0]>>16)-128;ne=ce(O,a,ne,l,u),pe=ce(k,o,pe,c,f),me=ce(E,o,me,c,f),X+=32}fe+=8}if(S>=0){var Et=[];Et[1]=S+1,Et[0]=(1<<S+1)-1,ve(Et)}if(ie(65497),typeof Ra=="undefined")return new Uint8Array(_);return Buffer.from(_);var jt,Er};function St(I){if(I<=0&&(I=1),I>100&&(I=100),A!=I){var te=0;I<50?te=Math.floor(5e3/I):te=Math.floor(200-I*2),re(te),A=I}}function Lt(){var I=new Date().getTime();r||(r=50),_e(),we(),de(),ue(),St(r);var te=new Date().getTime()-I}Lt()}typeof Ra!="undefined"?Ra.exports=lp:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].encode=lp);function lp(r,e){typeof e=="undefined"&&(e=50);var t=new g1(e),i=t.encode(r,e);return{data:i,width:r.width,height:r.height}}});var hp=w((SL,Ql)=>{var Jl=(function(){"use strict";var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,i=799,n=3406,s=2276,a=1567,o=3784,l=5793,c=2896;function u(){}function f(S,O){for(var k=0,E=[],R,T,A=16;A>0&&!S[A-1];)A--;E.push({children:[],index:0});var C=E[0],L;for(R=0;R<A;R++){for(T=0;T<S[R];T++){for(C=E.pop(),C.children[C.index]=O[k];C.index>0;){if(E.length===0)throw new Error("Could not recreate Huffman Table");C=E.pop()}for(C.index++,E.push(C);E.length<=R;)E.push(L={children:[],index:0}),C.children[C.index]=L.children,C=L;k++}R+1<A&&(E.push(L={children:[],index:0}),C.children[C.index]=L.children,C=L)}return E[0].children}function p(S,O,k,E,R,T,A,C,L,P){var $=k.precision,q=k.samplesPerLine,G=k.scanLines,U=k.mcusPerLine,H=k.progressive,Z=k.maxH,re=k.maxV,Y=O,we=0,de=0;function ue(){if(de>0)return de--,we>>de&1;if(we=S[O++],we==255){var j=S[O++];if(j)throw new Error("unexpected marker: "+(we<<8|j).toString(16))}return de=7,we>>>7}function ve(j){for(var X=j,fe;(fe=ue())!==null;){if(X=X[fe],typeof X=="number")return X;if(typeof X!="object")throw new Error("invalid huffman sequence")}return null}function N(j){for(var X=0;j>0;){var fe=ue();if(fe===null)return;X=X<<1|fe,j--}return X}function ie(j){var X=N(j);return X>=1<<j-1?X:X+(-1<<j)+1}function Pe(j,X){var fe=ve(j.huffmanTableDC),je=fe===0?0:ie(fe);X[0]=j.pred+=je;for(var he=1;he<64;){var Se=ve(j.huffmanTableAC),Be=Se&15,le=Se>>4;if(Be===0){if(le<15)break;he+=16;continue}he+=le;var Ne=e[he];X[Ne]=ie(Be),he++}}function Te(j,X){var fe=ve(j.huffmanTableDC),je=fe===0?0:ie(fe)<<L;X[0]=j.pred+=je}function Ee(j,X){X[0]|=ue()<<L}var ke=0;function ye(j,X){if(ke>0){ke--;return}for(var fe=T,je=A;fe<=je;){var he=ve(j.huffmanTableAC),Se=he&15,Be=he>>4;if(Se===0){if(Be<15){ke=N(Be)+(1<<Be)-1;break}fe+=16;continue}fe+=Be;var le=e[fe];X[le]=ie(Se)*(1<<L),fe++}}var Q=0,V;function De(j,X){for(var fe=T,je=A,he=0;fe<=je;){var Se=e[fe],Be=X[Se]<0?-1:1;switch(Q){case 0:var le=ve(j.huffmanTableAC),Ne=le&15,he=le>>4;if(Ne===0)he<15?(ke=N(he)+(1<<he),Q=4):(he=16,Q=1);else{if(Ne!==1)throw new Error("invalid ACn encoding");V=ie(Ne),Q=he?2:3}continue;case 1:case 2:X[Se]?X[Se]+=(ue()<<L)*Be:(he--,he===0&&(Q=Q==2?3:0));break;case 3:X[Se]?X[Se]+=(ue()<<L)*Be:(X[Se]=V<<L,Q=0);break;case 4:X[Se]&&(X[Se]+=(ue()<<L)*Be);break}fe++}Q===4&&(ke--,ke===0&&(Q=0))}function ce(j,X,fe,je,he){var Se=fe/U|0,Be=fe%U,le=Se*j.v+je,Ne=Be*j.h+he;j.blocks[le]===void 0&&P.tolerantDecoding||X(j,j.blocks[le][Ne])}function _e(j,X,fe){var je=fe/j.blocksPerLine|0,he=fe%j.blocksPerLine;j.blocks[je]===void 0&&P.tolerantDecoding||X(j,j.blocks[je][he])}var St=E.length,Lt,I,te,ae,ne,pe;H?T===0?pe=C===0?Te:Ee:pe=C===0?ye:De:pe=Pe;var me=0,Ae,Ie;St==1?Ie=E[0].blocksPerLine*E[0].blocksPerColumn:Ie=U*k.mcusPerColumn,R||(R=Ie);for(var Ve,Fe;me<Ie;){for(I=0;I<St;I++)E[I].pred=0;if(ke=0,St==1)for(Lt=E[0],ne=0;ne<R;ne++)_e(Lt,pe,me),me++;else for(ne=0;ne<R;ne++){for(I=0;I<St;I++)for(Lt=E[I],Ve=Lt.h,Fe=Lt.v,te=0;te<Fe;te++)for(ae=0;ae<Ve;ae++)ce(Lt,pe,me,te,ae);if(me++,me===Ie)break}if(me===Ie)do{if(S[O]===255&&S[O+1]!==0)break;O+=1}while(O<S.length-2);if(de=0,Ae=S[O]<<8|S[O+1],Ae<65280)throw new Error("marker was not found");if(Ae>=65488&&Ae<=65495)O+=2;else break}return O-Y}function m(S,O){var k=[],E=O.blocksPerLine,R=O.blocksPerColumn,T=E<<3,A=new Int32Array(64),C=new Uint8Array(64);function L(Y,we,de){var ue=O.quantizationTable,ve,N,ie,Pe,Te,Ee,ke,ye,Q,V=de,De;for(De=0;De<64;De++)V[De]=Y[De]*ue[De];for(De=0;De<8;++De){var ce=8*De;if(V[1+ce]==0&&V[2+ce]==0&&V[3+ce]==0&&V[4+ce]==0&&V[5+ce]==0&&V[6+ce]==0&&V[7+ce]==0){Q=l*V[0+ce]+512>>10,V[0+ce]=Q,V[1+ce]=Q,V[2+ce]=Q,V[3+ce]=Q,V[4+ce]=Q,V[5+ce]=Q,V[6+ce]=Q,V[7+ce]=Q;continue}ve=l*V[0+ce]+128>>8,N=l*V[4+ce]+128>>8,ie=V[2+ce],Pe=V[6+ce],Te=c*(V[1+ce]-V[7+ce])+128>>8,ye=c*(V[1+ce]+V[7+ce])+128>>8,Ee=V[3+ce]<<4,ke=V[5+ce]<<4,Q=ve-N+1>>1,ve=ve+N+1>>1,N=Q,Q=ie*o+Pe*a+128>>8,ie=ie*a-Pe*o+128>>8,Pe=Q,Q=Te-ke+1>>1,Te=Te+ke+1>>1,ke=Q,Q=ye+Ee+1>>1,Ee=ye-Ee+1>>1,ye=Q,Q=ve-Pe+1>>1,ve=ve+Pe+1>>1,Pe=Q,Q=N-ie+1>>1,N=N+ie+1>>1,ie=Q,Q=Te*s+ye*n+2048>>12,Te=Te*n-ye*s+2048>>12,ye=Q,Q=Ee*i+ke*t+2048>>12,Ee=Ee*t-ke*i+2048>>12,ke=Q,V[0+ce]=ve+ye,V[7+ce]=ve-ye,V[1+ce]=N+ke,V[6+ce]=N-ke,V[2+ce]=ie+Ee,V[5+ce]=ie-Ee,V[3+ce]=Pe+Te,V[4+ce]=Pe-Te}for(De=0;De<8;++De){var _e=De;if(V[8+_e]==0&&V[16+_e]==0&&V[24+_e]==0&&V[32+_e]==0&&V[40+_e]==0&&V[48+_e]==0&&V[56+_e]==0){Q=l*de[De+0]+8192>>14,V[0+_e]=Q,V[8+_e]=Q,V[16+_e]=Q,V[24+_e]=Q,V[32+_e]=Q,V[40+_e]=Q,V[48+_e]=Q,V[56+_e]=Q;continue}ve=l*V[0+_e]+2048>>12,N=l*V[32+_e]+2048>>12,ie=V[16+_e],Pe=V[48+_e],Te=c*(V[8+_e]-V[56+_e])+2048>>12,ye=c*(V[8+_e]+V[56+_e])+2048>>12,Ee=V[24+_e],ke=V[40+_e],Q=ve-N+1>>1,ve=ve+N+1>>1,N=Q,Q=ie*o+Pe*a+2048>>12,ie=ie*a-Pe*o+2048>>12,Pe=Q,Q=Te-ke+1>>1,Te=Te+ke+1>>1,ke=Q,Q=ye+Ee+1>>1,Ee=ye-Ee+1>>1,ye=Q,Q=ve-Pe+1>>1,ve=ve+Pe+1>>1,Pe=Q,Q=N-ie+1>>1,N=N+ie+1>>1,ie=Q,Q=Te*s+ye*n+2048>>12,Te=Te*n-ye*s+2048>>12,ye=Q,Q=Ee*i+ke*t+2048>>12,Ee=Ee*t-ke*i+2048>>12,ke=Q,V[0+_e]=ve+ye,V[56+_e]=ve-ye,V[8+_e]=N+ke,V[48+_e]=N-ke,V[16+_e]=ie+Ee,V[40+_e]=ie-Ee,V[24+_e]=Pe+Te,V[32+_e]=Pe-Te}for(De=0;De<64;++De){var St=128+(V[De]+8>>4);we[De]=St<0?0:St>255?255:St}}x(T*R*8);for(var P,$,q=0;q<R;q++){var G=q<<3;for(P=0;P<8;P++)k.push(new Uint8Array(T));for(var U=0;U<E;U++){L(O.blocks[q][U],C,A);var H=0,Z=U<<3;for($=0;$<8;$++){var re=k[G+$];for(P=0;P<8;P++)re[Z+P]=C[H++]}}}return k}function g(S){return S<0?0:S>255?255:S}u.prototype={load:function(O){var k=new XMLHttpRequest;k.open("GET",O,!0),k.responseType="arraybuffer",k.onload=(function(){var E=new Uint8Array(k.response||k.mozResponseArrayBuffer);this.parse(E),this.onload&&this.onload()}).bind(this),k.send(null)},parse:function(O){var k=this.opts.maxResolutionInMP*1e3*1e3,E=0,R=O.length;function T(){var le=O[E]<<8|O[E+1];return E+=2,le}function A(){var le=T(),Ne=O.subarray(E,E+le-2);return E+=Ne.length,Ne}function C(le){var Ne=1,Ze=1,qe,Et;for(Et in le.components)le.components.hasOwnProperty(Et)&&(qe=le.components[Et],Ne<qe.h&&(Ne=qe.h),Ze<qe.v&&(Ze=qe.v));var jt=Math.ceil(le.samplesPerLine/8/Ne),Er=Math.ceil(le.scanLines/8/Ze);for(Et in le.components)if(le.components.hasOwnProperty(Et)){qe=le.components[Et];var Ur=Math.ceil(Math.ceil(le.samplesPerLine/8)*qe.h/Ne),$r=Math.ceil(Math.ceil(le.scanLines/8)*qe.v/Ze),hi=jt*qe.h,di=Er*qe.v,an=di*hi,pi=[];x(an*256);for(var mi=0;mi<di;mi++){for(var gi=[],vi=0;vi<hi;vi++)gi.push(new Int32Array(64));pi.push(gi)}qe.blocksPerLine=Ur,qe.blocksPerColumn=$r,qe.blocks=pi}le.maxH=Ne,le.maxV=Ze,le.mcusPerLine=jt,le.mcusPerColumn=Er}var L=null,P=null,$=null,q,G,U=[],H=[],Z=[],re=[],Y=T(),we=-1;if(this.comments=[],Y!=65496)throw new Error("SOI not found");for(Y=T();Y!=65497;){var de,ue,ve;switch(Y){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var N=A();if(Y===65534){var ie=String.fromCharCode.apply(null,N);this.comments.push(ie)}Y===65504&&N[0]===74&&N[1]===70&&N[2]===73&&N[3]===70&&N[4]===0&&(L={version:{major:N[5],minor:N[6]},densityUnits:N[7],xDensity:N[8]<<8|N[9],yDensity:N[10]<<8|N[11],thumbWidth:N[12],thumbHeight:N[13],thumbData:N.subarray(14,14+3*N[12]*N[13])}),Y===65505&&N[0]===69&&N[1]===120&&N[2]===105&&N[3]===102&&N[4]===0&&(this.exifBuffer=N.subarray(5,N.length)),Y===65518&&N[0]===65&&N[1]===100&&N[2]===111&&N[3]===98&&N[4]===101&&N[5]===0&&(P={version:N[6],flags0:N[7]<<8|N[8],flags1:N[9]<<8|N[10],transformCode:N[11]});break;case 65499:for(var Pe=T(),Te=Pe+E-2;E<Te;){var Ee=O[E++];x(256);var ke=new Int32Array(64);if(Ee>>4===0)for(ue=0;ue<64;ue++){var ye=e[ue];ke[ye]=O[E++]}else if(Ee>>4===1)for(ue=0;ue<64;ue++){var ye=e[ue];ke[ye]=T()}else throw new Error("DQT: invalid table spec");U[Ee&15]=ke}break;case 65472:case 65473:case 65474:T(),q={},q.extended=Y===65473,q.progressive=Y===65474,q.precision=O[E++],q.scanLines=T(),q.samplesPerLine=T(),q.components={},q.componentsOrder=[];var Q=q.scanLines*q.samplesPerLine;if(Q>k){var V=Math.ceil((Q-k)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${V}MP`)}var De=O[E++],ce,_e=0,St=0;for(de=0;de<De;de++){ce=O[E];var Lt=O[E+1]>>4,I=O[E+1]&15,te=O[E+2];if(Lt<=0||I<=0)throw new Error("Invalid sampling factor, expected values above 0");q.componentsOrder.push(ce),q.components[ce]={h:Lt,v:I,quantizationIdx:te},E+=3}C(q),H.push(q);break;case 65476:var ae=T();for(de=2;de<ae;){var ne=O[E++],pe=new Uint8Array(16),me=0;for(ue=0;ue<16;ue++,E++)me+=pe[ue]=O[E];x(16+me);var Ae=new Uint8Array(me);for(ue=0;ue<me;ue++,E++)Ae[ue]=O[E];de+=17+me,(ne>>4===0?re:Z)[ne&15]=f(pe,Ae)}break;case 65501:T(),G=T();break;case 65500:T(),T();break;case 65498:var Ie=T(),Ve=O[E++],Fe=[],j;for(de=0;de<Ve;de++){j=q.components[O[E++]];var X=O[E++];j.huffmanTableDC=re[X>>4],j.huffmanTableAC=Z[X&15],Fe.push(j)}var fe=O[E++],je=O[E++],he=O[E++],Se=p(O,E,q,Fe,G,fe,je,he>>4,he&15,this.opts);E+=Se;break;case 65535:O[E]!==255&&E--;break;default:if(O[E-3]==255&&O[E-2]>=192&&O[E-2]<=254){E-=3;break}else if(Y===224||Y==225){if(we!==-1)throw new Error(`first unknown JPEG marker at offset ${we.toString(16)}, second unknown JPEG marker ${Y.toString(16)} at offset ${(E-1).toString(16)}`);we=E-1;let le=T();if(O[E+le-2]===255){E+=le-2;break}}throw new Error("unknown JPEG marker "+Y.toString(16))}Y=T()}if(H.length!=1)throw new Error("only single frame JPEGs supported");for(var de=0;de<H.length;de++){var Be=H[de].components;for(var ue in Be)Be[ue].quantizationTable=U[Be[ue].quantizationIdx],delete Be[ue].quantizationIdx}this.width=q.samplesPerLine,this.height=q.scanLines,this.jfif=L,this.adobe=P,this.components=[];for(var de=0;de<q.componentsOrder.length;de++){var j=q.components[q.componentsOrder[de]];this.components.push({lines:m(q,j),scaleX:j.h/q.maxH,scaleY:j.v/q.maxV})}},getData:function(O,k){var E=this.width/O,R=this.height/k,T,A,C,L,P,$,q,G,U,H,Z=0,re,Y,we,de,ue,ve,N,ie,Pe,Te,Ee,ke=O*k*this.components.length;x(ke);var ye=new Uint8Array(ke);switch(this.components.length){case 1:for(T=this.components[0],H=0;H<k;H++)for(P=T.lines[0|H*T.scaleY*R],U=0;U<O;U++)re=P[0|U*T.scaleX*E],ye[Z++]=re;break;case 2:for(T=this.components[0],A=this.components[1],H=0;H<k;H++)for(P=T.lines[0|H*T.scaleY*R],$=A.lines[0|H*A.scaleY*R],U=0;U<O;U++)re=P[0|U*T.scaleX*E],ye[Z++]=re,re=$[0|U*A.scaleX*E],ye[Z++]=re;break;case 3:for(Ee=!0,this.adobe&&this.adobe.transformCode?Ee=!0:typeof this.opts.colorTransform!="undefined"&&(Ee=!!this.opts.colorTransform),T=this.components[0],A=this.components[1],C=this.components[2],H=0;H<k;H++)for(P=T.lines[0|H*T.scaleY*R],$=A.lines[0|H*A.scaleY*R],q=C.lines[0|H*C.scaleY*R],U=0;U<O;U++)Ee?(re=P[0|U*T.scaleX*E],Y=$[0|U*A.scaleX*E],we=q[0|U*C.scaleX*E],ie=g(re+1.402*(we-128)),Pe=g(re-.3441363*(Y-128)-.71413636*(we-128)),Te=g(re+1.772*(Y-128))):(ie=P[0|U*T.scaleX*E],Pe=$[0|U*A.scaleX*E],Te=q[0|U*C.scaleX*E]),ye[Z++]=ie,ye[Z++]=Pe,ye[Z++]=Te;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(Ee=!1,this.adobe&&this.adobe.transformCode?Ee=!0:typeof this.opts.colorTransform!="undefined"&&(Ee=!!this.opts.colorTransform),T=this.components[0],A=this.components[1],C=this.components[2],L=this.components[3],H=0;H<k;H++)for(P=T.lines[0|H*T.scaleY*R],$=A.lines[0|H*A.scaleY*R],q=C.lines[0|H*C.scaleY*R],G=L.lines[0|H*L.scaleY*R],U=0;U<O;U++)Ee?(re=P[0|U*T.scaleX*E],Y=$[0|U*A.scaleX*E],we=q[0|U*C.scaleX*E],de=G[0|U*L.scaleX*E],ue=255-g(re+1.402*(we-128)),ve=255-g(re-.3441363*(Y-128)-.71413636*(we-128)),N=255-g(re+1.772*(Y-128))):(ue=P[0|U*T.scaleX*E],ve=$[0|U*A.scaleX*E],N=q[0|U*C.scaleX*E],de=G[0|U*L.scaleX*E]),ye[Z++]=255-ue,ye[Z++]=255-ve,ye[Z++]=255-N,ye[Z++]=255-de;break;default:throw new Error("Unsupported color mode")}return ye},copyToImageData:function(O,k){var E=O.width,R=O.height,T=O.data,A=this.getData(E,R),C=0,L=0,P,$,q,G,U,H,Z,re,Y;switch(this.components.length){case 1:for($=0;$<R;$++)for(P=0;P<E;P++)q=A[C++],T[L++]=q,T[L++]=q,T[L++]=q,k&&(T[L++]=255);break;case 3:for($=0;$<R;$++)for(P=0;P<E;P++)Z=A[C++],re=A[C++],Y=A[C++],T[L++]=Z,T[L++]=re,T[L++]=Y,k&&(T[L++]=255);break;case 4:for($=0;$<R;$++)for(P=0;P<E;P++)U=A[C++],H=A[C++],q=A[C++],G=A[C++],Z=255-g(U*(1-G/255)+G),re=255-g(H*(1-G/255)+G),Y=255-g(q*(1-G/255)+G),T[L++]=Z,T[L++]=re,T[L++]=Y,k&&(T[L++]=255);break;default:throw new Error("Unsupported color mode")}}};var y=0,_=0;function x(S=0){var O=y+S;if(O>_){var k=Math.ceil((O-_)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${k}MB`)}y=O}return u.resetMaxMemoryUsage=function(S){y=0,_=S},u.getBytesAllocated=function(){return y},u.requestMemoryAllocation=x,u})();typeof Ql!="undefined"?Ql.exports=fp:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].decode=fp);function fp(r,e={}){var t={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512},i={...t,...e},n=new Uint8Array(r),s=new Jl;s.opts=i,Jl.resetMaxMemoryUsage(i.maxMemoryUsageInMB*1024*1024),s.parse(n);var a=i.formatAsRGBA?4:3,o=s.width*s.height*a;try{Jl.requestMemoryAllocation(o);var l={width:s.width,height:s.height,exifBuffer:s.exifBuffer,data:i.useTArray?new Uint8Array(o):Buffer.alloc(o)};s.comments.length>0&&(l.comments=s.comments)}catch(c){throw c instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+o):c instanceof ReferenceError&&c.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):c}return s.copyToImageData(l,i.formatAsRGBA),l}});var pp=w((EL,dp)=>{var v1=up(),y1=hp();dp.exports={encode:v1,decode:y1}});var gp=w((kL,mp)=>{"use strict";function Pa(){this._types=Object.create(null),this._extensions=Object.create(null);for(let r=0;r<arguments.length;r++)this.define(arguments[r]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Pa.prototype.define=function(r,e){for(let t in r){let i=r[t].map(function(n){return n.toLowerCase()});t=t.toLowerCase();for(let n=0;n<i.length;n++){let s=i[n];if(s[0]!=="*"){if(!e&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+t+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+t+'".');this._types[s]=t}}if(e||!this._extensions[t]){let n=i[0];this._extensions[t]=n[0]!=="*"?n:n.substr(1)}}};Pa.prototype.getType=function(r){r=String(r);let e=r.replace(/^.*[/\\]/,"").toLowerCase(),t=e.replace(/^.*\./,"").toLowerCase(),i=e.length<r.length;return(t.length<e.length-1||!i)&&this._types[t]||null};Pa.prototype.getExtension=function(r){return r=/^\s*([^;\s]*)/.test(r)&&RegExp.$1,r&&this._extensions[r.toLowerCase()]||null};mp.exports=Pa});var yp=w((OL,vp)=>{vp.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}});var bp=w((CL,_p)=>{_p.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}});var wp=w((TL,xp)=>{"use strict";var _1=gp();xp.exports=new _1(yp(),bp())});var Ep=w((AL,Sp)=>{Sp.exports=function(r,e){for(var t=[],i=0;i<r.length;i++){var n=e(r[i],i);b1(n)?t.push.apply(t,n):t.push(n)}return t};var b1=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"}});var Ap=w((IL,Tp)=>{"use strict";Tp.exports=Op;function Op(r,e,t){r instanceof RegExp&&(r=kp(r,t)),e instanceof RegExp&&(e=kp(e,t));var i=Cp(r,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+r.length,i[1]),post:t.slice(i[1]+e.length)}}function kp(r,e){var t=e.match(r);return t?t[0]:null}Op.range=Cp;function Cp(r,e,t){var i,n,s,a,o,l=t.indexOf(r),c=t.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(r===e)return[l,c];for(i=[],s=t.length;u>=0&&!o;)u==l?(i.push(u),l=t.indexOf(r,u+1)):i.length==1?o=[i.pop(),c]:(n=i.pop(),n<s&&(s=n,a=c),c=t.indexOf(e,u+1)),u=l<c&&l>=0?l:c;i.length&&(o=[s,a])}return o}});var Dp=w((NL,Mp)=>{var x1=Ep(),Ip=Ap();Mp.exports=E1;var Np="\0SLASH"+Math.random()+"\0",Lp="\0OPEN"+Math.random()+"\0",ec="\0CLOSE"+Math.random()+"\0",Bp="\0COMMA"+Math.random()+"\0",Rp="\0PERIOD"+Math.random()+"\0";function Xl(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function w1(r){return r.split("\\\\").join(Np).split("\\{").join(Lp).split("\\}").join(ec).split("\\,").join(Bp).split("\\.").join(Rp)}function S1(r){return r.split(Np).join("\\").split(Lp).join("{").split(ec).join("}").split(Bp).join(",").split(Rp).join(".")}function Pp(r){if(!r)return[""];var e=[],t=Ip("{","}",r);if(!t)return r.split(",");var i=t.pre,n=t.body,s=t.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=Pp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function E1(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),gn(w1(r),!0).map(S1)):[]}function k1(r){return"{"+r+"}"}function O1(r){return/^-?0\d/.test(r)}function C1(r,e){return r<=e}function T1(r,e){return r>=e}function gn(r,e){var t=[],i=Ip("{","}",r);if(!i||/\$$/.test(i.pre))return[r];var n=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),a=n||s,o=i.body.indexOf(",")>=0;if(!a&&!o)return i.post.match(/,(?!,).*\}/)?(r=i.pre+"{"+i.body+ec+i.post,gn(r)):[r];var l;if(a)l=i.body.split(/\.\./);else if(l=Pp(i.body),l.length===1&&(l=gn(l[0],!1).map(k1),l.length===1)){var u=i.post.length?gn(i.post,!1):[""];return u.map(function(P){return i.pre+l[0]+P})}var c=i.pre,u=i.post.length?gn(i.post,!1):[""],f;if(a){var p=Xl(l[0]),m=Xl(l[1]),g=Math.max(l[0].length,l[1].length),y=l.length==3?Math.abs(Xl(l[2])):1,_=C1,x=m<p;x&&(y*=-1,_=T1);var S=l.some(O1);f=[];for(var O=p;_(O,m);O+=y){var k;if(s)k=String.fromCharCode(O),k==="\\"&&(k="");else if(k=String(O),S){var E=g-k.length;if(E>0){var R=new Array(E+1).join("0");O<0?k="-"+R+k.slice(1):k=R+k}}f.push(k)}}else f=x1(l,function(L){return gn(L,!1)});for(var T=0;T<f.length;T++)for(var A=0;A<u.length;A++){var C=c+f[T]+u[A];(!e||a||C)&&t.push(C)}return t}});var Vp=w((LL,$p)=>{$p.exports=Dt;Dt.Minimatch=ct;var as=(function(){try{return require("path")}catch{}})()||{sep:"/"};Dt.sep=as.sep;var ic=Dt.GLOBSTAR=ct.GLOBSTAR={},A1=Dp(),Fp={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},tc="[^/]",rc=tc+"*?",I1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",N1="(?:(?!(?:\\/|^)\\.).)*?",qp=L1("().*{}+?[]^$\\!");function L1(r){return r.split("").reduce(function(e,t){return e[t]=!0,e},{})}var jp=/\/+/;Dt.filter=B1;function B1(r,e){return e=e||{},function(t,i,n){return Dt(t,r,e)}}function Hr(r,e){e=e||{};var t={};return Object.keys(r).forEach(function(i){t[i]=r[i]}),Object.keys(e).forEach(function(i){t[i]=e[i]}),t}Dt.defaults=function(r){if(!r||typeof r!="object"||!Object.keys(r).length)return Dt;var e=Dt,t=function(n,s,a){return e(n,s,Hr(r,a))};return t.Minimatch=function(n,s){return new e.Minimatch(n,Hr(r,s))},t.Minimatch.defaults=function(n){return e.defaults(Hr(r,n)).Minimatch},t.filter=function(n,s){return e.filter(n,Hr(r,s))},t.defaults=function(n){return e.defaults(Hr(r,n))},t.makeRe=function(n,s){return e.makeRe(n,Hr(r,s))},t.braceExpand=function(n,s){return e.braceExpand(n,Hr(r,s))},t.match=function(i,n,s){return e.match(i,n,Hr(r,s))},t};ct.defaults=function(r){return Dt.defaults(r).Minimatch};function Dt(r,e,t){return Da(e),t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:new ct(e,t).match(r)}function ct(r,e){if(!(this instanceof ct))return new ct(r,e);Da(r),e||(e={}),r=r.trim(),!e.allowWindowsEscape&&as.sep!=="/"&&(r=r.split(as.sep).join("/")),this.options=e,this.set=[],this.pattern=r,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}ct.prototype.debug=function(){};ct.prototype.make=R1;function R1(){var r=this.pattern,e=this.options;if(!e.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(i){return i.split(jp)}),this.debug(this.pattern,t),t=t.map(function(i,n,s){return i.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}ct.prototype.parseNegate=P1;function P1(){var r=this.pattern,e=!1,t=this.options,i=0;if(!t.nonegate){for(var n=0,s=r.length;n<s&&r.charAt(n)==="!";n++)e=!e,i++;i&&(this.pattern=r.substr(i)),this.negate=e}}Dt.braceExpand=function(r,e){return Up(r,e)};ct.prototype.braceExpand=Up;function Up(r,e){return e||(this instanceof ct?e=this.options:e={}),r=typeof r=="undefined"?this.pattern:r,Da(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:A1(r)}var M1=1024*64,Da=function(r){if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>M1)throw new TypeError("pattern is too long")};ct.prototype.parse=D1;var Ma={};function D1(r,e){Da(r);var t=this.options;if(r==="**")if(t.noglobstar)r="*";else return ic;if(r==="")return"";var i="",n=!!t.nocase,s=!1,a=[],o=[],l,c=!1,u=-1,f=-1,p=r.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",m=this;function g(){if(l){switch(l){case"*":i+=rc,n=!0;break;case"?":i+=tc,n=!0;break;default:i+="\\"+l;break}m.debug("clearStateChar %j %j",l,i),l=!1}}for(var y=0,_=r.length,x;y<_&&(x=r.charAt(y));y++){if(this.debug("%s %s %s %j",r,y,i,x),s&&qp[x]){i+="\\"+x,s=!1;continue}switch(x){case"/":return!1;case"\\":g(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",r,y,i,x),c){this.debug(" in class"),x==="!"&&y===f+1&&(x="^"),i+=x;continue}m.debug("call clearStateChar %j",l),g(),l=x,t.noext&&g();continue;case"(":if(c){i+="(";continue}if(!l){i+="\\(";continue}a.push({type:l,start:y-1,reStart:i.length,open:Fp[l].open,close:Fp[l].close}),i+=l==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",l,i),l=!1;continue;case")":if(c||!a.length){i+="\\)";continue}g(),n=!0;var S=a.pop();i+=S.close,S.type==="!"&&o.push(S),S.reEnd=i.length;continue;case"|":if(c||!a.length||s){i+="\\|",s=!1;continue}g(),i+="|";continue;case"[":if(g(),c){i+="\\"+x;continue}c=!0,f=y,u=i.length,i+=x;continue;case"]":if(y===f+1||!c){i+="\\"+x,s=!1;continue}var O=r.substring(f+1,y);try{RegExp("["+O+"]")}catch{var k=this.parse(O,Ma);i=i.substr(0,u)+"\\["+k[0]+"\\]",n=n||k[1],c=!1;continue}n=!0,c=!1,i+=x;continue;default:g(),s?s=!1:qp[x]&&!(x==="^"&&c)&&(i+="\\"),i+=x}}for(c&&(O=r.substr(f+1),k=this.parse(O,Ma),i=i.substr(0,u)+"\\["+k[0],n=n||k[1]),S=a.pop();S;S=a.pop()){var E=i.slice(S.reStart+S.open.length);this.debug("setting tail",i,S),E=E.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(we,de,ue){return ue||(ue="\\"),de+de+ue+"|"}),this.debug(`tail=%j
16
- %s`,E,E,S,i);var R=S.type==="*"?rc:S.type==="?"?tc:"\\"+S.type;n=!0,i=i.slice(0,S.reStart)+R+"\\("+E}g(),s&&(i+="\\\\");var T=!1;switch(i.charAt(0)){case"[":case".":case"(":T=!0}for(var A=o.length-1;A>-1;A--){var C=o[A],L=i.slice(0,C.reStart),P=i.slice(C.reStart,C.reEnd-8),$=i.slice(C.reEnd-8,C.reEnd),q=i.slice(C.reEnd);$+=q;var G=L.split("(").length-1,U=q;for(y=0;y<G;y++)U=U.replace(/\)[+*?]?/,"");q=U;var H="";q===""&&e!==Ma&&(H="$");var Z=L+P+q+H+$;i=Z}if(i!==""&&n&&(i="(?=.)"+i),T&&(i=p+i),e===Ma)return[i,n];if(!n)return q1(r);var re=t.nocase?"i":"";try{var Y=new RegExp("^"+i+"$",re)}catch{return new RegExp("$.")}return Y._glob=r,Y._src=i,Y}Dt.makeRe=function(r,e){return new ct(r,e||{}).makeRe()};ct.prototype.makeRe=F1;function F1(){if(this.regexp||this.regexp===!1)return this.regexp;var r=this.set;if(!r.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?rc:e.dot?I1:N1,i=e.nocase?"i":"",n=r.map(function(s){return s.map(function(a){return a===ic?t:typeof a=="string"?j1(a):a._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,i)}catch{this.regexp=!1}return this.regexp}Dt.match=function(r,e,t){t=t||{};var i=new ct(e,t);return r=r.filter(function(n){return i.match(n)}),i.options.nonull&&!r.length&&r.push(e),r};ct.prototype.match=function(e,t){if(typeof t=="undefined"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var i=this.options;as.sep!=="/"&&(e=e.split(as.sep).join("/")),e=e.split(jp),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,a;for(a=e.length-1;a>=0&&(s=e[a],!s);a--);for(a=0;a<n.length;a++){var o=n[a],l=e;i.matchBase&&o.length===1&&(l=[s]);var c=this.matchOne(l,o,t);if(c)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate};ct.prototype.matchOne=function(r,e,t){var i=this.options;this.debug("matchOne",{this:this,file:r,pattern:e}),this.debug("matchOne",r.length,e.length);for(var n=0,s=0,a=r.length,o=e.length;n<a&&s<o;n++,s++){this.debug("matchOne loop");var l=e[s],c=r[n];if(this.debug(e,l,c),l===!1)return!1;if(l===ic){this.debug("GLOBSTAR",[e,l,c]);var u=n,f=s+1;if(f===o){for(this.debug("** at the end");n<a;n++)if(r[n]==="."||r[n]===".."||!i.dot&&r[n].charAt(0)===".")return!1;return!0}for(;u<a;){var p=r[u];if(this.debug(`
17
- globstar while`,r,u,e,f,p),this.matchOne(r.slice(u),e.slice(f),t))return this.debug("globstar found match!",u,a,p),!0;if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",r,u,e,f);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(t&&(this.debug(`
18
- >>> no match, partial?`,r,u,e,f),u===a))}var m;if(typeof l=="string"?(m=c===l,this.debug("string match",l,c,m)):(m=c.match(l),this.debug("pattern match",l,c,m)),!m)return!1}if(n===a&&s===o)return!0;if(n===a)return t;if(s===o)return n===a-1&&r[n]==="";throw new Error("wtf?")};function q1(r){return r.replace(/\\(.)/g,"$1")}function j1(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var sc=w((BL,Gp)=>{"use strict";var Hp=require("fs"),nc;function U1(){try{return Hp.statSync("/.dockerenv"),!0}catch{return!1}}function $1(){try{return Hp.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Gp.exports=()=>(nc===void 0&&(nc=U1()||$1()),nc)});var Yp=w((RL,ac)=>{"use strict";var V1=require("os"),H1=require("fs"),Wp=sc(),zp=()=>{if(process.platform!=="linux")return!1;if(V1.release().toLowerCase().includes("microsoft"))return!Wp();try{return H1.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Wp():!1}catch{return!1}};process.env.__IS_WSL_TEST__?ac.exports=zp:ac.exports=zp()});var Zp=w((PL,Kp)=>{"use strict";Kp.exports=(r,e,t)=>{let i=n=>Object.defineProperty(r,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let n=t();return i(n),n},set(n){i(n)}}),r}});var im=w((ML,rm)=>{var G1=require("path"),W1=require("child_process"),{promises:oc,constants:tm}=require("fs"),Fa=Yp(),z1=sc(),lc=Zp(),Jp=G1.join(__dirname,"xdg-open"),{platform:vn,arch:Qp}=process,Y1=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",i=!1;try{await oc.access(t,tm.F_OK),i=!0}catch{}if(!i)return r;let n=await oc.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),Xp=async(r,e)=>{let t;for(let i of r)try{return await e(i)}catch(n){t=n}throw t},qa=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return Xp(r.app,o=>qa({...r,app:o}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return Xp(e,o=>qa({...r,app:{name:o,arguments:t}}));let i,n=[],s={};if(vn==="darwin")i="open",r.wait&&n.push("--wait-apps"),r.background&&n.push("--background"),r.newInstance&&n.push("--new"),e&&n.push("-a",e);else if(vn==="win32"||Fa&&!z1()){let o=await Y1();i=Fa?`${o}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Fa||(s.windowsVerbatimArguments=!0);let l=["Start"];r.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&l.push(`"${r.target}"`),t.length>0&&(t=t.map(c=>`"\`"${c}\`""`),l.push(t.join(","))),r.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)i=e;else{let o=!__dirname||__dirname==="/",l=!1;try{await oc.access(Jp,tm.X_OK),l=!0}catch{}i=process.versions.electron||vn==="android"||o||!l?"xdg-open":Jp}t.length>0&&n.push(...t),r.wait||(s.stdio="ignore",s.detached=!0)}r.target&&n.push(r.target),vn==="darwin"&&t.length>0&&n.push("--args",...t);let a=W1.spawn(i,n,s);return r.wait?new Promise((o,l)=>{a.once("error",l),a.once("close",c=>{if(r.allowNonzeroExitCode&&c>0){l(new Error(`Exited with code ${c}`));return}o(a)})}):(a.unref(),a)},cc=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return qa({...e,target:r})},K1=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return qa({...e,app:{name:r,arguments:t}})};function em(r){if(typeof r=="string"||Array.isArray(r))return r;let{[Qp]:e}=r;if(!e)throw new Error(`${Qp} is not supported`);return e}function uc({[vn]:r},{wsl:e}){if(e&&Fa)return em(e);if(!r)throw new Error(`${vn} is not supported`);return em(r)}var ja={};lc(ja,"chrome",()=>uc({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));lc(ja,"firefox",()=>uc({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));lc(ja,"edge",()=>uc({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));cc.apps=ja;cc.openApp=K1;rm.exports=cc});var fc=w((DL,sm)=>{"use strict";var Z1=require("util"),nm=require("stream"),sr=sm.exports=function(){nm.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};Z1.inherits(sr,nm);sr.prototype.read=function(r,e){this._reads.push({length:Math.abs(r),allowLess:r<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))};sr.prototype.write=function(r,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let t;return Buffer.isBuffer(r)?t=r:t=Buffer.from(r,e||this._encoding),this._buffers.push(t),this._buffered+=t.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused};sr.prototype.end=function(r,e){r&&this.write(r,e),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))};sr.prototype.destroySoon=sr.prototype.end;sr.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()};sr.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))};sr.prototype._processReadAllowingLess=function(r){this._reads.shift();let e=this._buffers[0];e.length>r.length?(this._buffered-=r.length,this._buffers[0]=e.slice(r.length),r.func.call(this,e.slice(0,r.length))):(this._buffered-=e.length,this._buffers.shift(),r.func.call(this,e))};sr.prototype._processRead=function(r){this._reads.shift();let e=0,t=0,i=Buffer.alloc(r.length);for(;e<r.length;){let n=this._buffers[t++],s=Math.min(n.length,r.length-e);n.copy(i,e,0,s),e+=s,s!==n.length&&(this._buffers[--t]=n.slice(s))}t>0&&this._buffers.splice(0,t),this._buffered-=r.length,r.func.call(this,i)};sr.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let r=this._reads[0];if(r.allowLess)this._processReadAllowingLess(r);else if(this._buffered>=r.length)this._processRead(r);else break}this._buffers&&!this.writable&&this._end()}catch(r){this.emit("error",r)}}});var dc=w(hc=>{"use strict";var Gr=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];hc.getImagePasses=function(r,e){let t=[],i=r%8,n=e%8,s=(r-i)/8,a=(e-n)/8;for(let o=0;o<Gr.length;o++){let l=Gr[o],c=s*l.x.length,u=a*l.y.length;for(let f=0;f<l.x.length&&l.x[f]<i;f++)c++;for(let f=0;f<l.y.length&&l.y[f]<n;f++)u++;c>0&&u>0&&t.push({width:c,height:u,index:o})}return t};hc.getInterlaceIterator=function(r){return function(e,t,i){let n=e%Gr[i].x.length,s=(e-n)/Gr[i].x.length*8+Gr[i].x[n],a=t%Gr[i].y.length,o=(t-a)/Gr[i].y.length*8+Gr[i].y[a];return s*4+o*r*4}}});var pc=w((qL,am)=>{"use strict";am.exports=function(e,t,i){let n=e+t-i,s=Math.abs(n-e),a=Math.abs(n-t),o=Math.abs(n-i);return s<=a&&s<=o?e:a<=o?t:i}});var mc=w((jL,lm)=>{"use strict";var J1=dc(),Q1=pc();function om(r,e,t){let i=r*e;return t!==8&&(i=Math.ceil(i/(8/t))),i}var yn=lm.exports=function(r,e){let t=r.width,i=r.height,n=r.interlace,s=r.bpp,a=r.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],n){let o=J1.getImagePasses(t,i);for(let l=0;l<o.length;l++)this._images.push({byteWidth:om(o[l].width,s,a),height:o[l].height,lineIndex:0})}else this._images.push({byteWidth:om(t,s,a),height:i,lineIndex:0});a===8?this._xComparison=s:a===16?this._xComparison=s*2:this._xComparison=1};yn.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};yn.prototype._unFilterType1=function(r,e,t){let i=this._xComparison,n=i-1;for(let s=0;s<t;s++){let a=r[1+s],o=s>n?e[s-i]:0;e[s]=a+o}};yn.prototype._unFilterType2=function(r,e,t){let i=this._lastLine;for(let n=0;n<t;n++){let s=r[1+n],a=i?i[n]:0;e[n]=s+a}};yn.prototype._unFilterType3=function(r,e,t){let i=this._xComparison,n=i-1,s=this._lastLine;for(let a=0;a<t;a++){let o=r[1+a],l=s?s[a]:0,c=a>n?e[a-i]:0,u=Math.floor((c+l)/2);e[a]=o+u}};yn.prototype._unFilterType4=function(r,e,t){let i=this._xComparison,n=i-1,s=this._lastLine;for(let a=0;a<t;a++){let o=r[1+a],l=s?s[a]:0,c=a>n?e[a-i]:0,u=a>n&&s?s[a-i]:0,f=Q1(c,l,u);e[a]=o+f}};yn.prototype._reverseFilterLine=function(r){let e=r[0],t,i=this._images[this._imageIndex],n=i.byteWidth;if(e===0)t=r.slice(1,n+1);else switch(t=Buffer.alloc(n),e){case 1:this._unFilterType1(r,t,n);break;case 2:this._unFilterType2(r,t,n);break;case 3:this._unFilterType3(r,t,n);break;case 4:this._unFilterType4(r,t,n);break;default:throw new Error("Unrecognised filter type - "+e)}this.write(t),i.lineIndex++,i.lineIndex>=i.height?(this._lastLine=null,this._imageIndex++,i=this._images[this._imageIndex]):this._lastLine=t,i?this.read(i.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}});var fm=w((UL,um)=>{"use strict";var X1=require("util"),cm=fc(),eS=mc(),tS=um.exports=function(r){cm.call(this);let e=[],t=this;this._filter=new eS(r,{read:this.read.bind(this),write:function(i){e.push(i)},complete:function(){t.emit("complete",Buffer.concat(e))}}),this._filter.start()};X1.inherits(tS,cm)});var _n=w(($L,hm)=>{"use strict";hm.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var yc=w((VL,dm)=>{"use strict";var gc=[];(function(){for(let r=0;r<256;r++){let e=r;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;gc[r]=e}})();var vc=dm.exports=function(){this._crc=-1};vc.prototype.write=function(r){for(let e=0;e<r.length;e++)this._crc=gc[(this._crc^r[e])&255]^this._crc>>>8;return!0};vc.prototype.crc32=function(){return this._crc^-1};vc.crc32=function(r){let e=-1;for(let t=0;t<r.length;t++)e=gc[(e^r[t])&255]^e>>>8;return e^-1}});var _c=w((HL,pm)=>{"use strict";var Xe=_n(),rS=yc(),nt=pm.exports=function(r,e){this._options=r,r.checkCRC=r.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[Xe.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[Xe.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[Xe.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[Xe.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[Xe.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[Xe.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};nt.prototype.start=function(){this.read(Xe.PNG_SIGNATURE.length,this._parseSignature.bind(this))};nt.prototype._parseSignature=function(r){let e=Xe.PNG_SIGNATURE;for(let t=0;t<e.length;t++)if(r[t]!==e[t]){this.error(new Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};nt.prototype._parseChunkBegin=function(r){let e=r.readUInt32BE(0),t=r.readUInt32BE(4),i="";for(let s=4;s<8;s++)i+=String.fromCharCode(r[s]);let n=!!(r[4]&32);if(!this._hasIHDR&&t!==Xe.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}if(this._crc=new rS,this._crc.write(Buffer.from(i)),this._chunks[t])return this._chunks[t](e);if(!n){this.error(new Error("Unsupported critical chunk type "+i));return}this.read(e+4,this._skipChunk.bind(this))};nt.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};nt.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};nt.prototype._parseChunkEnd=function(r){let e=r.readInt32BE(0),t=this._crc.crc32();if(this._options.checkCRC&&t!==e){this.error(new Error("Crc error - "+e+" - "+t));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))};nt.prototype._handleIHDR=function(r){this.read(r,this._parseIHDR.bind(this))};nt.prototype._parseIHDR=function(r){this._crc.write(r);let e=r.readUInt32BE(0),t=r.readUInt32BE(4),i=r[8],n=r[9],s=r[10],a=r[11],o=r[12];if(i!==8&&i!==4&&i!==2&&i!==1&&i!==16){this.error(new Error("Unsupported bit depth "+i));return}if(!(n in Xe.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(s!==0){this.error(new Error("Unsupported compression method"));return}if(a!==0){this.error(new Error("Unsupported filter method"));return}if(o!==0&&o!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=n;let l=Xe.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:t,depth:i,interlace:!!o,palette:!!(n&Xe.COLORTYPE_PALETTE),color:!!(n&Xe.COLORTYPE_COLOR),alpha:!!(n&Xe.COLORTYPE_ALPHA),bpp:l,colorType:n}),this._handleChunkEnd()};nt.prototype._handlePLTE=function(r){this.read(r,this._parsePLTE.bind(this))};nt.prototype._parsePLTE=function(r){this._crc.write(r);let e=Math.floor(r.length/3);for(let t=0;t<e;t++)this._palette.push([r[t*3],r[t*3+1],r[t*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};nt.prototype._handleTRNS=function(r){this.simpleTransparency(),this.read(r,this._parseTRNS.bind(this))};nt.prototype._parseTRNS=function(r){if(this._crc.write(r),this._colorType===Xe.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(r.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<r.length;e++)this._palette[e][3]=r[e];this.palette(this._palette)}this._colorType===Xe.COLORTYPE_GRAYSCALE&&this.transColor([r.readUInt16BE(0)]),this._colorType===Xe.COLORTYPE_COLOR&&this.transColor([r.readUInt16BE(0),r.readUInt16BE(2),r.readUInt16BE(4)]),this._handleChunkEnd()};nt.prototype._handleGAMA=function(r){this.read(r,this._parseGAMA.bind(this))};nt.prototype._parseGAMA=function(r){this._crc.write(r),this.gamma(r.readUInt32BE(0)/Xe.GAMMA_DIVISION),this._handleChunkEnd()};nt.prototype._handleIDAT=function(r){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-r,this._parseIDAT.bind(this,r))};nt.prototype._parseIDAT=function(r,e){if(this._crc.write(e),this._colorType===Xe.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw new Error("Expected palette not found");this.inflateData(e);let t=r-e.length;t>0?this._handleIDAT(t):this._handleChunkEnd()};nt.prototype._handleIEND=function(r){this.read(r,this._parseIEND.bind(this))};nt.prototype._parseIEND=function(r){this._crc.write(r),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}});var bc=w(gm=>{"use strict";var mm=dc(),iS=[function(){},function(r,e,t,i){if(i===e.length)throw new Error("Ran out of data");let n=e[i];r[t]=n,r[t+1]=n,r[t+2]=n,r[t+3]=255},function(r,e,t,i){if(i+1>=e.length)throw new Error("Ran out of data");let n=e[i];r[t]=n,r[t+1]=n,r[t+2]=n,r[t+3]=e[i+1]},function(r,e,t,i){if(i+2>=e.length)throw new Error("Ran out of data");r[t]=e[i],r[t+1]=e[i+1],r[t+2]=e[i+2],r[t+3]=255},function(r,e,t,i){if(i+3>=e.length)throw new Error("Ran out of data");r[t]=e[i],r[t+1]=e[i+1],r[t+2]=e[i+2],r[t+3]=e[i+3]}],nS=[function(){},function(r,e,t,i){let n=e[0];r[t]=n,r[t+1]=n,r[t+2]=n,r[t+3]=i},function(r,e,t){let i=e[0];r[t]=i,r[t+1]=i,r[t+2]=i,r[t+3]=e[1]},function(r,e,t,i){r[t]=e[0],r[t+1]=e[1],r[t+2]=e[2],r[t+3]=i},function(r,e,t){r[t]=e[0],r[t+1]=e[1],r[t+2]=e[2],r[t+3]=e[3]}];function sS(r,e){let t=[],i=0;function n(){if(i===r.length)throw new Error("Ran out of data");let s=r[i];i++;let a,o,l,c,u,f,p,m;switch(e){default:throw new Error("unrecognised depth");case 16:p=r[i],i++,t.push((s<<8)+p);break;case 4:p=s&15,m=s>>4,t.push(m,p);break;case 2:u=s&3,f=s>>2&3,p=s>>4&3,m=s>>6&3,t.push(m,p,f,u);break;case 1:a=s&1,o=s>>1&1,l=s>>2&1,c=s>>3&1,u=s>>4&1,f=s>>5&1,p=s>>6&1,m=s>>7&1,t.push(m,p,f,u,c,l,o,a);break}}return{get:function(s){for(;t.length<s;)n();let a=t.slice(0,s);return t=t.slice(s),a},resetAfterLine:function(){t.length=0},end:function(){if(i!==r.length)throw new Error("extra data found")}}}function aS(r,e,t,i,n,s){let a=r.width,o=r.height,l=r.index;for(let c=0;c<o;c++)for(let u=0;u<a;u++){let f=t(u,c,l);iS[i](e,n,f,s),s+=i}return s}function oS(r,e,t,i,n,s){let a=r.width,o=r.height,l=r.index;for(let c=0;c<o;c++){for(let u=0;u<a;u++){let f=n.get(i),p=t(u,c,l);nS[i](e,f,p,s)}n.resetAfterLine()}}gm.dataToBitMap=function(r,e){let t=e.width,i=e.height,n=e.depth,s=e.bpp,a=e.interlace,o;n!==8&&(o=sS(r,n));let l;n<=8?l=Buffer.alloc(t*i*4):l=new Uint16Array(t*i*4);let c=Math.pow(2,n)-1,u=0,f,p;if(a)f=mm.getImagePasses(t,i),p=mm.getInterlaceIterator(t,i);else{let m=0;p=function(){let g=m;return m+=4,g},f=[{width:t,height:i}]}for(let m=0;m<f.length;m++)n===8?u=aS(f[m],l,p,s,r,u):oS(f[m],l,p,s,o,c);if(n===8){if(u!==r.length)throw new Error("extra data found")}else o.end();return l}});var xc=w((WL,vm)=>{"use strict";function lS(r,e,t,i,n){let s=0;for(let a=0;a<i;a++)for(let o=0;o<t;o++){let l=n[r[s]];if(!l)throw new Error("index "+r[s]+" not in palette");for(let c=0;c<4;c++)e[s+c]=l[c];s+=4}}function cS(r,e,t,i,n){let s=0;for(let a=0;a<i;a++)for(let o=0;o<t;o++){let l=!1;if(n.length===1?n[0]===r[s]&&(l=!0):n[0]===r[s]&&n[1]===r[s+1]&&n[2]===r[s+2]&&(l=!0),l)for(let c=0;c<4;c++)e[s+c]=0;s+=4}}function uS(r,e,t,i,n){let s=255,a=Math.pow(2,n)-1,o=0;for(let l=0;l<i;l++)for(let c=0;c<t;c++){for(let u=0;u<4;u++)e[o+u]=Math.floor(r[o+u]*s/a+.5);o+=4}}vm.exports=function(r,e,t=!1){let i=e.depth,n=e.width,s=e.height,a=e.colorType,o=e.transColor,l=e.palette,c=r;return a===3?lS(r,c,n,s,l):(o&&cS(r,c,n,s,o),i!==8&&!t&&(i===16&&(c=Buffer.alloc(n*s*4)),uS(r,c,n,s,i))),c}});var bm=w((zL,_m)=>{"use strict";var fS=require("util"),wc=require("zlib"),ym=fc(),hS=fm(),dS=_c(),pS=bc(),mS=xc(),hr=_m.exports=function(r){ym.call(this),this._parser=new dS(r,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=r,this.writable=!0,this._parser.start()};fS.inherits(hr,ym);hr.prototype._handleError=function(r){this.emit("error",r),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0};hr.prototype._inflateData=function(r){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=wc.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let t=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,i=Math.max(t,wc.Z_MIN_CHUNK);this._inflate=wc.createInflate({chunkSize:i});let n=t,s=this.emit.bind(this,"error");this._inflate.on("error",function(o){n&&s(o)}),this._filter.on("complete",this._complete.bind(this));let a=this._filter.write.bind(this._filter);this._inflate.on("data",function(o){n&&(o.length>n&&(o=o.slice(0,n)),n-=o.length,a(o))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(r)};hr.prototype._handleMetaData=function(r){this._metaData=r,this._bitmapInfo=Object.create(r),this._filter=new hS(this._bitmapInfo)};hr.prototype._handleTransColor=function(r){this._bitmapInfo.transColor=r};hr.prototype._handlePalette=function(r){this._bitmapInfo.palette=r};hr.prototype._simpleTransparency=function(){this._metaData.alpha=!0};hr.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};hr.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))};hr.prototype._complete=function(r){if(this.errord)return;let e;try{let t=pS.dataToBitMap(r,this._bitmapInfo);e=mS(t,this._bitmapInfo,this._options.skipRescale),t=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}});var wm=w((YL,xm)=>{"use strict";var Gt=_n();xm.exports=function(r,e,t,i){let n=[Gt.COLORTYPE_COLOR_ALPHA,Gt.COLORTYPE_ALPHA].indexOf(i.colorType)!==-1;if(i.colorType===i.inputColorType){let g=(function(){let y=new ArrayBuffer(2);return new DataView(y).setInt16(0,256,!0),new Int16Array(y)[0]!==256})();if(i.bitDepth===8||i.bitDepth===16&&g)return r}let s=i.bitDepth!==16?r:new Uint16Array(r.buffer),a=255,o=Gt.COLORTYPE_TO_BPP_MAP[i.inputColorType];o===4&&!i.inputHasAlpha&&(o=3);let l=Gt.COLORTYPE_TO_BPP_MAP[i.colorType];i.bitDepth===16&&(a=65535,l*=2);let c=Buffer.alloc(e*t*l),u=0,f=0,p=i.bgColor||{};p.red===void 0&&(p.red=a),p.green===void 0&&(p.green=a),p.blue===void 0&&(p.blue=a);function m(){let g,y,_,x=a;switch(i.inputColorType){case Gt.COLORTYPE_COLOR_ALPHA:x=s[u+3],g=s[u],y=s[u+1],_=s[u+2];break;case Gt.COLORTYPE_COLOR:g=s[u],y=s[u+1],_=s[u+2];break;case Gt.COLORTYPE_ALPHA:x=s[u+1],g=s[u],y=g,_=g;break;case Gt.COLORTYPE_GRAYSCALE:g=s[u],y=g,_=g;break;default:throw new Error("input color type:"+i.inputColorType+" is not supported at present")}return i.inputHasAlpha&&(n||(x/=a,g=Math.min(Math.max(Math.round((1-x)*p.red+x*g),0),a),y=Math.min(Math.max(Math.round((1-x)*p.green+x*y),0),a),_=Math.min(Math.max(Math.round((1-x)*p.blue+x*_),0),a))),{red:g,green:y,blue:_,alpha:x}}for(let g=0;g<t;g++)for(let y=0;y<e;y++){let _=m(s,u);switch(i.colorType){case Gt.COLORTYPE_COLOR_ALPHA:case Gt.COLORTYPE_COLOR:i.bitDepth===8?(c[f]=_.red,c[f+1]=_.green,c[f+2]=_.blue,n&&(c[f+3]=_.alpha)):(c.writeUInt16BE(_.red,f),c.writeUInt16BE(_.green,f+2),c.writeUInt16BE(_.blue,f+4),n&&c.writeUInt16BE(_.alpha,f+6));break;case Gt.COLORTYPE_ALPHA:case Gt.COLORTYPE_GRAYSCALE:{let x=(_.red+_.green+_.blue)/3;i.bitDepth===8?(c[f]=x,n&&(c[f+1]=_.alpha)):(c.writeUInt16BE(x,f),n&&c.writeUInt16BE(_.alpha,f+2));break}default:throw new Error("unrecognised color Type "+i.colorType)}u+=o,f+=l}return c}});var km=w((KL,Em)=>{"use strict";var Sm=pc();function gS(r,e,t,i,n){for(let s=0;s<t;s++)i[n+s]=r[e+s]}function vS(r,e,t){let i=0,n=e+t;for(let s=e;s<n;s++)i+=Math.abs(r[s]);return i}function yS(r,e,t,i,n,s){for(let a=0;a<t;a++){let o=a>=s?r[e+a-s]:0,l=r[e+a]-o;i[n+a]=l}}function _S(r,e,t,i){let n=0;for(let s=0;s<t;s++){let a=s>=i?r[e+s-i]:0,o=r[e+s]-a;n+=Math.abs(o)}return n}function bS(r,e,t,i,n){for(let s=0;s<t;s++){let a=e>0?r[e+s-t]:0,o=r[e+s]-a;i[n+s]=o}}function xS(r,e,t){let i=0,n=e+t;for(let s=e;s<n;s++){let a=e>0?r[s-t]:0,o=r[s]-a;i+=Math.abs(o)}return i}function wS(r,e,t,i,n,s){for(let a=0;a<t;a++){let o=a>=s?r[e+a-s]:0,l=e>0?r[e+a-t]:0,c=r[e+a]-(o+l>>1);i[n+a]=c}}function SS(r,e,t,i){let n=0;for(let s=0;s<t;s++){let a=s>=i?r[e+s-i]:0,o=e>0?r[e+s-t]:0,l=r[e+s]-(a+o>>1);n+=Math.abs(l)}return n}function ES(r,e,t,i,n,s){for(let a=0;a<t;a++){let o=a>=s?r[e+a-s]:0,l=e>0?r[e+a-t]:0,c=e>0&&a>=s?r[e+a-(t+s)]:0,u=r[e+a]-Sm(o,l,c);i[n+a]=u}}function kS(r,e,t,i){let n=0;for(let s=0;s<t;s++){let a=s>=i?r[e+s-i]:0,o=e>0?r[e+s-t]:0,l=e>0&&s>=i?r[e+s-(t+i)]:0,c=r[e+s]-Sm(a,o,l);n+=Math.abs(c)}return n}var OS={0:gS,1:yS,2:bS,3:wS,4:ES},CS={0:vS,1:_S,2:xS,3:SS,4:kS};Em.exports=function(r,e,t,i,n){let s;if(!("filterType"in i)||i.filterType===-1)s=[0,1,2,3,4];else if(typeof i.filterType=="number")s=[i.filterType];else throw new Error("unrecognised filter types");i.bitDepth===16&&(n*=2);let a=e*n,o=0,l=0,c=Buffer.alloc((a+1)*t),u=s[0];for(let f=0;f<t;f++){if(s.length>1){let p=1/0;for(let m=0;m<s.length;m++){let g=CS[s[m]](r,l,a,n);g<p&&(u=s[m],p=g)}}c[o]=u,o++,OS[u](r,l,a,c,o,n),o+=a,l+=a}return c}});var Sc=w((ZL,Om)=>{"use strict";var dt=_n(),TS=yc(),AS=wm(),IS=km(),NS=require("zlib"),Wr=Om.exports=function(r){if(this._options=r,r.deflateChunkSize=r.deflateChunkSize||32*1024,r.deflateLevel=r.deflateLevel!=null?r.deflateLevel:9,r.deflateStrategy=r.deflateStrategy!=null?r.deflateStrategy:3,r.inputHasAlpha=r.inputHasAlpha!=null?r.inputHasAlpha:!0,r.deflateFactory=r.deflateFactory||NS.createDeflate,r.bitDepth=r.bitDepth||8,r.colorType=typeof r.colorType=="number"?r.colorType:dt.COLORTYPE_COLOR_ALPHA,r.inputColorType=typeof r.inputColorType=="number"?r.inputColorType:dt.COLORTYPE_COLOR_ALPHA,[dt.COLORTYPE_GRAYSCALE,dt.COLORTYPE_COLOR,dt.COLORTYPE_COLOR_ALPHA,dt.COLORTYPE_ALPHA].indexOf(r.colorType)===-1)throw new Error("option color type:"+r.colorType+" is not supported at present");if([dt.COLORTYPE_GRAYSCALE,dt.COLORTYPE_COLOR,dt.COLORTYPE_COLOR_ALPHA,dt.COLORTYPE_ALPHA].indexOf(r.inputColorType)===-1)throw new Error("option input color type:"+r.inputColorType+" is not supported at present");if(r.bitDepth!==8&&r.bitDepth!==16)throw new Error("option bit depth:"+r.bitDepth+" is not supported at present")};Wr.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};Wr.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};Wr.prototype.filterData=function(r,e,t){let i=AS(r,e,t,this._options),n=dt.COLORTYPE_TO_BPP_MAP[this._options.colorType];return IS(i,e,t,this._options,n)};Wr.prototype._packChunk=function(r,e){let t=e?e.length:0,i=Buffer.alloc(t+12);return i.writeUInt32BE(t,0),i.writeUInt32BE(r,4),e&&e.copy(i,8),i.writeInt32BE(TS.crc32(i.slice(4,i.length-4)),i.length-4),i};Wr.prototype.packGAMA=function(r){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(r*dt.GAMMA_DIVISION),0),this._packChunk(dt.TYPE_gAMA,e)};Wr.prototype.packIHDR=function(r,e){let t=Buffer.alloc(13);return t.writeUInt32BE(r,0),t.writeUInt32BE(e,4),t[8]=this._options.bitDepth,t[9]=this._options.colorType,t[10]=0,t[11]=0,t[12]=0,this._packChunk(dt.TYPE_IHDR,t)};Wr.prototype.packIDAT=function(r){return this._packChunk(dt.TYPE_IDAT,r)};Wr.prototype.packIEND=function(){return this._packChunk(dt.TYPE_IEND,null)}});var Im=w((JL,Am)=>{"use strict";var LS=require("util"),Cm=require("stream"),BS=_n(),RS=Sc(),Tm=Am.exports=function(r){Cm.call(this);let e=r||{};this._packer=new RS(e),this._deflate=this._packer.createDeflate(),this.readable=!0};LS.inherits(Tm,Cm);Tm.prototype.pack=function(r,e,t,i){this.emit("data",Buffer.from(BS.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,t)),i&&this.emit("data",this._packer.packGAMA(i));let n=this._packer.filterData(r,e,t);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(s){this.emit("data",this._packer.packIDAT(s))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(n)}});var Mm=w((os,Pm)=>{"use strict";var Nm=require("assert").ok,bn=require("zlib"),PS=require("util"),Lm=require("buffer").kMaxLength;function Si(r){if(!(this instanceof Si))return new Si(r);r&&r.chunkSize<bn.Z_MIN_CHUNK&&(r.chunkSize=bn.Z_MIN_CHUNK),bn.Inflate.call(this,r),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,r&&r.maxLength!=null&&(this._maxLength=r.maxLength)}function MS(r){return new Si(r)}function Bm(r,e){e&&process.nextTick(e),r._handle&&(r._handle.close(),r._handle=null)}Si.prototype._processChunk=function(r,e,t){if(typeof t=="function")return bn.Inflate._processChunk.call(this,r,e,t);let i=this,n=r&&r.length,s=this._chunkSize-this._offset,a=this._maxLength,o=0,l=[],c=0,u;this.on("error",function(g){u=g});function f(g,y){if(i._hadError)return;let _=s-y;if(Nm(_>=0,"have should not go down"),_>0){let x=i._buffer.slice(i._offset,i._offset+_);if(i._offset+=_,x.length>a&&(x=x.slice(0,a)),l.push(x),c+=x.length,a-=x.length,a===0)return!1}return(y===0||i._offset>=i._chunkSize)&&(s=i._chunkSize,i._offset=0,i._buffer=Buffer.allocUnsafe(i._chunkSize)),y===0?(o+=n-g,n=g,!0):!1}Nm(this._handle,"zlib binding closed");let p;do p=this._handle.writeSync(e,r,o,n,this._buffer,this._offset,s),p=p||this._writeState;while(!this._hadError&&f(p[0],p[1]));if(this._hadError)throw u;if(c>=Lm)throw Bm(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+Lm.toString(16)+" bytes");let m=Buffer.concat(l,c);return Bm(this),m};PS.inherits(Si,bn.Inflate);function DS(r,e){if(typeof e=="string"&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let t=r._finishFlushFlag;return t==null&&(t=bn.Z_FINISH),r._processChunk(e,t)}function Rm(r,e){return DS(new Si(e),r)}Pm.exports=os=Rm;os.Inflate=Si;os.createInflate=MS;os.inflateSync=Rm});var Ec=w((QL,Fm)=>{"use strict";var Dm=Fm.exports=function(r){this._buffer=r,this._reads=[]};Dm.prototype.read=function(r,e){this._reads.push({length:Math.abs(r),allowLess:r<0,func:e})};Dm.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let r=this._reads[0];if(this._buffer.length&&(this._buffer.length>=r.length||r.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(r.length),r.func.call(this,e.slice(0,r.length))}else break}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}});var jm=w(qm=>{"use strict";var FS=Ec(),qS=mc();qm.process=function(r,e){let t=[],i=new FS(r);return new qS(e,{read:i.read.bind(i),write:function(s){t.push(s)},complete:function(){}}).start(),i.process(),Buffer.concat(t)}});var Hm=w((eB,Vm)=>{"use strict";var Um=!0,$m=require("zlib"),jS=Mm();$m.deflateSync||(Um=!1);var US=Ec(),$S=jm(),VS=_c(),HS=bc(),GS=xc();Vm.exports=function(r,e){if(!Um)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t;function i(k){t=k}let n;function s(k){n=k}function a(k){n.transColor=k}function o(k){n.palette=k}function l(){n.alpha=!0}let c;function u(k){c=k}let f=[];function p(k){f.push(k)}let m=new US(r);if(new VS(e,{read:m.read.bind(m),error:i,metadata:s,gamma:u,palette:o,transColor:a,inflateData:p,simpleTransparency:l}).start(),m.process(),t)throw t;let y=Buffer.concat(f);f.length=0;let _;if(n.interlace)_=$m.inflateSync(y);else{let E=((n.width*n.bpp*n.depth+7>>3)+1)*n.height;_=jS(y,{chunkSize:E,maxLength:E})}if(y=null,!_||!_.length)throw new Error("bad png - invalid inflate data response");let x=$S.process(_,n);y=null;let S=HS.dataToBitMap(x,n);x=null;let O=GS(S,n,e.skipRescale);return n.data=O,n.gamma=c||0,n}});var Ym=w((tB,zm)=>{"use strict";var Gm=!0,Wm=require("zlib");Wm.deflateSync||(Gm=!1);var WS=_n(),zS=Sc();zm.exports=function(r,e){if(!Gm)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t=e||{},i=new zS(t),n=[];n.push(Buffer.from(WS.PNG_SIGNATURE)),n.push(i.packIHDR(r.width,r.height)),r.gamma&&n.push(i.packGAMA(r.gamma));let s=i.filterData(r.data,r.width,r.height),a=Wm.deflateSync(s,i.getDeflateOptions());if(s=null,!a||!a.length)throw new Error("bad png - invalid compressed data response");return n.push(i.packIDAT(a)),n.push(i.packIEND()),Buffer.concat(n)}});var Km=w(kc=>{"use strict";var YS=Hm(),KS=Ym();kc.read=function(r,e){return YS(r,e||{})};kc.write=function(r,e){return KS(r,e)}});var Qm=w(Jm=>{"use strict";var ZS=require("util"),Zm=require("stream"),JS=bm(),QS=Im(),XS=Km(),_t=Jm.PNG=function(r){Zm.call(this),r=r||{},this.width=r.width|0,this.height=r.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,r.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new JS(r),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new QS(r),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};ZS.inherits(_t,Zm);_t.sync=XS;_t.prototype.pack=function(){return!this.data||!this.data.length?(this.emit("error","No data provided"),this):(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this)};_t.prototype.parse=function(r,e){if(e){let t,i;t=function(n){this.removeListener("error",i),this.data=n,e(null,this)}.bind(this),i=function(n){this.removeListener("parsed",t),e(n,null)}.bind(this),this.once("parsed",t),this.once("error",i)}return this.end(r),this};_t.prototype.write=function(r){return this._parser.write(r),!0};_t.prototype.end=function(r){this._parser.end(r)};_t.prototype._metadata=function(r){this.width=r.width,this.height=r.height,this.emit("metadata",r)};_t.prototype._gamma=function(r){this.gamma=r};_t.prototype._handleClose=function(){!this._parser.writable&&!this._packer.readable&&this.emit("close")};_t.bitblt=function(r,e,t,i,n,s,a,o){if(t|=0,i|=0,n|=0,s|=0,a|=0,o|=0,t>r.width||i>r.height||t+n>r.width||i+s>r.height)throw new Error("bitblt reading outside image");if(a>e.width||o>e.height||a+n>e.width||o+s>e.height)throw new Error("bitblt writing outside image");for(let l=0;l<s;l++)r.data.copy(e.data,(o+l)*e.width+a<<2,(i+l)*r.width+t<<2,(i+l)*r.width+t+n<<2)};_t.prototype.bitblt=function(r,e,t,i,n,s,a){return _t.bitblt(this,r,e,t,i,n,s,a),this};_t.adjustGamma=function(r){if(r.gamma){for(let e=0;e<r.height;e++)for(let t=0;t<r.width;t++){let i=r.width*e+t<<2;for(let n=0;n<3;n++){let s=r.data[i+n]/255;s=Math.pow(s,1/2.2/r.gamma),r.data[i+n]=Math.round(s*255)}}r.gamma=0}};_t.prototype.adjustGamma=function(){_t.adjustGamma(this)}});var ls=w(Cc=>{var Ua=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},Oc=class extends Ua{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Cc.CommanderError=Ua;Cc.InvalidArgumentError=Oc});var $a=w(Ac=>{var{InvalidArgumentError:eE}=ls(),Tc=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new eE(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function tE(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}Ac.Argument=Tc;Ac.humanReadableArgName=tE});var Lc=w(Nc=>{var{humanReadableArgName:rE}=$a(),Ic=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){var t,i;this.helpWidth=(i=(t=this.helpWidth)!=null?t:e.helpWidth)!=null?i:80}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden),i=e._getHelpCommand();return i&&!i._hidden&&t.push(i),this.sortSubcommands&&t.sort((n,s)=>n.name().localeCompare(s.name())),t}compareOptions(e,t){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(e).localeCompare(i(t))}visibleOptions(e){let t=e.options.filter(n=>!n.hidden),i=e._getHelpOption();if(i&&!i.hidden){let n=i.short&&e._findOption(i.short),s=i.long&&e._findOption(i.long);!n&&!s?t.push(i):i.long&&!s?t.push(e.createOption(i.long,i.description)):i.short&&!n&&t.push(e.createOption(i.short,i.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let i=e.parent;i;i=i.parent){let n=i.options.filter(s=>!s.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(i=>rE(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((i,n)=>Math.max(i,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,n)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((i,n)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,n)=>Math.max(i,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let n=e.parent;n;n=n.parent)i=n.name()+" "+i;return i+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatHelp(e,t){var f;let i=t.padWidth(e,t),n=(f=t.helpWidth)!=null?f:80;function s(p,m){return t.formatItem(p,i,m,t)}let a=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),n),""]));let l=t.visibleArguments(e).map(p=>s(t.styleArgumentTerm(t.argumentTerm(p)),t.styleArgumentDescription(t.argumentDescription(p))));l.length>0&&(a=a.concat([t.styleTitle("Arguments:"),...l,""]));let c=t.visibleOptions(e).map(p=>s(t.styleOptionTerm(t.optionTerm(p)),t.styleOptionDescription(t.optionDescription(p))));if(c.length>0&&(a=a.concat([t.styleTitle("Options:"),...c,""])),t.showGlobalOptions){let p=t.visibleGlobalOptions(e).map(m=>s(t.styleOptionTerm(t.optionTerm(m)),t.styleOptionDescription(t.optionDescription(m))));p.length>0&&(a=a.concat([t.styleTitle("Global Options:"),...p,""]))}let u=t.visibleCommands(e).map(p=>s(t.styleSubcommandTerm(t.subcommandTerm(p)),t.styleSubcommandDescription(t.subcommandDescription(p))));return u.length>0&&(a=a.concat([t.styleTitle("Commands:"),...u,""])),a.join(`
19
- `)}displayWidth(e){return Xm(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,i,n){var p;let a=" ".repeat(2);if(!i)return a+e;let o=e.padEnd(t+e.length-n.displayWidth(e)),l=2,u=((p=this.helpWidth)!=null?p:80)-t-l-2,f;return u<this.minWidthToWrap||n.preformatted(i)?f=i:f=n.boxWrap(i,u).replace(/\n/g,`
20
- `+" ".repeat(t+l)),a+o+" ".repeat(l)+f.replace(/\n/g,`
21
- ${a}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let i=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return i.forEach(a=>{let o=a.match(n);if(o===null){s.push("");return}let l=[o.shift()],c=this.displayWidth(l[0]);o.forEach(u=>{let f=this.displayWidth(u);if(c+f<=t){l.push(u),c+=f;return}s.push(l.join(""));let p=u.trimStart();l=[p],c=this.displayWidth(p)}),s.push(l.join(""))}),s.join(`
22
- `)}};function Xm(r){let e=/\x1b\[\d*(;\d*)*m/g;return r.replace(e,"")}Nc.Help=Ic;Nc.stripColor=Xm});var Mc=w(Pc=>{var{InvalidArgumentError:iE}=ls(),Bc=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let i=nE(e);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new iE(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?eg(this.name().replace(/^no-/,"")):eg(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Rc=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(e,t){let i=t.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,s=n!==void 0?n:!1;return t.negate===(s===e)}};function eg(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function nE(r){let e,t,i=/^-[^-]$/,n=/^--[^-]/,s=r.split(/[ |,]+/).concat("guard");if(i.test(s[0])&&(e=s.shift()),n.test(s[0])&&(t=s.shift()),!e&&i.test(s[0])&&(e=s.shift()),!e&&n.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let a=s[0],o=`option creation failed due to '${a}' in option flags '${r}'`;throw/^-[^-][^-]/.test(a)?new Error(`${o}
13
+ `);if(d===-1){Ls("have not received end of HTTP headers yet..."),s();return}let g=f.slice(0,d).toString("ascii").split(`\r
14
+ `),y=g.shift();if(!y)return i.destroy(),t(new Error("No header received from proxy CONNECT response"));let m=y.split(" "),b=+m[1],w=m.slice(2).join(" "),x={};for(let _ of g){if(!_)continue;let k=_.indexOf(":");if(k===-1)return i.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${_}"`));let S=_.slice(0,k).toLowerCase(),R=_.slice(k+1).trimStart(),T=x[S];typeof T=="string"?x[S]=[T,R]:Array.isArray(T)?T.push(R):x[S]=R}Ls("got proxy server response: %o %o",y,x),o(),e({connect:{statusCode:b,statusText:w,headers:x},buffered:f})}i.on("error",l),i.on("end",a),s()})}Er.parseProxyResponse=Iw});var _p=O(It=>{"use strict";var Nw=It&&It.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Bw=It&&It.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),vp=It&&It.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Nw(e,i,t);return Bw(e,i),e},bp=It&&It.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(It,"__esModule",{value:!0});It.HttpsProxyAgent=void 0;var Ps=vp(require("net")),mp=vp(require("tls")),Lw=bp(require("assert")),Pw=bp(nn()),Rw=pl(),Mw=require("url"),Dw=dp(),un=(0,Pw.default)("https-proxy-agent"),gp=i=>i.servername===void 0&&i.host&&!Ps.isIP(i.host)?{...i,servername:i.host}:i,Rs=class extends Rw.Agent{constructor(e,t){var s;super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new Mw.URL(e):e,this.proxyHeaders=(s=t==null?void 0:t.headers)!=null?s:{},un("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?yp(t,"headers"):null,host:r,port:n}}async connect(e,t){let{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let n;r.protocol==="https:"?(un("Creating `tls.Socket`: %o",this.connectOpts),n=mp.connect(gp(this.connectOpts))):(un("Creating `net.Socket`: %o",this.connectOpts),n=Ps.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=Ps.isIPv6(t.host)?`[${t.host}]`:t.host,a=`CONNECT ${o}:${t.port} HTTP/1.1\r
15
+ `;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${o}:${t.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
16
+ `;let l=(0,Dw.parseProxyResponse)(n);n.write(`${a}\r
17
+ `);let{connect:c,buffered:u}=await l;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",qw),t.secureEndpoint?(un("Upgrading socket connection to TLS"),mp.connect({...yp(gp(t),"host","path","port"),socket:n})):n;n.destroy();let f=new Ps.Socket({writable:!1});return f.readable=!0,e.once("socket",d=>{un("Replaying proxy buffer for failed request"),(0,Lw.default)(d.listenerCount("data")>0),d.push(u),d.push(null)}),f}};Rs.protocols=["http","https"];It.HttpsProxyAgent=Rs;function qw(i){i.resume()}function yp(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var Sp=O((L2,Ms)=>{var xp=xp||function(i){return Buffer.from(i).toString("base64")};function Fw(i){var e=this,t=Math.round,r=Math.floor,n=new Array(64),s=new Array(64),o=new Array(64),a=new Array(64),l,c,u,f,d=new Array(65535),g=new Array(65535),y=new Array(64),m=new Array(64),b=[],w=0,x=7,_=new Array(64),k=new Array(64),S=new Array(64),R=new Array(256),T=new Array(2048),N,C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],M=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],j=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],J=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],F=[0,1,2,3,4,5,6,7,8,9,10,11],V=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Z=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ee(A){for(var z=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],te=0;te<64;te++){var X=r((z[te]*A+50)/100);X<1?X=1:X>255&&(X=255),n[C[te]]=X}for(var oe=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ae=0;ae<64;ae++){var be=r((oe[ae]*A+50)/100);be<1?be=1:be>255&&(be=255),s[C[ae]]=be}for(var _e=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Pe=0,Ae=0;Ae<8;Ae++)for(var q=0;q<8;q++)o[Pe]=1/(n[C[Pe]]*_e[Ae]*_e[q]*8),a[Pe]=1/(s[C[Pe]]*_e[Ae]*_e[q]*8),Pe++}function W(A,z){for(var te=0,X=0,oe=new Array,ae=1;ae<=16;ae++){for(var be=1;be<=A[ae];be++)oe[z[X]]=[],oe[z[X]][0]=te,oe[z[X]][1]=ae,X++,te++;te*=2}return oe}function Se(){l=W(M,L),c=W(J,F),u=W(G,j),f=W(V,Z)}function de(){for(var A=1,z=2,te=1;te<=15;te++){for(var X=A;X<z;X++)g[32767+X]=te,d[32767+X]=[],d[32767+X][1]=te,d[32767+X][0]=X;for(var oe=-(z-1);oe<=-A;oe++)g[32767+oe]=te,d[32767+oe]=[],d[32767+oe][1]=te,d[32767+oe][0]=z-1+oe;A<<=1,z<<=1}}function le(){for(var A=0;A<256;A++)T[A]=19595*A,T[A+256>>0]=38470*A,T[A+512>>0]=7471*A+32768,T[A+768>>0]=-11059*A,T[A+1024>>0]=-21709*A,T[A+1280>>0]=32768*A+8421375,T[A+1536>>0]=-27439*A,T[A+1792>>0]=-5329*A}function ce(A){for(var z=A[0],te=A[1]-1;te>=0;)z&1<<te&&(w|=1<<x),te--,x--,x<0&&(w==255?(I(255),I(0)):I(w),x=7,w=0)}function I(A){b.push(A)}function Q(A){I(A>>8&255),I(A&255)}function ke(A,z){var te,X,oe,ae,be,_e,Pe,Ae,q=0,K,ne=8,Ne=64;for(K=0;K<ne;++K){te=A[q],X=A[q+1],oe=A[q+2],ae=A[q+3],be=A[q+4],_e=A[q+5],Pe=A[q+6],Ae=A[q+7];var se=te+Ae,pe=te-Ae,Ee=X+Pe,ie=X-Pe,we=oe+_e,Ve=oe-_e,Ie=ae+be,dt=ae-be,Ct=se+Ie,ri=se-Ie,gi=Ee+we,yi=Ee-we;A[q]=Ct+gi,A[q+4]=Ct-gi;var qi=(yi+ri)*.707106781;A[q+2]=ri+qi,A[q+6]=ri-qi,Ct=dt+Ve,gi=Ve+ie,yi=ie+pe;var Fi=(Ct-yi)*.382683433,mr=.5411961*Ct+Fi,ji=1.306562965*yi+Fi,Ui=gi*.707106781,$i=pe+Ui,Vi=pe-Ui;A[q+5]=Vi+mr,A[q+3]=Vi-mr,A[q+1]=$i+ji,A[q+7]=$i-ji,q+=8}for(q=0,K=0;K<ne;++K){te=A[q],X=A[q+8],oe=A[q+16],ae=A[q+24],be=A[q+32],_e=A[q+40],Pe=A[q+48],Ae=A[q+56];var ns=te+Ae,rn=te-Ae,ss=X+Pe,os=X-Pe,as=oe+_e,ls=oe-_e,cs=ae+be,Sa=ae-be,Hi=ns+cs,ni=ns-cs,Gi=ss+as,gr=ss-as;A[q]=Hi+Gi,A[q+32]=Hi-Gi;var us=(gr+ni)*.707106781;A[q+16]=ni+us,A[q+48]=ni-us,Hi=Sa+ls,Gi=ls+os,gr=os+rn;var fs=(Hi-gr)*.382683433,hs=.5411961*Hi+fs,ps=1.306562965*gr+fs,Yt=Gi*.707106781,ds=rn+Yt,ms=rn-Yt;A[q+40]=ms+hs,A[q+24]=ms-hs,A[q+8]=ds+ps,A[q+56]=ds-ps,q++}var yr;for(K=0;K<Ne;++K)yr=A[K]*z[K],y[K]=yr>0?yr+.5|0:yr-.5|0;return y}function ve(){Q(65504),Q(16),I(74),I(70),I(73),I(70),I(0),I(1),I(1),I(0),Q(1),Q(1),I(0),I(0)}function me(A){if(A){Q(65505),A[0]===69&&A[1]===120&&A[2]===105&&A[3]===102?Q(A.length+2):(Q(A.length+5+2),I(69),I(120),I(105),I(102),I(0));for(var z=0;z<A.length;z++)I(A[z])}}function ge(A,z){Q(65472),Q(17),I(8),Q(z),Q(A),I(3),I(1),I(17),I(0),I(2),I(17),I(1),I(3),I(17),I(1)}function ue(){Q(65499),Q(132),I(0);for(var A=0;A<64;A++)I(n[A]);I(1);for(var z=0;z<64;z++)I(s[z])}function Y(){Q(65476),Q(418),I(0);for(var A=0;A<16;A++)I(M[A+1]);for(var z=0;z<=11;z++)I(L[z]);I(16);for(var te=0;te<16;te++)I(G[te+1]);for(var X=0;X<=161;X++)I(j[X]);I(1);for(var oe=0;oe<16;oe++)I(J[oe+1]);for(var ae=0;ae<=11;ae++)I(F[ae]);I(17);for(var be=0;be<16;be++)I(V[be+1]);for(var _e=0;_e<=161;_e++)I(Z[_e])}function U(A){typeof A=="undefined"||A.constructor!==Array||A.forEach(z=>{if(typeof z=="string"){Q(65534);var te=z.length;Q(te+2);var X;for(X=0;X<te;X++)I(z.charCodeAt(X))}})}function Te(){Q(65498),Q(12),I(3),I(1),I(0),I(2),I(17),I(3),I(17),I(0),I(63),I(0)}function re(A,z,te,X,oe){for(var ae=oe[0],be=oe[240],_e,Pe=16,Ae=63,q=64,K=ke(A,z),ne=0;ne<q;++ne)m[C[ne]]=K[ne];var Ne=m[0]-te;te=m[0],Ne==0?ce(X[0]):(_e=32767+Ne,ce(X[g[_e]]),ce(d[_e]));for(var se=63;se>0&&m[se]==0;se--);if(se==0)return ce(ae),te;for(var pe=1,Ee;pe<=se;){for(var ie=pe;m[pe]==0&&pe<=se;++pe);var we=pe-ie;if(we>=Pe){Ee=we>>4;for(var Ve=1;Ve<=Ee;++Ve)ce(be);we=we&15}_e=32767+m[pe],ce(oe[(we<<4)+g[_e]]),ce(d[_e]),pe++}return se!=Ae&&ce(ae),te}function fe(){for(var A=String.fromCharCode,z=0;z<256;z++)R[z]=A(z)}this.encode=function(A,z){var te=new Date().getTime();z&&pt(z),b=new Array,w=0,x=7,Q(65496),ve(),U(A.comments),me(A.exifBuffer),ue(),ge(A.width,A.height),Y(),Te();var X=0,oe=0,ae=0;w=0,x=7,this.encode.displayName="_encode_";for(var be=A.data,_e=A.width,Pe=A.height,Ae=_e*4,q=_e*3,K,ne=0,Ne,se,pe,Ee,ie,we,Ve,Ie;ne<Pe;){for(K=0;K<Ae;){for(Ee=Ae*ne+K,ie=Ee,we=-1,Ve=0,Ie=0;Ie<64;Ie++)Ve=Ie>>3,we=(Ie&7)*4,ie=Ee+Ve*Ae+we,ne+Ve>=Pe&&(ie-=Ae*(ne+1+Ve-Pe)),K+we>=Ae&&(ie-=K+we-Ae+4),Ne=be[ie++],se=be[ie++],pe=be[ie++],_[Ie]=(T[Ne]+T[se+256>>0]+T[pe+512>>0]>>16)-128,k[Ie]=(T[Ne+768>>0]+T[se+1024>>0]+T[pe+1280>>0]>>16)-128,S[Ie]=(T[Ne+1280>>0]+T[se+1536>>0]+T[pe+1792>>0]>>16)-128;X=re(_,o,X,l,u),oe=re(k,a,oe,c,f),ae=re(S,a,ae,c,f),K+=32}ne+=8}if(x>=0){var dt=[];dt[1]=x+1,dt[0]=(1<<x+1)-1,ce(dt)}if(Q(65497),typeof Ms=="undefined")return new Uint8Array(b);return Buffer.from(b);var Ct,ri};function pt(A){if(A<=0&&(A=1),A>100&&(A=100),N!=A){var z=0;A<50?z=Math.floor(5e3/A):z=Math.floor(200-A*2),ee(z),N=A}}function bt(){var A=new Date().getTime();i||(i=50),fe(),Se(),de(),le(),pt(i);var z=new Date().getTime()-A}bt()}typeof Ms!="undefined"?Ms.exports=wp:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].encode=wp);function wp(i,e){typeof e=="undefined"&&(e=50);var t=new Fw(e),r=t.encode(i,e);return{data:r,width:i.width,height:i.height}}});var Op=O((P2,ml)=>{var dl=(function(){"use strict";var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,n=3406,s=2276,o=1567,a=3784,l=5793,c=2896;function u(){}function f(x,_){for(var k=0,S=[],R,T,N=16;N>0&&!x[N-1];)N--;S.push({children:[],index:0});var C=S[0],M;for(R=0;R<N;R++){for(T=0;T<x[R];T++){for(C=S.pop(),C.children[C.index]=_[k];C.index>0;){if(S.length===0)throw new Error("Could not recreate Huffman Table");C=S.pop()}for(C.index++,S.push(C);S.length<=R;)S.push(M={children:[],index:0}),C.children[C.index]=M.children,C=M;k++}R+1<N&&(S.push(M={children:[],index:0}),C.children[C.index]=M.children,C=M)}return S[0].children}function d(x,_,k,S,R,T,N,C,M,L){var G=k.precision,j=k.samplesPerLine,J=k.scanLines,F=k.mcusPerLine,V=k.progressive,Z=k.maxH,ee=k.maxV,W=_,Se=0,de=0;function le(){if(de>0)return de--,Se>>de&1;if(Se=x[_++],Se==255){var q=x[_++];if(q)throw new Error("unexpected marker: "+(Se<<8|q).toString(16))}return de=7,Se>>>7}function ce(q){for(var K=q,ne;(ne=le())!==null;){if(K=K[ne],typeof K=="number")return K;if(typeof K!="object")throw new Error("invalid huffman sequence")}return null}function I(q){for(var K=0;q>0;){var ne=le();if(ne===null)return;K=K<<1|ne,q--}return K}function Q(q){var K=I(q);return K>=1<<q-1?K:K+(-1<<q)+1}function ke(q,K){var ne=ce(q.huffmanTableDC),Ne=ne===0?0:Q(ne);K[0]=q.pred+=Ne;for(var se=1;se<64;){var pe=ce(q.huffmanTableAC),Ee=pe&15,ie=pe>>4;if(Ee===0){if(ie<15)break;se+=16;continue}se+=ie;var we=e[se];K[we]=Q(Ee),se++}}function ve(q,K){var ne=ce(q.huffmanTableDC),Ne=ne===0?0:Q(ne)<<M;K[0]=q.pred+=Ne}function me(q,K){K[0]|=le()<<M}var ge=0;function ue(q,K){if(ge>0){ge--;return}for(var ne=T,Ne=N;ne<=Ne;){var se=ce(q.huffmanTableAC),pe=se&15,Ee=se>>4;if(pe===0){if(Ee<15){ge=I(Ee)+(1<<Ee)-1;break}ne+=16;continue}ne+=Ee;var ie=e[ne];K[ie]=Q(pe)*(1<<M),ne++}}var Y=0,U;function Te(q,K){for(var ne=T,Ne=N,se=0;ne<=Ne;){var pe=e[ne],Ee=K[pe]<0?-1:1;switch(Y){case 0:var ie=ce(q.huffmanTableAC),we=ie&15,se=ie>>4;if(we===0)se<15?(ge=I(se)+(1<<se),Y=4):(se=16,Y=1);else{if(we!==1)throw new Error("invalid ACn encoding");U=Q(we),Y=se?2:3}continue;case 1:case 2:K[pe]?K[pe]+=(le()<<M)*Ee:(se--,se===0&&(Y=Y==2?3:0));break;case 3:K[pe]?K[pe]+=(le()<<M)*Ee:(K[pe]=U<<M,Y=0);break;case 4:K[pe]&&(K[pe]+=(le()<<M)*Ee);break}ne++}Y===4&&(ge--,ge===0&&(Y=0))}function re(q,K,ne,Ne,se){var pe=ne/F|0,Ee=ne%F,ie=pe*q.v+Ne,we=Ee*q.h+se;q.blocks[ie]===void 0&&L.tolerantDecoding||K(q,q.blocks[ie][we])}function fe(q,K,ne){var Ne=ne/q.blocksPerLine|0,se=ne%q.blocksPerLine;q.blocks[Ne]===void 0&&L.tolerantDecoding||K(q,q.blocks[Ne][se])}var pt=S.length,bt,A,z,te,X,oe;V?T===0?oe=C===0?ve:me:oe=C===0?ue:Te:oe=ke;var ae=0,be,_e;pt==1?_e=S[0].blocksPerLine*S[0].blocksPerColumn:_e=F*k.mcusPerColumn,R||(R=_e);for(var Pe,Ae;ae<_e;){for(A=0;A<pt;A++)S[A].pred=0;if(ge=0,pt==1)for(bt=S[0],X=0;X<R;X++)fe(bt,oe,ae),ae++;else for(X=0;X<R;X++){for(A=0;A<pt;A++)for(bt=S[A],Pe=bt.h,Ae=bt.v,z=0;z<Ae;z++)for(te=0;te<Pe;te++)re(bt,oe,ae,z,te);if(ae++,ae===_e)break}if(ae===_e)do{if(x[_]===255&&x[_+1]!==0)break;_+=1}while(_<x.length-2);if(de=0,be=x[_]<<8|x[_+1],be<65280)throw new Error("marker was not found");if(be>=65488&&be<=65495)_+=2;else break}return _-W}function g(x,_){var k=[],S=_.blocksPerLine,R=_.blocksPerColumn,T=S<<3,N=new Int32Array(64),C=new Uint8Array(64);function M(W,Se,de){var le=_.quantizationTable,ce,I,Q,ke,ve,me,ge,ue,Y,U=de,Te;for(Te=0;Te<64;Te++)U[Te]=W[Te]*le[Te];for(Te=0;Te<8;++Te){var re=8*Te;if(U[1+re]==0&&U[2+re]==0&&U[3+re]==0&&U[4+re]==0&&U[5+re]==0&&U[6+re]==0&&U[7+re]==0){Y=l*U[0+re]+512>>10,U[0+re]=Y,U[1+re]=Y,U[2+re]=Y,U[3+re]=Y,U[4+re]=Y,U[5+re]=Y,U[6+re]=Y,U[7+re]=Y;continue}ce=l*U[0+re]+128>>8,I=l*U[4+re]+128>>8,Q=U[2+re],ke=U[6+re],ve=c*(U[1+re]-U[7+re])+128>>8,ue=c*(U[1+re]+U[7+re])+128>>8,me=U[3+re]<<4,ge=U[5+re]<<4,Y=ce-I+1>>1,ce=ce+I+1>>1,I=Y,Y=Q*a+ke*o+128>>8,Q=Q*o-ke*a+128>>8,ke=Y,Y=ve-ge+1>>1,ve=ve+ge+1>>1,ge=Y,Y=ue+me+1>>1,me=ue-me+1>>1,ue=Y,Y=ce-ke+1>>1,ce=ce+ke+1>>1,ke=Y,Y=I-Q+1>>1,I=I+Q+1>>1,Q=Y,Y=ve*s+ue*n+2048>>12,ve=ve*n-ue*s+2048>>12,ue=Y,Y=me*r+ge*t+2048>>12,me=me*t-ge*r+2048>>12,ge=Y,U[0+re]=ce+ue,U[7+re]=ce-ue,U[1+re]=I+ge,U[6+re]=I-ge,U[2+re]=Q+me,U[5+re]=Q-me,U[3+re]=ke+ve,U[4+re]=ke-ve}for(Te=0;Te<8;++Te){var fe=Te;if(U[8+fe]==0&&U[16+fe]==0&&U[24+fe]==0&&U[32+fe]==0&&U[40+fe]==0&&U[48+fe]==0&&U[56+fe]==0){Y=l*de[Te+0]+8192>>14,U[0+fe]=Y,U[8+fe]=Y,U[16+fe]=Y,U[24+fe]=Y,U[32+fe]=Y,U[40+fe]=Y,U[48+fe]=Y,U[56+fe]=Y;continue}ce=l*U[0+fe]+2048>>12,I=l*U[32+fe]+2048>>12,Q=U[16+fe],ke=U[48+fe],ve=c*(U[8+fe]-U[56+fe])+2048>>12,ue=c*(U[8+fe]+U[56+fe])+2048>>12,me=U[24+fe],ge=U[40+fe],Y=ce-I+1>>1,ce=ce+I+1>>1,I=Y,Y=Q*a+ke*o+2048>>12,Q=Q*o-ke*a+2048>>12,ke=Y,Y=ve-ge+1>>1,ve=ve+ge+1>>1,ge=Y,Y=ue+me+1>>1,me=ue-me+1>>1,ue=Y,Y=ce-ke+1>>1,ce=ce+ke+1>>1,ke=Y,Y=I-Q+1>>1,I=I+Q+1>>1,Q=Y,Y=ve*s+ue*n+2048>>12,ve=ve*n-ue*s+2048>>12,ue=Y,Y=me*r+ge*t+2048>>12,me=me*t-ge*r+2048>>12,ge=Y,U[0+fe]=ce+ue,U[56+fe]=ce-ue,U[8+fe]=I+ge,U[48+fe]=I-ge,U[16+fe]=Q+me,U[40+fe]=Q-me,U[24+fe]=ke+ve,U[32+fe]=ke-ve}for(Te=0;Te<64;++Te){var pt=128+(U[Te]+8>>4);Se[Te]=pt<0?0:pt>255?255:pt}}w(T*R*8);for(var L,G,j=0;j<R;j++){var J=j<<3;for(L=0;L<8;L++)k.push(new Uint8Array(T));for(var F=0;F<S;F++){M(_.blocks[j][F],C,N);var V=0,Z=F<<3;for(G=0;G<8;G++){var ee=k[J+G];for(L=0;L<8;L++)ee[Z+L]=C[V++]}}}return k}function y(x){return x<0?0:x>255?255:x}u.prototype={load:function(_){var k=new XMLHttpRequest;k.open("GET",_,!0),k.responseType="arraybuffer",k.onload=(function(){var S=new Uint8Array(k.response||k.mozResponseArrayBuffer);this.parse(S),this.onload&&this.onload()}).bind(this),k.send(null)},parse:function(_){var k=this.opts.maxResolutionInMP*1e3*1e3,S=0,R=_.length;function T(){var ie=_[S]<<8|_[S+1];return S+=2,ie}function N(){var ie=T(),we=_.subarray(S,S+ie-2);return S+=we.length,we}function C(ie){var we=1,Ve=1,Ie,dt;for(dt in ie.components)ie.components.hasOwnProperty(dt)&&(Ie=ie.components[dt],we<Ie.h&&(we=Ie.h),Ve<Ie.v&&(Ve=Ie.v));var Ct=Math.ceil(ie.samplesPerLine/8/we),ri=Math.ceil(ie.scanLines/8/Ve);for(dt in ie.components)if(ie.components.hasOwnProperty(dt)){Ie=ie.components[dt];var gi=Math.ceil(Math.ceil(ie.samplesPerLine/8)*Ie.h/we),yi=Math.ceil(Math.ceil(ie.scanLines/8)*Ie.v/Ve),qi=Ct*Ie.h,Fi=ri*Ie.v,mr=Fi*qi,ji=[];w(mr*256);for(var Ui=0;Ui<Fi;Ui++){for(var $i=[],Vi=0;Vi<qi;Vi++)$i.push(new Int32Array(64));ji.push($i)}Ie.blocksPerLine=gi,Ie.blocksPerColumn=yi,Ie.blocks=ji}ie.maxH=we,ie.maxV=Ve,ie.mcusPerLine=Ct,ie.mcusPerColumn=ri}var M=null,L=null,G=null,j,J,F=[],V=[],Z=[],ee=[],W=T(),Se=-1;if(this.comments=[],W!=65496)throw new Error("SOI not found");for(W=T();W!=65497;){var de,le,ce;switch(W){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var I=N();if(W===65534){var Q=String.fromCharCode.apply(null,I);this.comments.push(Q)}W===65504&&I[0]===74&&I[1]===70&&I[2]===73&&I[3]===70&&I[4]===0&&(M={version:{major:I[5],minor:I[6]},densityUnits:I[7],xDensity:I[8]<<8|I[9],yDensity:I[10]<<8|I[11],thumbWidth:I[12],thumbHeight:I[13],thumbData:I.subarray(14,14+3*I[12]*I[13])}),W===65505&&I[0]===69&&I[1]===120&&I[2]===105&&I[3]===102&&I[4]===0&&(this.exifBuffer=I.subarray(5,I.length)),W===65518&&I[0]===65&&I[1]===100&&I[2]===111&&I[3]===98&&I[4]===101&&I[5]===0&&(L={version:I[6],flags0:I[7]<<8|I[8],flags1:I[9]<<8|I[10],transformCode:I[11]});break;case 65499:for(var ke=T(),ve=ke+S-2;S<ve;){var me=_[S++];w(256);var ge=new Int32Array(64);if(me>>4===0)for(le=0;le<64;le++){var ue=e[le];ge[ue]=_[S++]}else if(me>>4===1)for(le=0;le<64;le++){var ue=e[le];ge[ue]=T()}else throw new Error("DQT: invalid table spec");F[me&15]=ge}break;case 65472:case 65473:case 65474:T(),j={},j.extended=W===65473,j.progressive=W===65474,j.precision=_[S++],j.scanLines=T(),j.samplesPerLine=T(),j.components={},j.componentsOrder=[];var Y=j.scanLines*j.samplesPerLine;if(Y>k){var U=Math.ceil((Y-k)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${U}MP`)}var Te=_[S++],re,fe=0,pt=0;for(de=0;de<Te;de++){re=_[S];var bt=_[S+1]>>4,A=_[S+1]&15,z=_[S+2];if(bt<=0||A<=0)throw new Error("Invalid sampling factor, expected values above 0");j.componentsOrder.push(re),j.components[re]={h:bt,v:A,quantizationIdx:z},S+=3}C(j),V.push(j);break;case 65476:var te=T();for(de=2;de<te;){var X=_[S++],oe=new Uint8Array(16),ae=0;for(le=0;le<16;le++,S++)ae+=oe[le]=_[S];w(16+ae);var be=new Uint8Array(ae);for(le=0;le<ae;le++,S++)be[le]=_[S];de+=17+ae,(X>>4===0?ee:Z)[X&15]=f(oe,be)}break;case 65501:T(),J=T();break;case 65500:T(),T();break;case 65498:var _e=T(),Pe=_[S++],Ae=[],q;for(de=0;de<Pe;de++){q=j.components[_[S++]];var K=_[S++];q.huffmanTableDC=ee[K>>4],q.huffmanTableAC=Z[K&15],Ae.push(q)}var ne=_[S++],Ne=_[S++],se=_[S++],pe=d(_,S,j,Ae,J,ne,Ne,se>>4,se&15,this.opts);S+=pe;break;case 65535:_[S]!==255&&S--;break;default:if(_[S-3]==255&&_[S-2]>=192&&_[S-2]<=254){S-=3;break}else if(W===224||W==225){if(Se!==-1)throw new Error(`first unknown JPEG marker at offset ${Se.toString(16)}, second unknown JPEG marker ${W.toString(16)} at offset ${(S-1).toString(16)}`);Se=S-1;let ie=T();if(_[S+ie-2]===255){S+=ie-2;break}}throw new Error("unknown JPEG marker "+W.toString(16))}W=T()}if(V.length!=1)throw new Error("only single frame JPEGs supported");for(var de=0;de<V.length;de++){var Ee=V[de].components;for(var le in Ee)Ee[le].quantizationTable=F[Ee[le].quantizationIdx],delete Ee[le].quantizationIdx}this.width=j.samplesPerLine,this.height=j.scanLines,this.jfif=M,this.adobe=L,this.components=[];for(var de=0;de<j.componentsOrder.length;de++){var q=j.components[j.componentsOrder[de]];this.components.push({lines:g(j,q),scaleX:q.h/j.maxH,scaleY:q.v/j.maxV})}},getData:function(_,k){var S=this.width/_,R=this.height/k,T,N,C,M,L,G,j,J,F,V,Z=0,ee,W,Se,de,le,ce,I,Q,ke,ve,me,ge=_*k*this.components.length;w(ge);var ue=new Uint8Array(ge);switch(this.components.length){case 1:for(T=this.components[0],V=0;V<k;V++)for(L=T.lines[0|V*T.scaleY*R],F=0;F<_;F++)ee=L[0|F*T.scaleX*S],ue[Z++]=ee;break;case 2:for(T=this.components[0],N=this.components[1],V=0;V<k;V++)for(L=T.lines[0|V*T.scaleY*R],G=N.lines[0|V*N.scaleY*R],F=0;F<_;F++)ee=L[0|F*T.scaleX*S],ue[Z++]=ee,ee=G[0|F*N.scaleX*S],ue[Z++]=ee;break;case 3:for(me=!0,this.adobe&&this.adobe.transformCode?me=!0:typeof this.opts.colorTransform!="undefined"&&(me=!!this.opts.colorTransform),T=this.components[0],N=this.components[1],C=this.components[2],V=0;V<k;V++)for(L=T.lines[0|V*T.scaleY*R],G=N.lines[0|V*N.scaleY*R],j=C.lines[0|V*C.scaleY*R],F=0;F<_;F++)me?(ee=L[0|F*T.scaleX*S],W=G[0|F*N.scaleX*S],Se=j[0|F*C.scaleX*S],Q=y(ee+1.402*(Se-128)),ke=y(ee-.3441363*(W-128)-.71413636*(Se-128)),ve=y(ee+1.772*(W-128))):(Q=L[0|F*T.scaleX*S],ke=G[0|F*N.scaleX*S],ve=j[0|F*C.scaleX*S]),ue[Z++]=Q,ue[Z++]=ke,ue[Z++]=ve;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(me=!1,this.adobe&&this.adobe.transformCode?me=!0:typeof this.opts.colorTransform!="undefined"&&(me=!!this.opts.colorTransform),T=this.components[0],N=this.components[1],C=this.components[2],M=this.components[3],V=0;V<k;V++)for(L=T.lines[0|V*T.scaleY*R],G=N.lines[0|V*N.scaleY*R],j=C.lines[0|V*C.scaleY*R],J=M.lines[0|V*M.scaleY*R],F=0;F<_;F++)me?(ee=L[0|F*T.scaleX*S],W=G[0|F*N.scaleX*S],Se=j[0|F*C.scaleX*S],de=J[0|F*M.scaleX*S],le=255-y(ee+1.402*(Se-128)),ce=255-y(ee-.3441363*(W-128)-.71413636*(Se-128)),I=255-y(ee+1.772*(W-128))):(le=L[0|F*T.scaleX*S],ce=G[0|F*N.scaleX*S],I=j[0|F*C.scaleX*S],de=J[0|F*M.scaleX*S]),ue[Z++]=255-le,ue[Z++]=255-ce,ue[Z++]=255-I,ue[Z++]=255-de;break;default:throw new Error("Unsupported color mode")}return ue},copyToImageData:function(_,k){var S=_.width,R=_.height,T=_.data,N=this.getData(S,R),C=0,M=0,L,G,j,J,F,V,Z,ee,W;switch(this.components.length){case 1:for(G=0;G<R;G++)for(L=0;L<S;L++)j=N[C++],T[M++]=j,T[M++]=j,T[M++]=j,k&&(T[M++]=255);break;case 3:for(G=0;G<R;G++)for(L=0;L<S;L++)Z=N[C++],ee=N[C++],W=N[C++],T[M++]=Z,T[M++]=ee,T[M++]=W,k&&(T[M++]=255);break;case 4:for(G=0;G<R;G++)for(L=0;L<S;L++)F=N[C++],V=N[C++],j=N[C++],J=N[C++],Z=255-y(F*(1-J/255)+J),ee=255-y(V*(1-J/255)+J),W=255-y(j*(1-J/255)+J),T[M++]=Z,T[M++]=ee,T[M++]=W,k&&(T[M++]=255);break;default:throw new Error("Unsupported color mode")}}};var m=0,b=0;function w(x=0){var _=m+x;if(_>b){var k=Math.ceil((_-b)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${k}MB`)}m=_}return u.resetMaxMemoryUsage=function(x){m=0,b=x},u.getBytesAllocated=function(){return m},u.requestMemoryAllocation=w,u})();typeof ml!="undefined"?ml.exports=Ep:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].decode=Ep);function Ep(i,e={}){var t={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512},r={...t,...e},n=new Uint8Array(i),s=new dl;s.opts=r,dl.resetMaxMemoryUsage(r.maxMemoryUsageInMB*1024*1024),s.parse(n);var o=r.formatAsRGBA?4:3,a=s.width*s.height*o;try{dl.requestMemoryAllocation(a);var l={width:s.width,height:s.height,exifBuffer:s.exifBuffer,data:r.useTArray?new Uint8Array(a):Buffer.alloc(a)};s.comments.length>0&&(l.comments=s.comments)}catch(c){throw c instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+a):c instanceof ReferenceError&&c.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):c}return s.copyToImageData(l,r.formatAsRGBA),l}});var Cp=O((R2,kp)=>{var jw=Sp(),Uw=Op();kp.exports={encode:jw,decode:Uw}});var Ap=O((M2,Tp)=>{"use strict";function Ds(){this._types=Object.create(null),this._extensions=Object.create(null);for(let i=0;i<arguments.length;i++)this.define(arguments[i]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Ds.prototype.define=function(i,e){for(let t in i){let r=i[t].map(function(n){return n.toLowerCase()});t=t.toLowerCase();for(let n=0;n<r.length;n++){let s=r[n];if(s[0]!=="*"){if(!e&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+t+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+t+'".');this._types[s]=t}}if(e||!this._extensions[t]){let n=r[0];this._extensions[t]=n[0]!=="*"?n:n.substr(1)}}};Ds.prototype.getType=function(i){i=String(i);let e=i.replace(/^.*[/\\]/,"").toLowerCase(),t=e.replace(/^.*\./,"").toLowerCase(),r=e.length<i.length;return(t.length<e.length-1||!r)&&this._types[t]||null};Ds.prototype.getExtension=function(i){return i=/^\s*([^;\s]*)/.test(i)&&RegExp.$1,i&&this._extensions[i.toLowerCase()]||null};Tp.exports=Ds});var Np=O((D2,Ip)=>{Ip.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}});var Lp=O((q2,Bp)=>{Bp.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}});var Rp=O((F2,Pp)=>{"use strict";var $w=Ap();Pp.exports=new $w(Np(),Lp())});var Dp=O((j2,Mp)=>{Mp.exports=function(i,e){for(var t=[],r=0;r<i.length;r++){var n=e(i[r],r);Vw(n)?t.push.apply(t,n):t.push(n)}return t};var Vw=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}});var $p=O((U2,Up)=>{"use strict";Up.exports=Fp;function Fp(i,e,t){i instanceof RegExp&&(i=qp(i,t)),e instanceof RegExp&&(e=qp(e,t));var r=jp(i,e,t);return r&&{start:r[0],end:r[1],pre:t.slice(0,r[0]),body:t.slice(r[0]+i.length,r[1]),post:t.slice(r[1]+e.length)}}function qp(i,e){var t=e.match(i);return t?t[0]:null}Fp.range=jp;function jp(i,e,t){var r,n,s,o,a,l=t.indexOf(i),c=t.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(i===e)return[l,c];for(r=[],s=t.length;u>=0&&!a;)u==l?(r.push(u),l=t.indexOf(i,u+1)):r.length==1?a=[r.pop(),c]:(n=r.pop(),n<s&&(s=n,o=c),c=t.indexOf(e,u+1)),u=l<c&&l>=0?l:c;r.length&&(a=[s,o])}return a}});var Jp=O(($2,zp)=>{var Hw=Dp(),Vp=$p();zp.exports=Yw;var Hp="\0SLASH"+Math.random()+"\0",Gp="\0OPEN"+Math.random()+"\0",yl="\0CLOSE"+Math.random()+"\0",Wp="\0COMMA"+Math.random()+"\0",Yp="\0PERIOD"+Math.random()+"\0";function gl(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function Gw(i){return i.split("\\\\").join(Hp).split("\\{").join(Gp).split("\\}").join(yl).split("\\,").join(Wp).split("\\.").join(Yp)}function Ww(i){return i.split(Hp).join("\\").split(Gp).join("{").split(yl).join("}").split(Wp).join(",").split(Yp).join(".")}function Kp(i){if(!i)return[""];var e=[],t=Vp("{","}",i);if(!t)return i.split(",");var r=t.pre,n=t.body,s=t.post,o=r.split(",");o[o.length-1]+="{"+n+"}";var a=Kp(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function Yw(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),Or(Gw(i),!0).map(Ww)):[]}function Kw(i){return"{"+i+"}"}function zw(i){return/^-?0\d/.test(i)}function Jw(i,e){return i<=e}function Zw(i,e){return i>=e}function Or(i,e){var t=[],r=Vp("{","}",i);if(!r||/\$$/.test(r.pre))return[i];var n=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),o=n||s,a=r.body.indexOf(",")>=0;if(!o&&!a)return r.post.match(/,(?!,).*\}/)?(i=r.pre+"{"+r.body+yl+r.post,Or(i)):[i];var l;if(o)l=r.body.split(/\.\./);else if(l=Kp(r.body),l.length===1&&(l=Or(l[0],!1).map(Kw),l.length===1)){var u=r.post.length?Or(r.post,!1):[""];return u.map(function(L){return r.pre+l[0]+L})}var c=r.pre,u=r.post.length?Or(r.post,!1):[""],f;if(o){var d=gl(l[0]),g=gl(l[1]),y=Math.max(l[0].length,l[1].length),m=l.length==3?Math.abs(gl(l[2])):1,b=Jw,w=g<d;w&&(m*=-1,b=Zw);var x=l.some(zw);f=[];for(var _=d;b(_,g);_+=m){var k;if(s)k=String.fromCharCode(_),k==="\\"&&(k="");else if(k=String(_),x){var S=y-k.length;if(S>0){var R=new Array(S+1).join("0");_<0?k="-"+R+k.slice(1):k=R+k}}f.push(k)}}else f=Hw(l,function(M){return Or(M,!1)});for(var T=0;T<f.length;T++)for(var N=0;N<u.length;N++){var C=c+f[T]+u[N];(!e||o||C)&&t.push(C)}return t}});var id=O((V2,td)=>{td.exports=Et;Et.Minimatch=Ue;var fn=(function(){try{return require("path")}catch{}})()||{sep:"/"};Et.sep=fn.sep;var zi=Et.GLOBSTAR=Ue.GLOBSTAR={},Qw=Jp(),Zp={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},vl="[^/]",bl=vl+"*?",Xw="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ex="(?:(?!(?:\\/|^)\\.).)*?",Qp=tx("().*{}+?[]^$\\!");function tx(i){return i.split("").reduce(function(e,t){return e[t]=!0,e},{})}var Xp=/\/+/;Et.filter=ix;function ix(i,e){return e=e||{},function(t,r,n){return Et(t,i,e)}}function bi(i,e){e=e||{};var t={};return Object.keys(i).forEach(function(r){t[r]=i[r]}),Object.keys(e).forEach(function(r){t[r]=e[r]}),t}Et.defaults=function(i){if(!i||typeof i!="object"||!Object.keys(i).length)return Et;var e=Et,t=function(n,s,o){return e(n,s,bi(i,o))};return t.Minimatch=function(n,s){return new e.Minimatch(n,bi(i,s))},t.Minimatch.defaults=function(n){return e.defaults(bi(i,n)).Minimatch},t.filter=function(n,s){return e.filter(n,bi(i,s))},t.defaults=function(n){return e.defaults(bi(i,n))},t.makeRe=function(n,s){return e.makeRe(n,bi(i,s))},t.braceExpand=function(n,s){return e.braceExpand(n,bi(i,s))},t.match=function(r,n,s){return e.match(r,n,bi(i,s))},t};Ue.defaults=function(i){return Et.defaults(i).Minimatch};function Et(i,e,t){return Fs(e),t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:new Ue(e,t).match(i)}function Ue(i,e){if(!(this instanceof Ue))return new Ue(i,e);Fs(i),e||(e={}),i=i.trim(),!e.allowWindowsEscape&&fn.sep!=="/"&&(i=i.split(fn.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=i,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}Ue.prototype.debug=function(){};Ue.prototype.make=rx;function rx(){var i=this.pattern,e=this.options;if(!e.nocomment&&i.charAt(0)==="#"){this.comment=!0;return}if(!i){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(r){return r.split(Xp)}),this.debug(this.pattern,t),t=t.map(function(r,n,s){return r.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(r){return r.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}Ue.prototype.parseNegate=nx;function nx(){var i=this.pattern,e=!1,t=this.options,r=0;if(!t.nonegate){for(var n=0,s=i.length;n<s&&i.charAt(n)==="!";n++)e=!e,r++;r&&(this.pattern=i.substr(r)),this.negate=e}}Et.braceExpand=function(i,e){return ed(i,e)};Ue.prototype.braceExpand=ed;function ed(i,e){return e||(this instanceof Ue?e=this.options:e={}),i=typeof i=="undefined"?this.pattern:i,Fs(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:Qw(i)}var sx=1024*64,Fs=function(i){if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>sx)throw new TypeError("pattern is too long")};Ue.prototype.parse=ox;var qs={};function ox(i,e){Fs(i);var t=this.options;if(i==="**")if(t.noglobstar)i="*";else return zi;if(i==="")return"";var r="",n=!!t.nocase,s=!1,o=[],a=[],l,c=!1,u=-1,f=-1,d=i.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this;function y(){if(l){switch(l){case"*":r+=bl,n=!0;break;case"?":r+=vl,n=!0;break;default:r+="\\"+l;break}g.debug("clearStateChar %j %j",l,r),l=!1}}for(var m=0,b=i.length,w;m<b&&(w=i.charAt(m));m++){if(this.debug("%s %s %s %j",i,m,r,w),s&&Qp[w]){r+="\\"+w,s=!1;continue}switch(w){case"/":return!1;case"\\":y(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",i,m,r,w),c){this.debug(" in class"),w==="!"&&m===f+1&&(w="^"),r+=w;continue}if(w==="*"&&l==="*")continue;g.debug("call clearStateChar %j",l),y(),l=w,t.noext&&y();continue;case"(":if(c){r+="(";continue}if(!l){r+="\\(";continue}o.push({type:l,start:m-1,reStart:r.length,open:Zp[l].open,close:Zp[l].close}),r+=l==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",l,r),l=!1;continue;case")":if(c||!o.length){r+="\\)";continue}y(),n=!0;var x=o.pop();r+=x.close,x.type==="!"&&a.push(x),x.reEnd=r.length;continue;case"|":if(c||!o.length||s){r+="\\|",s=!1;continue}y(),r+="|";continue;case"[":if(y(),c){r+="\\"+w;continue}c=!0,f=m,u=r.length,r+=w;continue;case"]":if(m===f+1||!c){r+="\\"+w,s=!1;continue}var _=i.substring(f+1,m);try{RegExp("["+_+"]")}catch{var k=this.parse(_,qs);r=r.substr(0,u)+"\\["+k[0]+"\\]",n=n||k[1],c=!1;continue}n=!0,c=!1,r+=w;continue;default:y(),s?s=!1:Qp[w]&&!(w==="^"&&c)&&(r+="\\"),r+=w}}for(c&&(_=i.substr(f+1),k=this.parse(_,qs),r=r.substr(0,u)+"\\["+k[0],n=n||k[1]),x=o.pop();x;x=o.pop()){var S=r.slice(x.reStart+x.open.length);this.debug("setting tail",r,x),S=S.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(Se,de,le){return le||(le="\\"),de+de+le+"|"}),this.debug(`tail=%j
18
+ %s`,S,S,x,r);var R=x.type==="*"?bl:x.type==="?"?vl:"\\"+x.type;n=!0,r=r.slice(0,x.reStart)+R+"\\("+S}y(),s&&(r+="\\\\");var T=!1;switch(r.charAt(0)){case"[":case".":case"(":T=!0}for(var N=a.length-1;N>-1;N--){var C=a[N],M=r.slice(0,C.reStart),L=r.slice(C.reStart,C.reEnd-8),G=r.slice(C.reEnd-8,C.reEnd),j=r.slice(C.reEnd);G+=j;var J=M.split("(").length-1,F=j;for(m=0;m<J;m++)F=F.replace(/\)[+*?]?/,"");j=F;var V="";j===""&&e!==qs&&(V="$");var Z=M+L+j+V+G;r=Z}if(r!==""&&n&&(r="(?=.)"+r),T&&(r=d+r),e===qs)return[r,n];if(!n)return lx(i);var ee=t.nocase?"i":"";try{var W=new RegExp("^"+r+"$",ee)}catch{return new RegExp("$.")}return W._glob=i,W._src=r,W}Et.makeRe=function(i,e){return new Ue(i,e||{}).makeRe()};Ue.prototype.makeRe=ax;function ax(){if(this.regexp||this.regexp===!1)return this.regexp;var i=this.set;if(!i.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?bl:e.dot?Xw:ex,r=e.nocase?"i":"",n=i.map(function(s){return s.map(function(o){return o===zi?t:typeof o=="string"?cx(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,r)}catch{this.regexp=!1}return this.regexp}Et.match=function(i,e,t){t=t||{};var r=new Ue(e,t);return i=i.filter(function(n){return r.match(n)}),r.options.nonull&&!i.length&&i.push(e),i};Ue.prototype.match=function(e,t){if(typeof t=="undefined"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var r=this.options;fn.sep!=="/"&&(e=e.split(fn.sep).join("/")),e=e.split(Xp),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],l=e;r.matchBase&&a.length===1&&(l=[s]);var c=this.matchOne(l,a,t);if(c)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate};Ue.prototype.matchOne=function(i,e,t){return e.indexOf(zi)!==-1?this._matchGlobstar(i,e,t,0,0):this._matchOne(i,e,t,0,0)};Ue.prototype._matchGlobstar=function(i,e,t,r,n){var s,o=-1;for(s=n;s<e.length;s++)if(e[s]===zi){o=s;break}var a=-1;for(s=e.length-1;s>=0;s--)if(e[s]===zi){a=s;break}var l=e.slice(n,o),c=e.slice(o+1,a),u=e.slice(a+1);if(l.length){var f=i.slice(r,r+l.length);if(!this._matchOne(f,l,t,0,0))return!1;r+=l.length}var d=0;if(u.length){if(u.length+r>i.length)return!1;var g=i.length-u.length;if(this._matchOne(i,u,t,g,0))d=u.length;else{if(i[i.length-1]!==""||r+u.length===i.length||(g--,!this._matchOne(i,u,t,g,0)))return!1;d=u.length+1}}if(!c.length){var y=!!d;for(s=r;s<i.length-d;s++){var m=String(i[s]);if(y=!0,m==="."||m===".."||!this.options.dot&&m.charAt(0)===".")return!1}return y}for(var b=[[[],0]],w=b[0],x=0,_=[0],k=0;k<c.length;k++){var S=c[k];S===zi?(_.push(x),w=[[],0],b.push(w)):(w[0].push(S),x++)}for(var R=b.length-1,T=i.length-d,N=0;N<b.length;N++)b[N][1]=T-(_[R--]+b[N][0].length);return!!this._matchGlobStarBodySections(i,b,r,0,t,0,!!d)};Ue.prototype._matchGlobStarBodySections=function(i,e,t,r,n,s,o){var a=e[r];if(!a){for(var l=t;l<i.length;l++){o=!0;var c=i[l];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1}return o}for(var u=a[0],f=a[1];t<=f;){var d=this._matchOne(i.slice(0,t+u.length),u,n,t,0);if(d&&s<this.maxGlobstarRecursion){var g=this._matchGlobStarBodySections(i,e,t+u.length,r+1,n,s+1,o);if(g!==!1)return g}var c=i[t];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1;t++}return null};Ue.prototype._matchOne=function(i,e,t,r,n){var s,o,a,l;for(s=r,o=n,a=i.length,l=e.length;s<a&&o<l;s++,o++){this.debug("matchOne loop");var c=e[o],u=i[s];if(this.debug(e,c,u),c===!1||c===zi)return!1;var f;if(typeof c=="string"?(f=u===c,this.debug("string match",c,u,f)):(f=u.match(c),this.debug("pattern match",c,u,f)),!f)return!1}if(s===a&&o===l)return!0;if(s===a)return t;if(o===l)return s===a-1&&i[s]==="";throw new Error("wtf?")};function lx(i){return i.replace(/\\(.)/g,"$1")}function cx(i){return i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var wl=O((H2,nd)=>{"use strict";var rd=require("fs"),_l;function ux(){try{return rd.statSync("/.dockerenv"),!0}catch{return!1}}function fx(){try{return rd.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}nd.exports=()=>(_l===void 0&&(_l=ux()||fx()),_l)});var ad=O((G2,xl)=>{"use strict";var hx=require("os"),px=require("fs"),sd=wl(),od=()=>{if(process.platform!=="linux")return!1;if(hx.release().toLowerCase().includes("microsoft"))return!sd();try{return px.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!sd():!1}catch{return!1}};process.env.__IS_WSL_TEST__?xl.exports=od:xl.exports=od()});var cd=O((W2,ld)=>{"use strict";ld.exports=(i,e,t)=>{let r=n=>Object.defineProperty(i,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){let n=t();return r(n),n},set(n){r(n)}}),i}});var gd=O((Y2,md)=>{var dx=require("path"),mx=require("child_process"),{promises:Sl,constants:dd}=require("fs"),js=ad(),gx=wl(),El=cd(),ud=dx.join(__dirname,"xdg-open"),{platform:kr,arch:fd}=process,yx=(()=>{let i="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",r=!1;try{await Sl.access(t,dd.F_OK),r=!0}catch{}if(!r)return i;let n=await Sl.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):i}})(),hd=async(i,e)=>{let t;for(let r of i)try{return await e(r)}catch(n){t=n}throw t},Us=async i=>{if(i={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...i},Array.isArray(i.app))return hd(i.app,a=>Us({...i,app:a}));let{name:e,arguments:t=[]}=i.app||{};if(t=[...t],Array.isArray(e))return hd(e,a=>Us({...i,app:{name:a,arguments:t}}));let r,n=[],s={};if(kr==="darwin")r="open",i.wait&&n.push("--wait-apps"),i.background&&n.push("--background"),i.newInstance&&n.push("--new"),e&&n.push("-a",e);else if(kr==="win32"||js&&!gx()){let a=await yx();r=js?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),js||(s.windowsVerbatimArguments=!0);let l=["Start"];i.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`,"-ArgumentList"),i.target&&t.unshift(i.target)):i.target&&l.push(`"${i.target}"`),t.length>0&&(t=t.map(c=>`"\`"${c}\`""`),l.push(t.join(","))),i.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)r=e;else{let a=!__dirname||__dirname==="/",l=!1;try{await Sl.access(ud,dd.X_OK),l=!0}catch{}r=process.versions.electron||kr==="android"||a||!l?"xdg-open":ud}t.length>0&&n.push(...t),i.wait||(s.stdio="ignore",s.detached=!0)}i.target&&n.push(i.target),kr==="darwin"&&t.length>0&&n.push("--args",...t);let o=mx.spawn(r,n,s);return i.wait?new Promise((a,l)=>{o.once("error",l),o.once("close",c=>{if(i.allowNonzeroExitCode&&c>0){l(new Error(`Exited with code ${c}`));return}a(o)})}):(o.unref(),o)},Ol=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `target`");return Us({...e,target:i})},vx=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return Us({...e,app:{name:i,arguments:t}})};function pd(i){if(typeof i=="string"||Array.isArray(i))return i;let{[fd]:e}=i;if(!e)throw new Error(`${fd} is not supported`);return e}function kl({[kr]:i},{wsl:e}){if(e&&js)return pd(e);if(!i)throw new Error(`${kr} is not supported`);return pd(i)}var $s={};El($s,"chrome",()=>kl({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));El($s,"firefox",()=>kl({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));El($s,"edge",()=>kl({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Ol.apps=$s;Ol.openApp=vx;md.exports=Ol});var Cl=O((K2,vd)=>{"use strict";var bx=require("util"),yd=require("stream"),$t=vd.exports=function(){yd.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};bx.inherits($t,yd);$t.prototype.read=function(i,e){this._reads.push({length:Math.abs(i),allowLess:i<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))};$t.prototype.write=function(i,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let t;return Buffer.isBuffer(i)?t=i:t=Buffer.from(i,e||this._encoding),this._buffers.push(t),this._buffered+=t.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused};$t.prototype.end=function(i,e){i&&this.write(i,e),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))};$t.prototype.destroySoon=$t.prototype.end;$t.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()};$t.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))};$t.prototype._processReadAllowingLess=function(i){this._reads.shift();let e=this._buffers[0];e.length>i.length?(this._buffered-=i.length,this._buffers[0]=e.slice(i.length),i.func.call(this,e.slice(0,i.length))):(this._buffered-=e.length,this._buffers.shift(),i.func.call(this,e))};$t.prototype._processRead=function(i){this._reads.shift();let e=0,t=0,r=Buffer.alloc(i.length);for(;e<i.length;){let n=this._buffers[t++],s=Math.min(n.length,i.length-e);n.copy(r,e,0,s),e+=s,s!==n.length&&(this._buffers[--t]=n.slice(s))}t>0&&this._buffers.splice(0,t),this._buffered-=i.length,i.func.call(this,r)};$t.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let i=this._reads[0];if(i.allowLess)this._processReadAllowingLess(i);else if(this._buffered>=i.length)this._processRead(i);else break}this._buffers&&!this.writable&&this._end()}catch(i){this.emit("error",i)}}});var Al=O(Tl=>{"use strict";var _i=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];Tl.getImagePasses=function(i,e){let t=[],r=i%8,n=e%8,s=(i-r)/8,o=(e-n)/8;for(let a=0;a<_i.length;a++){let l=_i[a],c=s*l.x.length,u=o*l.y.length;for(let f=0;f<l.x.length&&l.x[f]<r;f++)c++;for(let f=0;f<l.y.length&&l.y[f]<n;f++)u++;c>0&&u>0&&t.push({width:c,height:u,index:a})}return t};Tl.getInterlaceIterator=function(i){return function(e,t,r){let n=e%_i[r].x.length,s=(e-n)/_i[r].x.length*8+_i[r].x[n],o=t%_i[r].y.length,a=(t-o)/_i[r].y.length*8+_i[r].y[o];return s*4+a*i*4}}});var Il=O((J2,bd)=>{"use strict";bd.exports=function(e,t,r){let n=e+t-r,s=Math.abs(n-e),o=Math.abs(n-t),a=Math.abs(n-r);return s<=o&&s<=a?e:o<=a?t:r}});var Nl=O((Z2,wd)=>{"use strict";var _x=Al(),wx=Il();function _d(i,e,t){let r=i*e;return t!==8&&(r=Math.ceil(r/(8/t))),r}var Cr=wd.exports=function(i,e){let t=i.width,r=i.height,n=i.interlace,s=i.bpp,o=i.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],n){let a=_x.getImagePasses(t,r);for(let l=0;l<a.length;l++)this._images.push({byteWidth:_d(a[l].width,s,o),height:a[l].height,lineIndex:0})}else this._images.push({byteWidth:_d(t,s,o),height:r,lineIndex:0});o===8?this._xComparison=s:o===16?this._xComparison=s*2:this._xComparison=1};Cr.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};Cr.prototype._unFilterType1=function(i,e,t){let r=this._xComparison,n=r-1;for(let s=0;s<t;s++){let o=i[1+s],a=s>n?e[s-r]:0;e[s]=o+a}};Cr.prototype._unFilterType2=function(i,e,t){let r=this._lastLine;for(let n=0;n<t;n++){let s=i[1+n],o=r?r[n]:0;e[n]=s+o}};Cr.prototype._unFilterType3=function(i,e,t){let r=this._xComparison,n=r-1,s=this._lastLine;for(let o=0;o<t;o++){let a=i[1+o],l=s?s[o]:0,c=o>n?e[o-r]:0,u=Math.floor((c+l)/2);e[o]=a+u}};Cr.prototype._unFilterType4=function(i,e,t){let r=this._xComparison,n=r-1,s=this._lastLine;for(let o=0;o<t;o++){let a=i[1+o],l=s?s[o]:0,c=o>n?e[o-r]:0,u=o>n&&s?s[o-r]:0,f=wx(c,l,u);e[o]=a+f}};Cr.prototype._reverseFilterLine=function(i){let e=i[0],t,r=this._images[this._imageIndex],n=r.byteWidth;if(e===0)t=i.slice(1,n+1);else switch(t=Buffer.alloc(n),e){case 1:this._unFilterType1(i,t,n);break;case 2:this._unFilterType2(i,t,n);break;case 3:this._unFilterType3(i,t,n);break;case 4:this._unFilterType4(i,t,n);break;default:throw new Error("Unrecognised filter type - "+e)}this.write(t),r.lineIndex++,r.lineIndex>=r.height?(this._lastLine=null,this._imageIndex++,r=this._images[this._imageIndex]):this._lastLine=t,r?this.read(r.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}});var Ed=O((Q2,Sd)=>{"use strict";var xx=require("util"),xd=Cl(),Sx=Nl(),Ex=Sd.exports=function(i){xd.call(this);let e=[],t=this;this._filter=new Sx(i,{read:this.read.bind(this),write:function(r){e.push(r)},complete:function(){t.emit("complete",Buffer.concat(e))}}),this._filter.start()};xx.inherits(Ex,xd)});var Tr=O((X2,Od)=>{"use strict";Od.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var Pl=O((eN,kd)=>{"use strict";var Bl=[];(function(){for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;Bl[i]=e}})();var Ll=kd.exports=function(){this._crc=-1};Ll.prototype.write=function(i){for(let e=0;e<i.length;e++)this._crc=Bl[(this._crc^i[e])&255]^this._crc>>>8;return!0};Ll.prototype.crc32=function(){return this._crc^-1};Ll.crc32=function(i){let e=-1;for(let t=0;t<i.length;t++)e=Bl[(e^i[t])&255]^e>>>8;return e^-1}});var Rl=O((tN,Cd)=>{"use strict";var We=Tr(),Ox=Pl(),Ze=Cd.exports=function(i,e){this._options=i,i.checkCRC=i.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[We.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[We.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[We.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[We.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[We.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[We.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};Ze.prototype.start=function(){this.read(We.PNG_SIGNATURE.length,this._parseSignature.bind(this))};Ze.prototype._parseSignature=function(i){let e=We.PNG_SIGNATURE;for(let t=0;t<e.length;t++)if(i[t]!==e[t]){this.error(new Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};Ze.prototype._parseChunkBegin=function(i){let e=i.readUInt32BE(0),t=i.readUInt32BE(4),r="";for(let s=4;s<8;s++)r+=String.fromCharCode(i[s]);let n=!!(i[4]&32);if(!this._hasIHDR&&t!==We.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}if(this._crc=new Ox,this._crc.write(Buffer.from(r)),this._chunks[t])return this._chunks[t](e);if(!n){this.error(new Error("Unsupported critical chunk type "+r));return}this.read(e+4,this._skipChunk.bind(this))};Ze.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};Ze.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};Ze.prototype._parseChunkEnd=function(i){let e=i.readInt32BE(0),t=this._crc.crc32();if(this._options.checkCRC&&t!==e){this.error(new Error("Crc error - "+e+" - "+t));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))};Ze.prototype._handleIHDR=function(i){this.read(i,this._parseIHDR.bind(this))};Ze.prototype._parseIHDR=function(i){this._crc.write(i);let e=i.readUInt32BE(0),t=i.readUInt32BE(4),r=i[8],n=i[9],s=i[10],o=i[11],a=i[12];if(r!==8&&r!==4&&r!==2&&r!==1&&r!==16){this.error(new Error("Unsupported bit depth "+r));return}if(!(n in We.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(s!==0){this.error(new Error("Unsupported compression method"));return}if(o!==0){this.error(new Error("Unsupported filter method"));return}if(a!==0&&a!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=n;let l=We.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:t,depth:r,interlace:!!a,palette:!!(n&We.COLORTYPE_PALETTE),color:!!(n&We.COLORTYPE_COLOR),alpha:!!(n&We.COLORTYPE_ALPHA),bpp:l,colorType:n}),this._handleChunkEnd()};Ze.prototype._handlePLTE=function(i){this.read(i,this._parsePLTE.bind(this))};Ze.prototype._parsePLTE=function(i){this._crc.write(i);let e=Math.floor(i.length/3);for(let t=0;t<e;t++)this._palette.push([i[t*3],i[t*3+1],i[t*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};Ze.prototype._handleTRNS=function(i){this.simpleTransparency(),this.read(i,this._parseTRNS.bind(this))};Ze.prototype._parseTRNS=function(i){if(this._crc.write(i),this._colorType===We.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(i.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<i.length;e++)this._palette[e][3]=i[e];this.palette(this._palette)}this._colorType===We.COLORTYPE_GRAYSCALE&&this.transColor([i.readUInt16BE(0)]),this._colorType===We.COLORTYPE_COLOR&&this.transColor([i.readUInt16BE(0),i.readUInt16BE(2),i.readUInt16BE(4)]),this._handleChunkEnd()};Ze.prototype._handleGAMA=function(i){this.read(i,this._parseGAMA.bind(this))};Ze.prototype._parseGAMA=function(i){this._crc.write(i),this.gamma(i.readUInt32BE(0)/We.GAMMA_DIVISION),this._handleChunkEnd()};Ze.prototype._handleIDAT=function(i){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-i,this._parseIDAT.bind(this,i))};Ze.prototype._parseIDAT=function(i,e){if(this._crc.write(e),this._colorType===We.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw new Error("Expected palette not found");this.inflateData(e);let t=i-e.length;t>0?this._handleIDAT(t):this._handleChunkEnd()};Ze.prototype._handleIEND=function(i){this.read(i,this._parseIEND.bind(this))};Ze.prototype._parseIEND=function(i){this._crc.write(i),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}});var Ml=O(Ad=>{"use strict";var Td=Al(),kx=[function(){},function(i,e,t,r){if(r===e.length)throw new Error("Ran out of data");let n=e[r];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=255},function(i,e,t,r){if(r+1>=e.length)throw new Error("Ran out of data");let n=e[r];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=e[r+1]},function(i,e,t,r){if(r+2>=e.length)throw new Error("Ran out of data");i[t]=e[r],i[t+1]=e[r+1],i[t+2]=e[r+2],i[t+3]=255},function(i,e,t,r){if(r+3>=e.length)throw new Error("Ran out of data");i[t]=e[r],i[t+1]=e[r+1],i[t+2]=e[r+2],i[t+3]=e[r+3]}],Cx=[function(){},function(i,e,t,r){let n=e[0];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=r},function(i,e,t){let r=e[0];i[t]=r,i[t+1]=r,i[t+2]=r,i[t+3]=e[1]},function(i,e,t,r){i[t]=e[0],i[t+1]=e[1],i[t+2]=e[2],i[t+3]=r},function(i,e,t){i[t]=e[0],i[t+1]=e[1],i[t+2]=e[2],i[t+3]=e[3]}];function Tx(i,e){let t=[],r=0;function n(){if(r===i.length)throw new Error("Ran out of data");let s=i[r];r++;let o,a,l,c,u,f,d,g;switch(e){default:throw new Error("unrecognised depth");case 16:d=i[r],r++,t.push((s<<8)+d);break;case 4:d=s&15,g=s>>4,t.push(g,d);break;case 2:u=s&3,f=s>>2&3,d=s>>4&3,g=s>>6&3,t.push(g,d,f,u);break;case 1:o=s&1,a=s>>1&1,l=s>>2&1,c=s>>3&1,u=s>>4&1,f=s>>5&1,d=s>>6&1,g=s>>7&1,t.push(g,d,f,u,c,l,a,o);break}}return{get:function(s){for(;t.length<s;)n();let o=t.slice(0,s);return t=t.slice(s),o},resetAfterLine:function(){t.length=0},end:function(){if(r!==i.length)throw new Error("extra data found")}}}function Ax(i,e,t,r,n,s){let o=i.width,a=i.height,l=i.index;for(let c=0;c<a;c++)for(let u=0;u<o;u++){let f=t(u,c,l);kx[r](e,n,f,s),s+=r}return s}function Ix(i,e,t,r,n,s){let o=i.width,a=i.height,l=i.index;for(let c=0;c<a;c++){for(let u=0;u<o;u++){let f=n.get(r),d=t(u,c,l);Cx[r](e,f,d,s)}n.resetAfterLine()}}Ad.dataToBitMap=function(i,e){let t=e.width,r=e.height,n=e.depth,s=e.bpp,o=e.interlace,a;n!==8&&(a=Tx(i,n));let l;n<=8?l=Buffer.alloc(t*r*4):l=new Uint16Array(t*r*4);let c=Math.pow(2,n)-1,u=0,f,d;if(o)f=Td.getImagePasses(t,r),d=Td.getInterlaceIterator(t,r);else{let g=0;d=function(){let y=g;return g+=4,y},f=[{width:t,height:r}]}for(let g=0;g<f.length;g++)n===8?u=Ax(f[g],l,d,s,i,u):Ix(f[g],l,d,s,a,c);if(n===8){if(u!==i.length)throw new Error("extra data found")}else a.end();return l}});var Dl=O((rN,Id)=>{"use strict";function Nx(i,e,t,r,n){let s=0;for(let o=0;o<r;o++)for(let a=0;a<t;a++){let l=n[i[s]];if(!l)throw new Error("index "+i[s]+" not in palette");for(let c=0;c<4;c++)e[s+c]=l[c];s+=4}}function Bx(i,e,t,r,n){let s=0;for(let o=0;o<r;o++)for(let a=0;a<t;a++){let l=!1;if(n.length===1?n[0]===i[s]&&(l=!0):n[0]===i[s]&&n[1]===i[s+1]&&n[2]===i[s+2]&&(l=!0),l)for(let c=0;c<4;c++)e[s+c]=0;s+=4}}function Lx(i,e,t,r,n){let s=255,o=Math.pow(2,n)-1,a=0;for(let l=0;l<r;l++)for(let c=0;c<t;c++){for(let u=0;u<4;u++)e[a+u]=Math.floor(i[a+u]*s/o+.5);a+=4}}Id.exports=function(i,e,t=!1){let r=e.depth,n=e.width,s=e.height,o=e.colorType,a=e.transColor,l=e.palette,c=i;return o===3?Nx(i,c,n,s,l):(a&&Bx(i,c,n,s,a),r!==8&&!t&&(r===16&&(c=Buffer.alloc(n*s*4)),Lx(i,c,n,s,r))),c}});var Ld=O((nN,Bd)=>{"use strict";var Px=require("util"),ql=require("zlib"),Nd=Cl(),Rx=Ed(),Mx=Rl(),Dx=Ml(),qx=Dl(),zt=Bd.exports=function(i){Nd.call(this),this._parser=new Mx(i,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=i,this.writable=!0,this._parser.start()};Px.inherits(zt,Nd);zt.prototype._handleError=function(i){this.emit("error",i),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0};zt.prototype._inflateData=function(i){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=ql.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let t=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,r=Math.max(t,ql.Z_MIN_CHUNK);this._inflate=ql.createInflate({chunkSize:r});let n=t,s=this.emit.bind(this,"error");this._inflate.on("error",function(a){n&&s(a)}),this._filter.on("complete",this._complete.bind(this));let o=this._filter.write.bind(this._filter);this._inflate.on("data",function(a){n&&(a.length>n&&(a=a.slice(0,n)),n-=a.length,o(a))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(i)};zt.prototype._handleMetaData=function(i){this._metaData=i,this._bitmapInfo=Object.create(i),this._filter=new Rx(this._bitmapInfo)};zt.prototype._handleTransColor=function(i){this._bitmapInfo.transColor=i};zt.prototype._handlePalette=function(i){this._bitmapInfo.palette=i};zt.prototype._simpleTransparency=function(){this._metaData.alpha=!0};zt.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};zt.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))};zt.prototype._complete=function(i){if(this.errord)return;let e;try{let t=Dx.dataToBitMap(i,this._bitmapInfo);e=qx(t,this._bitmapInfo,this._options.skipRescale),t=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}});var Rd=O((sN,Pd)=>{"use strict";var Nt=Tr();Pd.exports=function(i,e,t,r){let n=[Nt.COLORTYPE_COLOR_ALPHA,Nt.COLORTYPE_ALPHA].indexOf(r.colorType)!==-1;if(r.colorType===r.inputColorType){let y=(function(){let m=new ArrayBuffer(2);return new DataView(m).setInt16(0,256,!0),new Int16Array(m)[0]!==256})();if(r.bitDepth===8||r.bitDepth===16&&y)return i}let s=r.bitDepth!==16?i:new Uint16Array(i.buffer),o=255,a=Nt.COLORTYPE_TO_BPP_MAP[r.inputColorType];a===4&&!r.inputHasAlpha&&(a=3);let l=Nt.COLORTYPE_TO_BPP_MAP[r.colorType];r.bitDepth===16&&(o=65535,l*=2);let c=Buffer.alloc(e*t*l),u=0,f=0,d=r.bgColor||{};d.red===void 0&&(d.red=o),d.green===void 0&&(d.green=o),d.blue===void 0&&(d.blue=o);function g(){let y,m,b,w=o;switch(r.inputColorType){case Nt.COLORTYPE_COLOR_ALPHA:w=s[u+3],y=s[u],m=s[u+1],b=s[u+2];break;case Nt.COLORTYPE_COLOR:y=s[u],m=s[u+1],b=s[u+2];break;case Nt.COLORTYPE_ALPHA:w=s[u+1],y=s[u],m=y,b=y;break;case Nt.COLORTYPE_GRAYSCALE:y=s[u],m=y,b=y;break;default:throw new Error("input color type:"+r.inputColorType+" is not supported at present")}return r.inputHasAlpha&&(n||(w/=o,y=Math.min(Math.max(Math.round((1-w)*d.red+w*y),0),o),m=Math.min(Math.max(Math.round((1-w)*d.green+w*m),0),o),b=Math.min(Math.max(Math.round((1-w)*d.blue+w*b),0),o))),{red:y,green:m,blue:b,alpha:w}}for(let y=0;y<t;y++)for(let m=0;m<e;m++){let b=g(s,u);switch(r.colorType){case Nt.COLORTYPE_COLOR_ALPHA:case Nt.COLORTYPE_COLOR:r.bitDepth===8?(c[f]=b.red,c[f+1]=b.green,c[f+2]=b.blue,n&&(c[f+3]=b.alpha)):(c.writeUInt16BE(b.red,f),c.writeUInt16BE(b.green,f+2),c.writeUInt16BE(b.blue,f+4),n&&c.writeUInt16BE(b.alpha,f+6));break;case Nt.COLORTYPE_ALPHA:case Nt.COLORTYPE_GRAYSCALE:{let w=(b.red+b.green+b.blue)/3;r.bitDepth===8?(c[f]=w,n&&(c[f+1]=b.alpha)):(c.writeUInt16BE(w,f),n&&c.writeUInt16BE(b.alpha,f+2));break}default:throw new Error("unrecognised color Type "+r.colorType)}u+=a,f+=l}return c}});var qd=O((oN,Dd)=>{"use strict";var Md=Il();function Fx(i,e,t,r,n){for(let s=0;s<t;s++)r[n+s]=i[e+s]}function jx(i,e,t){let r=0,n=e+t;for(let s=e;s<n;s++)r+=Math.abs(i[s]);return r}function Ux(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=i[e+o]-a;r[n+o]=l}}function $x(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=i[e+s]-o;n+=Math.abs(a)}return n}function Vx(i,e,t,r,n){for(let s=0;s<t;s++){let o=e>0?i[e+s-t]:0,a=i[e+s]-o;r[n+s]=a}}function Hx(i,e,t){let r=0,n=e+t;for(let s=e;s<n;s++){let o=e>0?i[s-t]:0,a=i[s]-o;r+=Math.abs(a)}return r}function Gx(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=e>0?i[e+o-t]:0,c=i[e+o]-(a+l>>1);r[n+o]=c}}function Wx(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=e>0?i[e+s-t]:0,l=i[e+s]-(o+a>>1);n+=Math.abs(l)}return n}function Yx(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=e>0?i[e+o-t]:0,c=e>0&&o>=s?i[e+o-(t+s)]:0,u=i[e+o]-Md(a,l,c);r[n+o]=u}}function Kx(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=e>0?i[e+s-t]:0,l=e>0&&s>=r?i[e+s-(t+r)]:0,c=i[e+s]-Md(o,a,l);n+=Math.abs(c)}return n}var zx={0:Fx,1:Ux,2:Vx,3:Gx,4:Yx},Jx={0:jx,1:$x,2:Hx,3:Wx,4:Kx};Dd.exports=function(i,e,t,r,n){let s;if(!("filterType"in r)||r.filterType===-1)s=[0,1,2,3,4];else if(typeof r.filterType=="number")s=[r.filterType];else throw new Error("unrecognised filter types");r.bitDepth===16&&(n*=2);let o=e*n,a=0,l=0,c=Buffer.alloc((o+1)*t),u=s[0];for(let f=0;f<t;f++){if(s.length>1){let d=1/0;for(let g=0;g<s.length;g++){let y=Jx[s[g]](i,l,o,n);y<d&&(u=s[g],d=y)}}c[a]=u,a++,zx[u](i,l,o,c,a,n),a+=o,l+=o}return c}});var Fl=O((aN,Fd)=>{"use strict";var nt=Tr(),Zx=Pl(),Qx=Rd(),Xx=qd(),e1=require("zlib"),wi=Fd.exports=function(i){if(this._options=i,i.deflateChunkSize=i.deflateChunkSize||32*1024,i.deflateLevel=i.deflateLevel!=null?i.deflateLevel:9,i.deflateStrategy=i.deflateStrategy!=null?i.deflateStrategy:3,i.inputHasAlpha=i.inputHasAlpha!=null?i.inputHasAlpha:!0,i.deflateFactory=i.deflateFactory||e1.createDeflate,i.bitDepth=i.bitDepth||8,i.colorType=typeof i.colorType=="number"?i.colorType:nt.COLORTYPE_COLOR_ALPHA,i.inputColorType=typeof i.inputColorType=="number"?i.inputColorType:nt.COLORTYPE_COLOR_ALPHA,[nt.COLORTYPE_GRAYSCALE,nt.COLORTYPE_COLOR,nt.COLORTYPE_COLOR_ALPHA,nt.COLORTYPE_ALPHA].indexOf(i.colorType)===-1)throw new Error("option color type:"+i.colorType+" is not supported at present");if([nt.COLORTYPE_GRAYSCALE,nt.COLORTYPE_COLOR,nt.COLORTYPE_COLOR_ALPHA,nt.COLORTYPE_ALPHA].indexOf(i.inputColorType)===-1)throw new Error("option input color type:"+i.inputColorType+" is not supported at present");if(i.bitDepth!==8&&i.bitDepth!==16)throw new Error("option bit depth:"+i.bitDepth+" is not supported at present")};wi.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};wi.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};wi.prototype.filterData=function(i,e,t){let r=Qx(i,e,t,this._options),n=nt.COLORTYPE_TO_BPP_MAP[this._options.colorType];return Xx(r,e,t,this._options,n)};wi.prototype._packChunk=function(i,e){let t=e?e.length:0,r=Buffer.alloc(t+12);return r.writeUInt32BE(t,0),r.writeUInt32BE(i,4),e&&e.copy(r,8),r.writeInt32BE(Zx.crc32(r.slice(4,r.length-4)),r.length-4),r};wi.prototype.packGAMA=function(i){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(i*nt.GAMMA_DIVISION),0),this._packChunk(nt.TYPE_gAMA,e)};wi.prototype.packIHDR=function(i,e){let t=Buffer.alloc(13);return t.writeUInt32BE(i,0),t.writeUInt32BE(e,4),t[8]=this._options.bitDepth,t[9]=this._options.colorType,t[10]=0,t[11]=0,t[12]=0,this._packChunk(nt.TYPE_IHDR,t)};wi.prototype.packIDAT=function(i){return this._packChunk(nt.TYPE_IDAT,i)};wi.prototype.packIEND=function(){return this._packChunk(nt.TYPE_IEND,null)}});var Vd=O((lN,$d)=>{"use strict";var t1=require("util"),jd=require("stream"),i1=Tr(),r1=Fl(),Ud=$d.exports=function(i){jd.call(this);let e=i||{};this._packer=new r1(e),this._deflate=this._packer.createDeflate(),this.readable=!0};t1.inherits(Ud,jd);Ud.prototype.pack=function(i,e,t,r){this.emit("data",Buffer.from(i1.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,t)),r&&this.emit("data",this._packer.packGAMA(r));let n=this._packer.filterData(i,e,t);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(s){this.emit("data",this._packer.packIDAT(s))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(n)}});var zd=O((hn,Kd)=>{"use strict";var Hd=require("assert").ok,Ar=require("zlib"),n1=require("util"),Gd=require("buffer").kMaxLength;function Ji(i){if(!(this instanceof Ji))return new Ji(i);i&&i.chunkSize<Ar.Z_MIN_CHUNK&&(i.chunkSize=Ar.Z_MIN_CHUNK),Ar.Inflate.call(this,i),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,i&&i.maxLength!=null&&(this._maxLength=i.maxLength)}function s1(i){return new Ji(i)}function Wd(i,e){e&&process.nextTick(e),i._handle&&(i._handle.close(),i._handle=null)}Ji.prototype._processChunk=function(i,e,t){if(typeof t=="function")return Ar.Inflate._processChunk.call(this,i,e,t);let r=this,n=i&&i.length,s=this._chunkSize-this._offset,o=this._maxLength,a=0,l=[],c=0,u;this.on("error",function(y){u=y});function f(y,m){if(r._hadError)return;let b=s-m;if(Hd(b>=0,"have should not go down"),b>0){let w=r._buffer.slice(r._offset,r._offset+b);if(r._offset+=b,w.length>o&&(w=w.slice(0,o)),l.push(w),c+=w.length,o-=w.length,o===0)return!1}return(m===0||r._offset>=r._chunkSize)&&(s=r._chunkSize,r._offset=0,r._buffer=Buffer.allocUnsafe(r._chunkSize)),m===0?(a+=n-y,n=y,!0):!1}Hd(this._handle,"zlib binding closed");let d;do d=this._handle.writeSync(e,i,a,n,this._buffer,this._offset,s),d=d||this._writeState;while(!this._hadError&&f(d[0],d[1]));if(this._hadError)throw u;if(c>=Gd)throw Wd(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+Gd.toString(16)+" bytes");let g=Buffer.concat(l,c);return Wd(this),g};n1.inherits(Ji,Ar.Inflate);function o1(i,e){if(typeof e=="string"&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let t=i._finishFlushFlag;return t==null&&(t=Ar.Z_FINISH),i._processChunk(e,t)}function Yd(i,e){return o1(new Ji(e),i)}Kd.exports=hn=Yd;hn.Inflate=Ji;hn.createInflate=s1;hn.inflateSync=Yd});var jl=O((cN,Zd)=>{"use strict";var Jd=Zd.exports=function(i){this._buffer=i,this._reads=[]};Jd.prototype.read=function(i,e){this._reads.push({length:Math.abs(i),allowLess:i<0,func:e})};Jd.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let i=this._reads[0];if(this._buffer.length&&(this._buffer.length>=i.length||i.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(i.length),i.func.call(this,e.slice(0,i.length))}else break}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}});var Xd=O(Qd=>{"use strict";var a1=jl(),l1=Nl();Qd.process=function(i,e){let t=[],r=new a1(i);return new l1(e,{read:r.read.bind(r),write:function(s){t.push(s)},complete:function(){}}).start(),r.process(),Buffer.concat(t)}});var rm=O((fN,im)=>{"use strict";var em=!0,tm=require("zlib"),c1=zd();tm.deflateSync||(em=!1);var u1=jl(),f1=Xd(),h1=Rl(),p1=Ml(),d1=Dl();im.exports=function(i,e){if(!em)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t;function r(k){t=k}let n;function s(k){n=k}function o(k){n.transColor=k}function a(k){n.palette=k}function l(){n.alpha=!0}let c;function u(k){c=k}let f=[];function d(k){f.push(k)}let g=new u1(i);if(new h1(e,{read:g.read.bind(g),error:r,metadata:s,gamma:u,palette:a,transColor:o,inflateData:d,simpleTransparency:l}).start(),g.process(),t)throw t;let m=Buffer.concat(f);f.length=0;let b;if(n.interlace)b=tm.inflateSync(m);else{let S=((n.width*n.bpp*n.depth+7>>3)+1)*n.height;b=c1(m,{chunkSize:S,maxLength:S})}if(m=null,!b||!b.length)throw new Error("bad png - invalid inflate data response");let w=f1.process(b,n);m=null;let x=p1.dataToBitMap(w,n);w=null;let _=d1(x,n,e.skipRescale);return n.data=_,n.gamma=c||0,n}});var am=O((hN,om)=>{"use strict";var nm=!0,sm=require("zlib");sm.deflateSync||(nm=!1);var m1=Tr(),g1=Fl();om.exports=function(i,e){if(!nm)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t=e||{},r=new g1(t),n=[];n.push(Buffer.from(m1.PNG_SIGNATURE)),n.push(r.packIHDR(i.width,i.height)),i.gamma&&n.push(r.packGAMA(i.gamma));let s=r.filterData(i.data,i.width,i.height),o=sm.deflateSync(s,r.getDeflateOptions());if(s=null,!o||!o.length)throw new Error("bad png - invalid compressed data response");return n.push(r.packIDAT(o)),n.push(r.packIEND()),Buffer.concat(n)}});var lm=O(Ul=>{"use strict";var y1=rm(),v1=am();Ul.read=function(i,e){return y1(i,e||{})};Ul.write=function(i,e){return v1(i,e)}});var fm=O(um=>{"use strict";var b1=require("util"),cm=require("stream"),_1=Ld(),w1=Vd(),x1=lm(),ct=um.PNG=function(i){cm.call(this),i=i||{},this.width=i.width|0,this.height=i.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,i.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new _1(i),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new w1(i),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};b1.inherits(ct,cm);ct.sync=x1;ct.prototype.pack=function(){return!this.data||!this.data.length?(this.emit("error","No data provided"),this):(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this)};ct.prototype.parse=function(i,e){if(e){let t,r;t=function(n){this.removeListener("error",r),this.data=n,e(null,this)}.bind(this),r=function(n){this.removeListener("parsed",t),e(n,null)}.bind(this),this.once("parsed",t),this.once("error",r)}return this.end(i),this};ct.prototype.write=function(i){return this._parser.write(i),!0};ct.prototype.end=function(i){this._parser.end(i)};ct.prototype._metadata=function(i){this.width=i.width,this.height=i.height,this.emit("metadata",i)};ct.prototype._gamma=function(i){this.gamma=i};ct.prototype._handleClose=function(){!this._parser.writable&&!this._packer.readable&&this.emit("close")};ct.bitblt=function(i,e,t,r,n,s,o,a){if(t|=0,r|=0,n|=0,s|=0,o|=0,a|=0,t>i.width||r>i.height||t+n>i.width||r+s>i.height)throw new Error("bitblt reading outside image");if(o>e.width||a>e.height||o+n>e.width||a+s>e.height)throw new Error("bitblt writing outside image");for(let l=0;l<s;l++)i.data.copy(e.data,(a+l)*e.width+o<<2,(r+l)*i.width+t<<2,(r+l)*i.width+t+n<<2)};ct.prototype.bitblt=function(i,e,t,r,n,s,o){return ct.bitblt(this,i,e,t,r,n,s,o),this};ct.adjustGamma=function(i){if(i.gamma){for(let e=0;e<i.height;e++)for(let t=0;t<i.width;t++){let r=i.width*e+t<<2;for(let n=0;n<3;n++){let s=i.data[r+n]/255;s=Math.pow(s,1/2.2/i.gamma),i.data[r+n]=Math.round(s*255)}}i.gamma=0}};ct.prototype.adjustGamma=function(){ct.adjustGamma(this)}});var pn=O(Vl=>{var Vs=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},$l=class extends Vs{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Vl.CommanderError=Vs;Vl.InvalidArgumentError=$l});var Hs=O(Gl=>{var{InvalidArgumentError:S1}=pn(),Hl=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new S1(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function E1(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}Gl.Argument=Hl;Gl.humanReadableArgName=E1});var Kl=O(Yl=>{var{humanReadableArgName:O1}=Hs(),Wl=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){var t,r;this.helpWidth=(r=(t=this.helpWidth)!=null?t:e.helpWidth)!=null?r:80}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((n,s)=>n.name().localeCompare(s.name())),t}compareOptions(e,t){let r=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(n=>!n.hidden),r=e._getHelpOption();if(r&&!r.hidden){let n=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!n&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!n&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let n=r.options.filter(s=>!s.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>O1(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let n=e.parent;n;n=n.parent)r=n.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){var f;let r=t.padWidth(e,t),n=(f=t.helpWidth)!=null?f:80;function s(d,g){return t.formatItem(d,r,g,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),n),""]));let l=t.visibleArguments(e).map(d=>s(t.styleArgumentTerm(t.argumentTerm(d)),t.styleArgumentDescription(t.argumentDescription(d))));l.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...l,""]));let c=t.visibleOptions(e).map(d=>s(t.styleOptionTerm(t.optionTerm(d)),t.styleOptionDescription(t.optionDescription(d))));if(c.length>0&&(o=o.concat([t.styleTitle("Options:"),...c,""])),t.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(g=>s(t.styleOptionTerm(t.optionTerm(g)),t.styleOptionDescription(t.optionDescription(g))));d.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...d,""]))}let u=t.visibleCommands(e).map(d=>s(t.styleSubcommandTerm(t.subcommandTerm(d)),t.styleSubcommandDescription(t.subcommandDescription(d))));return u.length>0&&(o=o.concat([t.styleTitle("Commands:"),...u,""])),o.join(`
19
+ `)}displayWidth(e){return hm(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,n){var d;let o=" ".repeat(2);if(!r)return o+e;let a=e.padEnd(t+e.length-n.displayWidth(e)),l=2,u=((d=this.helpWidth)!=null?d:80)-t-l-2,f;return u<this.minWidthToWrap||n.preformatted(r)?f=r:f=n.boxWrap(r,u).replace(/\n/g,`
20
+ `+" ".repeat(t+l)),o+a+" ".repeat(l)+f.replace(/\n/g,`
21
+ ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let a=o.match(n);if(a===null){s.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(u=>{let f=this.displayWidth(u);if(c+f<=t){l.push(u),c+=f;return}s.push(l.join(""));let d=u.trimStart();l=[d],c=this.displayWidth(d)}),s.push(l.join(""))}),s.join(`
22
+ `)}};function hm(i){let e=/\x1b\[\d*(;\d*)*m/g;return i.replace(e,"")}Yl.Help=Wl;Yl.stripColor=hm});var Ql=O(Zl=>{var{InvalidArgumentError:k1}=pn(),zl=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=C1(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new k1(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?pm(this.name().replace(/^no-/,"")):pm(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Jl=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let n=this.negativeOptions.get(r).presetArg,s=n!==void 0?n:!1;return t.negate===(s===e)}};function pm(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function C1(i){let e,t,r=/^-[^-]$/,n=/^--[^-]/,s=i.split(/[ |,]+/).concat("guard");if(r.test(s[0])&&(e=s.shift()),n.test(s[0])&&(t=s.shift()),!e&&r.test(s[0])&&(e=s.shift()),!e&&n.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${i}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
23
23
  - a short flag is a single dash and a single character
24
24
  - either use a single dash and a single character (for a short flag)
25
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(a)?new Error(`${o}
26
- - too many short flags`):n.test(a)?new Error(`${o}
27
- - too many long flags`):new Error(`${o}
28
- - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${r}'.`);return{shortFlag:e,longFlag:t}}Pc.Option=Bc;Pc.DualOptions=Rc});var rg=w(tg=>{function sE(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let i=0;i<=r.length;i++)t[i]=[i];for(let i=0;i<=e.length;i++)t[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=r.length;n++){let s=1;r[n-1]===e[i-1]?s=0:s=1,t[n][i]=Math.min(t[n-1][i]+1,t[n][i-1]+1,t[n-1][i-1]+s),n>1&&i>1&&r[n-1]===e[i-2]&&r[n-2]===e[i-1]&&(t[n][i]=Math.min(t[n][i],t[n-2][i-2]+1))}return t[r.length][e.length]}function aE(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(a=>a.slice(2)));let i=[],n=3,s=.4;return e.forEach(a=>{if(a.length<=1)return;let o=sE(r,a),l=Math.max(r.length,a.length);(l-o)/l>s&&(o<n?(n=o,i=[a]):o===n&&i.push(a))}),i.sort((a,o)=>a.localeCompare(o)),t&&(i=i.map(a=>`--${a}`)),i.length>1?`
29
- (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
30
- (Did you mean ${i[0]}?)`:""}tg.suggestSimilar=aE});var ag=w(Uc=>{var oE=require("node:events").EventEmitter,Dc=require("node:child_process"),Ar=require("node:path"),Va=require("node:fs"),Re=require("node:process"),{Argument:lE,humanReadableArgName:cE}=$a(),{CommanderError:Fc}=ls(),{Help:uE,stripColor:fE}=Lc(),{Option:ig,DualOptions:hE}=Mc(),{suggestSimilar:ng}=rg(),qc=class r extends oE{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>Re.stdout.write(t),writeErr:t=>Re.stderr.write(t),outputError:(t,i)=>i(t),getOutHelpWidth:()=>Re.stdout.isTTY?Re.stdout.columns:void 0,getErrHelpWidth:()=>Re.stderr.isTTY?Re.stderr.columns:void 0,getOutHasColors:()=>{var t,i,n;return(n=jc())!=null?n:Re.stdout.isTTY&&((i=(t=Re.stdout).hasColors)==null?void 0:i.call(t))},getErrHasColors:()=>{var t,i,n;return(n=jc())!=null?n:Re.stderr.isTTY&&((i=(t=Re.stderr).hasColors)==null?void 0:i.call(t))},stripColor:t=>fE(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,i){let n=t,s=i;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,a,o]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(a);return n&&(l.description(n),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,o&&l.arguments(o),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),n?this:l}createCommand(e){return new r(e)}createHelp(){return Object.assign(new uE,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
31
- - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new lE(e,t)}argument(e,t,i,n){let s=this.createArgument(e,t);return typeof i=="function"?s.default(n).argParser(i):s.default(i),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e!=null?e:"help [command]";let[,i,n]=e.match(/([^ ]+) *(.*)/),s=t!=null?t:"display help for command",a=this.createCommand(i);return a.helpOption(!1),n&&a.arguments(n),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){var t;return((t=this._addImplicitHelpCommand)!=null?t:this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let i=["preSubcommand","preAction","postAction"];if(!i.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
32
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,i){this._exitCallback&&this._exitCallback(new Fc(e,t,i)),Re.exit(e)}action(e){let t=i=>{let n=this.registeredArguments.length,s=i.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new ig(e,t)}_callParseArg(e,t,i,n){try{return e.parseArg(t,i)}catch(s){if(s.code==="commander.invalidArgument"){let a=`${n} ${s.message}`;this.error(a,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let i=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
33
- - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),i=t(e).find(n=>this._findCommand(n));if(i){let n=t(this._findCommand(i)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),i=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(i,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(i,e.defaultValue,"default");let n=(s,a,o)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(i);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,a):s!==null&&e.variadic&&(s=e._concatValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(i,s,o)};return this.on("option:"+t,s=>{let a=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,a,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let a=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,a,"env")}),this}_optionEx(e,t,i,n,s){if(typeof t=="object"&&t instanceof ig)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(t,i);if(a.makeOptionMandatory(!!e.mandatory),typeof n=="function")a.default(s).argParser(n);else if(n instanceof RegExp){let o=n;n=(l,c)=>{let u=o.exec(l);return u?u[0]:c},a.default(s).argParser(n)}else a.default(n);return this.addOption(a)}option(e,t,i,n){return this._optionEx({},e,t,i,n)}requiredOption(e,t,i,n){return this._optionEx({mandatory:!0},e,t,i,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,i){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=i,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(e)!==void 0&&(t=i.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var n,s;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(n=Re.versions)!=null&&n.electron&&(t.from="electron");let a=(s=Re.execArgv)!=null?s:[];(a.includes("-e")||a.includes("--eval")||a.includes("-p")||a.includes("--print"))&&(t.from="eval")}e===void 0&&(e=Re.argv),this.rawArgs=e.slice();let i;switch(t.from){case void 0:case"node":this._scriptPath=e[1],i=e.slice(2);break;case"electron":Re.defaultApp?(this._scriptPath=e[1],i=e.slice(2)):i=e.slice(1);break;case"user":i=e.slice(0);break;case"eval":i=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(e,t){this._prepareForParse();let i=this._prepareUserArgs(e,t);return this._parseCommand([],i),this}async parseAsync(e,t){this._prepareForParse();let i=this._prepareUserArgs(e,t);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
34
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,i){if(Va.existsSync(e))return;let n=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
35
- - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
25
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(o)?new Error(`${a}
26
+ - too many short flags`):n.test(o)?new Error(`${a}
27
+ - too many long flags`):new Error(`${a}
28
+ - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}Zl.Option=zl;Zl.DualOptions=Jl});var mm=O(dm=>{function T1(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let r=0;r<=i.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let n=1;n<=i.length;n++){let s=1;i[n-1]===e[r-1]?s=0:s=1,t[n][r]=Math.min(t[n-1][r]+1,t[n][r-1]+1,t[n-1][r-1]+s),n>1&&r>1&&i[n-1]===e[r-2]&&i[n-2]===e[r-1]&&(t[n][r]=Math.min(t[n][r],t[n-2][r-2]+1))}return t[i.length][e.length]}function A1(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let r=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=T1(i,o),l=Math.max(i.length,o.length);(l-a)/l>s&&(a<n?(n=a,r=[o]):a===n&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),t&&(r=r.map(o=>`--${o}`)),r.length>1?`
29
+ (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
30
+ (Did you mean ${r[0]}?)`:""}dm.suggestSimilar=A1});var bm=O(rc=>{var I1=require("node:events").EventEmitter,Xl=require("node:child_process"),li=require("node:path"),Gs=require("node:fs"),Oe=require("node:process"),{Argument:N1,humanReadableArgName:B1}=Hs(),{CommanderError:ec}=pn(),{Help:L1,stripColor:P1}=Kl(),{Option:gm,DualOptions:R1}=Ql(),{suggestSimilar:ym}=mm(),tc=class i extends I1{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>Oe.stdout.write(t),writeErr:t=>Oe.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>Oe.stdout.isTTY?Oe.stdout.columns:void 0,getErrHelpWidth:()=>Oe.stderr.isTTY?Oe.stderr.columns:void 0,getOutHasColors:()=>{var t,r,n;return(n=ic())!=null?n:Oe.stdout.isTTY&&((r=(t=Oe.stdout).hasColors)==null?void 0:r.call(t))},getErrHasColors:()=>{var t,r,n;return(n=ic())!=null?n:Oe.stderr.isTTY&&((r=(t=Oe.stderr).hasColors)==null?void 0:r.call(t))},stripColor:t=>P1(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let n=t,s=r;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return n&&(l.description(n),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),n?this:l}createCommand(e){return new i(e)}createHelp(){return Object.assign(new L1,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
31
+ - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new N1(e,t)}argument(e,t,r,n){let s=this.createArgument(e,t);return typeof r=="function"?s.default(n).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e!=null?e:"help [command]";let[,r,n]=e.match(/([^ ]+) *(.*)/),s=t!=null?t:"display help for command",o=this.createCommand(r);return o.helpOption(!1),n&&o.arguments(n),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){var t;return((t=this._addImplicitHelpCommand)!=null?t:this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
32
+ Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new ec(e,t,r)),Oe.exit(e)}action(e){let t=r=>{let n=this.registeredArguments.length,s=r.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new gm(e,t)}_callParseArg(e,t,r,n){try{return e.parseArg(t,r)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${n} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
33
+ - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),r=t(e).find(n=>this._findCommand(n));if(r){let n=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(r);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._concatValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,t,r,n,s){if(typeof t=="object"&&t instanceof gm)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,r);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(l,c)=>{let u=a.exec(l);return u?u[0]:c},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var n,s;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(n=Oe.versions)!=null&&n.electron&&(t.from="electron");let o=(s=Oe.execArgv)!=null?s:[];(o.includes("-e")||o.includes("--eval")||o.includes("-p")||o.includes("--print"))&&(t.from="eval")}e===void 0&&(e=Oe.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":Oe.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
34
+ - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if(Gs.existsSync(e))return;let n=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
35
+ - if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
36
36
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
37
- - ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let p=Ar.resolve(u,f);if(Va.existsSync(p))return p;if(n.includes(Ar.extname(f)))return;let m=n.find(g=>Va.existsSync(`${p}${g}`));if(m)return`${p}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=e._executableFile||`${this._name}-${e._name}`,o=this._executableDir||"";if(this._scriptPath){let u;try{u=Va.realpathSync(this._scriptPath)}catch{u=this._scriptPath}o=Ar.resolve(Ar.dirname(u),o)}if(o){let u=s(o,a);if(!u&&!e._executableFile&&this._scriptPath){let f=Ar.basename(this._scriptPath,Ar.extname(this._scriptPath));f!==this._name&&(u=s(o,`${f}-${e._name}`))}a=u||a}i=n.includes(Ar.extname(a));let l;Re.platform!=="win32"?i?(t.unshift(a),t=sg(Re.execArgv).concat(t),l=Dc.spawn(Re.argv[0],t,{stdio:"inherit"})):l=Dc.spawn(a,t,{stdio:"inherit"}):(this._checkForMissingExecutable(a,o,e._name),t.unshift(a),t=sg(Re.execArgv).concat(t),l=Dc.spawn(Re.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{Re.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let c=this._exitCallback;l.on("close",u=>{u=u!=null?u:1,c?c(new Fc(u,"commander.executeSubCommandAsync","(close)")):Re.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(a,o,e._name);else if(u.code==="EACCES")throw new Error(`'${a}' not executable`);if(!c)Re.exit(1);else{let f=new Fc(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,c(f)}}),this.runningCommand=l}_dispatchSubcommand(e,t,i){let n=this._findCommand(e);n||this.help({error:!0}),n._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(i));else return n._parseCommand(t,i)}),s}_dispatchHelpCommand(e){var i,n,s,a;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[(a=(s=(i=this._getHelpOption())==null?void 0:i.long)!=null?s:(n=this._getHelpOption())==null?void 0:n.short)!=null?a:"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(i,n,s)=>{let a=n;if(n!==null&&i.parseArg){let o=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;a=this._callParseArg(i,n,s,o)}return a};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((i,n)=>{let s=i.defaultValue;i.variadic?n<this.args.length?(s=this.args.slice(n),i.parseArg&&(s=s.reduce((a,o)=>e(i,o,a),i.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],i.parseArg&&(s=e(i,s,i.defaultValue))),t[n]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let i=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(a=>{n.push({hookedCommand:s,callback:a})})}),t==="postAction"&&n.reverse(),n.forEach(s=>{i=this._chainOrCall(i,()=>s.callback(s.hookedCommand,this))}),i}_chainOrCallSubCommandHook(e,t,i){let n=e;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(s=>{n=this._chainOrCall(n,()=>s(this,t))}),n}_parseCommand(e,t){let i=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(i.operands),t=i.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(s,e,t)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=e.find(s=>i.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],i=[],n=t,s=e.slice();function a(l){return l.length>1&&l[0]==="-"}let o=null;for(;s.length;){let l=s.shift();if(l==="--"){n===i&&n.push(l),n.push(...s);break}if(o&&!a(l)){this.emit(`option:${o.name()}`,l);continue}if(o=null,a(l)){let c=this._findOption(l);if(c){if(c.required){let u=s.shift();u===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,u)}else if(c.optional){let u=null;s.length>0&&!a(s[0])&&(u=s.shift()),this.emit(`option:${c.name()}`,u)}else this.emit(`option:${c.name()}`);o=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),u=this._findOption(l.slice(0,c));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,l.slice(c+1));continue}}if(a(l)&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&i.length===0){if(this._findCommand(l)){t.push(l),s.length>0&&i.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){i.push(l),s.length>0&&i.push(...s);break}}if(this._passThroughOptions){n.push(l),s.length>0&&n.push(...s);break}n.push(l)}return{operands:t,unknown:i}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let i=0;i<t;i++){let n=this.options[i].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
37
+ - ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let d=li.resolve(u,f);if(Gs.existsSync(d))return d;if(n.includes(li.extname(f)))return;let g=n.find(y=>Gs.existsSync(`${d}${y}`));if(g)return`${d}${g}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Gs.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=li.resolve(li.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let f=li.basename(this._scriptPath,li.extname(this._scriptPath));f!==this._name&&(u=s(a,`${f}-${e._name}`))}o=u||o}r=n.includes(li.extname(o));let l;Oe.platform!=="win32"?r?(t.unshift(o),t=vm(Oe.execArgv).concat(t),l=Xl.spawn(Oe.argv[0],t,{stdio:"inherit"})):l=Xl.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=vm(Oe.execArgv).concat(t),l=Xl.spawn(Oe.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{Oe.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let c=this._exitCallback;l.on("close",u=>{u=u!=null?u:1,c?c(new ec(u,"commander.executeSubCommandAsync","(close)")):Oe.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)Oe.exit(1);else{let f=new ec(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,c(f)}}),this.runningCommand=l}_dispatchSubcommand(e,t,r){let n=this._findCommand(e);n||this.help({error:!0}),n._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(r));else return n._parseCommand(t,r)}),s}_dispatchHelpCommand(e){var r,n,s,o;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[(o=(s=(r=this._getHelpOption())==null?void 0:r.long)!=null?s:(n=this._getHelpOption())==null?void 0:n.short)!=null?o:"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,n,s)=>{let o=n;if(n!==null&&r.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,n,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,n)=>{let s=r.defaultValue;r.variadic?n<this.args.length?(s=this.args.slice(n),r.parseArg&&(s=s.reduce((o,a)=>e(r,a,o),r.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],r.parseArg&&(s=e(r,s,r.defaultValue))),t[n]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),t==="postAction"&&n.reverse(),n.forEach(s=>{r=this._chainOrCall(r,()=>s.callback(s.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let n=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(s=>{n=this._chainOrCall(n,()=>s(this,t))}),n}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let n=r.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let n=e.find(s=>r.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(r,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],r=[],n=t,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){n===r&&n.push(l),n.push(...s);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let c=this._findOption(l);if(c){if(c.required){let u=s.shift();u===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,u)}else if(c.optional){let u=null;s.length>0&&!o(s[0])&&(u=s.shift()),this.emit(`option:${c.name()}`,u)}else this.emit(`option:${c.name()}`);a=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),u=this._findOption(l.slice(0,c));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,l.slice(c+1));continue}}if(o(l)&&(n=r),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(l)){t.push(l),s.length>0&&r.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){r.push(l),s.length>0&&r.push(...s);break}}if(this._passThroughOptions){n.push(l),s.length>0&&n.push(...s);break}n.push(l)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let r=0;r<t;r++){let n=this.options[r].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
38
38
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
39
39
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
40
- `),this.outputHelp({error:!0}));let i=t||{},n=i.exitCode||1,s=i.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Re.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Re.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new hE(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let i=a=>{let o=a.attributeName(),l=this.getOptionValue(o),c=this.options.find(f=>f.negate&&o===f.attributeName()),u=this.options.find(f=>!f.negate&&o===f.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||a},n=a=>{let o=i(a),l=o.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${o.envVar}'`:`option '${o.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let a=s.createHelp().visibleOptions(s).filter(o=>o.long).map(o=>o.long);n=n.concat(a),s=s.parent}while(s&&!s._enablePositionalOptions);t=ng(e,n)}let i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,i=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=ng(e,n)}let i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";let n=this.createOption(t,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
41
- `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var n;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let i=(n=this.parent)==null?void 0:n._findCommand(e);if(i){let s=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(i=>cE(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Ar.basename(e,Ar.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),i=this._getOutputContext(e);t.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let n=t.formatHelp(this,t);return i.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,i,n,s;return t?(i=o=>this._outputConfiguration.writeErr(o),n=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(i=o=>this._outputConfiguration.writeOut(o),n=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:o=>(n||(o=this._outputConfiguration.stripColor(o)),i(o)),hasColors:n,helpWidth:s}}outputHelp(e){var a;let t;typeof e=="function"&&(t=e,e=void 0);let i=this._getOutputContext(e),n={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let s=this.helpInformation({error:i.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(s),(a=this._getHelpOption())!=null&&a.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",n))}helpOption(e,t){var i;return typeof e=="boolean"?(e?this._helpOption=(i=this._helpOption)!=null?i:void 0:this._helpOption=null,this):(e=e!=null?e:"-h, --help",t=t!=null?t:"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){var i;this.outputHelp(e);let t=Number((i=Re.exitCode)!=null?i:0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
42
- Expecting one of '${i.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let a;typeof t=="function"?a=t({error:s.error,command:s.command}):a=t,a&&s.write(`${a}
43
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function sg(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:i=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],i=s[3],n=s[4]),t&&n!=="0"?`${t}=${i}:${parseInt(n)+1}`:e})}function jc(){if(Re.env.NO_COLOR||Re.env.FORCE_COLOR==="0"||Re.env.FORCE_COLOR==="false")return!1;if(Re.env.FORCE_COLOR||Re.env.CLICOLOR_FORCE!==void 0)return!0}Uc.Command=qc;Uc.useColor=jc});var ug=w(Wt=>{var{Argument:og}=$a(),{Command:$c}=ag(),{CommanderError:dE,InvalidArgumentError:lg}=ls(),{Help:pE}=Lc(),{Option:cg}=Mc();Wt.program=new $c;Wt.createCommand=r=>new $c(r);Wt.createOption=(r,e)=>new cg(r,e);Wt.createArgument=(r,e)=>new og(r,e);Wt.Command=$c;Wt.Option=cg;Wt.Argument=og;Wt.Help=pE;Wt.CommanderError=dE;Wt.InvalidArgumentError=lg;Wt.InvalidOptionArgumentError=lg});var gg=w((pg,mg)=>{pg=mg.exports=xn;function xn(r,e){if(this.stream=e.stream||process.stderr,typeof e=="number"){var t=e;e={},e.total=t}else{if(e=e||{},typeof r!="string")throw new Error("format required");if(typeof e.total!="number")throw new Error("total required")}this.fmt=r,this.curr=e.curr||0,this.total=e.total,this.width=e.width||this.total,this.clear=e.clear,this.chars={complete:e.complete||"=",incomplete:e.incomplete||"-",head:e.head||e.complete||"="},this.renderThrottle=e.renderThrottle!==0?e.renderThrottle||16:0,this.lastRender=-1/0,this.callback=e.callback||function(){},this.tokens={},this.lastDraw=""}xn.prototype.tick=function(r,e){if(r!==0&&(r=r||1),typeof r=="object"&&(e=r,r=1),e&&(this.tokens=e),this.curr==0&&(this.start=new Date),this.curr+=r,this.render(),this.curr>=this.total){this.render(void 0,!0),this.complete=!0,this.terminate(),this.callback(this);return}};xn.prototype.render=function(r,e){if(e=e!==void 0?e:!1,r&&(this.tokens=r),!!this.stream.isTTY){var t=Date.now(),i=t-this.lastRender;if(!(!e&&i<this.renderThrottle)){this.lastRender=t;var n=this.curr/this.total;n=Math.min(Math.max(n,0),1);var s=Math.floor(n*100),a,o,l,c=new Date-this.start,u=s==100?0:c*(this.total/this.curr-1),f=this.curr/(c/1e3),p=this.fmt.replace(":current",this.curr).replace(":total",this.total).replace(":elapsed",isNaN(c)?"0.0":(c/1e3).toFixed(1)).replace(":eta",isNaN(u)||!isFinite(u)?"0.0":(u/1e3).toFixed(1)).replace(":percent",s.toFixed(0)+"%").replace(":rate",Math.round(f)),m=Math.max(0,this.stream.columns-p.replace(":bar","").length);m&&process.platform==="win32"&&(m=m-1);var g=Math.min(this.width,m);if(l=Math.round(g*n),o=Array(Math.max(0,l+1)).join(this.chars.complete),a=Array(Math.max(0,g-l+1)).join(this.chars.incomplete),l>0&&(o=o.slice(0,-1)+this.chars.head),p=p.replace(":bar",o+a),this.tokens)for(var y in this.tokens)p=p.replace(":"+y,this.tokens[y]);this.lastDraw!==p&&(this.stream.cursorTo(0),this.stream.write(p),this.stream.clearLine(1),this.lastDraw=p)}}};xn.prototype.update=function(r,e){var t=Math.floor(r*this.total),i=t-this.curr;this.tick(i,e)};xn.prototype.interrupt=function(r){this.stream.clearLine(),this.stream.cursorTo(0),this.stream.write(r),this.stream.write(`
44
- `),this.stream.write(this.lastDraw)};xn.prototype.terminate=function(){this.clear?this.stream.clearLine&&(this.stream.clearLine(),this.stream.cursorTo(0)):this.stream.write(`
45
- `)}});var yg=w((xB,vg)=>{vg.exports=gg()});var wg=w(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});var _g=require("buffer"),Ei={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};Ir.ERRORS=Ei;function mE(r){if(!_g.Buffer.isEncoding(r))throw new Error(Ei.INVALID_ENCODING)}Ir.checkEncoding=mE;function bg(r){return typeof r=="number"&&isFinite(r)&&_E(r)}Ir.isFiniteInteger=bg;function xg(r,e){if(typeof r=="number"){if(!bg(r)||r<0)throw new Error(e?Ei.INVALID_OFFSET:Ei.INVALID_LENGTH)}else throw new Error(e?Ei.INVALID_OFFSET_NON_NUMBER:Ei.INVALID_LENGTH_NON_NUMBER)}function gE(r){xg(r,!1)}Ir.checkLengthValue=gE;function vE(r){xg(r,!0)}Ir.checkOffsetValue=vE;function yE(r,e){if(r<0||r>e.length)throw new Error(Ei.INVALID_TARGET_OFFSET)}Ir.checkTargetOffset=yE;function _E(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r}function bE(r){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof _g.Buffer.prototype[r]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${r}.`)}Ir.bigIntAndBufferInt64Check=bE});var Eg=w(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var be=wg(),Sg=4096,xE="utf8",Vc=class r{constructor(e){if(this.length=0,this._encoding=xE,this._writeOffset=0,this._readOffset=0,r.isSmartBufferOptions(e))if(e.encoding&&(be.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(be.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(be.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(be.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Sg);else{if(typeof e!="undefined")throw new Error(be.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Sg)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return be.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return be.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return be.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return be.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return be.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return be.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return be.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return be.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return be.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return be.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return be.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return be.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let i;typeof e=="number"?(be.checkLengthValue(e),i=Math.min(e,this.length-this._readOffset)):(t=e,i=this.length-this._readOffset),typeof t!="undefined"&&be.checkEncoding(t);let n=this._buff.slice(this._readOffset,this._readOffset+i).toString(t||this._encoding);return this._readOffset+=i,n}insertString(e,t,i){return be.checkOffsetValue(t),this._handleString(e,!0,t,i)}writeString(e,t,i){return this._handleString(e,!1,t,i)}readStringNT(e){typeof e!="undefined"&&be.checkEncoding(e);let t=this.length;for(let n=this._readOffset;n<this.length;n++)if(this._buff[n]===0){t=n;break}let i=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,i.toString(e||this._encoding)}insertStringNT(e,t,i){return be.checkOffsetValue(t),this.insertString(e,t,i),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,i){return this.writeString(e,t,i),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e!="undefined"&&be.checkLengthValue(e);let t=typeof e=="number"?e:this.length,i=Math.min(this.length,this._readOffset+t),n=this._buff.slice(this._readOffset,i);return this._readOffset=i,n}insertBuffer(e,t){return be.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let i=this._readOffset;i<this.length;i++)if(this._buff[i]===0){e=i;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return be.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t!="undefined"&&be.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){be.checkOffsetValue(e),be.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){be.checkOffsetValue(e),be.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){be.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return be.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,i,n){let s=this._writeOffset,a=this._encoding;typeof i=="number"?s=i:typeof i=="string"&&(be.checkEncoding(i),a=i),typeof n=="string"&&(be.checkEncoding(n),a=n);let o=Buffer.byteLength(e,a);return t?this.ensureInsertable(o,s):this._ensureWriteable(o,s),this._buff.write(e,s,o,a),t?this._writeOffset+=o:typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,s+o):this._writeOffset+=o,this}_handleBuffer(e,t,i){let n=typeof i=="number"?i:this._writeOffset;return t?this.ensureInsertable(e.length,n):this._ensureWriteable(e.length,n),e.copy(this._buff,n),t?this._writeOffset+=e.length:typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,n+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let i=this._readOffset;if(typeof t!="undefined"&&(be.checkOffsetValue(t),i=t),i<0||i+e>this.length)throw new Error(be.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){be.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let i=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(i+e),i+e>this.length&&(this.length=i+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let i=this._buff,n=t*3/2+1;n<e&&(n=e),this._buff=Buffer.allocUnsafe(n),i.copy(this._buff,0,0,t)}}_readNumberValue(e,t,i){this.ensureReadable(t,i);let n=e.call(this._buff,typeof i=="number"?i:this._readOffset);return typeof i=="undefined"&&(this._readOffset+=t),n}_insertNumberValue(e,t,i,n){return be.checkOffsetValue(n),this.ensureInsertable(t,n),e.call(this._buff,i,n),this._writeOffset+=t,this}_writeNumberValue(e,t,i,n){if(typeof n=="number"){if(n<0)throw new Error(be.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);be.checkOffsetValue(n)}let s=typeof n=="number"?n:this._writeOffset;return this._ensureWriteable(t,s),e.call(this._buff,i,s),typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,s+t):this._writeOffset+=t,this}};Hc.SmartBuffer=Vc});var Gc=w(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.SOCKS5_NO_ACCEPTABLE_AUTH=Ue.SOCKS5_CUSTOM_AUTH_END=Ue.SOCKS5_CUSTOM_AUTH_START=Ue.SOCKS_INCOMING_PACKET_SIZES=Ue.SocksClientState=Ue.Socks5Response=Ue.Socks5HostType=Ue.Socks5Auth=Ue.Socks4Response=Ue.SocksCommand=Ue.ERRORS=Ue.DEFAULT_TIMEOUT=void 0;var wE=3e4;Ue.DEFAULT_TIMEOUT=wE;var SE={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};Ue.ERRORS=SE;var EE={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:r=>r+7,Socks4Response:8};Ue.SOCKS_INCOMING_PACKET_SIZES=EE;var kg;(function(r){r[r.connect=1]="connect",r[r.bind=2]="bind",r[r.associate=3]="associate"})(kg||(Ue.SocksCommand=kg={}));var Og;(function(r){r[r.Granted=90]="Granted",r[r.Failed=91]="Failed",r[r.Rejected=92]="Rejected",r[r.RejectedIdent=93]="RejectedIdent"})(Og||(Ue.Socks4Response=Og={}));var Cg;(function(r){r[r.NoAuth=0]="NoAuth",r[r.GSSApi=1]="GSSApi",r[r.UserPass=2]="UserPass"})(Cg||(Ue.Socks5Auth=Cg={}));var kE=128;Ue.SOCKS5_CUSTOM_AUTH_START=kE;var OE=254;Ue.SOCKS5_CUSTOM_AUTH_END=OE;var CE=255;Ue.SOCKS5_NO_ACCEPTABLE_AUTH=CE;var Tg;(function(r){r[r.Granted=0]="Granted",r[r.Failure=1]="Failure",r[r.NotAllowed=2]="NotAllowed",r[r.NetworkUnreachable=3]="NetworkUnreachable",r[r.HostUnreachable=4]="HostUnreachable",r[r.ConnectionRefused=5]="ConnectionRefused",r[r.TTLExpired=6]="TTLExpired",r[r.CommandNotSupported=7]="CommandNotSupported",r[r.AddressNotSupported=8]="AddressNotSupported"})(Tg||(Ue.Socks5Response=Tg={}));var Ag;(function(r){r[r.IPv4=1]="IPv4",r[r.Hostname=3]="Hostname",r[r.IPv6=4]="IPv6"})(Ag||(Ue.Socks5HostType=Ag={}));var Ig;(function(r){r[r.Created=0]="Created",r[r.Connecting=1]="Connecting",r[r.Connected=2]="Connected",r[r.SentInitialHandshake=3]="SentInitialHandshake",r[r.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",r[r.SentAuthentication=5]="SentAuthentication",r[r.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",r[r.SentFinalHandshake=7]="SentFinalHandshake",r[r.ReceivedFinalResponse=8]="ReceivedFinalResponse",r[r.BoundWaitingForConnection=9]="BoundWaitingForConnection",r[r.Established=10]="Established",r[r.Disconnected=11]="Disconnected",r[r.Error=99]="Error"})(Ig||(Ue.SocksClientState=Ig={}))});var zc=w(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.shuffleArray=wn.SocksClientError=void 0;var Wc=class extends Error{constructor(e,t){super(e),this.options=t}};wn.SocksClientError=Wc;function TE(r){for(let e=r.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[r[e],r[t]]=[r[t],r[e]]}}wn.shuffleArray=TE});var Yc=w(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.isCorrect=Sn.isInSubnet=void 0;function AE(r){return this.subnetMask<r.subnetMask?!1:this.mask(r.subnetMask)===r.mask()}Sn.isInSubnet=AE;function IE(r){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===r&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}Sn.isCorrect=IE});var Kc=w(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.RE_SUBNET_STRING=dr.RE_ADDRESS=dr.GROUPS=dr.BITS=void 0;dr.BITS=32;dr.GROUPS=4;dr.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;dr.RE_SUBNET_STRING=/\/\d{1,2}$/});var Ga=w(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.AddressError=void 0;var Zc=class extends Error{constructor(e,t){super(e),this.name="AddressError",t!==null&&(this.parseMessage=t)}};Ha.AddressError=Zc});var Jc=w((Wa,Ng)=>{(function(){var r,e=0xdeadbeefcafe,t=(e&16777215)==15715070;function i(h,d,v){h!=null&&(typeof h=="number"?this.fromNumber(h,d,v):d==null&&typeof h!="string"?this.fromString(h,256):this.fromString(h,d))}function n(){return new i(null)}function s(h,d,v,b,B,M){for(;--M>=0;){var z=d*this[h++]+v[b]+B;B=Math.floor(z/67108864),v[b++]=z&67108863}return B}function a(h,d,v,b,B,M){for(var z=d&32767,J=d>>15;--M>=0;){var He=this[h]&32767,rt=this[h++]>>15,Ut=J*He+rt*z;He=z*He+((Ut&32767)<<15)+v[b]+(B&1073741823),B=(He>>>30)+(Ut>>>15)+J*rt+(B>>>30),v[b++]=He&1073741823}return B}function o(h,d,v,b,B,M){for(var z=d&16383,J=d>>14;--M>=0;){var He=this[h]&16383,rt=this[h++]>>14,Ut=J*He+rt*z;He=z*He+((Ut&16383)<<14)+v[b]+B,B=(He>>28)+(Ut>>14)+J*rt,v[b++]=He&268435455}return B}var l=typeof navigator!="undefined";l&&t&&navigator.appName=="Microsoft Internet Explorer"?(i.prototype.am=a,r=30):l&&t&&navigator.appName!="Netscape"?(i.prototype.am=s,r=26):(i.prototype.am=o,r=28),i.prototype.DB=r,i.prototype.DM=(1<<r)-1,i.prototype.DV=1<<r;var c=52;i.prototype.FV=Math.pow(2,c),i.prototype.F1=c-r,i.prototype.F2=2*r-c;var u="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array,p,m;for(p=48,m=0;m<=9;++m)f[p++]=m;for(p=97,m=10;m<36;++m)f[p++]=m;for(p=65,m=10;m<36;++m)f[p++]=m;function g(h){return u.charAt(h)}function y(h,d){var v=f[h.charCodeAt(d)];return v==null?-1:v}function _(h){for(var d=this.t-1;d>=0;--d)h[d]=this[d];h.t=this.t,h.s=this.s}function x(h){this.t=1,this.s=h<0?-1:0,h>0?this[0]=h:h<-1?this[0]=h+this.DV:this.t=0}function S(h){var d=n();return d.fromInt(h),d}function O(h,d){var v;if(d==16)v=4;else if(d==8)v=3;else if(d==256)v=8;else if(d==2)v=1;else if(d==32)v=5;else if(d==4)v=2;else{this.fromRadix(h,d);return}this.t=0,this.s=0;for(var b=h.length,B=!1,M=0;--b>=0;){var z=v==8?h[b]&255:y(h,b);if(z<0){h.charAt(b)=="-"&&(B=!0);continue}B=!1,M==0?this[this.t++]=z:M+v>this.DB?(this[this.t-1]|=(z&(1<<this.DB-M)-1)<<M,this[this.t++]=z>>this.DB-M):this[this.t-1]|=z<<M,M+=v,M>=this.DB&&(M-=this.DB)}v==8&&(h[0]&128)!=0&&(this.s=-1,M>0&&(this[this.t-1]|=(1<<this.DB-M)-1<<M)),this.clamp(),B&&i.ZERO.subTo(this,this)}function k(){for(var h=this.s&this.DM;this.t>0&&this[this.t-1]==h;)--this.t}function E(h){if(this.s<0)return"-"+this.negate().toString(h);var d;if(h==16)d=4;else if(h==8)d=3;else if(h==2)d=1;else if(h==32)d=5;else if(h==4)d=2;else return this.toRadix(h);var v=(1<<d)-1,b,B=!1,M="",z=this.t,J=this.DB-z*this.DB%d;if(z-- >0)for(J<this.DB&&(b=this[z]>>J)>0&&(B=!0,M=g(b));z>=0;)J<d?(b=(this[z]&(1<<J)-1)<<d-J,b|=this[--z]>>(J+=this.DB-d)):(b=this[z]>>(J-=d)&v,J<=0&&(J+=this.DB,--z)),b>0&&(B=!0),B&&(M+=g(b));return B?M:"0"}function R(){var h=n();return i.ZERO.subTo(this,h),h}function T(){return this.s<0?this.negate():this}function A(h){var d=this.s-h.s;if(d!=0)return d;var v=this.t;if(d=v-h.t,d!=0)return this.s<0?-d:d;for(;--v>=0;)if((d=this[v]-h[v])!=0)return d;return 0}function C(h){var d=1,v;return(v=h>>>16)!=0&&(h=v,d+=16),(v=h>>8)!=0&&(h=v,d+=8),(v=h>>4)!=0&&(h=v,d+=4),(v=h>>2)!=0&&(h=v,d+=2),(v=h>>1)!=0&&(h=v,d+=1),d}function L(){return this.t<=0?0:this.DB*(this.t-1)+C(this[this.t-1]^this.s&this.DM)}function P(h,d){var v;for(v=this.t-1;v>=0;--v)d[v+h]=this[v];for(v=h-1;v>=0;--v)d[v]=0;d.t=this.t+h,d.s=this.s}function $(h,d){for(var v=h;v<this.t;++v)d[v-h]=this[v];d.t=Math.max(this.t-h,0),d.s=this.s}function q(h,d){var v=h%this.DB,b=this.DB-v,B=(1<<b)-1,M=Math.floor(h/this.DB),z=this.s<<v&this.DM,J;for(J=this.t-1;J>=0;--J)d[J+M+1]=this[J]>>b|z,z=(this[J]&B)<<v;for(J=M-1;J>=0;--J)d[J]=0;d[M]=z,d.t=this.t+M+1,d.s=this.s,d.clamp()}function G(h,d){d.s=this.s;var v=Math.floor(h/this.DB);if(v>=this.t){d.t=0;return}var b=h%this.DB,B=this.DB-b,M=(1<<b)-1;d[0]=this[v]>>b;for(var z=v+1;z<this.t;++z)d[z-v-1]|=(this[z]&M)<<B,d[z-v]=this[z]>>b;b>0&&(d[this.t-v-1]|=(this.s&M)<<B),d.t=this.t-v,d.clamp()}function U(h,d){for(var v=0,b=0,B=Math.min(h.t,this.t);v<B;)b+=this[v]-h[v],d[v++]=b&this.DM,b>>=this.DB;if(h.t<this.t){for(b-=h.s;v<this.t;)b+=this[v],d[v++]=b&this.DM,b>>=this.DB;b+=this.s}else{for(b+=this.s;v<h.t;)b-=h[v],d[v++]=b&this.DM,b>>=this.DB;b-=h.s}d.s=b<0?-1:0,b<-1?d[v++]=this.DV+b:b>0&&(d[v++]=b),d.t=v,d.clamp()}function H(h,d){var v=this.abs(),b=h.abs(),B=v.t;for(d.t=B+b.t;--B>=0;)d[B]=0;for(B=0;B<b.t;++B)d[B+v.t]=v.am(0,b[B],d,B,0,v.t);d.s=0,d.clamp(),this.s!=h.s&&i.ZERO.subTo(d,d)}function Z(h){for(var d=this.abs(),v=h.t=2*d.t;--v>=0;)h[v]=0;for(v=0;v<d.t-1;++v){var b=d.am(v,d[v],h,2*v,0,1);(h[v+d.t]+=d.am(v+1,2*d[v],h,2*v+1,b,d.t-v-1))>=d.DV&&(h[v+d.t]-=d.DV,h[v+d.t+1]=1)}h.t>0&&(h[h.t-1]+=d.am(v,d[v],h,2*v,0,1)),h.s=0,h.clamp()}function re(h,d,v){var b=h.abs();if(!(b.t<=0)){var B=this.abs();if(B.t<b.t){d!=null&&d.fromInt(0),v!=null&&this.copyTo(v);return}v==null&&(v=n());var M=n(),z=this.s,J=h.s,He=this.DB-C(b[b.t-1]);He>0?(b.lShiftTo(He,M),B.lShiftTo(He,v)):(b.copyTo(M),B.copyTo(v));var rt=M.t,Ut=M[rt-1];if(Ut!=0){var Rt=Ut*(1<<this.F1)+(rt>1?M[rt-2]>>this.F2:0),Or=this.FV/Rt,pa=(1<<this.F1)/Rt,rr=1<<this.F2,ir=v.t,ma=ir-rt,Vr=d==null?n():d;for(M.dlShiftTo(ma,Vr),v.compareTo(Vr)>=0&&(v[v.t++]=1,v.subTo(Vr,v)),i.ONE.dlShiftTo(rt,Vr),Vr.subTo(M,M);M.t<rt;)M[M.t++]=0;for(;--ma>=0;){var Nl=v[--ir]==Ut?this.DM:Math.floor(v[ir]*Or+(v[ir-1]+rr)*pa);if((v[ir]+=M.am(0,Nl,v,ma,0,rt))<Nl)for(M.dlShiftTo(ma,Vr),v.subTo(Vr,v);v[ir]<--Nl;)v.subTo(Vr,v)}d!=null&&(v.drShiftTo(rt,d),z!=J&&i.ZERO.subTo(d,d)),v.t=rt,v.clamp(),He>0&&v.rShiftTo(He,v),z<0&&i.ZERO.subTo(v,v)}}}function Y(h){var d=n();return this.abs().divRemTo(h,null,d),this.s<0&&d.compareTo(i.ZERO)>0&&h.subTo(d,d),d}function we(h){this.m=h}function de(h){return h.s<0||h.compareTo(this.m)>=0?h.mod(this.m):h}function ue(h){return h}function ve(h){h.divRemTo(this.m,null,h)}function N(h,d,v){h.multiplyTo(d,v),this.reduce(v)}function ie(h,d){h.squareTo(d),this.reduce(d)}we.prototype.convert=de,we.prototype.revert=ue,we.prototype.reduce=ve,we.prototype.mulTo=N,we.prototype.sqrTo=ie;function Pe(){if(this.t<1)return 0;var h=this[0];if((h&1)==0)return 0;var d=h&3;return d=d*(2-(h&15)*d)&15,d=d*(2-(h&255)*d)&255,d=d*(2-((h&65535)*d&65535))&65535,d=d*(2-h*d%this.DV)%this.DV,d>0?this.DV-d:-d}function Te(h){this.m=h,this.mp=h.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<h.DB-15)-1,this.mt2=2*h.t}function Ee(h){var d=n();return h.abs().dlShiftTo(this.m.t,d),d.divRemTo(this.m,null,d),h.s<0&&d.compareTo(i.ZERO)>0&&this.m.subTo(d,d),d}function ke(h){var d=n();return h.copyTo(d),this.reduce(d),d}function ye(h){for(;h.t<=this.mt2;)h[h.t++]=0;for(var d=0;d<this.m.t;++d){var v=h[d]&32767,b=v*this.mpl+((v*this.mph+(h[d]>>15)*this.mpl&this.um)<<15)&h.DM;for(v=d+this.m.t,h[v]+=this.m.am(0,b,h,d,0,this.m.t);h[v]>=h.DV;)h[v]-=h.DV,h[++v]++}h.clamp(),h.drShiftTo(this.m.t,h),h.compareTo(this.m)>=0&&h.subTo(this.m,h)}function Q(h,d){h.squareTo(d),this.reduce(d)}function V(h,d,v){h.multiplyTo(d,v),this.reduce(v)}Te.prototype.convert=Ee,Te.prototype.revert=ke,Te.prototype.reduce=ye,Te.prototype.mulTo=V,Te.prototype.sqrTo=Q;function De(){return(this.t>0?this[0]&1:this.s)==0}function ce(h,d){if(h>4294967295||h<1)return i.ONE;var v=n(),b=n(),B=d.convert(this),M=C(h)-1;for(B.copyTo(v);--M>=0;)if(d.sqrTo(v,b),(h&1<<M)>0)d.mulTo(b,B,v);else{var z=v;v=b,b=z}return d.revert(v)}function _e(h,d){var v;return h<256||d.isEven()?v=new we(d):v=new Te(d),this.exp(h,v)}i.prototype.copyTo=_,i.prototype.fromInt=x,i.prototype.fromString=O,i.prototype.clamp=k,i.prototype.dlShiftTo=P,i.prototype.drShiftTo=$,i.prototype.lShiftTo=q,i.prototype.rShiftTo=G,i.prototype.subTo=U,i.prototype.multiplyTo=H,i.prototype.squareTo=Z,i.prototype.divRemTo=re,i.prototype.invDigit=Pe,i.prototype.isEven=De,i.prototype.exp=ce,i.prototype.toString=E,i.prototype.negate=R,i.prototype.abs=T,i.prototype.compareTo=A,i.prototype.bitLength=L,i.prototype.mod=Y,i.prototype.modPowInt=_e,i.ZERO=S(0),i.ONE=S(1);function St(){var h=n();return this.copyTo(h),h}function Lt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function I(){return this.t==0?this.s:this[0]<<24>>24}function te(){return this.t==0?this.s:this[0]<<16>>16}function ae(h){return Math.floor(Math.LN2*this.DB/Math.log(h))}function ne(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function pe(h){if(h==null&&(h=10),this.signum()==0||h<2||h>36)return"0";var d=this.chunkSize(h),v=Math.pow(h,d),b=S(v),B=n(),M=n(),z="";for(this.divRemTo(b,B,M);B.signum()>0;)z=(v+M.intValue()).toString(h).substr(1)+z,B.divRemTo(b,B,M);return M.intValue().toString(h)+z}function me(h,d){this.fromInt(0),d==null&&(d=10);for(var v=this.chunkSize(d),b=Math.pow(d,v),B=!1,M=0,z=0,J=0;J<h.length;++J){var He=y(h,J);if(He<0){h.charAt(J)=="-"&&this.signum()==0&&(B=!0);continue}z=d*z+He,++M>=v&&(this.dMultiply(b),this.dAddOffset(z,0),M=0,z=0)}M>0&&(this.dMultiply(Math.pow(d,M)),this.dAddOffset(z,0)),B&&i.ZERO.subTo(this,this)}function Ae(h,d,v){if(typeof d=="number")if(h<2)this.fromInt(1);else for(this.fromNumber(h,v),this.testBit(h-1)||this.bitwiseTo(i.ONE.shiftLeft(h-1),he,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(d);)this.dAddOffset(2,0),this.bitLength()>h&&this.subTo(i.ONE.shiftLeft(h-1),this);else{var b=new Array,B=h&7;b.length=(h>>3)+1,d.nextBytes(b),B>0?b[0]&=(1<<B)-1:b[0]=0,this.fromString(b,256)}}function Ie(){var h=this.t,d=new Array;d[0]=this.s;var v=this.DB-h*this.DB%8,b,B=0;if(h-- >0)for(v<this.DB&&(b=this[h]>>v)!=(this.s&this.DM)>>v&&(d[B++]=b|this.s<<this.DB-v);h>=0;)v<8?(b=(this[h]&(1<<v)-1)<<8-v,b|=this[--h]>>(v+=this.DB-8)):(b=this[h]>>(v-=8)&255,v<=0&&(v+=this.DB,--h)),(b&128)!=0&&(b|=-256),B==0&&(this.s&128)!=(b&128)&&++B,(B>0||b!=this.s)&&(d[B++]=b);return d}function Ve(h){return this.compareTo(h)==0}function Fe(h){return this.compareTo(h)<0?this:h}function j(h){return this.compareTo(h)>0?this:h}function X(h,d,v){var b,B,M=Math.min(h.t,this.t);for(b=0;b<M;++b)v[b]=d(this[b],h[b]);if(h.t<this.t){for(B=h.s&this.DM,b=M;b<this.t;++b)v[b]=d(this[b],B);v.t=this.t}else{for(B=this.s&this.DM,b=M;b<h.t;++b)v[b]=d(B,h[b]);v.t=h.t}v.s=d(this.s,h.s),v.clamp()}function fe(h,d){return h&d}function je(h){var d=n();return this.bitwiseTo(h,fe,d),d}function he(h,d){return h|d}function Se(h){var d=n();return this.bitwiseTo(h,he,d),d}function Be(h,d){return h^d}function le(h){var d=n();return this.bitwiseTo(h,Be,d),d}function Ne(h,d){return h&~d}function Ze(h){var d=n();return this.bitwiseTo(h,Ne,d),d}function qe(){for(var h=n(),d=0;d<this.t;++d)h[d]=this.DM&~this[d];return h.t=this.t,h.s=~this.s,h}function Et(h){var d=n();return h<0?this.rShiftTo(-h,d):this.lShiftTo(h,d),d}function jt(h){var d=n();return h<0?this.lShiftTo(-h,d):this.rShiftTo(h,d),d}function Er(h){if(h==0)return-1;var d=0;return(h&65535)==0&&(h>>=16,d+=16),(h&255)==0&&(h>>=8,d+=8),(h&15)==0&&(h>>=4,d+=4),(h&3)==0&&(h>>=2,d+=2),(h&1)==0&&++d,d}function Ur(){for(var h=0;h<this.t;++h)if(this[h]!=0)return h*this.DB+Er(this[h]);return this.s<0?this.t*this.DB:-1}function $r(h){for(var d=0;h!=0;)h&=h-1,++d;return d}function hi(){for(var h=0,d=this.s&this.DM,v=0;v<this.t;++v)h+=$r(this[v]^d);return h}function di(h){var d=Math.floor(h/this.DB);return d>=this.t?this.s!=0:(this[d]&1<<h%this.DB)!=0}function an(h,d){var v=i.ONE.shiftLeft(h);return this.bitwiseTo(v,d,v),v}function pi(h){return this.changeBit(h,he)}function mi(h){return this.changeBit(h,Ne)}function gi(h){return this.changeBit(h,Be)}function vi(h,d){for(var v=0,b=0,B=Math.min(h.t,this.t);v<B;)b+=this[v]+h[v],d[v++]=b&this.DM,b>>=this.DB;if(h.t<this.t){for(b+=h.s;v<this.t;)b+=this[v],d[v++]=b&this.DM,b>>=this.DB;b+=this.s}else{for(b+=this.s;v<h.t;)b+=h[v],d[v++]=b&this.DM,b>>=this.DB;b+=h.s}d.s=b<0?-1:0,b>0?d[v++]=b:b<-1&&(d[v++]=this.DV+b),d.t=v,d.clamp()}function ta(h){var d=n();return this.addTo(h,d),d}function es(h){var d=n();return this.subTo(h,d),d}function ra(h){var d=n();return this.multiplyTo(h,d),d}function ia(){var h=n();return this.squareTo(h),h}function na(h){var d=n();return this.divRemTo(h,d,null),d}function sa(h){var d=n();return this.divRemTo(h,null,d),d}function aa(h){var d=n(),v=n();return this.divRemTo(h,d,v),new Array(d,v)}function Cl(h){this[this.t]=this.am(0,h-1,this,0,0,this.t),++this.t,this.clamp()}function yi(h,d){if(h!=0){for(;this.t<=d;)this[this.t++]=0;for(this[d]+=h;this[d]>=this.DV;)this[d]-=this.DV,++d>=this.t&&(this[this.t++]=0),++this[d]}}function kr(){}function _i(h){return h}function on(h,d,v){h.multiplyTo(d,v)}function oa(h,d){h.squareTo(d)}kr.prototype.convert=_i,kr.prototype.revert=_i,kr.prototype.mulTo=on,kr.prototype.sqrTo=oa;function la(h){return this.exp(h,new kr)}function ca(h,d,v){var b=Math.min(this.t+h.t,d);for(v.s=0,v.t=b;b>0;)v[--b]=0;var B;for(B=v.t-this.t;b<B;++b)v[b+this.t]=this.am(0,h[b],v,b,0,this.t);for(B=Math.min(h.t,d);b<B;++b)this.am(0,h[b],v,b,0,d-b);v.clamp()}function ua(h,d,v){--d;var b=v.t=this.t+h.t-d;for(v.s=0;--b>=0;)v[b]=0;for(b=Math.max(d-this.t,0);b<h.t;++b)v[this.t+b-d]=this.am(d-b,h[b],v,0,0,this.t+b-d);v.clamp(),v.drShiftTo(1,v)}function ur(h){this.r2=n(),this.q3=n(),i.ONE.dlShiftTo(2*h.t,this.r2),this.mu=this.r2.divide(h),this.m=h}function fa(h){if(h.s<0||h.t>2*this.m.t)return h.mod(this.m);if(h.compareTo(this.m)<0)return h;var d=n();return h.copyTo(d),this.reduce(d),d}function ha(h){return h}function ln(h){for(h.drShiftTo(this.m.t-1,this.r2),h.t>this.m.t+1&&(h.t=this.m.t+1,h.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);h.compareTo(this.r2)<0;)h.dAddOffset(1,this.m.t+1);for(h.subTo(this.r2,h);h.compareTo(this.m)>=0;)h.subTo(this.m,h)}function Gb(h,d){h.squareTo(d),this.reduce(d)}function Wb(h,d,v){h.multiplyTo(d,v),this.reduce(v)}ur.prototype.convert=fa,ur.prototype.revert=ha,ur.prototype.reduce=ln,ur.prototype.mulTo=Wb,ur.prototype.sqrTo=Gb;function zb(h,d){var v=h.bitLength(),b,B=S(1),M;if(v<=0)return B;v<18?b=1:v<48?b=3:v<144?b=4:v<768?b=5:b=6,v<8?M=new we(d):d.isEven()?M=new ur(d):M=new Te(d);var z=new Array,J=3,He=b-1,rt=(1<<b)-1;if(z[1]=M.convert(this),b>1){var Ut=n();for(M.sqrTo(z[1],Ut);J<=rt;)z[J]=n(),M.mulTo(Ut,z[J-2],z[J]),J+=2}var Rt=h.t-1,Or,pa=!0,rr=n(),ir;for(v=C(h[Rt])-1;Rt>=0;){for(v>=He?Or=h[Rt]>>v-He&rt:(Or=(h[Rt]&(1<<v+1)-1)<<He-v,Rt>0&&(Or|=h[Rt-1]>>this.DB+v-He)),J=b;(Or&1)==0;)Or>>=1,--J;if((v-=J)<0&&(v+=this.DB,--Rt),pa)z[Or].copyTo(B),pa=!1;else{for(;J>1;)M.sqrTo(B,rr),M.sqrTo(rr,B),J-=2;J>0?M.sqrTo(B,rr):(ir=B,B=rr,rr=ir),M.mulTo(rr,z[Or],B)}for(;Rt>=0&&(h[Rt]&1<<v)==0;)M.sqrTo(B,rr),ir=B,B=rr,rr=ir,--v<0&&(v=this.DB-1,--Rt)}return M.revert(B)}function Yb(h){var d=this.s<0?this.negate():this.clone(),v=h.s<0?h.negate():h.clone();if(d.compareTo(v)<0){var b=d;d=v,v=b}var B=d.getLowestSetBit(),M=v.getLowestSetBit();if(M<0)return d;for(B<M&&(M=B),M>0&&(d.rShiftTo(M,d),v.rShiftTo(M,v));d.signum()>0;)(B=d.getLowestSetBit())>0&&d.rShiftTo(B,d),(B=v.getLowestSetBit())>0&&v.rShiftTo(B,v),d.compareTo(v)>=0?(d.subTo(v,d),d.rShiftTo(1,d)):(v.subTo(d,v),v.rShiftTo(1,v));return M>0&&v.lShiftTo(M,v),v}function Kb(h){if(h<=0)return 0;var d=this.DV%h,v=this.s<0?h-1:0;if(this.t>0)if(d==0)v=this[0]%h;else for(var b=this.t-1;b>=0;--b)v=(d*v+this[b])%h;return v}function Zb(h){var d=h.isEven();if(this.isEven()&&d||h.signum()==0)return i.ZERO;for(var v=h.clone(),b=this.clone(),B=S(1),M=S(0),z=S(0),J=S(1);v.signum()!=0;){for(;v.isEven();)v.rShiftTo(1,v),d?((!B.isEven()||!M.isEven())&&(B.addTo(this,B),M.subTo(h,M)),B.rShiftTo(1,B)):M.isEven()||M.subTo(h,M),M.rShiftTo(1,M);for(;b.isEven();)b.rShiftTo(1,b),d?((!z.isEven()||!J.isEven())&&(z.addTo(this,z),J.subTo(h,J)),z.rShiftTo(1,z)):J.isEven()||J.subTo(h,J),J.rShiftTo(1,J);v.compareTo(b)>=0?(v.subTo(b,v),d&&B.subTo(z,B),M.subTo(J,M)):(b.subTo(v,b),d&&z.subTo(B,z),J.subTo(M,J))}if(b.compareTo(i.ONE)!=0)return i.ZERO;if(J.compareTo(h)>=0)return J.subtract(h);if(J.signum()<0)J.addTo(h,J);else return J;return J.signum()<0?J.add(h):J}var vt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Jb=(1<<26)/vt[vt.length-1];function Qb(h){var d,v=this.abs();if(v.t==1&&v[0]<=vt[vt.length-1]){for(d=0;d<vt.length;++d)if(v[0]==vt[d])return!0;return!1}if(v.isEven())return!1;for(d=1;d<vt.length;){for(var b=vt[d],B=d+1;B<vt.length&&b<Jb;)b*=vt[B++];for(b=v.modInt(b);d<B;)if(b%vt[d++]==0)return!1}return v.millerRabin(h)}function Xb(h){var d=this.subtract(i.ONE),v=d.getLowestSetBit();if(v<=0)return!1;var b=d.shiftRight(v);h=h+1>>1,h>vt.length&&(h=vt.length);for(var B=n(),M=0;M<h;++M){B.fromInt(vt[Math.floor(Math.random()*vt.length)]);var z=B.modPow(b,this);if(z.compareTo(i.ONE)!=0&&z.compareTo(d)!=0){for(var J=1;J++<v&&z.compareTo(d)!=0;)if(z=z.modPowInt(2,this),z.compareTo(i.ONE)==0)return!1;if(z.compareTo(d)!=0)return!1}}return!0}i.prototype.chunkSize=ae,i.prototype.toRadix=pe,i.prototype.fromRadix=me,i.prototype.fromNumber=Ae,i.prototype.bitwiseTo=X,i.prototype.changeBit=an,i.prototype.addTo=vi,i.prototype.dMultiply=Cl,i.prototype.dAddOffset=yi,i.prototype.multiplyLowerTo=ca,i.prototype.multiplyUpperTo=ua,i.prototype.modInt=Kb,i.prototype.millerRabin=Xb,i.prototype.clone=St,i.prototype.intValue=Lt,i.prototype.byteValue=I,i.prototype.shortValue=te,i.prototype.signum=ne,i.prototype.toByteArray=Ie,i.prototype.equals=Ve,i.prototype.min=Fe,i.prototype.max=j,i.prototype.and=je,i.prototype.or=Se,i.prototype.xor=le,i.prototype.andNot=Ze,i.prototype.not=qe,i.prototype.shiftLeft=Et,i.prototype.shiftRight=jt,i.prototype.getLowestSetBit=Ur,i.prototype.bitCount=hi,i.prototype.testBit=di,i.prototype.setBit=pi,i.prototype.clearBit=mi,i.prototype.flipBit=gi,i.prototype.add=ta,i.prototype.subtract=es,i.prototype.multiply=ra,i.prototype.divide=na,i.prototype.remainder=sa,i.prototype.divideAndRemainder=aa,i.prototype.modPow=zb,i.prototype.modInverse=Zb,i.prototype.pow=la,i.prototype.gcd=Yb,i.prototype.isProbablePrime=Qb,i.prototype.square=ia,i.prototype.Barrett=ur;var da,Bt,tt;function ex(h){Bt[tt++]^=h&255,Bt[tt++]^=h>>8&255,Bt[tt++]^=h>>16&255,Bt[tt++]^=h>>24&255,tt>=Il&&(tt-=Il)}function Ah(){ex(new Date().getTime())}if(Bt==null){Bt=new Array,tt=0;var tr;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var Ih=new Uint8Array(32);for(window.crypto.getRandomValues(Ih),tr=0;tr<32;++tr)Bt[tt++]=Ih[tr]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Nh=window.crypto.random(32);for(tr=0;tr<Nh.length;++tr)Bt[tt++]=Nh.charCodeAt(tr)&255}}for(;tt<Il;)tr=Math.floor(65536*Math.random()),Bt[tt++]=tr>>>8,Bt[tt++]=tr&255;tt=0,Ah()}function tx(){if(da==null){for(Ah(),da=sx(),da.init(Bt),tt=0;tt<Bt.length;++tt)Bt[tt]=0;tt=0}return da.next()}function rx(h){var d;for(d=0;d<h.length;++d)h[d]=tx()}function Tl(){}Tl.prototype.nextBytes=rx;function Al(){this.i=0,this.j=0,this.S=new Array}function ix(h){var d,v,b;for(d=0;d<256;++d)this.S[d]=d;for(v=0,d=0;d<256;++d)v=v+this.S[d]+h[d%h.length]&255,b=this.S[d],this.S[d]=this.S[v],this.S[v]=b;this.i=0,this.j=0}function nx(){var h;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,h=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=h,this.S[h+this.S[this.i]&255]}Al.prototype.init=ix,Al.prototype.next=nx;function sx(){return new Al}var Il=256;typeof Wa!="undefined"?Wa=Ng.exports={default:i,BigInteger:i,SecureRandom:Tl}:this.jsbn={BigInteger:i,SecureRandom:Tl}}).call(Wa)});var cs=w(za=>{(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(a){return i(s(a),arguments)}function t(a,o){return e.apply(null,[a].concat(o||[]))}function i(a,o){var l=1,c=a.length,u,f="",p,m,g,y,_,x,S,O;for(p=0;p<c;p++)if(typeof a[p]=="string")f+=a[p];else if(typeof a[p]=="object"){if(g=a[p],g.keys)for(u=o[l],m=0;m<g.keys.length;m++){if(u==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',g.keys[m],g.keys[m-1]));u=u[g.keys[m]]}else g.param_no?u=o[g.param_no]:u=o[l++];if(r.not_type.test(g.type)&&r.not_primitive.test(g.type)&&u instanceof Function&&(u=u()),r.numeric_arg.test(g.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(e("[sprintf] expecting number but found %T",u));switch(r.number.test(g.type)&&(S=u>=0),g.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,g.width?parseInt(g.width):0);break;case"e":u=g.precision?parseFloat(u).toExponential(g.precision):parseFloat(u).toExponential();break;case"f":u=g.precision?parseFloat(u).toFixed(g.precision):parseFloat(u);break;case"g":u=g.precision?String(Number(u.toPrecision(g.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=g.precision?u.substring(0,g.precision):u;break;case"t":u=String(!!u),u=g.precision?u.substring(0,g.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=g.precision?u.substring(0,g.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=g.precision?u.substring(0,g.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}r.json.test(g.type)?f+=u:(r.number.test(g.type)&&(!S||g.sign)?(O=S?"+":"-",u=u.toString().replace(r.sign,"")):O="",_=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",x=g.width-(O+u).length,y=g.width&&x>0?_.repeat(x):"",f+=g.align?O+u+y:_==="0"?O+y+u:y+O+u)}return f}var n=Object.create(null);function s(a){if(n[a])return n[a];for(var o=a,l,c=[],u=0;o;){if((l=r.text.exec(o))!==null)c.push(l[0]);else if((l=r.modulo.exec(o))!==null)c.push("%");else if((l=r.placeholder.exec(o))!==null){if(l[2]){u|=1;var f=[],p=l[2],m=[];if((m=r.key.exec(p))!==null)for(f.push(m[1]);(p=p.substring(m[0].length))!=="";)if((m=r.key_access.exec(p))!==null)f.push(m[1]);else if((m=r.index_access.exec(p))!==null)f.push(m[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=f}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");o=o.substring(l[0].length)}return n[a]=c}typeof za!="undefined"&&(za.sprintf=e,za.vsprintf=t),typeof window!="undefined"&&(window.sprintf=e,window.vsprintf=t,typeof define=="function"&&define.amd&&define(function(){return{sprintf:e,vsprintf:t}}))})()});var Xc=w(pr=>{"use strict";var NE=pr&&pr.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),LE=pr&&pr.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),Rg=pr&&pr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&NE(e,r,t);return LE(e,r),e};Object.defineProperty(pr,"__esModule",{value:!0});pr.Address4=void 0;var Lg=Rg(Yc()),ar=Rg(Kc()),Bg=Ga(),us=Jc(),En=cs(),Qc=class r{constructor(e){this.groups=ar.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=Lg.isCorrect(ar.BITS),this.isInSubnet=Lg.isInSubnet,this.address=e;let t=ar.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>ar.BITS)throw new Bg.AddressError("Invalid subnet mask.");e=e.replace(ar.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new r(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(!e.match(ar.RE_ADDRESS))throw new Bg.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromHex(e){let t=e.replace(/:/g,"").padStart(8,"0"),i=[],n;for(n=0;n<8;n+=2){let s=t.slice(n,n+2);i.push(parseInt(s,16))}return new r(i.join("."))}static fromInteger(e){return r.fromHex(e.toString(16))}static fromArpa(e){let i=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new r(i)}toHex(){return this.parsedAddress.map(e=>(0,En.sprintf)("%02x",parseInt(e,10))).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<ar.GROUPS;t+=2){let i=(0,En.sprintf)("%02x%02x",parseInt(this.parsedAddress[t],10),parseInt(this.parsedAddress[t+1],10));e.push((0,En.sprintf)("%x",parseInt(i,16)))}return e.join(":")}bigInteger(){return new us.BigInteger(this.parsedAddress.map(e=>(0,En.sprintf)("%02x",parseInt(e,10))).join(""),16)}_startAddress(){return new us.BigInteger(this.mask()+"0".repeat(ar.BITS-this.subnetMask),2)}startAddress(){return r.fromBigInteger(this._startAddress())}startAddressExclusive(){let e=new us.BigInteger("1");return r.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new us.BigInteger(this.mask()+"1".repeat(ar.BITS-this.subnetMask),2)}endAddress(){return r.fromBigInteger(this._endAddress())}endAddressExclusive(){let e=new us.BigInteger("1");return r.fromBigInteger(this._endAddress().subtract(e))}static fromBigInteger(e){return r.fromInteger(parseInt(e.toString(),10))}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:(0,En.sprintf)("%s.in-addr.arpa.",t)}isMulticast(){return this.isInSubnet(new r("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(ar.BITS,"0")}groupForV6(){let e=this.parsedAddress;return this.address.replace(ar.RE_ADDRESS,(0,En.sprintf)('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',e.slice(0,2).join("."),e.slice(2,4).join(".")))}};pr.Address4=Qc});var eu=w(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.RE_URL_WITH_PORT=ze.RE_URL=ze.RE_ZONE_STRING=ze.RE_SUBNET_STRING=ze.RE_BAD_ADDRESS=ze.RE_BAD_CHARACTERS=ze.TYPES=ze.SCOPES=ze.GROUPS=ze.BITS=void 0;ze.BITS=128;ze.GROUPS=8;ze.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};ze.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};ze.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;ze.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;ze.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;ze.RE_ZONE_STRING=/%.*$/;ze.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);ze.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var tu=w(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.simpleGroup=mr.spanLeadingZeroes=mr.spanAll=mr.spanAllZeroes=void 0;var Pg=cs();function Mg(r){return r.replace(/(0+)/g,'<span class="zero">$1</span>')}mr.spanAllZeroes=Mg;function BE(r,e=0){return r.split("").map((i,n)=>(0,Pg.sprintf)('<span class="digit value-%s position-%d">%s</span>',i,n+e,Mg(i))).join("")}mr.spanAll=BE;function Dg(r){return r.replace(/^(0+)/,'<span class="zero">$1</span>')}function RE(r){return r.split(":").map(t=>Dg(t)).join(":")}mr.spanLeadingZeroes=RE;function PE(r,e=0){return r.split(":").map((i,n)=>/group-v4/.test(i)?i:(0,Pg.sprintf)('<span class="hover-group group-%d">%s</span>',n+e,Dg(i)))}mr.simpleGroup=PE});var Fg=w(st=>{"use strict";var ME=st&&st.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),DE=st&&st.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),FE=st&&st.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&ME(e,r,t);return DE(e,r),e};Object.defineProperty(st,"__esModule",{value:!0});st.possibleElisions=st.simpleRegularExpression=st.ADDRESS_BOUNDARY=st.padGroup=st.groupPossibilities=void 0;var qE=FE(eu()),kn=cs();function Ka(r){return(0,kn.sprintf)("(%s)",r.join("|"))}st.groupPossibilities=Ka;function Ya(r){return r.length<4?(0,kn.sprintf)("0{0,%d}%s",4-r.length,r):r}st.padGroup=Ya;st.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function jE(r){let e=[];r.forEach((i,n)=>{parseInt(i,16)===0&&e.push(n)});let t=e.map(i=>r.map((n,s)=>{if(s===i){let a=s===0||s===qE.GROUPS-1?":":"";return Ka([Ya(n),a])}return Ya(n)}).join(":"));return t.push(r.map(Ya).join(":")),Ka(t)}st.simpleRegularExpression=jE;function UE(r,e,t){let i=e?"":":",n=t?"":":",s=[];!e&&!t&&s.push("::"),e&&t&&s.push(""),(t&&!e||!t&&e)&&s.push(":"),s.push((0,kn.sprintf)("%s(:0{1,4}){1,%d}",i,r-1)),s.push((0,kn.sprintf)("(0{1,4}:){1,%d}%s",r-1,n)),s.push((0,kn.sprintf)("(0{1,4}:){%d}0{1,4}",r-1));for(let a=1;a<r-1;a++)for(let o=1;o<r-a;o++)s.push((0,kn.sprintf)("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",o,r-o-a-1));return Ka(s)}st.possibleElisions=UE});var $g=w(gr=>{"use strict";var $E=gr&&gr.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),VE=gr&&gr.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),Ja=gr&&gr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$E(e,r,t);return VE(e,r),e};Object.defineProperty(gr,"__esModule",{value:!0});gr.Address6=void 0;var qg=Ja(Yc()),ru=Ja(Kc()),$e=Ja(eu()),iu=Ja(tu()),ki=Xc(),Oi=Fg(),Nr=Ga(),bt=Jc(),xt=cs();function Za(r){if(!r)throw new Error("Assertion failed.")}function HE(r){let e=/(\d+)(\d{3})/;for(;e.test(r);)r=r.replace(e,"$1,$2");return r}function GE(r){return r=r.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),r=r.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),r}function WE(r,e){let t=[],i=[],n;for(n=0;n<r.length;n++)n<e[0]?t.push(r[n]):n>e[1]&&i.push(r[n]);return t.concat(["compact"]).concat(i)}function jg(r){return(0,xt.sprintf)("%04x",parseInt(r,16))}function Ug(r){return r&255}var nu=class r{constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=qg.isInSubnet,this.isCorrect=qg.isCorrect($e.BITS),t===void 0?this.groups=$e.GROUPS:this.groups=t,this.address=e;let i=$e.RE_SUBNET_STRING.exec(e);if(i){if(this.parsedSubnet=i[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>$e.BITS)throw new Nr.AddressError("Invalid subnet mask.");e=e.replace($e.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new Nr.AddressError("Invalid subnet mask.");let n=$e.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace($e.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new r(e),!0}catch{return!1}}static fromBigInteger(e){let t=e.toString(16).padStart(32,"0"),i=[],n;for(n=0;n<$e.GROUPS;n++)i.push(t.slice(n*4,(n+1)*4));return new r(i.join(":"))}static fromURL(e){let t,i=null,n;if(e.indexOf("[")!==-1&&e.indexOf("]:")!==-1){if(n=$e.RE_URL_WITH_PORT.exec(e),n===null)return{error:"failed to parse address with port",address:null,port:null};t=n[1],i=n[2]}else if(e.indexOf("/")!==-1){if(e=e.replace(/^[a-z0-9]+:\/\//,""),n=$e.RE_URL.exec(e),n===null)return{error:"failed to parse address from URL",address:null,port:null};t=n[1]}else t=e;return i?(i=parseInt(i,10),(i<0||i>65536)&&(i=null)):i=null,{address:new r(t),port:i}}static fromAddress4(e){let t=new ki.Address4(e),i=$e.BITS-(ru.BITS-t.subnetMask);return new r(`::ffff:${t.correctForm()}/${i}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,""),i=7;if(t.length!==63)throw new Nr.AddressError("Invalid 'ip6.arpa' form.");let n=t.split(".").reverse();for(let s=i;s>0;s--){let a=s*4;n.splice(a,0,":")}return t=n.join(""),new r(t)}microsoftTranscription(){return(0,xt.sprintf)("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=$e.BITS-this.subnetMask,i=Math.abs(e-$e.BITS),n=t-i;return n<0?"0":HE(new bt.BigInteger("2",10).pow(n).toString(10))}_startAddress(){return new bt.BigInteger(this.mask()+"0".repeat($e.BITS-this.subnetMask),2)}startAddress(){return r.fromBigInteger(this._startAddress())}startAddressExclusive(){let e=new bt.BigInteger("1");return r.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new bt.BigInteger(this.mask()+"1".repeat($e.BITS-this.subnetMask),2)}endAddress(){return r.fromBigInteger(this._endAddress())}endAddressExclusive(){let e=new bt.BigInteger("1");return r.fromBigInteger(this._endAddress().subtract(e))}getScope(){let e=$e.SCOPES[this.getBits(12,16).intValue()];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys($e.TYPES))if(this.isInSubnet(new r(e)))return $e.TYPES[e];return"Global unicast"}getBits(e,t){return new bt.BigInteger(this.getBitsBase2(e,t),2)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let i=t-e;if(i%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(i/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,$e.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),i=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?i:(0,xt.sprintf)("%s.ip6.arpa.",i):e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],i=0,n=[];for(e=0;e<this.parsedAddress.length;e++){let o=parseInt(this.parsedAddress[e],16);o===0&&i++,o!==0&&i>0&&(i>1&&n.push([e-i,e-1]),i=0)}i>1&&n.push([this.parsedAddress.length-i,this.parsedAddress.length-1]);let s=n.map(o=>o[1]-o[0]+1);if(n.length>0){let o=s.indexOf(Math.max(...s));t=WE(this.parsedAddress,n[o])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let a=t.join(":");return a=a.replace(/^compact$/,"::"),a=a.replace(/^compact|compact$/,":"),a=a.replace(/compact/,""),a}binaryZeroPad(){return this.bigInteger().toString(2).padStart($e.BITS,"0")}parse4in6(e){let t=e.split(":"),n=t.slice(-1)[0].match(ru.RE_ADDRESS);if(n){this.parsedAddress4=n[0],this.address4=new ki.Address4(this.parsedAddress4);for(let s=0;s<this.address4.groups;s++)if(/^0[0-9]+/.test(this.address4.parsedAddress[s]))throw new Nr.AddressError("IPv4 addresses can't have leading zeroes.",e.replace(ru.RE_ADDRESS,this.address4.parsedAddress.map(GE).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match($e.RE_BAD_CHARACTERS);if(t)throw new Nr.AddressError((0,xt.sprintf)("Bad character%s detected in address: %s",t.length>1?"s":"",t.join("")),e.replace($e.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let i=e.match($e.RE_BAD_ADDRESS);if(i)throw new Nr.AddressError((0,xt.sprintf)("Address failed regex: %s",i.join("")),e.replace($e.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let n=[],s=e.split("::");if(s.length===2){let a=s[0].split(":"),o=s[1].split(":");a.length===1&&a[0]===""&&(a=[]),o.length===1&&o[0]===""&&(o=[]);let l=this.groups-(a.length+o.length);if(!l)throw new Nr.AddressError("Error parsing groups");this.elidedGroups=l,this.elisionBegin=a.length,this.elisionEnd=a.length+this.elidedGroups,n=n.concat(a);for(let c=0;c<l;c++)n.push("0");n=n.concat(o)}else if(s.length===1)n=e.split(":"),this.elidedGroups=0;else throw new Nr.AddressError("Too many :: groups found");if(n=n.map(a=>(0,xt.sprintf)("%x",parseInt(a,16))),n.length!==this.groups)throw new Nr.AddressError("Incorrect number of groups found");return n}canonicalForm(){return this.parsedAddress.map(jg).join(":")}decimal(){return this.parsedAddress.map(e=>(0,xt.sprintf)("%05d",parseInt(e,16))).join(":")}bigInteger(){return new bt.BigInteger(this.parsedAddress.map(jg).join(""),16)}to4(){let e=this.binaryZeroPad().split("");return ki.Address4.fromHex(new bt.BigInteger(e.slice(96,128).join(""),2).toString(16))}to4in6(){let e=this.to4(),i=new r(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),n="";return/:$/.test(i)||(n=":"),i+n+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),t=this.getBits(80,96).xor(new bt.BigInteger("ffff",16)).toString(),i=ki.Address4.fromHex(this.getBitsBase16(32,64)),n=ki.Address4.fromHex(this.getBits(96,128).xor(new bt.BigInteger("ffffffff",16)).toString(16)),s=this.getBits(64,80),a=this.getBitsBase2(64,80),o=s.testBit(15),l=s.testBit(14),c=s.testBit(8),u=s.testBit(9),f=new bt.BigInteger(a.slice(2,6)+a.slice(8,16),2).toString(10);return{prefix:(0,xt.sprintf)("%s:%s",e.slice(0,4),e.slice(4,8)),server4:i.address,client4:n.address,flags:a,coneNat:o,microsoft:{reserved:l,universalLocal:u,groupIndividual:c,nonce:f},udpPort:t}}inspect6to4(){let e=this.getBitsBase16(0,16),t=ki.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:(0,xt.sprintf)("%s",e.slice(0,4)),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new r(e)}toByteArray(){let e=this.bigInteger().toByteArray();return e.length===17&&e[0]===0?e.slice(1):e}toUnsignedByteArray(){return this.toByteArray().map(Ug)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(Ug))}static fromUnsignedByteArray(e){let t=new bt.BigInteger("256",10),i=new bt.BigInteger("0",10),n=new bt.BigInteger("1",10);for(let s=e.length-1;s>=0;s--)i=i.add(n.multiply(new bt.BigInteger(e[s].toString(10),10))),n=n.multiply(t);return r.fromBigInteger(i)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new r("2001::/32"))}is6to4(){return this.isInSubnet(new r("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=(0,xt.sprintf)(":%s",e),(0,xt.sprintf)("http://[%s]%s/",this.correctForm(),e)}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;return e.v4&&(t=this.to4in6),e.className?(0,xt.sprintf)('<a href="%1$s%2$s" class="%3$s">%2$s</a>',e.prefix,t.call(this),e.className):(0,xt.sprintf)('<a href="%1$s%2$s">%2$s</a>',e.prefix,t.call(this))}group(){if(this.elidedGroups===0)return iu.simpleGroup(this.address).join(":");Za(typeof this.elidedGroups=="number"),Za(typeof this.elisionBegin=="number");let e=[],[t,i]=this.address.split("::");t.length?e.push(...iu.simpleGroup(t)):e.push("");let n=["hover-group"];for(let s=this.elisionBegin;s<this.elisionBegin+this.elidedGroups;s++)n.push((0,xt.sprintf)("group-%d",s));return e.push((0,xt.sprintf)('<span class="%s"></span>',n.join(" "))),i.length?e.push(...iu.simpleGroup(i,this.elisionEnd)):e.push(""),this.is4()&&(Za(this.address4 instanceof ki.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],i=new r(this.correctForm());if(i.elidedGroups===0)t.push((0,Oi.simpleRegularExpression)(i.parsedAddress));else if(i.elidedGroups===$e.GROUPS)t.push((0,Oi.possibleElisions)($e.GROUPS));else{let n=i.address.split("::");n[0].length&&t.push((0,Oi.simpleRegularExpression)(n[0].split(":"))),Za(typeof i.elidedGroups=="number"),t.push((0,Oi.possibleElisions)(i.elidedGroups,n[0].length!==0,n[1].length!==0)),n[1].length&&t.push((0,Oi.simpleRegularExpression)(n[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",Oi.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",Oi.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};gr.Address6=nu});var su=w(pt=>{"use strict";var zE=pt&&pt.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),YE=pt&&pt.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),KE=pt&&pt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&zE(e,r,t);return YE(e,r),e};Object.defineProperty(pt,"__esModule",{value:!0});pt.v6=pt.AddressError=pt.Address6=pt.Address4=void 0;var ZE=Xc();Object.defineProperty(pt,"Address4",{enumerable:!0,get:function(){return ZE.Address4}});var JE=$g();Object.defineProperty(pt,"Address6",{enumerable:!0,get:function(){return JE.Address6}});var QE=Ga();Object.defineProperty(pt,"AddressError",{enumerable:!0,get:function(){return QE.AddressError}});var XE=KE(tu());pt.v6={helpers:XE}});var Yg=w(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.ipToBuffer=zt.int32ToIpv4=zt.ipv4ToInt32=zt.validateSocksClientChainOptions=zt.validateSocksClientOptions=void 0;var wt=zc(),at=Gc(),ek=require("stream"),au=su(),Vg=require("net");function tk(r,e=["connect","bind","associate"]){if(!at.SocksCommand[r.command])throw new wt.SocksClientError(at.ERRORS.InvalidSocksCommand,r);if(e.indexOf(r.command)===-1)throw new wt.SocksClientError(at.ERRORS.InvalidSocksCommandForOperation,r);if(!Gg(r.destination))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsDestination,r);if(!Wg(r.proxy))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsProxy,r);if(Hg(r.proxy,r),r.timeout&&!zg(r.timeout))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsTimeout,r);if(r.existing_socket&&!(r.existing_socket instanceof ek.Duplex))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsExistingSocket,r)}zt.validateSocksClientOptions=tk;function rk(r){if(r.command!=="connect")throw new wt.SocksClientError(at.ERRORS.InvalidSocksCommandChain,r);if(!Gg(r.destination))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsDestination,r);if(!(r.proxies&&Array.isArray(r.proxies)&&r.proxies.length>=2))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsProxiesLength,r);if(r.proxies.forEach(e=>{if(!Wg(e))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsProxy,r);Hg(e,r)}),r.timeout&&!zg(r.timeout))throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsTimeout,r)}zt.validateSocksClientChainOptions=rk;function Hg(r,e){if(r.custom_auth_method!==void 0){if(r.custom_auth_method<at.SOCKS5_CUSTOM_AUTH_START||r.custom_auth_method>at.SOCKS5_CUSTOM_AUTH_END)throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(r.custom_auth_request_handler===void 0||typeof r.custom_auth_request_handler!="function")throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(r.custom_auth_response_size===void 0)throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(r.custom_auth_response_handler===void 0||typeof r.custom_auth_response_handler!="function")throw new wt.SocksClientError(at.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}function Gg(r){return r&&typeof r.host=="string"&&typeof r.port=="number"&&r.port>=0&&r.port<=65535}function Wg(r){return r&&(typeof r.host=="string"||typeof r.ipaddress=="string")&&typeof r.port=="number"&&r.port>=0&&r.port<=65535&&(r.type===4||r.type===5)}function zg(r){return typeof r=="number"&&r>0}function ik(r){return new au.Address4(r).toArray().reduce((t,i)=>(t<<8)+i,0)}zt.ipv4ToInt32=ik;function nk(r){let e=r>>>24&255,t=r>>>16&255,i=r>>>8&255,n=r&255;return[e,t,i,n].join(".")}zt.int32ToIpv4=nk;function sk(r){if(Vg.isIPv4(r)){let e=new au.Address4(r);return Buffer.from(e.toArray())}else if(Vg.isIPv6(r)){let e=new au.Address6(r);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}zt.ipToBuffer=sk});var Kg=w(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.ReceiveBuffer=void 0;var ou=class{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};Qa.ReceiveBuffer=ou});var Zg=w(zr=>{"use strict";var On=zr&&zr.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(u){try{c(i.next(u))}catch(f){a(f)}}function l(u){try{c(i.throw(u))}catch(f){a(f)}}function c(u){u.done?s(u.value):n(u.value).then(o,l)}c((i=i.apply(r,e||[])).next())})};Object.defineProperty(zr,"__esModule",{value:!0});zr.SocksClientError=zr.SocksClient=void 0;var ak=require("events"),Cn=require("net"),Ct=Eg(),F=Gc(),Ft=Yg(),ok=Kg(),cu=zc();Object.defineProperty(zr,"SocksClientError",{enumerable:!0,get:function(){return cu.SocksClientError}});var lu=su(),uu=class r extends ak.EventEmitter{constructor(e){super(),this.options=Object.assign({},e),(0,Ft.validateSocksClientOptions)(e),this.setState(F.SocksClientState.Created)}static createConnection(e,t){return new Promise((i,n)=>{try{(0,Ft.validateSocksClientOptions)(e,["connect"])}catch(a){return typeof t=="function"?(t(a),i(a)):n(a)}let s=new r(e);s.connect(e.existing_socket),s.once("established",a=>{s.removeAllListeners(),typeof t=="function"&&t(null,a),i(a)}),s.once("error",a=>{s.removeAllListeners(),typeof t=="function"?(t(a),i(a)):n(a)})})}static createConnectionChain(e,t){return new Promise((i,n)=>On(this,void 0,void 0,function*(){try{(0,Ft.validateSocksClientChainOptions)(e)}catch(s){return typeof t=="function"?(t(s),i(s)):n(s)}e.randomizeChain&&(0,cu.shuffleArray)(e.proxies);try{let s;for(let a=0;a<e.proxies.length;a++){let o=e.proxies[a],l=a===e.proxies.length-1?e.destination:{host:e.proxies[a+1].host||e.proxies[a+1].ipaddress,port:e.proxies[a+1].port},c=yield r.createConnection({command:"connect",proxy:o,destination:l,existing_socket:s});s=s||c.socket}typeof t=="function"?(t(null,{socket:s}),i({socket:s})):i({socket:s})}catch(s){typeof t=="function"?(t(s),i(s)):n(s)}}))}static createUDPFrame(e){let t=new Ct.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),Cn.isIPv4(e.remoteHost.host)?(t.writeUInt8(F.Socks5HostType.IPv4),t.writeUInt32BE((0,Ft.ipv4ToInt32)(e.remoteHost.host))):Cn.isIPv6(e.remoteHost.host)?(t.writeUInt8(F.Socks5HostType.IPv6),t.writeBuffer((0,Ft.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(F.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=Ct.SmartBuffer.fromBuffer(e);t.readOffset=2;let i=t.readUInt8(),n=t.readUInt8(),s;n===F.Socks5HostType.IPv4?s=(0,Ft.int32ToIpv4)(t.readUInt32BE()):n===F.Socks5HostType.IPv6?s=lu.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():s=t.readString(t.readUInt8());let a=t.readUInt16BE();return{frameNumber:i,remoteHost:{host:s,port:a},data:t.readBuffer()}}setState(e){this.state!==F.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=i=>this.onDataReceivedHandler(i),this.onClose=()=>this.onCloseHandler(),this.onError=i=>this.onErrorHandler(i),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||F.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new Cn.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(F.SocksClientState.Connecting),this.receiveBuffer=new ok.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",i=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let n=this.receiveBuffer.get(this.receiveBuffer.length);i.socket.emit("data",n)}i.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==F.SocksClientState.Established&&this.state!==F.SocksClientState.BoundWaitingForConnection&&this.closeSocket(F.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(F.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(F.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==F.SocksClientState.Established&&this.state!==F.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===F.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===F.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===F.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===F.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(F.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(F.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==F.SocksClientState.Error&&(this.setState(F.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new cu.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new Ct.SmartBuffer;t.writeUInt8(4),t.writeUInt8(F.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),Cn.isIPv4(this.options.destination.host)?(t.writeBuffer((0,Ft.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==F.Socks4Response.Granted)this.closeSocket(`${F.ERRORS.Socks4ProxyRejectedConnection} - (${F.Socks4Response[e[1]]})`);else if(F.SocksCommand[this.options.command]===F.SocksCommand.bind){let t=Ct.SmartBuffer.fromBuffer(e);t.readOffset=2;let i={port:t.readUInt16BE(),host:(0,Ft.int32ToIpv4)(t.readUInt32BE())};i.host==="0.0.0.0"&&(i.host=this.options.proxy.ipaddress),this.setState(F.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:i,socket:this.socket})}else this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==F.Socks4Response.Granted)this.closeSocket(`${F.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${F.Socks4Response[e[1]]})`);else{let t=Ct.SmartBuffer.fromBuffer(e);t.readOffset=2;let i={port:t.readUInt16BE(),host:(0,Ft.int32ToIpv4)(t.readUInt32BE())};this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:i,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new Ct.SmartBuffer,t=[F.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(F.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let i of t)e.writeUInt8(i);this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(F.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(F.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===F.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(F.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===F.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=F.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===F.Socks5Auth.UserPass?(this.socks5ChosenAuthType=F.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(F.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",i=new Ct.SmartBuffer;i.writeUInt8(1),i.writeUInt8(Buffer.byteLength(e)),i.writeString(e),i.writeUInt8(Buffer.byteLength(t)),i.writeString(t),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(i.toBuffer()),this.setState(F.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return On(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(F.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return On(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return On(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return On(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return On(this,void 0,void 0,function*(){this.setState(F.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===F.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===F.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(F.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new Ct.SmartBuffer;e.writeUInt8(5),e.writeUInt8(F.SocksCommand[this.options.command]),e.writeUInt8(0),Cn.isIPv4(this.options.destination.host)?(e.writeUInt8(F.Socks5HostType.IPv4),e.writeBuffer((0,Ft.ipToBuffer)(this.options.destination.host))):Cn.isIPv6(this.options.destination.host)?(e.writeUInt8(F.Socks5HostType.IPv6),e.writeBuffer((0,Ft.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(F.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(F.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==F.Socks5Response.Granted)this.closeSocket(`${F.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${F.Socks5Response[e[1]]}`);else{let t=e[3],i,n;if(t===F.Socks5HostType.IPv4){let s=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=Ct.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),i={host:(0,Ft.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},i.host==="0.0.0.0"&&(i.host=this.options.proxy.ipaddress)}else if(t===F.Socks5HostType.Hostname){let s=e[4],a=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}n=Ct.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),i={host:n.readString(s),port:n.readUInt16BE()}}else if(t===F.Socks5HostType.IPv6){let s=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=Ct.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),i={host:lu.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(F.SocksClientState.ReceivedFinalResponse),F.SocksCommand[this.options.command]===F.SocksCommand.connect?(this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:i,socket:this.socket})):F.SocksCommand[this.options.command]===F.SocksCommand.bind?(this.setState(F.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:i,socket:this.socket})):F.SocksCommand[this.options.command]===F.SocksCommand.associate&&(this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:i,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==F.Socks5Response.Granted)this.closeSocket(`${F.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${F.Socks5Response[e[1]]}`);else{let t=e[3],i,n;if(t===F.Socks5HostType.IPv4){let s=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=Ct.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),i={host:(0,Ft.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},i.host==="0.0.0.0"&&(i.host=this.options.proxy.ipaddress)}else if(t===F.Socks5HostType.Hostname){let s=e[4],a=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}n=Ct.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),i={host:n.readString(s),port:n.readUInt16BE()}}else if(t===F.Socks5HostType.IPv6){let s=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=Ct.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),i={host:lu.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:i,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};zr.SocksClient=uu});var Jg=w(Ci=>{"use strict";var lk=Ci&&Ci.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),ck=Ci&&Ci.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&lk(e,r,t)};Object.defineProperty(Ci,"__esModule",{value:!0});ck(Zg(),Ci)});var Qg=w(Yt=>{"use strict";var uk=Yt&&Yt.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,n)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),fk=Yt&&Yt.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),fu=Yt&&Yt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&uk(e,r,t);return fk(e,r),e},hk=Yt&&Yt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.SocksProxyAgent=void 0;var dk=Jg(),pk=Zl(),mk=hk(ts()),gk=fu(require("dns")),vk=fu(require("net")),yk=fu(require("tls")),_k=require("url"),Xa=(0,mk.default)("socks-proxy-agent"),bk=r=>r.servername===void 0&&r.host&&!vk.isIP(r.host)?{...r,servername:r.host}:r;function xk(r){let e=!1,t=5,i=r.hostname,n=parseInt(r.port,10)||1080;switch(r.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(r.protocol)}`)}let s={host:i,port:n,type:t};return r.username&&Object.defineProperty(s,"userId",{value:decodeURIComponent(r.username),enumerable:!1}),r.password!=null&&Object.defineProperty(s,"password",{value:decodeURIComponent(r.password),enumerable:!1}),{lookup:e,proxy:s}}var eo=class extends pk.Agent{constructor(e,t){var a,o;super(t);let i=typeof e=="string"?new _k.URL(e):e,{proxy:n,lookup:s}=xk(i);this.shouldLookup=s,this.proxy=n,this.timeout=(a=t==null?void 0:t.timeout)!=null?a:null,this.socketOptions=(o=t==null?void 0:t.socketOptions)!=null?o:null}async connect(e,t){var p;let{shouldLookup:i,proxy:n,timeout:s}=this;if(!t.host)throw new Error("No `host` defined!");let{host:a}=t,{port:o,lookup:l=gk.lookup}=t;i&&(a=await new Promise((m,g)=>{l(a,{},(y,_)=>{y?g(y):m(_)})}));let c={proxy:n,destination:{host:a,port:typeof o=="number"?o:parseInt(o,10)},command:"connect",timeout:s!=null?s:void 0,socket_options:(p=this.socketOptions)!=null?p:void 0},u=m=>{e.destroy(),f.destroy(),m&&m.destroy()};Xa("Creating socks proxy connection: %o",c);let{socket:f}=await dk.SocksClient.createConnection(c);if(Xa("Successfully created socks proxy connection"),s!==null&&(f.setTimeout(s),f.on("timeout",()=>u())),t.secureEndpoint){Xa("Upgrading socket connection to TLS");let m=yk.connect({...wk(bk(t),"host","path","port"),socket:f});return m.once("error",g=>{Xa("Socket TLS error",g.message),u(m)}),m}return f}};eo.protocols=["socks","socks4","socks4a","socks5","socks5h"];Yt.SocksProxyAgent=eo;function wk(r,...e){let t={},i;for(i in r)e.includes(i)||(t[i]=r[i]);return t}});var rv=w((UB,tv)=>{"use strict";var{Duplex:Sk}=require("stream");function Xg(r){r.emit("close")}function Ek(){!this.destroyed&&this._writableState.finished&&this.destroy()}function ev(r){this.removeListener("error",ev),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function kk(r,e){let t=!0,i=new Sk({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(s,a){let o=!a&&i._readableState.objectMode?s.toString():s;i.push(o)||r.pause()}),r.once("error",function(s){i.destroyed||(t=!1,i.destroy(s))}),r.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,s){if(r.readyState===r.CLOSED){s(n),process.nextTick(Xg,i);return}let a=!1;r.once("error",function(l){a=!0,s(l)}),r.once("close",function(){a||s(n),process.nextTick(Xg,i)}),t&&r.terminate()},i._final=function(n){if(r.readyState===r.CONNECTING){r.once("open",function(){i._final(n)});return}r._socket!==null&&(r._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(r._socket.once("finish",function(){n()}),r.close()))},i._read=function(){r.isPaused&&r.resume()},i._write=function(n,s,a){if(r.readyState===r.CONNECTING){r.once("open",function(){i._write(n,s,a)});return}r.send(n,a)},i.on("end",Ek),i.on("error",ev),i}tv.exports=kk});var Yr=w(($B,iv)=>{"use strict";iv.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var fs=w((VB,to)=>{"use strict";var{EMPTY_BUFFER:Ok}=Yr(),hu=Buffer[Symbol.species];function Ck(r,e){if(r.length===0)return Ok;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),i=0;for(let n=0;n<r.length;n++){let s=r[n];t.set(s,i),i+=s.length}return i<e?new hu(t.buffer,t.byteOffset,i):t}function nv(r,e,t,i,n){for(let s=0;s<n;s++)t[i+s]=r[s]^e[s&3]}function sv(r,e){for(let t=0;t<r.length;t++)r[t]^=e[t&3]}function Tk(r){return r.length===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function du(r){if(du.readOnly=!0,Buffer.isBuffer(r))return r;let e;return r instanceof ArrayBuffer?e=new hu(r):ArrayBuffer.isView(r)?e=new hu(r.buffer,r.byteOffset,r.byteLength):(e=Buffer.from(r),du.readOnly=!1),e}to.exports={concat:Ck,mask:nv,toArrayBuffer:Tk,toBuffer:du,unmask:sv};if(!process.env.WS_NO_BUFFER_UTIL)try{let r=require("bufferutil");to.exports.mask=function(e,t,i,n,s){s<48?nv(e,t,i,n,s):r.mask(e,t,i,n,s)},to.exports.unmask=function(e,t){e.length<32?sv(e,t):r.unmask(e,t)}}catch{}});var lv=w((HB,ov)=>{"use strict";var av=Symbol("kDone"),pu=Symbol("kRun"),mu=class{constructor(e){this[av]=()=>{this.pending--,this[pu]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[pu]()}[pu](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[av])}}};ov.exports=mu});var ps=w((GB,hv)=>{"use strict";var hs=require("zlib"),cv=fs(),Ak=lv(),{kStatusCode:uv}=Yr(),Ik=Buffer[Symbol.species],Nk=Buffer.from([0,0,255,255]),no=Symbol("permessage-deflate"),Lr=Symbol("total-length"),ds=Symbol("callback"),Kr=Symbol("buffers"),io=Symbol("error"),ro,gu=class{constructor(e,t,i){if(this._maxPayload=i|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!ro){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ro=new Ak(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[ds];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,i=e.find(n=>!(t.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>n.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(i.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?i.client_max_window_bits=t.clientMaxWindowBits:(i.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(i=>{let n=t[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=s}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);t[i]=n})}),e}decompress(e,t,i){ro.add(n=>{this._decompress(e,t,(s,a)=>{n(),i(s,a)})})}compress(e,t,i){ro.add(n=>{this._compress(e,t,(s,a)=>{n(),i(s,a)})})}_decompress(e,t,i){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,a=typeof this.params[s]!="number"?hs.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=hs.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[no]=this,this._inflate[Lr]=0,this._inflate[Kr]=[],this._inflate.on("error",Bk),this._inflate.on("data",fv)}this._inflate[ds]=i,this._inflate.write(e),t&&this._inflate.write(Nk),this._inflate.flush(()=>{let s=this._inflate[io];if(s){this._inflate.close(),this._inflate=null,i(s);return}let a=cv.concat(this._inflate[Kr],this._inflate[Lr]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Lr]=0,this._inflate[Kr]=[],t&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,a)})}_compress(e,t,i){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,a=typeof this.params[s]!="number"?hs.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=hs.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[Lr]=0,this._deflate[Kr]=[],this._deflate.on("data",Lk)}this._deflate[ds]=i,this._deflate.write(e),this._deflate.flush(hs.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=cv.concat(this._deflate[Kr],this._deflate[Lr]);t&&(s=new Ik(s.buffer,s.byteOffset,s.length-4)),this._deflate[ds]=null,this._deflate[Lr]=0,this._deflate[Kr]=[],t&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,s)})}};hv.exports=gu;function Lk(r){this[Kr].push(r),this[Lr]+=r.length}function fv(r){if(this[Lr]+=r.length,this[no]._maxPayload<1||this[Lr]<=this[no]._maxPayload){this[Kr].push(r);return}this[io]=new RangeError("Max payload size exceeded"),this[io].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[io][uv]=1009,this.removeListener("data",fv),this.reset()}function Bk(r){this[no]._inflate=null,r[uv]=1007,this[ds](r)}});var ms=w((WB,so)=>{"use strict";var{isUtf8:dv}=require("buffer"),Rk=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Pk(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function vu(r){let e=r.length,t=0;for(;t<e;)if((r[t]&128)===0)t++;else if((r[t]&224)===192){if(t+1===e||(r[t+1]&192)!==128||(r[t]&254)===192)return!1;t+=2}else if((r[t]&240)===224){if(t+2>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||r[t]===224&&(r[t+1]&224)===128||r[t]===237&&(r[t+1]&224)===160)return!1;t+=3}else if((r[t]&248)===240){if(t+3>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||(r[t+3]&192)!==128||r[t]===240&&(r[t+1]&240)===128||r[t]===244&&r[t+1]>143||r[t]>244)return!1;t+=4}else return!1;return!0}so.exports={isValidStatusCode:Pk,isValidUTF8:vu,tokenChars:Rk};if(dv)so.exports.isValidUTF8=function(r){return r.length<24?vu(r):dv(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=require("utf-8-validate");so.exports.isValidUTF8=function(e){return e.length<32?vu(e):r(e)}}catch{}});var wu=w((zB,bv)=>{"use strict";var{Writable:Mk}=require("stream"),pv=ps(),{BINARY_TYPES:Dk,EMPTY_BUFFER:mv,kStatusCode:Fk,kWebSocket:qk}=Yr(),{concat:yu,toArrayBuffer:jk,unmask:Uk}=fs(),{isValidStatusCode:$k,isValidUTF8:gv}=ms(),ao=Buffer[Symbol.species],Kt=0,vv=1,yv=2,_v=3,_u=4,bu=5,oo=6,xu=class extends Mk{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Dk[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[qk]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Kt}_write(e,t,i){if(this._opcode===8&&this._state==Kt)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new ao(i.buffer,i.byteOffset+e,i.length-e),new ao(i.buffer,i.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],n=t.length-e;e>=i.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),n),this._buffers[0]=new ao(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case Kt:this.getInfo(e);break;case vv:this.getPayloadLength16(e);break;case yv:this.getPayloadLength64(e);break;case _v:this.getMask();break;case _u:this.getData(e);break;case bu:case oo:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let i=(t[0]&64)===64;if(i&&!this._extensions[pv.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=vv:this._payloadLength===127?this._state=yv:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),i=t.readUInt32BE(0);if(i>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=i*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=_v:this._state=_u}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=_u}getData(e){let t=mv;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&Uk(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=bu,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[pv.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return t(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(a);return}this._fragments.push(s)}this.dataMessage(t),this._state===Kt&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=Kt;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=yu(i,t):this._binaryType==="arraybuffer"?n=jk(yu(i,t)):n=i,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=Kt):(this._state=oo,setImmediate(()=>{this.emit("message",n,!0),this._state=Kt,this.startLoop(e)}))}else{let n=yu(i,t);if(!this._skipUTF8Validation&&!gv(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===bu||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=Kt):(this._state=oo,setImmediate(()=>{this.emit("message",n,!1),this._state=Kt,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,mv),this.end();else{let i=e.readUInt16BE(0);if(!$k(i)){let s=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let n=new ao(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!gv(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",i,n),this.end()}this._state=Kt;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Kt):(this._state=oo,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Kt,this.startLoop(t)}))}createError(e,t,i,n,s){this._loop=!1,this._errored=!0;let a=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=s,a[Fk]=n,a}};bv.exports=xu});var Eu=w((KB,Sv)=>{"use strict";var{Duplex:YB}=require("stream"),{randomFillSync:Vk}=require("crypto"),xv=ps(),{EMPTY_BUFFER:Hk}=Yr(),{isValidStatusCode:Gk}=ms(),{mask:wv,toBuffer:Tn}=fs(),or=Symbol("kByteLength"),Wk=Buffer.alloc(4),lo=8*1024,Ti,An=lo,Su=class r{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let i,n=!1,s=2,a=!1;t.mask&&(i=t.maskBuffer||Wk,t.generateMask?t.generateMask(i):(An===lo&&(Ti===void 0&&(Ti=Buffer.alloc(lo)),Vk(Ti,0,lo),An=0),i[0]=Ti[An++],i[1]=Ti[An++],i[2]=Ti[An++],i[3]=Ti[An++]),a=(i[0]|i[1]|i[2]|i[3])===0,s=6);let o;typeof e=="string"?(!t.mask||a)&&t[or]!==void 0?o=t[or]:(e=Buffer.from(e),o=e.length):(o=e.length,n=t.mask&&t.readOnly&&!a);let l=o;o>=65536?(s+=8,l=127):o>125&&(s+=2,l=126);let c=Buffer.allocUnsafe(n?o+s:s);return c[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(c[0]|=64),c[1]=l,l===126?c.writeUInt16BE(o,2):l===127&&(c[2]=c[3]=0,c.writeUIntBE(o,4,6)),t.mask?(c[1]|=128,c[s-4]=i[0],c[s-3]=i[1],c[s-2]=i[2],c[s-1]=i[3],a?[c,e]:n?(wv(e,i,c,s,o),[c]):(wv(e,i,e,0,o),[c,e])):[c,e]}close(e,t,i,n){let s;if(e===void 0)s=Hk;else{if(typeof e!="number"||!Gk(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let o=Buffer.byteLength(t);if(o>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+o),s.writeUInt16BE(e,0),typeof t=="string"?s.write(t,2):s.set(t,2)}}let a={[or]:s.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,a,n]):this.sendFrame(r.frame(s,a),n)}ping(e,t,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Tn(e),n=e.length,s=Tn.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[or]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,a,i]):this.sendFrame(r.frame(e,a),i)}pong(e,t,i){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Tn(e),n=e.length,s=Tn.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[or]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,a,i]):this.sendFrame(r.frame(e,a),i)}send(e,t,i){let n=this._extensions[xv.extensionName],s=t.binary?2:1,a=t.compress,o,l;if(typeof e=="string"?(o=Buffer.byteLength(e),l=!1):(e=Tn(e),o=e.length,l=Tn.readOnly),this._firstFragment?(this._firstFragment=!1,a&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=n._threshold),this._compress=a):(a=!1,s=0),t.fin&&(this._firstFragment=!0),n){let c={[or]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:a};this._deflating?this.enqueue([this.dispatch,e,this._compress,c,i]):this.dispatch(e,this._compress,c,i)}else this.sendFrame(r.frame(e,{[or]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:!1}),i)}dispatch(e,t,i,n){if(!t){this.sendFrame(r.frame(e,i),n);return}let s=this._extensions[xv.extensionName];this._bufferedBytes+=i[or],this._deflating=!0,s.compress(e,i.fin,(a,o)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(l);for(let c=0;c<this._queue.length;c++){let u=this._queue[c],f=u[u.length-1];typeof f=="function"&&f(l)}return}this._bufferedBytes-=i[or],this._deflating=!1,i.readOnly=!1,this.sendFrame(r.frame(o,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][or],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][or],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Sv.exports=Su});var Lv=w((ZB,Nv)=>{"use strict";var{kForOnEventAttribute:gs,kListener:ku}=Yr(),Ev=Symbol("kCode"),kv=Symbol("kData"),Ov=Symbol("kError"),Cv=Symbol("kMessage"),Tv=Symbol("kReason"),In=Symbol("kTarget"),Av=Symbol("kType"),Iv=Symbol("kWasClean"),Br=class{constructor(e){this[In]=null,this[Av]=e}get target(){return this[In]}get type(){return this[Av]}};Object.defineProperty(Br.prototype,"target",{enumerable:!0});Object.defineProperty(Br.prototype,"type",{enumerable:!0});var Ai=class extends Br{constructor(e,t={}){super(e),this[Ev]=t.code===void 0?0:t.code,this[Tv]=t.reason===void 0?"":t.reason,this[Iv]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Ev]}get reason(){return this[Tv]}get wasClean(){return this[Iv]}};Object.defineProperty(Ai.prototype,"code",{enumerable:!0});Object.defineProperty(Ai.prototype,"reason",{enumerable:!0});Object.defineProperty(Ai.prototype,"wasClean",{enumerable:!0});var Nn=class extends Br{constructor(e,t={}){super(e),this[Ov]=t.error===void 0?null:t.error,this[Cv]=t.message===void 0?"":t.message}get error(){return this[Ov]}get message(){return this[Cv]}};Object.defineProperty(Nn.prototype,"error",{enumerable:!0});Object.defineProperty(Nn.prototype,"message",{enumerable:!0});var vs=class extends Br{constructor(e,t={}){super(e),this[kv]=t.data===void 0?null:t.data}get data(){return this[kv]}};Object.defineProperty(vs.prototype,"data",{enumerable:!0});var zk={addEventListener(r,e,t={}){for(let n of this.listeners(r))if(!t[gs]&&n[ku]===e&&!n[gs])return;let i;if(r==="message")i=function(s,a){let o=new vs("message",{data:a?s:s.toString()});o[In]=this,co(e,this,o)};else if(r==="close")i=function(s,a){let o=new Ai("close",{code:s,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});o[In]=this,co(e,this,o)};else if(r==="error")i=function(s){let a=new Nn("error",{error:s,message:s.message});a[In]=this,co(e,this,a)};else if(r==="open")i=function(){let s=new Br("open");s[In]=this,co(e,this,s)};else return;i[gs]=!!t[gs],i[ku]=e,t.once?this.once(r,i):this.on(r,i)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[ku]===e&&!t[gs]){this.removeListener(r,t);break}}};Nv.exports={CloseEvent:Ai,ErrorEvent:Nn,Event:Br,EventTarget:zk,MessageEvent:vs};function co(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var Ou=w((JB,Bv)=>{"use strict";var{tokenChars:ys}=ms();function vr(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function Yk(r){let e=Object.create(null),t=Object.create(null),i=!1,n=!1,s=!1,a,o,l=-1,c=-1,u=-1,f=0;for(;f<r.length;f++)if(c=r.charCodeAt(f),a===void 0)if(u===-1&&ys[c]===1)l===-1&&(l=f);else if(f!==0&&(c===32||c===9))u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let m=r.slice(l,u);c===44?(vr(e,m,t),t=Object.create(null)):a=m,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(o===void 0)if(u===-1&&ys[c]===1)l===-1&&(l=f);else if(c===32||c===9)u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f),vr(t,r.slice(l,u),!0),c===44&&(vr(e,a,t),t=Object.create(null),a=void 0),l=u=-1}else if(c===61&&l!==-1&&u===-1)o=r.slice(l,f),l=u=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(n){if(ys[c]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);l===-1?l=f:i||(i=!0),n=!1}else if(s)if(ys[c]===1)l===-1&&(l=f);else if(c===34&&l!==-1)s=!1,u=f;else if(c===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(c===34&&r.charCodeAt(f-1)===61)s=!0;else if(u===-1&&ys[c]===1)l===-1&&(l=f);else if(l!==-1&&(c===32||c===9))u===-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let m=r.slice(l,u);i&&(m=m.replace(/\\/g,""),i=!1),vr(t,o,m),c===44&&(vr(e,a,t),t=Object.create(null),a=void 0),o=void 0,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(l===-1||s||c===32||c===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=f);let p=r.slice(l,u);return a===void 0?vr(e,p,t):(o===void 0?vr(t,p,!0):i?vr(t,o,p.replace(/\\/g,"")):vr(t,o,p),vr(e,a,t)),e}function Kk(r){return Object.keys(r).map(e=>{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(i=>[e].concat(Object.keys(i).map(n=>{let s=i[n];return Array.isArray(s)||(s=[s]),s.map(a=>a===!0?n:`${n}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Bv.exports={format:Kk,parse:Yk}});var Nu=w((eR,Hv)=>{"use strict";var Zk=require("events"),Jk=require("https"),Qk=require("http"),Mv=require("net"),Xk=require("tls"),{randomBytes:eO,createHash:tO}=require("crypto"),{Duplex:QB,Readable:XB}=require("stream"),{URL:Cu}=require("url"),Zr=ps(),rO=wu(),iO=Eu(),{BINARY_TYPES:Rv,EMPTY_BUFFER:uo,GUID:nO,kForOnEventAttribute:Tu,kListener:sO,kStatusCode:aO,kWebSocket:mt,NOOP:Dv}=Yr(),{EventTarget:{addEventListener:oO,removeEventListener:lO}}=Lv(),{format:cO,parse:uO}=Ou(),{toBuffer:fO}=fs(),hO=30*1e3,Fv=Symbol("kAborted"),Au=[8,13],Rr=["CONNECTING","OPEN","CLOSING","CLOSED"],dO=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Ye=class r extends Zk{constructor(e,t,i){super(),this._binaryType=Rv[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=uo,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=r.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(i=t,t=[]):t=[t]),qv(this,e,t,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Rv.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,i){let n=new rO({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new iO(e,this._extensions,i.generateMask),this._receiver=n,this._socket=e,n[mt]=this,e[mt]=this,n.on("conclude",gO),n.on("drain",vO),n.on("error",yO),n.on("message",_O),n.on("ping",bO),n.on("pong",xO),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Uv),e.on("data",ho),e.on("end",$v),e.on("error",Vv),this._readyState=r.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Zr.extensionName]&&this._extensions[Zr.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){qt(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===r.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=r.CLOSING,this._sender.close(e,t,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),hO)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Iu(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||uo,t,i)}pong(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Iu(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||uo,t,i)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(i=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Iu(this,e,i);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Zr.extensionName]||(n.compress=!1),this._sender.send(e||uo,n,i)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){qt(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(Ye,"CONNECTING",{enumerable:!0,value:Rr.indexOf("CONNECTING")});Object.defineProperty(Ye.prototype,"CONNECTING",{enumerable:!0,value:Rr.indexOf("CONNECTING")});Object.defineProperty(Ye,"OPEN",{enumerable:!0,value:Rr.indexOf("OPEN")});Object.defineProperty(Ye.prototype,"OPEN",{enumerable:!0,value:Rr.indexOf("OPEN")});Object.defineProperty(Ye,"CLOSING",{enumerable:!0,value:Rr.indexOf("CLOSING")});Object.defineProperty(Ye.prototype,"CLOSING",{enumerable:!0,value:Rr.indexOf("CLOSING")});Object.defineProperty(Ye,"CLOSED",{enumerable:!0,value:Rr.indexOf("CLOSED")});Object.defineProperty(Ye.prototype,"CLOSED",{enumerable:!0,value:Rr.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(Ye.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(Ye.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[Tu])return e[sO];return null},set(e){for(let t of this.listeners(r))if(t[Tu]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[Tu]:!0})}})});Ye.prototype.addEventListener=oO;Ye.prototype.removeEventListener=lO;Hv.exports=Ye;function qv(r,e,t,i){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Au[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(r._autoPong=n.autoPong,!Au.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Au.join(", ")})`);let s;if(e instanceof Cu)s=e;else try{s=new Cu(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),r._url=s.href;let a=s.protocol==="wss:",o=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!a&&!o?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:o&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let y=new SyntaxError(l);if(r._redirects===0)throw y;fo(r,y);return}let c=a?443:80,u=eO(16).toString("base64"),f=a?Jk.request:Qk.request,p=new Set,m;if(n.createConnection=n.createConnection||(a?mO:pO),n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(m=new Zr(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=cO({[Zr.extensionName]:m.offer()})),t.length){for(let y of t){if(typeof y!="string"||!dO.test(y)||p.has(y))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.add(y)}n.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),o){let y=n.path.split(":");n.socketPath=y[0],n.path=y[1]}let g;if(n.followRedirects){if(r._redirects===0){r._originalIpc=o,r._originalSecure=a,r._originalHostOrSocketPath=o?n.socketPath:s.host;let y=i&&i.headers;if(i={...i,headers:{}},y)for(let[_,x]of Object.entries(y))i.headers[_.toLowerCase()]=x}else if(r.listenerCount("redirect")===0){let y=o?r._originalIpc?n.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:s.host===r._originalHostOrSocketPath;(!y||r._originalSecure&&!a)&&(delete n.headers.authorization,delete n.headers.cookie,y||delete n.headers.host,n.auth=void 0)}n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),g=r._req=f(n),r._redirects&&r.emit("redirect",r.url,g)}else g=r._req=f(n);n.timeout&&g.on("timeout",()=>{qt(r,g,"Opening handshake has timed out")}),g.on("error",y=>{g===null||g[Fv]||(g=r._req=null,fo(r,y))}),g.on("response",y=>{let _=y.headers.location,x=y.statusCode;if(_&&n.followRedirects&&x>=300&&x<400){if(++r._redirects>n.maxRedirects){qt(r,g,"Maximum redirects exceeded");return}g.abort();let S;try{S=new Cu(_,e)}catch{let k=new SyntaxError(`Invalid URL: ${_}`);fo(r,k);return}qv(r,S,t,i)}else r.emit("unexpected-response",g,y)||qt(r,g,`Unexpected server response: ${y.statusCode}`)}),g.on("upgrade",(y,_,x)=>{if(r.emit("upgrade",y),r.readyState!==Ye.CONNECTING)return;g=r._req=null;let S=y.headers.upgrade;if(S===void 0||S.toLowerCase()!=="websocket"){qt(r,_,"Invalid Upgrade header");return}let O=tO("sha1").update(u+nO).digest("base64");if(y.headers["sec-websocket-accept"]!==O){qt(r,_,"Invalid Sec-WebSocket-Accept header");return}let k=y.headers["sec-websocket-protocol"],E;if(k!==void 0?p.size?p.has(k)||(E="Server sent an invalid subprotocol"):E="Server sent a subprotocol but none was requested":p.size&&(E="Server sent no subprotocol"),E){qt(r,_,E);return}k&&(r._protocol=k);let R=y.headers["sec-websocket-extensions"];if(R!==void 0){if(!m){qt(r,_,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let T;try{T=uO(R)}catch{qt(r,_,"Invalid Sec-WebSocket-Extensions header");return}let A=Object.keys(T);if(A.length!==1||A[0]!==Zr.extensionName){qt(r,_,"Server indicated an extension that was not requested");return}try{m.accept(T[Zr.extensionName])}catch{qt(r,_,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[Zr.extensionName]=m}r.setSocket(_,x,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(g,r):g.end()}function fo(r,e){r._readyState=Ye.CLOSING,r.emit("error",e),r.emitClose()}function pO(r){return r.path=r.socketPath,Mv.connect(r)}function mO(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=Mv.isIP(r.host)?"":r.host),Xk.connect(r)}function qt(r,e,t){r._readyState=Ye.CLOSING;let i=new Error(t);Error.captureStackTrace(i,qt),e.setHeader?(e[Fv]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(fo,r,i)):(e.destroy(i),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function Iu(r,e,t){if(e){let i=fO(e).length;r._socket?r._sender._bufferedBytes+=i:r._bufferedAmount+=i}if(t){let i=new Error(`WebSocket is not open: readyState ${r.readyState} (${Rr[r.readyState]})`);process.nextTick(t,i)}}function gO(r,e){let t=this[mt];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[mt]!==void 0&&(t._socket.removeListener("data",ho),process.nextTick(jv,t._socket),r===1005?t.close():t.close(r,e))}function vO(){let r=this[mt];r.isPaused||r._socket.resume()}function yO(r){let e=this[mt];e._socket[mt]!==void 0&&(e._socket.removeListener("data",ho),process.nextTick(jv,e._socket),e.close(r[aO])),e.emit("error",r)}function Pv(){this[mt].emitClose()}function _O(r,e){this[mt].emit("message",r,e)}function bO(r){let e=this[mt];e._autoPong&&e.pong(r,!this._isServer,Dv),e.emit("ping",r)}function xO(r){this[mt].emit("pong",r)}function jv(r){r.resume()}function Uv(){let r=this[mt];this.removeListener("close",Uv),this.removeListener("data",ho),this.removeListener("end",$v),r._readyState=Ye.CLOSING;let e;!this._readableState.endEmitted&&!r._closeFrameReceived&&!r._receiver._writableState.errorEmitted&&(e=r._socket.read())!==null&&r._receiver.write(e),r._receiver.end(),this[mt]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",Pv),r._receiver.on("finish",Pv))}function ho(r){this[mt]._receiver.write(r)||this.pause()}function $v(){let r=this[mt];r._readyState=Ye.CLOSING,r._receiver.end(),this.end()}function Vv(){let r=this[mt];this.removeListener("error",Vv),this.on("error",Dv),r&&(r._readyState=Ye.CLOSING,this.destroy())}});var Wv=w((tR,Gv)=>{"use strict";var{tokenChars:wO}=ms();function SO(r){let e=new Set,t=-1,i=-1,n=0;for(n;n<r.length;n++){let a=r.charCodeAt(n);if(i===-1&&wO[a]===1)t===-1&&(t=n);else if(n!==0&&(a===32||a===9))i===-1&&t!==-1&&(i=n);else if(a===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let o=r.slice(t,i);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);e.add(o),t=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(t===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let s=r.slice(t,n);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}Gv.exports={parse:SO}});var Xv=w((iR,Qv)=>{"use strict";var EO=require("events"),po=require("http"),{Duplex:rR}=require("stream"),{createHash:kO}=require("crypto"),zv=Ou(),Ii=ps(),OO=Wv(),CO=Nu(),{GUID:TO,kWebSocket:AO}=Yr(),IO=/^[+/0-9A-Za-z]{22}==$/,Yv=0,Kv=1,Jv=2,Lu=class extends EO{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:CO,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=po.createServer((i,n)=>{let s=po.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=NO(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,a)=>{this.handleUpgrade(n,s,a,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Yv}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Jv){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(_s,this);return}if(e&&this.once("close",e),this._state!==Kv)if(this._state=Kv,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(_s,this):process.nextTick(_s,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{_s(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,i,n){t.on("error",Zv);let s=e.headers["sec-websocket-key"],a=e.headers.upgrade,o=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ni(this,e,t,405,"Invalid HTTP method");return}if(a===void 0||a.toLowerCase()!=="websocket"){Ni(this,e,t,400,"Invalid Upgrade header");return}if(s===void 0||!IO.test(s)){Ni(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(o!==8&&o!==13){Ni(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){bs(t,400);return}let l=e.headers["sec-websocket-protocol"],c=new Set;if(l!==void 0)try{c=OO.parse(l)}catch{Ni(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&u!==void 0){let p=new Ii(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let m=zv.parse(u);m[Ii.extensionName]&&(p.accept(m[Ii.extensionName]),f[Ii.extensionName]=p)}catch{Ni(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let p={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(p,(m,g,y,_)=>{if(!m)return bs(t,g||401,y,_);this.completeUpgrade(f,s,c,e,t,i,n)});return}if(!this.options.verifyClient(p))return bs(t,401)}this.completeUpgrade(f,s,c,e,t,i,n)}completeUpgrade(e,t,i,n,s,a,o){if(!s.readable||!s.writable)return s.destroy();if(s[AO])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Yv)return bs(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${kO("sha1").update(t+TO).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(i.size){let f=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;f&&(c.push(`Sec-WebSocket-Protocol: ${f}`),u._protocol=f)}if(e[Ii.extensionName]){let f=e[Ii.extensionName].params,p=zv.format({[Ii.extensionName]:[f]});c.push(`Sec-WebSocket-Extensions: ${p}`),u._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r
40
+ `),this.outputHelp({error:!0}));let r=t||{},n=r.exitCode||1,s=r.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Oe.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Oe.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new R1(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,r.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(f=>f.negate&&a===f.attributeName()),u=this.options.find(f=>!f.negate&&a===f.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||o},n=o=>{let a=r(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=ym(e,n)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=ym(e,n)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
41
+ `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var n;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=(n=this.parent)==null?void 0:n._findCommand(e);if(r){let s=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>B1(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=li.basename(e,li.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let n=t.formatHelp(this,t);return r.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,r,n,s;return t?(r=a=>this._outputConfiguration.writeErr(a),n=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),n=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(n||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:n,helpWidth:s}}outputHelp(e){var o;let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),n={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let s=this.helpInformation({error:r.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),(o=this._getHelpOption())!=null&&o.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(e,t){var r;return typeof e=="boolean"?(e?this._helpOption=(r=this._helpOption)!=null?r:void 0:this._helpOption=null,this):(e=e!=null?e:"-h, --help",t=t!=null?t:"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){var r;this.outputHelp(e);let t=Number((r=Oe.exitCode)!=null?r:0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
42
+ Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
43
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function vm(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],n=s[4]),t&&n!=="0"?`${t}=${r}:${parseInt(n)+1}`:e})}function ic(){if(Oe.env.NO_COLOR||Oe.env.FORCE_COLOR==="0"||Oe.env.FORCE_COLOR==="false")return!1;if(Oe.env.FORCE_COLOR||Oe.env.CLICOLOR_FORCE!==void 0)return!0}rc.Command=tc;rc.useColor=ic});var Sm=O(Bt=>{var{Argument:_m}=Hs(),{Command:nc}=bm(),{CommanderError:M1,InvalidArgumentError:wm}=pn(),{Help:D1}=Kl(),{Option:xm}=Ql();Bt.program=new nc;Bt.createCommand=i=>new nc(i);Bt.createOption=(i,e)=>new xm(i,e);Bt.createArgument=(i,e)=>new _m(i,e);Bt.Command=nc;Bt.Option=xm;Bt.Argument=_m;Bt.Help=D1;Bt.CommanderError=M1;Bt.InvalidArgumentError=wm;Bt.InvalidOptionArgumentError=wm});var Am=O((Cm,Tm)=>{Cm=Tm.exports=Ir;function Ir(i,e){if(this.stream=e.stream||process.stderr,typeof e=="number"){var t=e;e={},e.total=t}else{if(e=e||{},typeof i!="string")throw new Error("format required");if(typeof e.total!="number")throw new Error("total required")}this.fmt=i,this.curr=e.curr||0,this.total=e.total,this.width=e.width||this.total,this.clear=e.clear,this.chars={complete:e.complete||"=",incomplete:e.incomplete||"-",head:e.head||e.complete||"="},this.renderThrottle=e.renderThrottle!==0?e.renderThrottle||16:0,this.lastRender=-1/0,this.callback=e.callback||function(){},this.tokens={},this.lastDraw=""}Ir.prototype.tick=function(i,e){if(i!==0&&(i=i||1),typeof i=="object"&&(e=i,i=1),e&&(this.tokens=e),this.curr==0&&(this.start=new Date),this.curr+=i,this.render(),this.curr>=this.total){this.render(void 0,!0),this.complete=!0,this.terminate(),this.callback(this);return}};Ir.prototype.render=function(i,e){if(e=e!==void 0?e:!1,i&&(this.tokens=i),!!this.stream.isTTY){var t=Date.now(),r=t-this.lastRender;if(!(!e&&r<this.renderThrottle)){this.lastRender=t;var n=this.curr/this.total;n=Math.min(Math.max(n,0),1);var s=Math.floor(n*100),o,a,l,c=new Date-this.start,u=s==100?0:c*(this.total/this.curr-1),f=this.curr/(c/1e3),d=this.fmt.replace(":current",this.curr).replace(":total",this.total).replace(":elapsed",isNaN(c)?"0.0":(c/1e3).toFixed(1)).replace(":eta",isNaN(u)||!isFinite(u)?"0.0":(u/1e3).toFixed(1)).replace(":percent",s.toFixed(0)+"%").replace(":rate",Math.round(f)),g=Math.max(0,this.stream.columns-d.replace(":bar","").length);g&&process.platform==="win32"&&(g=g-1);var y=Math.min(this.width,g);if(l=Math.round(y*n),a=Array(Math.max(0,l+1)).join(this.chars.complete),o=Array(Math.max(0,y-l+1)).join(this.chars.incomplete),l>0&&(a=a.slice(0,-1)+this.chars.head),d=d.replace(":bar",a+o),this.tokens)for(var m in this.tokens)d=d.replace(":"+m,this.tokens[m]);this.lastDraw!==d&&(this.stream.cursorTo(0),this.stream.write(d),this.stream.clearLine(1),this.lastDraw=d)}}};Ir.prototype.update=function(i,e){var t=Math.floor(i*this.total),r=t-this.curr;this.tick(r,e)};Ir.prototype.interrupt=function(i){this.stream.clearLine(),this.stream.cursorTo(0),this.stream.write(i),this.stream.write(`
44
+ `),this.stream.write(this.lastDraw)};Ir.prototype.terminate=function(){this.clear?this.stream.clearLine&&(this.stream.clearLine(),this.stream.cursorTo(0)):this.stream.write(`
45
+ `)}});var Nm=O((BN,Im)=>{Im.exports=Am()});var Rm=O(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});var Bm=require("buffer"),Zi={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};ci.ERRORS=Zi;function q1(i){if(!Bm.Buffer.isEncoding(i))throw new Error(Zi.INVALID_ENCODING)}ci.checkEncoding=q1;function Lm(i){return typeof i=="number"&&isFinite(i)&&$1(i)}ci.isFiniteInteger=Lm;function Pm(i,e){if(typeof i=="number"){if(!Lm(i)||i<0)throw new Error(e?Zi.INVALID_OFFSET:Zi.INVALID_LENGTH)}else throw new Error(e?Zi.INVALID_OFFSET_NON_NUMBER:Zi.INVALID_LENGTH_NON_NUMBER)}function F1(i){Pm(i,!1)}ci.checkLengthValue=F1;function j1(i){Pm(i,!0)}ci.checkOffsetValue=j1;function U1(i,e){if(i<0||i>e.length)throw new Error(Zi.INVALID_TARGET_OFFSET)}ci.checkTargetOffset=U1;function $1(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}function V1(i){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof Bm.Buffer.prototype[i]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${i}.`)}ci.bigIntAndBufferInt64Check=V1});var Dm=O(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var he=Rm(),Mm=4096,H1="utf8",sc=class i{constructor(e){if(this.length=0,this._encoding=H1,this._writeOffset=0,this._readOffset=0,i.isSmartBufferOptions(e))if(e.encoding&&(he.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(he.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(he.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(he.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Mm);else{if(typeof e!="undefined")throw new Error(he.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Mm)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return he.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return he.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return he.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return he.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return he.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return he.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return he.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return he.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return he.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return he.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return he.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return he.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;typeof e=="number"?(he.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),typeof t!="undefined"&&he.checkEncoding(t);let n=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,n}insertString(e,t,r){return he.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){typeof e!="undefined"&&he.checkEncoding(e);let t=this.length;for(let n=this._readOffset;n<this.length;n++)if(this._buff[n]===0){t=n;break}let r=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,r.toString(e||this._encoding)}insertStringNT(e,t,r){return he.checkOffsetValue(t),this.insertString(e,t,r),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e!="undefined"&&he.checkLengthValue(e);let t=typeof e=="number"?e:this.length,r=Math.min(this.length,this._readOffset+t),n=this._buff.slice(this._readOffset,r);return this._readOffset=r,n}insertBuffer(e,t){return he.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r<this.length;r++)if(this._buff[r]===0){e=r;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return he.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t!="undefined"&&he.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){he.checkOffsetValue(e),he.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){he.checkOffsetValue(e),he.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){he.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return he.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,r,n){let s=this._writeOffset,o=this._encoding;typeof r=="number"?s=r:typeof r=="string"&&(he.checkEncoding(r),o=r),typeof n=="string"&&(he.checkEncoding(n),o=n);let a=Buffer.byteLength(e,o);return t?this.ensureInsertable(a,s):this._ensureWriteable(a,s),this._buff.write(e,s,a,o),t?this._writeOffset+=a:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,s+a):this._writeOffset+=a,this}_handleBuffer(e,t,r){let n=typeof r=="number"?r:this._writeOffset;return t?this.ensureInsertable(e.length,n):this._ensureWriteable(e.length,n),e.copy(this._buff,n),t?this._writeOffset+=e.length:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,n+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let r=this._readOffset;if(typeof t!="undefined"&&(he.checkOffsetValue(t),r=t),r<0||r+e>this.length)throw new Error(he.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){he.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let r=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let r=this._buff,n=t*3/2+1;n<e&&(n=e),this._buff=Buffer.allocUnsafe(n),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);let n=e.call(this._buff,typeof r=="number"?r:this._readOffset);return typeof r=="undefined"&&(this._readOffset+=t),n}_insertNumberValue(e,t,r,n){return he.checkOffsetValue(n),this.ensureInsertable(t,n),e.call(this._buff,r,n),this._writeOffset+=t,this}_writeNumberValue(e,t,r,n){if(typeof n=="number"){if(n<0)throw new Error(he.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);he.checkOffsetValue(n)}let s=typeof n=="number"?n:this._writeOffset;return this._ensureWriteable(t,s),e.call(this._buff,r,s),typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,s+t):this._writeOffset+=t,this}};oc.SmartBuffer=sc});var ac=O(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.SOCKS5_NO_ACCEPTABLE_AUTH=Be.SOCKS5_CUSTOM_AUTH_END=Be.SOCKS5_CUSTOM_AUTH_START=Be.SOCKS_INCOMING_PACKET_SIZES=Be.SocksClientState=Be.Socks5Response=Be.Socks5HostType=Be.Socks5Auth=Be.Socks4Response=Be.SocksCommand=Be.ERRORS=Be.DEFAULT_TIMEOUT=void 0;var G1=3e4;Be.DEFAULT_TIMEOUT=G1;var W1={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};Be.ERRORS=W1;var Y1={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:i=>i+7,Socks4Response:8};Be.SOCKS_INCOMING_PACKET_SIZES=Y1;var qm;(function(i){i[i.connect=1]="connect",i[i.bind=2]="bind",i[i.associate=3]="associate"})(qm||(Be.SocksCommand=qm={}));var Fm;(function(i){i[i.Granted=90]="Granted",i[i.Failed=91]="Failed",i[i.Rejected=92]="Rejected",i[i.RejectedIdent=93]="RejectedIdent"})(Fm||(Be.Socks4Response=Fm={}));var jm;(function(i){i[i.NoAuth=0]="NoAuth",i[i.GSSApi=1]="GSSApi",i[i.UserPass=2]="UserPass"})(jm||(Be.Socks5Auth=jm={}));var K1=128;Be.SOCKS5_CUSTOM_AUTH_START=K1;var z1=254;Be.SOCKS5_CUSTOM_AUTH_END=z1;var J1=255;Be.SOCKS5_NO_ACCEPTABLE_AUTH=J1;var Um;(function(i){i[i.Granted=0]="Granted",i[i.Failure=1]="Failure",i[i.NotAllowed=2]="NotAllowed",i[i.NetworkUnreachable=3]="NetworkUnreachable",i[i.HostUnreachable=4]="HostUnreachable",i[i.ConnectionRefused=5]="ConnectionRefused",i[i.TTLExpired=6]="TTLExpired",i[i.CommandNotSupported=7]="CommandNotSupported",i[i.AddressNotSupported=8]="AddressNotSupported"})(Um||(Be.Socks5Response=Um={}));var $m;(function(i){i[i.IPv4=1]="IPv4",i[i.Hostname=3]="Hostname",i[i.IPv6=4]="IPv6"})($m||(Be.Socks5HostType=$m={}));var Vm;(function(i){i[i.Created=0]="Created",i[i.Connecting=1]="Connecting",i[i.Connected=2]="Connected",i[i.SentInitialHandshake=3]="SentInitialHandshake",i[i.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",i[i.SentAuthentication=5]="SentAuthentication",i[i.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",i[i.SentFinalHandshake=7]="SentFinalHandshake",i[i.ReceivedFinalResponse=8]="ReceivedFinalResponse",i[i.BoundWaitingForConnection=9]="BoundWaitingForConnection",i[i.Established=10]="Established",i[i.Disconnected=11]="Disconnected",i[i.Error=99]="Error"})(Vm||(Be.SocksClientState=Vm={}))});var cc=O(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.shuffleArray=Nr.SocksClientError=void 0;var lc=class extends Error{constructor(e,t){super(e),this.options=t}};Nr.SocksClientError=lc;function Z1(i){for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[i[e],i[t]]=[i[t],i[e]]}}Nr.shuffleArray=Z1});var uc=O(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.isCorrect=Br.isInSubnet=void 0;function Q1(i){return this.subnetMask<i.subnetMask?!1:this.mask(i.subnetMask)===i.mask()}Br.isInSubnet=Q1;function X1(i){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===i&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}Br.isCorrect=X1});var fc=O(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.RE_SUBNET_STRING=Jt.RE_ADDRESS=Jt.GROUPS=Jt.BITS=void 0;Jt.BITS=32;Jt.GROUPS=4;Jt.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Jt.RE_SUBNET_STRING=/\/\d{1,2}$/});var Ys=O(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.AddressError=void 0;var hc=class extends Error{constructor(e,t){super(e),this.name="AddressError",t!==null&&(this.parseMessage=t)}};Ws.AddressError=hc});var pc=O((Ks,Hm)=>{(function(){var i,e=0xdeadbeefcafe,t=(e&16777215)==15715070;function r(h,p,v){h!=null&&(typeof h=="number"?this.fromNumber(h,p,v):p==null&&typeof h!="string"?this.fromString(h,256):this.fromString(h,p))}function n(){return new r(null)}function s(h,p,v,E,B,P){for(;--P>=0;){var $=p*this[h++]+v[E]+B;B=Math.floor($/67108864),v[E++]=$&67108863}return B}function o(h,p,v,E,B,P){for(var $=p&32767,H=p>>15;--P>=0;){var Re=this[h]&32767,ze=this[h++]>>15,Tt=H*Re+ze*$;Re=$*Re+((Tt&32767)<<15)+v[E]+(B&1073741823),B=(Re>>>30)+(Tt>>>15)+H*ze+(B>>>30),v[E++]=Re&1073741823}return B}function a(h,p,v,E,B,P){for(var $=p&16383,H=p>>14;--P>=0;){var Re=this[h]&16383,ze=this[h++]>>14,Tt=H*Re+ze*$;Re=$*Re+((Tt&16383)<<14)+v[E]+B,B=(Re>>28)+(Tt>>14)+H*ze,v[E++]=Re&268435455}return B}var l=typeof navigator!="undefined";l&&t&&navigator.appName=="Microsoft Internet Explorer"?(r.prototype.am=o,i=30):l&&t&&navigator.appName!="Netscape"?(r.prototype.am=s,i=26):(r.prototype.am=a,i=28),r.prototype.DB=i,r.prototype.DM=(1<<i)-1,r.prototype.DV=1<<i;var c=52;r.prototype.FV=Math.pow(2,c),r.prototype.F1=c-i,r.prototype.F2=2*i-c;var u="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array,d,g;for(d=48,g=0;g<=9;++g)f[d++]=g;for(d=97,g=10;g<36;++g)f[d++]=g;for(d=65,g=10;g<36;++g)f[d++]=g;function y(h){return u.charAt(h)}function m(h,p){var v=f[h.charCodeAt(p)];return v==null?-1:v}function b(h){for(var p=this.t-1;p>=0;--p)h[p]=this[p];h.t=this.t,h.s=this.s}function w(h){this.t=1,this.s=h<0?-1:0,h>0?this[0]=h:h<-1?this[0]=h+this.DV:this.t=0}function x(h){var p=n();return p.fromInt(h),p}function _(h,p){var v;if(p==16)v=4;else if(p==8)v=3;else if(p==256)v=8;else if(p==2)v=1;else if(p==32)v=5;else if(p==4)v=2;else{this.fromRadix(h,p);return}this.t=0,this.s=0;for(var E=h.length,B=!1,P=0;--E>=0;){var $=v==8?h[E]&255:m(h,E);if($<0){h.charAt(E)=="-"&&(B=!0);continue}B=!1,P==0?this[this.t++]=$:P+v>this.DB?(this[this.t-1]|=($&(1<<this.DB-P)-1)<<P,this[this.t++]=$>>this.DB-P):this[this.t-1]|=$<<P,P+=v,P>=this.DB&&(P-=this.DB)}v==8&&(h[0]&128)!=0&&(this.s=-1,P>0&&(this[this.t-1]|=(1<<this.DB-P)-1<<P)),this.clamp(),B&&r.ZERO.subTo(this,this)}function k(){for(var h=this.s&this.DM;this.t>0&&this[this.t-1]==h;)--this.t}function S(h){if(this.s<0)return"-"+this.negate().toString(h);var p;if(h==16)p=4;else if(h==8)p=3;else if(h==2)p=1;else if(h==32)p=5;else if(h==4)p=2;else return this.toRadix(h);var v=(1<<p)-1,E,B=!1,P="",$=this.t,H=this.DB-$*this.DB%p;if($-- >0)for(H<this.DB&&(E=this[$]>>H)>0&&(B=!0,P=y(E));$>=0;)H<p?(E=(this[$]&(1<<H)-1)<<p-H,E|=this[--$]>>(H+=this.DB-p)):(E=this[$]>>(H-=p)&v,H<=0&&(H+=this.DB,--$)),E>0&&(B=!0),B&&(P+=y(E));return B?P:"0"}function R(){var h=n();return r.ZERO.subTo(this,h),h}function T(){return this.s<0?this.negate():this}function N(h){var p=this.s-h.s;if(p!=0)return p;var v=this.t;if(p=v-h.t,p!=0)return this.s<0?-p:p;for(;--v>=0;)if((p=this[v]-h[v])!=0)return p;return 0}function C(h){var p=1,v;return(v=h>>>16)!=0&&(h=v,p+=16),(v=h>>8)!=0&&(h=v,p+=8),(v=h>>4)!=0&&(h=v,p+=4),(v=h>>2)!=0&&(h=v,p+=2),(v=h>>1)!=0&&(h=v,p+=1),p}function M(){return this.t<=0?0:this.DB*(this.t-1)+C(this[this.t-1]^this.s&this.DM)}function L(h,p){var v;for(v=this.t-1;v>=0;--v)p[v+h]=this[v];for(v=h-1;v>=0;--v)p[v]=0;p.t=this.t+h,p.s=this.s}function G(h,p){for(var v=h;v<this.t;++v)p[v-h]=this[v];p.t=Math.max(this.t-h,0),p.s=this.s}function j(h,p){var v=h%this.DB,E=this.DB-v,B=(1<<E)-1,P=Math.floor(h/this.DB),$=this.s<<v&this.DM,H;for(H=this.t-1;H>=0;--H)p[H+P+1]=this[H]>>E|$,$=(this[H]&B)<<v;for(H=P-1;H>=0;--H)p[H]=0;p[P]=$,p.t=this.t+P+1,p.s=this.s,p.clamp()}function J(h,p){p.s=this.s;var v=Math.floor(h/this.DB);if(v>=this.t){p.t=0;return}var E=h%this.DB,B=this.DB-E,P=(1<<E)-1;p[0]=this[v]>>E;for(var $=v+1;$<this.t;++$)p[$-v-1]|=(this[$]&P)<<B,p[$-v]=this[$]>>E;E>0&&(p[this.t-v-1]|=(this.s&P)<<B),p.t=this.t-v,p.clamp()}function F(h,p){for(var v=0,E=0,B=Math.min(h.t,this.t);v<B;)E+=this[v]-h[v],p[v++]=E&this.DM,E>>=this.DB;if(h.t<this.t){for(E-=h.s;v<this.t;)E+=this[v],p[v++]=E&this.DM,E>>=this.DB;E+=this.s}else{for(E+=this.s;v<h.t;)E-=h[v],p[v++]=E&this.DM,E>>=this.DB;E-=h.s}p.s=E<0?-1:0,E<-1?p[v++]=this.DV+E:E>0&&(p[v++]=E),p.t=v,p.clamp()}function V(h,p){var v=this.abs(),E=h.abs(),B=v.t;for(p.t=B+E.t;--B>=0;)p[B]=0;for(B=0;B<E.t;++B)p[B+v.t]=v.am(0,E[B],p,B,0,v.t);p.s=0,p.clamp(),this.s!=h.s&&r.ZERO.subTo(p,p)}function Z(h){for(var p=this.abs(),v=h.t=2*p.t;--v>=0;)h[v]=0;for(v=0;v<p.t-1;++v){var E=p.am(v,p[v],h,2*v,0,1);(h[v+p.t]+=p.am(v+1,2*p[v],h,2*v+1,E,p.t-v-1))>=p.DV&&(h[v+p.t]-=p.DV,h[v+p.t+1]=1)}h.t>0&&(h[h.t-1]+=p.am(v,p[v],h,2*v,0,1)),h.s=0,h.clamp()}function ee(h,p,v){var E=h.abs();if(!(E.t<=0)){var B=this.abs();if(B.t<E.t){p!=null&&p.fromInt(0),v!=null&&this.copyTo(v);return}v==null&&(v=n());var P=n(),$=this.s,H=h.s,Re=this.DB-C(E[E.t-1]);Re>0?(E.lShiftTo(Re,P),B.lShiftTo(Re,v)):(E.copyTo(P),B.copyTo(v));var ze=P.t,Tt=P[ze-1];if(Tt!=0){var wt=Tt*(1<<this.F1)+(ze>1?P[ze-2]>>this.F2:0),si=this.FV/wt,ys=(1<<this.F1)/wt,Ft=1<<this.F2,jt=v.t,vs=jt-ze,vi=p==null?n():p;for(P.dlShiftTo(vs,vi),v.compareTo(vi)>=0&&(v[v.t++]=1,v.subTo(vi,v)),r.ONE.dlShiftTo(ze,vi),vi.subTo(P,P);P.t<ze;)P[P.t++]=0;for(;--vs>=0;){var Ca=v[--jt]==Tt?this.DM:Math.floor(v[jt]*si+(v[jt-1]+Ft)*ys);if((v[jt]+=P.am(0,Ca,v,vs,0,ze))<Ca)for(P.dlShiftTo(vs,vi),v.subTo(vi,v);v[jt]<--Ca;)v.subTo(vi,v)}p!=null&&(v.drShiftTo(ze,p),$!=H&&r.ZERO.subTo(p,p)),v.t=ze,v.clamp(),Re>0&&v.rShiftTo(Re,v),$<0&&r.ZERO.subTo(v,v)}}}function W(h){var p=n();return this.abs().divRemTo(h,null,p),this.s<0&&p.compareTo(r.ZERO)>0&&h.subTo(p,p),p}function Se(h){this.m=h}function de(h){return h.s<0||h.compareTo(this.m)>=0?h.mod(this.m):h}function le(h){return h}function ce(h){h.divRemTo(this.m,null,h)}function I(h,p,v){h.multiplyTo(p,v),this.reduce(v)}function Q(h,p){h.squareTo(p),this.reduce(p)}Se.prototype.convert=de,Se.prototype.revert=le,Se.prototype.reduce=ce,Se.prototype.mulTo=I,Se.prototype.sqrTo=Q;function ke(){if(this.t<1)return 0;var h=this[0];if((h&1)==0)return 0;var p=h&3;return p=p*(2-(h&15)*p)&15,p=p*(2-(h&255)*p)&255,p=p*(2-((h&65535)*p&65535))&65535,p=p*(2-h*p%this.DV)%this.DV,p>0?this.DV-p:-p}function ve(h){this.m=h,this.mp=h.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<h.DB-15)-1,this.mt2=2*h.t}function me(h){var p=n();return h.abs().dlShiftTo(this.m.t,p),p.divRemTo(this.m,null,p),h.s<0&&p.compareTo(r.ZERO)>0&&this.m.subTo(p,p),p}function ge(h){var p=n();return h.copyTo(p),this.reduce(p),p}function ue(h){for(;h.t<=this.mt2;)h[h.t++]=0;for(var p=0;p<this.m.t;++p){var v=h[p]&32767,E=v*this.mpl+((v*this.mph+(h[p]>>15)*this.mpl&this.um)<<15)&h.DM;for(v=p+this.m.t,h[v]+=this.m.am(0,E,h,p,0,this.m.t);h[v]>=h.DV;)h[v]-=h.DV,h[++v]++}h.clamp(),h.drShiftTo(this.m.t,h),h.compareTo(this.m)>=0&&h.subTo(this.m,h)}function Y(h,p){h.squareTo(p),this.reduce(p)}function U(h,p,v){h.multiplyTo(p,v),this.reduce(v)}ve.prototype.convert=me,ve.prototype.revert=ge,ve.prototype.reduce=ue,ve.prototype.mulTo=U,ve.prototype.sqrTo=Y;function Te(){return(this.t>0?this[0]&1:this.s)==0}function re(h,p){if(h>4294967295||h<1)return r.ONE;var v=n(),E=n(),B=p.convert(this),P=C(h)-1;for(B.copyTo(v);--P>=0;)if(p.sqrTo(v,E),(h&1<<P)>0)p.mulTo(E,B,v);else{var $=v;v=E,E=$}return p.revert(v)}function fe(h,p){var v;return h<256||p.isEven()?v=new Se(p):v=new ve(p),this.exp(h,v)}r.prototype.copyTo=b,r.prototype.fromInt=w,r.prototype.fromString=_,r.prototype.clamp=k,r.prototype.dlShiftTo=L,r.prototype.drShiftTo=G,r.prototype.lShiftTo=j,r.prototype.rShiftTo=J,r.prototype.subTo=F,r.prototype.multiplyTo=V,r.prototype.squareTo=Z,r.prototype.divRemTo=ee,r.prototype.invDigit=ke,r.prototype.isEven=Te,r.prototype.exp=re,r.prototype.toString=S,r.prototype.negate=R,r.prototype.abs=T,r.prototype.compareTo=N,r.prototype.bitLength=M,r.prototype.mod=W,r.prototype.modPowInt=fe,r.ZERO=x(0),r.ONE=x(1);function pt(){var h=n();return this.copyTo(h),h}function bt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function A(){return this.t==0?this.s:this[0]<<24>>24}function z(){return this.t==0?this.s:this[0]<<16>>16}function te(h){return Math.floor(Math.LN2*this.DB/Math.log(h))}function X(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function oe(h){if(h==null&&(h=10),this.signum()==0||h<2||h>36)return"0";var p=this.chunkSize(h),v=Math.pow(h,p),E=x(v),B=n(),P=n(),$="";for(this.divRemTo(E,B,P);B.signum()>0;)$=(v+P.intValue()).toString(h).substr(1)+$,B.divRemTo(E,B,P);return P.intValue().toString(h)+$}function ae(h,p){this.fromInt(0),p==null&&(p=10);for(var v=this.chunkSize(p),E=Math.pow(p,v),B=!1,P=0,$=0,H=0;H<h.length;++H){var Re=m(h,H);if(Re<0){h.charAt(H)=="-"&&this.signum()==0&&(B=!0);continue}$=p*$+Re,++P>=v&&(this.dMultiply(E),this.dAddOffset($,0),P=0,$=0)}P>0&&(this.dMultiply(Math.pow(p,P)),this.dAddOffset($,0)),B&&r.ZERO.subTo(this,this)}function be(h,p,v){if(typeof p=="number")if(h<2)this.fromInt(1);else for(this.fromNumber(h,v),this.testBit(h-1)||this.bitwiseTo(r.ONE.shiftLeft(h-1),se,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(p);)this.dAddOffset(2,0),this.bitLength()>h&&this.subTo(r.ONE.shiftLeft(h-1),this);else{var E=new Array,B=h&7;E.length=(h>>3)+1,p.nextBytes(E),B>0?E[0]&=(1<<B)-1:E[0]=0,this.fromString(E,256)}}function _e(){var h=this.t,p=new Array;p[0]=this.s;var v=this.DB-h*this.DB%8,E,B=0;if(h-- >0)for(v<this.DB&&(E=this[h]>>v)!=(this.s&this.DM)>>v&&(p[B++]=E|this.s<<this.DB-v);h>=0;)v<8?(E=(this[h]&(1<<v)-1)<<8-v,E|=this[--h]>>(v+=this.DB-8)):(E=this[h]>>(v-=8)&255,v<=0&&(v+=this.DB,--h)),(E&128)!=0&&(E|=-256),B==0&&(this.s&128)!=(E&128)&&++B,(B>0||E!=this.s)&&(p[B++]=E);return p}function Pe(h){return this.compareTo(h)==0}function Ae(h){return this.compareTo(h)<0?this:h}function q(h){return this.compareTo(h)>0?this:h}function K(h,p,v){var E,B,P=Math.min(h.t,this.t);for(E=0;E<P;++E)v[E]=p(this[E],h[E]);if(h.t<this.t){for(B=h.s&this.DM,E=P;E<this.t;++E)v[E]=p(this[E],B);v.t=this.t}else{for(B=this.s&this.DM,E=P;E<h.t;++E)v[E]=p(B,h[E]);v.t=h.t}v.s=p(this.s,h.s),v.clamp()}function ne(h,p){return h&p}function Ne(h){var p=n();return this.bitwiseTo(h,ne,p),p}function se(h,p){return h|p}function pe(h){var p=n();return this.bitwiseTo(h,se,p),p}function Ee(h,p){return h^p}function ie(h){var p=n();return this.bitwiseTo(h,Ee,p),p}function we(h,p){return h&~p}function Ve(h){var p=n();return this.bitwiseTo(h,we,p),p}function Ie(){for(var h=n(),p=0;p<this.t;++p)h[p]=this.DM&~this[p];return h.t=this.t,h.s=~this.s,h}function dt(h){var p=n();return h<0?this.rShiftTo(-h,p):this.lShiftTo(h,p),p}function Ct(h){var p=n();return h<0?this.lShiftTo(-h,p):this.rShiftTo(h,p),p}function ri(h){if(h==0)return-1;var p=0;return(h&65535)==0&&(h>>=16,p+=16),(h&255)==0&&(h>>=8,p+=8),(h&15)==0&&(h>>=4,p+=4),(h&3)==0&&(h>>=2,p+=2),(h&1)==0&&++p,p}function gi(){for(var h=0;h<this.t;++h)if(this[h]!=0)return h*this.DB+ri(this[h]);return this.s<0?this.t*this.DB:-1}function yi(h){for(var p=0;h!=0;)h&=h-1,++p;return p}function qi(){for(var h=0,p=this.s&this.DM,v=0;v<this.t;++v)h+=yi(this[v]^p);return h}function Fi(h){var p=Math.floor(h/this.DB);return p>=this.t?this.s!=0:(this[p]&1<<h%this.DB)!=0}function mr(h,p){var v=r.ONE.shiftLeft(h);return this.bitwiseTo(v,p,v),v}function ji(h){return this.changeBit(h,se)}function Ui(h){return this.changeBit(h,we)}function $i(h){return this.changeBit(h,Ee)}function Vi(h,p){for(var v=0,E=0,B=Math.min(h.t,this.t);v<B;)E+=this[v]+h[v],p[v++]=E&this.DM,E>>=this.DB;if(h.t<this.t){for(E+=h.s;v<this.t;)E+=this[v],p[v++]=E&this.DM,E>>=this.DB;E+=this.s}else{for(E+=this.s;v<h.t;)E+=h[v],p[v++]=E&this.DM,E>>=this.DB;E+=h.s}p.s=E<0?-1:0,E>0?p[v++]=E:E<-1&&(p[v++]=this.DV+E),p.t=v,p.clamp()}function ns(h){var p=n();return this.addTo(h,p),p}function rn(h){var p=n();return this.subTo(h,p),p}function ss(h){var p=n();return this.multiplyTo(h,p),p}function os(){var h=n();return this.squareTo(h),h}function as(h){var p=n();return this.divRemTo(h,p,null),p}function ls(h){var p=n();return this.divRemTo(h,null,p),p}function cs(h){var p=n(),v=n();return this.divRemTo(h,p,v),new Array(p,v)}function Sa(h){this[this.t]=this.am(0,h-1,this,0,0,this.t),++this.t,this.clamp()}function Hi(h,p){if(h!=0){for(;this.t<=p;)this[this.t++]=0;for(this[p]+=h;this[p]>=this.DV;)this[p]-=this.DV,++p>=this.t&&(this[this.t++]=0),++this[p]}}function ni(){}function Gi(h){return h}function gr(h,p,v){h.multiplyTo(p,v)}function us(h,p){h.squareTo(p)}ni.prototype.convert=Gi,ni.prototype.revert=Gi,ni.prototype.mulTo=gr,ni.prototype.sqrTo=us;function fs(h){return this.exp(h,new ni)}function hs(h,p,v){var E=Math.min(this.t+h.t,p);for(v.s=0,v.t=E;E>0;)v[--E]=0;var B;for(B=v.t-this.t;E<B;++E)v[E+this.t]=this.am(0,h[E],v,E,0,this.t);for(B=Math.min(h.t,p);E<B;++E)this.am(0,h[E],v,E,0,p-E);v.clamp()}function ps(h,p,v){--p;var E=v.t=this.t+h.t-p;for(v.s=0;--E>=0;)v[E]=0;for(E=Math.max(p-this.t,0);E<h.t;++E)v[this.t+E-p]=this.am(p-E,h[E],v,0,0,this.t+E-p);v.clamp(),v.drShiftTo(1,v)}function Yt(h){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*h.t,this.r2),this.mu=this.r2.divide(h),this.m=h}function ds(h){if(h.s<0||h.t>2*this.m.t)return h.mod(this.m);if(h.compareTo(this.m)<0)return h;var p=n();return h.copyTo(p),this.reduce(p),p}function ms(h){return h}function yr(h){for(h.drShiftTo(this.m.t-1,this.r2),h.t>this.m.t+1&&(h.t=this.m.t+1,h.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);h.compareTo(this.r2)<0;)h.dAddOffset(1,this.m.t+1);for(h.subTo(this.r2,h);h.compareTo(this.m)>=0;)h.subTo(this.m,h)}function Gb(h,p){h.squareTo(p),this.reduce(p)}function Wb(h,p,v){h.multiplyTo(p,v),this.reduce(v)}Yt.prototype.convert=ds,Yt.prototype.revert=ms,Yt.prototype.reduce=yr,Yt.prototype.mulTo=Wb,Yt.prototype.sqrTo=Gb;function Yb(h,p){var v=h.bitLength(),E,B=x(1),P;if(v<=0)return B;v<18?E=1:v<48?E=3:v<144?E=4:v<768?E=5:E=6,v<8?P=new Se(p):p.isEven()?P=new Yt(p):P=new ve(p);var $=new Array,H=3,Re=E-1,ze=(1<<E)-1;if($[1]=P.convert(this),E>1){var Tt=n();for(P.sqrTo($[1],Tt);H<=ze;)$[H]=n(),P.mulTo(Tt,$[H-2],$[H]),H+=2}var wt=h.t-1,si,ys=!0,Ft=n(),jt;for(v=C(h[wt])-1;wt>=0;){for(v>=Re?si=h[wt]>>v-Re&ze:(si=(h[wt]&(1<<v+1)-1)<<Re-v,wt>0&&(si|=h[wt-1]>>this.DB+v-Re)),H=E;(si&1)==0;)si>>=1,--H;if((v-=H)<0&&(v+=this.DB,--wt),ys)$[si].copyTo(B),ys=!1;else{for(;H>1;)P.sqrTo(B,Ft),P.sqrTo(Ft,B),H-=2;H>0?P.sqrTo(B,Ft):(jt=B,B=Ft,Ft=jt),P.mulTo(Ft,$[si],B)}for(;wt>=0&&(h[wt]&1<<v)==0;)P.sqrTo(B,Ft),jt=B,B=Ft,Ft=jt,--v<0&&(v=this.DB-1,--wt)}return P.revert(B)}function Kb(h){var p=this.s<0?this.negate():this.clone(),v=h.s<0?h.negate():h.clone();if(p.compareTo(v)<0){var E=p;p=v,v=E}var B=p.getLowestSetBit(),P=v.getLowestSetBit();if(P<0)return p;for(B<P&&(P=B),P>0&&(p.rShiftTo(P,p),v.rShiftTo(P,v));p.signum()>0;)(B=p.getLowestSetBit())>0&&p.rShiftTo(B,p),(B=v.getLowestSetBit())>0&&v.rShiftTo(B,v),p.compareTo(v)>=0?(p.subTo(v,p),p.rShiftTo(1,p)):(v.subTo(p,v),v.rShiftTo(1,v));return P>0&&v.lShiftTo(P,v),v}function zb(h){if(h<=0)return 0;var p=this.DV%h,v=this.s<0?h-1:0;if(this.t>0)if(p==0)v=this[0]%h;else for(var E=this.t-1;E>=0;--E)v=(p*v+this[E])%h;return v}function Jb(h){var p=h.isEven();if(this.isEven()&&p||h.signum()==0)return r.ZERO;for(var v=h.clone(),E=this.clone(),B=x(1),P=x(0),$=x(0),H=x(1);v.signum()!=0;){for(;v.isEven();)v.rShiftTo(1,v),p?((!B.isEven()||!P.isEven())&&(B.addTo(this,B),P.subTo(h,P)),B.rShiftTo(1,B)):P.isEven()||P.subTo(h,P),P.rShiftTo(1,P);for(;E.isEven();)E.rShiftTo(1,E),p?((!$.isEven()||!H.isEven())&&($.addTo(this,$),H.subTo(h,H)),$.rShiftTo(1,$)):H.isEven()||H.subTo(h,H),H.rShiftTo(1,H);v.compareTo(E)>=0?(v.subTo(E,v),p&&B.subTo($,B),P.subTo(H,P)):(E.subTo(v,E),p&&$.subTo(B,$),H.subTo(P,H))}if(E.compareTo(r.ONE)!=0)return r.ZERO;if(H.compareTo(h)>=0)return H.subtract(h);if(H.signum()<0)H.addTo(h,H);else return H;return H.signum()<0?H.add(h):H}var at=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Zb=(1<<26)/at[at.length-1];function Qb(h){var p,v=this.abs();if(v.t==1&&v[0]<=at[at.length-1]){for(p=0;p<at.length;++p)if(v[0]==at[p])return!0;return!1}if(v.isEven())return!1;for(p=1;p<at.length;){for(var E=at[p],B=p+1;B<at.length&&E<Zb;)E*=at[B++];for(E=v.modInt(E);p<B;)if(E%at[p++]==0)return!1}return v.millerRabin(h)}function Xb(h){var p=this.subtract(r.ONE),v=p.getLowestSetBit();if(v<=0)return!1;var E=p.shiftRight(v);h=h+1>>1,h>at.length&&(h=at.length);for(var B=n(),P=0;P<h;++P){B.fromInt(at[Math.floor(Math.random()*at.length)]);var $=B.modPow(E,this);if($.compareTo(r.ONE)!=0&&$.compareTo(p)!=0){for(var H=1;H++<v&&$.compareTo(p)!=0;)if($=$.modPowInt(2,this),$.compareTo(r.ONE)==0)return!1;if($.compareTo(p)!=0)return!1}}return!0}r.prototype.chunkSize=te,r.prototype.toRadix=oe,r.prototype.fromRadix=ae,r.prototype.fromNumber=be,r.prototype.bitwiseTo=K,r.prototype.changeBit=mr,r.prototype.addTo=Vi,r.prototype.dMultiply=Sa,r.prototype.dAddOffset=Hi,r.prototype.multiplyLowerTo=hs,r.prototype.multiplyUpperTo=ps,r.prototype.modInt=zb,r.prototype.millerRabin=Xb,r.prototype.clone=pt,r.prototype.intValue=bt,r.prototype.byteValue=A,r.prototype.shortValue=z,r.prototype.signum=X,r.prototype.toByteArray=_e,r.prototype.equals=Pe,r.prototype.min=Ae,r.prototype.max=q,r.prototype.and=Ne,r.prototype.or=pe,r.prototype.xor=ie,r.prototype.andNot=Ve,r.prototype.not=Ie,r.prototype.shiftLeft=dt,r.prototype.shiftRight=Ct,r.prototype.getLowestSetBit=gi,r.prototype.bitCount=qi,r.prototype.testBit=Fi,r.prototype.setBit=ji,r.prototype.clearBit=Ui,r.prototype.flipBit=$i,r.prototype.add=ns,r.prototype.subtract=rn,r.prototype.multiply=ss,r.prototype.divide=as,r.prototype.remainder=ls,r.prototype.divideAndRemainder=cs,r.prototype.modPow=Yb,r.prototype.modInverse=Jb,r.prototype.pow=fs,r.prototype.gcd=Kb,r.prototype.isProbablePrime=Qb,r.prototype.square=os,r.prototype.Barrett=Yt;var gs,_t,Ke;function e_(h){_t[Ke++]^=h&255,_t[Ke++]^=h>>8&255,_t[Ke++]^=h>>16&255,_t[Ke++]^=h>>24&255,Ke>=ka&&(Ke-=ka)}function Uf(){e_(new Date().getTime())}if(_t==null){_t=new Array,Ke=0;var qt;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var $f=new Uint8Array(32);for(window.crypto.getRandomValues($f),qt=0;qt<32;++qt)_t[Ke++]=$f[qt]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Vf=window.crypto.random(32);for(qt=0;qt<Vf.length;++qt)_t[Ke++]=Vf.charCodeAt(qt)&255}}for(;Ke<ka;)qt=Math.floor(65536*Math.random()),_t[Ke++]=qt>>>8,_t[Ke++]=qt&255;Ke=0,Uf()}function t_(){if(gs==null){for(Uf(),gs=s_(),gs.init(_t),Ke=0;Ke<_t.length;++Ke)_t[Ke]=0;Ke=0}return gs.next()}function i_(h){var p;for(p=0;p<h.length;++p)h[p]=t_()}function Ea(){}Ea.prototype.nextBytes=i_;function Oa(){this.i=0,this.j=0,this.S=new Array}function r_(h){var p,v,E;for(p=0;p<256;++p)this.S[p]=p;for(v=0,p=0;p<256;++p)v=v+this.S[p]+h[p%h.length]&255,E=this.S[p],this.S[p]=this.S[v],this.S[v]=E;this.i=0,this.j=0}function n_(){var h;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,h=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=h,this.S[h+this.S[this.i]&255]}Oa.prototype.init=r_,Oa.prototype.next=n_;function s_(){return new Oa}var ka=256;typeof Ks!="undefined"?Ks=Hm.exports={default:r,BigInteger:r,SecureRandom:Ea}:this.jsbn={BigInteger:r,SecureRandom:Ea}}).call(Ks)});var dn=O(zs=>{(function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(o){return r(s(o),arguments)}function t(o,a){return e.apply(null,[o].concat(a||[]))}function r(o,a){var l=1,c=o.length,u,f="",d,g,y,m,b,w,x,_;for(d=0;d<c;d++)if(typeof o[d]=="string")f+=o[d];else if(typeof o[d]=="object"){if(y=o[d],y.keys)for(u=a[l],g=0;g<y.keys.length;g++){if(u==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',y.keys[g],y.keys[g-1]));u=u[y.keys[g]]}else y.param_no?u=a[y.param_no]:u=a[l++];if(i.not_type.test(y.type)&&i.not_primitive.test(y.type)&&u instanceof Function&&(u=u()),i.numeric_arg.test(y.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(e("[sprintf] expecting number but found %T",u));switch(i.number.test(y.type)&&(x=u>=0),y.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,y.width?parseInt(y.width):0);break;case"e":u=y.precision?parseFloat(u).toExponential(y.precision):parseFloat(u).toExponential();break;case"f":u=y.precision?parseFloat(u).toFixed(y.precision):parseFloat(u);break;case"g":u=y.precision?String(Number(u.toPrecision(y.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=y.precision?u.substring(0,y.precision):u;break;case"t":u=String(!!u),u=y.precision?u.substring(0,y.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=y.precision?u.substring(0,y.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=y.precision?u.substring(0,y.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}i.json.test(y.type)?f+=u:(i.number.test(y.type)&&(!x||y.sign)?(_=x?"+":"-",u=u.toString().replace(i.sign,"")):_="",b=y.pad_char?y.pad_char==="0"?"0":y.pad_char.charAt(1):" ",w=y.width-(_+u).length,m=y.width&&w>0?b.repeat(w):"",f+=y.align?_+u+m:b==="0"?_+m+u:m+_+u)}return f}var n=Object.create(null);function s(o){if(n[o])return n[o];for(var a=o,l,c=[],u=0;a;){if((l=i.text.exec(a))!==null)c.push(l[0]);else if((l=i.modulo.exec(a))!==null)c.push("%");else if((l=i.placeholder.exec(a))!==null){if(l[2]){u|=1;var f=[],d=l[2],g=[];if((g=i.key.exec(d))!==null)for(f.push(g[1]);(d=d.substring(g[0].length))!=="";)if((g=i.key_access.exec(d))!==null)f.push(g[1]);else if((g=i.index_access.exec(d))!==null)f.push(g[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=f}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(l[0].length)}return n[o]=c}typeof zs!="undefined"&&(zs.sprintf=e,zs.vsprintf=t),typeof window!="undefined"&&(window.sprintf=e,window.vsprintf=t,typeof define=="function"&&define.amd&&define(function(){return{sprintf:e,vsprintf:t}}))})()});var mc=O(Zt=>{"use strict";var eS=Zt&&Zt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),tS=Zt&&Zt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Ym=Zt&&Zt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&eS(e,i,t);return tS(e,i),e};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.Address4=void 0;var Gm=Ym(uc()),Vt=Ym(fc()),Wm=Ys(),mn=pc(),Lr=dn(),dc=class i{constructor(e){this.groups=Vt.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=Gm.isCorrect(Vt.BITS),this.isInSubnet=Gm.isInSubnet,this.address=e;let t=Vt.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>Vt.BITS)throw new Wm.AddressError("Invalid subnet mask.");e=e.replace(Vt.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new i(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(!e.match(Vt.RE_ADDRESS))throw new Wm.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromHex(e){let t=e.replace(/:/g,"").padStart(8,"0"),r=[],n;for(n=0;n<8;n+=2){let s=t.slice(n,n+2);r.push(parseInt(s,16))}return new i(r.join("."))}static fromInteger(e){return i.fromHex(e.toString(16))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new i(r)}toHex(){return this.parsedAddress.map(e=>(0,Lr.sprintf)("%02x",parseInt(e,10))).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<Vt.GROUPS;t+=2){let r=(0,Lr.sprintf)("%02x%02x",parseInt(this.parsedAddress[t],10),parseInt(this.parsedAddress[t+1],10));e.push((0,Lr.sprintf)("%x",parseInt(r,16)))}return e.join(":")}bigInteger(){return new mn.BigInteger(this.parsedAddress.map(e=>(0,Lr.sprintf)("%02x",parseInt(e,10))).join(""),16)}_startAddress(){return new mn.BigInteger(this.mask()+"0".repeat(Vt.BITS-this.subnetMask),2)}startAddress(){return i.fromBigInteger(this._startAddress())}startAddressExclusive(){let e=new mn.BigInteger("1");return i.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new mn.BigInteger(this.mask()+"1".repeat(Vt.BITS-this.subnetMask),2)}endAddress(){return i.fromBigInteger(this._endAddress())}endAddressExclusive(){let e=new mn.BigInteger("1");return i.fromBigInteger(this._endAddress().subtract(e))}static fromBigInteger(e){return i.fromInteger(parseInt(e.toString(),10))}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:(0,Lr.sprintf)("%s.in-addr.arpa.",t)}isMulticast(){return this.isInSubnet(new i("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(Vt.BITS,"0")}groupForV6(){let e=this.parsedAddress;return this.address.replace(Vt.RE_ADDRESS,(0,Lr.sprintf)('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',e.slice(0,2).join("."),e.slice(2,4).join(".")))}};Zt.Address4=dc});var gc=O(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.RE_URL_WITH_PORT=qe.RE_URL=qe.RE_ZONE_STRING=qe.RE_SUBNET_STRING=qe.RE_BAD_ADDRESS=qe.RE_BAD_CHARACTERS=qe.TYPES=qe.SCOPES=qe.GROUPS=qe.BITS=void 0;qe.BITS=128;qe.GROUPS=8;qe.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};qe.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};qe.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;qe.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;qe.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;qe.RE_ZONE_STRING=/%.*$/;qe.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);qe.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var yc=O(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.simpleGroup=Qt.spanLeadingZeroes=Qt.spanAll=Qt.spanAllZeroes=void 0;var Km=dn();function zm(i){return i.replace(/(0+)/g,'<span class="zero">$1</span>')}Qt.spanAllZeroes=zm;function iS(i,e=0){return i.split("").map((r,n)=>(0,Km.sprintf)('<span class="digit value-%s position-%d">%s</span>',r,n+e,zm(r))).join("")}Qt.spanAll=iS;function Jm(i){return i.replace(/^(0+)/,'<span class="zero">$1</span>')}function rS(i){return i.split(":").map(t=>Jm(t)).join(":")}Qt.spanLeadingZeroes=rS;function nS(i,e=0){return i.split(":").map((r,n)=>/group-v4/.test(r)?r:(0,Km.sprintf)('<span class="hover-group group-%d">%s</span>',n+e,Jm(r)))}Qt.simpleGroup=nS});var Zm=O(Qe=>{"use strict";var sS=Qe&&Qe.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),oS=Qe&&Qe.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),aS=Qe&&Qe.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&sS(e,i,t);return oS(e,i),e};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.possibleElisions=Qe.simpleRegularExpression=Qe.ADDRESS_BOUNDARY=Qe.padGroup=Qe.groupPossibilities=void 0;var lS=aS(gc()),Pr=dn();function Zs(i){return(0,Pr.sprintf)("(%s)",i.join("|"))}Qe.groupPossibilities=Zs;function Js(i){return i.length<4?(0,Pr.sprintf)("0{0,%d}%s",4-i.length,i):i}Qe.padGroup=Js;Qe.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function cS(i){let e=[];i.forEach((r,n)=>{parseInt(r,16)===0&&e.push(n)});let t=e.map(r=>i.map((n,s)=>{if(s===r){let o=s===0||s===lS.GROUPS-1?":":"";return Zs([Js(n),o])}return Js(n)}).join(":"));return t.push(i.map(Js).join(":")),Zs(t)}Qe.simpleRegularExpression=cS;function uS(i,e,t){let r=e?"":":",n=t?"":":",s=[];!e&&!t&&s.push("::"),e&&t&&s.push(""),(t&&!e||!t&&e)&&s.push(":"),s.push((0,Pr.sprintf)("%s(:0{1,4}){1,%d}",r,i-1)),s.push((0,Pr.sprintf)("(0{1,4}:){1,%d}%s",i-1,n)),s.push((0,Pr.sprintf)("(0{1,4}:){%d}0{1,4}",i-1));for(let o=1;o<i-1;o++)for(let a=1;a<i-o;a++)s.push((0,Pr.sprintf)("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",a,i-a-o-1));return Zs(s)}Qe.possibleElisions=uS});var tg=O(Xt=>{"use strict";var fS=Xt&&Xt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),hS=Xt&&Xt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Xs=Xt&&Xt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&fS(e,i,t);return hS(e,i),e};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.Address6=void 0;var Qm=Xs(uc()),vc=Xs(fc()),Le=Xs(gc()),bc=Xs(yc()),Qi=mc(),Xi=Zm(),ui=Ys(),ut=pc(),ft=dn();function Qs(i){if(!i)throw new Error("Assertion failed.")}function pS(i){let e=/(\d+)(\d{3})/;for(;e.test(i);)i=i.replace(e,"$1,$2");return i}function dS(i){return i=i.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),i=i.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),i}function mS(i,e){let t=[],r=[],n;for(n=0;n<i.length;n++)n<e[0]?t.push(i[n]):n>e[1]&&r.push(i[n]);return t.concat(["compact"]).concat(r)}function Xm(i){return(0,ft.sprintf)("%04x",parseInt(i,16))}function eg(i){return i&255}var _c=class i{constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=Qm.isInSubnet,this.isCorrect=Qm.isCorrect(Le.BITS),t===void 0?this.groups=Le.GROUPS:this.groups=t,this.address=e;let r=Le.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>Le.BITS)throw new ui.AddressError("Invalid subnet mask.");e=e.replace(Le.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new ui.AddressError("Invalid subnet mask.");let n=Le.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(Le.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new i(e),!0}catch{return!1}}static fromBigInteger(e){let t=e.toString(16).padStart(32,"0"),r=[],n;for(n=0;n<Le.GROUPS;n++)r.push(t.slice(n*4,(n+1)*4));return new i(r.join(":"))}static fromURL(e){let t,r=null,n;if(e.indexOf("[")!==-1&&e.indexOf("]:")!==-1){if(n=Le.RE_URL_WITH_PORT.exec(e),n===null)return{error:"failed to parse address with port",address:null,port:null};t=n[1],r=n[2]}else if(e.indexOf("/")!==-1){if(e=e.replace(/^[a-z0-9]+:\/\//,""),n=Le.RE_URL.exec(e),n===null)return{error:"failed to parse address from URL",address:null,port:null};t=n[1]}else t=e;return r?(r=parseInt(r,10),(r<0||r>65536)&&(r=null)):r=null,{address:new i(t),port:r}}static fromAddress4(e){let t=new Qi.Address4(e),r=Le.BITS-(vc.BITS-t.subnetMask);return new i(`::ffff:${t.correctForm()}/${r}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(t.length!==63)throw new ui.AddressError("Invalid 'ip6.arpa' form.");let n=t.split(".").reverse();for(let s=r;s>0;s--){let o=s*4;n.splice(o,0,":")}return t=n.join(""),new i(t)}microsoftTranscription(){return(0,ft.sprintf)("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=Le.BITS-this.subnetMask,r=Math.abs(e-Le.BITS),n=t-r;return n<0?"0":pS(new ut.BigInteger("2",10).pow(n).toString(10))}_startAddress(){return new ut.BigInteger(this.mask()+"0".repeat(Le.BITS-this.subnetMask),2)}startAddress(){return i.fromBigInteger(this._startAddress())}startAddressExclusive(){let e=new ut.BigInteger("1");return i.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new ut.BigInteger(this.mask()+"1".repeat(Le.BITS-this.subnetMask),2)}endAddress(){return i.fromBigInteger(this._endAddress())}endAddressExclusive(){let e=new ut.BigInteger("1");return i.fromBigInteger(this._endAddress().subtract(e))}getScope(){let e=Le.SCOPES[this.getBits(12,16).intValue()];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys(Le.TYPES))if(this.isInSubnet(new i(e)))return Le.TYPES[e];return"Global unicast"}getBits(e,t){return new ut.BigInteger(this.getBitsBase2(e,t),2)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,Le.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:(0,ft.sprintf)("%s.ip6.arpa.",r):e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],r=0,n=[];for(e=0;e<this.parsedAddress.length;e++){let a=parseInt(this.parsedAddress[e],16);a===0&&r++,a!==0&&r>0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let s=n.map(a=>a[1]-a[0]+1);if(n.length>0){let a=s.indexOf(Math.max(...s));t=mS(this.parsedAddress,n[a])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let o=t.join(":");return o=o.replace(/^compact$/,"::"),o=o.replace(/^compact|compact$/,":"),o=o.replace(/compact/,""),o}binaryZeroPad(){return this.bigInteger().toString(2).padStart(Le.BITS,"0")}parse4in6(e){let t=e.split(":"),n=t.slice(-1)[0].match(vc.RE_ADDRESS);if(n){this.parsedAddress4=n[0],this.address4=new Qi.Address4(this.parsedAddress4);for(let s=0;s<this.address4.groups;s++)if(/^0[0-9]+/.test(this.address4.parsedAddress[s]))throw new ui.AddressError("IPv4 addresses can't have leading zeroes.",e.replace(vc.RE_ADDRESS,this.address4.parsedAddress.map(dS).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match(Le.RE_BAD_CHARACTERS);if(t)throw new ui.AddressError((0,ft.sprintf)("Bad character%s detected in address: %s",t.length>1?"s":"",t.join("")),e.replace(Le.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let r=e.match(Le.RE_BAD_ADDRESS);if(r)throw new ui.AddressError((0,ft.sprintf)("Address failed regex: %s",r.join("")),e.replace(Le.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let n=[],s=e.split("::");if(s.length===2){let o=s[0].split(":"),a=s[1].split(":");o.length===1&&o[0]===""&&(o=[]),a.length===1&&a[0]===""&&(a=[]);let l=this.groups-(o.length+a.length);if(!l)throw new ui.AddressError("Error parsing groups");this.elidedGroups=l,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,n=n.concat(o);for(let c=0;c<l;c++)n.push("0");n=n.concat(a)}else if(s.length===1)n=e.split(":"),this.elidedGroups=0;else throw new ui.AddressError("Too many :: groups found");if(n=n.map(o=>(0,ft.sprintf)("%x",parseInt(o,16))),n.length!==this.groups)throw new ui.AddressError("Incorrect number of groups found");return n}canonicalForm(){return this.parsedAddress.map(Xm).join(":")}decimal(){return this.parsedAddress.map(e=>(0,ft.sprintf)("%05d",parseInt(e,16))).join(":")}bigInteger(){return new ut.BigInteger(this.parsedAddress.map(Xm).join(""),16)}to4(){let e=this.binaryZeroPad().split("");return Qi.Address4.fromHex(new ut.BigInteger(e.slice(96,128).join(""),2).toString(16))}to4in6(){let e=this.to4(),r=new i(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),n="";return/:$/.test(r)||(n=":"),r+n+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),t=this.getBits(80,96).xor(new ut.BigInteger("ffff",16)).toString(),r=Qi.Address4.fromHex(this.getBitsBase16(32,64)),n=Qi.Address4.fromHex(this.getBits(96,128).xor(new ut.BigInteger("ffffffff",16)).toString(16)),s=this.getBits(64,80),o=this.getBitsBase2(64,80),a=s.testBit(15),l=s.testBit(14),c=s.testBit(8),u=s.testBit(9),f=new ut.BigInteger(o.slice(2,6)+o.slice(8,16),2).toString(10);return{prefix:(0,ft.sprintf)("%s:%s",e.slice(0,4),e.slice(4,8)),server4:r.address,client4:n.address,flags:o,coneNat:a,microsoft:{reserved:l,universalLocal:u,groupIndividual:c,nonce:f},udpPort:t}}inspect6to4(){let e=this.getBitsBase16(0,16),t=Qi.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:(0,ft.sprintf)("%s",e.slice(0,4)),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new i(e)}toByteArray(){let e=this.bigInteger().toByteArray();return e.length===17&&e[0]===0?e.slice(1):e}toUnsignedByteArray(){return this.toByteArray().map(eg)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(eg))}static fromUnsignedByteArray(e){let t=new ut.BigInteger("256",10),r=new ut.BigInteger("0",10),n=new ut.BigInteger("1",10);for(let s=e.length-1;s>=0;s--)r=r.add(n.multiply(new ut.BigInteger(e[s].toString(10),10))),n=n.multiply(t);return i.fromBigInteger(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new i("2001::/32"))}is6to4(){return this.isInSubnet(new i("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=(0,ft.sprintf)(":%s",e),(0,ft.sprintf)("http://[%s]%s/",this.correctForm(),e)}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;return e.v4&&(t=this.to4in6),e.className?(0,ft.sprintf)('<a href="%1$s%2$s" class="%3$s">%2$s</a>',e.prefix,t.call(this),e.className):(0,ft.sprintf)('<a href="%1$s%2$s">%2$s</a>',e.prefix,t.call(this))}group(){if(this.elidedGroups===0)return bc.simpleGroup(this.address).join(":");Qs(typeof this.elidedGroups=="number"),Qs(typeof this.elisionBegin=="number");let e=[],[t,r]=this.address.split("::");t.length?e.push(...bc.simpleGroup(t)):e.push("");let n=["hover-group"];for(let s=this.elisionBegin;s<this.elisionBegin+this.elidedGroups;s++)n.push((0,ft.sprintf)("group-%d",s));return e.push((0,ft.sprintf)('<span class="%s"></span>',n.join(" "))),r.length?e.push(...bc.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(Qs(this.address4 instanceof Qi.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],r=new i(this.correctForm());if(r.elidedGroups===0)t.push((0,Xi.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===Le.GROUPS)t.push((0,Xi.possibleElisions)(Le.GROUPS));else{let n=r.address.split("::");n[0].length&&t.push((0,Xi.simpleRegularExpression)(n[0].split(":"))),Qs(typeof r.elidedGroups=="number"),t.push((0,Xi.possibleElisions)(r.elidedGroups,n[0].length!==0,n[1].length!==0)),n[1].length&&t.push((0,Xi.simpleRegularExpression)(n[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",Xi.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",Xi.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};Xt.Address6=_c});var wc=O(st=>{"use strict";var gS=st&&st.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),yS=st&&st.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),vS=st&&st.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&gS(e,i,t);return yS(e,i),e};Object.defineProperty(st,"__esModule",{value:!0});st.v6=st.AddressError=st.Address6=st.Address4=void 0;var bS=mc();Object.defineProperty(st,"Address4",{enumerable:!0,get:function(){return bS.Address4}});var _S=tg();Object.defineProperty(st,"Address6",{enumerable:!0,get:function(){return _S.Address6}});var wS=Ys();Object.defineProperty(st,"AddressError",{enumerable:!0,get:function(){return wS.AddressError}});var xS=vS(yc());st.v6={helpers:xS}});var ag=O(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.ipToBuffer=Lt.int32ToIpv4=Lt.ipv4ToInt32=Lt.validateSocksClientChainOptions=Lt.validateSocksClientOptions=void 0;var ht=cc(),Xe=ac(),SS=require("stream"),xc=wc(),ig=require("net");function ES(i,e=["connect","bind","associate"]){if(!Xe.SocksCommand[i.command])throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksCommand,i);if(e.indexOf(i.command)===-1)throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksCommandForOperation,i);if(!ng(i.destination))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsDestination,i);if(!sg(i.proxy))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsProxy,i);if(rg(i.proxy,i),i.timeout&&!og(i.timeout))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsTimeout,i);if(i.existing_socket&&!(i.existing_socket instanceof SS.Duplex))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsExistingSocket,i)}Lt.validateSocksClientOptions=ES;function OS(i){if(i.command!=="connect")throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksCommandChain,i);if(!ng(i.destination))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsDestination,i);if(!(i.proxies&&Array.isArray(i.proxies)&&i.proxies.length>=2))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsProxiesLength,i);if(i.proxies.forEach(e=>{if(!sg(e))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsProxy,i);rg(e,i)}),i.timeout&&!og(i.timeout))throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsTimeout,i)}Lt.validateSocksClientChainOptions=OS;function rg(i,e){if(i.custom_auth_method!==void 0){if(i.custom_auth_method<Xe.SOCKS5_CUSTOM_AUTH_START||i.custom_auth_method>Xe.SOCKS5_CUSTOM_AUTH_END)throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(i.custom_auth_request_handler===void 0||typeof i.custom_auth_request_handler!="function")throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_size===void 0)throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_handler===void 0||typeof i.custom_auth_response_handler!="function")throw new ht.SocksClientError(Xe.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}function ng(i){return i&&typeof i.host=="string"&&typeof i.port=="number"&&i.port>=0&&i.port<=65535}function sg(i){return i&&(typeof i.host=="string"||typeof i.ipaddress=="string")&&typeof i.port=="number"&&i.port>=0&&i.port<=65535&&(i.type===4||i.type===5)}function og(i){return typeof i=="number"&&i>0}function kS(i){return new xc.Address4(i).toArray().reduce((t,r)=>(t<<8)+r,0)}Lt.ipv4ToInt32=kS;function CS(i){let e=i>>>24&255,t=i>>>16&255,r=i>>>8&255,n=i&255;return[e,t,r,n].join(".")}Lt.int32ToIpv4=CS;function TS(i){if(ig.isIPv4(i)){let e=new xc.Address4(i);return Buffer.from(e.toArray())}else if(ig.isIPv6(i)){let e=new xc.Address6(i);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}Lt.ipToBuffer=TS});var lg=O(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.ReceiveBuffer=void 0;var Sc=class{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};eo.ReceiveBuffer=Sc});var cg=O(xi=>{"use strict";var Rr=xi&&xi.__awaiter||function(i,e,t,r){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Object.defineProperty(xi,"__esModule",{value:!0});xi.SocksClientError=xi.SocksClient=void 0;var AS=require("events"),Mr=require("net"),gt=Dm(),D=ac(),Ot=ag(),IS=lg(),Oc=cc();Object.defineProperty(xi,"SocksClientError",{enumerable:!0,get:function(){return Oc.SocksClientError}});var Ec=wc(),kc=class i extends AS.EventEmitter{constructor(e){super(),this.options=Object.assign({},e),(0,Ot.validateSocksClientOptions)(e),this.setState(D.SocksClientState.Created)}static createConnection(e,t){return new Promise((r,n)=>{try{(0,Ot.validateSocksClientOptions)(e,["connect"])}catch(o){return typeof t=="function"?(t(o),r(o)):n(o)}let s=new i(e);s.connect(e.existing_socket),s.once("established",o=>{s.removeAllListeners(),typeof t=="function"&&t(null,o),r(o)}),s.once("error",o=>{s.removeAllListeners(),typeof t=="function"?(t(o),r(o)):n(o)})})}static createConnectionChain(e,t){return new Promise((r,n)=>Rr(this,void 0,void 0,function*(){try{(0,Ot.validateSocksClientChainOptions)(e)}catch(s){return typeof t=="function"?(t(s),r(s)):n(s)}e.randomizeChain&&(0,Oc.shuffleArray)(e.proxies);try{let s;for(let o=0;o<e.proxies.length;o++){let a=e.proxies[o],l=o===e.proxies.length-1?e.destination:{host:e.proxies[o+1].host||e.proxies[o+1].ipaddress,port:e.proxies[o+1].port},c=yield i.createConnection({command:"connect",proxy:a,destination:l,existing_socket:s});s=s||c.socket}typeof t=="function"?(t(null,{socket:s}),r({socket:s})):r({socket:s})}catch(s){typeof t=="function"?(t(s),r(s)):n(s)}}))}static createUDPFrame(e){let t=new gt.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),Mr.isIPv4(e.remoteHost.host)?(t.writeUInt8(D.Socks5HostType.IPv4),t.writeUInt32BE((0,Ot.ipv4ToInt32)(e.remoteHost.host))):Mr.isIPv6(e.remoteHost.host)?(t.writeUInt8(D.Socks5HostType.IPv6),t.writeBuffer((0,Ot.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(D.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=gt.SmartBuffer.fromBuffer(e);t.readOffset=2;let r=t.readUInt8(),n=t.readUInt8(),s;n===D.Socks5HostType.IPv4?s=(0,Ot.int32ToIpv4)(t.readUInt32BE()):n===D.Socks5HostType.IPv6?s=Ec.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():s=t.readString(t.readUInt8());let o=t.readUInt16BE();return{frameNumber:r,remoteHost:{host:s,port:o},data:t.readBuffer()}}setState(e){this.state!==D.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=r=>this.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||D.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new Mr.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(D.SocksClientState.Connecting),this.receiveBuffer=new IS.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let n=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",n)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==D.SocksClientState.Established&&this.state!==D.SocksClientState.BoundWaitingForConnection&&this.closeSocket(D.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(D.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(D.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==D.SocksClientState.Established&&this.state!==D.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===D.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===D.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===D.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===D.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(D.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(D.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==D.SocksClientState.Error&&(this.setState(D.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new Oc.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new gt.SmartBuffer;t.writeUInt8(4),t.writeUInt8(D.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),Mr.isIPv4(this.options.destination.host)?(t.writeBuffer((0,Ot.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=D.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==D.Socks4Response.Granted)this.closeSocket(`${D.ERRORS.Socks4ProxyRejectedConnection} - (${D.Socks4Response[e[1]]})`);else if(D.SocksCommand[this.options.command]===D.SocksCommand.bind){let t=gt.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,Ot.int32ToIpv4)(t.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(D.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(D.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==D.Socks4Response.Granted)this.closeSocket(`${D.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${D.Socks4Response[e[1]]})`);else{let t=gt.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,Ot.int32ToIpv4)(t.readUInt32BE())};this.setState(D.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new gt.SmartBuffer,t=[D.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(D.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=D.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(D.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(D.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===D.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(D.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===D.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=D.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===D.Socks5Auth.UserPass?(this.socks5ChosenAuthType=D.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(D.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",r=new gt.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=D.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(D.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return Rr(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(D.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return Rr(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return Rr(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return Rr(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return Rr(this,void 0,void 0,function*(){this.setState(D.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===D.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===D.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(D.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new gt.SmartBuffer;e.writeUInt8(5),e.writeUInt8(D.SocksCommand[this.options.command]),e.writeUInt8(0),Mr.isIPv4(this.options.destination.host)?(e.writeUInt8(D.Socks5HostType.IPv4),e.writeBuffer((0,Ot.ipToBuffer)(this.options.destination.host))):Mr.isIPv6(this.options.destination.host)?(e.writeUInt8(D.Socks5HostType.IPv6),e.writeBuffer((0,Ot.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(D.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(D.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==D.Socks5Response.Granted)this.closeSocket(`${D.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${D.Socks5Response[e[1]]}`);else{let t=e[3],r,n;if(t===D.Socks5HostType.IPv4){let s=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=gt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:(0,Ot.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===D.Socks5HostType.Hostname){let s=e[4],o=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<o){this.nextRequiredPacketBufferSize=o;return}n=gt.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)),r={host:n.readString(s),port:n.readUInt16BE()}}else if(t===D.Socks5HostType.IPv6){let s=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=gt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:Ec.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(D.SocksClientState.ReceivedFinalResponse),D.SocksCommand[this.options.command]===D.SocksCommand.connect?(this.setState(D.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})):D.SocksCommand[this.options.command]===D.SocksCommand.bind?(this.setState(D.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:r,socket:this.socket})):D.SocksCommand[this.options.command]===D.SocksCommand.associate&&(this.setState(D.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==D.Socks5Response.Granted)this.closeSocket(`${D.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${D.Socks5Response[e[1]]}`);else{let t=e[3],r,n;if(t===D.Socks5HostType.IPv4){let s=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=gt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:(0,Ot.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===D.Socks5HostType.Hostname){let s=e[4],o=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<o){this.nextRequiredPacketBufferSize=o;return}n=gt.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)),r={host:n.readString(s),port:n.readUInt16BE()}}else if(t===D.Socks5HostType.IPv6){let s=D.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=gt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:Ec.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(D.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};xi.SocksClient=kc});var ug=O(er=>{"use strict";var NS=er&&er.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),BS=er&&er.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&NS(e,i,t)};Object.defineProperty(er,"__esModule",{value:!0});BS(cg(),er)});var fg=O(Pt=>{"use strict";var LS=Pt&&Pt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),PS=Pt&&Pt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Cc=Pt&&Pt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&LS(e,i,t);return PS(e,i),e},RS=Pt&&Pt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.SocksProxyAgent=void 0;var MS=ug(),DS=pl(),qS=RS(nn()),FS=Cc(require("dns")),jS=Cc(require("net")),US=Cc(require("tls")),$S=require("url"),to=(0,qS.default)("socks-proxy-agent"),VS=i=>i.servername===void 0&&i.host&&!jS.isIP(i.host)?{...i,servername:i.host}:i;function HS(i){let e=!1,t=5,r=i.hostname,n=parseInt(i.port,10)||1080;switch(i.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(i.protocol)}`)}let s={host:r,port:n,type:t};return i.username&&Object.defineProperty(s,"userId",{value:decodeURIComponent(i.username),enumerable:!1}),i.password!=null&&Object.defineProperty(s,"password",{value:decodeURIComponent(i.password),enumerable:!1}),{lookup:e,proxy:s}}var io=class extends DS.Agent{constructor(e,t){var o,a;super(t);let r=typeof e=="string"?new $S.URL(e):e,{proxy:n,lookup:s}=HS(r);this.shouldLookup=s,this.proxy=n,this.timeout=(o=t==null?void 0:t.timeout)!=null?o:null,this.socketOptions=(a=t==null?void 0:t.socketOptions)!=null?a:null}async connect(e,t){var d;let{shouldLookup:r,proxy:n,timeout:s}=this;if(!t.host)throw new Error("No `host` defined!");let{host:o}=t,{port:a,lookup:l=FS.lookup}=t;r&&(o=await new Promise((g,y)=>{l(o,{},(m,b)=>{m?y(m):g(b)})}));let c={proxy:n,destination:{host:o,port:typeof a=="number"?a:parseInt(a,10)},command:"connect",timeout:s!=null?s:void 0,socket_options:(d=this.socketOptions)!=null?d:void 0},u=g=>{e.destroy(),f.destroy(),g&&g.destroy()};to("Creating socks proxy connection: %o",c);let{socket:f}=await MS.SocksClient.createConnection(c);if(to("Successfully created socks proxy connection"),s!==null&&(f.setTimeout(s),f.on("timeout",()=>u())),t.secureEndpoint){to("Upgrading socket connection to TLS");let g=US.connect({...GS(VS(t),"host","path","port"),socket:f});return g.once("error",y=>{to("Socket TLS error",y.message),u(g)}),g}return f}};io.protocols=["socks","socks4","socks4a","socks5","socks5h"];Pt.SocksProxyAgent=io;function GS(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var mg=O((QN,dg)=>{"use strict";var{Duplex:WS}=require("stream");function hg(i){i.emit("close")}function YS(){!this.destroyed&&this._writableState.finished&&this.destroy()}function pg(i){this.removeListener("error",pg),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function KS(i,e){let t=!0,r=new WS({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return i.on("message",function(s,o){let a=!o&&r._readableState.objectMode?s.toString():s;r.push(a)||i.pause()}),i.once("error",function(s){r.destroyed||(t=!1,r.destroy(s))}),i.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(n,s){if(i.readyState===i.CLOSED){s(n),process.nextTick(hg,r);return}let o=!1;i.once("error",function(l){o=!0,s(l)}),i.once("close",function(){o||s(n),process.nextTick(hg,r)}),t&&i.terminate()},r._final=function(n){if(i.readyState===i.CONNECTING){i.once("open",function(){r._final(n)});return}i._socket!==null&&(i._socket._writableState.finished?(n(),r._readableState.endEmitted&&r.destroy()):(i._socket.once("finish",function(){n()}),i.close()))},r._read=function(){i.isPaused&&i.resume()},r._write=function(n,s,o){if(i.readyState===i.CONNECTING){i.once("open",function(){r._write(n,s,o)});return}i.send(n,o)},r.on("end",YS),r.on("error",pg),r}dg.exports=KS});var Si=O((XN,gg)=>{"use strict";gg.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var gn=O((eB,ro)=>{"use strict";var{EMPTY_BUFFER:zS}=Si(),Tc=Buffer[Symbol.species];function JS(i,e){if(i.length===0)return zS;if(i.length===1)return i[0];let t=Buffer.allocUnsafe(e),r=0;for(let n=0;n<i.length;n++){let s=i[n];t.set(s,r),r+=s.length}return r<e?new Tc(t.buffer,t.byteOffset,r):t}function yg(i,e,t,r,n){for(let s=0;s<n;s++)t[r+s]=i[s]^e[s&3]}function vg(i,e){for(let t=0;t<i.length;t++)i[t]^=e[t&3]}function ZS(i){return i.length===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.length)}function Ac(i){if(Ac.readOnly=!0,Buffer.isBuffer(i))return i;let e;return i instanceof ArrayBuffer?e=new Tc(i):ArrayBuffer.isView(i)?e=new Tc(i.buffer,i.byteOffset,i.byteLength):(e=Buffer.from(i),Ac.readOnly=!1),e}ro.exports={concat:JS,mask:yg,toArrayBuffer:ZS,toBuffer:Ac,unmask:vg};if(!process.env.WS_NO_BUFFER_UTIL)try{let i=require("bufferutil");ro.exports.mask=function(e,t,r,n,s){s<48?yg(e,t,r,n,s):i.mask(e,t,r,n,s)},ro.exports.unmask=function(e,t){e.length<32?vg(e,t):i.unmask(e,t)}}catch{}});var wg=O((tB,_g)=>{"use strict";var bg=Symbol("kDone"),Ic=Symbol("kRun"),Nc=class{constructor(e){this[bg]=()=>{this.pending--,this[Ic]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Ic]()}[Ic](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[bg])}}};_g.exports=Nc});var bn=O((iB,Og)=>{"use strict";var yn=require("zlib"),xg=gn(),QS=wg(),{kStatusCode:Sg}=Si(),XS=Buffer[Symbol.species],eE=Buffer.from([0,0,255,255]),oo=Symbol("permessage-deflate"),fi=Symbol("total-length"),vn=Symbol("callback"),Ei=Symbol("buffers"),so=Symbol("error"),no,Bc=class{constructor(e,t,r){if(this._maxPayload=r|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!no){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;no=new QS(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[vn];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,r=e.find(n=>!(t.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>n.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(r.server_no_context_takeover=!0),t.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(r.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?r.client_max_window_bits=t.clientMaxWindowBits:(r.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(r=>{let n=t[r];if(n.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(n=n[0],r==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else if(r==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else throw new Error(`Unknown parameter "${r}"`);t[r]=n})}),e}decompress(e,t,r){no.add(n=>{this._decompress(e,t,(s,o)=>{n(),r(s,o)})})}compress(e,t,r){no.add(n=>{this._compress(e,t,(s,o)=>{n(),r(s,o)})})}_decompress(e,t,r){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?yn.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=yn.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[oo]=this,this._inflate[fi]=0,this._inflate[Ei]=[],this._inflate.on("error",iE),this._inflate.on("data",Eg)}this._inflate[vn]=r,this._inflate.write(e),t&&this._inflate.write(eE),this._inflate.flush(()=>{let s=this._inflate[so];if(s){this._inflate.close(),this._inflate=null,r(s);return}let o=xg.concat(this._inflate[Ei],this._inflate[fi]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[fi]=0,this._inflate[Ei]=[],t&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,t,r){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?yn.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=yn.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[fi]=0,this._deflate[Ei]=[],this._deflate.on("data",tE)}this._deflate[vn]=r,this._deflate.write(e),this._deflate.flush(yn.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=xg.concat(this._deflate[Ei],this._deflate[fi]);t&&(s=new XS(s.buffer,s.byteOffset,s.length-4)),this._deflate[vn]=null,this._deflate[fi]=0,this._deflate[Ei]=[],t&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),r(null,s)})}};Og.exports=Bc;function tE(i){this[Ei].push(i),this[fi]+=i.length}function Eg(i){if(this[fi]+=i.length,this[oo]._maxPayload<1||this[fi]<=this[oo]._maxPayload){this[Ei].push(i);return}this[so]=new RangeError("Max payload size exceeded"),this[so].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[so][Sg]=1009,this.removeListener("data",Eg),this.reset()}function iE(i){this[oo]._inflate=null,i[Sg]=1007,this[vn](i)}});var _n=O((rB,ao)=>{"use strict";var{isUtf8:kg}=require("buffer"),rE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function nE(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function Lc(i){let e=i.length,t=0;for(;t<e;)if((i[t]&128)===0)t++;else if((i[t]&224)===192){if(t+1===e||(i[t+1]&192)!==128||(i[t]&254)===192)return!1;t+=2}else if((i[t]&240)===224){if(t+2>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||i[t]===224&&(i[t+1]&224)===128||i[t]===237&&(i[t+1]&224)===160)return!1;t+=3}else if((i[t]&248)===240){if(t+3>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||(i[t+3]&192)!==128||i[t]===240&&(i[t+1]&240)===128||i[t]===244&&i[t+1]>143||i[t]>244)return!1;t+=4}else return!1;return!0}ao.exports={isValidStatusCode:nE,isValidUTF8:Lc,tokenChars:rE};if(kg)ao.exports.isValidUTF8=function(i){return i.length<24?Lc(i):kg(i)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let i=require("utf-8-validate");ao.exports.isValidUTF8=function(e){return e.length<32?Lc(e):i(e)}}catch{}});var qc=O((nB,Lg)=>{"use strict";var{Writable:sE}=require("stream"),Cg=bn(),{BINARY_TYPES:oE,EMPTY_BUFFER:Tg,kStatusCode:aE,kWebSocket:lE}=Si(),{concat:Pc,toArrayBuffer:cE,unmask:uE}=gn(),{isValidStatusCode:fE,isValidUTF8:Ag}=_n(),lo=Buffer[Symbol.species],Rt=0,Ig=1,Ng=2,Bg=3,Rc=4,Mc=5,co=6,Dc=class extends sE{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||oE[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[lE]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Rt}_write(e,t,r){if(this._opcode===8&&this._state==Rt)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new lo(r.buffer,r.byteOffset+e,r.length-e),new lo(r.buffer,r.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let r=this._buffers[0],n=t.length-e;e>=r.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(r.buffer,r.byteOffset,e),n),this._buffers[0]=new lo(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case Rt:this.getInfo(e);break;case Ig:this.getPayloadLength16(e);break;case Ng:this.getPayloadLength64(e);break;case Bg:this.getMask();break;case Rc:this.getData(e);break;case Mc:case co:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let r=(t[0]&64)===64;if(r&&!this._extensions[Cg.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=Ig:this._payloadLength===127?this._state=Ng:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),r=t.readUInt32BE(0);if(r>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=r*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=Bg:this._state=Rc}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Rc}getData(e){let t=Tg;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&uE(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=Mc,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[Cg.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return t(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._fragments.push(s)}this.dataMessage(t),this._state===Rt&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=Rt;return}let t=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Pc(r,t):this._binaryType==="arraybuffer"?n=cE(Pc(r,t)):n=r,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=Rt):(this._state=co,setImmediate(()=>{this.emit("message",n,!0),this._state=Rt,this.startLoop(e)}))}else{let n=Pc(r,t);if(!this._skipUTF8Validation&&!Ag(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===Mc||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=Rt):(this._state=co,setImmediate(()=>{this.emit("message",n,!1),this._state=Rt,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Tg),this.end();else{let r=e.readUInt16BE(0);if(!fE(r)){let s=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let n=new lo(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Ag(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",r,n),this.end()}this._state=Rt;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Rt):(this._state=co,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Rt,this.startLoop(t)}))}createError(e,t,r,n,s){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=s,o[aE]=n,o}};Lg.exports=Dc});var jc=O((oB,Mg)=>{"use strict";var{Duplex:sB}=require("stream"),{randomFillSync:hE}=require("crypto"),Pg=bn(),{EMPTY_BUFFER:pE}=Si(),{isValidStatusCode:dE}=_n(),{mask:Rg,toBuffer:Dr}=gn(),Ht=Symbol("kByteLength"),mE=Buffer.alloc(4),uo=8*1024,tr,qr=uo,Fc=class i{constructor(e,t,r){this._extensions=t||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let r,n=!1,s=2,o=!1;t.mask&&(r=t.maskBuffer||mE,t.generateMask?t.generateMask(r):(qr===uo&&(tr===void 0&&(tr=Buffer.alloc(uo)),hE(tr,0,uo),qr=0),r[0]=tr[qr++],r[1]=tr[qr++],r[2]=tr[qr++],r[3]=tr[qr++]),o=(r[0]|r[1]|r[2]|r[3])===0,s=6);let a;typeof e=="string"?(!t.mask||o)&&t[Ht]!==void 0?a=t[Ht]:(e=Buffer.from(e),a=e.length):(a=e.length,n=t.mask&&t.readOnly&&!o);let l=a;a>=65536?(s+=8,l=127):a>125&&(s+=2,l=126);let c=Buffer.allocUnsafe(n?a+s:s);return c[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(c[0]|=64),c[1]=l,l===126?c.writeUInt16BE(a,2):l===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),t.mask?(c[1]|=128,c[s-4]=r[0],c[s-3]=r[1],c[s-2]=r[2],c[s-1]=r[3],o?[c,e]:n?(Rg(e,r,c,s,a),[c]):(Rg(e,r,e,0,a),[c,e])):[c,e]}close(e,t,r,n){let s;if(e===void 0)s=pE;else{if(typeof e!="number"||!dE(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(t);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof t=="string"?s.write(t,2):s.set(t,2)}}let o={[Ht]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,n]):this.sendFrame(i.frame(s,o),n)}ping(e,t,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Dr(e),n=e.length,s=Dr.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ht]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(i.frame(e,o),r)}pong(e,t,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Dr(e),n=e.length,s=Dr.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ht]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(i.frame(e,o),r)}send(e,t,r){let n=this._extensions[Pg.extensionName],s=t.binary?2:1,o=t.compress,a,l;if(typeof e=="string"?(a=Buffer.byteLength(e),l=!1):(e=Dr(e),a=e.length,l=Dr.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=n._threshold),this._compress=o):(o=!1,s=0),t.fin&&(this._firstFragment=!0),n){let c={[Ht]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:o};this._deflating?this.enqueue([this.dispatch,e,this._compress,c,r]):this.dispatch(e,this._compress,c,r)}else this.sendFrame(i.frame(e,{[Ht]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:!1}),r)}dispatch(e,t,r,n){if(!t){this.sendFrame(i.frame(e,r),n);return}let s=this._extensions[Pg.extensionName];this._bufferedBytes+=r[Ht],this._deflating=!0,s.compress(e,r.fin,(o,a)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(l);for(let c=0;c<this._queue.length;c++){let u=this._queue[c],f=u[u.length-1];typeof f=="function"&&f(l)}return}this._bufferedBytes-=r[Ht],this._deflating=!1,r.readOnly=!1,this.sendFrame(i.frame(a,r),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][Ht],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Ht],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Mg.exports=Fc});var Gg=O((aB,Hg)=>{"use strict";var{kForOnEventAttribute:wn,kListener:Uc}=Si(),Dg=Symbol("kCode"),qg=Symbol("kData"),Fg=Symbol("kError"),jg=Symbol("kMessage"),Ug=Symbol("kReason"),Fr=Symbol("kTarget"),$g=Symbol("kType"),Vg=Symbol("kWasClean"),hi=class{constructor(e){this[Fr]=null,this[$g]=e}get target(){return this[Fr]}get type(){return this[$g]}};Object.defineProperty(hi.prototype,"target",{enumerable:!0});Object.defineProperty(hi.prototype,"type",{enumerable:!0});var ir=class extends hi{constructor(e,t={}){super(e),this[Dg]=t.code===void 0?0:t.code,this[Ug]=t.reason===void 0?"":t.reason,this[Vg]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Dg]}get reason(){return this[Ug]}get wasClean(){return this[Vg]}};Object.defineProperty(ir.prototype,"code",{enumerable:!0});Object.defineProperty(ir.prototype,"reason",{enumerable:!0});Object.defineProperty(ir.prototype,"wasClean",{enumerable:!0});var jr=class extends hi{constructor(e,t={}){super(e),this[Fg]=t.error===void 0?null:t.error,this[jg]=t.message===void 0?"":t.message}get error(){return this[Fg]}get message(){return this[jg]}};Object.defineProperty(jr.prototype,"error",{enumerable:!0});Object.defineProperty(jr.prototype,"message",{enumerable:!0});var xn=class extends hi{constructor(e,t={}){super(e),this[qg]=t.data===void 0?null:t.data}get data(){return this[qg]}};Object.defineProperty(xn.prototype,"data",{enumerable:!0});var gE={addEventListener(i,e,t={}){for(let n of this.listeners(i))if(!t[wn]&&n[Uc]===e&&!n[wn])return;let r;if(i==="message")r=function(s,o){let a=new xn("message",{data:o?s:s.toString()});a[Fr]=this,fo(e,this,a)};else if(i==="close")r=function(s,o){let a=new ir("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Fr]=this,fo(e,this,a)};else if(i==="error")r=function(s){let o=new jr("error",{error:s,message:s.message});o[Fr]=this,fo(e,this,o)};else if(i==="open")r=function(){let s=new hi("open");s[Fr]=this,fo(e,this,s)};else return;r[wn]=!!t[wn],r[Uc]=e,t.once?this.once(i,r):this.on(i,r)},removeEventListener(i,e){for(let t of this.listeners(i))if(t[Uc]===e&&!t[wn]){this.removeListener(i,t);break}}};Hg.exports={CloseEvent:ir,ErrorEvent:jr,Event:hi,EventTarget:gE,MessageEvent:xn};function fo(i,e,t){typeof i=="object"&&i.handleEvent?i.handleEvent.call(i,t):i.call(e,t)}});var $c=O((lB,Wg)=>{"use strict";var{tokenChars:Sn}=_n();function ei(i,e,t){i[e]===void 0?i[e]=[t]:i[e].push(t)}function yE(i){let e=Object.create(null),t=Object.create(null),r=!1,n=!1,s=!1,o,a,l=-1,c=-1,u=-1,f=0;for(;f<i.length;f++)if(c=i.charCodeAt(f),o===void 0)if(u===-1&&Sn[c]===1)l===-1&&(l=f);else if(f!==0&&(c===32||c===9))u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let g=i.slice(l,u);c===44?(ei(e,g,t),t=Object.create(null)):o=g,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(a===void 0)if(u===-1&&Sn[c]===1)l===-1&&(l=f);else if(c===32||c===9)u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f),ei(t,i.slice(l,u),!0),c===44&&(ei(e,o,t),t=Object.create(null),o=void 0),l=u=-1}else if(c===61&&l!==-1&&u===-1)a=i.slice(l,f),l=u=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(n){if(Sn[c]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);l===-1?l=f:r||(r=!0),n=!1}else if(s)if(Sn[c]===1)l===-1&&(l=f);else if(c===34&&l!==-1)s=!1,u=f;else if(c===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(c===34&&i.charCodeAt(f-1)===61)s=!0;else if(u===-1&&Sn[c]===1)l===-1&&(l=f);else if(l!==-1&&(c===32||c===9))u===-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let g=i.slice(l,u);r&&(g=g.replace(/\\/g,""),r=!1),ei(t,a,g),c===44&&(ei(e,o,t),t=Object.create(null),o=void 0),a=void 0,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(l===-1||s||c===32||c===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=f);let d=i.slice(l,u);return o===void 0?ei(e,d,t):(a===void 0?ei(t,d,!0):r?ei(t,a,d.replace(/\\/g,"")):ei(t,a,d),ei(e,o,t)),e}function vE(i){return Object.keys(i).map(e=>{let t=i[e];return Array.isArray(t)||(t=[t]),t.map(r=>[e].concat(Object.keys(r).map(n=>{let s=r[n];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Wg.exports={format:vE,parse:yE}});var Yc=O((fB,r0)=>{"use strict";var bE=require("events"),_E=require("https"),wE=require("http"),zg=require("net"),xE=require("tls"),{randomBytes:SE,createHash:EE}=require("crypto"),{Duplex:cB,Readable:uB}=require("stream"),{URL:Vc}=require("url"),Oi=bn(),OE=qc(),kE=jc(),{BINARY_TYPES:Yg,EMPTY_BUFFER:ho,GUID:CE,kForOnEventAttribute:Hc,kListener:TE,kStatusCode:AE,kWebSocket:ot,NOOP:Jg}=Si(),{EventTarget:{addEventListener:IE,removeEventListener:NE}}=Gg(),{format:BE,parse:LE}=$c(),{toBuffer:PE}=gn(),RE=30*1e3,Zg=Symbol("kAborted"),Gc=[8,13],pi=["CONNECTING","OPEN","CLOSING","CLOSED"],ME=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Fe=class i extends bE{constructor(e,t,r){super(),this._binaryType=Yg[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ho,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=i.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(r=t,t=[]):t=[t]),Qg(this,e,t,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Yg.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,r){let n=new OE({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new kE(e,this._extensions,r.generateMask),this._receiver=n,this._socket=e,n[ot]=this,e[ot]=this,n.on("conclude",FE),n.on("drain",jE),n.on("error",UE),n.on("message",$E),n.on("ping",VE),n.on("pong",HE),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",e0),e.on("data",mo),e.on("end",t0),e.on("error",i0),this._readyState=i.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Oi.extensionName]&&this._extensions[Oi.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){kt(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===i.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=i.CLOSING,this._sender.close(e,t,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),RE)}}pause(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=t=void 0):typeof t=="function"&&(r=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){Wc(this,e,r);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||ho,t,r)}pong(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=t=void 0):typeof t=="function"&&(r=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){Wc(this,e,r);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||ho,t,r)}resume(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(r=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){Wc(this,e,r);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Oi.extensionName]||(n.compress=!1),this._sender.send(e||ho,n,r)}terminate(){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){kt(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=i.CLOSING,this._socket.destroy())}}};Object.defineProperty(Fe,"CONNECTING",{enumerable:!0,value:pi.indexOf("CONNECTING")});Object.defineProperty(Fe.prototype,"CONNECTING",{enumerable:!0,value:pi.indexOf("CONNECTING")});Object.defineProperty(Fe,"OPEN",{enumerable:!0,value:pi.indexOf("OPEN")});Object.defineProperty(Fe.prototype,"OPEN",{enumerable:!0,value:pi.indexOf("OPEN")});Object.defineProperty(Fe,"CLOSING",{enumerable:!0,value:pi.indexOf("CLOSING")});Object.defineProperty(Fe.prototype,"CLOSING",{enumerable:!0,value:pi.indexOf("CLOSING")});Object.defineProperty(Fe,"CLOSED",{enumerable:!0,value:pi.indexOf("CLOSED")});Object.defineProperty(Fe.prototype,"CLOSED",{enumerable:!0,value:pi.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(i=>{Object.defineProperty(Fe.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(Fe.prototype,`on${i}`,{enumerable:!0,get(){for(let e of this.listeners(i))if(e[Hc])return e[TE];return null},set(e){for(let t of this.listeners(i))if(t[Hc]){this.removeListener(i,t);break}typeof e=="function"&&this.addEventListener(i,e,{[Hc]:!0})}})});Fe.prototype.addEventListener=IE;Fe.prototype.removeEventListener=NE;r0.exports=Fe;function Qg(i,e,t,r){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Gc[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(i._autoPong=n.autoPong,!Gc.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Gc.join(", ")})`);let s;if(e instanceof Vc)s=e;else try{s=new Vc(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),i._url=s.href;let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!o&&!a?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:a&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let m=new SyntaxError(l);if(i._redirects===0)throw m;po(i,m);return}let c=o?443:80,u=SE(16).toString("base64"),f=o?_E.request:wE.request,d=new Set,g;if(n.createConnection=n.createConnection||(o?qE:DE),n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(g=new Oi(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=BE({[Oi.extensionName]:g.offer()})),t.length){for(let m of t){if(typeof m!="string"||!ME.test(m)||d.has(m))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(m)}n.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),a){let m=n.path.split(":");n.socketPath=m[0],n.path=m[1]}let y;if(n.followRedirects){if(i._redirects===0){i._originalIpc=a,i._originalSecure=o,i._originalHostOrSocketPath=a?n.socketPath:s.host;let m=r&&r.headers;if(r={...r,headers:{}},m)for(let[b,w]of Object.entries(m))r.headers[b.toLowerCase()]=w}else if(i.listenerCount("redirect")===0){let m=a?i._originalIpc?n.socketPath===i._originalHostOrSocketPath:!1:i._originalIpc?!1:s.host===i._originalHostOrSocketPath;(!m||i._originalSecure&&!o)&&(delete n.headers.authorization,delete n.headers.cookie,m||delete n.headers.host,n.auth=void 0)}n.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),y=i._req=f(n),i._redirects&&i.emit("redirect",i.url,y)}else y=i._req=f(n);n.timeout&&y.on("timeout",()=>{kt(i,y,"Opening handshake has timed out")}),y.on("error",m=>{y===null||y[Zg]||(y=i._req=null,po(i,m))}),y.on("response",m=>{let b=m.headers.location,w=m.statusCode;if(b&&n.followRedirects&&w>=300&&w<400){if(++i._redirects>n.maxRedirects){kt(i,y,"Maximum redirects exceeded");return}y.abort();let x;try{x=new Vc(b,e)}catch{let k=new SyntaxError(`Invalid URL: ${b}`);po(i,k);return}Qg(i,x,t,r)}else i.emit("unexpected-response",y,m)||kt(i,y,`Unexpected server response: ${m.statusCode}`)}),y.on("upgrade",(m,b,w)=>{if(i.emit("upgrade",m),i.readyState!==Fe.CONNECTING)return;y=i._req=null;let x=m.headers.upgrade;if(x===void 0||x.toLowerCase()!=="websocket"){kt(i,b,"Invalid Upgrade header");return}let _=EE("sha1").update(u+CE).digest("base64");if(m.headers["sec-websocket-accept"]!==_){kt(i,b,"Invalid Sec-WebSocket-Accept header");return}let k=m.headers["sec-websocket-protocol"],S;if(k!==void 0?d.size?d.has(k)||(S="Server sent an invalid subprotocol"):S="Server sent a subprotocol but none was requested":d.size&&(S="Server sent no subprotocol"),S){kt(i,b,S);return}k&&(i._protocol=k);let R=m.headers["sec-websocket-extensions"];if(R!==void 0){if(!g){kt(i,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let T;try{T=LE(R)}catch{kt(i,b,"Invalid Sec-WebSocket-Extensions header");return}let N=Object.keys(T);if(N.length!==1||N[0]!==Oi.extensionName){kt(i,b,"Server indicated an extension that was not requested");return}try{g.accept(T[Oi.extensionName])}catch{kt(i,b,"Invalid Sec-WebSocket-Extensions header");return}i._extensions[Oi.extensionName]=g}i.setSocket(b,w,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(y,i):y.end()}function po(i,e){i._readyState=Fe.CLOSING,i.emit("error",e),i.emitClose()}function DE(i){return i.path=i.socketPath,zg.connect(i)}function qE(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=zg.isIP(i.host)?"":i.host),xE.connect(i)}function kt(i,e,t){i._readyState=Fe.CLOSING;let r=new Error(t);Error.captureStackTrace(r,kt),e.setHeader?(e[Zg]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(po,i,r)):(e.destroy(r),e.once("error",i.emit.bind(i,"error")),e.once("close",i.emitClose.bind(i)))}function Wc(i,e,t){if(e){let r=PE(e).length;i._socket?i._sender._bufferedBytes+=r:i._bufferedAmount+=r}if(t){let r=new Error(`WebSocket is not open: readyState ${i.readyState} (${pi[i.readyState]})`);process.nextTick(t,r)}}function FE(i,e){let t=this[ot];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=i,t._socket[ot]!==void 0&&(t._socket.removeListener("data",mo),process.nextTick(Xg,t._socket),i===1005?t.close():t.close(i,e))}function jE(){let i=this[ot];i.isPaused||i._socket.resume()}function UE(i){let e=this[ot];e._socket[ot]!==void 0&&(e._socket.removeListener("data",mo),process.nextTick(Xg,e._socket),e.close(i[AE])),e.emit("error",i)}function Kg(){this[ot].emitClose()}function $E(i,e){this[ot].emit("message",i,e)}function VE(i){let e=this[ot];e._autoPong&&e.pong(i,!this._isServer,Jg),e.emit("ping",i)}function HE(i){this[ot].emit("pong",i)}function Xg(i){i.resume()}function e0(){let i=this[ot];this.removeListener("close",e0),this.removeListener("data",mo),this.removeListener("end",t0),i._readyState=Fe.CLOSING;let e;!this._readableState.endEmitted&&!i._closeFrameReceived&&!i._receiver._writableState.errorEmitted&&(e=i._socket.read())!==null&&i._receiver.write(e),i._receiver.end(),this[ot]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",Kg),i._receiver.on("finish",Kg))}function mo(i){this[ot]._receiver.write(i)||this.pause()}function t0(){let i=this[ot];i._readyState=Fe.CLOSING,i._receiver.end(),this.end()}function i0(){let i=this[ot];this.removeListener("error",i0),this.on("error",Jg),i&&(i._readyState=Fe.CLOSING,this.destroy())}});var s0=O((hB,n0)=>{"use strict";var{tokenChars:GE}=_n();function WE(i){let e=new Set,t=-1,r=-1,n=0;for(n;n<i.length;n++){let o=i.charCodeAt(n);if(r===-1&&GE[o]===1)t===-1&&(t=n);else if(n!==0&&(o===32||o===9))r===-1&&t!==-1&&(r=n);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${n}`);r===-1&&(r=n);let a=i.slice(t,r);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),t=r=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(t===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let s=i.slice(t,n);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}n0.exports={parse:WE}});var h0=O((dB,f0)=>{"use strict";var YE=require("events"),go=require("http"),{Duplex:pB}=require("stream"),{createHash:KE}=require("crypto"),o0=$c(),rr=bn(),zE=s0(),JE=Yc(),{GUID:ZE,kWebSocket:QE}=Si(),XE=/^[+/0-9A-Za-z]{22}==$/,a0=0,l0=1,u0=2,Kc=class extends YE{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:JE,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=go.createServer((r,n)=>{let s=go.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=eO(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,o)=>{this.handleUpgrade(n,s,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=a0}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===u0){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(En,this);return}if(e&&this.once("close",e),this._state!==l0)if(this._state=l0,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(En,this):process.nextTick(En,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{En(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,r,n){t.on("error",c0);let s=e.headers["sec-websocket-key"],o=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){nr(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){nr(this,e,t,400,"Invalid Upgrade header");return}if(s===void 0||!XE.test(s)){nr(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){nr(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){On(t,400);return}let l=e.headers["sec-websocket-protocol"],c=new Set;if(l!==void 0)try{c=zE.parse(l)}catch{nr(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&u!==void 0){let d=new rr(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let g=o0.parse(u);g[rr.extensionName]&&(d.accept(g[rr.extensionName]),f[rr.extensionName]=d)}catch{nr(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(g,y,m,b)=>{if(!g)return On(t,y||401,m,b);this.completeUpgrade(f,s,c,e,t,r,n)});return}if(!this.options.verifyClient(d))return On(t,401)}this.completeUpgrade(f,s,c,e,t,r,n)}completeUpgrade(e,t,r,n,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[QE])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>a0)return On(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${KE("sha1").update(t+ZE).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(r.size){let f=this.options.handleProtocols?this.options.handleProtocols(r,n):r.values().next().value;f&&(c.push(`Sec-WebSocket-Protocol: ${f}`),u._protocol=f)}if(e[rr.extensionName]){let f=e[rr.extensionName].params,d=o0.format({[rr.extensionName]:[f]});c.push(`Sec-WebSocket-Extensions: ${d}`),u._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r
46
46
  `).join(`\r
47
- `)),s.removeListener("error",Zv),u.setSocket(s,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(_s,this)})),o(u,n)}};Qv.exports=Lu;function NO(r,e){for(let t of Object.keys(e))r.on(t,e[t]);return function(){for(let i of Object.keys(e))r.removeListener(i,e[i])}}function _s(r){r._state=Jv,r.emit("close")}function Zv(){this.destroy()}function bs(r,e,t,i){t=t||po.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...i},r.once("finish",r.destroy),r.end(`HTTP/1.1 ${e} ${po.STATUS_CODES[e]}\r
48
- `+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
47
+ `)),s.removeListener("error",c0),u.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(En,this)})),a(u,n)}};f0.exports=Kc;function eO(i,e){for(let t of Object.keys(e))i.on(t,e[t]);return function(){for(let r of Object.keys(e))i.removeListener(r,e[r])}}function En(i){i._state=u0,i.emit("close")}function c0(){this.destroy()}function On(i,e,t,r){t=t||go.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...r},i.once("finish",i.destroy),i.end(`HTTP/1.1 ${e} ${go.STATUS_CODES[e]}\r
48
+ `+Object.keys(r).map(n=>`${n}: ${r[n]}`).join(`\r
49
49
  `)+`\r
50
50
  \r
51
- `+t)}function Ni(r,e,t,i,n){if(r.listenerCount("wsClientError")){let s=new Error(n);Error.captureStackTrace(s,Ni),r.emit("wsClientError",s,t,e)}else bs(t,i,n)}});var Le=w(ut=>{"use strict";var Mu=Symbol.for("yaml.alias"),ry=Symbol.for("yaml.document"),mo=Symbol.for("yaml.map"),iy=Symbol.for("yaml.pair"),Du=Symbol.for("yaml.scalar"),go=Symbol.for("yaml.seq"),Pr=Symbol.for("yaml.node.type"),BO=r=>!!r&&typeof r=="object"&&r[Pr]===Mu,RO=r=>!!r&&typeof r=="object"&&r[Pr]===ry,PO=r=>!!r&&typeof r=="object"&&r[Pr]===mo,MO=r=>!!r&&typeof r=="object"&&r[Pr]===iy,ny=r=>!!r&&typeof r=="object"&&r[Pr]===Du,DO=r=>!!r&&typeof r=="object"&&r[Pr]===go;function sy(r){if(r&&typeof r=="object")switch(r[Pr]){case mo:case go:return!0}return!1}function FO(r){if(r&&typeof r=="object")switch(r[Pr]){case Mu:case mo:case Du:case go:return!0}return!1}var qO=r=>(ny(r)||sy(r))&&!!r.anchor;ut.ALIAS=Mu;ut.DOC=ry;ut.MAP=mo;ut.NODE_TYPE=Pr;ut.PAIR=iy;ut.SCALAR=Du;ut.SEQ=go;ut.hasAnchor=qO;ut.isAlias=BO;ut.isCollection=sy;ut.isDocument=RO;ut.isMap=PO;ut.isNode=FO;ut.isPair=MO;ut.isScalar=ny;ut.isSeq=DO});var xs=w(Fu=>{"use strict";var et=Le(),Tt=Symbol("break visit"),ay=Symbol("skip children"),yr=Symbol("remove node");function vo(r,e){let t=oy(e);et.isDocument(r)?Ln(null,r.contents,t,Object.freeze([r]))===yr&&(r.contents=null):Ln(null,r,t,Object.freeze([]))}vo.BREAK=Tt;vo.SKIP=ay;vo.REMOVE=yr;function Ln(r,e,t,i){let n=ly(r,e,t,i);if(et.isNode(n)||et.isPair(n))return cy(r,i,n),Ln(r,n,t,i);if(typeof n!="symbol"){if(et.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let a=Ln(s,e.items[s],t,i);if(typeof a=="number")s=a-1;else{if(a===Tt)return Tt;a===yr&&(e.items.splice(s,1),s-=1)}}}else if(et.isPair(e)){i=Object.freeze(i.concat(e));let s=Ln("key",e.key,t,i);if(s===Tt)return Tt;s===yr&&(e.key=null);let a=Ln("value",e.value,t,i);if(a===Tt)return Tt;a===yr&&(e.value=null)}}return n}async function yo(r,e){let t=oy(e);et.isDocument(r)?await Bn(null,r.contents,t,Object.freeze([r]))===yr&&(r.contents=null):await Bn(null,r,t,Object.freeze([]))}yo.BREAK=Tt;yo.SKIP=ay;yo.REMOVE=yr;async function Bn(r,e,t,i){let n=await ly(r,e,t,i);if(et.isNode(n)||et.isPair(n))return cy(r,i,n),Bn(r,n,t,i);if(typeof n!="symbol"){if(et.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let a=await Bn(s,e.items[s],t,i);if(typeof a=="number")s=a-1;else{if(a===Tt)return Tt;a===yr&&(e.items.splice(s,1),s-=1)}}}else if(et.isPair(e)){i=Object.freeze(i.concat(e));let s=await Bn("key",e.key,t,i);if(s===Tt)return Tt;s===yr&&(e.key=null);let a=await Bn("value",e.value,t,i);if(a===Tt)return Tt;a===yr&&(e.value=null)}}return n}function oy(r){return typeof r=="object"&&(r.Collection||r.Node||r.Value)?Object.assign({Alias:r.Node,Map:r.Node,Scalar:r.Node,Seq:r.Node},r.Value&&{Map:r.Value,Scalar:r.Value,Seq:r.Value},r.Collection&&{Map:r.Collection,Seq:r.Collection},r):r}function ly(r,e,t,i){var n,s,a,o,l;if(typeof t=="function")return t(r,e,i);if(et.isMap(e))return(n=t.Map)==null?void 0:n.call(t,r,e,i);if(et.isSeq(e))return(s=t.Seq)==null?void 0:s.call(t,r,e,i);if(et.isPair(e))return(a=t.Pair)==null?void 0:a.call(t,r,e,i);if(et.isScalar(e))return(o=t.Scalar)==null?void 0:o.call(t,r,e,i);if(et.isAlias(e))return(l=t.Alias)==null?void 0:l.call(t,r,e,i)}function cy(r,e,t){let i=e[e.length-1];if(et.isCollection(i))i.items[r]=t;else if(et.isPair(i))r==="key"?i.key=t:i.value=t;else if(et.isDocument(i))i.contents=t;else{let n=et.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Fu.visit=vo;Fu.visitAsync=yo});var qu=w(fy=>{"use strict";var uy=Le(),jO=xs(),UO={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},$O=r=>r.replace(/[!,[\]{}]/g,e=>UO[e]),ws=class r{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},r.defaultYaml,e),this.tags=Object.assign({},r.defaultTags,t)}clone(){let e=new r(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new r(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:r.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},r.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:r.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},r.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[s,a]=i;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=i;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,a),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);return a==="!"||a==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),a)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let s=this.tags[i];if(s)try{return s+decodeURIComponent(n)}catch(a){return t(String(a)),null}return i==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,i]of Object.entries(this.tags))if(e.startsWith(i))return t+$O(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&uy.isNode(e.contents)){let s={};jO.visit(e.contents,(a,o)=>{uy.isNode(o)&&o.tag&&(s[o.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,a]of i)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||n.some(o=>o.startsWith(a)))&&t.push(`%TAG ${s} ${a}`);return t.join(`
52
- `)}};ws.defaultYaml={explicit:!1,version:"1.2"};ws.defaultTags={"!!":"tag:yaml.org,2002:"};fy.Directives=ws});var _o=w(Ss=>{"use strict";var hy=Le(),VO=xs();function HO(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(t)}return!0}function dy(r){let e=new Set;return VO.visit(r,{Value(t,i){i.anchor&&e.add(i.anchor)}}),e}function py(r,e){for(let t=1;;++t){let i=`${r}${t}`;if(!e.has(i))return i}}function GO(r,e){let t=[],i=new Map,n=null;return{onAnchor:s=>{t.push(s),n||(n=dy(r));let a=py(e,n);return n.add(a),a},setAnchors:()=>{for(let s of t){let a=i.get(s);if(typeof a=="object"&&a.anchor&&(hy.isScalar(a.node)||hy.isCollection(a.node)))a.node.anchor=a.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:i}}Ss.anchorIsValid=HO;Ss.anchorNames=dy;Ss.createNodeAnchors=GO;Ss.findNewAnchor=py});var ju=w(my=>{"use strict";function Es(r,e,t,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,s=i.length;n<s;++n){let a=i[n],o=Es(r,i,String(n),a);o===void 0?delete i[n]:o!==a&&(i[n]=o)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let s=i.get(n),a=Es(r,i,n,s);a===void 0?i.delete(n):a!==s&&i.set(n,a)}else if(i instanceof Set)for(let n of Array.from(i)){let s=Es(r,i,n,n);s===void 0?i.delete(n):s!==n&&(i.delete(n),i.add(s))}else for(let[n,s]of Object.entries(i)){let a=Es(r,i,n,s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}return r.call(e,t,i)}my.applyReviver=Es});var Jr=w(vy=>{"use strict";var WO=Le();function gy(r,e,t){if(Array.isArray(r))return r.map((i,n)=>gy(i,String(n),t));if(r&&typeof r.toJSON=="function"){if(!t||!WO.hasAnchor(r))return r.toJSON(e,t);let i={aliasCount:0,count:1,res:void 0};t.anchors.set(r,i),t.onCreate=s=>{i.res=s,delete t.onCreate};let n=r.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof r=="bigint"&&!(t!=null&&t.keep)?Number(r):r}vy.toJS=gy});var bo=w(_y=>{"use strict";var zO=ju(),yy=Le(),YO=Jr(),Uu=class{constructor(e){Object.defineProperty(this,yy.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:i,onAnchor:n,reviver:s}={}){if(!yy.isDocument(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},o=YO.toJS(this,"",a);if(typeof n=="function")for(let{count:l,res:c}of a.anchors.values())n(c,l);return typeof s=="function"?zO.applyReviver(s,{"":o},"",o):o}};_y.NodeBase=Uu});var ks=w(xy=>{"use strict";var KO=_o(),by=xs(),xo=Le(),ZO=bo(),JO=Jr(),$u=class extends ZO.NodeBase{constructor(e){super(xo.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return by.visit(e,{Node:(i,n)=>{if(n===this)return by.visit.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:s}=t,a=this.resolve(n);if(!a){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let o=i.get(a);if(o||(JO.toJS(a,null,t),o=i.get(a)),!o||o.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=wo(n,a,i)),o.count*o.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return o.res}toString(e,t,i){let n=`*${this.source}`;if(e){if(KO.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function wo(r,e,t){if(xo.isAlias(e)){let i=e.resolve(r),n=t&&i&&t.get(i);return n?n.count*n.aliasCount:0}else if(xo.isCollection(e)){let i=0;for(let n of e.items){let s=wo(r,n,t);s>i&&(i=s)}return i}else if(xo.isPair(e)){let i=wo(r,e.key,t),n=wo(r,e.value,t);return Math.max(i,n)}return 1}xy.Alias=$u});var Ke=w(Vu=>{"use strict";var QO=Le(),XO=bo(),eC=Jr(),tC=r=>!r||typeof r!="function"&&typeof r!="object",Qr=class extends XO.NodeBase{constructor(e){super(QO.SCALAR),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:eC.toJS(this.value,e,t)}toString(){return String(this.value)}};Qr.BLOCK_FOLDED="BLOCK_FOLDED";Qr.BLOCK_LITERAL="BLOCK_LITERAL";Qr.PLAIN="PLAIN";Qr.QUOTE_DOUBLE="QUOTE_DOUBLE";Qr.QUOTE_SINGLE="QUOTE_SINGLE";Vu.Scalar=Qr;Vu.isScalarValue=tC});var Os=w(Sy=>{"use strict";var rC=ks(),Li=Le(),wy=Ke(),iC="tag:yaml.org,2002:";function nC(r,e,t){var i;if(e){let n=t.filter(a=>a.tag===e),s=(i=n.find(a=>!a.format))!=null?i:n[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return t.find(n=>{var s;return((s=n.identify)==null?void 0:s.call(n,r))&&!n.format})}function sC(r,e,t){var f,p,m;if(Li.isDocument(r)&&(r=r.contents),Li.isNode(r))return r;if(Li.isPair(r)){let g=(p=(f=t.schema[Li.MAP]).createNode)==null?void 0:p.call(f,t.schema,null,t);return g.items.push(r),g}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt!="undefined"&&r instanceof BigInt)&&(r=r.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:s,schema:a,sourceObjects:o}=t,l;if(i&&r&&typeof r=="object"){if(l=o.get(r),l)return l.anchor||(l.anchor=n(r)),new rC.Alias(l.anchor);l={anchor:null,node:null},o.set(r,l)}e!=null&&e.startsWith("!!")&&(e=iC+e.slice(2));let c=nC(r,e,a.tags);if(!c){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){let g=new wy.Scalar(r);return l&&(l.node=g),g}c=r instanceof Map?a[Li.MAP]:Symbol.iterator in Object(r)?a[Li.SEQ]:a[Li.MAP]}s&&(s(c),delete t.onTagObj);let u=c!=null&&c.createNode?c.createNode(t.schema,r,t):typeof((m=c==null?void 0:c.nodeClass)==null?void 0:m.from)=="function"?c.nodeClass.from(t.schema,r,t):new wy.Scalar(r);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}Sy.createNode=sC});var Eo=w(So=>{"use strict";var aC=Os(),_r=Le(),oC=bo();function Hu(r,e,t){let i=t;for(let n=e.length-1;n>=0;--n){let s=e[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=i,i=a}else i=new Map([[s,i]])}return aC.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}var Ey=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done,Gu=class extends oC.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(i=>_r.isNode(i)||_r.isPair(i)?i.clone(e):i),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ey(e))this.add(t);else{let[i,...n]=e,s=this.get(i,!0);if(_r.isCollection(s))s.addIn(n,t);else if(s===void 0&&this.schema)this.set(i,Hu(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[t,...i]=e;if(i.length===0)return this.delete(t);let n=this.get(t,!0);if(_r.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${i}`)}getIn(e,t){let[i,...n]=e,s=this.get(i,!0);return n.length===0?!t&&_r.isScalar(s)?s.value:s:_r.isCollection(s)?s.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!_r.isPair(t))return!1;let i=t.value;return i==null||e&&_r.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[t,...i]=e;if(i.length===0)return this.has(t);let n=this.get(t,!0);return _r.isCollection(n)?n.hasIn(i):!1}setIn(e,t){let[i,...n]=e;if(n.length===0)this.set(i,t);else{let s=this.get(i,!0);if(_r.isCollection(s))s.setIn(n,t);else if(s===void 0&&this.schema)this.set(i,Hu(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};So.Collection=Gu;So.collectionFromPath=Hu;So.isEmptyPath=Ey});var Cs=w(ko=>{"use strict";var lC=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function Wu(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}var cC=(r,e,t)=>r.endsWith(`
53
- `)?Wu(t,e):t.includes(`
51
+ `+t)}function nr(i,e,t,r,n){if(i.listenerCount("wsClientError")){let s=new Error(n);Error.captureStackTrace(s,nr),i.emit("wsClientError",s,t,e)}else On(t,r,n)}});var xe=O(it=>{"use strict";var Qc=Symbol.for("yaml.alias"),m0=Symbol.for("yaml.document"),yo=Symbol.for("yaml.map"),g0=Symbol.for("yaml.pair"),Xc=Symbol.for("yaml.scalar"),vo=Symbol.for("yaml.seq"),di=Symbol.for("yaml.node.type"),iO=i=>!!i&&typeof i=="object"&&i[di]===Qc,rO=i=>!!i&&typeof i=="object"&&i[di]===m0,nO=i=>!!i&&typeof i=="object"&&i[di]===yo,sO=i=>!!i&&typeof i=="object"&&i[di]===g0,y0=i=>!!i&&typeof i=="object"&&i[di]===Xc,oO=i=>!!i&&typeof i=="object"&&i[di]===vo;function v0(i){if(i&&typeof i=="object")switch(i[di]){case yo:case vo:return!0}return!1}function aO(i){if(i&&typeof i=="object")switch(i[di]){case Qc:case yo:case Xc:case vo:return!0}return!1}var lO=i=>(y0(i)||v0(i))&&!!i.anchor;it.ALIAS=Qc;it.DOC=m0;it.MAP=yo;it.NODE_TYPE=di;it.PAIR=g0;it.SCALAR=Xc;it.SEQ=vo;it.hasAnchor=lO;it.isAlias=iO;it.isCollection=v0;it.isDocument=rO;it.isMap=nO;it.isNode=aO;it.isPair=sO;it.isScalar=y0;it.isSeq=oO});var kn=O(eu=>{"use strict";var Ye=xe(),yt=Symbol("break visit"),b0=Symbol("skip children"),ti=Symbol("remove node");function bo(i,e){let t=_0(e);Ye.isDocument(i)?Ur(null,i.contents,t,Object.freeze([i]))===ti&&(i.contents=null):Ur(null,i,t,Object.freeze([]))}bo.BREAK=yt;bo.SKIP=b0;bo.REMOVE=ti;function Ur(i,e,t,r){let n=w0(i,e,t,r);if(Ye.isNode(n)||Ye.isPair(n))return x0(i,r,n),Ur(i,n,t,r);if(typeof n!="symbol"){if(Ye.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=Ur(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yt)return yt;o===ti&&(e.items.splice(s,1),s-=1)}}}else if(Ye.isPair(e)){r=Object.freeze(r.concat(e));let s=Ur("key",e.key,t,r);if(s===yt)return yt;s===ti&&(e.key=null);let o=Ur("value",e.value,t,r);if(o===yt)return yt;o===ti&&(e.value=null)}}return n}async function _o(i,e){let t=_0(e);Ye.isDocument(i)?await $r(null,i.contents,t,Object.freeze([i]))===ti&&(i.contents=null):await $r(null,i,t,Object.freeze([]))}_o.BREAK=yt;_o.SKIP=b0;_o.REMOVE=ti;async function $r(i,e,t,r){let n=await w0(i,e,t,r);if(Ye.isNode(n)||Ye.isPair(n))return x0(i,r,n),$r(i,n,t,r);if(typeof n!="symbol"){if(Ye.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=await $r(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===yt)return yt;o===ti&&(e.items.splice(s,1),s-=1)}}}else if(Ye.isPair(e)){r=Object.freeze(r.concat(e));let s=await $r("key",e.key,t,r);if(s===yt)return yt;s===ti&&(e.key=null);let o=await $r("value",e.value,t,r);if(o===yt)return yt;o===ti&&(e.value=null)}}return n}function _0(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function w0(i,e,t,r){var n,s,o,a,l;if(typeof t=="function")return t(i,e,r);if(Ye.isMap(e))return(n=t.Map)==null?void 0:n.call(t,i,e,r);if(Ye.isSeq(e))return(s=t.Seq)==null?void 0:s.call(t,i,e,r);if(Ye.isPair(e))return(o=t.Pair)==null?void 0:o.call(t,i,e,r);if(Ye.isScalar(e))return(a=t.Scalar)==null?void 0:a.call(t,i,e,r);if(Ye.isAlias(e))return(l=t.Alias)==null?void 0:l.call(t,i,e,r)}function x0(i,e,t){let r=e[e.length-1];if(Ye.isCollection(r))r.items[i]=t;else if(Ye.isPair(r))i==="key"?r.key=t:r.value=t;else if(Ye.isDocument(r))r.contents=t;else{let n=Ye.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}eu.visit=bo;eu.visitAsync=_o});var tu=O(E0=>{"use strict";var S0=xe(),cO=kn(),uO={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},fO=i=>i.replace(/[!,[\]{}]/g,e=>uO[e]),Cn=class i{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},i.defaultYaml,e),this.tags=Object.assign({},i.defaultTags,t)}clone(){let e=new i(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new i(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:i.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},i.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:i.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},i.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(o){return t(String(o)),null}return r==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+fO(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&S0.isNode(e.contents)){let s={};cO.visit(e.contents,(o,a)=>{S0.isNode(a)&&a.tag&&(s[a.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(o)))&&t.push(`%TAG ${s} ${o}`);return t.join(`
52
+ `)}};Cn.defaultYaml={explicit:!1,version:"1.2"};Cn.defaultTags={"!!":"tag:yaml.org,2002:"};E0.Directives=Cn});var wo=O(Tn=>{"use strict";var O0=xe(),hO=kn();function pO(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function k0(i){let e=new Set;return hO.visit(i,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function C0(i,e){for(let t=1;;++t){let r=`${i}${t}`;if(!e.has(r))return r}}function dO(i,e){let t=[],r=new Map,n=null;return{onAnchor:s=>{t.push(s),n!=null||(n=k0(i));let o=C0(e,n);return n.add(o),o},setAnchors:()=>{for(let s of t){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(O0.isScalar(o.node)||O0.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}Tn.anchorIsValid=pO;Tn.anchorNames=k0;Tn.createNodeAnchors=dO;Tn.findNewAnchor=C0});var iu=O(T0=>{"use strict";function An(i,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let n=0,s=r.length;n<s;++n){let o=r[n],a=An(i,r,String(n),o);a===void 0?delete r[n]:a!==o&&(r[n]=a)}else if(r instanceof Map)for(let n of Array.from(r.keys())){let s=r.get(n),o=An(i,r,n,s);o===void 0?r.delete(n):o!==s&&r.set(n,o)}else if(r instanceof Set)for(let n of Array.from(r)){let s=An(i,r,n,n);s===void 0?r.delete(n):s!==n&&(r.delete(n),r.add(s))}else for(let[n,s]of Object.entries(r)){let o=An(i,r,n,s);o===void 0?delete r[n]:o!==s&&(r[n]=o)}return i.call(e,t,r)}T0.applyReviver=An});var ki=O(I0=>{"use strict";var mO=xe();function A0(i,e,t){if(Array.isArray(i))return i.map((r,n)=>A0(r,String(n),t));if(i&&typeof i.toJSON=="function"){if(!t||!mO.hasAnchor(i))return i.toJSON(e,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(i,r),t.onCreate=s=>{r.res=s,delete t.onCreate};let n=i.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof i=="bigint"&&!(t!=null&&t.keep)?Number(i):i}I0.toJS=A0});var xo=O(B0=>{"use strict";var gO=iu(),N0=xe(),yO=ki(),ru=class{constructor(e){Object.defineProperty(this,N0.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!N0.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=yO.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof s=="function"?gO.applyReviver(s,{"":a},"",a):a}};B0.NodeBase=ru});var In=O(L0=>{"use strict";var vO=wo(),bO=kn(),Vr=xe(),_O=xo(),wO=ki(),nu=class extends _O.NodeBase{constructor(e){super(Vr.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r;t!=null&&t.aliasResolveCache?r=t.aliasResolveCache:(r=[],bO.visit(e,{Node:(s,o)=>{(Vr.isAlias(o)||Vr.hasAnchor(o))&&r.push(o)}}),t&&(t.aliasResolveCache=r));let n;for(let s of r){if(s===this)break;s.anchor===this.source&&(n=s)}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:s}=t,o=this.resolve(n,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(wO.toJS(o,null,t),a=r.get(o)),(a==null?void 0:a.res)===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=So(n,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,r){let n=`*${this.source}`;if(e){if(vO.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function So(i,e,t){if(Vr.isAlias(e)){let r=e.resolve(i),n=t&&r&&t.get(r);return n?n.count*n.aliasCount:0}else if(Vr.isCollection(e)){let r=0;for(let n of e.items){let s=So(i,n,t);s>r&&(r=s)}return r}else if(Vr.isPair(e)){let r=So(i,e.key,t),n=So(i,e.value,t);return Math.max(r,n)}return 1}L0.Alias=nu});var $e=O(su=>{"use strict";var xO=xe(),SO=xo(),EO=ki(),OO=i=>!i||typeof i!="function"&&typeof i!="object",Ci=class extends SO.NodeBase{constructor(e){super(xO.SCALAR),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:EO.toJS(this.value,e,t)}toString(){return String(this.value)}};Ci.BLOCK_FOLDED="BLOCK_FOLDED";Ci.BLOCK_LITERAL="BLOCK_LITERAL";Ci.PLAIN="PLAIN";Ci.QUOTE_DOUBLE="QUOTE_DOUBLE";Ci.QUOTE_SINGLE="QUOTE_SINGLE";su.Scalar=Ci;su.isScalarValue=OO});var Nn=O(R0=>{"use strict";var kO=In(),sr=xe(),P0=$e(),CO="tag:yaml.org,2002:";function TO(i,e,t){var r;if(e){let n=t.filter(o=>o.tag===e),s=(r=n.find(o=>!o.format))!=null?r:n[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return t.find(n=>{var s;return((s=n.identify)==null?void 0:s.call(n,i))&&!n.format})}function AO(i,e,t){var f,d,g,y;if(sr.isDocument(i)&&(i=i.contents),sr.isNode(i))return i;if(sr.isPair(i)){let m=(d=(f=t.schema[sr.MAP]).createNode)==null?void 0:d.call(f,t.schema,null,t);return m.items.push(i),m}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt!="undefined"&&i instanceof BigInt)&&(i=i.valueOf());let{aliasDuplicateObjects:r,onAnchor:n,onTagObj:s,schema:o,sourceObjects:a}=t,l;if(r&&i&&typeof i=="object"){if(l=a.get(i),l)return(g=l.anchor)!=null||(l.anchor=n(i)),new kO.Alias(l.anchor);l={anchor:null,node:null},a.set(i,l)}e!=null&&e.startsWith("!!")&&(e=CO+e.slice(2));let c=TO(i,e,o.tags);if(!c){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){let m=new P0.Scalar(i);return l&&(l.node=m),m}c=i instanceof Map?o[sr.MAP]:Symbol.iterator in Object(i)?o[sr.SEQ]:o[sr.MAP]}s&&(s(c),delete t.onTagObj);let u=c!=null&&c.createNode?c.createNode(t.schema,i,t):typeof((y=c==null?void 0:c.nodeClass)==null?void 0:y.from)=="function"?c.nodeClass.from(t.schema,i,t):new P0.Scalar(i);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}R0.createNode=AO});var Oo=O(Eo=>{"use strict";var IO=Nn(),ii=xe(),NO=xo();function ou(i,e,t){let r=t;for(let n=e.length-1;n>=0;--n){let s=e[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return IO.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}var M0=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done,au=class extends NO.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>ii.isNode(r)||ii.isPair(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(M0(e))this.add(t);else{let[r,...n]=e,s=this.get(r,!0);if(ii.isCollection(s))s.addIn(n,t);else if(s===void 0&&this.schema)this.set(r,ou(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let n=this.get(t,!0);if(ii.isCollection(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...n]=e,s=this.get(r,!0);return n.length===0?!t&&ii.isScalar(s)?s.value:s:ii.isCollection(s)?s.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ii.isPair(t))return!1;let r=t.value;return r==null||e&&ii.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let n=this.get(t,!0);return ii.isCollection(n)?n.hasIn(r):!1}setIn(e,t){let[r,...n]=e;if(n.length===0)this.set(r,t);else{let s=this.get(r,!0);if(ii.isCollection(s))s.setIn(n,t);else if(s===void 0&&this.schema)this.set(r,ou(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}};Eo.Collection=au;Eo.collectionFromPath=ou;Eo.isEmptyPath=M0});var Bn=O(ko=>{"use strict";var BO=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function lu(i,e){return/^\n+$/.test(i)?i.substring(1):e?i.replace(/^(?! *$)/gm,e):i}var LO=(i,e,t)=>i.endsWith(`
53
+ `)?lu(t,e):t.includes(`
54
54
  `)?`
55
- `+Wu(t,e):(r.endsWith(" ")?"":" ")+t;ko.indentComment=Wu;ko.lineComment=cC;ko.stringifyComment=lC});var Oy=w(Ts=>{"use strict";var uC="flow",zu="block",Oo="quoted";function fC(r,e,t="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!n||n<0)return r;n<s&&(s=0);let l=Math.max(1+s,1+n-e.length);if(r.length<=l)return r;let c=[],u={},f=n-e.length;typeof i=="number"&&(i>n-Math.max(2,s)?c.push(0):f=n-i);let p,m,g=!1,y=-1,_=-1,x=-1;t===zu&&(y=ky(r,y,e.length),y!==-1&&(f=y+l));for(let O;O=r[y+=1];){if(t===Oo&&O==="\\"){switch(_=y,r[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}x=y}if(O===`
56
- `)t===zu&&(y=ky(r,y,e.length)),f=y+e.length+l,p=void 0;else{if(O===" "&&m&&m!==" "&&m!==`
57
- `&&m!==" "){let k=r[y+1];k&&k!==" "&&k!==`
58
- `&&k!==" "&&(p=y)}if(y>=f)if(p)c.push(p),f=p+l,p=void 0;else if(t===Oo){for(;m===" "||m===" ";)m=O,O=r[y+=1],g=!0;let k=y>x+1?y-2:_-1;if(u[k])return r;c.push(k),u[k]=!0,f=k+l,p=void 0}else g=!0}m=O}if(g&&o&&o(),c.length===0)return r;a&&a();let S=r.slice(0,c[0]);for(let O=0;O<c.length;++O){let k=c[O],E=c[O+1]||r.length;k===0?S=`
59
- ${e}${r.slice(0,E)}`:(t===Oo&&u[k]&&(S+=`${r[k]}\\`),S+=`
60
- ${e}${r.slice(k+1,E)}`)}return S}function ky(r,e,t){let i=e,n=e+1,s=r[n];for(;s===" "||s===" ";)if(e<n+t)s=r[++e];else{do s=r[++e];while(s&&s!==`
61
- `);i=e,n=e+1,s=r[n]}return i}Ts.FOLD_BLOCK=zu;Ts.FOLD_FLOW=uC;Ts.FOLD_QUOTED=Oo;Ts.foldFlowLines=fC});var Is=w(Cy=>{"use strict";var br=Ke(),Xr=Oy(),To=(r,e)=>({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),Ao=r=>/^(%|---|\.\.\.)/m.test(r);function hC(r,e,t){if(!e||e<0)return!1;let i=e-t,n=r.length;if(n<=i)return!1;for(let s=0,a=0;s<n;++s)if(r[s]===`
62
- `){if(s-a>i)return!0;if(a=s+1,n-a<=i)return!1}return!0}function As(r,e){let t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Ao(r)?" ":""),a="",o=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(a+=t.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{a+=t.slice(o,l);let u=t.substr(l+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=t.substr(l,6)}l+=5,o=l+1}break;case"n":if(i||t[l+2]==='"'||t.length<n)l+=1;else{for(a+=t.slice(o,l)+`
55
+ `+lu(t,e):(i.endsWith(" ")?"":" ")+t;ko.indentComment=lu;ko.lineComment=LO;ko.stringifyComment=BO});var q0=O(Ln=>{"use strict";var PO="flow",cu="block",Co="quoted";function RO(i,e,t="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return i;n<s&&(s=0);let l=Math.max(1+s,1+n-e.length);if(i.length<=l)return i;let c=[],u={},f=n-e.length;typeof r=="number"&&(r>n-Math.max(2,s)?c.push(0):f=n-r);let d,g,y=!1,m=-1,b=-1,w=-1;t===cu&&(m=D0(i,m,e.length),m!==-1&&(f=m+l));for(let _;_=i[m+=1];){if(t===Co&&_==="\\"){switch(b=m,i[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}w=m}if(_===`
56
+ `)t===cu&&(m=D0(i,m,e.length)),f=m+e.length+l,d=void 0;else{if(_===" "&&g&&g!==" "&&g!==`
57
+ `&&g!==" "){let k=i[m+1];k&&k!==" "&&k!==`
58
+ `&&k!==" "&&(d=m)}if(m>=f)if(d)c.push(d),f=d+l,d=void 0;else if(t===Co){for(;g===" "||g===" ";)g=_,_=i[m+=1],y=!0;let k=m>w+1?m-2:b-1;if(u[k])return i;c.push(k),u[k]=!0,f=k+l,d=void 0}else y=!0}g=_}if(y&&a&&a(),c.length===0)return i;o&&o();let x=i.slice(0,c[0]);for(let _=0;_<c.length;++_){let k=c[_],S=c[_+1]||i.length;k===0?x=`
59
+ ${e}${i.slice(0,S)}`:(t===Co&&u[k]&&(x+=`${i[k]}\\`),x+=`
60
+ ${e}${i.slice(k+1,S)}`)}return x}function D0(i,e,t){let r=e,n=e+1,s=i[n];for(;s===" "||s===" ";)if(e<n+t)s=i[++e];else{do s=i[++e];while(s&&s!==`
61
+ `);r=e,n=e+1,s=i[n]}return r}Ln.FOLD_BLOCK=cu;Ln.FOLD_FLOW=PO;Ln.FOLD_QUOTED=Co;Ln.foldFlowLines=RO});var Rn=O(F0=>{"use strict";var Gt=$e(),Ti=q0(),Ao=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),Io=i=>/^(%|---|\.\.\.)/m.test(i);function MO(i,e,t){if(!e||e<0)return!1;let r=e-t,n=i.length;if(n<=r)return!1;for(let s=0,o=0;s<n;++s)if(i[s]===`
62
+ `){if(s-o>r)return!0;if(o=s+1,n-o<=r)return!1}return!0}function Pn(i,e){let t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:r}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(Io(i)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<n)l+=1;else{for(o+=t.slice(a,l)+`
63
63
 
64
- `;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)a+=`
65
- `,l+=2;a+=s,t[l+2]===" "&&(a+="\\"),l+=1,o=l+1}break;default:l+=1}return a=o?a+t.slice(o):t,i?a:Xr.foldFlowLines(a,s,Xr.FOLD_QUOTED,To(e,!1))}function Yu(r,e){if(e.options.singleQuote===!1||e.implicitKey&&r.includes(`
66
- `)||/[ \t]\n|\n[ \t]/.test(r))return As(r,e);let t=e.indent||(Ao(r)?" ":""),i="'"+r.replace(/'/g,"''").replace(/\n+/g,`$&
67
- ${t}`)+"'";return e.implicitKey?i:Xr.foldFlowLines(i,t,Xr.FOLD_FLOW,To(e,!1))}function Rn(r,e){let{singleQuote:t}=e.options,i;if(t===!1)i=As;else{let n=r.includes('"'),s=r.includes("'");n&&!s?i=Yu:s&&!n?i=As:i=t?Yu:As}return i(r,e)}var Ku;try{Ku=new RegExp(`(^|(?<!
64
+ `;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
65
+ `,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:Ti.foldFlowLines(o,s,Ti.FOLD_QUOTED,Ao(e,!1))}function uu(i,e){if(e.options.singleQuote===!1||e.implicitKey&&i.includes(`
66
+ `)||/[ \t]\n|\n[ \t]/.test(i))return Pn(i,e);let t=e.indent||(Io(i)?" ":""),r="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
67
+ ${t}`)+"'";return e.implicitKey?r:Ti.foldFlowLines(r,t,Ti.FOLD_FLOW,Ao(e,!1))}function Hr(i,e){let{singleQuote:t}=e.options,r;if(t===!1)r=Pn;else{let n=i.includes('"'),s=i.includes("'");n&&!s?r=uu:s&&!n?r=Pn:r=t?uu:Pn}return r(i,e)}var fu;try{fu=new RegExp(`(^|(?<!
68
68
  ))
69
69
  +(?!
70
- |$)`,"g")}catch{Ku=/\n+(?!\n|$)/g}function Co({comment:r,type:e,value:t},i,n,s){let{blockQuote:a,commentString:o,lineWidth:l}=i.options;if(!a||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return Rn(t,i);let c=i.indent||(i.forceBlockIndent||Ao(t)?" ":""),u=a==="literal"?!0:a==="folded"||e===br.Scalar.BLOCK_FOLDED?!1:e===br.Scalar.BLOCK_LITERAL?!0:!hC(t,l,c.length);if(!t)return u?`|
70
+ |$)`,"g")}catch{fu=/\n+(?!\n|$)/g}function To({comment:i,type:e,value:t},r,n,s){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(t))return Hr(t,r);let c=r.indent||(r.forceBlockIndent||Io(t)?" ":""),u=o==="literal"?!0:o==="folded"||e===Gt.Scalar.BLOCK_FOLDED?!1:e===Gt.Scalar.BLOCK_LITERAL?!0:!MO(t,l,c.length);if(!t)return u?`|
71
71
  `:`>
72
- `;let f,p;for(p=t.length;p>0;--p){let R=t[p-1];if(R!==`
73
- `&&R!==" "&&R!==" ")break}let m=t.substring(p),g=m.indexOf(`
74
- `);g===-1?f="-":t===m||g!==m.length-1?(f="+",s&&s()):f="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
75
- `&&(m=m.slice(0,-1)),m=m.replace(Ku,`$&${c}`));let y=!1,_,x=-1;for(_=0;_<t.length;++_){let R=t[_];if(R===" ")y=!0;else if(R===`
76
- `)x=_;else break}let S=t.substring(0,x<_?x+1:_);S&&(t=t.substring(S.length),S=S.replace(/\n+/g,`$&${c}`));let k=(u?"|":">")+(y?c?"2":"1":"")+f;if(r&&(k+=" "+o(r.replace(/ ?[\r\n]+/g," ")),n&&n()),u)return t=t.replace(/\n+/g,`$&${c}`),`${k}
77
- ${c}${S}${t}${m}`;t=t.replace(/\n+/g,`
78
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let E=Xr.foldFlowLines(`${S}${t}${m}`,c,Xr.FOLD_BLOCK,To(i,!0));return`${k}
79
- ${c}${E}`}function dC(r,e,t,i){let{type:n,value:s}=r,{actualString:a,implicitKey:o,indent:l,indentStep:c,inFlow:u}=e;if(o&&s.includes(`
80
- `)||u&&/[[\]{},]/.test(s))return Rn(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||u||!s.includes(`
81
- `)?Rn(s,e):Co(r,e,t,i);if(!o&&!u&&n!==br.Scalar.PLAIN&&s.includes(`
82
- `))return Co(r,e,t,i);if(Ao(s)){if(l==="")return e.forceBlockIndent=!0,Co(r,e,t,i);if(o&&l===c)return Rn(s,e)}let f=s.replace(/\n+/g,`$&
83
- ${l}`);if(a){let p=y=>{var _;return y.default&&y.tag!=="tag:yaml.org,2002:str"&&((_=y.test)==null?void 0:_.test(f))},{compat:m,tags:g}=e.doc.schema;if(g.some(p)||m!=null&&m.some(p))return Rn(s,e)}return o?f:Xr.foldFlowLines(f,l,Xr.FOLD_FLOW,To(e,!1))}function pC(r,e,t,i){let{implicitKey:n,inFlow:s}=e,a=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)}),{type:o}=r;o!==br.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=br.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case br.Scalar.BLOCK_FOLDED:case br.Scalar.BLOCK_LITERAL:return n||s?Rn(a.value,e):Co(a,e,t,i);case br.Scalar.QUOTE_DOUBLE:return As(a.value,e);case br.Scalar.QUOTE_SINGLE:return Yu(a.value,e);case br.Scalar.PLAIN:return dC(a,e,t,i);default:return null}},c=l(o);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,p=n&&u||f;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}Cy.stringifyString=pC});var Ns=w(Zu=>{"use strict";var mC=_o(),ei=Le(),gC=Cs(),vC=Is();function yC(r,e){let t=Object.assign({blockQuote:!0,commentString:gC.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e),i;switch(t.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:i,options:t}}function _C(r,e){var n,s,a,o;if(e.tag){let l=r.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let t,i;if(ei.isScalar(e)){i=e.value;let l=r.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,i)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}t=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else i=e,t=r.find(l=>l.nodeClass&&i instanceof l.nodeClass);if(!t){let l=(o=(a=i==null?void 0:i.constructor)==null?void 0:a.name)!=null?o:typeof i;throw new Error(`Tag not resolved for ${l} value`)}return t}function bC(r,e,{anchors:t,doc:i}){if(!i.directives)return"";let n=[],s=(ei.isScalar(r)||ei.isCollection(r))&&r.anchor;s&&mC.anchorIsValid(s)&&(t.add(s),n.push(`&${s}`));let a=r.tag?r.tag:e.default?null:e.tag;return a&&n.push(i.directives.tagString(a)),n.join(" ")}function xC(r,e,t,i){var l,c;if(ei.isPair(r))return r.toString(e,t,i);if(ei.isAlias(r)){if(e.doc.directives)return r.toString(e);if((l=e.resolvedAliases)!=null&&l.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let n,s=ei.isNode(r)?r:e.doc.createNode(r,{onTagObj:u=>n=u});n||(n=_C(e.doc.schema.tags,s));let a=bC(s,n,e);a.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+a.length+1);let o=typeof n.stringify=="function"?n.stringify(s,e,t,i):ei.isScalar(s)?vC.stringifyString(s,e,t,i):s.toString(e,t,i);return a?ei.isScalar(s)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
84
- ${e.indent}${o}`:o}Zu.createStringifyContext=yC;Zu.stringify=xC});var Ny=w(Iy=>{"use strict";var Mr=Le(),Ty=Ke(),Ay=Ns(),Ls=Cs();function wC({key:r,value:e},t,i,n){var T,A;let{allNullValues:s,doc:a,indent:o,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t,p=Mr.isNode(r)&&r.comment||null;if(f){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(Mr.isCollection(r)||!Mr.isNode(r)&&typeof r=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let m=!f&&(!r||p&&e==null&&!t.inFlow||Mr.isCollection(r)||(Mr.isScalar(r)?r.type===Ty.Scalar.BLOCK_FOLDED||r.type===Ty.Scalar.BLOCK_LITERAL:typeof r=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(f||!s),indent:o+l});let g=!1,y=!1,_=Ay.stringify(r,t,()=>g=!0,()=>y=!0);if(!m&&!t.inFlow&&_.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(s||e==null)return g&&i&&i(),_===""?"?":m?`? ${_}`:_}else if(s&&!f||e==null&&m)return _=`? ${_}`,p&&!g?_+=Ls.lineComment(_,t.indent,c(p)):y&&n&&n(),_;g&&(p=null),m?(p&&(_+=Ls.lineComment(_,t.indent,c(p))),_=`? ${_}
85
- ${o}:`):(_=`${_}:`,p&&(_+=Ls.lineComment(_,t.indent,c(p))));let x,S,O;Mr.isNode(e)?(x=!!e.spaceBefore,S=e.commentBefore,O=e.comment):(x=!1,S=null,O=null,e&&typeof e=="object"&&(e=a.createNode(e))),t.implicitKey=!1,!m&&!p&&Mr.isScalar(e)&&(t.indentAtStart=_.length+1),y=!1,!u&&l.length>=2&&!t.inFlow&&!m&&Mr.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1,E=Ay.stringify(e,t,()=>k=!0,()=>y=!0),R=" ";if(p||x||S){if(R=x?`
86
- `:"",S){let C=c(S);R+=`
87
- ${Ls.indentComment(C,t.indent)}`}E===""&&!t.inFlow?R===`
88
- `&&(R=`
72
+ `;let f,d;for(d=t.length;d>0;--d){let S=t[d-1];if(S!==`
73
+ `&&S!==" "&&S!==" ")break}let g=t.substring(d),y=g.indexOf(`
74
+ `);y===-1?f="-":t===g||y!==g.length-1?(f="+",s&&s()):f="",g&&(t=t.slice(0,-g.length),g[g.length-1]===`
75
+ `&&(g=g.slice(0,-1)),g=g.replace(fu,`$&${c}`));let m=!1,b,w=-1;for(b=0;b<t.length;++b){let S=t[b];if(S===" ")m=!0;else if(S===`
76
+ `)w=b;else break}let x=t.substring(0,w<b?w+1:b);x&&(t=t.substring(x.length),x=x.replace(/\n+/g,`$&${c}`));let k=(m?c?"2":"1":"")+f;if(i&&(k+=" "+a(i.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){let S=t.replace(/\n+/g,`
77
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),R=!1,T=Ao(r,!0);o!=="folded"&&e!==Gt.Scalar.BLOCK_FOLDED&&(T.onOverflow=()=>{R=!0});let N=Ti.foldFlowLines(`${x}${S}${g}`,c,Ti.FOLD_BLOCK,T);if(!R)return`>${k}
78
+ ${c}${N}`}return t=t.replace(/\n+/g,`$&${c}`),`|${k}
79
+ ${c}${x}${t}${g}`}function DO(i,e,t,r){let{type:n,value:s}=i,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
80
+ `)||u&&/[[\]{},]/.test(s))return Hr(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
81
+ `)?Hr(s,e):To(i,e,t,r);if(!a&&!u&&n!==Gt.Scalar.PLAIN&&s.includes(`
82
+ `))return To(i,e,t,r);if(Io(s)){if(l==="")return e.forceBlockIndent=!0,To(i,e,t,r);if(a&&l===c)return Hr(s,e)}let f=s.replace(/\n+/g,`$&
83
+ ${l}`);if(o){let d=m=>{var b;return m.default&&m.tag!=="tag:yaml.org,2002:str"&&((b=m.test)==null?void 0:b.test(f))},{compat:g,tags:y}=e.doc.schema;if(y.some(d)||g!=null&&g.some(d))return Hr(s,e)}return a?f:Ti.foldFlowLines(f,l,Ti.FOLD_FLOW,Ao(e,!1))}function qO(i,e,t,r){let{implicitKey:n,inFlow:s}=e,o=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)}),{type:a}=i;a!==Gt.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Gt.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Gt.Scalar.BLOCK_FOLDED:case Gt.Scalar.BLOCK_LITERAL:return n||s?Hr(o.value,e):To(o,e,t,r);case Gt.Scalar.QUOTE_DOUBLE:return Pn(o.value,e);case Gt.Scalar.QUOTE_SINGLE:return uu(o.value,e);case Gt.Scalar.PLAIN:return DO(o,e,t,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=n&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}F0.stringifyString=qO});var Mn=O(hu=>{"use strict";var FO=wo(),Ai=xe(),jO=Bn(),UO=Rn();function $O(i,e){let t=Object.assign({blockQuote:!0,commentString:jO.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,e),r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function VO(i,e){var n,s,o,a;if(e.tag){let l=i.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let t,r;if(Ai.isScalar(e)){r=e.value;let l=i.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}t=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else r=e,t=i.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!t){let l=(a=(o=r==null?void 0:r.constructor)==null?void 0:o.name)!=null?a:r===null?"null":typeof r;throw new Error(`Tag not resolved for ${l} value`)}return t}function HO(i,e,{anchors:t,doc:r}){var a;if(!r.directives)return"";let n=[],s=(Ai.isScalar(i)||Ai.isCollection(i))&&i.anchor;s&&FO.anchorIsValid(s)&&(t.add(s),n.push(`&${s}`));let o=(a=i.tag)!=null?a:e.default?null:e.tag;return o&&n.push(r.directives.tagString(o)),n.join(" ")}function GO(i,e,t,r){var l,c;if(Ai.isPair(i))return i.toString(e,t,r);if(Ai.isAlias(i)){if(e.doc.directives)return i.toString(e);if((l=e.resolvedAliases)!=null&&l.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let n,s=Ai.isNode(i)?i:e.doc.createNode(i,{onTagObj:u=>n=u});n!=null||(n=VO(e.doc.schema.tags,s));let o=HO(s,n,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(s,e,t,r):Ai.isScalar(s)?UO.stringifyString(s,e,t,r):s.toString(e,t,r);return o?Ai.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
84
+ ${e.indent}${a}`:a}hu.createStringifyContext=$O;hu.stringify=GO});var V0=O($0=>{"use strict";var mi=xe(),j0=$e(),U0=Mn(),Dn=Bn();function WO({key:i,value:e},t,r,n){var T,N;let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t,d=mi.isNode(i)&&i.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(mi.isCollection(i)||!mi.isNode(i)&&typeof i=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let g=!f&&(!i||d&&e==null&&!t.inFlow||mi.isCollection(i)||(mi.isScalar(i)?i.type===j0.Scalar.BLOCK_FOLDED||i.type===j0.Scalar.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!g&&(f||!s),indent:a+l});let y=!1,m=!1,b=U0.stringify(i,t,()=>y=!0,()=>m=!0);if(!g&&!t.inFlow&&b.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(t.inFlow){if(s||e==null)return y&&r&&r(),b===""?"?":g?`? ${b}`:b}else if(s&&!f||e==null&&g)return b=`? ${b}`,d&&!y?b+=Dn.lineComment(b,t.indent,c(d)):m&&n&&n(),b;y&&(d=null),g?(d&&(b+=Dn.lineComment(b,t.indent,c(d))),b=`? ${b}
85
+ ${a}:`):(b=`${b}:`,d&&(b+=Dn.lineComment(b,t.indent,c(d))));let w,x,_;mi.isNode(e)?(w=!!e.spaceBefore,x=e.commentBefore,_=e.comment):(w=!1,x=null,_=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!g&&!d&&mi.isScalar(e)&&(t.indentAtStart=b.length+1),m=!1,!u&&l.length>=2&&!t.inFlow&&!g&&mi.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1,S=U0.stringify(e,t,()=>k=!0,()=>m=!0),R=" ";if(d||w||x){if(R=w?`
86
+ `:"",x){let C=c(x);R+=`
87
+ ${Dn.indentComment(C,t.indent)}`}S===""&&!t.inFlow?R===`
88
+ `&&_&&(R=`
89
89
 
90
90
  `):R+=`
91
- ${t.indent}`}else if(!m&&Mr.isCollection(e)){let C=E[0],L=E.indexOf(`
92
- `),P=L!==-1,$=(A=(T=t.inFlow)!=null?T:e.flow)!=null?A:e.items.length===0;if(P||!$){let q=!1;if(P&&(C==="&"||C==="!")){let G=E.indexOf(" ");C==="&"&&G!==-1&&G<L&&E[G+1]==="!"&&(G=E.indexOf(" ",G+1)),(G===-1||L<G)&&(q=!0)}q||(R=`
93
- ${t.indent}`)}}else(E===""||E[0]===`
94
- `)&&(R="");return _+=R+E,t.inFlow?k&&i&&i():O&&!k?_+=Ls.lineComment(_,t.indent,c(O)):y&&n&&n(),_}Iy.stringifyPair=wC});var Qu=w(Ju=>{"use strict";function SC(r,...e){r==="debug"&&console.log(...e)}function EC(r,e){(r==="debug"||r==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}Ju.debug=SC;Ju.warn=EC});var Bo=w(Lo=>{"use strict";var Bs=Le(),Ly=Ke(),Io="<<",No={identify:r=>r===Io||typeof r=="symbol"&&r.description===Io,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ly.Scalar(Symbol(Io)),{addToJSMap:By}),stringify:()=>Io},kC=(r,e)=>(No.identify(e)||Bs.isScalar(e)&&(!e.type||e.type===Ly.Scalar.PLAIN)&&No.identify(e.value))&&(r==null?void 0:r.doc.schema.tags.some(t=>t.tag===No.tag&&t.default));function By(r,e,t){if(t=r&&Bs.isAlias(t)?t.resolve(r.doc):t,Bs.isSeq(t))for(let i of t.items)Xu(r,e,i);else if(Array.isArray(t))for(let i of t)Xu(r,e,i);else Xu(r,e,t)}function Xu(r,e,t){let i=r&&Bs.isAlias(t)?t.resolve(r.doc):t;if(!Bs.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,r,Map);for(let[s,a]of n)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}Lo.addMergeToJSMap=By;Lo.isMergeKey=kC;Lo.merge=No});var tf=w(My=>{"use strict";var OC=Qu(),Ry=Bo(),CC=Ns(),Py=Le(),ef=Jr();function TC(r,e,{key:t,value:i}){if(Py.isNode(t)&&t.addToJSMap)t.addToJSMap(r,e,i);else if(Ry.isMergeKey(r,t))Ry.addMergeToJSMap(r,e,i);else{let n=ef.toJS(t,"",r);if(e instanceof Map)e.set(n,ef.toJS(i,n,r));else if(e instanceof Set)e.add(n);else{let s=AC(t,n,r),a=ef.toJS(i,s,r);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}function AC(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Py.isNode(r)&&(t!=null&&t.doc)){let i=CC.createStringifyContext(t.doc,{});i.anchors=new Set;for(let s of t.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=r.toString(i);if(!t.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),OC.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return n}return JSON.stringify(e)}My.addPairToJSMap=TC});var ti=w(rf=>{"use strict";var Dy=Os(),IC=Ny(),NC=tf(),Ro=Le();function LC(r,e,t){let i=Dy.createNode(r,void 0,t),n=Dy.createNode(e,void 0,t);return new Po(i,n)}var Po=class r{constructor(e,t=null){Object.defineProperty(this,Ro.NODE_TYPE,{value:Ro.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:i}=this;return Ro.isNode(t)&&(t=t.clone(e)),Ro.isNode(i)&&(i=i.clone(e)),new r(t,i)}toJSON(e,t){let i=t!=null&&t.mapAsMap?new Map:{};return NC.addPairToJSMap(t,i,this)}toString(e,t,i){return e!=null&&e.doc?IC.stringifyPair(this,e,t,i):JSON.stringify(this)}};rf.Pair=Po;rf.createPair=LC});var nf=w(qy=>{"use strict";var Bi=Le(),Fy=Ns(),Mo=Cs();function BC(r,e,t){var s;return(((s=e.inFlow)!=null?s:r.flow)?PC:RC)(r,e,t)}function RC({comment:r,items:e},t,{blockItemPrefix:i,flowChars:n,itemIndent:s,onChompKeep:a,onComment:o}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null}),f=!1,p=[];for(let g=0;g<e.length;++g){let y=e[g],_=null;if(Bi.isNode(y))!f&&y.spaceBefore&&p.push(""),Do(t,p,y.commentBefore,f),y.comment&&(_=y.comment);else if(Bi.isPair(y)){let S=Bi.isNode(y.key)?y.key:null;S&&(!f&&S.spaceBefore&&p.push(""),Do(t,p,S.commentBefore,f))}f=!1;let x=Fy.stringify(y,u,()=>_=null,()=>f=!0);_&&(x+=Mo.lineComment(x,s,c(_))),f&&_&&(f=!1),p.push(i+x)}let m;if(p.length===0)m=n.start+n.end;else{m=p[0];for(let g=1;g<p.length;++g){let y=p[g];m+=y?`
95
- ${l}${y}`:`
96
- `}}return r?(m+=`
97
- `+Mo.indentComment(c(r),l),o&&o()):f&&a&&a(),m}function PC({items:r},e,{flowChars:t,itemIndent:i}){let{indent:n,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=e;i+=s;let l=Object.assign({},e,{indent:i,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let g=0;g<r.length;++g){let y=r[g],_=null;if(Bi.isNode(y))y.spaceBefore&&f.push(""),Do(e,f,y.commentBefore,!1),y.comment&&(_=y.comment);else if(Bi.isPair(y)){let S=Bi.isNode(y.key)?y.key:null;S&&(S.spaceBefore&&f.push(""),Do(e,f,S.commentBefore,!1),S.comment&&(c=!0));let O=Bi.isNode(y.value)?y.value:null;O?(O.comment&&(_=O.comment),O.commentBefore&&(c=!0)):y.value==null&&(S!=null&&S.comment)&&(_=S.comment)}_&&(c=!0);let x=Fy.stringify(y,l,()=>_=null);g<r.length-1&&(x+=","),_&&(x+=Mo.lineComment(x,i,o(_))),!c&&(f.length>u||x.includes(`
98
- `))&&(c=!0),f.push(x),u=f.length}let{start:p,end:m}=t;if(f.length===0)return p+m;if(!c){let g=f.reduce((y,_)=>y+_.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=p;for(let y of f)g+=y?`
99
- ${s}${n}${y}`:`
100
- `;return`${g}
101
- ${n}${m}`}else return`${p}${a}${f.join(" ")}${a}${m}`}function Do({indent:r,options:{commentString:e}},t,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let s=Mo.indentComment(e(i),r);t.push(s.trimStart())}}qy.stringifyCollection=BC});var ii=w(af=>{"use strict";var MC=nf(),DC=tf(),FC=Eo(),ri=Le(),Fo=ti(),qC=Ke();function Rs(r,e){let t=ri.isScalar(e)?e.value:e;for(let i of r)if(ri.isPair(i)&&(i.key===e||i.key===t||ri.isScalar(i.key)&&i.key.value===t))return i}var sf=class extends FC.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ri.MAP,e),this.items=[]}static from(e,t,i){let{keepUndefined:n,replacer:s}=i,a=new this(e),o=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&a.items.push(Fo.createPair(l,c,i))};if(t instanceof Map)for(let[l,c]of t)o(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))o(l,t[l]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,t){var a;let i;ri.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new Fo.Pair(e,e==null?void 0:e.value):i=new Fo.Pair(e.key,e.value);let n=Rs(this.items,i.key),s=(a=this.schema)==null?void 0:a.sortMapEntries;if(n){if(!t)throw new Error(`Key ${i.key} already set`);ri.isScalar(n.value)&&qC.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(s){let o=this.items.findIndex(l=>s(i,l)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(e){let t=Rs(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var s;let i=Rs(this.items,e),n=i==null?void 0:i.value;return(s=!t&&ri.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!Rs(this.items,e)}set(e,t){this.add(new Fo.Pair(e,t),!0)}toJSON(e,t,i){let n=i?new i:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(n);for(let s of this.items)DC.addPairToJSMap(t,n,s);return n}toString(e,t,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!ri.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),MC.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}};af.YAMLMap=sf;af.findPair=Rs});var Pn=w(Uy=>{"use strict";var jC=Le(),jy=ii(),UC={collection:"map",default:!0,nodeClass:jy.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(r,e){return jC.isMap(r)||e("Expected a mapping for this tag"),r},createNode:(r,e,t)=>jy.YAMLMap.from(r,e,t)};Uy.map=UC});var ni=w($y=>{"use strict";var $C=Os(),VC=nf(),HC=Eo(),jo=Le(),GC=Ke(),WC=Jr(),of=class extends HC.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(jo.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=qo(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let i=qo(e);if(typeof i!="number")return;let n=this.items[i];return!t&&jo.isScalar(n)?n.value:n}has(e){let t=qo(e);return typeof t=="number"&&t<this.items.length}set(e,t){let i=qo(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];jo.isScalar(n)&&GC.isScalarValue(t)?n.value=t:this.items[i]=t}toJSON(e,t){let i=[];t!=null&&t.onCreate&&t.onCreate(i);let n=0;for(let s of this.items)i.push(WC.toJS(s,String(n++),t));return i}toString(e,t,i){return e?VC.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(e,t,i){let{replacer:n}=i,s=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let o of t){if(typeof n=="function"){let l=t instanceof Set?o:String(a++);o=n.call(t,l,o)}s.items.push($C.createNode(o,void 0,i))}}return s}};function qo(r){let e=jo.isScalar(r)?r.value:r;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}$y.YAMLSeq=of});var Mn=w(Hy=>{"use strict";var zC=Le(),Vy=ni(),YC={collection:"seq",default:!0,nodeClass:Vy.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(r,e){return zC.isSeq(r)||e("Expected a sequence for this tag"),r},createNode:(r,e,t)=>Vy.YAMLSeq.from(r,e,t)};Hy.seq=YC});var Ps=w(Gy=>{"use strict";var KC=Is(),ZC={identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify(r,e,t,i){return e=Object.assign({actualString:!0},e),KC.stringifyString(r,e,t,i)}};Gy.string=ZC});var Uo=w(Yy=>{"use strict";var Wy=Ke(),zy={identify:r=>r==null,createNode:()=>new Wy.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Wy.Scalar(null),stringify:({source:r},e)=>typeof r=="string"&&zy.test.test(r)?r:e.options.nullStr};Yy.nullTag=zy});var lf=w(Zy=>{"use strict";var JC=Ke(),Ky={identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:r=>new JC.Scalar(r[0]==="t"||r[0]==="T"),stringify({source:r,value:e},t){if(r&&Ky.test.test(r)){let i=r[0]==="t"||r[0]==="T";if(e===i)return r}return e?t.options.trueStr:t.options.falseStr}};Zy.boolTag=Ky});var Dn=w(Jy=>{"use strict";function QC({format:r,minFractionDigits:e,tag:t,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=JSON.stringify(i);if(!r&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let o=e-(s.length-a-1);for(;o-- >0;)s+="0"}return s}Jy.stringifyNumber=QC});var uf=w($o=>{"use strict";var XC=Ke(),cf=Dn(),eT={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:cf.stringifyNumber},tT={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r),stringify(r){let e=Number(r.value);return isFinite(e)?e.toExponential():cf.stringifyNumber(r)}},rT={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(r){let e=new XC.Scalar(parseFloat(r)),t=r.indexOf(".");return t!==-1&&r[r.length-1]==="0"&&(e.minFractionDigits=r.length-t-1),e},stringify:cf.stringifyNumber};$o.float=rT;$o.floatExp=tT;$o.floatNaN=eT});var hf=w(Ho=>{"use strict";var Qy=Dn(),Vo=r=>typeof r=="bigint"||Number.isInteger(r),ff=(r,e,t,{intAsBigInt:i})=>i?BigInt(r):parseInt(r.substring(e),t);function Xy(r,e,t){let{value:i}=r;return Vo(i)&&i>=0?t+i.toString(e):Qy.stringifyNumber(r)}var iT={identify:r=>Vo(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(r,e,t)=>ff(r,2,8,t),stringify:r=>Xy(r,8,"0o")},nT={identify:Vo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(r,e,t)=>ff(r,0,10,t),stringify:Qy.stringifyNumber},sT={identify:r=>Vo(r)&&r>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(r,e,t)=>ff(r,2,16,t),stringify:r=>Xy(r,16,"0x")};Ho.int=nT;Ho.intHex=sT;Ho.intOct=iT});var t0=w(e0=>{"use strict";var aT=Pn(),oT=Uo(),lT=Mn(),cT=Ps(),uT=lf(),df=uf(),pf=hf(),fT=[aT.map,lT.seq,cT.string,oT.nullTag,uT.boolTag,pf.intOct,pf.int,pf.intHex,df.floatNaN,df.floatExp,df.float];e0.schema=fT});var n0=w(i0=>{"use strict";var hT=Ke(),dT=Pn(),pT=Mn();function r0(r){return typeof r=="bigint"||Number.isInteger(r)}var Go=({value:r})=>JSON.stringify(r),mT=[{identify:r=>typeof r=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r=>r,stringify:Go},{identify:r=>r==null,createNode:()=>new hT.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Go},{identify:r=>typeof r=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:r=>r==="true",stringify:Go},{identify:r0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(r,e,{intAsBigInt:t})=>t?BigInt(r):parseInt(r,10),stringify:({value:r})=>r0(r)?r.toString():JSON.stringify(r)},{identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:r=>parseFloat(r),stringify:Go}],gT={default:!0,tag:"",test:/^/,resolve(r,e){return e(`Unresolved plain scalar ${JSON.stringify(r)}`),r}},vT=[dT.map,pT.seq].concat(mT,gT);i0.schema=vT});var gf=w(s0=>{"use strict";var mf=Ke(),yT=Is(),_T={identify:r=>r instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(r,e){if(typeof Buffer=="function")return Buffer.from(r,"base64");if(typeof atob=="function"){let t=atob(r.replace(/[\n\r]/g,"")),i=new Uint8Array(t.length);for(let n=0;n<t.length;++n)i[n]=t.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),r},stringify({comment:r,type:e,value:t},i,n,s){let a=t,o;if(typeof Buffer=="function")o=a instanceof Buffer?a.toString("base64"):Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<a.length;++c)l+=String.fromCharCode(a[c]);o=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=mf.Scalar.BLOCK_LITERAL),e!==mf.Scalar.QUOTE_DOUBLE){let l=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),c=Math.ceil(o.length/l),u=new Array(c);for(let f=0,p=0;f<c;++f,p+=l)u[f]=o.substr(p,l);o=u.join(e===mf.Scalar.BLOCK_LITERAL?`
102
- `:" ")}return yT.stringifyString({comment:r,type:e,value:o},i,n,s)}};s0.binary=_T});var Yo=w(zo=>{"use strict";var Wo=Le(),vf=ti(),bT=Ke(),xT=ni();function a0(r,e){var t;if(Wo.isSeq(r))for(let i=0;i<r.items.length;++i){let n=r.items[i];if(!Wo.isPair(n)){if(Wo.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new vf.Pair(new bT.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
103
- ${s.key.commentBefore}`:n.commentBefore),n.comment){let a=(t=s.value)!=null?t:s.key;a.comment=a.comment?`${n.comment}
104
- ${a.comment}`:n.comment}n=s}r.items[i]=Wo.isPair(n)?n:new vf.Pair(n)}}else e("Expected a sequence for this tag");return r}function o0(r,e,t){let{replacer:i}=t,n=new xT.YAMLSeq(r);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof i=="function"&&(a=i.call(e,String(s++),a));let o,l;if(Array.isArray(a))if(a.length===2)o=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let c=Object.keys(a);if(c.length===1)o=c[0],l=a[o];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else o=a;n.items.push(vf.createPair(o,l,t))}return n}var wT={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:a0,createNode:o0};zo.createPairs=o0;zo.pairs=wT;zo.resolvePairs=a0});var bf=w(_f=>{"use strict";var l0=Le(),yf=Jr(),Ms=ii(),ST=ni(),c0=Yo(),Ri=class r extends ST.YAMLSeq{constructor(){super(),this.add=Ms.YAMLMap.prototype.add.bind(this),this.delete=Ms.YAMLMap.prototype.delete.bind(this),this.get=Ms.YAMLMap.prototype.get.bind(this),this.has=Ms.YAMLMap.prototype.has.bind(this),this.set=Ms.YAMLMap.prototype.set.bind(this),this.tag=r.tag}toJSON(e,t){if(!t)return super.toJSON(e);let i=new Map;t!=null&&t.onCreate&&t.onCreate(i);for(let n of this.items){let s,a;if(l0.isPair(n)?(s=yf.toJS(n.key,"",t),a=yf.toJS(n.value,s,t)):s=yf.toJS(n,"",t),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,a)}return i}static from(e,t,i){let n=c0.createPairs(e,t,i),s=new this;return s.items=n.items,s}};Ri.tag="tag:yaml.org,2002:omap";var ET={collection:"seq",identify:r=>r instanceof Map,nodeClass:Ri,default:!1,tag:"tag:yaml.org,2002:omap",resolve(r,e){let t=c0.resolvePairs(r,e),i=[];for(let{key:n}of t.items)l0.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Ri,t)},createNode:(r,e,t)=>Ri.from(r,e,t)};_f.YAMLOMap=Ri;_f.omap=ET});var p0=w(xf=>{"use strict";var u0=Ke();function f0({value:r,source:e},t){return e&&(r?h0:d0).test.test(e)?e:r?t.options.trueStr:t.options.falseStr}var h0={identify:r=>r===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new u0.Scalar(!0),stringify:f0},d0={identify:r=>r===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new u0.Scalar(!1),stringify:f0};xf.falseTag=d0;xf.trueTag=h0});var m0=w(Ko=>{"use strict";var kT=Ke(),wf=Dn(),OT={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:r=>r.slice(-3).toLowerCase()==="nan"?NaN:r[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:wf.stringifyNumber},CT={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:r=>parseFloat(r.replace(/_/g,"")),stringify(r){let e=Number(r.value);return isFinite(e)?e.toExponential():wf.stringifyNumber(r)}},TT={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(r){let e=new kT.Scalar(parseFloat(r.replace(/_/g,""))),t=r.indexOf(".");if(t!==-1){let i=r.substring(t+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:wf.stringifyNumber};Ko.float=TT;Ko.floatExp=CT;Ko.floatNaN=OT});var v0=w(Fs=>{"use strict";var g0=Dn(),Ds=r=>typeof r=="bigint"||Number.isInteger(r);function Zo(r,e,t,{intAsBigInt:i}){let n=r[0];if((n==="-"||n==="+")&&(e+=1),r=r.substring(e).replace(/_/g,""),i){switch(t){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let a=BigInt(r);return n==="-"?BigInt(-1)*a:a}let s=parseInt(r,t);return n==="-"?-1*s:s}function Sf(r,e,t){let{value:i}=r;if(Ds(i)){let n=i.toString(e);return i<0?"-"+t+n.substr(1):t+n}return g0.stringifyNumber(r)}var AT={identify:Ds,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(r,e,t)=>Zo(r,2,2,t),stringify:r=>Sf(r,2,"0b")},IT={identify:Ds,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(r,e,t)=>Zo(r,1,8,t),stringify:r=>Sf(r,8,"0")},NT={identify:Ds,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(r,e,t)=>Zo(r,0,10,t),stringify:g0.stringifyNumber},LT={identify:Ds,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(r,e,t)=>Zo(r,2,16,t),stringify:r=>Sf(r,16,"0x")};Fs.int=NT;Fs.intBin=AT;Fs.intHex=LT;Fs.intOct=IT});var kf=w(Ef=>{"use strict";var Xo=Le(),Jo=ti(),Qo=ii(),Pi=class r extends Qo.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(e){let t;Xo.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Jo.Pair(e.key,null):t=new Jo.Pair(e,null),Qo.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let i=Qo.findPair(this.items,e);return!t&&Xo.isPair(i)?Xo.isScalar(i.key)?i.key.value:i.key:i}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let i=Qo.findPair(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new Jo.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(e,t,i){let{replacer:n}=i,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof n=="function"&&(a=n.call(t,a,a)),s.items.push(Jo.createPair(a,null,i));return s}};Pi.tag="tag:yaml.org,2002:set";var BT={collection:"map",identify:r=>r instanceof Set,nodeClass:Pi,default:!1,tag:"tag:yaml.org,2002:set",createNode:(r,e,t)=>Pi.from(r,e,t),resolve(r,e){if(Xo.isMap(r)){if(r.hasAllNullValues(!0))return Object.assign(new Pi,r);e("Set items must all have null values")}else e("Expected a mapping for this tag");return r}};Ef.YAMLSet=Pi;Ef.set=BT});var Cf=w(el=>{"use strict";var RT=Dn();function Of(r,e){let t=r[0],i=t==="-"||t==="+"?r.substring(1):r,n=a=>e?BigInt(a):Number(a),s=i.replace(/_/g,"").split(":").reduce((a,o)=>a*n(60)+n(o),n(0));return t==="-"?n(-1)*s:s}function y0(r){let{value:e}=r,t=a=>a;if(typeof e=="bigint")t=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return RT.stringifyNumber(r);let i="";e<0&&(i="-",e*=t(-1));let n=t(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),i+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var PT={identify:r=>typeof r=="bigint"||Number.isInteger(r),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(r,e,{intAsBigInt:t})=>Of(r,t),stringify:y0},MT={identify:r=>typeof r=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:r=>Of(r,!1),stringify:y0},_0={identify:r=>r instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(r){let e=r.match(_0.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,i,n,s,a,o]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,i-1,n,s||0,a||0,o||0,l),u=e[8];if(u&&u!=="Z"){let f=Of(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:r})=>r.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};el.floatTime=MT;el.intTime=PT;el.timestamp=_0});var w0=w(x0=>{"use strict";var DT=Pn(),FT=Uo(),qT=Mn(),jT=Ps(),UT=gf(),b0=p0(),Tf=m0(),tl=v0(),$T=Bo(),VT=bf(),HT=Yo(),GT=kf(),Af=Cf(),WT=[DT.map,qT.seq,jT.string,FT.nullTag,b0.trueTag,b0.falseTag,tl.intBin,tl.intOct,tl.int,tl.intHex,Tf.floatNaN,Tf.floatExp,Tf.float,UT.binary,$T.merge,VT.omap,HT.pairs,GT.set,Af.intTime,Af.floatTime,Af.timestamp];x0.schema=WT});var L0=w(Lf=>{"use strict";var O0=Pn(),zT=Uo(),C0=Mn(),YT=Ps(),KT=lf(),If=uf(),Nf=hf(),ZT=t0(),JT=n0(),T0=gf(),qs=Bo(),A0=bf(),I0=Yo(),S0=w0(),N0=kf(),rl=Cf(),E0=new Map([["core",ZT.schema],["failsafe",[O0.map,C0.seq,YT.string]],["json",JT.schema],["yaml11",S0.schema],["yaml-1.1",S0.schema]]),k0={binary:T0.binary,bool:KT.boolTag,float:If.float,floatExp:If.floatExp,floatNaN:If.floatNaN,floatTime:rl.floatTime,int:Nf.int,intHex:Nf.intHex,intOct:Nf.intOct,intTime:rl.intTime,map:O0.map,merge:qs.merge,null:zT.nullTag,omap:A0.omap,pairs:I0.pairs,seq:C0.seq,set:N0.set,timestamp:rl.timestamp},QT={"tag:yaml.org,2002:binary":T0.binary,"tag:yaml.org,2002:merge":qs.merge,"tag:yaml.org,2002:omap":A0.omap,"tag:yaml.org,2002:pairs":I0.pairs,"tag:yaml.org,2002:set":N0.set,"tag:yaml.org,2002:timestamp":rl.timestamp};function XT(r,e,t){let i=E0.get(e);if(i&&!r)return t&&!i.includes(qs.merge)?i.concat(qs.merge):i.slice();let n=i;if(!n)if(Array.isArray(r))n=[];else{let s=Array.from(E0.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(r))for(let s of r)n=n.concat(s);else typeof r=="function"&&(n=r(n.slice()));return t&&(n=n.concat(qs.merge)),n.reduce((s,a)=>{let o=typeof a=="string"?k0[a]:a;if(!o){let l=JSON.stringify(a),c=Object.keys(k0).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(o)||s.push(o),s},[])}Lf.coreKnownTags=QT;Lf.getTags=XT});var Pf=w(B0=>{"use strict";var Bf=Le(),eA=Pn(),tA=Mn(),rA=Ps(),il=L0(),iA=(r,e)=>r.key<e.key?-1:r.key>e.key?1:0,Rf=class r{constructor({compat:e,customTags:t,merge:i,resolveKnownTags:n,schema:s,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?il.getTags(e,"compat"):e?il.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?il.coreKnownTags:{},this.tags=il.getTags(t,this.name,i),this.toStringOptions=o!=null?o:null,Object.defineProperty(this,Bf.MAP,{value:eA.map}),Object.defineProperty(this,Bf.SCALAR,{value:rA.string}),Object.defineProperty(this,Bf.SEQ,{value:tA.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?iA:null}clone(){let e=Object.create(r.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};B0.Schema=Rf});var P0=w(R0=>{"use strict";var nA=Le(),Mf=Ns(),js=Cs();function sA(r,e){var l;let t=[],i=e.directives===!0;if(e.directives!==!1&&r.directives){let c=r.directives.toString(r);c?(t.push(c),i=!0):r.directives.docStart&&(i=!0)}i&&t.push("---");let n=Mf.createStringifyContext(r,e),{commentString:s}=n.options;if(r.commentBefore){t.length!==1&&t.unshift("");let c=s(r.commentBefore);t.unshift(js.indentComment(c,""))}let a=!1,o=null;if(r.contents){if(nA.isNode(r.contents)){if(r.contents.spaceBefore&&i&&t.push(""),r.contents.commentBefore){let f=s(r.contents.commentBefore);t.push(js.indentComment(f,""))}n.forceBlockIndent=!!r.comment,o=r.contents.comment}let c=o?void 0:()=>a=!0,u=Mf.stringify(r.contents,n,()=>o=null,c);o&&(u+=js.lineComment(u,"",s(o))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(Mf.stringify(r.contents,n));if((l=r.directives)!=null&&l.docEnd)if(r.comment){let c=s(r.comment);c.includes(`
105
- `)?(t.push("..."),t.push(js.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=r.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||o)&&t[t.length-1]!==""&&t.push(""),t.push(js.indentComment(s(c),"")))}return t.join(`
91
+ ${t.indent}`}else if(!g&&mi.isCollection(e)){let C=S[0],M=S.indexOf(`
92
+ `),L=M!==-1,G=(N=(T=t.inFlow)!=null?T:e.flow)!=null?N:e.items.length===0;if(L||!G){let j=!1;if(L&&(C==="&"||C==="!")){let J=S.indexOf(" ");C==="&"&&J!==-1&&J<M&&S[J+1]==="!"&&(J=S.indexOf(" ",J+1)),(J===-1||M<J)&&(j=!0)}j||(R=`
93
+ ${t.indent}`)}}else(S===""||S[0]===`
94
+ `)&&(R="");return b+=R+S,t.inFlow?k&&r&&r():_&&!k?b+=Dn.lineComment(b,t.indent,c(_)):m&&n&&n(),b}$0.stringifyPair=WO});var du=O(pu=>{"use strict";var H0=require("process");function YO(i,...e){i==="debug"&&console.log(...e)}function KO(i,e){(i==="debug"||i==="warn")&&(typeof H0.emitWarning=="function"?H0.emitWarning(e):console.warn(e))}pu.debug=YO;pu.warn=KO});var Po=O(Lo=>{"use strict";var qn=xe(),G0=$e(),No="<<",Bo={identify:i=>i===No||typeof i=="symbol"&&i.description===No,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new G0.Scalar(Symbol(No)),{addToJSMap:W0}),stringify:()=>No},zO=(i,e)=>(Bo.identify(e)||qn.isScalar(e)&&(!e.type||e.type===G0.Scalar.PLAIN)&&Bo.identify(e.value))&&(i==null?void 0:i.doc.schema.tags.some(t=>t.tag===Bo.tag&&t.default));function W0(i,e,t){if(t=i&&qn.isAlias(t)?t.resolve(i.doc):t,qn.isSeq(t))for(let r of t.items)mu(i,e,r);else if(Array.isArray(t))for(let r of t)mu(i,e,r);else mu(i,e,t)}function mu(i,e,t){let r=i&&qn.isAlias(t)?t.resolve(i.doc):t;if(!qn.isMap(r))throw new Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,i,Map);for(let[s,o]of n)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}Lo.addMergeToJSMap=W0;Lo.isMergeKey=zO;Lo.merge=Bo});var yu=O(z0=>{"use strict";var JO=du(),Y0=Po(),ZO=Mn(),K0=xe(),gu=ki();function QO(i,e,{key:t,value:r}){if(K0.isNode(t)&&t.addToJSMap)t.addToJSMap(i,e,r);else if(Y0.isMergeKey(i,t))Y0.addMergeToJSMap(i,e,r);else{let n=gu.toJS(t,"",i);if(e instanceof Map)e.set(n,gu.toJS(r,n,i));else if(e instanceof Set)e.add(n);else{let s=XO(t,n,i),o=gu.toJS(r,s,i);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function XO(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(K0.isNode(i)&&(t!=null&&t.doc)){let r=ZO.createStringifyContext(t.doc,{});r.anchors=new Set;for(let s of t.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=i.toString(r);if(!t.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),JO.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return n}return JSON.stringify(e)}z0.addPairToJSMap=QO});var Ii=O(vu=>{"use strict";var J0=Nn(),ek=V0(),tk=yu(),Ro=xe();function ik(i,e,t){let r=J0.createNode(i,void 0,t),n=J0.createNode(e,void 0,t);return new Mo(r,n)}var Mo=class i{constructor(e,t=null){Object.defineProperty(this,Ro.NODE_TYPE,{value:Ro.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return Ro.isNode(t)&&(t=t.clone(e)),Ro.isNode(r)&&(r=r.clone(e)),new i(t,r)}toJSON(e,t){let r=t!=null&&t.mapAsMap?new Map:{};return tk.addPairToJSMap(t,r,this)}toString(e,t,r){return e!=null&&e.doc?ek.stringifyPair(this,e,t,r):JSON.stringify(this)}};vu.Pair=Mo;vu.createPair=ik});var bu=O(Q0=>{"use strict";var or=xe(),Z0=Mn(),Do=Bn();function rk(i,e,t){var s;return(((s=e.inFlow)!=null?s:i.flow)?sk:nk)(i,e,t)}function nk({comment:i,items:e},t,{blockItemPrefix:r,flowChars:n,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null}),f=!1,d=[];for(let y=0;y<e.length;++y){let m=e[y],b=null;if(or.isNode(m))!f&&m.spaceBefore&&d.push(""),qo(t,d,m.commentBefore,f),m.comment&&(b=m.comment);else if(or.isPair(m)){let x=or.isNode(m.key)?m.key:null;x&&(!f&&x.spaceBefore&&d.push(""),qo(t,d,x.commentBefore,f))}f=!1;let w=Z0.stringify(m,u,()=>b=null,()=>f=!0);b&&(w+=Do.lineComment(w,s,c(b))),f&&b&&(f=!1),d.push(r+w)}let g;if(d.length===0)g=n.start+n.end;else{g=d[0];for(let y=1;y<d.length;++y){let m=d[y];g+=m?`
95
+ ${l}${m}`:`
96
+ `}}return i?(g+=`
97
+ `+Do.indentComment(c(i),l),a&&a()):f&&o&&o(),g}function sk({items:i},e,{flowChars:t,itemIndent:r}){let{indent:n,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let y=0;y<i.length;++y){let m=i[y],b=null;if(or.isNode(m))m.spaceBefore&&f.push(""),qo(e,f,m.commentBefore,!1),m.comment&&(b=m.comment);else if(or.isPair(m)){let x=or.isNode(m.key)?m.key:null;x&&(x.spaceBefore&&f.push(""),qo(e,f,x.commentBefore,!1),x.comment&&(c=!0));let _=or.isNode(m.value)?m.value:null;_?(_.comment&&(b=_.comment),_.commentBefore&&(c=!0)):m.value==null&&(x!=null&&x.comment)&&(b=x.comment)}b&&(c=!0);let w=Z0.stringify(m,l,()=>b=null);c||(c=f.length>u||w.includes(`
98
+ `)),y<i.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((x,_)=>x+_.length+2,2)+(w.length+2)>e.options.lineWidth)),c&&(w+=",")),b&&(w+=Do.lineComment(w,r,a(b))),f.push(w),u=f.length}let{start:d,end:g}=t;if(f.length===0)return d+g;if(!c){let y=f.reduce((m,b)=>m+b.length+2,2);c=e.options.lineWidth>0&&y>e.options.lineWidth}if(c){let y=d;for(let m of f)y+=m?`
99
+ ${s}${n}${m}`:`
100
+ `;return`${y}
101
+ ${n}${g}`}else return`${d}${o}${f.join(" ")}${o}${g}`}function qo({indent:i,options:{commentString:e}},t,r,n){if(r&&n&&(r=r.replace(/^\n+/,"")),r){let s=Do.indentComment(e(r),i);t.push(s.trimStart())}}Q0.stringifyCollection=rk});var Bi=O(wu=>{"use strict";var ok=bu(),ak=yu(),lk=Oo(),Ni=xe(),Fo=Ii(),ck=$e();function Fn(i,e){let t=Ni.isScalar(e)?e.value:e;for(let r of i)if(Ni.isPair(r)&&(r.key===e||r.key===t||Ni.isScalar(r.key)&&r.key.value===t))return r}var _u=class extends lk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Ni.MAP,e),this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&o.items.push(Fo.createPair(l,c,r))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let r;Ni.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Fo.Pair(e,e==null?void 0:e.value):r=new Fo.Pair(e.key,e.value);let n=Fn(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);Ni.isScalar(n.value)&&ck.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(s){let a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let t=Fn(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var s;let r=Fn(this.items,e),n=r==null?void 0:r.value;return(s=!t&&Ni.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!Fn(this.items,e)}set(e,t){this.add(new Fo.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(n);for(let s of this.items)ak.addPairToJSMap(t,n,s);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Ni.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ok.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}};wu.YAMLMap=_u;wu.findPair=Fn});var Gr=O(ey=>{"use strict";var uk=xe(),X0=Bi(),fk={collection:"map",default:!0,nodeClass:X0.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(i,e){return uk.isMap(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>X0.YAMLMap.from(i,e,t)};ey.map=fk});var Li=O(ty=>{"use strict";var hk=Nn(),pk=bu(),dk=Oo(),Uo=xe(),mk=$e(),gk=ki(),xu=class extends dk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Uo.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=jo(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let r=jo(e);if(typeof r!="number")return;let n=this.items[r];return!t&&Uo.isScalar(n)?n.value:n}has(e){let t=jo(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=jo(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[r];Uo.isScalar(n)&&mk.isScalarValue(t)?n.value=t:this.items[r]=t}toJSON(e,t){let r=[];t!=null&&t.onCreate&&t.onCreate(r);let n=0;for(let s of this.items)r.push(gk.toJS(s,String(n++),t));return r}toString(e,t,r){return e?pk.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof n=="function"){let l=t instanceof Set?a:String(o++);a=n.call(t,l,a)}s.items.push(hk.createNode(a,void 0,r))}}return s}};function jo(i){let e=Uo.isScalar(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}ty.YAMLSeq=xu});var Wr=O(ry=>{"use strict";var yk=xe(),iy=Li(),vk={collection:"seq",default:!0,nodeClass:iy.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(i,e){return yk.isSeq(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>iy.YAMLSeq.from(i,e,t)};ry.seq=vk});var jn=O(ny=>{"use strict";var bk=Rn(),_k={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,r){return e=Object.assign({actualString:!0},e),bk.stringifyString(i,e,t,r)}};ny.string=_k});var $o=O(ay=>{"use strict";var sy=$e(),oy={identify:i=>i==null,createNode:()=>new sy.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new sy.Scalar(null),stringify:({source:i},e)=>typeof i=="string"&&oy.test.test(i)?i:e.options.nullStr};ay.nullTag=oy});var Su=O(cy=>{"use strict";var wk=$e(),ly={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new wk.Scalar(i[0]==="t"||i[0]==="T"),stringify({source:i,value:e},t){if(i&&ly.test.test(i)){let r=i[0]==="t"||i[0]==="T";if(e===r)return i}return e?t.options.trueStr:t.options.falseStr}};cy.boolTag=ly});var Yr=O(uy=>{"use strict";function xk({format:i,minFractionDigits:e,tag:t,value:r}){if(typeof r=="bigint")return String(r);let n=typeof r=="number"?r:Number(r);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!i&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}uy.stringifyNumber=xk});var Ou=O(Vo=>{"use strict";var Sk=$e(),Eu=Yr(),Ek={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Eu.stringifyNumber},Ok={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Eu.stringifyNumber(i)}},kk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){let e=new Sk.Scalar(parseFloat(i)),t=i.indexOf(".");return t!==-1&&i[i.length-1]==="0"&&(e.minFractionDigits=i.length-t-1),e},stringify:Eu.stringifyNumber};Vo.float=kk;Vo.floatExp=Ok;Vo.floatNaN=Ek});var Cu=O(Go=>{"use strict";var fy=Yr(),Ho=i=>typeof i=="bigint"||Number.isInteger(i),ku=(i,e,t,{intAsBigInt:r})=>r?BigInt(i):parseInt(i.substring(e),t);function hy(i,e,t){let{value:r}=i;return Ho(r)&&r>=0?t+r.toString(e):fy.stringifyNumber(i)}var Ck={identify:i=>Ho(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,e,t)=>ku(i,2,8,t),stringify:i=>hy(i,8,"0o")},Tk={identify:Ho,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,e,t)=>ku(i,0,10,t),stringify:fy.stringifyNumber},Ak={identify:i=>Ho(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,e,t)=>ku(i,2,16,t),stringify:i=>hy(i,16,"0x")};Go.int=Tk;Go.intHex=Ak;Go.intOct=Ck});var dy=O(py=>{"use strict";var Ik=Gr(),Nk=$o(),Bk=Wr(),Lk=jn(),Pk=Su(),Tu=Ou(),Au=Cu(),Rk=[Ik.map,Bk.seq,Lk.string,Nk.nullTag,Pk.boolTag,Au.intOct,Au.int,Au.intHex,Tu.floatNaN,Tu.floatExp,Tu.float];py.schema=Rk});var yy=O(gy=>{"use strict";var Mk=$e(),Dk=Gr(),qk=Wr();function my(i){return typeof i=="bigint"||Number.isInteger(i)}var Wo=({value:i})=>JSON.stringify(i),Fk=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:Wo},{identify:i=>i==null,createNode:()=>new Mk.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Wo},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:Wo},{identify:my,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,e,{intAsBigInt:t})=>t?BigInt(i):parseInt(i,10),stringify:({value:i})=>my(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:Wo}],jk={default:!0,tag:"",test:/^/,resolve(i,e){return e(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},Uk=[Dk.map,qk.seq].concat(Fk,jk);gy.schema=Uk});var Nu=O(vy=>{"use strict";var Un=require("buffer"),Iu=$e(),$k=Rn(),Vk={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,e){if(typeof Un.Buffer=="function")return Un.Buffer.from(i,"base64");if(typeof atob=="function"){let t=atob(i.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:e,value:t},r,n,s){if(!t)return"";let o=t,a;if(typeof Un.Buffer=="function")a=o instanceof Un.Buffer?o.toString("base64"):Un.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e!=null||(e=Iu.Scalar.BLOCK_LITERAL),e!==Iu.Scalar.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=l)u[f]=a.substr(d,l);a=u.join(e===Iu.Scalar.BLOCK_LITERAL?`
102
+ `:" ")}return $k.stringifyString({comment:i,type:e,value:a},r,n,s)}};vy.binary=Vk});var zo=O(Ko=>{"use strict";var Yo=xe(),Bu=Ii(),Hk=$e(),Gk=Li();function by(i,e){var t;if(Yo.isSeq(i))for(let r=0;r<i.items.length;++r){let n=i.items[r];if(!Yo.isPair(n)){if(Yo.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new Bu.Pair(new Hk.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
103
+ ${s.key.commentBefore}`:n.commentBefore),n.comment){let o=(t=s.value)!=null?t:s.key;o.comment=o.comment?`${n.comment}
104
+ ${o.comment}`:n.comment}n=s}i.items[r]=Yo.isPair(n)?n:new Bu.Pair(n)}}else e("Expected a sequence for this tag");return i}function _y(i,e,t){let{replacer:r}=t,n=new Gk.YAMLSeq(i);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(Bu.createPair(a,l,t))}return n}var Wk={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:by,createNode:_y};Ko.createPairs=_y;Ko.pairs=Wk;Ko.resolvePairs=by});var Ru=O(Pu=>{"use strict";var wy=xe(),Lu=ki(),$n=Bi(),Yk=Li(),xy=zo(),ar=class i extends Yk.YAMLSeq{constructor(){super(),this.add=$n.YAMLMap.prototype.add.bind(this),this.delete=$n.YAMLMap.prototype.delete.bind(this),this.get=$n.YAMLMap.prototype.get.bind(this),this.has=$n.YAMLMap.prototype.has.bind(this),this.set=$n.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t!=null&&t.onCreate&&t.onCreate(r);for(let n of this.items){let s,o;if(wy.isPair(n)?(s=Lu.toJS(n.key,"",t),o=Lu.toJS(n.value,s,t)):s=Lu.toJS(n,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){let n=xy.createPairs(e,t,r),s=new this;return s.items=n.items,s}};ar.tag="tag:yaml.org,2002:omap";var Kk={collection:"seq",identify:i=>i instanceof Map,nodeClass:ar,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){let t=xy.resolvePairs(i,e),r=[];for(let{key:n}of t.items)wy.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new ar,t)},createNode:(i,e,t)=>ar.from(i,e,t)};Pu.YAMLOMap=ar;Pu.omap=Kk});var Cy=O(Mu=>{"use strict";var Sy=$e();function Ey({value:i,source:e},t){return e&&(i?Oy:ky).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}var Oy={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Sy.Scalar(!0),stringify:Ey},ky={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Sy.Scalar(!1),stringify:Ey};Mu.falseTag=ky;Mu.trueTag=Oy});var Ty=O(Jo=>{"use strict";var zk=$e(),Du=Yr(),Jk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Du.stringifyNumber},Zk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Du.stringifyNumber(i)}},Qk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){let e=new zk.Scalar(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){let r=i.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Du.stringifyNumber};Jo.float=Qk;Jo.floatExp=Zk;Jo.floatNaN=Jk});var Iy=O(Hn=>{"use strict";var Ay=Yr(),Vn=i=>typeof i=="bigint"||Number.isInteger(i);function Zo(i,e,t,{intAsBigInt:r}){let n=i[0];if((n==="-"||n==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),r){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let o=BigInt(i);return n==="-"?BigInt(-1)*o:o}let s=parseInt(i,t);return n==="-"?-1*s:s}function qu(i,e,t){let{value:r}=i;if(Vn(r)){let n=r.toString(e);return r<0?"-"+t+n.substr(1):t+n}return Ay.stringifyNumber(i)}var Xk={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>Zo(i,2,2,t),stringify:i=>qu(i,2,"0b")},eC={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>Zo(i,1,8,t),stringify:i=>qu(i,8,"0")},tC={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>Zo(i,0,10,t),stringify:Ay.stringifyNumber},iC={identify:Vn,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>Zo(i,2,16,t),stringify:i=>qu(i,16,"0x")};Hn.int=tC;Hn.intBin=Xk;Hn.intHex=iC;Hn.intOct=eC});var ju=O(Fu=>{"use strict";var ea=xe(),Qo=Ii(),Xo=Bi(),lr=class i extends Xo.YAMLMap{constructor(e){super(e),this.tag=i.tag}add(e){let t;ea.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Qo.Pair(e.key,null):t=new Qo.Pair(e,null),Xo.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=Xo.findPair(this.items,e);return!t&&ea.isPair(r)?ea.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Xo.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Qo.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof n=="function"&&(o=n.call(t,o,o)),s.items.push(Qo.createPair(o,null,r));return s}};lr.tag="tag:yaml.org,2002:set";var rC={collection:"map",identify:i=>i instanceof Set,nodeClass:lr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,e,t)=>lr.from(i,e,t),resolve(i,e){if(ea.isMap(i)){if(i.hasAllNullValues(!0))return Object.assign(new lr,i);e("Set items must all have null values")}else e("Expected a mapping for this tag");return i}};Fu.YAMLSet=lr;Fu.set=rC});var $u=O(ta=>{"use strict";var nC=Yr();function Uu(i,e){let t=i[0],r=t==="-"||t==="+"?i.substring(1):i,n=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return t==="-"?n(-1)*s:s}function Ny(i){let{value:e}=i,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return nC.stringifyNumber(i);let r="";e<0&&(r="-",e*=t(-1));let n=t(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var sC={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,e,{intAsBigInt:t})=>Uu(i,t),stringify:Ny},oC={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>Uu(i,!1),stringify:Ny},By={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){let e=i.match(By.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,r,n,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,r-1,n,s||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Uu(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:i})=>{var e;return(e=i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))!=null?e:""}};ta.floatTime=oC;ta.intTime=sC;ta.timestamp=By});var Ry=O(Py=>{"use strict";var aC=Gr(),lC=$o(),cC=Wr(),uC=jn(),fC=Nu(),Ly=Cy(),Vu=Ty(),ia=Iy(),hC=Po(),pC=Ru(),dC=zo(),mC=ju(),Hu=$u(),gC=[aC.map,cC.seq,uC.string,lC.nullTag,Ly.trueTag,Ly.falseTag,ia.intBin,ia.intOct,ia.int,ia.intHex,Vu.floatNaN,Vu.floatExp,Vu.float,fC.binary,hC.merge,pC.omap,dC.pairs,mC.set,Hu.intTime,Hu.floatTime,Hu.timestamp];Py.schema=gC});var Gy=O(Yu=>{"use strict";var Fy=Gr(),yC=$o(),jy=Wr(),vC=jn(),bC=Su(),Gu=Ou(),Wu=Cu(),_C=dy(),wC=yy(),Uy=Nu(),Gn=Po(),$y=Ru(),Vy=zo(),My=Ry(),Hy=ju(),ra=$u(),Dy=new Map([["core",_C.schema],["failsafe",[Fy.map,jy.seq,vC.string]],["json",wC.schema],["yaml11",My.schema],["yaml-1.1",My.schema]]),qy={binary:Uy.binary,bool:bC.boolTag,float:Gu.float,floatExp:Gu.floatExp,floatNaN:Gu.floatNaN,floatTime:ra.floatTime,int:Wu.int,intHex:Wu.intHex,intOct:Wu.intOct,intTime:ra.intTime,map:Fy.map,merge:Gn.merge,null:yC.nullTag,omap:$y.omap,pairs:Vy.pairs,seq:jy.seq,set:Hy.set,timestamp:ra.timestamp},xC={"tag:yaml.org,2002:binary":Uy.binary,"tag:yaml.org,2002:merge":Gn.merge,"tag:yaml.org,2002:omap":$y.omap,"tag:yaml.org,2002:pairs":Vy.pairs,"tag:yaml.org,2002:set":Hy.set,"tag:yaml.org,2002:timestamp":ra.timestamp};function SC(i,e,t){let r=Dy.get(e);if(r&&!i)return t&&!r.includes(Gn.merge)?r.concat(Gn.merge):r.slice();let n=r;if(!n)if(Array.isArray(i))n=[];else{let s=Array.from(Dy.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(i))for(let s of i)n=n.concat(s);else typeof i=="function"&&(n=i(n.slice()));return t&&(n=n.concat(Gn.merge)),n.reduce((s,o)=>{let a=typeof o=="string"?qy[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(qy).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}Yu.coreKnownTags=xC;Yu.getTags=SC});var Ju=O(Wy=>{"use strict";var Ku=xe(),EC=Gr(),OC=Wr(),kC=jn(),na=Gy(),CC=(i,e)=>i.key<e.key?-1:i.key>e.key?1:0,zu=class i{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?na.getTags(e,"compat"):e?na.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?na.coreKnownTags:{},this.tags=na.getTags(t,this.name,r),this.toStringOptions=a!=null?a:null,Object.defineProperty(this,Ku.MAP,{value:EC.map}),Object.defineProperty(this,Ku.SCALAR,{value:kC.string}),Object.defineProperty(this,Ku.SEQ,{value:OC.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?CC:null}clone(){let e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Wy.Schema=zu});var Ky=O(Yy=>{"use strict";var TC=xe(),Zu=Mn(),Wn=Bn();function AC(i,e){var l;let t=[],r=e.directives===!0;if(e.directives!==!1&&i.directives){let c=i.directives.toString(i);c?(t.push(c),r=!0):i.directives.docStart&&(r=!0)}r&&t.push("---");let n=Zu.createStringifyContext(i,e),{commentString:s}=n.options;if(i.commentBefore){t.length!==1&&t.unshift("");let c=s(i.commentBefore);t.unshift(Wn.indentComment(c,""))}let o=!1,a=null;if(i.contents){if(TC.isNode(i.contents)){if(i.contents.spaceBefore&&r&&t.push(""),i.contents.commentBefore){let f=s(i.contents.commentBefore);t.push(Wn.indentComment(f,""))}n.forceBlockIndent=!!i.comment,a=i.contents.comment}let c=a?void 0:()=>o=!0,u=Zu.stringify(i.contents,n,()=>a=null,c);a&&(u+=Wn.lineComment(u,"",s(a))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(Zu.stringify(i.contents,n));if((l=i.directives)!=null&&l.docEnd)if(i.comment){let c=s(i.comment);c.includes(`
105
+ `)?(t.push("..."),t.push(Wn.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=i.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Wn.indentComment(s(c),"")))}return t.join(`
106
106
  `)+`
107
- `}R0.stringifyDocument=sA});var Us=w(M0=>{"use strict";var aA=ks(),Fn=Eo(),Zt=Le(),oA=ti(),lA=Jr(),cA=Pf(),uA=P0(),Df=_o(),fA=ju(),hA=Os(),Ff=qu(),qf=class r{constructor(e,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Zt.NODE_TYPE,{value:Zt.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:i===void 0&&t&&(i=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:a}=s;i!=null&&i._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Ff.Directives({version:a}),this.setSchema(a,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(r.prototype,{[Zt.NODE_TYPE]:{value:Zt.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Zt.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){qn(this.contents)&&this.contents.add(e)}addIn(e,t){qn(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let i=Df.anchorNames(this);e.anchor=!t||i.has(t)?Df.findNewAnchor(t||"a",i):t}return new aA.Alias(e.anchor)}createNode(e,t,i){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let _=S=>typeof S=="number"||S instanceof String||S instanceof Number,x=t.filter(_).map(String);x.length>0&&(t=t.concat(x)),n=t}else i===void 0&&t&&(i=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:o,keepUndefined:l,onTagObj:c,tag:u}=i!=null?i:{},{onAnchor:f,setAnchors:p,sourceObjects:m}=Df.createNodeAnchors(this,a||"a"),g={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:m},y=hA.createNode(e,u,g);return o&&Zt.isCollection(y)&&(y.flow=!0),p(),y}createPair(e,t,i={}){let n=this.createNode(e,null,i),s=this.createNode(t,null,i);return new oA.Pair(n,s)}delete(e){return qn(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Fn.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):qn(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Zt.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Fn.isEmptyPath(e)?!t&&Zt.isScalar(this.contents)?this.contents.value:this.contents:Zt.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Zt.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Fn.isEmptyPath(e)?this.contents!==void 0:Zt.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Fn.collectionFromPath(this.schema,[e],t):qn(this.contents)&&this.contents.set(e,t)}setIn(e,t){Fn.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Fn.collectionFromPath(this.schema,Array.from(e),t):qn(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ff.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ff.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(i)this.schema=new cA.Schema(Object.assign(i,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:i,maxAliasCount:n,onAnchor:s,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=lA.toJS(this.contents,t!=null?t:"",o);if(typeof s=="function")for(let{count:c,res:u}of o.anchors.values())s(u,c);return typeof a=="function"?fA.applyReviver(a,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return uA.stringifyDocument(this,e)}};function qn(r){if(Zt.isCollection(r))return!0;throw new Error("Expected a YAML collection as document contents")}M0.Document=qf});var Hs=w(Vs=>{"use strict";var $s=class extends Error{constructor(e,t,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=t}},jf=class extends $s{constructor(e,t,i){super("YAMLParseError",e,t,i)}},Uf=class extends $s{constructor(e,t,i){super("YAMLWarning",e,t,i)}},dA=(r,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(o=>e.linePos(o));let{line:i,col:n}=t.linePos[0];t.message+=` at line ${i}, column ${n}`;let s=n-1,a=r.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){let o=Math.min(s-39,a.length-79);a="\u2026"+a.substring(o),s-=o-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(a.substring(0,s))){let o=r.substring(e.lineStarts[i-2],e.lineStarts[i-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
108
- `),a=o+a}if(/[^ ]/.test(a)){let o=1,l=t.linePos[1];l&&l.line===i&&l.col>n&&(o=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(o);t.message+=`:
107
+ `}Yy.stringifyDocument=AC});var Yn=O(zy=>{"use strict";var IC=In(),Kr=Oo(),Mt=xe(),NC=Ii(),BC=ki(),LC=Ju(),PC=Ky(),Qu=wo(),RC=iu(),MC=Nn(),Xu=tu(),ef=class i{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Mt.NODE_TYPE,{value:Mt.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:r===void 0&&t&&(r=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Xu.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(i.prototype,{[Mt.NODE_TYPE]:{value:Mt.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Mt.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){zr(this.contents)&&this.contents.add(e)}addIn(e,t){zr(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=Qu.anchorNames(this);e.anchor=!t||r.has(t)?Qu.findNewAnchor(t||"a",r):t}return new IC.Alias(e.anchor)}createNode(e,t,r){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let b=x=>typeof x=="number"||x instanceof String||x instanceof Number,w=t.filter(b).map(String);w.length>0&&(t=t.concat(w)),n=t}else r===void 0&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r!=null?r:{},{onAnchor:f,setAnchors:d,sourceObjects:g}=Qu.createNodeAnchors(this,o||"a"),y={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:g},m=MC.createNode(e,u,y);return a&&Mt.isCollection(m)&&(m.flow=!0),d(),m}createPair(e,t,r={}){let n=this.createNode(e,null,r),s=this.createNode(t,null,r);return new NC.Pair(n,s)}delete(e){return zr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Kr.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):zr(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Mt.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Kr.isEmptyPath(e)?!t&&Mt.isScalar(this.contents)?this.contents.value:this.contents:Mt.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Mt.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Kr.isEmptyPath(e)?this.contents!==void 0:Mt.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Kr.collectionFromPath(this.schema,[e],t):zr(this.contents)&&this.contents.set(e,t)}setIn(e,t){Kr.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Kr.collectionFromPath(this.schema,Array.from(e),t):zr(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Xu.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Xu.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new LC.Schema(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=BC.toJS(this.contents,t!=null?t:"",a);if(typeof s=="function")for(let{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?RC.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return PC.stringifyDocument(this,e)}};function zr(i){if(Mt.isCollection(i))return!0;throw new Error("Expected a YAML collection as document contents")}zy.Document=ef});var Jn=O(zn=>{"use strict";var Kn=class extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}},tf=class extends Kn{constructor(e,t,r){super("YAMLParseError",e,t,r)}},rf=class extends Kn{constructor(e,t,r){super("YAMLWarning",e,t,r)}},DC=(i,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:r,col:n}=t.linePos[0];t.message+=` at line ${r}, column ${n}`;let s=n-1,o=i.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="\u2026"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(o.substring(0,s))){let a=i.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
108
+ `),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];(l==null?void 0:l.line)===r&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(a);t.message+=`:
109
109
 
110
- ${a}
110
+ ${o}
111
111
  ${c}
112
- `}};Vs.YAMLError=$s;Vs.YAMLParseError=jf;Vs.YAMLWarning=Uf;Vs.prettifyError=dA});var Gs=w(D0=>{"use strict";function pA(r,{flow:e,indicator:t,next:i,offset:n,onError:s,parentIndent:a,startOnNewline:o}){let l=!1,c=o,u=o,f="",p="",m=!1,g=!1,y=null,_=null,x=null,S=null,O=null,k=null,E=null;for(let A of r)switch(g&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),y&&(c&&A.type!=="comment"&&A.type!=="newline"&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),A.type){case"space":!e&&(t!=="doc-start"||(i==null?void 0:i.type)!=="flow-collection")&&A.source.includes(" ")&&(y=A),u=!0;break;case"comment":{u||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=A.source.substring(1)||" ";f?f+=p+C:f=C,p="",c=!1;break}case"newline":c?f?f+=A.source:l=!0:p+=A.source,c=!0,m=!0,(_||x)&&(S=A),u=!0;break;case"anchor":_&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=A,E===null&&(E=A.offset),c=!1,u=!1,g=!0;break;case"tag":{x&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),x=A,E===null&&(E=A.offset),c=!1,u=!1,g=!0;break}case t:(_||x)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),k&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e!=null?e:"collection"}`),k=A,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){O&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),O=A,c=!1,u=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}let R=r[r.length-1],T=R?R.offset+R.source.length:n;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(c&&y.indent<=a||(i==null?void 0:i.type)==="block-map"||(i==null?void 0:i.type)==="block-seq")&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:O,found:k,spaceBefore:l,comment:f,hasNewline:m,anchor:_,tag:x,newlineAfterProp:S,end:T,start:E!=null?E:T}}D0.resolveProps=pA});var nl=w(F0=>{"use strict";function $f(r){if(!r)return null;switch(r.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(r.source.includes(`
113
- `))return!0;if(r.end){for(let e of r.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of r.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if($f(e.key)||$f(e.value))return!0}return!1;default:return!0}}F0.containsNewline=$f});var Vf=w(q0=>{"use strict";var mA=nl();function gA(r,e,t){if((e==null?void 0:e.type)==="flow-collection"){let i=e.end[0];i.indent===r&&(i.source==="]"||i.source==="}")&&mA.containsNewline(e)&&t(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}q0.flowIndentCheck=gA});var Hf=w(U0=>{"use strict";var j0=Le();function vA(r,e,t){let{uniqueKeys:i}=r.options;if(i===!1)return!1;let n=typeof i=="function"?i:(s,a)=>s===a||j0.isScalar(s)&&j0.isScalar(a)&&s.value===a.value;return e.some(s=>n(s.key,t))}U0.mapIncludes=vA});var z0=w(W0=>{"use strict";var $0=ti(),yA=ii(),V0=Gs(),_A=nl(),H0=Vf(),bA=Hf(),G0="All mapping items must start at the same column";function xA({composeNode:r,composeEmptyNode:e},t,i,n,s){var u,f;let a=(u=s==null?void 0:s.nodeClass)!=null?u:yA.YAMLMap,o=new a(t.schema);t.atRoot&&(t.atRoot=!1);let l=i.offset,c=null;for(let p of i.items){let{start:m,key:g,sep:y,value:_}=p,x=V0.resolveProps(m,{indicator:"explicit-key-ind",next:g!=null?g:y==null?void 0:y[0],offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0}),S=!x.found;if(S){if(g&&(g.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==i.indent&&n(l,"BAD_INDENT",G0)),!x.anchor&&!x.tag&&!y){c=x.end,x.comment&&(o.comment?o.comment+=`
114
- `+x.comment:o.comment=x.comment);continue}(x.newlineAfterProp||_A.containsNewline(g))&&n(g!=null?g:m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=x.found)==null?void 0:f.indent)!==i.indent&&n(l,"BAD_INDENT",G0);t.atKey=!0;let O=x.end,k=g?r(t,g,x,n):e(t,O,m,null,x,n);t.schema.compat&&H0.flowIndentCheck(i.indent,g,n),t.atKey=!1,bA.mapIncludes(t,o.items,k)&&n(O,"DUPLICATE_KEY","Map keys must be unique");let E=V0.resolveProps(y!=null?y:[],{indicator:"map-value-ind",next:_,offset:k.range[2],onError:n,parentIndent:i.indent,startOnNewline:!g||g.type==="block-scalar"});if(l=E.end,E.found){S&&((_==null?void 0:_.type)==="block-map"&&!E.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&x.start<E.found.offset-1024&&n(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let R=_?r(t,_,E,n):e(t,l,y,null,E,n);t.schema.compat&&H0.flowIndentCheck(i.indent,_,n),l=R.range[2];let T=new $0.Pair(k,R);t.options.keepSourceTokens&&(T.srcToken=p),o.items.push(T)}else{S&&n(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(k.comment?k.comment+=`
115
- `+E.comment:k.comment=E.comment);let R=new $0.Pair(k);t.options.keepSourceTokens&&(R.srcToken=p),o.items.push(R)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),o.range=[i.offset,l,c!=null?c:l],o}W0.resolveBlockMap=xA});var K0=w(Y0=>{"use strict";var wA=ni(),SA=Gs(),EA=Vf();function kA({composeNode:r,composeEmptyNode:e},t,i,n,s){var u;let a=(u=s==null?void 0:s.nodeClass)!=null?u:wA.YAMLSeq,o=new a(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=i.offset,c=null;for(let{start:f,value:p}of i.items){let m=SA.resolveProps(f,{indicator:"seq-item-ind",next:p,offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||p)p&&p.type==="block-seq"?n(m.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=m.end,m.comment&&(o.comment=m.comment);continue}let g=p?r(t,p,m,n):e(t,m.end,f,null,m,n);t.schema.compat&&EA.flowIndentCheck(i.indent,p,n),l=g.range[2],o.items.push(g)}return o.range=[i.offset,l,c!=null?c:l],o}Y0.resolveBlockSeq=kA});var jn=w(Z0=>{"use strict";function OA(r,e,t,i){let n="";if(r){let s=!1,a="";for(let o of r){let{source:l,type:c}=o;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&i(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=a+u:n=u,a="";break}case"newline":n&&(a+=l),s=!0;break;default:i(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}Z0.resolveEnd=OA});var e_=w(X0=>{"use strict";var CA=Le(),TA=ti(),J0=ii(),AA=ni(),IA=jn(),Q0=Gs(),NA=nl(),LA=Hf(),Gf="Block collections are not allowed within flow collections",Wf=r=>r&&(r.type==="block-map"||r.type==="block-seq");function BA({composeNode:r,composeEmptyNode:e},t,i,n,s){var _,x;let a=i.start.source==="{",o=a?"flow map":"flow sequence",l=(_=s==null?void 0:s.nodeClass)!=null?_:a?J0.YAMLMap:AA.YAMLSeq,c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=i.offset+i.start.source.length;for(let S=0;S<i.items.length;++S){let O=i.items[S],{start:k,key:E,sep:R,value:T}=O,A=Q0.resolveProps(k,{flow:o,indicator:"explicit-key-ind",next:E!=null?E:R==null?void 0:R[0],offset:f,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!R&&!T){S===0&&A.comma?n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):S<i.items.length-1&&n(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),A.comment&&(c.comment?c.comment+=`
116
- `+A.comment:c.comment=A.comment),f=A.end;continue}!a&&t.options.strict&&NA.containsNewline(E)&&n(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(S===0)A.comma&&n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(A.comma||n(A.start,"MISSING_CHAR",`Missing , between ${o} items`),A.comment){let C="";e:for(let L of k)switch(L.type){case"comma":case"space":break;case"comment":C=L.source.substring(1);break e;default:break e}if(C){let L=c.items[c.items.length-1];CA.isPair(L)&&(L=(x=L.value)!=null?x:L.key),L.comment?L.comment+=`
117
- `+C:L.comment=C,A.comment=A.comment.substring(C.length+1)}}if(!a&&!R&&!A.found){let C=T?r(t,T,A,n):e(t,A.end,R,null,A,n);c.items.push(C),f=C.range[2],Wf(T)&&n(C.range,"BLOCK_IN_FLOW",Gf)}else{t.atKey=!0;let C=A.end,L=E?r(t,E,A,n):e(t,C,k,null,A,n);Wf(E)&&n(L.range,"BLOCK_IN_FLOW",Gf),t.atKey=!1;let P=Q0.resolveProps(R!=null?R:[],{flow:o,indicator:"map-value-ind",next:T,offset:L.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(P.found){if(!a&&!A.found&&t.options.strict){if(R)for(let G of R){if(G===P.found)break;if(G.type==="newline"){n(G,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<P.found.offset-1024&&n(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&T.source&&T.source[0]===":"?n(T,"MISSING_CHAR",`Missing space after : in ${o}`):n(P.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let $=T?r(t,T,P,n):P.found?e(t,P.end,R,null,P,n):null;$?Wf(T)&&n($.range,"BLOCK_IN_FLOW",Gf):P.comment&&(L.comment?L.comment+=`
118
- `+P.comment:L.comment=P.comment);let q=new TA.Pair(L,$);if(t.options.keepSourceTokens&&(q.srcToken=O),a){let G=c;LA.mapIncludes(t,G.items,L)&&n(C,"DUPLICATE_KEY","Map keys must be unique"),G.items.push(q)}else{let G=new J0.YAMLMap(t.schema);G.flow=!0,G.items.push(q);let U=($!=null?$:L).range;G.range=[L.range[0],U[1],U[2]],c.items.push(G)}f=$?$.range[2]:P.end}}let p=a?"}":"]",[m,...g]=i.end,y=f;if(m&&m.source===p)y=m.offset+m.source.length;else{let S=o[0].toUpperCase()+o.substring(1),O=u?`${S} must end with a ${p}`:`${S} in block collection must be sufficiently indented and end with a ${p}`;n(f,u?"MISSING_CHAR":"BAD_INDENT",O),m&&m.source.length!==1&&g.unshift(m)}if(g.length>0){let S=IA.resolveEnd(g,y,t.options.strict,n);S.comment&&(c.comment?c.comment+=`
119
- `+S.comment:c.comment=S.comment),c.range=[i.offset,y,S.offset]}else c.range=[i.offset,y,y];return c}X0.resolveFlowCollection=BA});var r_=w(t_=>{"use strict";var RA=Le(),PA=Ke(),MA=ii(),DA=ni(),FA=z0(),qA=K0(),jA=e_();function zf(r,e,t,i,n,s){let a=t.type==="block-map"?FA.resolveBlockMap(r,e,t,i,s):t.type==="block-seq"?qA.resolveBlockSeq(r,e,t,i,s):jA.resolveFlowCollection(r,e,t,i,s),o=a.constructor;return n==="!"||n===o.tagName?(a.tag=o.tagName,a):(n&&(a.tag=n),a)}function UA(r,e,t,i,n){var p,m;let s=i.tag,a=s?e.directives.tagName(s.source,g=>n(s,"TAG_RESOLVE_FAILED",g)):null;if(t.type==="block-seq"){let{anchor:g,newlineAfterProp:y}=i,_=g&&s?g.offset>s.offset?g:s:g!=null?g:s;_&&(!y||y.offset<_.offset)&&n(_,"MISSING_CHAR","Missing newline after block sequence props")}let o=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===MA.YAMLMap.tagName&&o==="map"||a===DA.YAMLSeq.tagName&&o==="seq")return zf(r,e,t,n,a);let l=e.schema.tags.find(g=>g.tag===a&&g.collection===o);if(!l){let g=e.schema.knownTags[a];if(g&&g.collection===o)e.schema.tags.push(Object.assign({},g,{default:!1})),l=g;else return g!=null&&g.collection?n(s,"BAD_COLLECTION_TYPE",`${g.tag} used for ${o} collection, but expects ${g.collection}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),zf(r,e,t,n,a)}let c=zf(r,e,t,n,a,l),u=(m=(p=l.resolve)==null?void 0:p.call(l,c,g=>n(s,"TAG_RESOLVE_FAILED",g),e.options))!=null?m:c,f=RA.isNode(u)?u:new PA.Scalar(u);return f.range=c.range,f.tag=a,l!=null&&l.format&&(f.format=l.format),f}t_.composeCollection=UA});var Kf=w(i_=>{"use strict";var Yf=Ke();function $A(r,e,t){let i=e.offset,n=VA(e,r.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let s=n.mode===">"?Yf.Scalar.BLOCK_FOLDED:Yf.Scalar.BLOCK_LITERAL,a=e.source?HA(e.source):[],o=a.length;for(let y=a.length-1;y>=0;--y){let _=a[y][1];if(_===""||_==="\r")o=y;else break}if(o===0){let y=n.chomp==="+"&&a.length>0?`
120
- `.repeat(Math.max(1,a.length-1)):"",_=i+n.length;return e.source&&(_+=e.source.length),{value:y,type:s,comment:n.comment,range:[i,_,_]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let y=0;y<o;++y){let[_,x]=a[y];if(x===""||x==="\r")n.indent===0&&_.length>l&&(l=_.length);else{_.length<l&&t(c+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=_.length),u=y,l===0&&!r.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=_.length+x.length+1}for(let y=a.length-1;y>=o;--y)a[y][0].length>l&&(o=y+1);let f="",p="",m=!1;for(let y=0;y<u;++y)f+=a[y][0].slice(l)+`
121
- `;for(let y=u;y<o;++y){let[_,x]=a[y];c+=_.length+x.length+1;let S=x[x.length-1]==="\r";if(S&&(x=x.slice(0,-1)),x&&_.length<l){let k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(c-x.length-(S?2:1),"BAD_INDENT",k),_=""}s===Yf.Scalar.BLOCK_LITERAL?(f+=p+_.slice(l)+x,p=`
122
- `):_.length>l||x[0]===" "?(p===" "?p=`
123
- `:!m&&p===`
124
- `&&(p=`
112
+ `}};zn.YAMLError=Kn;zn.YAMLParseError=tf;zn.YAMLWarning=rf;zn.prettifyError=DC});var Zn=O(Jy=>{"use strict";function qC(i,{flow:e,indicator:t,next:r,offset:n,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",g=!1,y=!1,m=null,b=null,w=null,x=null,_=null,k=null,S=null;for(let N of i)switch(y&&(N.type!=="space"&&N.type!=="newline"&&N.type!=="comma"&&s(N.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),m&&(c&&N.type!=="comment"&&N.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),N.type){case"space":!e&&(t!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&N.source.includes(" ")&&(m=N),u=!0;break;case"comment":{u||s(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=N.source.substring(1)||" ";f?f+=d+C:f=C,d="",c=!1;break}case"newline":c?f?f+=N.source:(!k||t!=="seq-item-ind")&&(l=!0):d+=N.source,c=!0,g=!0,(b||w)&&(x=N),u=!0;break;case"anchor":b&&s(N,"MULTIPLE_ANCHORS","A node can have at most one anchor"),N.source.endsWith(":")&&s(N.offset+N.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=N,S!=null||(S=N.offset),c=!1,u=!1,y=!0;break;case"tag":{w&&s(N,"MULTIPLE_TAGS","A node can have at most one tag"),w=N,S!=null||(S=N.offset),c=!1,u=!1,y=!0;break}case t:(b||w)&&s(N,"BAD_PROP_ORDER",`Anchors and tags must be after the ${N.source} indicator`),k&&s(N,"UNEXPECTED_TOKEN",`Unexpected ${N.source} in ${e!=null?e:"collection"}`),k=N,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){_&&s(N,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),_=N,c=!1,u=!1;break}default:s(N,"UNEXPECTED_TOKEN",`Unexpected ${N.type} token`),c=!1,u=!1}let R=i[i.length-1],T=R?R.offset+R.source.length:n;return y&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:k,spaceBefore:l,comment:f,hasNewline:g,anchor:b,tag:w,newlineAfterProp:x,end:T,start:S!=null?S:T}}Jy.resolveProps=qC});var sa=O(Zy=>{"use strict";function nf(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
113
+ `))return!0;if(i.end){for(let e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of i.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(nf(e.key)||nf(e.value))return!0}return!1;default:return!0}}Zy.containsNewline=nf});var sf=O(Qy=>{"use strict";var FC=sa();function jC(i,e,t){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===i&&(r.source==="]"||r.source==="}")&&FC.containsNewline(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Qy.flowIndentCheck=jC});var of=O(ev=>{"use strict";var Xy=xe();function UC(i,e,t){let{uniqueKeys:r}=i.options;if(r===!1)return!1;let n=typeof r=="function"?r:(s,o)=>s===o||Xy.isScalar(s)&&Xy.isScalar(o)&&s.value===o.value;return e.some(s=>n(s.key,t))}ev.mapIncludes=UC});var ov=O(sv=>{"use strict";var tv=Ii(),$C=Bi(),iv=Zn(),VC=sa(),rv=sf(),HC=of(),nv="All mapping items must start at the same column";function GC({composeNode:i,composeEmptyNode:e},t,r,n,s){var u,f;let o=(u=s==null?void 0:s.nodeClass)!=null?u:$C.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(let d of r.items){let{start:g,key:y,sep:m,value:b}=d,w=iv.resolveProps(g,{indicator:"explicit-key-ind",next:y!=null?y:m==null?void 0:m[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),x=!w.found;if(x){if(y&&(y.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==r.indent&&n(l,"BAD_INDENT",nv)),!w.anchor&&!w.tag&&!m){c=w.end,w.comment&&(a.comment?a.comment+=`
114
+ `+w.comment:a.comment=w.comment);continue}(w.newlineAfterProp||VC.containsNewline(y))&&n(y!=null?y:g[g.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=w.found)==null?void 0:f.indent)!==r.indent&&n(l,"BAD_INDENT",nv);t.atKey=!0;let _=w.end,k=y?i(t,y,w,n):e(t,_,g,null,w,n);t.schema.compat&&rv.flowIndentCheck(r.indent,y,n),t.atKey=!1,HC.mapIncludes(t,a.items,k)&&n(_,"DUPLICATE_KEY","Map keys must be unique");let S=iv.resolveProps(m!=null?m:[],{indicator:"map-value-ind",next:b,offset:k.range[2],onError:n,parentIndent:r.indent,startOnNewline:!y||y.type==="block-scalar"});if(l=S.end,S.found){x&&((b==null?void 0:b.type)==="block-map"&&!S.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&w.start<S.found.offset-1024&&n(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let R=b?i(t,b,S,n):e(t,l,m,null,S,n);t.schema.compat&&rv.flowIndentCheck(r.indent,b,n),l=R.range[2];let T=new tv.Pair(k,R);t.options.keepSourceTokens&&(T.srcToken=d),a.items.push(T)}else{x&&n(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(k.comment?k.comment+=`
115
+ `+S.comment:k.comment=S.comment);let R=new tv.Pair(k);t.options.keepSourceTokens&&(R.srcToken=d),a.items.push(R)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c!=null?c:l],a}sv.resolveBlockMap=GC});var lv=O(av=>{"use strict";var WC=Li(),YC=Zn(),KC=sf();function zC({composeNode:i,composeEmptyNode:e},t,r,n,s){var u;let o=(u=s==null?void 0:s.nodeClass)!=null?u:WC.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(let{start:f,value:d}of r.items){let g=YC.resolveProps(f,{indicator:"seq-item-ind",next:d,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!g.found)if(g.anchor||g.tag||d)(d==null?void 0:d.type)==="block-seq"?n(g.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=g.end,g.comment&&(a.comment=g.comment);continue}let y=d?i(t,d,g,n):e(t,g.end,f,null,g,n);t.schema.compat&&KC.flowIndentCheck(r.indent,d,n),l=y.range[2],a.items.push(y)}return a.range=[r.offset,l,c!=null?c:l],a}av.resolveBlockSeq=zC});var Jr=O(cv=>{"use strict";function JC(i,e,t,r){let n="";if(i){let s=!1,o="";for(let a of i){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}cv.resolveEnd=JC});var pv=O(hv=>{"use strict";var ZC=xe(),QC=Ii(),uv=Bi(),XC=Li(),eT=Jr(),fv=Zn(),tT=sa(),iT=of(),af="Block collections are not allowed within flow collections",lf=i=>i&&(i.type==="block-map"||i.type==="block-seq");function rT({composeNode:i,composeEmptyNode:e},t,r,n,s){var b,w,x;let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(b=s==null?void 0:s.nodeClass)!=null?b:o?uv.YAMLMap:XC.YAMLSeq,c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=r.offset+r.start.source.length;for(let _=0;_<r.items.length;++_){let k=r.items[_],{start:S,key:R,sep:T,value:N}=k,C=fv.resolveProps(S,{flow:a,indicator:"explicit-key-ind",next:R!=null?R:T==null?void 0:T[0],offset:f,onError:n,parentIndent:r.indent,startOnNewline:!1});if(!C.found){if(!C.anchor&&!C.tag&&!T&&!N){_===0&&C.comma?n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):_<r.items.length-1&&n(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),C.comment&&(c.comment?c.comment+=`
116
+ `+C.comment:c.comment=C.comment),f=C.end;continue}!o&&t.options.strict&&tT.containsNewline(R)&&n(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)C.comma&&n(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(C.comma||n(C.start,"MISSING_CHAR",`Missing , between ${a} items`),C.comment){let M="";e:for(let L of S)switch(L.type){case"comma":case"space":break;case"comment":M=L.source.substring(1);break e;default:break e}if(M){let L=c.items[c.items.length-1];ZC.isPair(L)&&(L=(w=L.value)!=null?w:L.key),L.comment?L.comment+=`
117
+ `+M:L.comment=M,C.comment=C.comment.substring(M.length+1)}}if(!o&&!T&&!C.found){let M=N?i(t,N,C,n):e(t,C.end,T,null,C,n);c.items.push(M),f=M.range[2],lf(N)&&n(M.range,"BLOCK_IN_FLOW",af)}else{t.atKey=!0;let M=C.end,L=R?i(t,R,C,n):e(t,M,S,null,C,n);lf(R)&&n(L.range,"BLOCK_IN_FLOW",af),t.atKey=!1;let G=fv.resolveProps(T!=null?T:[],{flow:a,indicator:"map-value-ind",next:N,offset:L.range[2],onError:n,parentIndent:r.indent,startOnNewline:!1});if(G.found){if(!o&&!C.found&&t.options.strict){if(T)for(let F of T){if(F===G.found)break;if(F.type==="newline"){n(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}C.start<G.found.offset-1024&&n(G.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else N&&("source"in N&&((x=N.source)==null?void 0:x[0])===":"?n(N,"MISSING_CHAR",`Missing space after : in ${a}`):n(G.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let j=N?i(t,N,G,n):G.found?e(t,G.end,T,null,G,n):null;j?lf(N)&&n(j.range,"BLOCK_IN_FLOW",af):G.comment&&(L.comment?L.comment+=`
118
+ `+G.comment:L.comment=G.comment);let J=new QC.Pair(L,j);if(t.options.keepSourceTokens&&(J.srcToken=k),o){let F=c;iT.mapIncludes(t,F.items,L)&&n(M,"DUPLICATE_KEY","Map keys must be unique"),F.items.push(J)}else{let F=new uv.YAMLMap(t.schema);F.flow=!0,F.items.push(J);let V=(j!=null?j:L).range;F.range=[L.range[0],V[1],V[2]],c.items.push(F)}f=j?j.range[2]:G.end}}let d=o?"}":"]",[g,...y]=r.end,m=f;if((g==null?void 0:g.source)===d)m=g.offset+g.source.length;else{let _=a[0].toUpperCase()+a.substring(1),k=u?`${_} must end with a ${d}`:`${_} in block collection must be sufficiently indented and end with a ${d}`;n(f,u?"MISSING_CHAR":"BAD_INDENT",k),g&&g.source.length!==1&&y.unshift(g)}if(y.length>0){let _=eT.resolveEnd(y,m,t.options.strict,n);_.comment&&(c.comment?c.comment+=`
119
+ `+_.comment:c.comment=_.comment),c.range=[r.offset,m,_.offset]}else c.range=[r.offset,m,m];return c}hv.resolveFlowCollection=rT});var mv=O(dv=>{"use strict";var nT=xe(),sT=$e(),oT=Bi(),aT=Li(),lT=ov(),cT=lv(),uT=pv();function cf(i,e,t,r,n,s){let o=t.type==="block-map"?lT.resolveBlockMap(i,e,t,r,s):t.type==="block-seq"?cT.resolveBlockSeq(i,e,t,r,s):uT.resolveFlowCollection(i,e,t,r,s),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function fT(i,e,t,r,n){var d,g,y;let s=r.tag,o=s?e.directives.tagName(s.source,m=>n(s,"TAG_RESOLVE_FAILED",m)):null;if(t.type==="block-seq"){let{anchor:m,newlineAfterProp:b}=r,w=m&&s?m.offset>s.offset?m:s:m!=null?m:s;w&&(!b||b.offset<w.offset)&&n(w,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===oT.YAMLMap.tagName&&a==="map"||o===aT.YAMLSeq.tagName&&a==="seq")return cf(i,e,t,n,o);let l=e.schema.tags.find(m=>m.tag===o&&m.collection===a);if(!l){let m=e.schema.knownTags[o];if((m==null?void 0:m.collection)===a)e.schema.tags.push(Object.assign({},m,{default:!1})),l=m;else return m?n(s,"BAD_COLLECTION_TYPE",`${m.tag} used for ${a} collection, but expects ${(d=m.collection)!=null?d:"scalar"}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),cf(i,e,t,n,o)}let c=cf(i,e,t,n,o,l),u=(y=(g=l.resolve)==null?void 0:g.call(l,c,m=>n(s,"TAG_RESOLVE_FAILED",m),e.options))!=null?y:c,f=nT.isNode(u)?u:new sT.Scalar(u);return f.range=c.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}dv.composeCollection=fT});var ff=O(gv=>{"use strict";var uf=$e();function hT(i,e,t){let r=e.offset,n=pT(e,i.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let s=n.mode===">"?uf.Scalar.BLOCK_FOLDED:uf.Scalar.BLOCK_LITERAL,o=e.source?dT(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let b=o[m][1];if(b===""||b==="\r")a=m;else break}if(a===0){let m=n.chomp==="+"&&o.length>0?`
120
+ `.repeat(Math.max(1,o.length-1)):"",b=r+n.length;return e.source&&(b+=e.source.length),{value:m,type:s,comment:n.comment,range:[r,b,b]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let m=0;m<a;++m){let[b,w]=o[m];if(w===""||w==="\r")n.indent===0&&b.length>l&&(l=b.length);else{b.length<l&&t(c+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=b.length),u=m,l===0&&!i.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=b.length+w.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let f="",d="",g=!1;for(let m=0;m<u;++m)f+=o[m][0].slice(l)+`
121
+ `;for(let m=u;m<a;++m){let[b,w]=o[m];c+=b.length+w.length+1;let x=w[w.length-1]==="\r";if(x&&(w=w.slice(0,-1)),w&&b.length<l){let k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(c-w.length-(x?2:1),"BAD_INDENT",k),b=""}s===uf.Scalar.BLOCK_LITERAL?(f+=d+b.slice(l)+w,d=`
122
+ `):b.length>l||w[0]===" "?(d===" "?d=`
123
+ `:!g&&d===`
124
+ `&&(d=`
125
125
 
126
- `),f+=p+_.slice(l)+x,p=`
127
- `,m=!0):x===""?p===`
126
+ `),f+=d+b.slice(l)+w,d=`
127
+ `,g=!0):w===""?d===`
128
128
  `?f+=`
129
- `:p=`
130
- `:(f+=p+x,p=" ",m=!1)}switch(n.chomp){case"-":break;case"+":for(let y=o;y<a.length;++y)f+=`
131
- `+a[y][0].slice(l);f[f.length-1]!==`
129
+ `:d=`
130
+ `:(f+=d+w,d=" ",g=!1)}switch(n.chomp){case"-":break;case"+":for(let m=a;m<o.length;++m)f+=`
131
+ `+o[m][0].slice(l);f[f.length-1]!==`
132
132
  `&&(f+=`
133
133
  `);break;default:f+=`
134
- `}let g=i+n.length+e.source.length;return{value:f,type:s,comment:n.comment,range:[i,g,g]}}function VA({offset:r,props:e},t,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],a=0,o="",l=-1;for(let p=1;p<n.length;++p){let m=n[p];if(!o&&(m==="-"||m==="+"))o=m;else{let g=Number(m);!a&&g?a=g:l===-1&&(l=r+p)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,u="",f=n.length;for(let p=1;p<e.length;++p){let m=e[p];switch(m.type){case"space":c=!0;case"newline":f+=m.source.length;break;case"comment":t&&!c&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=m.source.length,u=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{let g=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",g);let y=m.source;y&&typeof y=="string"&&(f+=y.length)}}}return{mode:s,indent:a,chomp:o,comment:u,length:f}}function HA(r){let e=r.split(/\n( *)/),t=e[0],i=t.match(/^( *)/),s=[i!=null&&i[1]?[i[1],t.slice(i[1].length)]:["",t]];for(let a=1;a<e.length;a+=2)s.push([e[a],e[a+1]]);return s}i_.resolveBlockScalar=$A});var Jf=w(s_=>{"use strict";var Zf=Ke(),GA=jn();function WA(r,e,t){let{offset:i,type:n,source:s,end:a}=r,o,l,c=(p,m,g)=>t(i+p,m,g);switch(n){case"scalar":o=Zf.Scalar.PLAIN,l=zA(s,c);break;case"single-quoted-scalar":o=Zf.Scalar.QUOTE_SINGLE,l=YA(s,c);break;case"double-quoted-scalar":o=Zf.Scalar.QUOTE_DOUBLE,l=KA(s,c);break;default:return t(r,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}let u=i+s.length,f=GA.resolveEnd(a,u,e,t);return{value:l,type:o,comment:f.comment,range:[i,u,f.offset]}}function zA(r,e){let t="";switch(r[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${r[0]}`;break}case"@":case"`":{t=`reserved character ${r[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),n_(r)}function YA(r,e){return(r[r.length-1]!=="'"||r.length===1)&&e(r.length,"MISSING_CHAR","Missing closing 'quote"),n_(r.slice(1,-1)).replace(/''/g,"'")}function n_(r){var l;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
134
+ `}let y=r+n.length+e.source.length;return{value:f,type:s,comment:n.comment,range:[r,y,y]}}function pT({offset:i,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],o=0,a="",l=-1;for(let d=1;d<n.length;++d){let g=n[d];if(!a&&(g==="-"||g==="+"))a=g;else{let y=Number(g);!o&&y?o=y:l===-1&&(l=i+d)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,u="",f=n.length;for(let d=1;d<e.length;++d){let g=e[d];switch(g.type){case"space":c=!0;case"newline":f+=g.source.length;break;case"comment":t&&!c&&r(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=g.source.length,u=g.source.substring(1);break;case"error":r(g,"UNEXPECTED_TOKEN",g.message),f+=g.source.length;break;default:{let y=`Unexpected token in block scalar header: ${g.type}`;r(g,"UNEXPECTED_TOKEN",y);let m=g.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:f}}function dT(i){let e=i.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),s=[r!=null&&r[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}gv.resolveBlockScalar=hT});var pf=O(vv=>{"use strict";var hf=$e(),mT=Jr();function gT(i,e,t){let{offset:r,type:n,source:s,end:o}=i,a,l,c=(d,g,y)=>t(r+d,g,y);switch(n){case"scalar":a=hf.Scalar.PLAIN,l=yT(s,c);break;case"single-quoted-scalar":a=hf.Scalar.QUOTE_SINGLE,l=vT(s,c);break;case"double-quoted-scalar":a=hf.Scalar.QUOTE_DOUBLE,l=bT(s,c);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let u=r+s.length,f=mT.resolveEnd(o,u,e,t);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function yT(i,e){let t="";switch(i[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),yv(i)}function vT(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),yv(i.slice(1,-1)).replace(/''/g,"'")}function yv(i){var l;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
135
135
  `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
136
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(r);if(!i)return r;let n=i[1],s=" ",a=e.lastIndex;for(t.lastIndex=a;i=t.exec(r);)i[1]===""?s===`
136
+ `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(i);if(!r)return i;let n=r[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;r=t.exec(i);)r[1]===""?s===`
137
137
  `?n+=s:s=`
138
- `:(n+=s+i[1],s=" "),a=t.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,i=o.exec(r),n+s+((l=i==null?void 0:i[1])!=null?l:"")}function KA(r,e){let t="";for(let i=1;i<r.length-1;++i){let n=r[i];if(!(n==="\r"&&r[i+1]===`
138
+ `:(n+=s+r[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(i),n+s+((l=r==null?void 0:r[1])!=null?l:"")}function bT(i,e){let t="";for(let r=1;r<i.length-1;++r){let n=i[r];if(!(n==="\r"&&i[r+1]===`
139
139
  `))if(n===`
140
- `){let{fold:s,offset:a}=ZA(r,i);t+=s,i=a}else if(n==="\\"){let s=r[++i],a=JA[s];if(a)t+=a;else if(s===`
141
- `)for(s=r[i+1];s===" "||s===" ";)s=r[++i+1];else if(s==="\r"&&r[i+1]===`
142
- `)for(s=r[++i+1];s===" "||s===" ";)s=r[++i+1];else if(s==="x"||s==="u"||s==="U"){let o={x:2,u:4,U:8}[s];t+=QA(r,i+1,o,e),i+=o}else{let o=r.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),t+=o}}else if(n===" "||n===" "){let s=i,a=r[i+1];for(;a===" "||a===" ";)a=r[++i+1];a!==`
143
- `&&!(a==="\r"&&r[i+2]===`
144
- `)&&(t+=i>s?r.slice(s,i+1):n)}else t+=n}return(r[r.length-1]!=='"'||r.length===1)&&e(r.length,"MISSING_CHAR",'Missing closing "quote'),t}function ZA(r,e){let t="",i=r[e+1];for(;(i===" "||i===" "||i===`
145
- `||i==="\r")&&!(i==="\r"&&r[e+2]!==`
146
- `);)i===`
140
+ `){let{fold:s,offset:o}=_T(i,r);t+=s,r=o}else if(n==="\\"){let s=i[++r],o=wT[s];if(o)t+=o;else if(s===`
141
+ `)for(s=i[r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="\r"&&i[r+1]===`
142
+ `)for(s=i[++r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];t+=xT(i,r+1,a,e),r+=a}else{let a=i.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(n===" "||n===" "){let s=r,o=i[r+1];for(;o===" "||o===" ";)o=i[++r+1];o!==`
143
+ `&&!(o==="\r"&&i[r+2]===`
144
+ `)&&(t+=r>s?i.slice(s,r+1):n)}else t+=n}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function _T(i,e){let t="",r=i[e+1];for(;(r===" "||r===" "||r===`
145
+ `||r==="\r")&&!(r==="\r"&&i[e+2]!==`
146
+ `);)r===`
147
147
  `&&(t+=`
148
- `),e+=1,i=r[e+1];return t||(t=" "),{fold:t,offset:e}}var JA={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
149
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function QA(r,e,t,i){let n=r.substr(e,t),a=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(a)){let o=r.substr(e-2,t+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(a)}s_.resolveFlowScalar=WA});var l_=w(o_=>{"use strict";var Mi=Le(),a_=Ke(),XA=Kf(),eI=Jf();function tI(r,e,t,i){let{value:n,type:s,comment:a,range:o}=e.type==="block-scalar"?XA.resolveBlockScalar(r,e,i):eI.resolveFlowScalar(e,r.options.strict,i),l=t?r.directives.tagName(t.source,f=>i(t,"TAG_RESOLVE_FAILED",f)):null,c;r.options.stringKeys&&r.atKey?c=r.schema[Mi.SCALAR]:l?c=rI(r.schema,n,l,t,i):e.type==="scalar"?c=iI(r,n,e,i):c=r.schema[Mi.SCALAR];let u;try{let f=c.resolve(n,p=>i(t!=null?t:e,"TAG_RESOLVE_FAILED",p),r.options);u=Mi.isScalar(f)?f:new a_.Scalar(f)}catch(f){let p=f instanceof Error?f.message:String(f);i(t!=null?t:e,"TAG_RESOLVE_FAILED",p),u=new a_.Scalar(n)}return u.range=o,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),a&&(u.comment=a),u}function rI(r,e,t,i,n){var o;if(t==="!")return r[Mi.SCALAR];let s=[];for(let l of r.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((o=l.test)!=null&&o.test(e))return l;let a=r.knownTags[t];return a&&!a.collection?(r.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),r[Mi.SCALAR])}function iI({atKey:r,directives:e,schema:t},i,n,s){var o;let a=t.tags.find(l=>{var c;return(l.default===!0||r&&l.default==="key")&&((c=l.test)==null?void 0:c.test(i))})||t[Mi.SCALAR];if(t.compat){let l=(o=t.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(i))}))!=null?o:t[Mi.SCALAR];if(a.tag!==l.tag){let c=e.tagString(a.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return a}o_.composeScalar=tI});var u_=w(c_=>{"use strict";function nI(r,e,t){if(e){t===null&&(t=e.length);for(let i=t-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":r-=n.source.length;continue}for(n=e[++i];(n==null?void 0:n.type)==="space";)r+=n.source.length,n=e[++i];break}}return r}c_.emptyScalarPosition=nI});var d_=w(Xf=>{"use strict";var sI=ks(),aI=Le(),oI=r_(),f_=l_(),lI=jn(),cI=u_(),uI={composeNode:h_,composeEmptyNode:Qf};function h_(r,e,t,i){let n=r.atKey,{spaceBefore:s,comment:a,anchor:o,tag:l}=t,c,u=!0;switch(e.type){case"alias":c=fI(r,e,i),(o||l)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=f_.composeScalar(r,e,l,i),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=oI.composeCollection(uI,r,e,t,i),o&&(c.anchor=o.source.substring(1));break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",f),c=Qf(r,e.offset,void 0,null,t,i),u=!1}}return o&&c.anchor===""&&i(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&r.options.stringKeys&&(!aI.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?c.comment=a:c.commentBefore=a),r.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Qf(r,e,t,i,{spaceBefore:n,comment:s,anchor:a,tag:o,end:l},c){let u={type:"scalar",offset:cI.emptyScalarPosition(e,t,i),indent:-1,source:""},f=f_.composeScalar(r,u,o,c);return a&&(f.anchor=a.source.substring(1),f.anchor===""&&c(a,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function fI({options:r},{offset:e,source:t,end:i},n){let s=new sI.Alias(t.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+t.length,o=lI.resolveEnd(i,a,r.strict,n);return s.range=[e,a,o.offset],o.comment&&(s.comment=o.comment),s}Xf.composeEmptyNode=Qf;Xf.composeNode=h_});var g_=w(m_=>{"use strict";var hI=Us(),p_=d_(),dI=jn(),pI=Gs();function mI(r,e,{offset:t,start:i,value:n,end:s},a){let o=Object.assign({_directives:e},r),l=new hI.Document(void 0,o),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=pI.resolveProps(i,{indicator:"doc-start",next:n!=null?n:s==null?void 0:s[0],offset:t,onError:a,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?p_.composeNode(c,n,u,a):p_.composeEmptyNode(c,u.end,i,null,u,a);let f=l.contents.range[2],p=dI.resolveEnd(s,f,!1,a);return p.comment&&(l.comment=p.comment),l.range=[t,f,p.offset],l}m_.composeDoc=mI});var th=w(__=>{"use strict";var gI=qu(),vI=Us(),Ws=Hs(),v_=Le(),yI=g_(),_I=jn();function zs(r){if(typeof r=="number")return[r,r+1];if(Array.isArray(r))return r.length===2?r:[r[0],r[1]];let{offset:e,source:t}=r;return[e,e+(typeof t=="string"?t.length:1)]}function y_(r){var n;let e="",t=!1,i=!1;for(let s=0;s<r.length;++s){let a=r[s];switch(a[0]){case"#":e+=(e===""?"":i?`
148
+ `),e+=1,r=i[e+1];return t||(t=" "),{fold:t,offset:e}}var wT={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
149
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function xT(i,e,t,r){let n=i.substr(e,t),o=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(o)){let a=i.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}vv.resolveFlowScalar=gT});var wv=O(_v=>{"use strict";var cr=xe(),bv=$e(),ST=ff(),ET=pf();function OT(i,e,t,r){let{value:n,type:s,comment:o,range:a}=e.type==="block-scalar"?ST.resolveBlockScalar(i,e,r):ET.resolveFlowScalar(e,i.options.strict,r),l=t?i.directives.tagName(t.source,f=>r(t,"TAG_RESOLVE_FAILED",f)):null,c;i.options.stringKeys&&i.atKey?c=i.schema[cr.SCALAR]:l?c=kT(i.schema,n,l,t,r):e.type==="scalar"?c=CT(i,n,e,r):c=i.schema[cr.SCALAR];let u;try{let f=c.resolve(n,d=>r(t!=null?t:e,"TAG_RESOLVE_FAILED",d),i.options);u=cr.isScalar(f)?f:new bv.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(t!=null?t:e,"TAG_RESOLVE_FAILED",d),u=new bv.Scalar(n)}return u.range=a,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function kT(i,e,t,r,n){var a;if(t==="!")return i[cr.SCALAR];let s=[];for(let l of i.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((a=l.test)!=null&&a.test(e))return l;let o=i.knownTags[t];return o&&!o.collection?(i.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[cr.SCALAR])}function CT({atKey:i,directives:e,schema:t},r,n,s){var a;let o=t.tags.find(l=>{var c;return(l.default===!0||i&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||t[cr.SCALAR];if(t.compat){let l=(a=t.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(r))}))!=null?a:t[cr.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}_v.composeScalar=OT});var Sv=O(xv=>{"use strict";function TT(i,e,t){if(e){t!=null||(t=e.length);for(let r=t-1;r>=0;--r){let n=e[r];switch(n.type){case"space":case"comment":case"newline":i-=n.source.length;continue}for(n=e[++r];(n==null?void 0:n.type)==="space";)i+=n.source.length,n=e[++r];break}}return i}xv.emptyScalarPosition=TT});var kv=O(mf=>{"use strict";var AT=In(),IT=xe(),NT=mv(),Ev=wv(),BT=Jr(),LT=Sv(),PT={composeNode:Ov,composeEmptyNode:df};function Ov(i,e,t,r){let n=i.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t,c,u=!0;switch(e.type){case"alias":c=RT(i,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Ev.composeScalar(i,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=NT.composeCollection(PT,i,e,t,r),a&&(c.anchor=a.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);r(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=!1}}return c!=null||(c=df(i,e.offset,void 0,null,t,r)),a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&i.options.stringKeys&&(!IT.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),i.options.keepSourceTokens&&u&&(c.srcToken=e),c}function df(i,e,t,r,{spaceBefore:n,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:LT.emptyScalarPosition(e,t,r),indent:-1,source:""},f=Ev.composeScalar(i,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function RT({options:i},{offset:e,source:t,end:r},n){let s=new AT.Alias(t.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=BT.resolveEnd(r,o,i.strict,n);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}mf.composeEmptyNode=df;mf.composeNode=Ov});var Av=O(Tv=>{"use strict";var MT=Yn(),Cv=kv(),DT=Jr(),qT=Zn();function FT(i,e,{offset:t,start:r,value:n,end:s},o){let a=Object.assign({_directives:e},i),l=new MT.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=qT.resolveProps(r,{indicator:"doc-start",next:n!=null?n:s==null?void 0:s[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?Cv.composeNode(c,n,u,o):Cv.composeEmptyNode(c,u.end,r,null,u,o);let f=l.contents.range[2],d=DT.resolveEnd(s,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[t,f,d.offset],l}Tv.composeDoc=FT});var yf=O(Bv=>{"use strict";var jT=require("process"),UT=tu(),$T=Yn(),Qn=Jn(),Iv=xe(),VT=Av(),HT=Jr();function Xn(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];let{offset:e,source:t}=i;return[e,e+(typeof t=="string"?t.length:1)]}function Nv(i){var n;let e="",t=!1,r=!1;for(let s=0;s<i.length;++s){let o=i[s];switch(o[0]){case"#":e+=(e===""?"":r?`
150
150
 
151
151
  `:`
152
- `)+(a.substring(1)||" "),t=!0,i=!1;break;case"%":((n=r[s+1])==null?void 0:n[0])!=="#"&&(s+=1),t=!1;break;default:t||(i=!0),t=!1}}return{comment:e,afterEmptyLine:i}}var eh=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,i,n,s)=>{let a=zs(t);s?this.warnings.push(new Ws.YAMLWarning(a,i,n)):this.errors.push(new Ws.YAMLParseError(a,i,n))},this.directives=new gI.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:i,afterEmptyLine:n}=y_(this.prelude);if(i){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
153
- ${i}`:i;else if(n||e.directives.docStart||!s)e.commentBefore=i;else if(v_.isCollection(s)&&!s.flow&&s.items.length>0){let a=s.items[0];v_.isPair(a)&&(a=a.key);let o=a.commentBefore;a.commentBefore=o?`${i}
154
- ${o}`:i}else{let a=s.commentBefore;s.commentBefore=a?`${i}
155
- ${a}`:i}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:y_(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(t,i)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,i,n)=>{let s=zs(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=yI.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Ws.YAMLParseError(zs(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Ws.YAMLParseError(zs(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let t=_I.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
156
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ws.YAMLParseError(zs(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new vI.Document(void 0,i);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};__.Composer=eh});var w_=w(sl=>{"use strict";var bI=Kf(),xI=Jf(),wI=Hs(),b_=Is();function SI(r,e=!0,t){if(r){let i=(n,s,a)=>{let o=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(o,s,a);else throw new wI.YAMLParseError([o,o+1],s,a)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return xI.resolveFlowScalar(r,e,i);case"block-scalar":return bI.resolveBlockScalar({options:{strict:e}},r,i)}}return null}function EI(r,e){var c;let{implicitKey:t=!1,indent:i,inFlow:n=!1,offset:s=-1,type:a="PLAIN"}=e,o=b_.stringifyString({type:a,value:r},{implicitKey:t,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:i,source:`
157
- `}];switch(o[0]){case"|":case">":{let u=o.indexOf(`
158
- `),f=o.substring(0,u),p=o.substring(u+1)+`
159
- `,m=[{type:"block-scalar-header",offset:s,indent:i,source:f}];return x_(m,l)||m.push({type:"newline",offset:-1,indent:i,source:`
160
- `}),{type:"block-scalar",offset:s,indent:i,props:m,source:p}}case'"':return{type:"double-quoted-scalar",offset:s,indent:i,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:i,source:o,end:l};default:return{type:"scalar",offset:s,indent:i,source:o,end:l}}}function kI(r,e,t={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:s=!1,type:a}=t,o="indent"in r?r.indent:null;if(i&&typeof o=="number"&&(o+=2),!a)switch(r.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let c=r.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let l=b_.stringifyString({type:a,value:e},{implicitKey:n||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":OI(r,l);break;case'"':rh(r,l,"double-quoted-scalar");break;case"'":rh(r,l,"single-quoted-scalar");break;default:rh(r,l,"scalar")}}function OI(r,e){let t=e.indexOf(`
161
- `),i=e.substring(0,t),n=e.substring(t+1)+`
162
- `;if(r.type==="block-scalar"){let s=r.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=i,r.source=n}else{let{offset:s}=r,a="indent"in r?r.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:a,source:i}];x_(o,"end"in r?r.end:void 0)||o.push({type:"newline",offset:-1,indent:a,source:`
163
- `});for(let l of Object.keys(r))l!=="type"&&l!=="offset"&&delete r[l];Object.assign(r,{type:"block-scalar",indent:a,props:o,source:n})}}function x_(r,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":r.push(t);break;case"newline":return r.push(t),!0}return!1}function rh(r,e,t){switch(r.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":r.type=t,r.source=e;break;case"block-scalar":{let i=r.props.slice(1),n=e.length;r.props[0].type==="block-scalar-header"&&(n-=r.props[0].source.length);for(let s of i)s.offset+=n;delete r.props,Object.assign(r,{type:t,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:r.offset+e.length,indent:r.indent,source:`
164
- `};delete r.items,Object.assign(r,{type:t,source:e,end:[n]});break}default:{let i="indent"in r?r.indent:-1,n="end"in r&&Array.isArray(r.end)?r.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(r))s!=="type"&&s!=="offset"&&delete r[s];Object.assign(r,{type:t,indent:i,source:e,end:n})}}}sl.createScalarToken=EI;sl.resolveAsScalar=SI;sl.setScalarValue=kI});var E_=w(S_=>{"use strict";var CI=r=>"type"in r?ol(r):al(r);function ol(r){switch(r.type){case"block-scalar":{let e="";for(let t of r.props)e+=ol(t);return e+r.source}case"block-map":case"block-seq":{let e="";for(let t of r.items)e+=al(t);return e}case"flow-collection":{let e=r.start.source;for(let t of r.items)e+=al(t);for(let t of r.end)e+=t.source;return e}case"document":{let e=al(r);if(r.end)for(let t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(let t of r.end)e+=t.source;return e}}}function al({start:r,key:e,sep:t,value:i}){let n="";for(let s of r)n+=s.source;if(e&&(n+=ol(e)),t)for(let s of t)n+=s.source;return i&&(n+=ol(i)),n}S_.stringify=CI});var T_=w(C_=>{"use strict";var ih=Symbol("break visit"),TI=Symbol("skip children"),k_=Symbol("remove item");function Di(r,e){"type"in r&&r.type==="document"&&(r={start:r.start,value:r.value}),O_(Object.freeze([]),r,e)}Di.BREAK=ih;Di.SKIP=TI;Di.REMOVE=k_;Di.itemAtPath=(r,e)=>{let t=r;for(let[i,n]of e){let s=t==null?void 0:t[i];if(s&&"items"in s)t=s.items[n];else return}return t};Di.parentCollection=(r,e)=>{let t=Di.itemAtPath(r,e.slice(0,-1)),i=e[e.length-1][0],n=t==null?void 0:t[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function O_(r,e,t){let i=t(e,r);if(typeof i=="symbol")return i;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let o=O_(Object.freeze(r.concat([[n,a]])),s.items[a],t);if(typeof o=="number")a=o-1;else{if(o===ih)return ih;o===k_&&(s.items.splice(a,1),a-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,r))}}return typeof i=="function"?i(e,r):i}C_.visit=Di});var ll=w(At=>{"use strict";var nh=w_(),AI=E_(),II=T_(),sh="\uFEFF",ah="",oh="",lh="",NI=r=>!!r&&"items"in r,LI=r=>!!r&&(r.type==="scalar"||r.type==="single-quoted-scalar"||r.type==="double-quoted-scalar"||r.type==="block-scalar");function BI(r){switch(r){case sh:return"<BOM>";case ah:return"<DOC>";case oh:return"<FLOW_END>";case lh:return"<SCALAR>";default:return JSON.stringify(r)}}function RI(r){switch(r){case sh:return"byte-order-mark";case ah:return"doc-mode";case oh:return"flow-error-end";case lh:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
152
+ `)+(o.substring(1)||" "),t=!0,r=!1;break;case"%":((n=i[s+1])==null?void 0:n[0])!=="#"&&(s+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var gf=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,s)=>{let o=Xn(t);s?this.warnings.push(new Qn.YAMLWarning(o,r,n)):this.errors.push(new Qn.YAMLParseError(o,r,n))},this.directives=new UT.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=Nv(this.prelude);if(r){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
153
+ ${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(Iv.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];Iv.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r}
154
+ ${a}`:r}else{let o=s.commentBefore;s.commentBefore=o?`${r}
155
+ ${o}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Nv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){switch(jT.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let s=Xn(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=VT.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Qn.YAMLParseError(Xn(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Qn.YAMLParseError(Xn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let t=HT.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
156
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Qn.YAMLParseError(Xn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),n=new $T.Document(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};Bv.Composer=gf});var Rv=O(oa=>{"use strict";var GT=ff(),WT=pf(),YT=Jn(),Lv=Rn();function KT(i,e=!0,t){if(i){let r=(n,s,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(a,s,o);else throw new YT.YAMLParseError([a,a+1],s,o)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return WT.resolveFlowScalar(i,e,r);case"block-scalar":return GT.resolveBlockScalar({options:{strict:e}},i,r)}}return null}function zT(i,e){var c;let{implicitKey:t=!1,indent:r,inFlow:n=!1,offset:s=-1,type:o="PLAIN"}=e,a=Lv.stringifyString({type:o,value:i},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:`
157
+ `}];switch(a[0]){case"|":case">":{let u=a.indexOf(`
158
+ `),f=a.substring(0,u),d=a.substring(u+1)+`
159
+ `,g=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return Pv(g,l)||g.push({type:"newline",offset:-1,indent:r,source:`
160
+ `}),{type:"block-scalar",offset:s,indent:r,props:g,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function JT(i,e,t={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:s=!1,type:o}=t,a="indent"in i?i.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(i.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=i.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Lv.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":ZT(i,l);break;case'"':vf(i,l,"double-quoted-scalar");break;case"'":vf(i,l,"single-quoted-scalar");break;default:vf(i,l,"scalar")}}function ZT(i,e){let t=e.indexOf(`
161
+ `),r=e.substring(0,t),n=e.substring(t+1)+`
162
+ `;if(i.type==="block-scalar"){let s=i.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,i.source=n}else{let{offset:s}=i,o="indent"in i?i.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];Pv(a,"end"in i?i.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
163
+ `});for(let l of Object.keys(i))l!=="type"&&l!=="offset"&&delete i[l];Object.assign(i,{type:"block-scalar",indent:o,props:a,source:n})}}function Pv(i,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function vf(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{let r=i.props.slice(1),n=e.length;i.props[0].type==="block-scalar-header"&&(n-=i.props[0].source.length);for(let s of r)s.offset+=n;delete i.props,Object.assign(i,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
164
+ `};delete i.items,Object.assign(i,{type:t,source:e,end:[n]});break}default:{let r="indent"in i?i.indent:-1,n="end"in i&&Array.isArray(i.end)?i.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(i))s!=="type"&&s!=="offset"&&delete i[s];Object.assign(i,{type:t,indent:r,source:e,end:n})}}}oa.createScalarToken=zT;oa.resolveAsScalar=KT;oa.setScalarValue=JT});var Dv=O(Mv=>{"use strict";var QT=i=>"type"in i?la(i):aa(i);function la(i){switch(i.type){case"block-scalar":{let e="";for(let t of i.props)e+=la(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(let t of i.items)e+=aa(t);return e}case"flow-collection":{let e=i.start.source;for(let t of i.items)e+=aa(t);for(let t of i.end)e+=t.source;return e}case"document":{let e=aa(i);if(i.end)for(let t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(let t of i.end)e+=t.source;return e}}}function aa({start:i,key:e,sep:t,value:r}){let n="";for(let s of i)n+=s.source;if(e&&(n+=la(e)),t)for(let s of t)n+=s.source;return r&&(n+=la(r)),n}Mv.stringify=QT});var Uv=O(jv=>{"use strict";var bf=Symbol("break visit"),XT=Symbol("skip children"),qv=Symbol("remove item");function ur(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),Fv(Object.freeze([]),i,e)}ur.BREAK=bf;ur.SKIP=XT;ur.REMOVE=qv;ur.itemAtPath=(i,e)=>{let t=i;for(let[r,n]of e){let s=t==null?void 0:t[r];if(s&&"items"in s)t=s.items[n];else return}return t};ur.parentCollection=(i,e)=>{let t=ur.itemAtPath(i,e.slice(0,-1)),r=e[e.length-1][0],n=t==null?void 0:t[r];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function Fv(i,e,t){let r=t(e,i);if(typeof r=="symbol")return r;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=Fv(Object.freeze(i.concat([[n,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===bf)return bf;a===qv&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&n==="key"&&(r=r(e,i))}}return typeof r=="function"?r(e,i):r}jv.visit=ur});var ca=O(vt=>{"use strict";var _f=Rv(),eA=Dv(),tA=Uv(),wf="\uFEFF",xf="",Sf="",Ef="",iA=i=>!!i&&"items"in i,rA=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function nA(i){switch(i){case wf:return"<BOM>";case xf:return"<DOC>";case Sf:return"<FLOW_END>";case Ef:return"<SCALAR>";default:return JSON.stringify(i)}}function sA(i){switch(i){case wf:return"byte-order-mark";case xf:return"doc-mode";case Sf:return"flow-error-end";case Ef:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
165
165
  `:case`\r
166
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(r[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}At.createScalarToken=nh.createScalarToken;At.resolveAsScalar=nh.resolveAsScalar;At.setScalarValue=nh.setScalarValue;At.stringify=AI.stringify;At.visit=II.visit;At.BOM=sh;At.DOCUMENT=ah;At.FLOW_END=oh;At.SCALAR=lh;At.isCollection=NI;At.isScalar=LI;At.prettyToken=BI;At.tokenType=RI});var fh=w(I_=>{"use strict";var Ys=ll();function lr(r){switch(r){case void 0:case" ":case`
167
- `:case"\r":case" ":return!0;default:return!1}}var A_=new Set("0123456789ABCDEFabcdef"),PI=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),cl=new Set(",[]{}"),MI=new Set(` ,[]{}
168
- \r `),ch=r=>!r||MI.has(r),uh=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var n;if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let i=(n=this.next)!=null?n:"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
166
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}vt.createScalarToken=_f.createScalarToken;vt.resolveAsScalar=_f.resolveAsScalar;vt.setScalarValue=_f.setScalarValue;vt.stringify=eA.stringify;vt.visit=tA.visit;vt.BOM=wf;vt.DOCUMENT=xf;vt.FLOW_END=Sf;vt.SCALAR=Ef;vt.isCollection=iA;vt.isScalar=rA;vt.prettyToken=nA;vt.tokenType=sA});var Cf=O(Vv=>{"use strict";var es=ca();function Wt(i){switch(i){case void 0:case" ":case`
167
+ `:case"\r":case" ":return!0;default:return!1}}var $v=new Set("0123456789ABCDEFabcdef"),oA=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ua=new Set(",[]{}"),aA=new Set(` ,[]{}
168
+ \r `),Of=i=>!i||aA.has(i),kf=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var n;if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=(n=this.next)!=null?n:"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
169
169
  `?!0:t==="\r"?this.buffer[e+1]===`
170
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let i=0;for(;t===" ";)t=this.buffer[++i+e];if(t==="\r"){let n=this.buffer[i+e+1];if(n===`
171
- `||!n&&!this.atEnd)return e+i+1}return t===`
172
- `||i>=this.indentNext||!t&&!this.atEnd?e+i:-1}if(t==="-"||t==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&lr(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
173
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ys.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,i=e.indexOf("#");for(;i!==-1;){let s=e[i-1];if(s===" "||s===" "){t=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Ys.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&lr(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!lr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&lr(t)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ch),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,i=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&lr(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Ys.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ch),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||lr(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let i=this.buffer.substring(0,t),n=i.indexOf(`
174
- `,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=i.indexOf(`
175
- `,s)}n!==-1&&(t=n-(i[n-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>lr(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":t+=1;break;case`
176
- `:e=s,t=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
177
- `)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
178
- `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
179
- `;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let o=s;for(;a===" ";)a=this.buffer[--s];if(a===`
180
- `&&s>=this.pos&&s+1+t>o)e=s;else break}while(!0);return yield Ys.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let s=this.buffer[i+1];if(lr(s)||e&&cl.has(s))break;t=i}else if(lr(n)){let s=this.buffer[i+1];if(n==="\r"&&(s===`
181
- `?(i+=1,n=`
182
- `,s=this.buffer[i+1]):t=i),s==="#"||e&&cl.has(s))break;if(n===`
183
- `){let a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(e&&cl.has(n))break;t=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Ys.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(ch))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(lr(t)||e&&cl.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!lr(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(PI.has(t))t=this.buffer[++e];else if(t==="%"&&A_.has(this.buffer[e+1])&&A_.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
170
+ `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let n=this.buffer[r+e+1];if(n===`
171
+ `||!n&&!this.atEnd)return e+r+1}return t===`
172
+ `||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&Wt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
173
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===es.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield es.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&Wt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Wt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Wt(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Of),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&Wt(n[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield es.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Of),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||Wt(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf(`
174
+ `,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=r.indexOf(`
175
+ `,s)}n!==-1&&(t=n-(r[n-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Wt(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
176
+ `:e=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
177
+ `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
178
+ `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(r=this.buffer[n];r===" ";)r=this.buffer[++n];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
179
+ `;)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
180
+ `&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield es.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;for(;n=this.buffer[++r];)if(n===":"){let s=this.buffer[r+1];if(Wt(s)||e&&ua.has(s))break;t=r}else if(Wt(n)){let s=this.buffer[r+1];if(n==="\r"&&(s===`
181
+ `?(r+=1,n=`
182
+ `,s=this.buffer[r+1]):t=r),s==="#"||e&&ua.has(s))break;if(n===`
183
+ `){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&ua.has(n))break;t=r}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield es.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Of))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(Wt(t)||e&&ua.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Wt(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(oA.has(t))t=this.buffer[++e];else if(t==="%"&&$v.has(this.buffer[e+1])&&$v.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
184
184
  `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
185
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,i;do i=this.buffer[++t];while(i===" "||e&&i===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,i=this.buffer[t];for(;!e(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};I_.Lexer=uh});var dh=w(N_=>{"use strict";var hh=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,i=this.lineStarts.length;for(;t<i;){let s=t+i>>1;this.lineStarts[s]<e?t=s+1:i=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}};N_.LineCounter=hh});var mh=w(M_=>{"use strict";var L_=ll(),DI=fh();function Fi(r,e){for(let t=0;t<r.length;++t)if(r[t].type===e)return!0;return!1}function B_(r){for(let e=0;e<r.length;++e)switch(r[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function P_(r){switch(r==null?void 0:r.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ul(r){var e;switch(r.type){case"document":return r.start;case"block-map":{let t=r.items[r.items.length-1];return(e=t.sep)!=null?e:t.start}case"block-seq":return r.items[r.items.length-1].start;default:return[]}}function Un(r){var t;if(r.length===0)return[];let e=r.length;e:for(;--e>=0;)switch(r[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=r[++e])==null?void 0:t.type)==="space";);return r.splice(e,r.length)}function R_(r){if(r.start.type==="flow-seq-start")for(let e of r.items)e.sep&&!e.value&&!Fi(e.start,"explicit-key-ind")&&!Fi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,P_(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var ph=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new DI.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,t))yield*this.next(i);t||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",L_.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=L_.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e!=null?e:this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let i=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in i?i.indent:0:t.type==="flow-collection"&&i.type==="document"&&(t.indent=0),t.type==="flow-collection"&&R_(t),i.type){case"document":i.value=t;break;case"block-scalar":i.props.push(t);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&B_(n.start)===-1&&(t.indent===0||n.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{B_(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=ul(this.peek(2)),i=Un(t),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
185
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Vv.Lexer=kf});var Af=O(Hv=>{"use strict";var Tf=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}};Hv.LineCounter=Tf});var Nf=O(zv=>{"use strict";var lA=require("process"),Gv=ca(),cA=Cf();function Pi(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function Wv(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Kv(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function fa(i){var e;switch(i.type){case"document":return i.start;case"block-map":{let t=i.items[i.items.length-1];return(e=t.sep)!=null?e:t.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function Zr(i){var t;if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=i[++e])==null?void 0:t.type)==="space";);return i.splice(e,i.length)}function Yv(i){if(i.start.type==="flow-seq-start")for(let e of i.items)e.sep&&!e.value&&!Pi(e.start,"explicit-key-ind")&&!Pi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Kv(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var If=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new cA.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,lA.env.LOG_TOKENS&&console.log("|",Gv.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Gv.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e!=null?e:this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Yv(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];n.value?r.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];!n||n.value?r.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Wv(n.start)===-1&&(t.indent===0||n.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(r.type==="document"?r.end=n.start:r.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Wv(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=fa(this.peek(2)),r=Zr(t),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
186
186
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
187
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var i;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(i=n==null?void 0:n.value)==null?void 0:i.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",a=[];if(s&&t.sep&&!t.value){let o=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":o.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(a=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":s||t.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):s||t.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Fi(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(P_(t.key)&&!Fi(t.sep,"newline")){let o=Un(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:c}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else if(Fi(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Un(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:a,key:null,sep:[this.sourceToken]}):Fi(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);s||t.value?(e.items.push({start:a,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:a}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var i;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(i=n==null?void 0:n.value)==null?void 0:i.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Fi(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=ul(i),s=Un(n);R_(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
187
+ `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&t.sep&&!t.value){let a=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=t.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Pi(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Kv(t.key)&&!Pi(t.sep,"newline")){let a=Zr(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(Pi(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let a=Zr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Pi(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);s||t.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(a):(Object.assign(t,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Pi(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Pi(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=fa(r),s=Zr(n);Yv(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
188
188
  `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
189
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=ul(e),i=Un(t);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=ul(e),i=Un(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};M_.Parser=ph});var U_=w(Zs=>{"use strict";var D_=th(),FI=Us(),Ks=Hs(),qI=Qu(),jI=Le(),UI=dh(),F_=mh();function q_(r){let e=r.prettyErrors!==!1;return{lineCounter:r.lineCounter||e&&new UI.LineCounter||null,prettyErrors:e}}function $I(r,e={}){let{lineCounter:t,prettyErrors:i}=q_(e),n=new F_.Parser(t==null?void 0:t.addNewLine),s=new D_.Composer(e),a=Array.from(s.compose(n.parse(r)));if(i&&t)for(let o of a)o.errors.forEach(Ks.prettifyError(r,t)),o.warnings.forEach(Ks.prettifyError(r,t));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function j_(r,e={}){let{lineCounter:t,prettyErrors:i}=q_(e),n=new F_.Parser(t==null?void 0:t.addNewLine),s=new D_.Composer(e),a=null;for(let o of s.compose(n.parse(r),!0,r.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new Ks.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&t&&(a.errors.forEach(Ks.prettifyError(r,t)),a.warnings.forEach(Ks.prettifyError(r,t))),a}function VI(r,e,t){let i;typeof e=="function"?i=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=j_(r,t);if(!n)return null;if(n.warnings.forEach(s=>qI.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},t))}function HI(r,e,t){var n;let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let s=Math.round(t);t=s<1?void 0:s>8?{indent:8}:{indent:s}}if(r===void 0){let{keepUndefined:s}=(n=t!=null?t:e)!=null?n:{};if(!s)return}return jI.isDocument(r)&&!i?r.toString(t):new FI.Document(r,i,t).toString(t)}Zs.parse=VI;Zs.parseAllDocuments=$I;Zs.parseDocument=j_;Zs.stringify=HI});var V_=w(Me=>{"use strict";var GI=th(),WI=Us(),zI=Pf(),gh=Hs(),YI=ks(),si=Le(),KI=ti(),ZI=Ke(),JI=ii(),QI=ni(),XI=ll(),eN=fh(),tN=dh(),rN=mh(),fl=U_(),$_=xs();Me.Composer=GI.Composer;Me.Document=WI.Document;Me.Schema=zI.Schema;Me.YAMLError=gh.YAMLError;Me.YAMLParseError=gh.YAMLParseError;Me.YAMLWarning=gh.YAMLWarning;Me.Alias=YI.Alias;Me.isAlias=si.isAlias;Me.isCollection=si.isCollection;Me.isDocument=si.isDocument;Me.isMap=si.isMap;Me.isNode=si.isNode;Me.isPair=si.isPair;Me.isScalar=si.isScalar;Me.isSeq=si.isSeq;Me.Pair=KI.Pair;Me.Scalar=ZI.Scalar;Me.YAMLMap=JI.YAMLMap;Me.YAMLSeq=QI.YAMLSeq;Me.CST=XI;Me.Lexer=eN.Lexer;Me.LineCounter=tN.LineCounter;Me.Parser=rN.Parser;Me.parse=fl.parse;Me.parseAllDocuments=fl.parseAllDocuments;Me.parseDocument=fl.parseDocument;Me.stringify=fl.stringify;Me.visit=$_.visit;Me.visitAsync=$_.visitAsync});var ib=w((KP,rb)=>{var ui=require("constants"),d2=process.cwd,vl=null,p2=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return vl||(vl=d2.call(process)),vl};try{process.cwd()}catch{}typeof process.chdir=="function"&&(xh=process.chdir,process.chdir=function(r){vl=null,xh.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,xh));var xh;rb.exports=m2;function m2(r){ui.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(r),r.lutimes||t(r),r.chown=s(r.chown),r.fchown=s(r.fchown),r.lchown=s(r.lchown),r.chmod=i(r.chmod),r.fchmod=i(r.fchmod),r.lchmod=i(r.lchmod),r.chownSync=a(r.chownSync),r.fchownSync=a(r.fchownSync),r.lchownSync=a(r.lchownSync),r.chmodSync=n(r.chmodSync),r.fchmodSync=n(r.fchmodSync),r.lchmodSync=n(r.lchmodSync),r.stat=o(r.stat),r.fstat=o(r.fstat),r.lstat=o(r.lstat),r.statSync=l(r.statSync),r.fstatSync=l(r.fstatSync),r.lstatSync=l(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(u,f,p){p&&process.nextTick(p)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(u,f,p,m){m&&process.nextTick(m)},r.lchownSync=function(){}),p2==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:(function(u){function f(p,m,g){var y=Date.now(),_=0;u(p,m,function x(S){if(S&&(S.code==="EACCES"||S.code==="EPERM")&&Date.now()-y<6e4){setTimeout(function(){r.stat(m,function(O,k){O&&O.code==="ENOENT"?u(p,m,x):g(S)})},_),_<100&&(_+=10);return}g&&g(S)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(r.rename)),r.read=typeof r.read!="function"?r.read:(function(u){function f(p,m,g,y,_,x){var S;if(x&&typeof x=="function"){var O=0;S=function(k,E,R){if(k&&k.code==="EAGAIN"&&O<10)return O++,u.call(r,p,m,g,y,_,S);x.apply(this,arguments)}}return u.call(r,p,m,g,y,_,S)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:(function(u){return function(f,p,m,g,y){for(var _=0;;)try{return u.call(r,f,p,m,g,y)}catch(x){if(x.code==="EAGAIN"&&_<10){_++;continue}throw x}}})(r.readSync);function e(u){u.lchmod=function(f,p,m){u.open(f,ui.O_WRONLY|ui.O_SYMLINK,p,function(g,y){if(g){m&&m(g);return}u.fchmod(y,p,function(_){u.close(y,function(x){m&&m(_||x)})})})},u.lchmodSync=function(f,p){var m=u.openSync(f,ui.O_WRONLY|ui.O_SYMLINK,p),g=!0,y;try{y=u.fchmodSync(m,p),g=!1}finally{if(g)try{u.closeSync(m)}catch{}else u.closeSync(m)}return y}}function t(u){ui.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(f,p,m,g){u.open(f,ui.O_SYMLINK,function(y,_){if(y){g&&g(y);return}u.futimes(_,p,m,function(x){u.close(_,function(S){g&&g(x||S)})})})},u.lutimesSync=function(f,p,m){var g=u.openSync(f,ui.O_SYMLINK),y,_=!0;try{y=u.futimesSync(g,p,m),_=!1}finally{if(_)try{u.closeSync(g)}catch{}else u.closeSync(g)}return y}):u.futimes&&(u.lutimes=function(f,p,m,g){g&&process.nextTick(g)},u.lutimesSync=function(){})}function i(u){return u&&function(f,p,m){return u.call(r,f,p,function(g){c(g)&&(g=null),m&&m.apply(this,arguments)})}}function n(u){return u&&function(f,p){try{return u.call(r,f,p)}catch(m){if(!c(m))throw m}}}function s(u){return u&&function(f,p,m,g){return u.call(r,f,p,m,function(y){c(y)&&(y=null),g&&g.apply(this,arguments)})}}function a(u){return u&&function(f,p,m){try{return u.call(r,f,p,m)}catch(g){if(!c(g))throw g}}}function o(u){return u&&function(f,p,m){typeof p=="function"&&(m=p,p=null);function g(y,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),m&&m.apply(this,arguments)}return p?u.call(r,f,p,g):u.call(r,f,g)}}function l(u){return u&&function(f,p){var m=p?u.call(r,f,p):u.call(r,f);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function c(u){if(!u||u.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var ab=w((ZP,sb)=>{var nb=require("stream").Stream;sb.exports=g2;function g2(r){return{ReadStream:e,WriteStream:t};function e(i,n){if(!(this instanceof e))return new e(i,n);nb.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var a=Object.keys(n),o=0,l=a.length;o<l;o++){var c=a[o];this[c]=n[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}r.open(this.path,this.flags,this.mode,function(u,f){if(u){s.emit("error",u),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function t(i,n){if(!(this instanceof t))return new t(i,n);nb.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),a=0,o=s.length;a<o;a++){var l=s[a];this[l]=n[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=r.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var lb=w((JP,ob)=>{"use strict";ob.exports=y2;var v2=Object.getPrototypeOf||function(r){return r.__proto__};function y2(r){if(r===null||typeof r!="object")return r;if(r instanceof Object)var e={__proto__:v2(r)};else var e=Object.create(null);return Object.getOwnPropertyNames(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}});var hb=w((QP,Eh)=>{var We=require("fs"),_2=ib(),b2=ab(),x2=lb(),yl=require("util"),ht,bl;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ht=Symbol.for("graceful-fs.queue"),bl=Symbol.for("graceful-fs.previous")):(ht="___graceful-fs.queue",bl="___graceful-fs.previous");function w2(){}function fb(r,e){Object.defineProperty(r,ht,{get:function(){return e}})}var tn=w2;yl.debuglog?tn=yl.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(tn=function(){var r=yl.format.apply(yl,arguments);r="GFS4: "+r.split(/\n/).join(`
190
- GFS4: `),console.error(r)});We[ht]||(cb=global[ht]||[],fb(We,cb),We.close=(function(r){function e(t,i){return r.call(We,t,function(n){n||ub(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,bl,{value:r}),e})(We.close),We.closeSync=(function(r){function e(t){r.apply(We,arguments),ub()}return Object.defineProperty(e,bl,{value:r}),e})(We.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){tn(We[ht]),require("assert").equal(We[ht].length,0)}));var cb;global[ht]||fb(global,We[ht]);Eh.exports=wh(x2(We));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!We.__patched&&(Eh.exports=wh(We),We.__patched=!0);function wh(r){_2(r),r.gracefulify=wh,r.createReadStream=E,r.createWriteStream=R;var e=r.readFile;r.readFile=t;function t(C,L,P){return typeof L=="function"&&(P=L,L=null),$(C,L,P);function $(q,G,U,H){return e(q,G,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Zn([$,[q,G,U],Z,H||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments)})}}var i=r.writeFile;r.writeFile=n;function n(C,L,P,$){return typeof P=="function"&&($=P,P=null),q(C,L,P,$);function q(G,U,H,Z,re){return i(G,U,H,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Zn([q,[G,U,H,Z],Y,re||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var s=r.appendFile;s&&(r.appendFile=a);function a(C,L,P,$){return typeof P=="function"&&($=P,P=null),q(C,L,P,$);function q(G,U,H,Z,re){return s(G,U,H,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Zn([q,[G,U,H,Z],Y,re||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var o=r.copyFile;o&&(r.copyFile=l);function l(C,L,P,$){return typeof P=="function"&&($=P,P=0),q(C,L,P,$);function q(G,U,H,Z,re){return o(G,U,H,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Zn([q,[G,U,H,Z],Y,re||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var c=r.readdir;r.readdir=f;var u=/^v[0-5]\./;function f(C,L,P){typeof L=="function"&&(P=L,L=null);var $=u.test(process.version)?function(U,H,Z,re){return c(U,q(U,H,Z,re))}:function(U,H,Z,re){return c(U,H,q(U,H,Z,re))};return $(C,L,P);function q(G,U,H,Z){return function(re,Y){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zn([$,[G,U,H],re,Z||Date.now(),Date.now()]):(Y&&Y.sort&&Y.sort(),typeof H=="function"&&H.call(this,re,Y))}}}if(process.version.substr(0,4)==="v0.8"){var p=b2(r);x=p.ReadStream,O=p.WriteStream}var m=r.ReadStream;m&&(x.prototype=Object.create(m.prototype),x.prototype.open=S);var g=r.WriteStream;g&&(O.prototype=Object.create(g.prototype),O.prototype.open=k),Object.defineProperty(r,"ReadStream",{get:function(){return x},set:function(C){x=C},enumerable:!0,configurable:!0}),Object.defineProperty(r,"WriteStream",{get:function(){return O},set:function(C){O=C},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(r,"FileReadStream",{get:function(){return y},set:function(C){y=C},enumerable:!0,configurable:!0});var _=O;Object.defineProperty(r,"FileWriteStream",{get:function(){return _},set:function(C){_=C},enumerable:!0,configurable:!0});function x(C,L){return this instanceof x?(m.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.autoClose&&C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P),C.read())})}function O(C,L){return this instanceof O?(g.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function k(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P))})}function E(C,L){return new r.ReadStream(C,L)}function R(C,L){return new r.WriteStream(C,L)}var T=r.open;r.open=A;function A(C,L,P,$){return typeof P=="function"&&($=P,P=null),q(C,L,P,$);function q(G,U,H,Z,re){return T(G,U,H,function(Y,we){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Zn([q,[G,U,H,Z],Y,re||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return r}function Zn(r){tn("ENQUEUE",r[0].name,r[1]),We[ht].push(r),Sh()}var _l;function ub(){for(var r=Date.now(),e=0;e<We[ht].length;++e)We[ht][e].length>2&&(We[ht][e][3]=r,We[ht][e][4]=r);Sh()}function Sh(){if(clearTimeout(_l),_l=void 0,We[ht].length!==0){var r=We[ht].shift(),e=r[0],t=r[1],i=r[2],n=r[3],s=r[4];if(n===void 0)tn("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-n>=6e4){tn("TIMEOUT",e.name,t);var a=t.pop();typeof a=="function"&&a.call(null,i)}else{var o=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);o>=c?(tn("RETRY",e.name,t),e.apply(null,t.concat([n]))):We[ht].push(r)}_l===void 0&&(_l=setTimeout(Sh,0))}}});var pb=w((XP,db)=>{function er(r,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(r)),this._timeouts=r,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}db.exports=er;er.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};er.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};er.prototype.retry=function(r){if(this._timeout&&clearTimeout(this._timeout),!r)return!1;var e=new Date().getTime();if(r&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(r);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var i=this,n=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},t);return this._options.unref&&n.unref(),!0};er.prototype.attempt=function(r,e){this._fn=r,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};er.prototype.try=function(r){console.log("Using RetryOperation.try() is deprecated"),this.attempt(r)};er.prototype.start=function(r){console.log("Using RetryOperation.start() is deprecated"),this.attempt(r)};er.prototype.start=er.prototype.try;er.prototype.errors=function(){return this._errors};er.prototype.attempts=function(){return this._attempts};er.prototype.mainError=function(){if(this._errors.length===0)return null;for(var r={},e=null,t=0,i=0;i<this._errors.length;i++){var n=this._errors[i],s=n.message,a=(r[s]||0)+1;r[s]=a,a>=t&&(e=n,t=a)}return e}});var mb=w(rn=>{var S2=pb();rn.operation=function(r){var e=rn.timeouts(r);return new S2(e,{forever:r&&r.forever,unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})};rn.timeouts=function(r){if(r instanceof Array)return[].concat(r);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in r)e[t]=r[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],n=0;n<e.retries;n++)i.push(this.createTimeout(n,e));return r&&r.forever&&!i.length&&i.push(this.createTimeout(n,e)),i.sort(function(s,a){return s-a}),i};rn.createTimeout=function(r,e){var t=e.randomize?Math.random()+1:1,i=Math.round(t*e.minTimeout*Math.pow(e.factor,r));return i=Math.min(i,e.maxTimeout),i};rn.wrap=function(r,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var i in r)typeof r[i]=="function"&&t.push(i)}for(var n=0;n<t.length;n++){var s=t[n],a=r[s];r[s]=function(l){var c=rn.operation(e),u=Array.prototype.slice.call(arguments,1),f=u.pop();u.push(function(p){c.retry(p)||(p&&(arguments[0]=c.mainError()),f.apply(this,arguments))}),c.attempt(function(){l.apply(r,u)})}.bind(r,a),r[s].options=e}}});var vb=w((t4,gb)=>{gb.exports=mb()});var yb=w((r4,xl)=>{xl.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&xl.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&xl.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Sb=w((i4,Xn)=>{var Ge=global.process,nn=function(r){return r&&typeof r=="object"&&typeof r.removeListener=="function"&&typeof r.emit=="function"&&typeof r.reallyExit=="function"&&typeof r.listeners=="function"&&typeof r.kill=="function"&&typeof r.pid=="number"&&typeof r.on=="function"};nn(Ge)?(_b=require("assert"),Jn=yb(),bb=/^win/i.test(Ge.platform),ea=require("events"),typeof ea!="function"&&(ea=ea.EventEmitter),Ge.__signal_exit_emitter__?ot=Ge.__signal_exit_emitter__:(ot=Ge.__signal_exit_emitter__=new ea,ot.count=0,ot.emitted={}),ot.infinite||(ot.setMaxListeners(1/0),ot.infinite=!0),Xn.exports=function(r,e){if(!nn(global.process))return function(){};_b.equal(typeof r,"function","a callback must be provided for exit handler"),Qn===!1&&kh();var t="exit";e&&e.alwaysLast&&(t="afterexit");var i=function(){ot.removeListener(t,r),ot.listeners("exit").length===0&&ot.listeners("afterexit").length===0&&wl()};return ot.on(t,r),i},wl=function(){!Qn||!nn(global.process)||(Qn=!1,Jn.forEach(function(e){try{Ge.removeListener(e,Sl[e])}catch{}}),Ge.emit=El,Ge.reallyExit=Oh,ot.count-=1)},Xn.exports.unload=wl,sn=function(e,t,i){ot.emitted[e]||(ot.emitted[e]=!0,ot.emit(e,t,i))},Sl={},Jn.forEach(function(r){Sl[r]=function(){if(nn(global.process)){var t=Ge.listeners(r);t.length===ot.count&&(wl(),sn("exit",null,r),sn("afterexit",null,r),bb&&r==="SIGHUP"&&(r="SIGINT"),Ge.kill(Ge.pid,r))}}}),Xn.exports.signals=function(){return Jn},Qn=!1,kh=function(){Qn||!nn(global.process)||(Qn=!0,ot.count+=1,Jn=Jn.filter(function(e){try{return Ge.on(e,Sl[e]),!0}catch{return!1}}),Ge.emit=wb,Ge.reallyExit=xb)},Xn.exports.load=kh,Oh=Ge.reallyExit,xb=function(e){nn(global.process)&&(Ge.exitCode=e||0,sn("exit",Ge.exitCode,null),sn("afterexit",Ge.exitCode,null),Oh.call(Ge,Ge.exitCode))},El=Ge.emit,wb=function(e,t){if(e==="exit"&&nn(global.process)){t!==void 0&&(Ge.exitCode=t);var i=El.apply(this,arguments);return sn("exit",Ge.exitCode,null),sn("afterexit",Ge.exitCode,null),i}else return El.apply(this,arguments)}):Xn.exports=function(){return function(){}};var _b,Jn,bb,ea,ot,wl,sn,Sl,Qn,kh,Oh,xb,El,wb});var Nb=w((n4,Ib)=>{"use strict";var E2=require("path"),Cb=hb(),k2=vb(),O2=Sb(),fi={},Eb=Symbol();function C2(r,e,t){let i=e[Eb];if(i)return e.stat(r,(s,a)=>{if(s)return t(s);t(null,a.mtime,i)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);e.utimes(r,n,n,s=>{if(s)return t(s);e.stat(r,(a,o)=>{if(a)return t(a);let l=o.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(e,Eb,{value:l}),t(null,o.mtime,l)})})}function T2(r){let e=Date.now();return r==="s"&&(e=Math.ceil(e/1e3)*1e3),new Date(e)}function Ol(r,e){return e.lockfilePath||`${r}.lock`}function Tb(r,e,t){if(!e.realpath)return t(null,E2.resolve(r));e.fs.realpath(r,t)}function Th(r,e,t){let i=Ol(r,e);e.fs.mkdir(i,n=>{if(!n)return C2(i,e.fs,(s,a,o)=>{if(s)return e.fs.rmdir(i,()=>{}),t(s);t(null,a,o)});if(n.code!=="EEXIST")return t(n);if(e.stale<=0)return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:r}));e.fs.stat(i,(s,a)=>{if(s)return s.code==="ENOENT"?Th(r,{...e,stale:0},t):t(s);if(!A2(a,e))return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:r}));Ab(r,e,o=>{if(o)return t(o);Th(r,{...e,stale:0},t)})})})}function A2(r,e){return r.mtime.getTime()<Date.now()-e.stale}function Ab(r,e,t){e.fs.rmdir(Ol(r,e),i=>{if(i&&i.code!=="ENOENT")return t(i);t()})}function kl(r,e){let t=fi[r];t.updateTimeout||(t.updateDelay=t.updateDelay||e.update,t.updateTimeout=setTimeout(()=>{t.updateTimeout=null,e.fs.stat(t.lockfilePath,(i,n)=>{let s=t.lastUpdate+e.stale<Date.now();if(i)return i.code==="ENOENT"||s?Ch(r,t,Object.assign(i,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,kl(r,e));if(!(t.mtime.getTime()===n.mtime.getTime()))return Ch(r,t,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let o=T2(t.mtimePrecision);e.fs.utimes(t.lockfilePath,o,o,l=>{let c=t.lastUpdate+e.stale<Date.now();if(!t.released){if(l)return l.code==="ENOENT"||c?Ch(r,t,Object.assign(l,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,kl(r,e));t.mtime=o,t.lastUpdate=Date.now(),t.updateDelay=null,kl(r,e)}})})},t.updateDelay),t.updateTimeout.unref&&t.updateTimeout.unref())}function Ch(r,e,t){e.released=!0,e.updateTimeout&&clearTimeout(e.updateTimeout),fi[r]===e&&delete fi[r],e.options.onCompromised(t)}function I2(r,e,t){e={stale:1e4,update:null,realpath:!0,retries:0,fs:Cb,onCompromised:i=>{throw i},...e},e.retries=e.retries||0,e.retries=typeof e.retries=="number"?{retries:e.retries}:e.retries,e.stale=Math.max(e.stale||0,2e3),e.update=e.update==null?e.stale/2:e.update||0,e.update=Math.max(Math.min(e.update,e.stale/2),1e3),Tb(r,e,(i,n)=>{if(i)return t(i);let s=k2.operation(e.retries);s.attempt(()=>{Th(n,e,(a,o,l)=>{if(s.retry(a))return;if(a)return t(s.mainError());let c=fi[n]={lockfilePath:Ol(n,e),mtime:o,mtimePrecision:l,options:e,lastUpdate:Date.now()};kl(n,e),t(null,u=>{if(c.released)return u&&u(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));N2(n,{...e,realpath:!1},u)})})})})}function N2(r,e,t){e={fs:Cb,realpath:!0,...e},Tb(r,e,(i,n)=>{if(i)return t(i);let s=fi[n];if(!s)return t(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete fi[n],Ab(n,e,t)})}function kb(r){return(...e)=>new Promise((t,i)=>{e.push((n,s)=>{n?i(n):t(s)}),r(...e)})}var Ob=!1;function L2(){Ob||(Ob=!0,O2(()=>{for(let r in fi){let e=fi[r].options;try{e.fs.rmdirSync(Ol(r,e))}catch{}}}))}Ib.exports.lock=async(r,e)=>{L2();let t=await kb(I2)(r,e);return kb(t)}});var Z2={};Ll(Z2,{HttpsProxyAgent:()=>$b.HttpsProxyAgent,PNG:()=>Vb.PNG,ProgramOption:()=>dg,SocksProxyAgent:()=>Hb.SocksProxyAgent,colors:()=>B2,debug:()=>R2,diff:()=>P2,dotenv:()=>M2,getProxyForUrl:()=>Ub.getProxyForUrl,jpegjs:()=>D2,lockfile:()=>q2,mime:()=>j2,minimatch:()=>U2,open:()=>$2,program:()=>hg,progress:()=>V2,ws:()=>H2,wsReceiver:()=>W2,wsSender:()=>z2,wsServer:()=>G2,yaml:()=>Y2,zod:()=>K2});module.exports=fx(Z2);var Lb=Je(ad()),Bb=Je(ts());var Gl={};Ll(Gl,{Diff:()=>Vt,applyPatch:()=>qd,applyPatches:()=>vw,canonicalize:()=>ka,convertChangesToDMP:()=>Ow,convertChangesToXML:()=>Cw,createPatch:()=>yw,createTwoFilesPatch:()=>jd,diffArrays:()=>dw,diffChars:()=>Kx,diffCss:()=>nw,diffJson:()=>hw,diffLines:()=>ql,diffSentences:()=>iw,diffTrimmedLines:()=>rw,diffWords:()=>ew,diffWordsWithSpace:()=>Rd,formatPatch:()=>Ta,merge:()=>ww,parsePatch:()=>Aa,reversePatch:()=>Ud,structuredPatch:()=>Ca});function Vt(){}Vt.prototype={diff:function(e,t){var i,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=n.callback;typeof n=="function"&&(s=n,n={});var a=this;function o(k){return k=a.postProcess(k,n),s?(setTimeout(function(){s(k)},0),!0):k}e=this.castInput(e,n),t=this.castInput(t,n),e=this.removeEmpty(this.tokenize(e,n)),t=this.removeEmpty(this.tokenize(t,n));var l=t.length,c=e.length,u=1,f=l+c;n.maxEditLength!=null&&(f=Math.min(f,n.maxEditLength));var p=(i=n.timeout)!==null&&i!==void 0?i:1/0,m=Date.now()+p,g=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(g[0],t,e,0,n);if(g[0].oldPos+1>=c&&y+1>=l)return o(yd(a,g[0].lastComponent,t,e,a.useLongestToken));var _=-1/0,x=1/0;function S(){for(var k=Math.max(_,-u);k<=Math.min(x,u);k+=2){var E=void 0,R=g[k-1],T=g[k+1];R&&(g[k-1]=void 0);var A=!1;if(T){var C=T.oldPos-k;A=T&&0<=C&&C<l}var L=R&&R.oldPos+1<c;if(!A&&!L){g[k]=void 0;continue}if(!L||A&&R.oldPos<T.oldPos?E=a.addToPath(T,!0,!1,0,n):E=a.addToPath(R,!1,!0,1,n),y=a.extractCommon(E,t,e,k,n),E.oldPos+1>=c&&y+1>=l)return o(yd(a,E.lastComponent,t,e,a.useLongestToken));g[k]=E,E.oldPos+1>=c&&(x=Math.min(x,k-1)),y+1>=l&&(_=Math.max(_,k+1))}u++}if(s)(function k(){setTimeout(function(){if(u>f||Date.now()>m)return s();S()||k()},0)})();else for(;u<=f&&Date.now()<=m;){var O=S();if(O)return O}},addToPath:function(e,t,i,n,s){var a=e.lastComponent;return a&&!s.oneChangePerToken&&a.added===t&&a.removed===i?{oldPos:e.oldPos+n,lastComponent:{count:a.count+1,added:t,removed:i,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:i,previousComponent:a}}},extractCommon:function(e,t,i,n,s){for(var a=t.length,o=i.length,l=e.oldPos,c=l-n,u=0;c+1<a&&l+1<o&&this.equals(i[l+1],t[c+1],s);)c++,l++,u++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,c},equals:function(e,t,i){return i.comparator?i.comparator(e,t):e===t||i.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],i=0;i<e.length;i++)e[i]&&t.push(e[i]);return t},castInput:function(e){return e},tokenize:function(e){return Array.from(e)},join:function(e){return e.join("")},postProcess:function(e){return e}};function yd(r,e,t,i,n){for(var s=[],a;e;)s.push(e),a=e.previousComponent,delete e.previousComponent,e=a;s.reverse();for(var o=0,l=s.length,c=0,u=0;o<l;o++){var f=s[o];if(f.removed)f.value=r.join(i.slice(u,u+f.count)),u+=f.count;else{if(!f.added&&n){var p=t.slice(c,c+f.count);p=p.map(function(m,g){var y=i[u+g];return y.length>m.length?y:m}),f.value=r.join(p)}else f.value=r.join(t.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}return s}var Yx=new Vt;function Kx(r,e,t){return Yx.diff(r,e,t)}function _d(r,e){var t;for(t=0;t<r.length&&t<e.length;t++)if(r[t]!=e[t])return r.slice(0,t);return r.slice(0,t)}function bd(r,e){var t;if(!r||!e||r[r.length-1]!=e[e.length-1])return"";for(t=0;t<r.length&&t<e.length;t++)if(r[r.length-(t+1)]!=e[e.length-(t+1)])return r.slice(-t);return r.slice(-t)}function Dl(r,e,t){if(r.slice(0,e.length)!=e)throw Error("string ".concat(JSON.stringify(r)," doesn't start with prefix ").concat(JSON.stringify(e),"; this is a bug"));return t+r.slice(e.length)}function Fl(r,e,t){if(!e)return r+t;if(r.slice(-e.length)!=e)throw Error("string ".concat(JSON.stringify(r)," doesn't end with suffix ").concat(JSON.stringify(e),"; this is a bug"));return r.slice(0,-e.length)+t}function rs(r,e){return Dl(r,e,"")}function wa(r,e){return Fl(r,e,"")}function xd(r,e){return e.slice(0,Zx(r,e))}function Zx(r,e){var t=0;r.length>e.length&&(t=r.length-e.length);var i=e.length;r.length<e.length&&(i=r.length);var n=Array(i),s=0;n[0]=0;for(var a=1;a<i;a++){for(e[a]==e[s]?n[a]=n[s]:n[a]=s;s>0&&e[a]!=e[s];)s=n[s];e[a]==e[s]&&s++}s=0;for(var o=t;o<r.length;o++){for(;s>0&&r[o]!=e[s];)s=n[s];r[o]==e[s]&&s++}return s}function Jx(r){return r.includes(`\r
191
- `)&&!r.startsWith(`
192
- `)&&!r.match(/[^\r]\n/)}function Qx(r){return!r.includes(`\r
193
- `)&&r.includes(`
194
- `)}var Ea="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Xx=new RegExp("[".concat(Ea,"]+|\\s+|[^").concat(Ea,"]"),"ug"),is=new Vt;is.equals=function(r,e,t){return t.ignoreCase&&(r=r.toLowerCase(),e=e.toLowerCase()),r.trim()===e.trim()};is.tokenize=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');t=Array.from(e.intlSegmenter.segment(r),function(s){return s.segment})}else t=r.match(Xx)||[];var i=[],n=null;return t.forEach(function(s){/\s/.test(s)?n==null?i.push(s):i.push(i.pop()+s):/\s/.test(n)?i[i.length-1]==n?i.push(i.pop()+s):i.push(n+s):i.push(s),n=s}),i};is.join=function(r){return r.map(function(e,t){return t==0?e:e.replace(/^\s+/,"")}).join("")};is.postProcess=function(r,e){if(!r||e.oneChangePerToken)return r;var t=null,i=null,n=null;return r.forEach(function(s){s.added?i=s:s.removed?n=s:((i||n)&&wd(t,n,i,s),t=s,i=null,n=null)}),(i||n)&&wd(t,n,i,null),r};function ew(r,e,t){return(t==null?void 0:t.ignoreWhitespace)!=null&&!t.ignoreWhitespace?Rd(r,e,t):is.diff(r,e,t)}function wd(r,e,t,i){if(e&&t){var n=e.value.match(/^\s*/)[0],s=e.value.match(/\s*$/)[0],a=t.value.match(/^\s*/)[0],o=t.value.match(/\s*$/)[0];if(r){var l=_d(n,a);r.value=Fl(r.value,a,l),e.value=rs(e.value,l),t.value=rs(t.value,l)}if(i){var c=bd(s,o);i.value=Dl(i.value,o,c),e.value=wa(e.value,c),t.value=wa(t.value,c)}}else if(t)r&&(t.value=t.value.replace(/^\s*/,"")),i&&(i.value=i.value.replace(/^\s*/,""));else if(r&&i){var u=i.value.match(/^\s*/)[0],f=e.value.match(/^\s*/)[0],p=e.value.match(/\s*$/)[0],m=_d(u,f);e.value=rs(e.value,m);var g=bd(rs(u,m),p);e.value=wa(e.value,g),i.value=Dl(i.value,u,g),r.value=Fl(r.value,u,u.slice(0,u.length-g.length))}else if(i){var y=i.value.match(/^\s*/)[0],_=e.value.match(/\s*$/)[0],x=xd(_,y);e.value=wa(e.value,x)}else if(r){var S=r.value.match(/\s*$/)[0],O=e.value.match(/^\s*/)[0],k=xd(S,O);e.value=rs(e.value,k)}}var Bd=new Vt;Bd.tokenize=function(r){var e=new RegExp("(\\r?\\n)|[".concat(Ea,"]+|[^\\S\\n\\r]+|[^").concat(Ea,"]"),"ug");return r.match(e)||[]};function Rd(r,e,t){return Bd.diff(r,e,t)}function tw(r,e){if(typeof r=="function")e.callback=r;else if(r)for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t]);return e}var ns=new Vt;ns.tokenize=function(r,e){e.stripTrailingCr&&(r=r.replace(/\r\n/g,`
195
- `));var t=[],i=r.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(var n=0;n<i.length;n++){var s=i[n];n%2&&!e.newlineIsToken?t[t.length-1]+=s:t.push(s)}return t};ns.equals=function(r,e,t){return t.ignoreWhitespace?((!t.newlineIsToken||!r.includes(`
196
- `))&&(r=r.trim()),(!t.newlineIsToken||!e.includes(`
197
- `))&&(e=e.trim())):t.ignoreNewlineAtEof&&!t.newlineIsToken&&(r.endsWith(`
198
- `)&&(r=r.slice(0,-1)),e.endsWith(`
199
- `)&&(e=e.slice(0,-1))),Vt.prototype.equals.call(this,r,e,t)};function ql(r,e,t){return ns.diff(r,e,t)}function rw(r,e,t){var i=tw(t,{ignoreWhitespace:!0});return ns.diff(r,e,i)}var Pd=new Vt;Pd.tokenize=function(r){return r.split(/(\S.+?[.!?])(?=\s+|$)/)};function iw(r,e,t){return Pd.diff(r,e,t)}var Md=new Vt;Md.tokenize=function(r){return r.split(/([{}:;,]|\s+)/)};function nw(r,e,t){return Md.diff(r,e,t)}function Sd(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),t.push.apply(t,i)}return t}function kt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Sd(Object(t),!0).forEach(function(i){ow(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Sd(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function sw(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function aw(r){var e=sw(r,"string");return typeof e=="symbol"?e:e+""}function jl(r){"@babel/helpers - typeof";return jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jl(r)}function ow(r,e,t){return e=aw(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Cr(r){return lw(r)||cw(r)||uw(r)||fw()}function lw(r){if(Array.isArray(r))return Ul(r)}function cw(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function uw(r,e){if(r){if(typeof r=="string")return Ul(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ul(r,e)}}function Ul(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=r[t];return i}function fw(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var dn=new Vt;dn.useLongestToken=!0;dn.tokenize=ns.tokenize;dn.castInput=function(r,e){var t=e.undefinedReplacement,i=e.stringifyReplacer,n=i===void 0?function(s,a){return typeof a=="undefined"?t:a}:i;return typeof r=="string"?r:JSON.stringify(ka(r,null,null,n),n," ")};dn.equals=function(r,e,t){return Vt.prototype.equals.call(dn,r.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"),t)};function hw(r,e,t){return dn.diff(r,e,t)}function ka(r,e,t,i,n){e=e||[],t=t||[],i&&(r=i(n,r));var s;for(s=0;s<e.length;s+=1)if(e[s]===r)return t[s];var a;if(Object.prototype.toString.call(r)==="[object Array]"){for(e.push(r),a=new Array(r.length),t.push(a),s=0;s<r.length;s+=1)a[s]=ka(r[s],e,t,i,n);return e.pop(),t.pop(),a}if(r&&r.toJSON&&(r=r.toJSON()),jl(r)==="object"&&r!==null){e.push(r),a={},t.push(a);var o=[],l;for(l in r)Object.prototype.hasOwnProperty.call(r,l)&&o.push(l);for(o.sort(),s=0;s<o.length;s+=1)l=o[s],a[l]=ka(r[l],e,t,i,l);e.pop(),t.pop()}else a=r;return a}var Oa=new Vt;Oa.tokenize=function(r){return r.slice()};Oa.join=Oa.removeEmpty=function(r){return r};function dw(r,e,t){return Oa.diff(r,e,t)}function Dd(r){return Array.isArray(r)?r.map(Dd):kt(kt({},r),{},{hunks:r.hunks.map(function(e){return kt(kt({},e),{},{lines:e.lines.map(function(t,i){var n;return t.startsWith("\\")||t.endsWith("\r")||(n=e.lines[i+1])!==null&&n!==void 0&&n.startsWith("\\")?t:t+"\r"})})})})}function Fd(r){return Array.isArray(r)?r.map(Fd):kt(kt({},r),{},{hunks:r.hunks.map(function(e){return kt(kt({},e),{},{lines:e.lines.map(function(t){return t.endsWith("\r")?t.substring(0,t.length-1):t})})})})}function pw(r){return Array.isArray(r)||(r=[r]),!r.some(function(e){return e.hunks.some(function(t){return t.lines.some(function(i){return!i.startsWith("\\")&&i.endsWith("\r")})})})}function mw(r){return Array.isArray(r)||(r=[r]),r.some(function(e){return e.hunks.some(function(t){return t.lines.some(function(i){return i.endsWith("\r")})})})&&r.every(function(e){return e.hunks.every(function(t){return t.lines.every(function(i,n){var s;return i.startsWith("\\")||i.endsWith("\r")||((s=t.lines[n+1])===null||s===void 0?void 0:s.startsWith("\\"))})})})}function Aa(r){var e=r.split(/\n/),t=[],i=0;function n(){var o={};for(t.push(o);i<e.length;){var l=e[i];if(/^(\-\-\-|\+\+\+|@@)\s/.test(l))break;var c=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(l);c&&(o.index=c[1]),i++}for(s(o),s(o),o.hunks=[];i<e.length;){var u=e[i];if(/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(u))break;if(/^@@/.test(u))o.hunks.push(a());else{if(u)throw new Error("Unknown line "+(i+1)+" "+JSON.stringify(u));i++}}}function s(o){var l=/^(---|\+\+\+)\s+(.*)\r?$/.exec(e[i]);if(l){var c=l[1]==="---"?"old":"new",u=l[2].split(" ",2),f=u[0].replace(/\\\\/g,"\\");/^".*"$/.test(f)&&(f=f.substr(1,f.length-2)),o[c+"FileName"]=f,o[c+"Header"]=(u[1]||"").trim(),i++}}function a(){var o=i,l=e[i++],c=l.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),u={oldStart:+c[1],oldLines:typeof c[2]=="undefined"?1:+c[2],newStart:+c[3],newLines:typeof c[4]=="undefined"?1:+c[4],lines:[]};u.oldLines===0&&(u.oldStart+=1),u.newLines===0&&(u.newStart+=1);for(var f=0,p=0;i<e.length&&(p<u.oldLines||f<u.newLines||(m=e[i])!==null&&m!==void 0&&m.startsWith("\\"));i++){var m,g=e[i].length==0&&i!=e.length-1?" ":e[i][0];if(g==="+"||g==="-"||g===" "||g==="\\")u.lines.push(e[i]),g==="+"?f++:g==="-"?p++:g===" "&&(f++,p++);else throw new Error("Hunk at line ".concat(o+1," contained invalid line ").concat(e[i]))}if(!f&&u.newLines===1&&(u.newLines=0),!p&&u.oldLines===1&&(u.oldLines=0),f!==u.newLines)throw new Error("Added line count did not match for hunk at line "+(o+1));if(p!==u.oldLines)throw new Error("Removed line count did not match for hunk at line "+(o+1));return u}for(;i<e.length;)n();return t}function gw(r,e,t){var i=!0,n=!1,s=!1,a=1;return function o(){if(i&&!s){if(n?a++:i=!1,r+a<=t)return r+a;s=!0}if(!n)return s||(i=!0),e<=r-a?r-a++:(n=!0,o())}}function qd(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string"&&(e=Aa(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}(t.autoConvertLineEndings||t.autoConvertLineEndings==null)&&(Jx(r)&&pw(e)?e=Dd(e):Qx(r)&&mw(e)&&(e=Fd(e)));var i=r.split(`
201
- `),n=e.hunks,s=t.compareLine||function(P,$,q,G){return $===G},a=t.fuzzFactor||0,o=0;if(a<0||!Number.isInteger(a))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return r;for(var l="",c=!1,u=!1,f=0;f<n[n.length-1].lines.length;f++){var p=n[n.length-1].lines[f];p[0]=="\\"&&(l[0]=="+"?c=!0:l[0]=="-"&&(u=!0)),l=p}if(c){if(u){if(!a&&i[i.length-1]=="")return!1}else if(i[i.length-1]=="")i.pop();else if(!a)return!1}else if(u){if(i[i.length-1]!="")i.push("");else if(!a)return!1}function m(P,$,q){for(var G=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,U=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,H=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],Z=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,re=0,Y=!1;G<P.length;G++){var we=P[G],de=we.length>0?we[0]:" ",ue=we.length>0?we.substr(1):we;if(de==="-")if(s($+1,i[$],de,ue))$++,re=0;else return!q||i[$]==null?null:(H[Z]=i[$],m(P,$+1,q-1,G,!1,H,Z+1));if(de==="+"){if(!U)return null;H[Z]=ue,Z++,re=0,Y=!0}if(de===" ")if(re++,H[Z]=i[$],s($+1,i[$],de,ue))Z++,U=!0,Y=!1,$++;else return Y||!q?null:i[$]&&(m(P,$+1,q-1,G+1,!1,H,Z+1)||m(P,$+1,q-1,G,!1,H,Z+1))||m(P,$,q-1,G+1,!1,H,Z)}return Z-=re,$-=re,H.length=Z,{patchedLines:H,oldLineLastI:$-1}}for(var g=[],y=0,_=0;_<n.length;_++){for(var x=n[_],S=void 0,O=i.length-x.oldLines+a,k=void 0,E=0;E<=a;E++){k=x.oldStart+y-1;for(var R=gw(k,o,O);k!==void 0&&(S=m(x.lines,k,E),!S);k=R());if(S)break}if(!S)return!1;for(var T=o;T<k;T++)g.push(i[T]);for(var A=0;A<S.patchedLines.length;A++){var C=S.patchedLines[A];g.push(C)}o=S.oldLineLastI+1,y=k+1-x.oldStart}for(var L=o;L<i.length;L++)g.push(i[L]);return g.join(`
202
- `)}function vw(r,e){typeof r=="string"&&(r=Aa(r));var t=0;function i(){var n=r[t++];if(!n)return e.complete();e.loadFile(n,function(s,a){if(s)return e.complete(s);var o=qd(a,n,e);e.patched(n,o,function(l){if(l)return e.complete(l);i()})})}i()}function Ca(r,e,t,i,n,s,a){if(a||(a={}),typeof a=="function"&&(a={callback:a}),typeof a.context=="undefined"&&(a.context=4),a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){var o=a,l=o.callback;ql(t,i,kt(kt({},a),{},{callback:function(f){var p=c(f);l(p)}}))}else return c(ql(t,i,a));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(A){return A.map(function(C){return" "+C})}for(var p=[],m=0,g=0,y=[],_=1,x=1,S=function(){var C=u[O],L=C.lines||_w(C.value);if(C.lines=L,C.added||C.removed){var P;if(!m){var $=u[O-1];m=_,g=x,$&&(y=a.context>0?f($.lines.slice(-a.context)):[],m-=y.length,g-=y.length)}(P=y).push.apply(P,Cr(L.map(function(Z){return(C.added?"+":"-")+Z}))),C.added?x+=L.length:_+=L.length}else{if(m)if(L.length<=a.context*2&&O<u.length-2){var q;(q=y).push.apply(q,Cr(f(L)))}else{var G,U=Math.min(L.length,a.context);(G=y).push.apply(G,Cr(f(L.slice(0,U))));var H={oldStart:m,oldLines:_-m+U,newStart:g,newLines:x-g+U,lines:y};p.push(H),m=0,g=0,y=[]}_+=L.length,x+=L.length}},O=0;O<u.length;O++)S();for(var k=0,E=p;k<E.length;k++)for(var R=E[k],T=0;T<R.lines.length;T++)R.lines[T].endsWith(`
203
- `)?R.lines[T]=R.lines[T].slice(0,-1):(R.lines.splice(T+1,0,"\"),T++);return{oldFileName:r,newFileName:e,oldHeader:n,newHeader:s,hunks:p}}}function Ta(r){if(Array.isArray(r))return r.map(Ta).join(`
204
- `);var e=[];r.oldFileName==r.newFileName&&e.push("Index: "+r.oldFileName),e.push("==================================================================="),e.push("--- "+r.oldFileName+(typeof r.oldHeader=="undefined"?"":" "+r.oldHeader)),e.push("+++ "+r.newFileName+(typeof r.newHeader=="undefined"?"":" "+r.newHeader));for(var t=0;t<r.hunks.length;t++){var i=r.hunks[t];i.oldLines===0&&(i.oldStart-=1),i.newLines===0&&(i.newStart-=1),e.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@"),e.push.apply(e,i.lines)}return e.join(`
189
+ `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=fa(e),r=Zr(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=fa(e),r=Zr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};zv.Parser=If});var eb=O(is=>{"use strict";var Jv=yf(),uA=Yn(),ts=Jn(),fA=du(),hA=xe(),pA=Af(),Zv=Nf();function Qv(i){let e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new pA.LineCounter||null,prettyErrors:e}}function dA(i,e={}){let{lineCounter:t,prettyErrors:r}=Qv(e),n=new Zv.Parser(t==null?void 0:t.addNewLine),s=new Jv.Composer(e),o=Array.from(s.compose(n.parse(i)));if(r&&t)for(let a of o)a.errors.forEach(ts.prettifyError(i,t)),a.warnings.forEach(ts.prettifyError(i,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function Xv(i,e={}){let{lineCounter:t,prettyErrors:r}=Qv(e),n=new Zv.Parser(t==null?void 0:t.addNewLine),s=new Jv.Composer(e),o=null;for(let a of s.compose(n.parse(i),!0,i.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new ts.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(ts.prettifyError(i,t)),o.warnings.forEach(ts.prettifyError(i,t))),o}function mA(i,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=Xv(i,t);if(!n)return null;if(n.warnings.forEach(s=>fA.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},t))}function gA(i,e,t){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let s=Math.round(t);t=s<1?void 0:s>8?{indent:8}:{indent:s}}if(i===void 0){let{keepUndefined:s}=(n=t!=null?t:e)!=null?n:{};if(!s)return}return hA.isDocument(i)&&!r?i.toString(t):new uA.Document(i,r,t).toString(t)}is.parse=mA;is.parseAllDocuments=dA;is.parseDocument=Xv;is.stringify=gA});var ib=O(Ce=>{"use strict";var yA=yf(),vA=Yn(),bA=Ju(),Bf=Jn(),_A=In(),Ri=xe(),wA=Ii(),xA=$e(),SA=Bi(),EA=Li(),OA=ca(),kA=Cf(),CA=Af(),TA=Nf(),ha=eb(),tb=kn();Ce.Composer=yA.Composer;Ce.Document=vA.Document;Ce.Schema=bA.Schema;Ce.YAMLError=Bf.YAMLError;Ce.YAMLParseError=Bf.YAMLParseError;Ce.YAMLWarning=Bf.YAMLWarning;Ce.Alias=_A.Alias;Ce.isAlias=Ri.isAlias;Ce.isCollection=Ri.isCollection;Ce.isDocument=Ri.isDocument;Ce.isMap=Ri.isMap;Ce.isNode=Ri.isNode;Ce.isPair=Ri.isPair;Ce.isScalar=Ri.isScalar;Ce.isSeq=Ri.isSeq;Ce.Pair=wA.Pair;Ce.Scalar=xA.Scalar;Ce.YAMLMap=SA.YAMLMap;Ce.YAMLSeq=EA.YAMLSeq;Ce.CST=OA;Ce.Lexer=kA.Lexer;Ce.LineCounter=CA.LineCounter;Ce.Parser=TA.Parser;Ce.parse=ha.parse;Ce.parseAllDocuments=ha.parseAllDocuments;Ce.parseDocument=ha.parseDocument;Ce.stringify=ha.stringify;Ce.visit=tb.visit;Ce.visitAsync=tb.visitAsync});var nb=O((PL,rb)=>{var Mi=require("constants"),AA=process.cwd,pa=null,IA=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return pa||(pa=AA.call(process)),pa};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Lf=process.chdir,process.chdir=function(i){pa=null,Lf.call(process,i)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Lf));var Lf;rb.exports=NA;function NA(i){Mi.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(i),i.lutimes||t(i),i.chown=s(i.chown),i.fchown=s(i.fchown),i.lchown=s(i.lchown),i.chmod=r(i.chmod),i.fchmod=r(i.fchmod),i.lchmod=r(i.lchmod),i.chownSync=o(i.chownSync),i.fchownSync=o(i.fchownSync),i.lchownSync=o(i.lchownSync),i.chmodSync=n(i.chmodSync),i.fchmodSync=n(i.fchmodSync),i.lchmodSync=n(i.lchmodSync),i.stat=a(i.stat),i.fstat=a(i.fstat),i.lstat=a(i.lstat),i.statSync=l(i.statSync),i.fstatSync=l(i.fstatSync),i.lstatSync=l(i.lstatSync),i.chmod&&!i.lchmod&&(i.lchmod=function(u,f,d){d&&process.nextTick(d)},i.lchmodSync=function(){}),i.chown&&!i.lchown&&(i.lchown=function(u,f,d,g){g&&process.nextTick(g)},i.lchownSync=function(){}),IA==="win32"&&(i.rename=typeof i.rename!="function"?i.rename:(function(u){function f(d,g,y){var m=Date.now(),b=0;u(d,g,function w(x){if(x&&(x.code==="EACCES"||x.code==="EPERM")&&Date.now()-m<6e4){setTimeout(function(){i.stat(g,function(_,k){_&&_.code==="ENOENT"?u(d,g,w):y(x)})},b),b<100&&(b+=10);return}y&&y(x)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(i.rename)),i.read=typeof i.read!="function"?i.read:(function(u){function f(d,g,y,m,b,w){var x;if(w&&typeof w=="function"){var _=0;x=function(k,S,R){if(k&&k.code==="EAGAIN"&&_<10)return _++,u.call(i,d,g,y,m,b,x);w.apply(this,arguments)}}return u.call(i,d,g,y,m,b,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(i.read),i.readSync=typeof i.readSync!="function"?i.readSync:(function(u){return function(f,d,g,y,m){for(var b=0;;)try{return u.call(i,f,d,g,y,m)}catch(w){if(w.code==="EAGAIN"&&b<10){b++;continue}throw w}}})(i.readSync);function e(u){u.lchmod=function(f,d,g){u.open(f,Mi.O_WRONLY|Mi.O_SYMLINK,d,function(y,m){if(y){g&&g(y);return}u.fchmod(m,d,function(b){u.close(m,function(w){g&&g(b||w)})})})},u.lchmodSync=function(f,d){var g=u.openSync(f,Mi.O_WRONLY|Mi.O_SYMLINK,d),y=!0,m;try{m=u.fchmodSync(g,d),y=!1}finally{if(y)try{u.closeSync(g)}catch{}else u.closeSync(g)}return m}}function t(u){Mi.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(f,d,g,y){u.open(f,Mi.O_SYMLINK,function(m,b){if(m){y&&y(m);return}u.futimes(b,d,g,function(w){u.close(b,function(x){y&&y(w||x)})})})},u.lutimesSync=function(f,d,g){var y=u.openSync(f,Mi.O_SYMLINK),m,b=!0;try{m=u.futimesSync(y,d,g),b=!1}finally{if(b)try{u.closeSync(y)}catch{}else u.closeSync(y)}return m}):u.futimes&&(u.lutimes=function(f,d,g,y){y&&process.nextTick(y)},u.lutimesSync=function(){})}function r(u){return u&&function(f,d,g){return u.call(i,f,d,function(y){c(y)&&(y=null),g&&g.apply(this,arguments)})}}function n(u){return u&&function(f,d){try{return u.call(i,f,d)}catch(g){if(!c(g))throw g}}}function s(u){return u&&function(f,d,g,y){return u.call(i,f,d,g,function(m){c(m)&&(m=null),y&&y.apply(this,arguments)})}}function o(u){return u&&function(f,d,g){try{return u.call(i,f,d,g)}catch(y){if(!c(y))throw y}}}function a(u){return u&&function(f,d,g){typeof d=="function"&&(g=d,d=null);function y(m,b){b&&(b.uid<0&&(b.uid+=4294967296),b.gid<0&&(b.gid+=4294967296)),g&&g.apply(this,arguments)}return d?u.call(i,f,d,y):u.call(i,f,y)}}function l(u){return u&&function(f,d){var g=d?u.call(i,f,d):u.call(i,f);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function c(u){if(!u||u.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var ab=O((RL,ob)=>{var sb=require("stream").Stream;ob.exports=BA;function BA(i){return{ReadStream:e,WriteStream:t};function e(r,n){if(!(this instanceof e))return new e(r,n);sb.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var o=Object.keys(n),a=0,l=o.length;a<l;a++){var c=o[a];this[c]=n[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}i.open(this.path,this.flags,this.mode,function(u,f){if(u){s.emit("error",u),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function t(r,n){if(!(this instanceof t))return new t(r,n);sb.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),o=0,a=s.length;o<a;o++){var l=s[o];this[l]=n[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=i.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var cb=O((ML,lb)=>{"use strict";lb.exports=PA;var LA=Object.getPrototypeOf||function(i){return i.__proto__};function PA(i){if(i===null||typeof i!="object")return i;if(i instanceof Object)var e={__proto__:LA(i)};else var e=Object.create(null);return Object.getOwnPropertyNames(i).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}),e}});var pb=O((DL,Mf)=>{var De=require("fs"),RA=nb(),MA=ab(),DA=cb(),da=require("util"),rt,ga;typeof Symbol=="function"&&typeof Symbol.for=="function"?(rt=Symbol.for("graceful-fs.queue"),ga=Symbol.for("graceful-fs.previous")):(rt="___graceful-fs.queue",ga="___graceful-fs.previous");function qA(){}function hb(i,e){Object.defineProperty(i,rt,{get:function(){return e}})}var fr=qA;da.debuglog?fr=da.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(fr=function(){var i=da.format.apply(da,arguments);i="GFS4: "+i.split(/\n/).join(`
190
+ GFS4: `),console.error(i)});De[rt]||(ub=global[rt]||[],hb(De,ub),De.close=(function(i){function e(t,r){return i.call(De,t,function(n){n||fb(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,ga,{value:i}),e})(De.close),De.closeSync=(function(i){function e(t){i.apply(De,arguments),fb()}return Object.defineProperty(e,ga,{value:i}),e})(De.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){fr(De[rt]),require("assert").equal(De[rt].length,0)}));var ub;global[rt]||hb(global,De[rt]);Mf.exports=Pf(DA(De));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!De.__patched&&(Mf.exports=Pf(De),De.__patched=!0);function Pf(i){RA(i),i.gracefulify=Pf,i.createReadStream=S,i.createWriteStream=R;var e=i.readFile;i.readFile=t;function t(C,M,L){return typeof M=="function"&&(L=M,M=null),G(C,M,L);function G(j,J,F,V){return e(j,J,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Qr([G,[j,J,F],Z,V||Date.now(),Date.now()]):typeof F=="function"&&F.apply(this,arguments)})}}var r=i.writeFile;i.writeFile=n;function n(C,M,L,G){return typeof L=="function"&&(G=L,L=null),j(C,M,L,G);function j(J,F,V,Z,ee){return r(J,F,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var s=i.appendFile;s&&(i.appendFile=o);function o(C,M,L,G){return typeof L=="function"&&(G=L,L=null),j(C,M,L,G);function j(J,F,V,Z,ee){return s(J,F,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var a=i.copyFile;a&&(i.copyFile=l);function l(C,M,L,G){return typeof L=="function"&&(G=L,L=0),j(C,M,L,G);function j(J,F,V,Z,ee){return a(J,F,V,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var c=i.readdir;i.readdir=f;var u=/^v[0-5]\./;function f(C,M,L){typeof M=="function"&&(L=M,M=null);var G=u.test(process.version)?function(F,V,Z,ee){return c(F,j(F,V,Z,ee))}:function(F,V,Z,ee){return c(F,V,j(F,V,Z,ee))};return G(C,M,L);function j(J,F,V,Z){return function(ee,W){ee&&(ee.code==="EMFILE"||ee.code==="ENFILE")?Qr([G,[J,F,V],ee,Z||Date.now(),Date.now()]):(W&&W.sort&&W.sort(),typeof V=="function"&&V.call(this,ee,W))}}}if(process.version.substr(0,4)==="v0.8"){var d=MA(i);w=d.ReadStream,_=d.WriteStream}var g=i.ReadStream;g&&(w.prototype=Object.create(g.prototype),w.prototype.open=x);var y=i.WriteStream;y&&(_.prototype=Object.create(y.prototype),_.prototype.open=k),Object.defineProperty(i,"ReadStream",{get:function(){return w},set:function(C){w=C},enumerable:!0,configurable:!0}),Object.defineProperty(i,"WriteStream",{get:function(){return _},set:function(C){_=C},enumerable:!0,configurable:!0});var m=w;Object.defineProperty(i,"FileReadStream",{get:function(){return m},set:function(C){m=C},enumerable:!0,configurable:!0});var b=_;Object.defineProperty(i,"FileWriteStream",{get:function(){return b},set:function(C){b=C},enumerable:!0,configurable:!0});function w(C,M){return this instanceof w?(g.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function x(){var C=this;N(C.path,C.flags,C.mode,function(M,L){M?(C.autoClose&&C.destroy(),C.emit("error",M)):(C.fd=L,C.emit("open",L),C.read())})}function _(C,M){return this instanceof _?(y.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function k(){var C=this;N(C.path,C.flags,C.mode,function(M,L){M?(C.destroy(),C.emit("error",M)):(C.fd=L,C.emit("open",L))})}function S(C,M){return new i.ReadStream(C,M)}function R(C,M){return new i.WriteStream(C,M)}var T=i.open;i.open=N;function N(C,M,L,G){return typeof L=="function"&&(G=L,L=null),j(C,M,L,G);function j(J,F,V,Z,ee){return T(J,F,V,function(W,Se){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qr([j,[J,F,V,Z],W,ee||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return i}function Qr(i){fr("ENQUEUE",i[0].name,i[1]),De[rt].push(i),Rf()}var ma;function fb(){for(var i=Date.now(),e=0;e<De[rt].length;++e)De[rt][e].length>2&&(De[rt][e][3]=i,De[rt][e][4]=i);Rf()}function Rf(){if(clearTimeout(ma),ma=void 0,De[rt].length!==0){var i=De[rt].shift(),e=i[0],t=i[1],r=i[2],n=i[3],s=i[4];if(n===void 0)fr("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-n>=6e4){fr("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,r)}else{var a=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);a>=c?(fr("RETRY",e.name,t),e.apply(null,t.concat([n]))):De[rt].push(i)}ma===void 0&&(ma=setTimeout(Rf,0))}}});var mb=O((qL,db)=>{function Dt(i,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}db.exports=Dt;Dt.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Dt.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};Dt.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var e=new Date().getTime();if(i&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var r=this,n=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t);return this._options.unref&&n.unref(),!0};Dt.prototype.attempt=function(i,e){this._fn=i,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Dt.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)};Dt.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)};Dt.prototype.start=Dt.prototype.try;Dt.prototype.errors=function(){return this._errors};Dt.prototype.attempts=function(){return this._attempts};Dt.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},e=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],s=n.message,o=(i[s]||0)+1;i[s]=o,o>=t&&(e=n,t=o)}return e}});var gb=O(hr=>{var FA=mb();hr.operation=function(i){var e=hr.timeouts(i);return new FA(e,{forever:i&&i.forever,unref:i&&i.unref,maxRetryTime:i&&i.maxRetryTime})};hr.timeouts=function(i){if(i instanceof Array)return[].concat(i);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in i)e[t]=i[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<e.retries;n++)r.push(this.createTimeout(n,e));return i&&i.forever&&!r.length&&r.push(this.createTimeout(n,e)),r.sort(function(s,o){return s-o}),r};hr.createTimeout=function(i,e){var t=e.randomize?Math.random()+1:1,r=Math.round(t*e.minTimeout*Math.pow(e.factor,i));return r=Math.min(r,e.maxTimeout),r};hr.wrap=function(i,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var r in i)typeof i[r]=="function"&&t.push(r)}for(var n=0;n<t.length;n++){var s=t[n],o=i[s];i[s]=function(l){var c=hr.operation(e),u=Array.prototype.slice.call(arguments,1),f=u.pop();u.push(function(d){c.retry(d)||(d&&(arguments[0]=c.mainError()),f.apply(this,arguments))}),c.attempt(function(){l.apply(i,u)})}.bind(i,o),i[s].options=e}}});var vb=O((jL,yb)=>{yb.exports=gb()});var bb=O((UL,ya)=>{ya.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ya.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ya.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Eb=O(($L,tn)=>{var Me=global.process,pr=function(i){return i&&typeof i=="object"&&typeof i.removeListener=="function"&&typeof i.emit=="function"&&typeof i.reallyExit=="function"&&typeof i.listeners=="function"&&typeof i.kill=="function"&&typeof i.pid=="number"&&typeof i.on=="function"};pr(Me)?(_b=require("assert"),Xr=bb(),wb=/^win/i.test(Me.platform),rs=require("events"),typeof rs!="function"&&(rs=rs.EventEmitter),Me.__signal_exit_emitter__?et=Me.__signal_exit_emitter__:(et=Me.__signal_exit_emitter__=new rs,et.count=0,et.emitted={}),et.infinite||(et.setMaxListeners(1/0),et.infinite=!0),tn.exports=function(i,e){if(!pr(global.process))return function(){};_b.equal(typeof i,"function","a callback must be provided for exit handler"),en===!1&&Df();var t="exit";e&&e.alwaysLast&&(t="afterexit");var r=function(){et.removeListener(t,i),et.listeners("exit").length===0&&et.listeners("afterexit").length===0&&va()};return et.on(t,i),r},va=function(){!en||!pr(global.process)||(en=!1,Xr.forEach(function(e){try{Me.removeListener(e,ba[e])}catch{}}),Me.emit=_a,Me.reallyExit=qf,et.count-=1)},tn.exports.unload=va,dr=function(e,t,r){et.emitted[e]||(et.emitted[e]=!0,et.emit(e,t,r))},ba={},Xr.forEach(function(i){ba[i]=function(){if(pr(global.process)){var t=Me.listeners(i);t.length===et.count&&(va(),dr("exit",null,i),dr("afterexit",null,i),wb&&i==="SIGHUP"&&(i="SIGINT"),Me.kill(Me.pid,i))}}}),tn.exports.signals=function(){return Xr},en=!1,Df=function(){en||!pr(global.process)||(en=!0,et.count+=1,Xr=Xr.filter(function(e){try{return Me.on(e,ba[e]),!0}catch{return!1}}),Me.emit=Sb,Me.reallyExit=xb)},tn.exports.load=Df,qf=Me.reallyExit,xb=function(e){pr(global.process)&&(Me.exitCode=e||0,dr("exit",Me.exitCode,null),dr("afterexit",Me.exitCode,null),qf.call(Me,Me.exitCode))},_a=Me.emit,Sb=function(e,t){if(e==="exit"&&pr(global.process)){t!==void 0&&(Me.exitCode=t);var r=_a.apply(this,arguments);return dr("exit",Me.exitCode,null),dr("afterexit",Me.exitCode,null),r}else return _a.apply(this,arguments)}):tn.exports=function(){return function(){}};var _b,Xr,wb,rs,et,va,dr,ba,en,Df,qf,xb,_a,Sb});var Bb=O((VL,Nb)=>{"use strict";var jA=require("path"),Tb=pb(),UA=vb(),$A=Eb(),Di={},Ob=Symbol();function VA(i,e,t){let r=e[Ob];if(r)return e.stat(i,(s,o)=>{if(s)return t(s);t(null,o.mtime,r)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);e.utimes(i,n,n,s=>{if(s)return t(s);e.stat(i,(o,a)=>{if(o)return t(o);let l=a.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(e,Ob,{value:l}),t(null,a.mtime,l)})})}function HA(i){let e=Date.now();return i==="s"&&(e=Math.ceil(e/1e3)*1e3),new Date(e)}function xa(i,e){return e.lockfilePath||`${i}.lock`}function Ab(i,e,t){if(!e.realpath)return t(null,jA.resolve(i));e.fs.realpath(i,t)}function jf(i,e,t){let r=xa(i,e);e.fs.mkdir(r,n=>{if(!n)return VA(r,e.fs,(s,o,a)=>{if(s)return e.fs.rmdir(r,()=>{}),t(s);t(null,o,a)});if(n.code!=="EEXIST")return t(n);if(e.stale<=0)return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:i}));e.fs.stat(r,(s,o)=>{if(s)return s.code==="ENOENT"?jf(i,{...e,stale:0},t):t(s);if(!GA(o,e))return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:i}));Ib(i,e,a=>{if(a)return t(a);jf(i,{...e,stale:0},t)})})})}function GA(i,e){return i.mtime.getTime()<Date.now()-e.stale}function Ib(i,e,t){e.fs.rmdir(xa(i,e),r=>{if(r&&r.code!=="ENOENT")return t(r);t()})}function wa(i,e){let t=Di[i];t.updateTimeout||(t.updateDelay=t.updateDelay||e.update,t.updateTimeout=setTimeout(()=>{t.updateTimeout=null,e.fs.stat(t.lockfilePath,(r,n)=>{let s=t.lastUpdate+e.stale<Date.now();if(r)return r.code==="ENOENT"||s?Ff(i,t,Object.assign(r,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,wa(i,e));if(!(t.mtime.getTime()===n.mtime.getTime()))return Ff(i,t,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let a=HA(t.mtimePrecision);e.fs.utimes(t.lockfilePath,a,a,l=>{let c=t.lastUpdate+e.stale<Date.now();if(!t.released){if(l)return l.code==="ENOENT"||c?Ff(i,t,Object.assign(l,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,wa(i,e));t.mtime=a,t.lastUpdate=Date.now(),t.updateDelay=null,wa(i,e)}})})},t.updateDelay),t.updateTimeout.unref&&t.updateTimeout.unref())}function Ff(i,e,t){e.released=!0,e.updateTimeout&&clearTimeout(e.updateTimeout),Di[i]===e&&delete Di[i],e.options.onCompromised(t)}function WA(i,e,t){e={stale:1e4,update:null,realpath:!0,retries:0,fs:Tb,onCompromised:r=>{throw r},...e},e.retries=e.retries||0,e.retries=typeof e.retries=="number"?{retries:e.retries}:e.retries,e.stale=Math.max(e.stale||0,2e3),e.update=e.update==null?e.stale/2:e.update||0,e.update=Math.max(Math.min(e.update,e.stale/2),1e3),Ab(i,e,(r,n)=>{if(r)return t(r);let s=UA.operation(e.retries);s.attempt(()=>{jf(n,e,(o,a,l)=>{if(s.retry(o))return;if(o)return t(s.mainError());let c=Di[n]={lockfilePath:xa(n,e),mtime:a,mtimePrecision:l,options:e,lastUpdate:Date.now()};wa(n,e),t(null,u=>{if(c.released)return u&&u(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));YA(n,{...e,realpath:!1},u)})})})})}function YA(i,e,t){e={fs:Tb,realpath:!0,...e},Ab(i,e,(r,n)=>{if(r)return t(r);let s=Di[n];if(!s)return t(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete Di[n],Ib(n,e,t)})}function kb(i){return(...e)=>new Promise((t,r)=>{e.push((n,s)=>{n?r(n):t(s)}),i(...e)})}var Cb=!1;function KA(){Cb||(Cb=!0,$A(()=>{for(let i in Di){let e=Di[i].options;try{e.fs.rmdirSync(xa(i,e))}catch{}}}))}Nb.exports.lock=async(i,e)=>{KA();let t=await kb(WA)(i,e);return kb(t)}});var pI={};Hf(pI,{HttpsProxyAgent:()=>$b.HttpsProxyAgent,PNG:()=>Vb.PNG,ProgramOption:()=>km,SocksProxyAgent:()=>Hb.SocksProxyAgent,colors:()=>zA,debug:()=>JA,diff:()=>XA,dotenv:()=>eI,getProxyForUrl:()=>ap,ini:()=>QA,jpegjs:()=>tI,lockfile:()=>rI,mime:()=>nI,minimatch:()=>sI,open:()=>oI,program:()=>Om,progress:()=>aI,ws:()=>lI,wsReceiver:()=>uI,wsSender:()=>fI,wsServer:()=>cI,yaml:()=>hI});module.exports=f_(pI);var Lb=He(bh()),Pb=He(nn()),ZA=He(Rh());var al={};Hf(al,{Diff:()=>je,FILE_HEADERS_ONLY:()=>Zh,INCLUDE_HEADERS:()=>sl,OMIT_HEADERS:()=>Qh,applyPatch:()=>rl,applyPatches:()=>Jh,arrayDiff:()=>el,canonicalize:()=>an,characterDiff:()=>Ra,convertChangesToDMP:()=>ep,convertChangesToXML:()=>tp,createPatch:()=>Xh,createTwoFilesPatch:()=>ol,cssDiff:()=>Ja,diffArrays:()=>Wh,diffChars:()=>Mh,diffCss:()=>Hh,diffJson:()=>Gh,diffLines:()=>on,diffSentences:()=>Vh,diffTrimmedLines:()=>$h,diffWords:()=>jh,diffWordsWithSpace:()=>Ha,formatPatch:()=>cn,jsonDiff:()=>Qa,lineDiff:()=>Is,parsePatch:()=>ln,reversePatch:()=>nl,sentenceDiff:()=>Ka,structuredPatch:()=>Ns,wordDiff:()=>$a,wordsWithSpaceDiff:()=>Va});var je=class{diff(e,t,r={}){let n;typeof r=="function"?(n=r,r={}):"callback"in r&&(n=r.callback);let s=this.castInput(e,r),o=this.castInput(t,r),a=this.removeEmpty(this.tokenize(s,r)),l=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(a,l,r,n)}diffWithOptionsObj(e,t,r,n){var s;let o=x=>{if(x=this.postProcess(x,r),n){setTimeout(function(){n(x)},0);return}else return x},a=t.length,l=e.length,c=1,u=a+l;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));let f=(s=r.timeout)!==null&&s!==void 0?s:1/0,d=Date.now()+f,g=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(g[0],t,e,0,r);if(g[0].oldPos+1>=l&&y+1>=a)return o(this.buildValues(g[0].lastComponent,t,e));let m=-1/0,b=1/0,w=()=>{for(let x=Math.max(m,-c);x<=Math.min(b,c);x+=2){let _,k=g[x-1],S=g[x+1];k&&(g[x-1]=void 0);let R=!1;if(S){let N=S.oldPos-x;R=S&&0<=N&&N<a}let T=k&&k.oldPos+1<l;if(!R&&!T){g[x]=void 0;continue}if(!T||R&&k.oldPos<S.oldPos?_=this.addToPath(S,!0,!1,0,r):_=this.addToPath(k,!1,!0,1,r),y=this.extractCommon(_,t,e,x,r),_.oldPos+1>=l&&y+1>=a)return o(this.buildValues(_.lastComponent,t,e))||!0;g[x]=_,_.oldPos+1>=l&&(b=Math.min(b,x-1)),y+1>=a&&(m=Math.max(m,x+1))}c++};if(n)(function x(){setTimeout(function(){if(c>u||Date.now()>d)return n(void 0);w()||x()},0)})();else for(;c<=u&&Date.now()<=d;){let x=w();if(x)return x}}addToPath(e,t,r,n,s){let o=e.lastComponent;return o&&!s.oneChangePerToken&&o.added===t&&o.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:o.count+1,added:t,removed:r,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:o}}}extractCommon(e,t,r,n,s){let o=t.length,a=r.length,l=e.oldPos,c=l-n,u=0;for(;c+1<o&&l+1<a&&this.equals(r[l+1],t[c+1],s);)c++,l++,u++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,c}equals(e,t,r){return r.comparator?r.comparator(e,t):e===t||!!r.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,r){let n=[],s;for(;e;)n.push(e),s=e.previousComponent,delete e.previousComponent,e=s;n.reverse();let o=n.length,a=0,l=0,c=0;for(;a<o;a++){let u=n[a];if(u.removed)u.value=this.join(r.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let f=t.slice(l,l+u.count);f=f.map(function(d,g){let y=r[c+g];return y.length>d.length?y:d}),u.value=this.join(f)}else u.value=this.join(t.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return n}};var Pa=class extends je{},Ra=new Pa;function Mh(i,e,t){return Ra.diff(i,e,t)}function Ma(i,e){let t;for(t=0;t<i.length&&t<e.length;t++)if(i[t]!=e[t])return i.slice(0,t);return i.slice(0,t)}function Da(i,e){let t;if(!i||!e||i[i.length-1]!=e[e.length-1])return"";for(t=0;t<i.length&&t<e.length;t++)if(i[i.length-(t+1)]!=e[e.length-(t+1)])return i.slice(-t);return i.slice(-t)}function ks(i,e,t){if(i.slice(0,e.length)!=e)throw Error(`string ${JSON.stringify(i)} doesn't start with prefix ${JSON.stringify(e)}; this is a bug`);return t+i.slice(e.length)}function Cs(i,e,t){if(!e)return i+t;if(i.slice(-e.length)!=e)throw Error(`string ${JSON.stringify(i)} doesn't end with suffix ${JSON.stringify(e)}; this is a bug`);return i.slice(0,-e.length)+t}function xr(i,e){return ks(i,e,"")}function sn(i,e){return Cs(i,e,"")}function qa(i,e){return e.slice(0,K_(i,e))}function K_(i,e){let t=0;i.length>e.length&&(t=i.length-e.length);let r=e.length;i.length<e.length&&(r=i.length);let n=Array(r),s=0;n[0]=0;for(let o=1;o<r;o++){for(e[o]==e[s]?n[o]=n[s]:n[o]=s;s>0&&e[o]!=e[s];)s=n[s];e[o]==e[s]&&s++}s=0;for(let o=t;o<i.length;o++){for(;s>0&&i[o]!=e[s];)s=n[s];i[o]==e[s]&&s++}return s}function Dh(i){return i.includes(`\r
191
+ `)&&!i.startsWith(`
192
+ `)&&!i.match(/[^\r]\n/)}function qh(i){return!i.includes(`\r
193
+ `)&&i.includes(`
194
+ `)}function Fa(i,e){let t=[];for(let r of Array.from(e.segment(i))){let n=r.segment;t.length&&/\s/.test(t[t.length-1])&&/\s/.test(n)?t[t.length-1]+=n:t.push(n)}return t}function Ts(i,e){if(e)return Sr(i,e)[1];let t;for(t=i.length-1;t>=0&&i[t].match(/\s/);t--);return i.substring(t+1)}function Ki(i,e){if(e)return Sr(i,e)[0];let t=i.match(/^\s*/);return t?t[0]:""}function Sr(i,e){if(!e)return[Ki(i),Ts(i)];if(e.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let t=Fa(i,e),r=t[0],n=t[t.length-1],s=/\s/.test(r)?r:"",o=/\s/.test(n)?n:"";return[s,o]}var As="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",z_=new RegExp(`[${As}]+|\\s+|[^${As}]`,"ug"),ja=class extends je{equals(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let r;if(t.intlSegmenter){let o=t.intlSegmenter;if(o.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Fa(e,o)}else r=e.match(z_)||[];let n=[],s=null;return r.forEach(o=>{/\s/.test(o)?s==null?n.push(o):n.push(n.pop()+o):s!=null&&/\s/.test(s)?n[n.length-1]==s?n.push(n.pop()+o):n.push(s+o):n.push(o),s=o}),n}join(e){return e.map((t,r)=>r==0?t:t.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let r=null,n=null,s=null;return e.forEach(o=>{o.added?n=o:o.removed?s=o:((n||s)&&Fh(r,s,n,o,t.intlSegmenter),r=o,n=null,s=null)}),(n||s)&&Fh(r,s,n,null,t.intlSegmenter),e}},$a=new ja;function jh(i,e,t){return(t==null?void 0:t.ignoreWhitespace)!=null&&!t.ignoreWhitespace?Ha(i,e,t):$a.diff(i,e,t)}function Fh(i,e,t,r,n){if(e&&t){let[s,o]=Sr(e.value,n),[a,l]=Sr(t.value,n);if(i){let c=Ma(s,a);i.value=Cs(i.value,a,c),e.value=xr(e.value,c),t.value=xr(t.value,c)}if(r){let c=Da(o,l);r.value=ks(r.value,l,c),e.value=sn(e.value,c),t.value=sn(t.value,c)}}else if(t){if(i){let s=Ki(t.value,n);t.value=t.value.substring(s.length)}if(r){let s=Ki(r.value,n);r.value=r.value.substring(s.length)}}else if(i&&r){let s=Ki(r.value,n),[o,a]=Sr(e.value,n),l=Ma(s,o);e.value=xr(e.value,l);let c=Da(xr(s,l),a);e.value=sn(e.value,c),r.value=ks(r.value,s,c),i.value=Cs(i.value,s,s.slice(0,s.length-c.length))}else if(r){let s=Ki(r.value,n),o=Ts(e.value,n),a=qa(o,s);e.value=sn(e.value,a)}else if(i){let s=Ts(i.value,n),o=Ki(e.value,n),a=qa(s,o);e.value=xr(e.value,a)}}var Ua=class extends je{tokenize(e){let t=new RegExp(`(\\r?\\n)|[${As}]+|[^\\S\\n\\r]+|[^${As}]`,"ug");return e.match(t)||[]}},Va=new Ua;function Ha(i,e,t){return Va.diff(i,e,t)}function Uh(i,e){if(typeof i=="function")e.callback=i;else if(i)for(let t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e}var Ga=class extends je{constructor(){super(...arguments),this.tokenize=Wa}equals(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
195
+ `))&&(e=e.trim()),(!r.newlineIsToken||!t.includes(`
196
+ `))&&(t=t.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(e.endsWith(`
197
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
198
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,r)}},Is=new Ga;function on(i,e,t){return Is.diff(i,e,t)}function $h(i,e,t){return t=Uh(t,{ignoreWhitespace:!0}),Is.diff(i,e,t)}function Wa(i,e){e.stripTrailingCr&&(i=i.replace(/\r\n/g,`
199
+ `));let t=[],r=i.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let n=0;n<r.length;n++){let s=r[n];n%2&&!e.newlineIsToken?t[t.length-1]+=s:t.push(s)}return t}function J_(i){return i=="."||i=="!"||i=="?"}var Ya=class extends je{tokenize(e){var t;let r=[],n=0;for(let s=0;s<e.length;s++){if(s==e.length-1){r.push(e.slice(n));break}if(J_(e[s])&&e[s+1].match(/\s/)){for(r.push(e.slice(n,s+1)),s=n=s+1;!((t=e[s+1])===null||t===void 0)&&t.match(/\s/);)s++;r.push(e.slice(n,s+1)),n=s+1}}return r}},Ka=new Ya;function Vh(i,e,t){return Ka.diff(i,e,t)}var za=class extends je{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},Ja=new za;function Hh(i,e,t){return Ja.diff(i,e,t)}var Za=class extends je{constructor(){super(...arguments),this.tokenize=Wa}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:r,stringifyReplacer:n=(s,o)=>typeof o=="undefined"?r:o}=t;return typeof e=="string"?e:JSON.stringify(an(e,null,null,n),null," ")}equals(e,t,r){return super.equals(e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)}},Qa=new Za;function Gh(i,e,t){return Qa.diff(i,e,t)}function an(i,e,t,r,n){e=e||[],t=t||[],r&&(i=r(n===void 0?"":n,i));let s;for(s=0;s<e.length;s+=1)if(e[s]===i)return t[s];let o;if(Object.prototype.toString.call(i)==="[object Array]"){for(e.push(i),o=new Array(i.length),t.push(o),s=0;s<i.length;s+=1)o[s]=an(i[s],e,t,r,String(s));return e.pop(),t.pop(),o}if(i&&i.toJSON&&(i=i.toJSON()),typeof i=="object"&&i!==null){e.push(i),o={},t.push(o);let a=[],l;for(l in i)Object.prototype.hasOwnProperty.call(i,l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],o[l]=an(i[l],e,t,r,l);e.pop(),t.pop()}else o=i;return o}var Xa=class extends je{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},el=new Xa;function Wh(i,e,t){return el.diff(i,e,t)}function tl(i){return Array.isArray(i)?i.map(e=>tl(e)):Object.assign(Object.assign({},i),{hunks:i.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map((t,r)=>{var n;return t.startsWith("\\")||t.endsWith("\r")||!((n=e.lines[r+1])===null||n===void 0)&&n.startsWith("\\")?t:t+"\r"})}))})}function il(i){return Array.isArray(i)?i.map(e=>il(e)):Object.assign(Object.assign({},i),{hunks:i.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map(t=>t.endsWith("\r")?t.substring(0,t.length-1):t)}))})}function Yh(i){return Array.isArray(i)||(i=[i]),!i.some(e=>e.hunks.some(t=>t.lines.some(r=>!r.startsWith("\\")&&r.endsWith("\r"))))}function Kh(i){return Array.isArray(i)||(i=[i]),i.some(e=>e.hunks.some(t=>t.lines.some(r=>r.endsWith("\r"))))&&i.every(e=>e.hunks.every(t=>t.lines.every((r,n)=>{var s;return r.startsWith("\\")||r.endsWith("\r")||((s=t.lines[n+1])===null||s===void 0?void 0:s.startsWith("\\"))})))}function ln(i){let e=i.split(/\n/),t=[],r=0;function n(){let a={};for(t.push(a);r<e.length;){let l=e[r];if(/^(---|\+\+\+|@@)\s/.test(l))break;let c=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(l);c&&(a.index=l.substring(c[0].length).trim()),r++}for(s(a),s(a),a.hunks=[];r<e.length;){let l=e[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(l))break;if(/^@@/.test(l))a.hunks.push(o());else{if(l)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(l));r++}}}function s(a){let l=/^(---|\+\+\+)\s+/.exec(e[r]);if(l){let c=l[1],u=e[r].substring(3).trim().split(" ",2),f=(u[1]||"").trim(),d=u[0].replace(/\\\\/g,"\\");d.startsWith('"')&&d.endsWith('"')&&(d=d.substr(1,d.length-2)),c==="---"?(a.oldFileName=d,a.oldHeader=f):(a.newFileName=d,a.newHeader=f),r++}}function o(){var a;let l=r,c=e[r++],u=c.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),f={oldStart:+u[1],oldLines:typeof u[2]=="undefined"?1:+u[2],newStart:+u[3],newLines:typeof u[4]=="undefined"?1:+u[4],lines:[]};f.oldLines===0&&(f.oldStart+=1),f.newLines===0&&(f.newStart+=1);let d=0,g=0;for(;r<e.length&&(g<f.oldLines||d<f.newLines||!((a=e[r])===null||a===void 0)&&a.startsWith("\\"));r++){let y=e[r].length==0&&r!=e.length-1?" ":e[r][0];if(y==="+"||y==="-"||y===" "||y==="\\")f.lines.push(e[r]),y==="+"?d++:y==="-"?g++:y===" "&&(d++,g++);else throw new Error(`Hunk at line ${l+1} contained invalid line ${e[r]}`)}if(!d&&f.newLines===1&&(f.newLines=0),!g&&f.oldLines===1&&(f.oldLines=0),d!==f.newLines)throw new Error("Added line count did not match for hunk at line "+(l+1));if(g!==f.oldLines)throw new Error("Removed line count did not match for hunk at line "+(l+1));return f}for(;r<e.length;)n();return t}function zh(i,e,t){let r=!0,n=!1,s=!1,o=1;return function a(){if(r&&!s){if(n?o++:r=!1,i+o<=t)return i+o;s=!0}if(!n)return s||(r=!0),e<=i-o?i-o++:(n=!0,a())}}function rl(i,e,t={}){let r;if(typeof e=="string"?r=ln(e):Array.isArray(e)?r=e:r=[e],r.length>1)throw new Error("applyPatch only works with a single input.");return Z_(i,r[0],t)}function Z_(i,e,t={}){(t.autoConvertLineEndings||t.autoConvertLineEndings==null)&&(Dh(i)&&Yh(e)?e=tl(e):qh(i)&&Kh(e)&&(e=il(e)));let r=i.split(`
200
+ `),n=e.hunks,s=t.compareLine||((y,m,b,w)=>m===w),o=t.fuzzFactor||0,a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return i;let l="",c=!1,u=!1;for(let y=0;y<n[n.length-1].lines.length;y++){let m=n[n.length-1].lines[y];m[0]=="\\"&&(l[0]=="+"?c=!0:l[0]=="-"&&(u=!0)),l=m}if(c){if(u){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(u){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function f(y,m,b,w=0,x=!0,_=[],k=0){let S=0,R=!1;for(;w<y.length;w++){let T=y[w],N=T.length>0?T[0]:" ",C=T.length>0?T.substr(1):T;if(N==="-")if(s(m+1,r[m],N,C))m++,S=0;else return!b||r[m]==null?null:(_[k]=r[m],f(y,m+1,b-1,w,!1,_,k+1));if(N==="+"){if(!x)return null;_[k]=C,k++,S=0,R=!0}if(N===" ")if(S++,_[k]=r[m],s(m+1,r[m],N,C))k++,x=!0,R=!1,m++;else return R||!b?null:r[m]&&(f(y,m+1,b-1,w+1,!1,_,k+1)||f(y,m+1,b-1,w,!1,_,k+1))||f(y,m,b-1,w+1,!1,_,k)}return k-=S,m-=S,_.length=k,{patchedLines:_,oldLineLastI:m-1}}let d=[],g=0;for(let y=0;y<n.length;y++){let m=n[y],b,w=r.length-m.oldLines+o,x;for(let _=0;_<=o;_++){x=m.oldStart+g-1;let k=zh(x,a,w);for(;x!==void 0&&(b=f(m.lines,x,_),!b);x=k());if(b)break}if(!b)return!1;for(let _=a;_<x;_++)d.push(r[_]);for(let _=0;_<b.patchedLines.length;_++){let k=b.patchedLines[_];d.push(k)}a=b.oldLineLastI+1,g=x+1-m.oldStart}for(let y=a;y<r.length;y++)d.push(r[y]);return d.join(`
201
+ `)}function Jh(i,e){let t=typeof i=="string"?ln(i):i,r=0;function n(){let s=t[r++];if(!s)return e.complete();e.loadFile(s,function(o,a){if(o)return e.complete(o);let l=rl(a,s,e);e.patched(s,l,function(c){if(c)return e.complete(c);n()})})}n()}function nl(i){return Array.isArray(i)?i.map(e=>nl(e)).reverse():Object.assign(Object.assign({},i),{oldFileName:i.newFileName,oldHeader:i.newHeader,newFileName:i.oldFileName,newHeader:i.oldHeader,hunks:i.hunks.map(e=>({oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,lines:e.lines.map(t=>t.startsWith("-")?`+${t.slice(1)}`:t.startsWith("+")?`-${t.slice(1)}`:t)}))})}var sl={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},Zh={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},Qh={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function Ns(i,e,t,r,n,s,o){let a;o?typeof o=="function"?a={callback:o}:a=o:a={},typeof a.context=="undefined"&&(a.context=4);let l=a.context;if(a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){let{callback:u}=a;on(t,r,Object.assign(Object.assign({},a),{callback:f=>{let d=c(f);u(d)}}))}else return c(on(t,r,a));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(x){return x.map(function(_){return" "+_})}let d=[],g=0,y=0,m=[],b=1,w=1;for(let x=0;x<u.length;x++){let _=u[x],k=_.lines||Q_(_.value);if(_.lines=k,_.added||_.removed){if(!g){let S=u[x-1];g=b,y=w,S&&(m=l>0?f(S.lines.slice(-l)):[],g-=m.length,y-=m.length)}for(let S of k)m.push((_.added?"+":"-")+S);_.added?w+=k.length:b+=k.length}else{if(g)if(k.length<=l*2&&x<u.length-2)for(let S of f(k))m.push(S);else{let S=Math.min(k.length,l);for(let T of f(k.slice(0,S)))m.push(T);let R={oldStart:g,oldLines:b-g+S,newStart:y,newLines:w-y+S,lines:m};d.push(R),g=0,y=0,m=[]}b+=k.length,w+=k.length}}for(let x of d)for(let _=0;_<x.lines.length;_++)x.lines[_].endsWith(`
202
+ `)?x.lines[_]=x.lines[_].slice(0,-1):(x.lines.splice(_+1,0,"\"),_++);return{oldFileName:i,newFileName:e,oldHeader:n,newHeader:s,hunks:d}}}function cn(i,e){if(e||(e=sl),Array.isArray(i)){if(i.length>1&&!e.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return i.map(r=>cn(r,e)).join(`
203
+ `)}let t=[];e.includeIndex&&i.oldFileName==i.newFileName&&t.push("Index: "+i.oldFileName),e.includeUnderline&&t.push("==================================================================="),e.includeFileHeaders&&(t.push("--- "+i.oldFileName+(typeof i.oldHeader=="undefined"?"":" "+i.oldHeader)),t.push("+++ "+i.newFileName+(typeof i.newHeader=="undefined"?"":" "+i.newHeader)));for(let r=0;r<i.hunks.length;r++){let n=i.hunks[r];n.oldLines===0&&(n.oldStart-=1),n.newLines===0&&(n.newStart-=1),t.push("@@ -"+n.oldStart+","+n.oldLines+" +"+n.newStart+","+n.newLines+" @@");for(let s of n.lines)t.push(s)}return t.join(`
205
204
  `)+`
206
- `}function jd(r,e,t,i,n,s,a){var o;if(typeof a=="function"&&(a={callback:a}),(o=a)!==null&&o!==void 0&&o.callback){var c=a,u=c.callback;Ca(r,e,t,i,n,s,kt(kt({},a),{},{callback:function(p){p?u(Ta(p)):u()}}))}else{var l=Ca(r,e,t,i,n,s,a);return l?Ta(l):void 0}}function yw(r,e,t,i,n,s){return jd(r,r,e,t,i,n,s)}function _w(r){var e=r.endsWith(`
207
- `),t=r.split(`
208
- `).map(function(i){return i+`
209
- `});return e?t.pop():t.push(t.pop().slice(0,-1)),t}function bw(r,e){return r.length!==e.length?!1:$l(r,e)}function $l(r,e){if(e.length>r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}function xw(r){var e=Vl(r.lines),t=e.oldLines,i=e.newLines;t!==void 0?r.oldLines=t:delete r.oldLines,i!==void 0?r.newLines=i:delete r.newLines}function ww(r,e,t){r=Ed(r,t),e=Ed(e,t);var i={};(r.index||e.index)&&(i.index=r.index||e.index),(r.newFileName||e.newFileName)&&(kd(r)?kd(e)?(i.oldFileName=Sa(i,r.oldFileName,e.oldFileName),i.newFileName=Sa(i,r.newFileName,e.newFileName),i.oldHeader=Sa(i,r.oldHeader,e.oldHeader),i.newHeader=Sa(i,r.newHeader,e.newHeader)):(i.oldFileName=r.oldFileName,i.newFileName=r.newFileName,i.oldHeader=r.oldHeader,i.newHeader=r.newHeader):(i.oldFileName=e.oldFileName||r.oldFileName,i.newFileName=e.newFileName||r.newFileName,i.oldHeader=e.oldHeader||r.oldHeader,i.newHeader=e.newHeader||r.newHeader)),i.hunks=[];for(var n=0,s=0,a=0,o=0;n<r.hunks.length||s<e.hunks.length;){var l=r.hunks[n]||{oldStart:1/0},c=e.hunks[s]||{oldStart:1/0};if(Od(l,c))i.hunks.push(Cd(l,a)),n++,o+=l.newLines-l.oldLines;else if(Od(c,l))i.hunks.push(Cd(c,o)),s++,a+=c.newLines-c.oldLines;else{var u={oldStart:Math.min(l.oldStart,c.oldStart),oldLines:0,newStart:Math.min(l.newStart+a,c.oldStart+o),newLines:0,lines:[]};Sw(u,l.oldStart,l.lines,c.oldStart,c.lines),s++,n++,i.hunks.push(u)}}return i}function Ed(r,e){if(typeof r=="string"){if(/^@@/m.test(r)||/^Index:/m.test(r))return Aa(r)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return Ca(void 0,void 0,e,r)}return r}function kd(r){return r.newFileName&&r.newFileName!==r.oldFileName}function Sa(r,e,t){return e===t?e:(r.conflict=!0,{mine:e,theirs:t})}function Od(r,e){return r.oldStart<e.oldStart&&r.oldStart+r.oldLines<e.oldStart}function Cd(r,e){return{oldStart:r.oldStart,oldLines:r.oldLines,newStart:r.newStart+e,newLines:r.newLines,lines:r.lines}}function Sw(r,e,t,i,n){var s={offset:e,lines:t,index:0},a={offset:i,lines:n,index:0};for(Ad(r,s,a),Ad(r,a,s);s.index<s.lines.length&&a.index<a.lines.length;){var o=s.lines[s.index],l=a.lines[a.index];if((o[0]==="-"||o[0]==="+")&&(l[0]==="-"||l[0]==="+"))Ew(r,s,a);else if(o[0]==="+"&&l[0]===" "){var c;(c=r.lines).push.apply(c,Cr(wi(s)))}else if(l[0]==="+"&&o[0]===" "){var u;(u=r.lines).push.apply(u,Cr(wi(a)))}else o[0]==="-"&&l[0]===" "?Td(r,s,a):l[0]==="-"&&o[0]===" "?Td(r,a,s,!0):o===l?(r.lines.push(o),s.index++,a.index++):Hl(r,wi(s),wi(a))}Id(r,s),Id(r,a),xw(r)}function Ew(r,e,t){var i=wi(e),n=wi(t);if(Nd(i)&&Nd(n)){if($l(i,n)&&Ld(t,i,i.length-n.length)){var s;(s=r.lines).push.apply(s,Cr(i));return}else if($l(n,i)&&Ld(e,n,n.length-i.length)){var a;(a=r.lines).push.apply(a,Cr(n));return}}else if(bw(i,n)){var o;(o=r.lines).push.apply(o,Cr(i));return}Hl(r,i,n)}function Td(r,e,t,i){var n=wi(e),s=kw(t,n);if(s.merged){var a;(a=r.lines).push.apply(a,Cr(s.merged))}else Hl(r,i?s:n,i?n:s)}function Hl(r,e,t){r.conflict=!0,r.lines.push({conflict:!0,mine:e,theirs:t})}function Ad(r,e,t){for(;e.offset<t.offset&&e.index<e.lines.length;){var i=e.lines[e.index++];r.lines.push(i),e.offset++}}function Id(r,e){for(;e.index<e.lines.length;){var t=e.lines[e.index++];r.lines.push(t)}}function wi(r){for(var e=[],t=r.lines[r.index][0];r.index<r.lines.length;){var i=r.lines[r.index];if(t==="-"&&i[0]==="+"&&(t="+"),t===i[0])e.push(i),r.index++;else break}return e}function kw(r,e){for(var t=[],i=[],n=0,s=!1,a=!1;n<e.length&&r.index<r.lines.length;){var o=r.lines[r.index],l=e[n];if(l[0]==="+")break;if(s=s||o[0]!==" ",i.push(l),n++,o[0]==="+")for(a=!0;o[0]==="+";)t.push(o),o=r.lines[++r.index];l.substr(1)===o.substr(1)?(t.push(o),r.index++):a=!0}if((e[n]||"")[0]==="+"&&s&&(a=!0),a)return t;for(;n<e.length;)i.push(e[n++]);return{merged:i,changes:t}}function Nd(r){return r.reduce(function(e,t){return e&&t[0]==="-"},!0)}function Ld(r,e,t){for(var i=0;i<t;i++){var n=e[e.length-t+i].substr(1);if(r.lines[r.index+i]!==" "+n)return!1}return r.index+=t,!0}function Vl(r){var e=0,t=0;return r.forEach(function(i){if(typeof i!="string"){var n=Vl(i.mine),s=Vl(i.theirs);e!==void 0&&(n.oldLines===s.oldLines?e+=n.oldLines:e=void 0),t!==void 0&&(n.newLines===s.newLines?t+=n.newLines:t=void 0)}else t!==void 0&&(i[0]==="+"||i[0]===" ")&&t++,e!==void 0&&(i[0]==="-"||i[0]===" ")&&e++}),{oldLines:e,newLines:t}}function Ud(r){return Array.isArray(r)?r.map(Ud).reverse():kt(kt({},r),{},{oldFileName:r.newFileName,oldHeader:r.newHeader,newFileName:r.oldFileName,newHeader:r.oldHeader,hunks:r.hunks.map(function(e){return{oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,lines:e.lines.map(function(t){return t.startsWith("-")?"+".concat(t.slice(1)):t.startsWith("+")?"-".concat(t.slice(1)):t})}})})}function Ow(r){for(var e=[],t,i,n=0;n<r.length;n++)t=r[n],t.added?i=1:t.removed?i=-1:i=0,e.push([i,t.value]);return e}function Cw(r){for(var e=[],t=0;t<r.length;t++){var i=r[t];i.added?e.push("<ins>"):i.removed&&e.push("<del>"),e.push(Tw(i.value)),i.added?e.push("</ins>"):i.removed&&e.push("</del>")}return e.join("")}function Tw(r){var e=r;return e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/"/g,"&quot;"),e}var Rb=Je(Wd()),Ub=Je(Yd()),$b=Je(op()),Pb=Je(pp()),Mb=Je(wp()),Db=Je(Vp()),Fb=Je(im()),Vb=Je(Qm());var fg=Je(ug(),1),{program:hg,createCommand:fB,createArgument:hB,createOption:dB,CommanderError:pB,InvalidArgumentError:mB,InvalidOptionArgumentError:gB,Command:vB,Argument:yB,Option:dg,Help:_B}=fg.default;var qb=Je(yg()),Hb=Je(Qg());var LO=Je(rv(),1),Bu=Je(wu(),1),Ru=Je(Eu(),1),ey=Je(Nu(),1),Pu=Je(Xv(),1);var ty=ey.default;var jb=Je(V_());var bh={};Ll(bh,{BRAND:()=>TN,DIRTY:()=>qi,EMPTY_PATH:()=>aN,INVALID:()=>se,NEVER:()=>h2,OK:()=>gt,ParseStatus:()=>ft,Schema:()=>xe,ZodAny:()=>li,ZodArray:()=>jr,ZodBigInt:()=>Ui,ZodBoolean:()=>$i,ZodBranded:()=>Qs,ZodCatch:()=>Xi,ZodDate:()=>Vi,ZodDefault:()=>Qi,ZodDiscriminatedUnion:()=>pl,ZodEffects:()=>Xt,ZodEnum:()=>Zi,ZodError:()=>It,ZodFirstPartyTypeKind:()=>oe,ZodFunction:()=>gl,ZodIntersection:()=>zi,ZodIssueCode:()=>D,ZodLazy:()=>Yi,ZodLiteral:()=>Ki,ZodMap:()=>zn,ZodNaN:()=>Kn,ZodNativeEnum:()=>Ji,ZodNever:()=>cr,ZodNull:()=>Gi,ZodNullable:()=>Sr,ZodNumber:()=>ji,ZodObject:()=>Nt,ZodOptional:()=>Jt,ZodParsedType:()=>K,ZodPipeline:()=>Xs,ZodPromise:()=>ci,ZodReadonly:()=>en,ZodRecord:()=>ml,ZodSchema:()=>xe,ZodSet:()=>Yn,ZodString:()=>oi,ZodSymbol:()=>Gn,ZodTransformer:()=>Xt,ZodTuple:()=>wr,ZodType:()=>xe,ZodUndefined:()=>Hi,ZodUnion:()=>Wi,ZodUnknown:()=>qr,ZodVoid:()=>Wn,addIssueToContext:()=>W,any:()=>DN,array:()=>UN,bigint:()=>LN,boolean:()=>eb,coerce:()=>f2,custom:()=>J_,date:()=>BN,datetimeRegex:()=>K_,defaultErrorMap:()=>Dr,discriminatedUnion:()=>GN,effect:()=>i2,enum:()=>e2,function:()=>JN,getErrorMap:()=>$n,getParsedType:()=>xr,instanceof:()=>IN,intersection:()=>WN,isAborted:()=>hl,isAsync:()=>Vn,isDirty:()=>dl,isValid:()=>ai,late:()=>AN,lazy:()=>QN,literal:()=>XN,makeIssue:()=>Js,map:()=>KN,nan:()=>NN,nativeEnum:()=>t2,never:()=>qN,null:()=>MN,nullable:()=>s2,number:()=>X_,object:()=>$N,objectUtil:()=>vh,oboolean:()=>u2,onumber:()=>c2,optional:()=>n2,ostring:()=>l2,pipeline:()=>o2,preprocess:()=>a2,promise:()=>r2,quotelessJson:()=>iN,record:()=>YN,set:()=>ZN,setErrorMap:()=>sN,strictObject:()=>VN,string:()=>Q_,symbol:()=>RN,transformer:()=>i2,tuple:()=>zN,undefined:()=>PN,union:()=>HN,unknown:()=>FN,util:()=>Ce,void:()=>jN});var Ce;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{let s={};for(let a of n)s[a]=a;return s},r.getValidEnumValues=n=>{let s=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),a={};for(let o of s)a[o]=n[o];return r.objectValues(a)},r.objectValues=n=>r.objectKeys(n).map(function(s){return n[s]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.push(a);return s},r.find=(n,s)=>{for(let a of n)if(s(a))return a},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}r.joinValues=i,r.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(Ce||(Ce={}));var vh;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(vh||(vh={}));var K=Ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xr=r=>{switch(typeof r){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN(r)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(r)?K.array:r===null?K.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?K.promise:typeof Map!="undefined"&&r instanceof Map?K.map:typeof Set!="undefined"&&r instanceof Set?K.set:typeof Date!="undefined"&&r instanceof Date?K.date:K.object;default:return K.unknown}};var D=Ce.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),iN=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:"),It=class r extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)i._errors.push(t(a));else{let o=i,l=0;for(;l<a.path.length;){let c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return n(this),i}static assert(e){if(!(e instanceof r))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},i=[];for(let n of this.issues)if(n.path.length>0){let s=n.path[0];t[s]=t[s]||[],t[s].push(e(n))}else i.push(e(n));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}};It.create=r=>new It(r);var nN=(r,e)=>{let t;switch(r.code){case D.invalid_type:r.received===K.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case D.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Ce.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:t=`Unrecognized key(s) in object: ${Ce.joinValues(r.keys,", ")}`;break;case D.invalid_union:t="Invalid input";break;case D.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Ce.joinValues(r.options)}`;break;case D.invalid_enum_value:t=`Invalid enum value. Expected ${Ce.joinValues(r.options)}, received '${r.received}'`;break;case D.invalid_arguments:t="Invalid function arguments";break;case D.invalid_return_type:t="Invalid function return type";break;case D.invalid_date:t="Invalid date";break;case D.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Ce.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case D.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case D.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case D.custom:t="Invalid input";break;case D.invalid_intersection_types:t="Intersection results could not be merged";break;case D.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case D.not_finite:t="Number must be finite";break;default:t=e.defaultError,Ce.assertNever(r)}return{message:t}},Dr=nN;var H_=Dr;function sN(r){H_=r}function $n(){return H_}var Js=r=>{let{data:e,path:t,errorMaps:i,issueData:n}=r,s=[...t,...n.path||[]],a={...n,path:s};if(n.message!==void 0)return{...n,path:s,message:n.message};let o="",l=i.filter(c=>!!c).slice().reverse();for(let c of l)o=c(a,{data:e,defaultError:o}).message;return{...n,path:s,message:o}},aN=[];function W(r,e){let t=$n(),i=Js({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Dr?void 0:Dr].filter(n=>!!n)});r.common.issues.push(i)}var ft=class r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let i=[];for(let n of t){if(n.status==="aborted")return se;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){let i=[];for(let n of t){let s=await n.key,a=await n.value;i.push({key:s,value:a})}return r.mergeObjectSync(e,i)}static mergeObjectSync(e,t){let i={};for(let n of t){let{key:s,value:a}=n;if(s.status==="aborted"||a.status==="aborted")return se;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value!="undefined"||n.alwaysSet)&&(i[s.value]=a.value)}return{status:e.value,value:i}}},se=Object.freeze({status:"aborted"}),qi=r=>({status:"dirty",value:r}),gt=r=>({status:"valid",value:r}),hl=r=>r.status==="aborted",dl=r=>r.status==="dirty",ai=r=>r.status==="valid",Vn=r=>typeof Promise!="undefined"&&r instanceof Promise;var ee;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ee||(ee={}));var Qt=class{constructor(e,t,i,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},G_=(r,e)=>{if(ai(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new It(r.common.issues);return this._error=t,this._error}}};function ge(r){if(!r)return{};let{errorMap:e,invalid_type_error:t,required_error:i,description:n}=r;if(e&&(t||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,o)=>{var c,u;let{message:l}=r;return a.code==="invalid_enum_value"?{message:l!=null?l:o.defaultError}:typeof o.data=="undefined"?{message:(c=l!=null?l:i)!=null?c:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(u=l!=null?l:t)!=null?u:o.defaultError}},description:n}}var xe=class{get description(){return this._def.description}_getType(e){return xr(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ft,ctx:{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Vn(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var s;let i={common:{issues:[],async:(s=t==null?void 0:t.async)!=null?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)},n=this._parseSync({data:e,path:i.path,parent:i});return G_(i,n)}"~validate"(e){var i,n;let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:t});return ai(s)?{value:s.value}:{issues:t.common.issues}}catch(s){(n=(i=s==null?void 0:s.message)==null?void 0:i.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>ai(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){let i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){let i={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await(Vn(n)?n:Promise.resolve(n));return G_(i,s)}refine(e,t){let i=n=>typeof t=="string"||typeof t=="undefined"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,s)=>{let a=e(n),o=()=>s.addIssue({code:D.custom,...i(n)});return typeof Promise!="undefined"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,t){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof t=="function"?t(i,n):t),!1))}_refinement(e){return new Xt({schema:this,typeName:oe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return Jt.create(this,this._def)}nullable(){return Sr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return jr.create(this)}promise(){return ci.create(this,this._def)}or(e){return Wi.create([this,e],this._def)}and(e){return zi.create(this,e,this._def)}transform(e){return new Xt({...ge(this._def),schema:this,typeName:oe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new Qi({...ge(this._def),innerType:this,defaultValue:t,typeName:oe.ZodDefault})}brand(){return new Qs({typeName:oe.ZodBranded,type:this,...ge(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new Xi({...ge(this._def),innerType:this,catchValue:t,typeName:oe.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Xs.create(this,e)}readonly(){return en.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},oN=/^c[^\s-]{8,}$/i,lN=/^[0-9a-z]+$/,cN=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uN=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fN=/^[a-z0-9_-]{21}$/i,hN=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,dN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pN=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yh,gN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,yN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,_N=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bN=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xN=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,z_="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",wN=new RegExp(`^${z_}$`);function Y_(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);let t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function SN(r){return new RegExp(`^${Y_(r)}$`)}function K_(r){let e=`${z_}T${Y_(r)}`,t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function EN(r,e){return!!((e==="v4"||!e)&&gN.test(r)||(e==="v6"||!e)&&yN.test(r))}function kN(r,e){if(!hN.test(r))return!1;try{let[t]=r.split(".");if(!t)return!1;let i=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(i));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function ON(r,e){return!!((e==="v4"||!e)&&vN.test(r)||(e==="v6"||!e)&&_N.test(r))}var oi=class r extends xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){let s=this._getOrReturnCtx(e);return W(s,{code:D.invalid_type,expected:K.string,received:s.parsedType}),se}let i=new ft,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),W(n,{code:D.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),W(n,{code:D.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?W(n,{code:D.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&W(n,{code:D.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")pN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"email",code:D.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")yh||(yh=new RegExp(mN,"u")),yh.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"emoji",code:D.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")uN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"uuid",code:D.invalid_string,message:s.message}),i.dirty());else if(s.kind==="nanoid")fN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"nanoid",code:D.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")oN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"cuid",code:D.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")lN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"cuid2",code:D.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")cN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"ulid",code:D.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),W(n,{validation:"url",code:D.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"regex",code:D.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),W(n,{code:D.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),W(n,{code:D.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),W(n,{code:D.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?K_(s).test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{code:D.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="date"?wN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{code:D.invalid_string,validation:"date",message:s.message}),i.dirty()):s.kind==="time"?SN(s).test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{code:D.invalid_string,validation:"time",message:s.message}),i.dirty()):s.kind==="duration"?dN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"duration",code:D.invalid_string,message:s.message}),i.dirty()):s.kind==="ip"?EN(e.data,s.version)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"ip",code:D.invalid_string,message:s.message}),i.dirty()):s.kind==="jwt"?kN(e.data,s.alg)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"jwt",code:D.invalid_string,message:s.message}),i.dirty()):s.kind==="cidr"?ON(e.data,s.version)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"cidr",code:D.invalid_string,message:s.message}),i.dirty()):s.kind==="base64"?bN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"base64",code:D.invalid_string,message:s.message}),i.dirty()):s.kind==="base64url"?xN.test(e.data)||(n=this._getOrReturnCtx(e,n),W(n,{validation:"base64url",code:D.invalid_string,message:s.message}),i.dirty()):Ce.assertNever(s);return{status:i.value,value:e.data}}_regex(e,t,i){return this.refinement(n=>e.test(n),{validation:t,code:D.invalid_string,...ee.errToObj(i)})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ee.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ee.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ee.errToObj(e)})}datetime(e){var t,i;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!=null?t:!1,local:(i=e==null?void 0:e.local)!=null?i:!1,...ee.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,...ee.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ee.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...ee.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...ee.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...ee.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...ee.errToObj(t)})}nonempty(e){return this.min(1,ee.errToObj(e))}trim(){return new r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};oi.create=r=>{var e;return new oi({checks:[],typeName:oe.ZodString,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...ge(r)})};function CN(r,e){let t=(r.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=t>i?t:i,s=Number.parseInt(r.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return s%a/10**n}var ji=class r extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){let s=this._getOrReturnCtx(e);return W(s,{code:D.invalid_type,expected:K.number,received:s.parsedType}),se}let i,n=new ft;for(let s of this._def.checks)s.kind==="int"?Ce.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{code:D.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),W(i,{code:D.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),W(i,{code:D.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?CN(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),W(i,{code:D.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),W(i,{code:D.not_finite,message:s.message}),n.dirty()):Ce.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,ee.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ee.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ee.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ee.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:ee.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ce.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(t===null||i.value>t)&&(t=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}};ji.create=r=>new ji({checks:[],typeName:oe.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...ge(r)});var Ui=class r extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let i,n=new ft;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),W(i,{code:D.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),W(i,{code:D.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),W(i,{code:D.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):Ce.assertNever(s);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return W(t,{code:D.invalid_type,expected:K.bigint,received:t.parsedType}),se}gte(e,t){return this.setLimit("min",e,!0,ee.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ee.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ee.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ee.toString(t))}setLimit(e,t,i,n){return new r({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:ee.toString(n)}]})}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};Ui.create=r=>{var e;return new Ui({checks:[],typeName:oe.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!=null?e:!1,...ge(r)})};var $i=class extends xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){let i=this._getOrReturnCtx(e);return W(i,{code:D.invalid_type,expected:K.boolean,received:i.parsedType}),se}return gt(e.data)}};$i.create=r=>new $i({typeName:oe.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...ge(r)});var Vi=class r extends xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){let s=this._getOrReturnCtx(e);return W(s,{code:D.invalid_type,expected:K.date,received:s.parsedType}),se}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return W(s,{code:D.invalid_date}),se}let i=new ft,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),W(n,{code:D.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),W(n,{code:D.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):Ce.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new r({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ee.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ee.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};Vi.create=r=>new Vi({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:oe.ZodDate,...ge(r)});var Gn=class extends xe{_parse(e){if(this._getType(e)!==K.symbol){let i=this._getOrReturnCtx(e);return W(i,{code:D.invalid_type,expected:K.symbol,received:i.parsedType}),se}return gt(e.data)}};Gn.create=r=>new Gn({typeName:oe.ZodSymbol,...ge(r)});var Hi=class extends xe{_parse(e){if(this._getType(e)!==K.undefined){let i=this._getOrReturnCtx(e);return W(i,{code:D.invalid_type,expected:K.undefined,received:i.parsedType}),se}return gt(e.data)}};Hi.create=r=>new Hi({typeName:oe.ZodUndefined,...ge(r)});var Gi=class extends xe{_parse(e){if(this._getType(e)!==K.null){let i=this._getOrReturnCtx(e);return W(i,{code:D.invalid_type,expected:K.null,received:i.parsedType}),se}return gt(e.data)}};Gi.create=r=>new Gi({typeName:oe.ZodNull,...ge(r)});var li=class extends xe{constructor(){super(...arguments),this._any=!0}_parse(e){return gt(e.data)}};li.create=r=>new li({typeName:oe.ZodAny,...ge(r)});var qr=class extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return gt(e.data)}};qr.create=r=>new qr({typeName:oe.ZodUnknown,...ge(r)});var cr=class extends xe{_parse(e){let t=this._getOrReturnCtx(e);return W(t,{code:D.invalid_type,expected:K.never,received:t.parsedType}),se}};cr.create=r=>new cr({typeName:oe.ZodNever,...ge(r)});var Wn=class extends xe{_parse(e){if(this._getType(e)!==K.undefined){let i=this._getOrReturnCtx(e);return W(i,{code:D.invalid_type,expected:K.void,received:i.parsedType}),se}return gt(e.data)}};Wn.create=r=>new Wn({typeName:oe.ZodVoid,...ge(r)});var jr=class r extends xe{_parse(e){let{ctx:t,status:i}=this._processInputParams(e),n=this._def;if(t.parsedType!==K.array)return W(t,{code:D.invalid_type,expected:K.array,received:t.parsedType}),se;if(n.exactLength!==null){let a=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(a||o)&&(W(t,{code:a?D.too_big:D.too_small,minimum:o?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(W(t,{code:D.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(W(t,{code:D.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map((a,o)=>n.type._parseAsync(new Qt(t,a,t.path,o)))).then(a=>ft.mergeArray(i,a));let s=[...t.data].map((a,o)=>n.type._parseSync(new Qt(t,a,t.path,o)));return ft.mergeArray(i,s)}get element(){return this._def.type}min(e,t){return new r({...this._def,minLength:{value:e,message:ee.toString(t)}})}max(e,t){return new r({...this._def,maxLength:{value:e,message:ee.toString(t)}})}length(e,t){return new r({...this._def,exactLength:{value:e,message:ee.toString(t)}})}nonempty(e){return this.min(1,e)}};jr.create=(r,e)=>new jr({type:r,minLength:null,maxLength:null,exactLength:null,typeName:oe.ZodArray,...ge(e)});function Hn(r){if(r instanceof Nt){let e={};for(let t in r.shape){let i=r.shape[t];e[t]=Jt.create(Hn(i))}return new Nt({...r._def,shape:()=>e})}else return r instanceof jr?new jr({...r._def,type:Hn(r.element)}):r instanceof Jt?Jt.create(Hn(r.unwrap())):r instanceof Sr?Sr.create(Hn(r.unwrap())):r instanceof wr?wr.create(r.items.map(e=>Hn(e))):r}var Nt=class r extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Ce.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==K.object){let c=this._getOrReturnCtx(e);return W(c,{code:D.invalid_type,expected:K.object,received:c.parsedType}),se}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof cr&&this._def.unknownKeys==="strip"))for(let c in n.data)a.includes(c)||o.push(c);let l=[];for(let c of a){let u=s[c],f=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Qt(n,f,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof cr){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")o.length>0&&(W(n,{code:D.unrecognized_keys,keys:o}),i.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of o){let f=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Qt(n,f,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let f=await u.key,p=await u.value;c.push({key:f,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>ft.mergeObjectSync(i,c)):ft.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return ee.errToObj,new r({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,i)=>{var s,a,o,l;let n=(o=(a=(s=this._def).errorMap)==null?void 0:a.call(s,t,i).message)!=null?o:i.defaultError;return t.code==="unrecognized_keys"?{message:(l=ee.errToObj(e).message)!=null?l:n}:{message:n}}}:{}})}strip(){return new r({...this._def,unknownKeys:"strip"})}passthrough(){return new r({...this._def,unknownKeys:"passthrough"})}extend(e){return new r({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new r({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:oe.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new r({...this._def,catchall:e})}pick(e){let t={};for(let i of Ce.objectKeys(e))e[i]&&this.shape[i]&&(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}omit(e){let t={};for(let i of Ce.objectKeys(this.shape))e[i]||(t[i]=this.shape[i]);return new r({...this._def,shape:()=>t})}deepPartial(){return Hn(this)}partial(e){let t={};for(let i of Ce.objectKeys(this.shape)){let n=this.shape[i];e&&!e[i]?t[i]=n:t[i]=n.optional()}return new r({...this._def,shape:()=>t})}required(e){let t={};for(let i of Ce.objectKeys(this.shape))if(e&&!e[i])t[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof Jt;)s=s._def.innerType;t[i]=s}return new r({...this._def,shape:()=>t})}keyof(){return Z_(Ce.objectKeys(this.shape))}};Nt.create=(r,e)=>new Nt({shape:()=>r,unknownKeys:"strip",catchall:cr.create(),typeName:oe.ZodObject,...ge(e)});Nt.strictCreate=(r,e)=>new Nt({shape:()=>r,unknownKeys:"strict",catchall:cr.create(),typeName:oe.ZodObject,...ge(e)});Nt.lazycreate=(r,e)=>new Nt({shape:r,unknownKeys:"strip",catchall:cr.create(),typeName:oe.ZodObject,...ge(e)});var Wi=class extends xe{_parse(e){let{ctx:t}=this._processInputParams(e),i=this._def.options;function n(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new It(o.ctx.common.issues));return W(t,{code:D.invalid_union,unionErrors:a}),se}if(t.common.async)return Promise.all(i.map(async s=>{let a={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(n);{let s,a=[];for(let l of i){let c={...t,common:{...t.common,issues:[]},parent:null},u=l._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(l=>new It(l));return W(t,{code:D.invalid_union,unionErrors:o}),se}}get options(){return this._def.options}};Wi.create=(r,e)=>new Wi({options:r,typeName:oe.ZodUnion,...ge(e)});var Fr=r=>r instanceof Yi?Fr(r.schema):r instanceof Xt?Fr(r.innerType()):r instanceof Ki?[r.value]:r instanceof Zi?r.options:r instanceof Ji?Ce.objectValues(r.enum):r instanceof Qi?Fr(r._def.innerType):r instanceof Hi?[void 0]:r instanceof Gi?[null]:r instanceof Jt?[void 0,...Fr(r.unwrap())]:r instanceof Sr?[null,...Fr(r.unwrap())]:r instanceof Qs||r instanceof en?Fr(r.unwrap()):r instanceof Xi?Fr(r._def.innerType):[],pl=class r extends xe{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==K.object)return W(t,{code:D.invalid_type,expected:K.object,received:t.parsedType}),se;let i=this.discriminator,n=t.data[i],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(W(t,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){let n=new Map;for(let s of t){let a=Fr(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,s)}}return new r({typeName:oe.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...ge(i)})}};function _h(r,e){let t=xr(r),i=xr(e);if(r===e)return{valid:!0,data:r};if(t===K.object&&i===K.object){let n=Ce.objectKeys(e),s=Ce.objectKeys(r).filter(o=>n.indexOf(o)!==-1),a={...r,...e};for(let o of s){let l=_h(r[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(t===K.array&&i===K.array){if(r.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<r.length;s++){let a=r[s],o=e[s],l=_h(a,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===K.date&&i===K.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}var zi=class extends xe{_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=(s,a)=>{if(hl(s)||hl(a))return se;let o=_h(s.value,a.value);return o.valid?((dl(s)||dl(a))&&t.dirty(),{status:t.value,value:o.data}):(W(i,{code:D.invalid_intersection_types}),se)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>n(s,a)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};zi.create=(r,e,t)=>new zi({left:r,right:e,typeName:oe.ZodIntersection,...ge(t)});var wr=class r extends xe{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==K.array)return W(i,{code:D.invalid_type,expected:K.array,received:i.parsedType}),se;if(i.data.length<this._def.items.length)return W(i,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),se;!this._def.rest&&i.data.length>this._def.items.length&&(W(i,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...i.data].map((a,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new Qt(i,a,i.path,o)):null}).filter(a=>!!a);return i.common.async?Promise.all(s).then(a=>ft.mergeArray(t,a)):ft.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new r({...this._def,rest:e})}};wr.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wr({items:r,typeName:oe.ZodTuple,rest:null,...ge(e)})};var ml=class r extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==K.object)return W(i,{code:D.invalid_type,expected:K.object,received:i.parsedType}),se;let n=[],s=this._def.keyType,a=this._def.valueType;for(let o in i.data)n.push({key:s._parse(new Qt(i,o,i.path,o)),value:a._parse(new Qt(i,i.data[o],i.path,o)),alwaysSet:o in i.data});return i.common.async?ft.mergeObjectAsync(t,n):ft.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,i){return t instanceof xe?new r({keyType:e,valueType:t,typeName:oe.ZodRecord,...ge(i)}):new r({keyType:oi.create(),valueType:e,typeName:oe.ZodRecord,...ge(t)})}},zn=class extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==K.map)return W(i,{code:D.invalid_type,expected:K.map,received:i.parsedType}),se;let n=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([o,l],c)=>({key:n._parse(new Qt(i,o,i.path,[c,"key"])),value:s._parse(new Qt(i,l,i.path,[c,"value"]))}));if(i.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of a){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return se;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(c.value,u.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let l of a){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return se;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),o.set(c.value,u.value)}return{status:t.value,value:o}}}};zn.create=(r,e,t)=>new zn({valueType:e,keyType:r,typeName:oe.ZodMap,...ge(t)});var Yn=class r extends xe{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==K.set)return W(i,{code:D.invalid_type,expected:K.set,received:i.parsedType}),se;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(W(i,{code:D.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(W(i,{code:D.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function a(l){let c=new Set;for(let u of l){if(u.status==="aborted")return se;u.status==="dirty"&&t.dirty(),c.add(u.value)}return{status:t.value,value:c}}let o=[...i.data.values()].map((l,c)=>s._parse(new Qt(i,l,i.path,c)));return i.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,t){return new r({...this._def,minSize:{value:e,message:ee.toString(t)}})}max(e,t){return new r({...this._def,maxSize:{value:e,message:ee.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Yn.create=(r,e)=>new Yn({valueType:r,minSize:null,maxSize:null,typeName:oe.ZodSet,...ge(e)});var gl=class r extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==K.function)return W(t,{code:D.invalid_type,expected:K.function,received:t.parsedType}),se;function i(o,l){return Js({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,$n(),Dr].filter(c=>!!c),issueData:{code:D.invalid_arguments,argumentsError:l}})}function n(o,l){return Js({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,$n(),Dr].filter(c=>!!c),issueData:{code:D.invalid_return_type,returnTypeError:l}})}let s={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ci){let o=this;return gt(async function(...l){let c=new It([]),u=await o._def.args.parseAsync(l,s).catch(m=>{throw c.addIssue(i(l,m)),c}),f=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(f,s).catch(m=>{throw c.addIssue(n(f,m)),c})})}else{let o=this;return gt(function(...l){let c=o._def.args.safeParse(l,s);if(!c.success)throw new It([i(l,c.error)]);let u=Reflect.apply(a,this,c.data),f=o._def.returns.safeParse(u,s);if(!f.success)throw new It([n(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new r({...this._def,args:wr.create(e).rest(qr.create())})}returns(e){return new r({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new r({args:e||wr.create([]).rest(qr.create()),returns:t||qr.create(),typeName:oe.ZodFunction,...ge(i)})}},Yi=class extends xe{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Yi.create=(r,e)=>new Yi({getter:r,typeName:oe.ZodLazy,...ge(e)});var Ki=class extends xe{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return W(t,{received:t.data,code:D.invalid_literal,expected:this._def.value}),se}return{status:"valid",value:e.data}}get value(){return this._def.value}};Ki.create=(r,e)=>new Ki({value:r,typeName:oe.ZodLiteral,...ge(e)});function Z_(r,e){return new Zi({values:r,typeName:oe.ZodEnum,...ge(e)})}var Zi=class r extends xe{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),i=this._def.values;return W(t,{expected:Ce.joinValues(i),received:t.parsedType,code:D.invalid_type}),se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),i=this._def.values;return W(t,{received:t.data,code:D.invalid_enum_value,options:i}),se}return gt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return r.create(e,{...this._def,...t})}exclude(e,t=this._def){return r.create(this.options.filter(i=>!e.includes(i)),{...this._def,...t})}};Zi.create=Z_;var Ji=class extends xe{_parse(e){let t=Ce.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==K.string&&i.parsedType!==K.number){let n=Ce.objectValues(t);return W(i,{expected:Ce.joinValues(n),received:i.parsedType,code:D.invalid_type}),se}if(this._cache||(this._cache=new Set(Ce.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let n=Ce.objectValues(t);return W(i,{received:i.data,code:D.invalid_enum_value,options:n}),se}return gt(e.data)}get enum(){return this._def.values}};Ji.create=(r,e)=>new Ji({values:r,typeName:oe.ZodNativeEnum,...ge(e)});var ci=class extends xe{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==K.promise&&t.common.async===!1)return W(t,{code:D.invalid_type,expected:K.promise,received:t.parsedType}),se;let i=t.parsedType===K.promise?t.data:Promise.resolve(t.data);return gt(i.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};ci.create=(r,e)=>new ci({type:r,typeName:oe.ZodPromise,...ge(e)});var Xt=class extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:a=>{W(i,a),a.fatal?t.abort():t.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let a=n.transform(i.data,s);if(i.common.async)return Promise.resolve(a).then(async o=>{if(t.value==="aborted")return se;let l=await this._def.schema._parseAsync({data:o,path:i.path,parent:i});return l.status==="aborted"?se:l.status==="dirty"?qi(l.value):t.value==="dirty"?qi(l.value):l});{if(t.value==="aborted")return se;let o=this._def.schema._parseSync({data:a,path:i.path,parent:i});return o.status==="aborted"?se:o.status==="dirty"?qi(o.value):t.value==="dirty"?qi(o.value):o}}if(n.type==="refinement"){let a=o=>{let l=n.refinement(o,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?se:(o.status==="dirty"&&t.dirty(),a(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>o.status==="aborted"?se:(o.status==="dirty"&&t.dirty(),a(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ai(a))return se;let o=n.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>ai(a)?Promise.resolve(n.transform(a.value,s)).then(o=>({status:t.value,value:o})):se);Ce.assertNever(n)}};Xt.create=(r,e,t)=>new Xt({schema:r,typeName:oe.ZodEffects,effect:e,...ge(t)});Xt.createWithPreprocess=(r,e,t)=>new Xt({schema:e,effect:{type:"preprocess",transform:r},typeName:oe.ZodEffects,...ge(t)});var Jt=class extends xe{_parse(e){return this._getType(e)===K.undefined?gt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Jt.create=(r,e)=>new Jt({innerType:r,typeName:oe.ZodOptional,...ge(e)});var Sr=class extends xe{_parse(e){return this._getType(e)===K.null?gt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Sr.create=(r,e)=>new Sr({innerType:r,typeName:oe.ZodNullable,...ge(e)});var Qi=class extends xe{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return t.parsedType===K.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Qi.create=(r,e)=>new Qi({innerType:r,typeName:oe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ge(e)});var Xi=class extends xe{_parse(e){let{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Vn(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new It(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Xi.create=(r,e)=>new Xi({innerType:r,typeName:oe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ge(e)});var Kn=class extends xe{_parse(e){if(this._getType(e)!==K.nan){let i=this._getOrReturnCtx(e);return W(i,{code:D.invalid_type,expected:K.nan,received:i.parsedType}),se}return{status:"valid",value:e.data}}};Kn.create=r=>new Kn({typeName:oe.ZodNaN,...ge(r)});var TN=Symbol("zod_brand"),Qs=class extends xe{_parse(e){let{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}},Xs=class r extends xe{_parse(e){let{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?se:s.status==="dirty"?(t.dirty(),qi(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?se:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,t){return new r({in:e,out:t,typeName:oe.ZodPipeline})}},en=class extends xe{_parse(e){let t=this._def.innerType._parse(e),i=n=>(ai(n)&&(n.value=Object.freeze(n.value)),n);return Vn(t)?t.then(n=>i(n)):i(t)}unwrap(){return this._def.innerType}};en.create=(r,e)=>new en({innerType:r,typeName:oe.ZodReadonly,...ge(e)});function W_(r,e){let t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function J_(r,e={},t){return r?li.create().superRefine((i,n)=>{var a,o;let s=r(i);if(s instanceof Promise)return s.then(l=>{var c,u;if(!l){let f=W_(e,i),p=(u=(c=f.fatal)!=null?c:t)!=null?u:!0;n.addIssue({code:"custom",...f,fatal:p})}});if(!s){let l=W_(e,i),c=(o=(a=l.fatal)!=null?a:t)!=null?o:!0;n.addIssue({code:"custom",...l,fatal:c})}}):li.create()}var AN={object:Nt.lazycreate},oe;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(oe||(oe={}));var IN=(r,e={message:`Input not instance of ${r.name}`})=>J_(t=>t instanceof r,e),Q_=oi.create,X_=ji.create,NN=Kn.create,LN=Ui.create,eb=$i.create,BN=Vi.create,RN=Gn.create,PN=Hi.create,MN=Gi.create,DN=li.create,FN=qr.create,qN=cr.create,jN=Wn.create,UN=jr.create,$N=Nt.create,VN=Nt.strictCreate,HN=Wi.create,GN=pl.create,WN=zi.create,zN=wr.create,YN=ml.create,KN=zn.create,ZN=Yn.create,JN=gl.create,QN=Yi.create,XN=Ki.create,e2=Zi.create,t2=Ji.create,r2=ci.create,i2=Xt.create,n2=Jt.create,s2=Sr.create,a2=Xt.createWithPreprocess,o2=Xs.create,l2=()=>Q_().optional(),c2=()=>X_().optional(),u2=()=>eb().optional(),f2={string:(r=>oi.create({...r,coerce:!0})),number:(r=>ji.create({...r,coerce:!0})),boolean:(r=>$i.create({...r,coerce:!0})),bigint:(r=>Ui.create({...r,coerce:!0})),date:(r=>Vi.create({...r,coerce:!0}))};var h2=se;var tb=bh;var B2=Lb.default,R2=Bb.default,P2=Gl,M2=Rb.default,D2=Pb.default,F2=Nb(),q2=F2,j2=Mb.default,U2=Db.default,$2=Fb.default,V2=qb.default,H2=ty,G2=Pu.default,W2=Bu.default,z2=Ru.default,Y2=jb.default,K2=tb;0&&(module.exports={HttpsProxyAgent,PNG,ProgramOption,SocksProxyAgent,colors,debug,diff,dotenv,getProxyForUrl,jpegjs,lockfile,mime,minimatch,open,program,progress,ws,wsReceiver,wsSender,wsServer,yaml,zod});
205
+ `}function ol(i,e,t,r,n,s,o){if(typeof o=="function"&&(o={callback:o}),o!=null&&o.callback){let{callback:a}=o;Ns(i,e,t,r,n,s,Object.assign(Object.assign({},o),{callback:l=>{a(l?cn(l,o.headerOptions):void 0)}}))}else{let a=Ns(i,e,t,r,n,s,o);return a?cn(a,o==null?void 0:o.headerOptions):void 0}}function Xh(i,e,t,r,n,s){return ol(i,i,e,t,r,n,s)}function Q_(i){let e=i.endsWith(`
206
+ `),t=i.split(`
207
+ `).map(r=>r+`
208
+ `);return e?t.pop():t.push(t.pop().slice(0,-1)),t}function ep(i){let e=[],t,r;for(let n=0;n<i.length;n++)t=i[n],t.added?r=1:t.removed?r=-1:r=0,e.push([r,t.value]);return e}function tp(i){let e=[];for(let t=0;t<i.length;t++){let r=i[t];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(X_(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}function X_(i){let e=i;return e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/"/g,"&quot;"),e}var Rb=He(op());var mw={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function gw(i){try{return new URL(i)}catch{return null}}function ap(i){var e=(typeof i=="string"?gw(i):i)||{},t=e.protocol,r=e.host,n=e.port;if(typeof r!="string"||!r||typeof t!="string"||(t=t.split(":",1)[0],r=r.replace(/:\d*$/,""),n=parseInt(n)||mw[t]||0,!yw(r,n)))return"";var s=fl(t+"_proxy")||fl("all_proxy");return s&&s.indexOf("://")===-1&&(s=t+"://"+s),s}function yw(i,e){var t=fl("no_proxy").toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),s=n?n[1]:r,o=n?parseInt(n[2]):0;return o&&o!==e?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!i.endsWith(s)):i!==s}):!0}function fl(i){return process.env[i.toLowerCase()]||process.env[i.toUpperCase()]||""}var $b=He(_p()),Mb=He(Cp()),Db=He(Rp()),qb=He(id()),Fb=He(gd()),Vb=He(fm());var Em=He(Sm(),1),{program:Om,createCommand:xN,createArgument:SN,createOption:EN,CommanderError:ON,InvalidArgumentError:kN,InvalidOptionArgumentError:CN,Command:TN,Argument:AN,Option:km,Help:IN}=Em.default;var jb=He(Nm()),Hb=He(fg());var tO=He(mg(),1),zc=He(qc(),1),Jc=He(jc(),1),p0=He(Yc(),1),Zc=He(h0(),1);var d0=p0.default;var Ub=He(ib()),zA=Lb.default,JA=Pb.default,QA=ZA,XA=al,eI=Rb.default,tI=Mb.default,iI=Bb(),rI=iI,nI=Db.default,sI=qb.default,oI=Fb.default,aI=jb.default,lI=d0,cI=Zc.default,uI=zc.default,fI=Jc.default,hI=Ub.default;0&&(module.exports={HttpsProxyAgent,PNG,ProgramOption,SocksProxyAgent,colors,debug,diff,dotenv,getProxyForUrl,ini,jpegjs,lockfile,mime,minimatch,open,program,progress,ws,wsReceiver,wsSender,wsServer,yaml});
210
209
  /*! Bundled license information:
211
210
 
212
211
  progress/lib/node-progress.js: