@northflank/js-client 0.7.0 → 0.7.1-beta.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 (359) hide show
  1. package/dist/cjs/api-client.d.ts +7267 -2476
  2. package/dist/cjs/api-client.js +1 -1
  3. package/dist/esm/api-client.d.ts +7267 -2476
  4. package/dist/esm/api-client.js +1 -15
  5. package/package.json +1 -1
  6. package/dist/cjs/api-endpoint.d.ts +0 -57
  7. package/dist/cjs/api-error.d.ts +0 -16
  8. package/dist/cjs/context/api-client-context-provider.d.ts +0 -47
  9. package/dist/cjs/context/api-client-file-context-provider.d.ts +0 -11
  10. package/dist/cjs/context/api-client-in-memory-context-provider.d.ts +0 -6
  11. package/dist/cjs/context/index.d.ts +0 -3
  12. package/dist/cjs/endpoints/abort/addon/backup.d.ts +0 -21
  13. package/dist/cjs/endpoints/abort/addon/restore.d.ts +0 -26
  14. package/dist/cjs/endpoints/abort/job/build.d.ts +0 -21
  15. package/dist/cjs/endpoints/abort/job/run.d.ts +0 -21
  16. package/dist/cjs/endpoints/abort/service/build.d.ts +0 -21
  17. package/dist/cjs/endpoints/add/domain/subdomain.d.ts +0 -33
  18. package/dist/cjs/endpoints/add/registry.d.ts +0 -47
  19. package/dist/cjs/endpoints/assign/subdomain/service.d.ts +0 -28
  20. package/dist/cjs/endpoints/attach/volume.d.ts +0 -29
  21. package/dist/cjs/endpoints/backup/addon.d.ts +0 -51
  22. package/dist/cjs/endpoints/create/addon/backupSchedule.d.ts +0 -40
  23. package/dist/cjs/endpoints/create/addon.d.ts +0 -101
  24. package/dist/cjs/endpoints/create/cluster.d.ts +0 -97
  25. package/dist/cjs/endpoints/create/domain.d.ts +0 -27
  26. package/dist/cjs/endpoints/create/integration.d.ts +0 -58
  27. package/dist/cjs/endpoints/create/job/cron.d.ts +0 -247
  28. package/dist/cjs/endpoints/create/job/manual.d.ts +0 -237
  29. package/dist/cjs/endpoints/create/project.d.ts +0 -31
  30. package/dist/cjs/endpoints/create/secret.d.ts +0 -83
  31. package/dist/cjs/endpoints/create/service/build.d.ts +0 -161
  32. package/dist/cjs/endpoints/create/service/combined.d.ts +0 -255
  33. package/dist/cjs/endpoints/create/service/deployment.d.ts +0 -242
  34. package/dist/cjs/endpoints/create/template.d.ts +0 -132
  35. package/dist/cjs/endpoints/create/volume.d.ts +0 -78
  36. package/dist/cjs/endpoints/delete/addon/backupSchedule.d.ts +0 -21
  37. package/dist/cjs/endpoints/delete/addon.d.ts +0 -19
  38. package/dist/cjs/endpoints/delete/backup.d.ts +0 -21
  39. package/dist/cjs/endpoints/delete/cluster.d.ts +0 -17
  40. package/dist/cjs/endpoints/delete/domain.d.ts +0 -17
  41. package/dist/cjs/endpoints/delete/integration.d.ts +0 -17
  42. package/dist/cjs/endpoints/delete/job.d.ts +0 -19
  43. package/dist/cjs/endpoints/delete/project.d.ts +0 -17
  44. package/dist/cjs/endpoints/delete/registry.d.ts +0 -17
  45. package/dist/cjs/endpoints/delete/secret.d.ts +0 -19
  46. package/dist/cjs/endpoints/delete/secretLink.d.ts +0 -21
  47. package/dist/cjs/endpoints/delete/service.d.ts +0 -19
  48. package/dist/cjs/endpoints/delete/subdomain.d.ts +0 -19
  49. package/dist/cjs/endpoints/delete/template.d.ts +0 -17
  50. package/dist/cjs/endpoints/delete/volume.d.ts +0 -19
  51. package/dist/cjs/endpoints/detach/volume.d.ts +0 -21
  52. package/dist/cjs/endpoints/get/addon/backup/download.d.ts +0 -24
  53. package/dist/cjs/endpoints/get/addon/backup.d.ts +0 -46
  54. package/dist/cjs/endpoints/get/addon/backupSchedules.d.ts +0 -52
  55. package/dist/cjs/endpoints/get/addon/backups.d.ts +0 -54
  56. package/dist/cjs/endpoints/get/addon/containers.d.ts +0 -40
  57. package/dist/cjs/endpoints/get/addon/credentials.d.ts +0 -24
  58. package/dist/cjs/endpoints/get/addon/types.d.ts +0 -48
  59. package/dist/cjs/endpoints/get/addon/version.d.ts +0 -53
  60. package/dist/cjs/endpoints/get/addon.d.ts +0 -71
  61. package/dist/cjs/endpoints/get/cluster.d.ts +0 -55
  62. package/dist/cjs/endpoints/get/dnsId.d.ts +0 -15
  63. package/dist/cjs/endpoints/get/domain.d.ts +0 -33
  64. package/dist/cjs/endpoints/get/integration.d.ts +0 -37
  65. package/dist/cjs/endpoints/get/invoice/details.d.ts +0 -139
  66. package/dist/cjs/endpoints/get/job/branches.d.ts +0 -49
  67. package/dist/cjs/endpoints/get/job/build.d.ts +0 -42
  68. package/dist/cjs/endpoints/get/job/buildArgumentDetails.d.ts +0 -71
  69. package/dist/cjs/endpoints/get/job/buildArguments.d.ts +0 -29
  70. package/dist/cjs/endpoints/get/job/builds.d.ts +0 -52
  71. package/dist/cjs/endpoints/get/job/containers.d.ts +0 -40
  72. package/dist/cjs/endpoints/get/job/deployment.d.ts +0 -55
  73. package/dist/cjs/endpoints/get/job/healthChecks.d.ts +0 -45
  74. package/dist/cjs/endpoints/get/job/pullRequests.d.ts +0 -49
  75. package/dist/cjs/endpoints/get/job/run.d.ts +0 -44
  76. package/dist/cjs/endpoints/get/job/runs.d.ts +0 -54
  77. package/dist/cjs/endpoints/get/job/runtimeEnvironment.d.ts +0 -29
  78. package/dist/cjs/endpoints/get/job/runtimeEnvironmentDetails.d.ts +0 -71
  79. package/dist/cjs/endpoints/get/job.d.ts +0 -128
  80. package/dist/cjs/endpoints/get/project.d.ts +0 -72
  81. package/dist/cjs/endpoints/get/registry.d.ts +0 -34
  82. package/dist/cjs/endpoints/get/secret.d.ts +0 -55
  83. package/dist/cjs/endpoints/get/secretDetails.d.ts +0 -63
  84. package/dist/cjs/endpoints/get/secretLink.d.ts +0 -44
  85. package/dist/cjs/endpoints/get/service/branches.d.ts +0 -49
  86. package/dist/cjs/endpoints/get/service/build.d.ts +0 -42
  87. package/dist/cjs/endpoints/get/service/buildArgumentDetails.d.ts +0 -71
  88. package/dist/cjs/endpoints/get/service/buildArguments.d.ts +0 -29
  89. package/dist/cjs/endpoints/get/service/builds.d.ts +0 -52
  90. package/dist/cjs/endpoints/get/service/containers.d.ts +0 -40
  91. package/dist/cjs/endpoints/get/service/deployment.d.ts +0 -55
  92. package/dist/cjs/endpoints/get/service/healthChecks.d.ts +0 -45
  93. package/dist/cjs/endpoints/get/service/ports.d.ts +0 -70
  94. package/dist/cjs/endpoints/get/service/pullRequests.d.ts +0 -49
  95. package/dist/cjs/endpoints/get/service/runtimeEnvironment.d.ts +0 -29
  96. package/dist/cjs/endpoints/get/service/runtimeEnvironmentDetails.d.ts +0 -71
  97. package/dist/cjs/endpoints/get/service.d.ts +0 -211
  98. package/dist/cjs/endpoints/get/subdomain.d.ts +0 -30
  99. package/dist/cjs/endpoints/get/template.d.ts +0 -61
  100. package/dist/cjs/endpoints/get/templateRun.d.ts +0 -73
  101. package/dist/cjs/endpoints/get/volume.d.ts +0 -49
  102. package/dist/cjs/endpoints/import/addon/backup.d.ts +0 -31
  103. package/dist/cjs/endpoints/list/addons.d.ts +0 -45
  104. package/dist/cjs/endpoints/list/branches.d.ts +0 -51
  105. package/dist/cjs/endpoints/list/clusters.d.ts +0 -63
  106. package/dist/cjs/endpoints/list/domains.d.ts +0 -34
  107. package/dist/cjs/endpoints/list/integrations.d.ts +0 -36
  108. package/dist/cjs/endpoints/list/invoices.d.ts +0 -40
  109. package/dist/cjs/endpoints/list/jobs.d.ts +0 -46
  110. package/dist/cjs/endpoints/list/plans.d.ts +0 -30
  111. package/dist/cjs/endpoints/list/projects.d.ts +0 -32
  112. package/dist/cjs/endpoints/list/providers.d.ts +0 -37
  113. package/dist/cjs/endpoints/list/regions.d.ts +0 -18
  114. package/dist/cjs/endpoints/list/registries.d.ts +0 -41
  115. package/dist/cjs/endpoints/list/repos.d.ts +0 -51
  116. package/dist/cjs/endpoints/list/secrets.d.ts +0 -54
  117. package/dist/cjs/endpoints/list/services.d.ts +0 -65
  118. package/dist/cjs/endpoints/list/templateRuns.d.ts +0 -54
  119. package/dist/cjs/endpoints/list/templates.d.ts +0 -41
  120. package/dist/cjs/endpoints/list/vcs.d.ts +0 -32
  121. package/dist/cjs/endpoints/list/volumes.d.ts +0 -47
  122. package/dist/cjs/endpoints/pause/addon.d.ts +0 -19
  123. package/dist/cjs/endpoints/pause/job.d.ts +0 -19
  124. package/dist/cjs/endpoints/pause/service.d.ts +0 -19
  125. package/dist/cjs/endpoints/restart/addon.d.ts +0 -19
  126. package/dist/cjs/endpoints/restart/service.d.ts +0 -19
  127. package/dist/cjs/endpoints/restore/addon/backup.d.ts +0 -24
  128. package/dist/cjs/endpoints/resume/addon.d.ts +0 -19
  129. package/dist/cjs/endpoints/resume/job.d.ts +0 -28
  130. package/dist/cjs/endpoints/resume/service.d.ts +0 -28
  131. package/dist/cjs/endpoints/retain/addon/backup.d.ts +0 -21
  132. package/dist/cjs/endpoints/run/template.d.ts +0 -62
  133. package/dist/cjs/endpoints/scale/addon.d.ts +0 -28
  134. package/dist/cjs/endpoints/scale/job.d.ts +0 -30
  135. package/dist/cjs/endpoints/scale/service.d.ts +0 -32
  136. package/dist/cjs/endpoints/start/job/build.d.ts +0 -47
  137. package/dist/cjs/endpoints/start/job/run.d.ts +0 -74
  138. package/dist/cjs/endpoints/start/service/build.d.ts +0 -55
  139. package/dist/cjs/endpoints/suspend/job.d.ts +0 -24
  140. package/dist/cjs/endpoints/unassign/subdomain.d.ts +0 -19
  141. package/dist/cjs/endpoints/update/addon/networkSettings.d.ts +0 -26
  142. package/dist/cjs/endpoints/update/addon/security.d.ts +0 -29
  143. package/dist/cjs/endpoints/update/addon/version.d.ts +0 -24
  144. package/dist/cjs/endpoints/update/cluster.d.ts +0 -76
  145. package/dist/cjs/endpoints/update/integration.d.ts +0 -53
  146. package/dist/cjs/endpoints/update/job/buildArguments.d.ts +0 -29
  147. package/dist/cjs/endpoints/update/job/buildOptions.d.ts +0 -50
  148. package/dist/cjs/endpoints/update/job/buildSource.d.ts +0 -32
  149. package/dist/cjs/endpoints/update/job/cmdOverride.d.ts +0 -24
  150. package/dist/cjs/endpoints/update/job/deployment.d.ts +0 -39
  151. package/dist/cjs/endpoints/update/job/entrypointOverride.d.ts +0 -24
  152. package/dist/cjs/endpoints/update/job/healthChecks.d.ts +0 -45
  153. package/dist/cjs/endpoints/update/job/runtimeEnvironment.d.ts +0 -29
  154. package/dist/cjs/endpoints/update/job/settings.d.ts +0 -32
  155. package/dist/cjs/endpoints/update/registry.d.ts +0 -31
  156. package/dist/cjs/endpoints/update/secret.d.ts +0 -58
  157. package/dist/cjs/endpoints/update/secretLink.d.ts +0 -40
  158. package/dist/cjs/endpoints/update/service/buildArguments.d.ts +0 -29
  159. package/dist/cjs/endpoints/update/service/buildOptions.d.ts +0 -62
  160. package/dist/cjs/endpoints/update/service/buildSource.d.ts +0 -32
  161. package/dist/cjs/endpoints/update/service/cmdOverride.d.ts +0 -24
  162. package/dist/cjs/endpoints/update/service/deployment.d.ts +0 -39
  163. package/dist/cjs/endpoints/update/service/entrypointOverride.d.ts +0 -24
  164. package/dist/cjs/endpoints/update/service/healthChecks.d.ts +0 -45
  165. package/dist/cjs/endpoints/update/service/ports.d.ts +0 -57
  166. package/dist/cjs/endpoints/update/service/runtimeEnvironment.d.ts +0 -34
  167. package/dist/cjs/endpoints/update/template.d.ts +0 -81
  168. package/dist/cjs/endpoints/update/volume.d.ts +0 -33
  169. package/dist/cjs/endpoints/verify/domain.d.ts +0 -17
  170. package/dist/cjs/endpoints/verify/subdomain.d.ts +0 -19
  171. package/dist/cjs/exec-command/client/exec-command-runner.d.ts +0 -70
  172. package/dist/cjs/exec-command/client/exec-command-standard.d.ts +0 -42
  173. package/dist/cjs/port-forward/client/api-helper.d.ts +0 -30
  174. package/dist/cjs/port-forward/client/atomic-write.d.ts +0 -2
  175. package/dist/cjs/port-forward/client/host-file-ast.d.ts +0 -52
  176. package/dist/cjs/port-forward/client/host-file.d.ts +0 -26
  177. package/dist/cjs/port-forward/client/loopback.d.ts +0 -4
  178. package/dist/cjs/port-forward/client/port-forwarder.d.ts +0 -87
  179. package/dist/cjs/port-forward/client/port-tunnel-tcp.d.ts +0 -36
  180. package/dist/cjs/port-forward/client/port-tunnel-udp.d.ts +0 -27
  181. package/dist/cjs/port-forward/client/promise-mutex.d.ts +0 -4
  182. package/dist/cjs/utils.d.ts +0 -21
  183. package/dist/esm/api-endpoint.d.ts +0 -57
  184. package/dist/esm/api-error.d.ts +0 -16
  185. package/dist/esm/context/api-client-context-provider.d.ts +0 -47
  186. package/dist/esm/context/api-client-file-context-provider.d.ts +0 -11
  187. package/dist/esm/context/api-client-in-memory-context-provider.d.ts +0 -6
  188. package/dist/esm/context/index.d.ts +0 -3
  189. package/dist/esm/endpoints/abort/addon/backup.d.ts +0 -21
  190. package/dist/esm/endpoints/abort/addon/restore.d.ts +0 -26
  191. package/dist/esm/endpoints/abort/job/build.d.ts +0 -21
  192. package/dist/esm/endpoints/abort/job/run.d.ts +0 -21
  193. package/dist/esm/endpoints/abort/service/build.d.ts +0 -21
  194. package/dist/esm/endpoints/add/domain/subdomain.d.ts +0 -33
  195. package/dist/esm/endpoints/add/registry.d.ts +0 -47
  196. package/dist/esm/endpoints/assign/subdomain/service.d.ts +0 -28
  197. package/dist/esm/endpoints/attach/volume.d.ts +0 -29
  198. package/dist/esm/endpoints/backup/addon.d.ts +0 -51
  199. package/dist/esm/endpoints/create/addon/backupSchedule.d.ts +0 -40
  200. package/dist/esm/endpoints/create/addon.d.ts +0 -101
  201. package/dist/esm/endpoints/create/cluster.d.ts +0 -97
  202. package/dist/esm/endpoints/create/domain.d.ts +0 -27
  203. package/dist/esm/endpoints/create/integration.d.ts +0 -58
  204. package/dist/esm/endpoints/create/job/cron.d.ts +0 -247
  205. package/dist/esm/endpoints/create/job/manual.d.ts +0 -237
  206. package/dist/esm/endpoints/create/project.d.ts +0 -31
  207. package/dist/esm/endpoints/create/secret.d.ts +0 -83
  208. package/dist/esm/endpoints/create/service/build.d.ts +0 -161
  209. package/dist/esm/endpoints/create/service/combined.d.ts +0 -255
  210. package/dist/esm/endpoints/create/service/deployment.d.ts +0 -242
  211. package/dist/esm/endpoints/create/template.d.ts +0 -132
  212. package/dist/esm/endpoints/create/volume.d.ts +0 -78
  213. package/dist/esm/endpoints/delete/addon/backupSchedule.d.ts +0 -21
  214. package/dist/esm/endpoints/delete/addon.d.ts +0 -19
  215. package/dist/esm/endpoints/delete/backup.d.ts +0 -21
  216. package/dist/esm/endpoints/delete/cluster.d.ts +0 -17
  217. package/dist/esm/endpoints/delete/domain.d.ts +0 -17
  218. package/dist/esm/endpoints/delete/integration.d.ts +0 -17
  219. package/dist/esm/endpoints/delete/job.d.ts +0 -19
  220. package/dist/esm/endpoints/delete/project.d.ts +0 -17
  221. package/dist/esm/endpoints/delete/registry.d.ts +0 -17
  222. package/dist/esm/endpoints/delete/secret.d.ts +0 -19
  223. package/dist/esm/endpoints/delete/secretLink.d.ts +0 -21
  224. package/dist/esm/endpoints/delete/service.d.ts +0 -19
  225. package/dist/esm/endpoints/delete/subdomain.d.ts +0 -19
  226. package/dist/esm/endpoints/delete/template.d.ts +0 -17
  227. package/dist/esm/endpoints/delete/volume.d.ts +0 -19
  228. package/dist/esm/endpoints/detach/volume.d.ts +0 -21
  229. package/dist/esm/endpoints/get/addon/backup/download.d.ts +0 -24
  230. package/dist/esm/endpoints/get/addon/backup.d.ts +0 -46
  231. package/dist/esm/endpoints/get/addon/backupSchedules.d.ts +0 -52
  232. package/dist/esm/endpoints/get/addon/backups.d.ts +0 -54
  233. package/dist/esm/endpoints/get/addon/containers.d.ts +0 -40
  234. package/dist/esm/endpoints/get/addon/credentials.d.ts +0 -24
  235. package/dist/esm/endpoints/get/addon/types.d.ts +0 -48
  236. package/dist/esm/endpoints/get/addon/version.d.ts +0 -53
  237. package/dist/esm/endpoints/get/addon.d.ts +0 -71
  238. package/dist/esm/endpoints/get/cluster.d.ts +0 -55
  239. package/dist/esm/endpoints/get/dnsId.d.ts +0 -15
  240. package/dist/esm/endpoints/get/domain.d.ts +0 -33
  241. package/dist/esm/endpoints/get/integration.d.ts +0 -37
  242. package/dist/esm/endpoints/get/invoice/details.d.ts +0 -139
  243. package/dist/esm/endpoints/get/job/branches.d.ts +0 -49
  244. package/dist/esm/endpoints/get/job/build.d.ts +0 -42
  245. package/dist/esm/endpoints/get/job/buildArgumentDetails.d.ts +0 -71
  246. package/dist/esm/endpoints/get/job/buildArguments.d.ts +0 -29
  247. package/dist/esm/endpoints/get/job/builds.d.ts +0 -52
  248. package/dist/esm/endpoints/get/job/containers.d.ts +0 -40
  249. package/dist/esm/endpoints/get/job/deployment.d.ts +0 -55
  250. package/dist/esm/endpoints/get/job/healthChecks.d.ts +0 -45
  251. package/dist/esm/endpoints/get/job/pullRequests.d.ts +0 -49
  252. package/dist/esm/endpoints/get/job/run.d.ts +0 -44
  253. package/dist/esm/endpoints/get/job/runs.d.ts +0 -54
  254. package/dist/esm/endpoints/get/job/runtimeEnvironment.d.ts +0 -29
  255. package/dist/esm/endpoints/get/job/runtimeEnvironmentDetails.d.ts +0 -71
  256. package/dist/esm/endpoints/get/job.d.ts +0 -128
  257. package/dist/esm/endpoints/get/project.d.ts +0 -72
  258. package/dist/esm/endpoints/get/registry.d.ts +0 -34
  259. package/dist/esm/endpoints/get/secret.d.ts +0 -55
  260. package/dist/esm/endpoints/get/secretDetails.d.ts +0 -63
  261. package/dist/esm/endpoints/get/secretLink.d.ts +0 -44
  262. package/dist/esm/endpoints/get/service/branches.d.ts +0 -49
  263. package/dist/esm/endpoints/get/service/build.d.ts +0 -42
  264. package/dist/esm/endpoints/get/service/buildArgumentDetails.d.ts +0 -71
  265. package/dist/esm/endpoints/get/service/buildArguments.d.ts +0 -29
  266. package/dist/esm/endpoints/get/service/builds.d.ts +0 -52
  267. package/dist/esm/endpoints/get/service/containers.d.ts +0 -40
  268. package/dist/esm/endpoints/get/service/deployment.d.ts +0 -55
  269. package/dist/esm/endpoints/get/service/healthChecks.d.ts +0 -45
  270. package/dist/esm/endpoints/get/service/ports.d.ts +0 -70
  271. package/dist/esm/endpoints/get/service/pullRequests.d.ts +0 -49
  272. package/dist/esm/endpoints/get/service/runtimeEnvironment.d.ts +0 -29
  273. package/dist/esm/endpoints/get/service/runtimeEnvironmentDetails.d.ts +0 -71
  274. package/dist/esm/endpoints/get/service.d.ts +0 -211
  275. package/dist/esm/endpoints/get/subdomain.d.ts +0 -30
  276. package/dist/esm/endpoints/get/template.d.ts +0 -61
  277. package/dist/esm/endpoints/get/templateRun.d.ts +0 -73
  278. package/dist/esm/endpoints/get/volume.d.ts +0 -49
  279. package/dist/esm/endpoints/import/addon/backup.d.ts +0 -31
  280. package/dist/esm/endpoints/list/addons.d.ts +0 -45
  281. package/dist/esm/endpoints/list/branches.d.ts +0 -51
  282. package/dist/esm/endpoints/list/clusters.d.ts +0 -63
  283. package/dist/esm/endpoints/list/domains.d.ts +0 -34
  284. package/dist/esm/endpoints/list/integrations.d.ts +0 -36
  285. package/dist/esm/endpoints/list/invoices.d.ts +0 -40
  286. package/dist/esm/endpoints/list/jobs.d.ts +0 -46
  287. package/dist/esm/endpoints/list/plans.d.ts +0 -30
  288. package/dist/esm/endpoints/list/projects.d.ts +0 -32
  289. package/dist/esm/endpoints/list/providers.d.ts +0 -37
  290. package/dist/esm/endpoints/list/regions.d.ts +0 -18
  291. package/dist/esm/endpoints/list/registries.d.ts +0 -41
  292. package/dist/esm/endpoints/list/repos.d.ts +0 -51
  293. package/dist/esm/endpoints/list/secrets.d.ts +0 -54
  294. package/dist/esm/endpoints/list/services.d.ts +0 -65
  295. package/dist/esm/endpoints/list/templateRuns.d.ts +0 -54
  296. package/dist/esm/endpoints/list/templates.d.ts +0 -41
  297. package/dist/esm/endpoints/list/vcs.d.ts +0 -32
  298. package/dist/esm/endpoints/list/volumes.d.ts +0 -47
  299. package/dist/esm/endpoints/pause/addon.d.ts +0 -19
  300. package/dist/esm/endpoints/pause/job.d.ts +0 -19
  301. package/dist/esm/endpoints/pause/service.d.ts +0 -19
  302. package/dist/esm/endpoints/restart/addon.d.ts +0 -19
  303. package/dist/esm/endpoints/restart/service.d.ts +0 -19
  304. package/dist/esm/endpoints/restore/addon/backup.d.ts +0 -24
  305. package/dist/esm/endpoints/resume/addon.d.ts +0 -19
  306. package/dist/esm/endpoints/resume/job.d.ts +0 -28
  307. package/dist/esm/endpoints/resume/service.d.ts +0 -28
  308. package/dist/esm/endpoints/retain/addon/backup.d.ts +0 -21
  309. package/dist/esm/endpoints/run/template.d.ts +0 -62
  310. package/dist/esm/endpoints/scale/addon.d.ts +0 -28
  311. package/dist/esm/endpoints/scale/job.d.ts +0 -30
  312. package/dist/esm/endpoints/scale/service.d.ts +0 -32
  313. package/dist/esm/endpoints/start/job/build.d.ts +0 -47
  314. package/dist/esm/endpoints/start/job/run.d.ts +0 -74
  315. package/dist/esm/endpoints/start/service/build.d.ts +0 -55
  316. package/dist/esm/endpoints/suspend/job.d.ts +0 -24
  317. package/dist/esm/endpoints/unassign/subdomain.d.ts +0 -19
  318. package/dist/esm/endpoints/update/addon/networkSettings.d.ts +0 -26
  319. package/dist/esm/endpoints/update/addon/security.d.ts +0 -29
  320. package/dist/esm/endpoints/update/addon/version.d.ts +0 -24
  321. package/dist/esm/endpoints/update/cluster.d.ts +0 -76
  322. package/dist/esm/endpoints/update/integration.d.ts +0 -53
  323. package/dist/esm/endpoints/update/job/buildArguments.d.ts +0 -29
  324. package/dist/esm/endpoints/update/job/buildOptions.d.ts +0 -50
  325. package/dist/esm/endpoints/update/job/buildSource.d.ts +0 -32
  326. package/dist/esm/endpoints/update/job/cmdOverride.d.ts +0 -24
  327. package/dist/esm/endpoints/update/job/deployment.d.ts +0 -39
  328. package/dist/esm/endpoints/update/job/entrypointOverride.d.ts +0 -24
  329. package/dist/esm/endpoints/update/job/healthChecks.d.ts +0 -45
  330. package/dist/esm/endpoints/update/job/runtimeEnvironment.d.ts +0 -29
  331. package/dist/esm/endpoints/update/job/settings.d.ts +0 -32
  332. package/dist/esm/endpoints/update/registry.d.ts +0 -31
  333. package/dist/esm/endpoints/update/secret.d.ts +0 -58
  334. package/dist/esm/endpoints/update/secretLink.d.ts +0 -40
  335. package/dist/esm/endpoints/update/service/buildArguments.d.ts +0 -29
  336. package/dist/esm/endpoints/update/service/buildOptions.d.ts +0 -62
  337. package/dist/esm/endpoints/update/service/buildSource.d.ts +0 -32
  338. package/dist/esm/endpoints/update/service/cmdOverride.d.ts +0 -24
  339. package/dist/esm/endpoints/update/service/deployment.d.ts +0 -39
  340. package/dist/esm/endpoints/update/service/entrypointOverride.d.ts +0 -24
  341. package/dist/esm/endpoints/update/service/healthChecks.d.ts +0 -45
  342. package/dist/esm/endpoints/update/service/ports.d.ts +0 -57
  343. package/dist/esm/endpoints/update/service/runtimeEnvironment.d.ts +0 -34
  344. package/dist/esm/endpoints/update/template.d.ts +0 -81
  345. package/dist/esm/endpoints/update/volume.d.ts +0 -33
  346. package/dist/esm/endpoints/verify/domain.d.ts +0 -17
  347. package/dist/esm/endpoints/verify/subdomain.d.ts +0 -19
  348. package/dist/esm/exec-command/client/exec-command-runner.d.ts +0 -70
  349. package/dist/esm/exec-command/client/exec-command-standard.d.ts +0 -42
  350. package/dist/esm/port-forward/client/api-helper.d.ts +0 -30
  351. package/dist/esm/port-forward/client/atomic-write.d.ts +0 -2
  352. package/dist/esm/port-forward/client/host-file-ast.d.ts +0 -52
  353. package/dist/esm/port-forward/client/host-file.d.ts +0 -26
  354. package/dist/esm/port-forward/client/loopback.d.ts +0 -4
  355. package/dist/esm/port-forward/client/port-forwarder.d.ts +0 -87
  356. package/dist/esm/port-forward/client/port-tunnel-tcp.d.ts +0 -36
  357. package/dist/esm/port-forward/client/port-tunnel-udp.d.ts +0 -27
  358. package/dist/esm/port-forward/client/promise-mutex.d.ts +0 -4
  359. package/dist/esm/utils.d.ts +0 -21
@@ -1,15 +1 @@
1
- import t,{EventEmitter as e}from"events";import*as n from"stream";import r,{Transform as i}from"stream";import o from"http";import s,{fileURLToPath as a}from"url";import u from"punycode";import c from"https";import l from"zlib";import d from"os";import*as p from"net";import h,{Socket as f}from"net";import{spawn as v,execSync as m}from"child_process";import b from"fs";import y from"path";import g from"tls";import w from"crypto";import j from"dgram";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var _=function(t,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},_(t,e)};function S(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var A=function(){return A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},A.apply(this,arguments)};function P(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}function C(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function E(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var x="object"==typeof global&&global&&global.Object===Object&&global,I="object"==typeof self&&self&&self.Object===Object&&self,O=x||I||Function("return this")(),k=O.Symbol,U=Object.prototype,D=U.hasOwnProperty,N=U.toString,B=k?k.toStringTag:void 0;var R=Object.prototype.toString;var T=k?k.toStringTag:void 0;function L(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":T&&T in Object(t)?function(t){var e=D.call(t,B),n=t[B];try{t[B]=void 0;var r=!0}catch(t){}var i=N.call(t);return r&&(e?t[B]=n:delete t[B]),i}(t):function(t){return R.call(t)}(t)}function q(t){return null!=t&&"object"==typeof t}function F(t){return"symbol"==typeof t||q(t)&&"[object Symbol]"==L(t)}function G(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var M=Array.isArray,z=k?k.prototype:void 0,J=z?z.toString:void 0;function W(t){if("string"==typeof t)return t;if(M(t))return G(t,W)+"";if(F(t))return J?J.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function $(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function V(t){return t}function H(t){if(!$(t))return!1;var e=L(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Y,Z=O["__core-js_shared__"],K=(Y=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var X=Function.prototype.toString;function Q(t){if(null!=t){try{return X.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var tt=/^\[object .+?Constructor\]$/,et=Function.prototype,nt=Object.prototype,rt=et.toString,it=nt.hasOwnProperty,ot=RegExp("^"+rt.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function st(t){return!(!$(t)||(e=t,K&&K in e))&&(H(t)?ot:tt).test(Q(t));var e}function at(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return st(n)?n:void 0}var ut=at(O,"WeakMap"),ct=Object.create,lt=function(){function t(){}return function(e){if(!$(e))return{};if(ct)return ct(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function dt(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var pt=Date.now;var ht,ft,vt,mt=function(){try{var t=at(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),bt=mt,yt=bt?function(t,e){return bt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:V,gt=(ht=yt,ft=0,vt=0,function(){var t=pt(),e=16-(t-vt);if(vt=t,e>0){if(++ft>=800)return arguments[0]}else ft=0;return ht.apply(void 0,arguments)}),wt=/^(?:0|[1-9]\d*)$/;function jt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&wt.test(t))&&t>-1&&t%1==0&&t<e}function _t(t,e,n){"__proto__"==e&&bt?bt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function St(t,e){return t===e||t!=t&&e!=e}var At=Object.prototype.hasOwnProperty;function Pt(t,e,n){var r=t[e];At.call(t,e)&&St(r,n)&&(void 0!==n||e in t)||_t(t,e,n)}var Ct=Math.max;function Et(t,e){return gt(function(t,e,n){return e=Ct(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Ct(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),dt(t,this,a)}}(t,e,V),t+"")}function xt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function It(t){return null!=t&&xt(t.length)&&!H(t)}var Ot=Object.prototype;function kt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function Ut(t){return q(t)&&"[object Arguments]"==L(t)}var Dt=Object.prototype,Nt=Dt.hasOwnProperty,Bt=Dt.propertyIsEnumerable,Rt=Ut(function(){return arguments}())?Ut:function(t){return q(t)&&Nt.call(t,"callee")&&!Bt.call(t,"callee")};var Tt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Tt&&"object"==typeof module&&module&&!module.nodeType&&module,qt=Lt&&Lt.exports===Tt?O.Buffer:void 0,Ft=(qt?qt.isBuffer:void 0)||function(){return!1},Gt={};Gt["[object Float32Array]"]=Gt["[object Float64Array]"]=Gt["[object Int8Array]"]=Gt["[object Int16Array]"]=Gt["[object Int32Array]"]=Gt["[object Uint8Array]"]=Gt["[object Uint8ClampedArray]"]=Gt["[object Uint16Array]"]=Gt["[object Uint32Array]"]=!0,Gt["[object Arguments]"]=Gt["[object Array]"]=Gt["[object ArrayBuffer]"]=Gt["[object Boolean]"]=Gt["[object DataView]"]=Gt["[object Date]"]=Gt["[object Error]"]=Gt["[object Function]"]=Gt["[object Map]"]=Gt["[object Number]"]=Gt["[object Object]"]=Gt["[object RegExp]"]=Gt["[object Set]"]=Gt["[object String]"]=Gt["[object WeakMap]"]=!1;var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,zt=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,Jt=zt&&zt.exports===Mt&&x.process,Wt=function(){try{var t=zt&&zt.require&&zt.require("util").types;return t||Jt&&Jt.binding&&Jt.binding("util")}catch(t){}}(),$t=Wt&&Wt.isTypedArray,Vt=$t?function(t){return function(e){return t(e)}}($t):function(t){return q(t)&&xt(t.length)&&!!Gt[L(t)]},Ht=Vt,Yt=Object.prototype.hasOwnProperty;function Zt(t,e){var n=M(t),r=!n&&Rt(t),i=!n&&!r&&Ft(t),o=!n&&!r&&!i&&Ht(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=a.length;for(var c in t)!e&&!Yt.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||jt(c,u))||a.push(c);return a}function Kt(t,e){return function(n){return t(e(n))}}var Xt=Kt(Object.keys,Object),Qt=Object.prototype.hasOwnProperty;function te(t){return It(t)?Zt(t):function(t){if(!kt(t))return Xt(t);var e=[];for(var n in Object(t))Qt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var ee=Object.prototype.hasOwnProperty;function ne(t){if(!$(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=kt(t),n=[];for(var r in t)("constructor"!=r||!e&&ee.call(t,r))&&n.push(r);return n}function re(t){return It(t)?Zt(t,!0):ne(t)}var ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oe=/^\w*$/;function se(t,e){if(M(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!F(t))||(oe.test(t)||!ie.test(t)||null!=e&&t in Object(e))}var ae=at(Object,"create");var ue=Object.prototype.hasOwnProperty;var ce=Object.prototype.hasOwnProperty;function le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function de(t,e){for(var n=t.length;n--;)if(St(t[n][0],e))return n;return-1}le.prototype.clear=function(){this.__data__=ae?ae(null):{},this.size=0},le.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},le.prototype.get=function(t){var e=this.__data__;if(ae){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ue.call(e,t)?e[t]:void 0},le.prototype.has=function(t){var e=this.__data__;return ae?void 0!==e[t]:ce.call(e,t)},le.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ae&&void 0===e?"__lodash_hash_undefined__":e,this};var pe=Array.prototype.splice;function he(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=de(e,t);return!(n<0)&&(n==e.length-1?e.pop():pe.call(e,n,1),--this.size,!0)},he.prototype.get=function(t){var e=this.__data__,n=de(e,t);return n<0?void 0:e[n][1]},he.prototype.has=function(t){return de(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=de(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var fe=at(O,"Map");function ve(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function me(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}me.prototype.clear=function(){this.size=0,this.__data__={hash:new le,map:new(fe||he),string:new le}},me.prototype.delete=function(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e},me.prototype.get=function(t){return ve(this,t).get(t)},me.prototype.has=function(t){return ve(this,t).has(t)},me.prototype.set=function(t,e){var n=ve(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function be(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(be.Cache||me),n}be.Cache=me;var ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ge=/\\(\\)?/g,we=function(t){var e=be(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ye,(function(t,n,r,i){e.push(r?i.replace(ge,"$1"):n||t)})),e})),je=we;function _e(t){return null==t?"":W(t)}function Se(t,e){return M(t)?t:se(t,e)?[t]:je(_e(t))}function Ae(t){if("string"==typeof t||F(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Pe(t,e){for(var n=0,r=(e=Se(e,t)).length;null!=t&&n<r;)t=t[Ae(e[n++])];return n&&n==r?t:void 0}function Ce(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Ee=k?k.isConcatSpreadable:void 0;function xe(t){return M(t)||Rt(t)||!!(Ee&&t&&t[Ee])}function Ie(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=xe),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?Ie(a,e-1,n,r,i):Ce(i,a):r||(i[i.length]=a)}return i}var Oe=Kt(Object.getPrototypeOf,Object),ke=Function.prototype,Ue=Object.prototype,De=ke.toString,Ne=Ue.hasOwnProperty,Be=De.call(Object);function Re(t){var e=this.__data__=new he(t);this.size=e.size}Re.prototype.clear=function(){this.__data__=new he,this.size=0},Re.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Re.prototype.get=function(t){return this.__data__.get(t)},Re.prototype.has=function(t){return this.__data__.has(t)},Re.prototype.set=function(t,e){var n=this.__data__;if(n instanceof he){var r=n.__data__;if(!fe||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new me(r)}return n.set(t,e),this.size=n.size,this};var Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,Le=Te&&"object"==typeof module&&module&&!module.nodeType&&module,qe=Le&&Le.exports===Te?O.Buffer:void 0,Fe=qe?qe.allocUnsafe:void 0;var Ge=Object.prototype.propertyIsEnumerable,Me=Object.getOwnPropertySymbols,ze=Me?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}(Me(t),(function(e){return Ge.call(t,e)})))}:function(){return[]};function Je(t){return function(t,e,n){var r=e(t);return M(t)?r:Ce(r,n(t))}(t,te,ze)}var We=at(O,"DataView"),$e=at(O,"Promise"),Ve=at(O,"Set"),He=Q(We),Ye=Q(fe),Ze=Q($e),Ke=Q(Ve),Xe=Q(ut),Qe=L;(We&&"[object DataView]"!=Qe(new We(new ArrayBuffer(1)))||fe&&"[object Map]"!=Qe(new fe)||$e&&"[object Promise]"!=Qe($e.resolve())||Ve&&"[object Set]"!=Qe(new Ve)||ut&&"[object WeakMap]"!=Qe(new ut))&&(Qe=function(t){var e=L(t),n="[object Object]"==e?t.constructor:void 0,r=n?Q(n):"";if(r)switch(r){case He:return"[object DataView]";case Ye:return"[object Map]";case Ze:return"[object Promise]";case Ke:return"[object Set]";case Xe:return"[object WeakMap]"}return e});var tn=Qe,en=O.Uint8Array;function nn(t,e){var n,r,i=e?(n=t.buffer,r=new n.constructor(n.byteLength),new en(r).set(new en(n)),r):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function rn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new me;++e<n;)this.add(t[e])}function on(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}rn.prototype.add=rn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},rn.prototype.has=function(t){return this.__data__.has(t)};function sn(t,e,n,r,i,o){var s=1&n,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var c=o.get(t),l=o.get(e);if(c&&l)return c==e&&l==t;var d=-1,p=!0,h=2&n?new rn:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var f=t[d],v=e[d];if(r)var m=s?r(v,f,d,e,t,o):r(f,v,d,t,e,o);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!on(e,(function(t,e){if(s=e,!h.has(s)&&(f===t||i(f,t,n,r,o)))return h.push(e);var s}))){p=!1;break}}else if(f!==v&&!i(f,v,n,r,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var cn=k?k.prototype:void 0,ln=cn?cn.valueOf:void 0;var dn=Object.prototype.hasOwnProperty;var pn="[object Object]",hn=Object.prototype.hasOwnProperty;function fn(t,e,n,r,i,o){var s=M(t),a=M(e),u=s?"[object Array]":tn(t),c=a?"[object Array]":tn(e),l=(u="[object Arguments]"==u?pn:u)==pn,d=(c="[object Arguments]"==c?pn:c)==pn,p=u==c;if(p&&Ft(t)){if(!Ft(e))return!1;s=!0,l=!1}if(p&&!l)return o||(o=new Re),s||Ht(t)?sn(t,e,n,r,i,o):function(t,e,n,r,i,o,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new en(t),new en(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return St(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=an;case"[object Set]":var u=1&r;if(a||(a=un),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var l=sn(a(t),a(e),r,i,o,s);return s.delete(t),l;case"[object Symbol]":if(ln)return ln.call(t)==ln.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var h=l&&hn.call(t,"__wrapped__"),f=d&&hn.call(e,"__wrapped__");if(h||f){var v=h?t.value():t,m=f?e.value():e;return o||(o=new Re),i(v,m,n,r,o)}}return!!p&&(o||(o=new Re),function(t,e,n,r,i,o){var s=1&n,a=Je(t),u=a.length;if(u!=Je(e).length&&!s)return!1;for(var c=u;c--;){var l=a[c];if(!(s?l in e:dn.call(e,l)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var h=!0;o.set(t,e),o.set(e,t);for(var f=s;++c<u;){var v=t[l=a[c]],m=e[l];if(r)var b=s?r(m,v,l,e,t,o):r(v,m,l,t,e,o);if(!(void 0===b?v===m||i(v,m,n,r,o):b)){h=!1;break}f||(f="constructor"==l)}if(h&&!f){var y=t.constructor,g=e.constructor;y==g||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(h=!1)}return o.delete(t),o.delete(e),h}(t,e,n,r,i,o))}function vn(t,e,n,r,i){return t===e||(null==t||null==e||!q(t)&&!q(e)?t!=t&&e!=e:fn(t,e,n,r,vn,i))}function mn(t){return t==t&&!$(t)}function bn(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function yn(t){var e=function(t){for(var e=te(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,mn(i)]}return e}(t);return 1==e.length&&e[0][2]?bn(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var u=(a=n[i])[0],c=t[u],l=a[1];if(s&&a[2]){if(void 0===c&&!(u in t))return!1}else{var d=new Re;if(r)var p=r(c,l,u,t,e,d);if(!(void 0===p?vn(l,c,3,r,d):p))return!1}}return!0}(n,t,e)}}function gn(t,e){return null!=t&&e in Object(t)}function wn(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Se(e,t)).length,o=!1;++r<i;){var s=Ae(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&xt(i)&&jt(s,i)&&(M(t)||Rt(t))}(t,e,gn)}function jn(t,e){return se(t)&&mn(e)?bn(Ae(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Pe(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?wn(n,t):vn(e,r,3)}}function _n(t){return se(t)?(e=Ae(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Pe(e,t)}}(t);var e}function Sn(t){return"function"==typeof t?t:null==t?V:"object"==typeof t?M(t)?jn(t[0],t[1]):yn(t):_n(t)}var An,Pn=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),s=o.length;s--;){var a=o[An?s:++r];if(!1===e(i[a],a,i))break}return t};var Cn=function(t,e){return function(n,r){if(null==n)return n;if(!It(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}((function(t,e){return t&&Pn(t,e,te)})),En=Cn;function xn(t,e,n){(void 0!==n&&!St(t[e],n)||void 0===n&&!(e in t))&&_t(t,e,n)}function In(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function On(t){return function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=r?r(n[a],t[a],a,n,t):void 0;void 0===u&&(u=t[a]),i?_t(n,a,u):Pt(n,a,u)}return n}(t,re(t))}function kn(t,e,n,r,i,o,s){var a=In(t,n),u=In(e,n),c=s.get(u);if(c)xn(t,n,c);else{var l,d=o?o(a,u,n+"",t,e,s):void 0,p=void 0===d;if(p){var h=M(u),f=!h&&Ft(u),v=!h&&!f&&Ht(u);d=u,h||f||v?M(a)?d=a:q(l=a)&&It(l)?d=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(a):f?(p=!1,d=function(t,e){if(e)return t.slice();var n=t.length,r=Fe?Fe(n):new t.constructor(n);return t.copy(r),r}(u,!0)):v?(p=!1,d=nn(u,!0)):d=[]:function(t){if(!q(t)||"[object Object]"!=L(t))return!1;var e=Oe(t);if(null===e)return!0;var n=Ne.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Be}(u)||Rt(u)?(d=a,Rt(a)?d=On(a):$(a)&&!H(a)||(d=function(t){return"function"!=typeof t.constructor||kt(t)?{}:lt(Oe(t))}(u))):p=!1}p&&(s.set(u,d),i(d,u,r,o,s),s.delete(u)),xn(t,n,d)}}function Un(t,e,n,r,i){t!==e&&Pn(e,(function(o,s){if(i||(i=new Re),$(o))kn(t,e,s,n,Un,r,i);else{var a=r?r(In(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),xn(t,s,a)}}),re)}var Dn=/[\\^$.*+?()[\]{}|]/g,Nn=RegExp(Dn.source);function Bn(t,e){var n=-1,r=It(t)?Array(t.length):[];return En(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Rn(t,e){return Ie(function(t,e){return(M(t)?G:Bn)(t,Sn(e))}(t,e),1)}function Tn(t,e){return t>e}function Ln(t){return"string"==typeof t||!M(t)&&q(t)&&"[object String]"==L(t)}function qn(t,e){return t&&t.length?function(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(void 0===a?s==s&&!F(s):n(s,a)))var a=s,u=o}return u}(t,Sn(e),Tn):void 0}var Fn,Gn=(Fn=function(t,e,n){Un(t,e,n)},Et((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Fn.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!$(n))return!1;var r=typeof e;return!!("number"==r?It(n)&&jt(e,n.length):"string"==r&&e in n)&&St(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Fn(t,s,n,i)}return t})));function Mn(t,e){return t(e={exports:{}},e.exports),e.exports}var zn={},Jn=zn;function Wn(t){return t<0?-1:1}function $n(t,e){e.unsigned||--t;const n=e.unsigned?0:-Math.pow(2,t),r=Math.pow(2,t)-1,i=e.moduloBitLength?Math.pow(2,e.moduloBitLength):Math.pow(2,t),o=e.moduloBitLength?Math.pow(2,e.moduloBitLength-1):Math.pow(2,t-1);return function(t,s){s||(s={});let a=+t;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=Wn(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(t){return t%1==.5&&0==(1&t)?Math.floor(t):Math.round(t)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=Wn(a)*Math.floor(Math.abs(a)),a%=i,!e.unsigned&&a>=o)return a-i;if(e.unsigned)if(a<0)a+=i;else if(-0===a)return 0;return a}}zn.void=function(){},zn.boolean=function(t){return!!t},zn.byte=$n(8,{unsigned:!1}),zn.octet=$n(8,{unsigned:!0}),zn.short=$n(16,{unsigned:!1}),zn["unsigned short"]=$n(16,{unsigned:!0}),zn.long=$n(32,{unsigned:!1}),zn["unsigned long"]=$n(32,{unsigned:!0}),zn["long long"]=$n(32,{unsigned:!1,moduloBitLength:64}),zn["unsigned long long"]=$n(32,{unsigned:!0,moduloBitLength:64}),zn.double=function(t){const e=+t;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},zn["unrestricted double"]=function(t){const e=+t;if(isNaN(e))throw new TypeError("Argument is NaN");return e},zn.float=zn.double,zn["unrestricted float"]=zn["unrestricted double"],zn.DOMString=function(t,e){return e||(e={}),e.treatNullAsEmptyString&&null===t?"":String(t)},zn.ByteString=function(t,e){const n=String(t);let r;for(let t=0;void 0!==(r=n.codePointAt(t));++t)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},zn.USVString=function(t){const e=String(t),n=e.length,r=[];for(let t=0;t<n;++t){const i=e.charCodeAt(t);if(i<55296||i>57343)r.push(String.fromCodePoint(i));else if(56320<=i&&i<=57343)r.push(String.fromCodePoint(65533));else if(t===n-1)r.push(String.fromCodePoint(65533));else{const n=e.charCodeAt(t+1);if(56320<=n&&n<=57343){const e=1023&i,o=1023&n;r.push(String.fromCodePoint(65536+1024*e+o)),++t}else r.push(String.fromCodePoint(65533))}}return r.join("")},zn.Date=function(t,e){if(!(t instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(t))return t},zn.RegExp=function(t,e){return t instanceof RegExp||(t=new RegExp(t)),t};var Vn=Mn((function(t){t.exports.mixin=function(t,e){const n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;++r)Object.defineProperty(t,n[r],Object.getOwnPropertyDescriptor(e,n[r]))},t.exports.wrapperSymbol=Symbol("wrapper"),t.exports.implSymbol=Symbol("impl"),t.exports.wrapperForImpl=function(e){return e[t.exports.wrapperSymbol]},t.exports.implForWrapper=function(e){return e[t.exports.implSymbol]}}));Vn.mixin,Vn.wrapperSymbol,Vn.implSymbol,Vn.wrapperForImpl,Vn.implForWrapper;var Hn,Yn=(Hn=Object.freeze({__proto__:null}))&&Hn.default||Hn,Zn={TRANSITIONAL:0,NONTRANSITIONAL:1};function Kn(t){return t.split("\0").map((function(t){return t.normalize("NFC")})).join("\0")}function Xn(t){for(var e=0,n=Yn.length-1;e<=n;){var r=Math.floor((e+n)/2),i=Yn[r];if(i[0][0]<=t&&i[0][1]>=t)return i;i[0][0]>t?n=r-1:e=r+1}return null}var Qn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function tr(t){return t.replace(Qn,"_").length}var er=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function nr(t,e){"xn--"===t.substr(0,4)&&(t=u.toUnicode(t));var n=!1;(Kn(t)!==t||"-"===t[3]&&"-"===t[4]||"-"===t[0]||"-"===t[t.length-1]||-1!==t.indexOf(".")||0===t.search(er))&&(n=!0);for(var r=tr(t),i=0;i<r;++i){var o=Xn(t.codePointAt(i));if(rr===Zn.TRANSITIONAL&&"valid"!==o[1]||rr===Zn.NONTRANSITIONAL&&"valid"!==o[1]&&"deviation"!==o[1]){n=!0;break}}return{label:t,error:n}}function rr(t,e,n){var r=function(t,e,n){for(var r=!1,i="",o=tr(t),s=0;s<o;++s){var a=t.codePointAt(s),u=Xn(a);switch(u[1]){case"disallowed":r=!0,i+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":i+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":i+=n===Zn.TRANSITIONAL?String.fromCodePoint.apply(String,u[2]):String.fromCodePoint(a);break;case"valid":i+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":e?(r=!0,i+=String.fromCodePoint(a)):i+=String.fromCodePoint.apply(String,u[2]);break;case"disallowed_STD3_valid":e&&(r=!0),i+=String.fromCodePoint(a)}}return{string:i,error:r}}(t,e,n);r.string=Kn(r.string);for(var i=r.string.split("."),o=0;o<i.length;++o)try{var s=nr(i[o]);i[o]=s.label,r.error=r.error||s.error}catch(t){r.error=!0}return{string:i.join("."),error:r.error}}var ir={toASCII:function(t,e,n,r){var i=rr(t,e,n),o=i.string.split(".");if(o=o.map((function(t){try{return u.toASCII(t)}catch(e){return i.error=!0,t}})),r){var s=o.slice(0,o.length-1).join(".").length;(s.length>253||0===s.length)&&(i.error=!0);for(var a=0;a<o.length;++a)if(o.length>63||0===o.length){i.error=!0;break}}return i.error?null:o.join(".")},toUnicode:function(t,e){var n=rr(t,e,Zn.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Zn},or=Mn((function(t){const e={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(t){return u.ucs2.decode(t).length}function i(t,e){const n=t[e];return isNaN(n)?void 0:String.fromCodePoint(n)}function o(t){return t>=48&&t<=57}function s(t){return t>=65&&t<=90||t>=97&&t<=122}function a(t){return o(t)||t>=65&&t<=70||t>=97&&t<=102}function c(t){return"."===t||"%2e"===t.toLowerCase()}function l(t){return 2===t.length&&s(t.codePointAt(0))&&(":"===t[1]||"|"===t[1])}function d(t){return void 0!==e[t]}function p(t){return d(t.scheme)}function h(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function f(t){return t<=31||t>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(t){return f(t)||v.has(t)}const b=new Set([47,58,59,61,64,91,92,93,94,124]);function y(t){return m(t)||b.has(t)}function g(t,e){const n=String.fromCodePoint(t);return e(t)?function(t){const e=new Buffer(t);let n="";for(let t=0;t<e.length;++t)n+=h(e[t]);return n}(n):n}function w(t){let e=10;if(t.length>=2&&"0"===t.charAt(0)&&"x"===t.charAt(1).toLowerCase()?(t=t.substring(2),e=16):t.length>=2&&"0"===t.charAt(0)&&(t=t.substring(1),e=8),""===t)return 0;return(10===e?/[^0-9]/:16===e?/[^0-9A-Fa-f]/:/[^0-7]/).test(t)?n:parseInt(t,e)}function j(t,e){if("["===t[0])return"]"!==t[t.length-1]?n:function(t){const e=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(t=u.ucs2.decode(t))[c]){if(58!==t[c+1])return n;c+=2,++r,s=r}for(;c<t.length;){if(8===r)return n;if(58===t[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,l=0;for(;l<4&&a(t[c]);)u=16*u+parseInt(i(t,c),16),++c,++l;if(46===t[c]){if(0===l)return n;if(c-=l,r>6)return n;let s=0;for(;void 0!==t[c];){let a=null;if(s>0){if(!(46===t[c]&&s<4))return n;++c}if(!o(t[c]))return n;for(;o(t[c]);){const e=parseInt(i(t,c));if(null===a)a=e;else{if(0===a)return n;a=10*a+e}if(a>255)return n;++c}e[r]=256*e[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===t[c]){if(++c,void 0===t[c])return n}else if(void 0!==t[c])return n;e[r]=u,++r}if(null!==s){let t=r-s;for(r=7;0!==r&&t>0;){const n=e[s+t-1];e[s+t-1]=e[r],e[r]=n,--r,--t}}else if(null===s&&8!==r)return n;return e}(t.substring(1,t.length-1));if(!e)return function(t){if(e=t,-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var e;let r="";const i=u.ucs2.decode(t);for(let t=0;t<i.length;++t)r+=g(i[t],f);return r}(t);const r=function(t){const e=new Buffer(t),n=[];for(let t=0;t<e.length;++t)37!==e[t]?n.push(e[t]):37===e[t]&&a(e[t+1])&&a(e[t+2])?(n.push(parseInt(e.slice(t+1,t+3).toString(),16)),t+=2):n.push(e[t]);return new Buffer(n).toString()}(t),s=ir.toASCII(r,!1,ir.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(t){const e=t.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return t;const r=[];for(const i of e){if(""===i)return t;const e=w(i);if(e===n)return t;r.push(e)}for(let t=0;t<r.length-1;++t)if(r[t]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let i=r.pop(),o=0;for(const t of r)i+=t*Math.pow(256,3-o),++o;return i}(s);return"number"==typeof c||c===n?c:s}function _(t){return"number"==typeof t?function(t){let e="",n=t;for(let t=1;t<=4;++t)e=String(n%256)+e,4!==t&&(e="."+e),n=Math.floor(n/256);return e}(t):t instanceof Array?"["+function(t){let e="";const n=function(t){let e=null,n=1,r=null,i=0;for(let o=0;o<t.length;++o)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),{idx:e,len:n}}(t).idx;let r=!1;for(let i=0;i<=7;++i)r&&0===t[i]||(r&&(r=!1),n!==i?(e+=t[i].toString(16),7!==i&&(e+=":")):(e+=0===i?"::":":",r=!0));return e}(t)+"]":t}function S(t){const e=t.path;var n;0!==e.length&&("file"===t.scheme&&1===e.length&&(n=e[0],/^[A-Za-z]:$/.test(n))||e.pop())}function A(t){return""!==t.username||""!==t.password}function P(t,e,r,i,o){if(this.pointer=0,this.input=t,this.base=e||null,this.encodingOverride=r||"utf-8",this.stateOverride=o,this.url=i,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const t=function(t){return t.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);t!==this.input&&(this.parseError=!0),this.input=t}const s=function(t){return t.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=o||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=u.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const t=this.input[this.pointer],e=isNaN(t)?void 0:String.fromCodePoint(t),r=this["parse "+this.state](t,e);if(!r)break;if(r===n){this.failure=!0;break}}}P.prototype["parse scheme start"]=function(t,e){if(s(t))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},P.prototype["parse scheme"]=function(t,e){if(function(t){return s(t)||o(t)}(t)||43===t||45===t||46===t)this.buffer+=e.toLowerCase();else if(58===t){if(this.stateOverride){if(p(this.url)&&!d(this.buffer))return!1;if(!p(this.url)&&d(this.buffer))return!1;if((A(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},P.prototype["parse no scheme"]=function(t){return null===this.base||this.base.cannotBeABaseURL&&35!==t?n:(this.base.cannotBeABaseURL&&35===t?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},P.prototype["parse special relative or authority"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},P.prototype["parse path or authority"]=function(t){return 47===t?this.state="authority":(this.state="path",--this.pointer),!0},P.prototype["parse relative"]=function(t){return this.url.scheme=this.base.scheme,isNaN(t)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===t?this.state="relative slash":63===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):p(this.url)&&92===t?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},P.prototype["parse relative slash"]=function(t){return!p(this.url)||47!==t&&92!==t?47===t?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===t&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},P.prototype["parse special authority slashes"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},P.prototype["parse special authority ignore slashes"]=function(t){return 47!==t&&92!==t?(this.state="authority",--this.pointer):this.parseError=!0,!0},P.prototype["parse authority"]=function(t,e){if(64===t){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const t=r(this.buffer);for(let e=0;e<t;++e){const t=this.buffer.codePointAt(e);if(58===t&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=g(t,y);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},P.prototype["parse hostname"]=P.prototype["parse host"]=function(t,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==t||this.arrFlag)if(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(A(this.url)||null!==this.url.port))return this.parseError=!0,!1;const t=j(this.buffer,p(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===t?this.arrFlag=!0:93===t&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,n;const t=j(this.buffer,p(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},P.prototype["parse port"]=function(t,r){if(o(t))this.buffer+=r;else{if(!(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const t=parseInt(this.buffer);if(t>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=t===(i=this.url.scheme,e[i])?null:t,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var i;return!0};const C=new Set([47,92,63,35]);P.prototype["parse file"]=function(t){var e,n;return this.url.scheme="file",47===t||92===t?(92===t&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(t)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(e=t,n=this.input[this.pointer+1],!s(e)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!C.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),S(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},P.prototype["parse file slash"]=function(t){var e;return 47===t||92===t?(92===t&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(e=this.base.path[0]).length&&s(e.codePointAt(0))&&":"===e[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},P.prototype["parse file host"]=function(t,e){if(isNaN(t)||47===t||92===t||63===t||35===t)if(--this.pointer,!this.stateOverride&&l(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let t=j(this.buffer,p(this.url));if(t===n)return n;if("localhost"===t&&(t=""),this.url.host=t,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},P.prototype["parse path start"]=function(t){return p(this.url)?(92===t&&(this.parseError=!0),this.state="path",47!==t&&92!==t&&--this.pointer):this.stateOverride||63!==t?this.stateOverride||35!==t?void 0!==t&&(this.state="path",47!==t&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},P.prototype["parse path"]=function(t){if(isNaN(t)||47===t||p(this.url)&&92===t||!this.stateOverride&&(63===t||35===t)){if(p(this.url)&&92===t&&(this.parseError=!0),".."===(e=(e=this.buffer).toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e?(S(this.url),47===t||p(this.url)&&92===t||this.url.path.push("")):!c(this.buffer)||47===t||p(this.url)&&92===t?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&l(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""),this.buffer="","file"===this.url.scheme&&(void 0===t||63===t||35===t))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===t&&(this.url.query="",this.state="query"),35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=g(t,m);var e;return!0},P.prototype["parse cannot-be-a-base-URL path"]=function(t){return 63===t?(this.url.query="",this.state="query"):35===t?(this.url.fragment="",this.state="fragment"):(isNaN(t)||37===t||(this.parseError=!0),37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(t)||(this.url.path[0]=this.url.path[0]+g(t,f))),!0},P.prototype["parse query"]=function(t,e){if(isNaN(t)||!this.stateOverride&&35===t){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const e=new Buffer(this.buffer);for(let t=0;t<e.length;++t)e[t]<33||e[t]>126||34===e[t]||35===e[t]||60===e[t]||62===e[t]?this.url.query+=h(e[t]):this.url.query+=String.fromCodePoint(e[t]);this.buffer="",35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e;return!0},P.prototype["parse fragment"]=function(t){return isNaN(t)||(0===t?this.parseError=!0:(37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=g(t,f))),!0},t.exports.serializeURL=function(t,e){let n=t.scheme+":";if(null!==t.host?(n+="//",""===t.username&&""===t.password||(n+=t.username,""!==t.password&&(n+=":"+t.password),n+="@"),n+=_(t.host),null!==t.port&&(n+=":"+t.port)):null===t.host&&"file"===t.scheme&&(n+="//"),t.cannotBeABaseURL)n+=t.path[0];else for(const e of t.path)n+="/"+e;return null!==t.query&&(n+="?"+t.query),e||null===t.fragment||(n+="#"+t.fragment),n},t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return t.exports.serializeURLOrigin(t.exports.parseURL(e.path[0]))}catch(t){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t){let e=t.scheme+"://";return e+=_(t.host),null!==t.port&&(e+=":"+t.port),e}({scheme:e.scheme,host:e.host,port:e.port});case"file":return"file://";default:return"null"}},t.exports.basicURLParse=function(t,e){void 0===e&&(e={});const n=new P(t,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return n.failure?"failure":n.url},t.exports.setTheUsername=function(t,e){t.username="";const n=u.ucs2.decode(e);for(let e=0;e<n.length;++e)t.username+=g(n[e],y)},t.exports.setThePassword=function(t,e){t.password="";const n=u.ucs2.decode(e);for(let e=0;e<n.length;++e)t.password+=g(n[e],y)},t.exports.serializeHost=_,t.exports.cannotHaveAUsernamePasswordPort=function(t){return null===t.host||""===t.host||t.cannotBeABaseURL||"file"===t.scheme},t.exports.serializeInteger=function(t){return String(t)},t.exports.parseURL=function(e,n){return void 0===n&&(n={}),t.exports.basicURLParse(e,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));or.serializeURL,or.serializeURLOrigin,or.basicURLParse,or.setTheUsername,or.setThePassword,or.serializeHost,or.cannotHaveAUsernamePasswordPort,or.serializeInteger,or.parseURL;var sr=class{constructor(t){const e=t[0],n=t[1];let r=null;if(void 0!==n&&(r=or.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const i=or.basicURLParse(e,{baseURL:r});if("failure"===i)throw new TypeError("Invalid URL");this._url=i}get href(){return or.serializeURL(this._url)}set href(t){const e=or.basicURLParse(t);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return or.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(t){or.basicURLParse(t+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){or.cannotHaveAUsernamePasswordPort(this._url)||or.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){or.cannotHaveAUsernamePasswordPort(this._url)||or.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?or.serializeHost(t.host):or.serializeHost(t.host)+":"+or.serializeInteger(t.port)}set host(t){this._url.cannotBeABaseURL||or.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":or.serializeHost(this._url.host)}set hostname(t){this._url.cannotBeABaseURL||or.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":or.serializeInteger(this._url.port)}set port(t){or.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:or.basicURLParse(t,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(t){this._url.cannotBeABaseURL||(this._url.path=[],or.basicURLParse(t,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(t){const e=this._url;if(""===t)return void(e.query=null);const n="?"===t[0]?t.substring(1):t;e.query="",or.basicURLParse(n,{url:e,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(t){if(""===t)return void(this._url.fragment=null);const e="#"===t[0]?t.substring(1):t;this._url.fragment="",or.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},ar=Mn((function(t){const e=Vn.implSymbol;function n(r){if(!this||this[e]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const i=[];for(let t=0;t<arguments.length&&t<2;++t)i[t]=arguments[t];i[0]=Jn.USVString(i[0]),void 0!==i[1]&&(i[1]=Jn.USVString(i[1])),t.exports.setup(this,i)}n.prototype.toJSON=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let t=0;t<arguments.length&&t<0;++t)n[t]=arguments[t];return this[e].toJSON.apply(this[e],n)},Object.defineProperty(n.prototype,"href",{get(){return this[e].href},set(t){t=Jn.USVString(t),this[e].href=t},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[e].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[e].protocol},set(t){t=Jn.USVString(t),this[e].protocol=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[e].username},set(t){t=Jn.USVString(t),this[e].username=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[e].password},set(t){t=Jn.USVString(t),this[e].password=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[e].host},set(t){t=Jn.USVString(t),this[e].host=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[e].hostname},set(t){t=Jn.USVString(t),this[e].hostname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[e].port},set(t){t=Jn.USVString(t),this[e].port=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[e].pathname},set(t){t=Jn.USVString(t),this[e].pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[e].search},set(t){t=Jn.USVString(t),this[e].search=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[e].hash},set(t){t=Jn.USVString(t),this[e].hash=t},enumerable:!0,configurable:!0}),t.exports={is:t=>!!t&&t[e]instanceof sr,create(t,e){let r=Object.create(n.prototype);return this.setup(r,t,e),r},setup(t,n,r){r||(r={}),r.wrapper=t,t[e]=new sr(n,r),t[e][Vn.wrapperSymbol]=t},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));ar.is,ar.create,ar.setup,ar.expose;var ur={URL:ar.interface,serializeURL:or.serializeURL,serializeURLOrigin:or.serializeURLOrigin,basicURLParse:or.basicURLParse,setTheUsername:or.setTheUsername,setThePassword:or.setThePassword,serializeHost:or.serializeHost,serializeInteger:or.serializeInteger,parseURL:or.parseURL};const cr=r.Readable,lr=Symbol("buffer"),dr=Symbol("type");class pr{constructor(){this[dr]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,i=Number(e.length);for(let t=0;t<i;t++){const i=e[t];let o;o=i instanceof Buffer?i:ArrayBuffer.isView(i)?Buffer.from(i.buffer,i.byteOffset,i.byteLength):i instanceof ArrayBuffer?Buffer.from(i):i instanceof pr?i[lr]:Buffer.from("string"==typeof i?i:String(i)),r+=o.length,n.push(o)}}this[lr]=Buffer.concat(n);let i=e&&void 0!==e.type&&String(e.type).toLowerCase();i&&!/[^\u0020-\u007E]/.test(i)&&(this[dr]=i)}get size(){return this[lr].length}get type(){return this[dr]}text(){return Promise.resolve(this[lr].toString())}arrayBuffer(){const t=this[lr],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new cr;return t._read=function(){},t.push(this[lr]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,i;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),i=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const o=Math.max(i-r,0),s=this[lr].slice(r,r+o),a=new pr([],{type:arguments[2]});return a[lr]=s,a}}function hr(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let fr;Object.defineProperties(pr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(pr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),hr.prototype=Object.create(Error.prototype),hr.prototype.constructor=hr,hr.prototype.name="FetchError";try{fr=require("encoding").convert}catch(t){}const vr=Symbol("Body internals"),mr=r.PassThrough;function br(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.size;let o=void 0===i?0:i;var s=n.timeout;let a=void 0===s?0:s;null==t?t=null:gr(t)?t=Buffer.from(t.toString()):wr(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof r||(t=Buffer.from(String(t)))),this[vr]={body:t,disturbed:!1,error:null},this.size=o,this.timeout=a,t instanceof r&&t.on("error",(function(t){const n="AbortError"===t.name?t:new hr(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[vr].error=n}))}function yr(){var t=this;if(this[vr].disturbed)return br.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[vr].disturbed=!0,this[vr].error)return br.Promise.reject(this[vr].error);let e=this.body;if(null===e)return br.Promise.resolve(Buffer.alloc(0));if(wr(e)&&(e=e.stream()),Buffer.isBuffer(e))return br.Promise.resolve(e);if(!(e instanceof r))return br.Promise.resolve(Buffer.alloc(0));let n=[],i=0,o=!1;return new br.Promise((function(r,s){let a;t.timeout&&(a=setTimeout((function(){o=!0,s(new hr(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(o=!0,s(e)):s(new hr(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!o&&null!==e){if(t.size&&i+e.length>t.size)return o=!0,void s(new hr(`content size at ${t.url} over limit: ${t.size}`,"max-size"));i+=e.length,n.push(e)}})),e.on("end",(function(){if(!o){clearTimeout(a);try{r(Buffer.concat(n,i))}catch(e){s(new hr(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function gr(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function wr(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function jr(t){let e,n,i=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof r&&"function"!=typeof i.getBoundary&&(e=new mr,n=new mr,i.pipe(e),i.pipe(n),t[vr].body=e,i=n),i}function _r(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":gr(t)?"application/x-www-form-urlencoded;charset=UTF-8":wr(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof r?null:"text/plain;charset=UTF-8"}function Sr(t){const e=t.body;return null===e?0:wr(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}br.prototype={get body(){return this[vr].body},get bodyUsed(){return this[vr].disturbed},arrayBuffer(){return yr.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return yr.call(this).then((function(e){return Object.assign(new pr([],{type:t.toLowerCase()}),{[lr]:e})}))},json(){var t=this;return yr.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return br.Promise.reject(new hr(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return yr.call(this).then((function(t){return t.toString()}))},buffer(){return yr.call(this)},textConverted(){var t=this;return yr.call(this).then((function(e){return function(t,e){if("function"!=typeof fr)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,i,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));i=t.slice(0,1024).toString(),!r&&i&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(i));!r&&i&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(i),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(i),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&i&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(i));r&&(o=r.pop(),"gb2312"!==o&&"gbk"!==o||(o="gb18030"));return fr(t,"UTF-8",o).toString()}(e,t.headers)}))}},Object.defineProperties(br.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),br.mixIn=function(t){for(const e of Object.getOwnPropertyNames(br.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(br.prototype,e);Object.defineProperty(t,e,n)}},br.Promise=global.Promise;const Ar=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Pr=/[^\t\x20-\x7e\x80-\xff]/;function Cr(t){if(t=`${t}`,Ar.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function Er(t){if(t=`${t}`,Pr.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function xr(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const Ir=Symbol("map");class Or{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[Ir]=Object.create(null),t instanceof Or){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){Cr(t=`${t}`);const e=xr(this[Ir],t);return void 0===e?null:this[Ir][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=kr(this),r=0;for(;r<n.length;){var i=n[r];const o=i[0],s=i[1];t.call(e,s,o,this),n=kr(this),r++}}set(t,e){e=`${e}`,Cr(t=`${t}`),Er(e);const n=xr(this[Ir],t);this[Ir][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,Cr(t=`${t}`),Er(e);const n=xr(this[Ir],t);void 0!==n?this[Ir][n].push(e):this[Ir][t]=[e]}has(t){return Cr(t=`${t}`),void 0!==xr(this[Ir],t)}delete(t){Cr(t=`${t}`);const e=xr(this[Ir],t);void 0!==e&&delete this[Ir][e]}raw(){return this[Ir]}keys(){return Dr(this,"key")}values(){return Dr(this,"value")}[Symbol.iterator](){return Dr(this,"key+value")}}function kr(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const n=Object.keys(t[Ir]).sort();return n.map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[Ir][e].join(", ")}:function(e){return[e.toLowerCase(),t[Ir][e].join(", ")]})}Or.prototype.entries=Or.prototype[Symbol.iterator],Object.defineProperty(Or.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Or.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const Ur=Symbol("internal");function Dr(t,e){const n=Object.create(Nr);return n[Ur]={target:t,kind:e,index:0},n}const Nr=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Nr)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[Ur];const e=t.target,n=t.kind,r=t.index,i=kr(e,n);return r>=i.length?{value:void 0,done:!0}:(this[Ur].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Br(t){const e=Object.assign({__proto__:null},t[Ir]),n=xr(t[Ir],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(Nr,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Rr=Symbol("Response internals"),Tr=o.STATUS_CODES;class Lr{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};br.call(this,t,e);const n=e.status||200,r=new Or(e.headers);if(null!=t&&!r.has("Content-Type")){const e=_r(t);e&&r.append("Content-Type",e)}this[Rr]={url:e.url,status:n,statusText:e.statusText||Tr[n],headers:r,counter:e.counter}}get url(){return this[Rr].url||""}get status(){return this[Rr].status}get ok(){return this[Rr].status>=200&&this[Rr].status<300}get redirected(){return this[Rr].counter>0}get statusText(){return this[Rr].statusText}get headers(){return this[Rr].headers}clone(){return new Lr(jr(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}br.mixIn(Lr.prototype),Object.defineProperties(Lr.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Lr.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const qr=Symbol("Request internals"),Fr=s.URL||ur.URL,Gr=s.parse,Mr=s.format;function zr(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new Fr(t).toString()),Gr(t)}const Jr="destroy"in r.Readable.prototype;function Wr(t){return"object"==typeof t&&"object"==typeof t[qr]}class $r{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Wr(t)?e=zr(t.url):(e=t&&t.href?zr(t.href):zr(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||Wr(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:Wr(t)&&null!==t.body?jr(t):null;br.call(this,i,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const o=new Or(n.headers||t.headers||{});if(null!=i&&!o.has("Content-Type")){const t=_r(i);t&&o.append("Content-Type",t)}let s=Wr(t)?t.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[qr]={method:r,redirect:n.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[qr].method}get url(){return Mr(this[qr].parsedURL)}get headers(){return this[qr].headers}get redirect(){return this[qr].redirect}get signal(){return this[qr].signal}clone(){return new $r(this)}}function Vr(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}br.mixIn($r.prototype),Object.defineProperty($r.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties($r.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Vr.prototype=Object.create(Error.prototype),Vr.prototype.constructor=Vr,Vr.prototype.name="AbortError";const Hr=s.URL||ur.URL,Yr=r.PassThrough;function Zr(t,e){if(!Zr.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return br.Promise=Zr.Promise,new Zr.Promise((function(n,i){const s=new $r(t,e),a=function(t){const e=t[qr].parsedURL,n=new Or(t[qr].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof r.Readable&&!Jr)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let i=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(i="0"),null!=t.body){const e=Sr(t);"number"==typeof e&&(i=String(e))}i&&n.set("Content-Length",i),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=t.agent;return"function"==typeof o&&(o=o(e)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:Br(n),agent:o})}(s),u=("https:"===a.protocol?c:o).request,d=s.signal;let p=null;const h=function(){let t=new Vr("The user aborted a request.");i(t),s.body&&s.body instanceof r.Readable&&s.body.destroy(t),p&&p.body&&p.body.emit("error",t)};if(d&&d.aborted)return void h();const f=function(){h(),b()},v=u(a);let m;function b(){v.abort(),d&&d.removeEventListener("abort",f),clearTimeout(m)}d&&d.addEventListener("abort",f),s.timeout&&v.once("socket",(function(t){m=setTimeout((function(){i(new hr(`network timeout at: ${s.url}`,"request-timeout")),b()}),s.timeout)})),v.on("error",(function(t){i(new hr(`request to ${s.url} failed, reason: ${t.message}`,"system",t)),b()})),v.on("response",(function(t){clearTimeout(m);const e=function(t){const e=new Or;for(const n of Object.keys(t))if(!Ar.test(n))if(Array.isArray(t[n]))for(const r of t[n])Pr.test(r)||(void 0===e[Ir][n]?e[Ir][n]=[r]:e[Ir][n].push(r));else Pr.test(t[n])||(e[Ir][n]=[t[n]]);return e}(t.headers);if(Zr.isRedirect(t.statusCode)){const r=e.get("Location");let o=null;try{o=null===r?null:new Hr(r,s.url).toString()}catch(t){if("manual"!==s.redirect)return i(new hr(`uri requested responds with an invalid redirect URL: ${r}`,"invalid-redirect")),void b()}switch(s.redirect){case"error":return i(new hr(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void b();case"manual":if(null!==o)try{e.set("Location",o)}catch(t){i(t)}break;case"follow":if(null===o)break;if(s.counter>=s.follow)return i(new hr(`maximum redirect reached at: ${s.url}`,"max-redirect")),void b();const r={headers:new Or(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(t,e){const n=new Hr(e).hostname,r=new Hr(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,o))for(const t of["authorization","www-authenticate","cookie","cookie2"])r.headers.delete(t);return 303!==t.statusCode&&s.body&&null===Sr(s)?(i(new hr("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==s.method)||(r.method="GET",r.body=void 0,r.headers.delete("content-length")),n(Zr(new $r(o,r))),void b())}}t.once("end",(function(){d&&d.removeEventListener("abort",f)}));let r=t.pipe(new Yr);const o={url:s.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:s.size,timeout:s.timeout,counter:s.counter},a=e.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===a||204===t.statusCode||304===t.statusCode)return p=new Lr(r,o),void n(p);const u={flush:l.Z_SYNC_FLUSH,finishFlush:l.Z_SYNC_FLUSH};if("gzip"==a||"x-gzip"==a)return r=r.pipe(l.createGunzip(u)),p=new Lr(r,o),void n(p);if("deflate"!=a&&"x-deflate"!=a){if("br"==a&&"function"==typeof l.createBrotliDecompress)return r=r.pipe(l.createBrotliDecompress()),p=new Lr(r,o),void n(p);p=new Lr(r,o),n(p)}else{t.pipe(new Yr).once("data",(function(t){r=8==(15&t[0])?r.pipe(l.createInflate()):r.pipe(l.createInflateRaw()),p=new Lr(r,o),n(p)}))}})),function(t,e){const n=e.body;null===n?t.end():wr(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(v,s)}))}Zr.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Zr.Promise=global.Promise;var Kr=function(){function t(t){this.contextProvider=t}return t.prototype.getServiceDetails=function(t,e){return P(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/services/").concat(e))]}))}))},t.prototype.getAddonDetails=function(t,e){return P(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/addons/").concat(e))]}))}))},t.prototype.fetch=function(t,e){return P(this,void 0,void 0,(function(){var n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:return n=Gn({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},A({},e)),[4,Zr(t,n)];case 1:return(r=a.sent()).ok?[3,3]:(i=Error.bind,s=(o=JSON).stringify,[4,r.json()]);case 2:throw new(i.apply(Error,[void 0,s.apply(o,[a.sent()])]));case 3:return[4,r.json()];case 4:return[2,a.sent()]}}))}))},t}(),Xr=function(t,e,n){return P(void 0,void 0,void 0,(function(){var r,i,o,s,a;return C(this,(function(u){switch(u.label){case 0:if(r=ei(e||"127.0.0.1"),(i=ei(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===d.platform()&&(o=function(t){return P(void 0,void 0,void 0,(function(){var e;return C(this,(function(n){switch(n.label){case 0:return e="lo0 alias ".concat(t," up"),[4,ti.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=i?(a=ni(s),[4,Qr(t,a)]):[3,6];case 2:return u.sent()?o?[4,o(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("No ip available")}}))}))},Qr=function(t,e){return new Promise((function(n){var r=new f,i=!1;r.on("connect",(function(){i=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){i=!1,r.destroy()})),r.on("error",(function(){i=!1})),r.on("close",(function(){n(!i)})),e?r.connect(t,e):r.connect(t)}))},ti=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return P(void 0,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return"/sbin/ifconfig",[4,ri("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}}))}))},ei=function(t){var e=t.split(".").reverse();if(4!==e.length)throw new Error("Invalid ip address: ".concat(t));for(var n=0,r=0;r<4;r+=1){var i=Number.parseInt(e[r],10);if(i<0||i>255)throw new Error("Invalid ip address: ".concat(t));n+=i<<8*r}return n},ni=function(t){if(!Number.isSafeInteger(t))throw new Error("Number is not an integer");if(t<0||t>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var e=[],n=0;n<4;n+=1)e.push(t>>8*n&255);return e.reverse().join(".")},ri=function(t,e,n){var r=v(t,e,A({windowsHide:!0},n)),i=new Promise((function(i,o){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(t){s+=t})),r.stderr&&r.stderr.on("data",(function(t){a+=t}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(t," ").concat(e.join(" "),"': ").concat(a);o({message:u,result:r})}else i(r)}))}));return{process:r,resultPromise:i}},ii=function(t,e,n){return P(void 0,void 0,void 0,(function(){var r,i;return C(this,(function(o){switch(o.label){case 0:return r=oi(t,10),[4,b.promises.writeFile(r,e,n)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,4,,6]),[4,b.promises.rename(r,t)];case 3:return o.sent(),[3,6];case 4:return i=o.sent(),[4,b.promises.unlink(r).catch((function(){}))];case 5:throw o.sent(),i;case 6:return[2]}}))}))},oi=function(t,e){for(var n,r=y.dirname(t),i=y.basename(t),o=0;null===(n=o<e)||void 0===n||n;o+=1){var s=E([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(i),u=y.join(r,a);if(!b.existsSync(u))return u}throw new Error("Could not write file to file '".concat(t,"'."))},si="win32"===process.platform?"\r\n":"\n",ai=function(){function t(t,e){this.nodes=t,this.config=e}return t.prototype.add=function(t,e,n){var r=this;if(0===e.length)return this;var i=this.findOrCreateEntry(t,n);return e.forEach((function(t){if(!i.hosts.find((function(e){return e.host===t}))){var e=1;0===i.hosts.length&&(e=r.config.indent-"".concat(i.ipPrefixWhitespace).concat(i.ip).length),i.hosts.push({whitespace:" ".repeat(e<1?1:e),host:t})}})),this},t.prototype.remove=function(t,e){var n=this;return this.findEntries(t).forEach((function(t){e.forEach((function(e){var r=t.hosts.findIndex((function(t){return t.host===e}));r<0||(0===r&&void 0!==t.hosts[1]&&(t.hosts[1].whitespace=t.hosts[0].whitespace),t.hosts.splice(r,1),0===t.hosts.length&&n.removeEntry(t))}))})),this},t.prototype.removeHosts=function(t){var e=this;fi(this.nodes,"entry").forEach((function(n){e.remove(n.ip,t)}))},t.prototype.removeIps=function(t){var e=this;return t.forEach((function(t){e.findEntries(t).forEach((function(t){return e.removeEntry(t)}))})),this},t.prototype.resolveHosts=function(t){return Rn(this.findEntries(t),(function(t){return t.hosts.map((function(t){return t.host}))}))},t.prototype.resolveIps=function(t){return fi(this.nodes,"entry").filter((function(e){return e.hosts.some((function(e){return e.host===t}))})).map((function(t){return t.ip}))},t.prototype.toString=function(){return di(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||q(e)&&"[object Number]"==L(e)?t:this.nodes.findIndex((function(e){return e===t}));n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return fi(this.nodes,"entry").filter((function(e){return e.ip===t}))},t.prototype.findOrCreateEntry=function(t,e){var n=this.findEntries(t)[0];if(n)return n;var r=this.makeEntry(t);if(e){var i=li(e),o=this.nodes.findIndex((function(t){return"comment"===t.type&&t.line===i}));if(o>=0)this.insertAt(o+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[ui(),ci(i),r]:[ci(i),r];this.insertAt.apply(this,E([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},t.prototype.insertAt=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.nodes).splice.apply(e,E([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return A({type:"entry",ip:t,ipPrefixWhitespace:n,hosts:[]},e)},t.fromNodes=function(e,n){var r,i;return new t(e.filter((function(t){return"eol"!==t.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var t,n=fi(e,"eol").map((function(t){return t.line}));return null!==(t=vi(n))&&void 0!==t?t:si}(),indent:null!==(i=null==n?void 0:n.indent)&&void 0!==i?i:function(){var t,n=Rn(fi(e,"entry"),(function(t){var e=t.ipPrefixWhitespace,n=t.ip,r=t.hosts[0];return r?["".concat(e).concat(n).concat(r.whitespace).length]:[]}));return null!==(t=vi(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(pi(t),e)},t}(),ui=function(){return{type:"blank",line:""}},ci=function(t){return{type:"comment",line:li(t)}},li=function(t){return t.startsWith("#")?t:"# ".concat(t)},di=function(t,e){var n=t.map((function(t){switch(t.type){case"entry":var e=t.hosts.map((function(t){var e=t.whitespace,n=t.host;return"".concat(e).concat(n)})).join("");return"".concat(t.ipPrefixWhitespace).concat(t.ip).concat(e);case"blank":case"comment":case"invalid":return t.line;default:return""}}));return n.join(null!=e?e:si)},pi=function(t){return t.split(/(\r?\n)/).map((function(t){return function(t){return t.match(/^\s*#.*$/)}(t)?{type:"comment",line:t}:function(t){return t.match(/^(\r?\n)$/)}(t)?{type:"eol",line:t}:function(t){return t.match(/^\s*$/)}(t)?{type:"blank",line:t}:hi(t)}))},hi=function(t){var e=t.match(/^(\s*)(\S+)(.+)?$/);if(!e)return{type:"invalid",line:t};var n=e[1],r=e[2],i=e.slice(3),o=!1,s=Rn(i.filter((function(t){return void 0!==t})),(function(t){var e=t.match(/(\s+)(\S+)/g);return e?e.map((function(t){var e=t.match(/^(\s+)(\S+)$/);e||(o=!0);var n=null!=e?e:[];return{whitespace:n[1],host:n[2]}})):(o=!0,[])}));return o?{type:"invalid",line:t}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},fi=function(t,e){return t.filter((function(t){return t.type===e}))},vi=function(t){var e=new Map;t.forEach((function(t){var n;e.set(t,(null!==(n=e.get(t))&&void 0!==n?n:0)+1)}));var n=qn(Array.from(e.entries()),(function(t){return t[1]}));if(n)return n[0]},mi="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",bi=function(){function t(t){this.ast=ai.fromNodes([]);var e={writeMode:"atomic",hostsFile:mi};this.config=A(A({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!Ln(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!Ln(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.add(t,e,this.config.header),this},t.prototype.remove=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!Ln(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!Ln(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.remove(t,e),this},t.prototype.removeHosts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!Ln(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeHosts(t),this},t.prototype.removeIps=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!Ln(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeIps(t),this},t.prototype.read=function(){return P(this,void 0,void 0,(function(){var t;return C(this,(function(e){switch(e.label){case 0:return[4,b.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=ai.parse(t.toString(),this.config),[2,this]}}))}))},t.prototype.write=function(t){return P(this,void 0,void 0,(function(){var e,n,r,i;return C(this,(function(o){switch(o.label){case 0:switch(e=A(A({},this.config),t),n=e.hostsFile,r=e.writeMode,i=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,ii(n,i)];case 2:case 4:return o.sent(),[3,6];case 3:return[4,b.promises.writeFile(n,i)];case 5:return[3,6];case 6:return[2,this]}}))}))},t.prototype.backup=function(t){return P(this,void 0,void 0,(function(){var e,n,r,i;return C(this,(function(o){switch(o.label){case 0:return b.existsSync(this.config.hostsFile)?(e=y.dirname(this.config.hostsFile),n=y.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),i=y.resolve(e,r),b.existsSync(i)&&!t.rewrite?[3,2]:[4,b.promises.copyFile(this.config.hostsFile,i)]):[2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},t.load=function(e){return P(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,new t(e).read()];case 1:return[2,n.sent()]}}))}))},t}(),yi=function(){function t(){this.previousPromise=Promise.resolve()}return t.prototype.enter=function(t){return P(this,void 0,void 0,(function(){var e;return C(this,(function(n){return e=this.previousPromise.then((function(){return t()})).catch((function(){return t()})),this.previousPromise=e,[2,e]}))}))},t}(),gi=function t(e,n){if(e&&n)return t(e)(n);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),i=t[t.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(t){r[t]=i[t]})),r}};var wi=gi(_i),ji=gi(Si);function _i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Si(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}_i.proto=_i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return _i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Si(this)},configurable:!0})})),wi.strict=ji;var Ai=function(){},Pi=function(t,e,n){if("function"==typeof e)return Pi(t,null,e);e||(e={}),n=wi(n||Ai);var r=t._writableState,i=t._readableState,o=e.readable||!1!==e.readable&&t.readable,s=e.writable||!1!==e.writable&&t.writable,a=!1,u=function(){t.writable||c()},c=function(){s=!1,o||n.call(t)},l=function(){o=!1,s||n.call(t)},d=function(e){n.call(t,e?new Error("exited with error code: "+e):null)},p=function(e){n.call(t,e)},h=function(){process.nextTick(f)},f=function(){if(!a)return(!o||i&&i.ended&&!i.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(t,new Error("premature close"))},v=function(){t.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?s&&!r&&(t.on("end",u),t.on("close",u)):(t.on("complete",c),t.on("abort",h),t.req?v():t.on("request",v)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",d),t.on("end",l),t.on("finish",c),!1!==e.error&&t.on("error",p),t.on("close",h),function(){a=!0,t.removeListener("complete",c),t.removeListener("abort",h),t.removeListener("request",v),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("exit",d),t.removeListener("end",l),t.removeListener("error",p),t.removeListener("close",h)}},Ci=Pi,Ei=function(){},xi=/^v?\.0/.test(process.version),Ii=function(t){return"function"==typeof t},Oi=function(t,e,n,r){r=wi(r);var i=!1;t.on("close",(function(){i=!0})),Ci(t,{readable:e,writable:n},(function(t){if(t)return r(t);i=!0,r()}));var o=!1;return function(e){if(!i&&!o)return o=!0,function(t){return!!xi&&!!b&&(t instanceof(b.ReadStream||Ei)||t instanceof(b.WriteStream||Ei))&&Ii(t.close)}(t)?t.close(Ei):function(t){return t.setHeader&&Ii(t.abort)}(t)?t.abort():Ii(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},ki=function(t){t()},Ui=function(t,e){return t.pipe(e)},Di=function(){var t,e=Array.prototype.slice.call(arguments),n=Ii(e[e.length-1]||Ei)&&e.pop()||Ei;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map((function(i,o){var s=o<e.length-1;return Oi(i,s,o>0,(function(e){t||(t=e),e&&r.forEach(ki),s||(r.forEach(ki),n(t))}))}));return e.reduce(Ui)};const{Duplex:Ni}=r;function Bi(t){t.emit("close")}function Ri(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ti(t){this.removeListener("error",Ti),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var Li=function(t,e){let n=!0;const r=new Ni({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",(function(e,n){const i=!n&&r._readableState.objectMode?e.toString():e;r.push(i)||t.pause()})),t.once("error",(function(t){r.destroyed||(n=!1,r.destroy(t))})),t.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(e,i){if(t.readyState===t.CLOSED)return i(e),void process.nextTick(Bi,r);let o=!1;t.once("error",(function(t){o=!0,i(t)})),t.once("close",(function(){o||i(e),process.nextTick(Bi,r)})),n&&t.terminate()},r._final=function(e){t.readyState!==t.CONNECTING?null!==t._socket&&(t._socket._writableState.finished?(e(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",(function(){e()})),t.close())):t.once("open",(function(){r._final(e)}))},r._read=function(){t.isPaused&&t.resume()},r._write=function(e,n,i){t.readyState!==t.CONNECTING?t.send(e,i):t.once("open",(function(){r._write(e,n,i)}))},r.on("end",Ri),r.on("error",Ti),r},qi={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:()=>{}},Fi="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},Gi=process.config&&process.config.variables||{},Mi=!!process.env.PREBUILDS_ONLY,zi=process.versions.modules,Ji=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":"node",Wi=d.arch(),$i=d.platform(),Vi=process.env.LIBC||(function(t){return"linux"===t&&b.existsSync("/etc/alpine-release")}($i)?"musl":"glibc"),Hi=process.env.ARM_VERSION||("arm64"===Wi?"8":Gi.arm_version)||"",Yi=(process.versions.uv||"").split(".")[0],Zi=Ki;function Ki(t){return Fi(Ki.path(t))}function Xi(t){try{return b.readdirSync(t)}catch(t){return[]}}function Qi(t,e){var n=Xi(t).filter(e);return n[0]&&y.join(t,n[0])}function to(t){return/\.node$/.test(t)}function eo(t){var e=t.split("-");if(2===e.length){var n=e[0],r=e[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:t,platform:n,architectures:r}}}function no(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function ro(t,e){return t.architectures.length-e.architectures.length}function io(t){var e=t.split("."),n={file:t,specificity:0};if("node"===e.pop()){for(var r=0;r<e.length;r++){var i=e[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function oo(t,e){return function(n){return null!=n&&(!(n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi!==e&&!n.napi)&&((!n.uv||n.uv===Yi)&&((!n.armv||n.armv===Hi)&&(!n.libc||n.libc===Vi)))))}}function so(t){return function(e,n){return e.runtime!==n.runtime?e.runtime===t?-1:1:e.abi!==n.abi?e.abi?-1:1:e.specificity!==n.specificity?e.specificity>n.specificity?-1:1:0}}Ki.path=function(t){t=y.resolve(t||".");try{var e=Fi(y.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!Mi){var n=Qi(y.join(t,"build/Release"),to);if(n)return n;var r=Qi(y.join(t,"build/Debug"),to);if(r)return r}var i=a(t);if(i)return i;var o=a(y.dirname(process.execPath));if(o)return o;var s=["platform="+$i,"arch="+Wi,"runtime="+Ji,"abi="+zi,"uv="+Yi,Hi?"armv="+Hi:"","libc="+Vi,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+t+"\n");function a(t){var e=Xi(y.join(t,"prebuilds")).map(eo).filter(no($i,Wi)).sort(ro)[0];if(e){var n=y.join(t,"prebuilds",e.name),r=Xi(n).map(io).filter(oo(Ji,zi)).sort(so(Ji))[0];return r?y.join(n,r.file):void 0}}},Ki.parseTags=io,Ki.matchTags=oo,Ki.compareTags=so,Ki.parseTuple=eo,Ki.matchTuple=no,Ki.compareTuples=ro;var ao={mask:(t,e,n,r,i)=>{for(var o=0;o<i;o++)n[r+o]=t[o]^e[3&o]},unmask:(t,e)=>{const n=t.length;for(var r=0;r<n;r++)t[r]^=e[3&r]}},uo=Mn((function(t){try{t.exports=Zi(__dirname)}catch(e){t.exports=ao}})),co=Mn((function(t){const{EMPTY_BUFFER:e}=qi;function n(t,n){if(0===t.length)return e;if(1===t.length)return t[0];const r=Buffer.allocUnsafe(n);let i=0;for(let e=0;e<t.length;e++){const n=t[e];r.set(n,i),i+=n.length}return i<n?r.slice(0,i):r}function r(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[o]^e[3&o]}function i(t,e){for(let n=0;n<t.length;n++)t[n]^=e[3&n]}function o(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}function s(t){if(s.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=Buffer.from(t):ArrayBuffer.isView(t)?e=Buffer.from(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),s.readOnly=!1),e}try{const e=uo;t.exports={concat:n,mask(t,n,i,o,s){s<48?r(t,n,i,o,s):e.mask(t,n,i,o,s)},toArrayBuffer:o,toBuffer:s,unmask(t,n){t.length<32?i(t,n):e.unmask(t,n)}}}catch(e){t.exports={concat:n,mask:r,toArrayBuffer:o,toBuffer:s,unmask:i}}}));co.concat,co.mask,co.toArrayBuffer,co.toBuffer,co.unmask;const lo=Symbol("kDone"),po=Symbol("kRun");var ho=class{constructor(t){this[lo]=()=>{this.pending--,this[po]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[po]()}[po](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[lo])}}};const{kStatusCode:fo}=qi,vo=Buffer.from([0,0,255,255]),mo=Symbol("permessage-deflate"),bo=Symbol("total-length"),yo=Symbol("callback"),go=Symbol("buffers"),wo=Symbol("error");let jo;var _o=class{constructor(t,e,n){if(this._maxPayload=0|n,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!jo){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;jo=new ho(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[yo];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,n=t.find((t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"==typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"==typeof e.clientMaxWindowBits&&!t.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(n.server_no_context_takeover=!0),e.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof e.serverMaxWindowBits&&(n.server_max_window_bits=e.serverMaxWindowBits),"number"==typeof e.clientMaxWindowBits?n.client_max_window_bits=e.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach((t=>{Object.keys(t).forEach((e=>{let n=t[e];if(n.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(n=n[0],"client_max_window_bits"===e){if(!0!==n){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}else if("server_max_window_bits"===e){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}t[e]=n}))})),t}decompress(t,e,n){jo.add((r=>{this._decompress(t,e,((t,e)=>{r(),n(t,e)}))}))}compress(t,e,n){jo.add((r=>{this._compress(t,e,((t,e)=>{r(),n(t,e)}))}))}_decompress(t,e,n){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?l.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=l.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[mo]=this,this._inflate[bo]=0,this._inflate[go]=[],this._inflate.on("error",Po),this._inflate.on("data",Ao)}this._inflate[yo]=n,this._inflate.write(t),e&&this._inflate.write(vo),this._inflate.flush((()=>{const t=this._inflate[wo];if(t)return this._inflate.close(),this._inflate=null,void n(t);const i=co.concat(this._inflate[go],this._inflate[bo]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[bo]=0,this._inflate[go]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,i)}))}_compress(t,e,n){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?l.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=l.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[bo]=0,this._deflate[go]=[],this._deflate.on("data",So)}this._deflate[yo]=n,this._deflate.write(t),this._deflate.flush(l.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=co.concat(this._deflate[go],this._deflate[bo]);e&&(t=t.slice(0,t.length-4)),this._deflate[yo]=null,this._deflate[bo]=0,this._deflate[go]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)}))}};function So(t){this[go].push(t),this[bo]+=t.length}function Ao(t){this[bo]+=t.length,this[mo]._maxPayload<1||this[bo]<=this[mo]._maxPayload?this[go].push(t):(this[wo]=new RangeError("Max payload size exceeded"),this[wo].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[wo][fo]=1009,this.removeListener("data",Ao),this.reset())}function Po(t){this[mo]._inflate=null,t[fo]=1007,this[yo](t)}var Co=function(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}return!0},Eo=Mn((function(t){try{t.exports=Zi(__dirname)}catch(e){t.exports=Co}})),xo=Mn((function(t){const e=[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 n(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999}function r(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}return!0}try{const i=Eo;t.exports={isValidStatusCode:n,isValidUTF8:t=>t.length<150?r(t):i(t),tokenChars:e}}catch(i){t.exports={isValidStatusCode:n,isValidUTF8:r,tokenChars:e}}}));xo.isValidStatusCode,xo.isValidUTF8,xo.tokenChars;const{Writable:Io}=r,{BINARY_TYPES:Oo,EMPTY_BUFFER:ko,kStatusCode:Uo,kWebSocket:Do}=qi,{concat:No,toArrayBuffer:Bo,unmask:Ro}=co,{isValidStatusCode:To,isValidUTF8:Lo}=xo;var qo=class extends Io{constructor(t={}){super(),this._binaryType=t.binaryType||Oo[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[Do]=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._state=0,this._loop=!1}_write(t,e,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){const e=this._buffers[0];return this._buffers[0]=e.slice(t),e.slice(0,t)}const e=Buffer.allocUnsafe(t);do{const n=this._buffers[0],r=e.length-t;t>=n.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(n.buffer,n.byteOffset,t),r),this._buffers[0]=n.slice(t)),t-=n.length}while(t>0);return e}startLoop(t){let e;this._loop=!0;do{switch(this._state){case 0:e=this.getInfo();break;case 1:e=this.getPayloadLength16();break;case 2:e=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:e=this.getData(t);break;default:return void(this._loop=!1)}}while(this._loop);t(e)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(0!=(48&t[0]))return this._loop=!1,Fo(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const e=64==(64&t[0]);if(e&&!this._extensions[_o.extensionName])return this._loop=!1,Fo(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(e)return this._loop=!1,Fo(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Fo(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,Fo(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=e}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,Fo(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,Fo(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(e)return this._loop=!1,Fo(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,Fo(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&t[1]),this._isServer){if(!this._masked)return this._loop=!1,Fo(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Fo(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),e=t.readUInt32BE(0);return e>Math.pow(2,21)-1?(this._loop=!1,Fo(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=e*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Fo(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(t){let e=ko;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);e=this.consume(this._payloadLength),this._masked&&0!=(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Ro(e,this._mask)}return this._opcode>7?this.controlMessage(e):this._compressed?(this._state=5,void this.decompress(e,t)):(e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage())}decompress(t,e){this._extensions[_o.extensionName].decompress(t,this._fin,((t,n)=>{if(t)return e(t);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return e(Fo(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return e(r);this.startLoop(e)}))}dataMessage(){if(this._fin){const t=this._messageLength,e=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?No(e,t):"arraybuffer"===this._binaryType?Bo(No(e,t)):e,this.emit("message",n,!0)}else{const n=No(e,t);if(!this._skipUTF8Validation&&!Lo(n))return this._loop=!1,Fo(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(t){if(8===this._opcode)if(this._loop=!1,0===t.length)this.emit("conclude",1005,ko),this.end();else{if(1===t.length)return Fo(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{const e=t.readUInt16BE(0);if(!To(e))return Fo(RangeError,`invalid status code ${e}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=t.slice(2);if(!this._skipUTF8Validation&&!Lo(n))return Fo(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",e,n),this.end()}}else 9===this._opcode?this.emit("ping",t):this.emit("pong",t);this._state=0}};function Fo(t,e,n,r,i){const o=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(o,Fo),o.code=i,o[Uo]=r,o}const{randomFillSync:Go}=w,{EMPTY_BUFFER:Mo}=qi,{isValidStatusCode:zo}=xo,{mask:Jo,toBuffer:Wo}=co,$o=Symbol("kByteLength"),Vo=Buffer.alloc(4);class Ho{constructor(t,e,n){this._extensions=e||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,e){let n,r,i=!1,o=2,s=!1;e.mask&&(n=e.maskBuffer||Vo,e.generateMask?e.generateMask(n):Go(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),o=6),"string"==typeof t?r=e.mask&&!s||void 0===e[$o]?(t=Buffer.from(t)).length:e[$o]:(r=t.length,i=e.mask&&e.readOnly&&!s);let a=r;r>=65536?(o+=8,a=127):r>125&&(o+=2,a=126);const u=Buffer.allocUnsafe(i?r+o:o);return u[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),e.mask?(u[1]|=128,u[o-4]=n[0],u[o-3]=n[1],u[o-2]=n[2],u[o-1]=n[3],s?[u,t]:i?(Jo(t,n,u,o,r),[u]):(Jo(t,n,t,0,r),[u,t])):[u,t]}close(t,e,n,r){let i;if(void 0===t)i=Mo;else{if("number"!=typeof t||!zo(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==e&&e.length){const n=Buffer.byteLength(e);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+n),i.writeUInt16BE(t,0),"string"==typeof e?i.write(e,2):i.set(e,2)}else i=Buffer.allocUnsafe(2),i.writeUInt16BE(t,0)}const o={[$o]:i.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,i,!1,o,r]):this.sendFrame(Ho.frame(i,o),r)}ping(t,e,n){let r,i;if("string"==typeof t?(r=Buffer.byteLength(t),i=!1):(r=(t=Wo(t)).length,i=Wo.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[$o]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(Ho.frame(t,o),n)}pong(t,e,n){let r,i;if("string"==typeof t?(r=Buffer.byteLength(t),i=!1):(r=(t=Wo(t)).length,i=Wo.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[$o]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(Ho.frame(t,o),n)}send(t,e,n){const r=this._extensions[_o.extensionName];let i,o,s=e.binary?2:1,a=e.compress;if("string"==typeof t?(i=Buffer.byteLength(t),o=!1):(i=(t=Wo(t)).length,o=Wo.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=i>=r._threshold),this._compress=a):(a=!1,s=0),e.fin&&(this._firstFragment=!0),r){const r={[$o]:i,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:a};this._deflating?this.enqueue([this.dispatch,t,this._compress,r,n]):this.dispatch(t,this._compress,r,n)}else this.sendFrame(Ho.frame(t,{[$o]:i,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:!1}),n)}dispatch(t,e,n,r){if(!e)return void this.sendFrame(Ho.frame(t,n),r);const i=this._extensions[_o.extensionName];this._bufferedBytes+=n[$o],this._deflating=!0,i.compress(t,n.fin,((t,e)=>{if(this._socket.destroyed){const t=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(t);for(let e=0;e<this._queue.length;e++){const n=this._queue[e],r=n[n.length-1];"function"==typeof r&&r(t)}}else this._bufferedBytes-=n[$o],this._deflating=!1,n.readOnly=!1,this.sendFrame(Ho.frame(e,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][$o],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][$o],this._queue.push(t)}sendFrame(t,e){2===t.length?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}}var Yo=Ho;const{kForOnEventAttribute:Zo,kListener:Ko}=qi,Xo=Symbol("kCode"),Qo=Symbol("kData"),ts=Symbol("kError"),es=Symbol("kMessage"),ns=Symbol("kReason"),rs=Symbol("kTarget"),is=Symbol("kType"),os=Symbol("kWasClean");class ss{constructor(t){this[rs]=null,this[is]=t}get target(){return this[rs]}get type(){return this[is]}}Object.defineProperty(ss.prototype,"target",{enumerable:!0}),Object.defineProperty(ss.prototype,"type",{enumerable:!0});class as extends ss{constructor(t,e={}){super(t),this[Xo]=void 0===e.code?0:e.code,this[ns]=void 0===e.reason?"":e.reason,this[os]=void 0!==e.wasClean&&e.wasClean}get code(){return this[Xo]}get reason(){return this[ns]}get wasClean(){return this[os]}}Object.defineProperty(as.prototype,"code",{enumerable:!0}),Object.defineProperty(as.prototype,"reason",{enumerable:!0}),Object.defineProperty(as.prototype,"wasClean",{enumerable:!0});class us extends ss{constructor(t,e={}){super(t),this[ts]=void 0===e.error?null:e.error,this[es]=void 0===e.message?"":e.message}get error(){return this[ts]}get message(){return this[es]}}Object.defineProperty(us.prototype,"error",{enumerable:!0}),Object.defineProperty(us.prototype,"message",{enumerable:!0});class cs extends ss{constructor(t,e={}){super(t),this[Qo]=void 0===e.data?null:e.data}get data(){return this[Qo]}}Object.defineProperty(cs.prototype,"data",{enumerable:!0});const ls={addEventListener(t,e,n={}){let r;if("message"===t)r=function(t,n){const r=new cs("message",{data:n?t:t.toString()});r[rs]=this,e.call(this,r)};else if("close"===t)r=function(t,n){const r=new as("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[rs]=this,e.call(this,r)};else if("error"===t)r=function(t){const n=new us("error",{error:t,message:t.message});n[rs]=this,e.call(this,n)};else{if("open"!==t)return;r=function(){const t=new ss("open");t[rs]=this,e.call(this,t)}}r[Zo]=!!n[Zo],r[Ko]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[Ko]===e&&!n[Zo]){this.removeListener(t,n);break}}};var ds={CloseEvent:as,ErrorEvent:us,Event:ss,EventTarget:ls,MessageEvent:cs};const{tokenChars:ps}=xo;function hs(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var fs={format:function(t){return Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>[e].concat(Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>!0===t?e:`${e}=${t}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(t){const e=Object.create(null);let n,r,i=Object.create(null),o=!1,s=!1,a=!1,u=-1,c=-1,l=-1,d=0;for(;d<t.length;d++)if(c=t.charCodeAt(d),void 0===n)if(-1===l&&1===ps[c])-1===u&&(u=d);else if(0===d||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);const r=t.slice(u,l);44===c?(hs(e,r,i),i=Object.create(null)):n=r,u=l=-1}}else-1===l&&-1!==u&&(l=d);else if(void 0===r)if(-1===l&&1===ps[c])-1===u&&(u=d);else if(32===c||9===c)-1===l&&-1!==u&&(l=d);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d),hs(i,t.slice(u,l),!0),44===c&&(hs(e,n,i),i=Object.create(null),n=void 0),u=l=-1}else{if(61!==c||-1===u||-1!==l)throw new SyntaxError(`Unexpected character at index ${d}`);r=t.slice(u,d),u=l=-1}else if(s){if(1!==ps[c])throw new SyntaxError(`Unexpected character at index ${d}`);-1===u?u=d:o||(o=!0),s=!1}else if(a)if(1===ps[c])-1===u&&(u=d);else if(34===c&&-1!==u)a=!1,l=d;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${d}`);s=!0}else if(34===c&&61===t.charCodeAt(d-1))a=!0;else if(-1===l&&1===ps[c])-1===u&&(u=d);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);let s=t.slice(u,l);o&&(s=s.replace(/\\/g,""),o=!1),hs(i,r,s),44===c&&(hs(e,n,i),i=Object.create(null),n=void 0),r=void 0,u=l=-1}}else-1===l&&(l=d);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===l&&(l=d);const p=t.slice(u,l);return void 0===n?hs(e,p,i):(void 0===r?hs(i,p,!0):hs(i,r,o?p.replace(/\\/g,""):p),hs(e,n,i)),e}};const{randomBytes:vs,createHash:ms}=w,{URL:bs}=s,{BINARY_TYPES:ys,EMPTY_BUFFER:gs,GUID:ws,kForOnEventAttribute:js,kListener:_s,kStatusCode:Ss,kWebSocket:As,NOOP:Ps}=qi,{EventTarget:{addEventListener:Cs,removeEventListener:Es}}=ds,{format:xs,parse:Is}=fs,{toBuffer:Os}=co,ks=["CONNECTING","OPEN","CLOSING","CLOSED"],Us=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Ds=[8,13];class Ns extends t{constructor(t,e,n){super(),this._binaryType=ys[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=gs,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Ns.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===e?e=[]:Array.isArray(e)||("object"==typeof e&&null!==e?(n=e,e=[]):e=[e]),Rs(this,t,e,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(t){ys.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}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(t,e,n){const r=new qo({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Yo(t,this._extensions,n.generateMask),this._receiver=r,this._socket=t,r[As]=this,t[As]=this,r.on("conclude",Ms),r.on("drain",zs),r.on("error",Js),r.on("message",$s),r.on("ping",Vs),r.on("pong",Hs),t.setTimeout(0),t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",Zs),t.on("data",Ks),t.on("end",Xs),t.on("error",Qs),this._readyState=Ns.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Ns.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[_o.extensionName]&&this._extensions[_o.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Ns.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Ns.CLOSED){if(this.readyState===Ns.CONNECTING){const t="WebSocket was closed before the connection was established";return Fs(this,this._req,t)}this.readyState!==Ns.CLOSING?(this._readyState=Ns.CLOSING,this._sender.close(t,e,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end()}}pause(){this.readyState!==Ns.CONNECTING&&this.readyState!==Ns.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Ns.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Ns.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||gs,e,n)):Gs(this,t,n)}pong(t,e,n){if(this.readyState===Ns.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Ns.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||gs,e,n)):Gs(this,t,n)}resume(){this.readyState!==Ns.CONNECTING&&this.readyState!==Ns.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Ns.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof e&&(n=e,e={}),"number"==typeof t&&(t=t.toString()),this.readyState!==Ns.OPEN)return void Gs(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[_o.extensionName]||(r.compress=!1),this._sender.send(t||gs,r,n)}terminate(){if(this.readyState!==Ns.CLOSED){if(this.readyState===Ns.CONNECTING){const t="WebSocket was closed before the connection was established";return Fs(this,this._req,t)}this._socket&&(this._readyState=Ns.CLOSING,this._socket.destroy())}}}Object.defineProperty(Ns,"CONNECTING",{enumerable:!0,value:ks.indexOf("CONNECTING")}),Object.defineProperty(Ns.prototype,"CONNECTING",{enumerable:!0,value:ks.indexOf("CONNECTING")}),Object.defineProperty(Ns,"OPEN",{enumerable:!0,value:ks.indexOf("OPEN")}),Object.defineProperty(Ns.prototype,"OPEN",{enumerable:!0,value:ks.indexOf("OPEN")}),Object.defineProperty(Ns,"CLOSING",{enumerable:!0,value:ks.indexOf("CLOSING")}),Object.defineProperty(Ns.prototype,"CLOSING",{enumerable:!0,value:ks.indexOf("CLOSING")}),Object.defineProperty(Ns,"CLOSED",{enumerable:!0,value:ks.indexOf("CLOSED")}),Object.defineProperty(Ns.prototype,"CLOSED",{enumerable:!0,value:ks.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(Ns.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(Ns.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[js])return e[_s];return null},set(e){for(const e of this.listeners(t))if(e[js]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[js]:!0})}})})),Ns.prototype.addEventListener=Cs,Ns.prototype.removeEventListener=Es;var Bs=Ns;function Rs(t,e,n,r){const i={protocolVersion:Ds[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:void 0,host:void 0,path:void 0,port:void 0};if(!Ds.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Ds.join(", ")})`);let s;if(e instanceof bs)s=e,t._url=e.href;else{try{s=new bs(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}t._url=e}const a="wss:"===s.protocol,u="ws+unix:"===s.protocol;let l;if("ws:"===s.protocol||a||u?u&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"):l='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',l){const e=new SyntaxError(l);if(0===t._redirects)throw e;return void Ts(t,e)}const d=a?443:80,p=vs(16).toString("base64"),h=a?c.get:o.get,f=new Set;let v;if(i.createConnection=a?qs:Ls,i.defaultPort=i.defaultPort||d,i.port=s.port||d,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket",...i.headers},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(v=new _o(!0!==i.perMessageDeflate?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=xs({[_o.extensionName]:v.offer()})),n.length){for(const t of n){if("string"!=typeof t||!Us.test(t)||f.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(t)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),u){const t=i.path.split(":");i.socketPath=t[0],i.path=t[1]}if(i.followRedirects){if(0===t._redirects){t._originalHost=s.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,n]of Object.entries(e))r.headers[t.toLowerCase()]=n}else s.host!==t._originalHost&&(delete i.headers.authorization,delete i.headers.cookie,delete i.headers.host,i.auth=void 0);i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64"))}let m=t._req=h(i);i.timeout&&m.on("timeout",(()=>{Fs(t,m,"Opening handshake has timed out")})),m.on("error",(e=>{null===m||m.aborted||(m=t._req=null,Ts(t,e))})),m.on("response",(o=>{const s=o.headers.location,a=o.statusCode;if(s&&i.followRedirects&&a>=300&&a<400){if(++t._redirects>i.maxRedirects)return void Fs(t,m,"Maximum redirects exceeded");let o;m.abort();try{o=new bs(s,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${s}`);return void Ts(t,n)}Rs(t,o,n,r)}else t.emit("unexpected-response",m,o)||Fs(t,m,`Unexpected server response: ${o.statusCode}`)})),m.on("upgrade",((e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Ns.CONNECTING)return;m=t._req=null;const o=ms("sha1").update(p+ws).digest("base64");if(e.headers["sec-websocket-accept"]!==o)return void Fs(t,n,"Invalid Sec-WebSocket-Accept header");const s=e.headers["sec-websocket-protocol"];let a;if(void 0!==s?f.size?f.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":f.size&&(a="Server sent no subprotocol"),a)return void Fs(t,n,a);s&&(t._protocol=s);const u=e.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void Fs(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=Is(u)}catch(e){return void Fs(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==_o.extensionName){return void Fs(t,n,"Server indicated an extension that was not requested")}try{v.accept(e[_o.extensionName])}catch(e){return void Fs(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[_o.extensionName]=v}t.setSocket(n,r,{generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}))}function Ts(t,e){t._readyState=Ns.CLOSING,t.emit("error",e),t.emitClose()}function Ls(t){return t.path=t.socketPath,h.connect(t)}function qs(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=h.isIP(t.host)?"":t.host),g.connect(t)}function Fs(t,e,n){t._readyState=Ns.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Fs),e.setHeader?(e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),e.once("abort",t.emitClose.bind(t)),t.emit("error",r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Gs(t,e,n){if(e){const n=Os(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(n){n(new Error(`WebSocket is not open: readyState ${t.readyState} (${ks[t.readyState]})`))}}function Ms(t,e){const n=this[As];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[As]&&(n._socket.removeListener("data",Ks),process.nextTick(Ys,n._socket),1005===t?n.close():n.close(t,e))}function zs(){const t=this[As];t.isPaused||t._socket.resume()}function Js(t){const e=this[As];void 0!==e._socket[As]&&(e._socket.removeListener("data",Ks),process.nextTick(Ys,e._socket),e.close(t[Ss])),e.emit("error",t)}function Ws(){this[As].emitClose()}function $s(t,e){this[As].emit("message",t,e)}function Vs(t){const e=this[As];e.pong(t,!e._isServer,Ps),e.emit("ping",t)}function Hs(t){this[As].emit("pong",t)}function Ys(t){t.resume()}function Zs(){const t=this[As];let e;this.removeListener("close",Zs),this.removeListener("data",Ks),this.removeListener("end",Xs),t._readyState=Ns.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[As]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Ws),t._receiver.on("finish",Ws))}function Ks(t){this[As]._receiver.write(t)||this.pause()}function Xs(){const t=this[As];t._readyState=Ns.CLOSING,t._receiver.end(),this.end()}function Qs(){const t=this[As];this.removeListener("error",Qs),this.on("error",Ps),t&&(t._readyState=Ns.CLOSING,this.destroy())}var ta=function(t){function e(e,n,r,i,o){void 0===o&&(o=5e3);var s=t.call(this)||this;s.endpoint=e,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=i,s.closeTimeout=o,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(t){return(e=_e(e=t))&&Nn.test(e)?e.replace(Dn,"\\$&"):e;var e})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return S(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return P(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,i=n.address;t.tcpServer.listen(r,i,(function(){t.emit("tunnel-open",{address:i,port:r}),e({address:i,port:r})}))}else t.tcpServer.listen(0,(function(){var n=t.tcpServer.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:i},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return P(this,void 0,void 0,(function(){var t,e=this;return C(this,(function(n){switch(n.label){case 0:return t=!1,[4,Promise.race([new Promise((function(n){e.tcpServer.close((function(){t=!0,e.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(t){return setTimeout(t,e.closeTimeout)})).then((function(){t||(e.openConnections.forEach((function(t){t.destroy(),e.openConnections.delete(t)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},e.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=new Bs(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Li(n),i=this.getHeaderTransform();this.rewriteHostHeader&&i?Di(t,i,r):Di(t,r),Di(r,t),n.on("close",(function(t,n,r){e.emit("connection-close",t,n,r)})),r.on("error",(function(t){e.emit("connection-error",t)})),t.on("error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var t=this.rewriteHostHeader.targetHostname,e=this.hostRegex;return new i({transform:function(n,r,i){var o=n.toString();if(o.split("\n",1)[0].includes("HTTP")){var s=o.replace(e,"Host: ".concat(t));i(null,Buffer.from(s))}else i(null,n)}})}},e}(e),ea=function(t){function e(e,n,r){var i=t.call(this)||this;return i.endpoint=e,i.headers=n,i.bindToAssign=r,i.protocol="UDP",i.udpSocket=j.createSocket("udp4"),i.handleConnection(),i}return S(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return P(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,i=n.address;t.udpSocket.bind(r,i,(function(){t.emit("tunnel-open",{address:i,port:r}),e({address:i,port:r})}))}else t.udpSocket.bind(0,(function(){var n=t.udpSocket.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:i},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return P(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){t.udpSocket.close((function(){t.emit("tunnel-close"),e()}))}))];case 1:return e.sent(),[2]}}))}))},e.prototype.handleConnection=function(){var t,e=this,n=new Bs(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Li(n);this.udpSocket.on("message",(function(e,n){t=n,r.write(e)})),r.on("data",(function(n){t&&e.udpSocket.send(n,t.port,t.address,(function(t){t&&e.emit("connection-error",t)}))})),this.udpSocket.on("error",(function(t){e.emit("connection-error",t)})),r.on("error",(function(t){e.emit("connection-error",t)})),n.on("connection-close",(function(t,n,r){e.emit("connection-close",t,n,r)})),n.on("connection-error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e}(e);var na="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,ra=function(t,e){return P(void 0,void 0,void 0,(function(){var n;return C(this,(function(r){return n=Promise.resolve([]),[2,t.reduce((function(t,n){return t.then((function(t){return e(n).then((function(e){return t.push(e),t}))}))}),n)]}))}))},ia=function(t){function e(e){void 0===e&&(e=8192);var n=t.call(this)||this;return n.bufferDefaultSize=e,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return S(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.getContentsAsString=function(t,e){void 0===t&&(t="utf8");var n=this.buffer.toString(t,0,Math.min(e||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},e.prototype.adaptBuffer=function(t){if(this.buffer.length-this.size<t){var e=Math.ceil((t-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*e);this.buffer.copy(n,0,0,this.size),this.buffer=n}},e.prototype._write=function(t,e,n){this.adaptBuffer(t.length),t.copy(this.buffer,this.size,0),this._size+=t.length,n()},e}(r.Writable),oa=function(t){function e(e,n,r){var i=t.call(this)||this;return i.contextProvider=e,i.listServices=n,i.listAddons=r,i.connections=[],i.hostsFileMutex=new yi,i.ipAllocationMutex=new yi,i.stopForwarding=function(t){return P(i,void 0,void 0,(function(){var e,n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:return[4,t.tunnel.close()];case 1:return a.sent(),e=t.forwardingContext,n=e.projectId,r=e.type,i=e.id,(o=e.hostnames).length>0?[4,this.unregisterHostnames(null===(s=t.tunnel.bindTo)||void 0===s?void 0:s.address,o)]:[3,3];case 2:a.sent(),a.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(t){var e=t.forwardingContext,o=e.type,s=e.id,a=e.projectId;return s===i&&a===n&&o===r})),1),[2]}}))}))},i.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(process.getuid(),"). Try running with 'sudo'.")}:{error:!1,type:"unix-admin"}:function(){try{return m("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return m("fltmc"),!0}catch(t){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."}},i.assertStartedWithNodejs=function(){if(!na)throw new Error("Port forwarding only possible when started with nodejs")},i.proxyApiClient=new Kr(e),i}return S(e,t),e.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardProject(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopProjectForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,i,o,s,a=this;return C(this,(function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return i=u.sent(),[4,Promise.all(r.data.services.map((function(t){return P(a,void 0,void 0,(function(){return C(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:t.id},e)]}))}))})))];case 3:return o=u.sent(),[4,Promise.all(i.data.addons.map((function(t){return P(a,void 0,void 0,(function(){return C(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:t.id},e)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=u.sent(),[2,{services:o,addons:s}]}}))}))},e.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardService(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopServiceForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,i,o,s,a,u,c=this;return C(this,(function(l){switch(l.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,r=t.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return i=l.sent(),o=i.namespace,s=i.targetDomain,a=i.instances,u=i.ports,0===a.length?[2,[]]:[4,ra(u,(function(t){var i,u="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(t.internalPort),l="".concat(r,".").concat(o,".svc.cluster.local"),d=["".concat(r)];t.name&&d.push("".concat(t.name,".").concat(r)),"HTTP"===t.protocol&&(i={altHostnames:d,targetHostname:l});var p=e?[]:E([l],d,!0);return c.forwardPort(u,t,p,"service",r,n,e,i)}))];case 2:return[2,l.sent()]}}))}))},e.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardAddon(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopAddonForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,i,o,s=this;return C(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=t.addonId,r=t.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return i=a.sent(),o=i.instances.map((function(t){var e=t.podName,n=t.internalHostname;return t.ports.map((function(t){return{podName:e,internalHostname:n,port:t}}))})),[4,ra((u=o,null!=u&&u.length?Ie(u,1/0):[]),(function(t){var o=t.podName,a=t.internalHostname,u=t.port;return P(s,void 0,void 0,(function(){var t;return C(this,(function(s){return t="https://".concat(i.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(o,"/port/").concat(u.internalPort),[2,this.forwardPort(t,u,e?[]:[a],"addon",n,r,e)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},e.prototype.allocateIpAddress=function(t){return P(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return P(e,void 0,void 0,(function(){var e,n,r,i,o;return C(this,(function(s){switch(s.label){case 0:return e="127.24.1.1",n="127.24.255.255",r=null!==(o=this.nextIpAddress)&&void 0!==o?o:e,[4,Xr(t,r,n)];case 1:return i=s.sent(),this.nextIpAddress=ni(ei(i)+1),ei(this.nextIpAddress)>ei(n)&&(this.nextIpAddress=e),[2,i]}}))}))}))]}))}))},e.prototype.forwardPort=function(t,e,n,r,i,o,s,a){var u;return void 0===s&&(s=!0),P(this,void 0,void 0,(function(){var c,l,d,p,h,f,v=this;return C(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(l=this.canExecuteWithHostnames()).error)throw new Error("".concat(l.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(o,i,r,e,s)];case 1:return d=m.sent(),p="UDP"===e.protocol?new ea(t,c,d):new ta(t,c,a,d),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return P(v,void 0,void 0,(function(){return C(this,(function(t){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return h=m.sent(),f={projectId:o,id:i,type:r,hostnames:n,port:h.port,address:h.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",p,f),p.on("connection-error",(function(t){return v.emit("connection-error",p,f,t)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,f)})),this.connections.push({tunnel:p,forwardingContext:f}),[2,{data:f}]}}))}))},e.prototype.determineSocketAddress=function(t,e,n,r,i){var o;return P(this,void 0,void 0,(function(){var s,a,u;return C(this,(function(c){switch(c.label){case 0:return i?[2,void 0]:(s=this.connections.find((function(r){return r.forwardingContext.projectId===t&&r.forwardingContext.id===e&&r.forwardingContext.type===n})),a=(null===(o=null==s?void 0:s.forwardingContext)||void 0===o?void 0:o.port)!==r.internalPort,s&&a?[2,{address:s.forwardingContext.address,port:r.internalPort}]:(u={},[4,this.allocateIpAddress(r.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=r.internalPort,u)]}}))}))},e.prototype.registerHostnames=function(t,e){return P(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,e),n.add.apply(n,E([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.unregisterHostnames=function(t,e){return P(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,E([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.modifyHostsFile=function(t){return P(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return P(e,void 0,void 0,(function(){var e,n=this;return C(this,(function(r){switch(r.label){case 0:return[4,bi.load({header:"Northflank Proxy"})];case 1:return e=r.sent(),t(e),[4,e.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,sa(5)((function(){return P(n,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"atomic"})];case 1:return t.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,sa(5)((function(){return P(n,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"standard"})];case 1:return t.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopProjectForwarding=function(t){return P(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return e.forwardingContext.projectId===t.projectId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopServiceForwarding=function(t){return P(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"service"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.serviceId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopAddonForwarding=function(t){return P(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"addon"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.addonId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stop=function(){return P(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this.connections.map((function(e){return P(t,void 0,void 0,(function(){return C(this,(function(t){return[2,this.stopForwarding(e)]}))}))})))];case 1:return e.sent(),[2]}}))}))},e}(e),sa=function(t,e){return void 0===e&&(e=50),function(n){var r=t,i=function(){return P(void 0,void 0,void 0,(function(){var t;return C(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,4]),[4,n()];case 1:return[2,o.sent()];case 2:if(t=o.sent(),r<=0)throw t;return r-=1,[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 3:return o.sent(),[2,i()];case 4:return[2]}}))}))};return i()}},aa=function(t){function e(e,r,i,o,s,a){void 0===o&&(o=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var u=t.call(this)||this;return u.baseUrl=e,u.execConfig=r,u.token=i,u.stdOut=o,u.stdErr=s,u.stdIn=a,u.waitForCommandResult=function(){return P(u,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,t.sent()]}}))}))},u.sendInputToCurrentCommand=function(t){return P(u,void 0,void 0,(function(){var e;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(e=this.duplex)||void 0===e||e.write(this.constructPayloadPacket(t)),[2]}))}))},u.resizeTerminal=function(t){return P(u,void 0,void 0,(function(){var e;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(e=this.duplex)||void 0===e||e.write(JSON.stringify({type:"resize",data:{ttyRows:null==t?void 0:t.rows,ttyColumns:null==t?void 0:t.columns}})),[2]}))}))},u.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},u}return S(e,t),Object.defineProperty(e.prototype,"execEndpoint",{get:function(){var t=this.execConfig,e=t.entityId,n=t.entityType,r=t.projectId,i="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(i).concat(function(){switch(n){case"service":return"services/".concat(e);case"job":return"jobs/".concat(e);case"addon":return"addons/".concat(e);case"build":return"builds/".concat(e);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),e.prototype.start=function(){return P(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(e,n){void 0!==t.remote&&n(Error("Command is already running"));var r,i=t.execEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new Bs(i);try{t.duplex=Li(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),t.stdIn.on("data",(function(e){var n,r;(null===(n=t.duplex)||void 0===n?void 0:n.writable)&&(null===(r=t.duplex)||void 0===r||r.write(t.constructPayloadPacket(e)))})),t.duplex.on("data",(function(e){var n,i,s=JSON.parse(e.toString());switch(null==s?void 0:s.type){case"init":var a=s.data;"successful"!==a.auth&&o("Command initialization failed: ".concat(null!==(n=null==a?void 0:a.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":r=s.data,t.emit("command-result",r),null===(i=t.duplex)||void 0===i||i.end();break;case"stdOut":t.emit("std-out-data",s.data),t.stdOut.write(s.data);break;case"stdErr":t.emit("std-err-data",s.data),t.stdErr.write(s.data);break;case"error":o(s.data);break;default:var u="unable to parse message: ".concat(JSON.stringify(s));o(u)}})),t.duplex.on("end",(function(){t.emit("command-completed"),t.reset(),e(r)})),t.duplex.on("error",(function(n){t.emit("error",n),t.emit("command-completed"),t.reset(),e(r)}));var o=function(e){t.emit("error",e),t.reset(),n(new Error(e))};t.emit("command-started")})),[2,this.currentCommand]}))}))},e.prototype.initialAuth=function(){var t,e=this.execConfig,n=e.command,r=e.containerName,i=e.shell,o=e.user,s=e.group,a=e.ttyColumns,u=e.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:i,user:o,group:s,ttyColumns:a,ttyRows:u}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(c))},e.prototype.reset=function(){var t;this.remote=void 0,this.currentCommand=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(e),ua=function(){function t(t){this.contextProvider=t,this.assertStartedWithNodejs=function(){if(!na)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return P(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.serviceId,r=t.projectId,"service",i=A({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(i)]}))}))},t.prototype.execServiceSession=function(t,e){return P(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.serviceId,r=t.projectId,"service",i=A({projectId:r,entityId:n,entityType:"service"},e),[2,this.shellSession(i)]}))}))},t.prototype.execJobCommand=function(t,e){return P(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.jobId,r=t.projectId,"job",i=A({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(i)]}))}))},t.prototype.execJobSession=function(t,e){return P(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.jobId,r=t.projectId,"job",i=A({projectId:r,entityId:n,entityType:"job"},e),[2,this.shellSession(i)]}))}))},t.prototype.execCommand=function(t){return P(this,void 0,void 0,(function(){var e,n,r;return C(this,(function(i){switch(i.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(A({shell:"none"},t)),n=new ia,r=new ia,e.stdOut.pipe(n),e.stdErr.pipe(r),e.on("error",(function(t){throw new Error(t)})),[4,e.start()];case 1:return[2,{commandResult:i.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},t.prototype.shellSession=function(t){this.assertStartedWithNodejs();var e=this.getCommandRunner(t);return e.start(),e},t.prototype.getCommandRunner=function(t){var e=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new aa(e,t,n)},t}(),ca=function(t){function e(e){var n=this.constructor,r=t.call(this,e.message)||this;r.name="NorthflankApiCallError",r.message=e.message,r.status=e.status,r.id=e.id,r.details=e.details;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i,r}return S(e,t),e}(Error),la=na?Zr:window.fetch,da=function(){if(na)try{return JSON.parse(b.readFileSync(y.join(y.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(t){return console.log("Failed to check version of northflank CLI (".concat(t.message,")")),{}}return{}},pa=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return P(n,void 0,void 0,(function(){var e,n,r,i,o,s,a,u,c,l,d,p,h=this;return C(this,(function(f){switch(f.label){case 0:if(e=this.method,n={method:e,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return i="".concat(r).concat(this.endpointUrl(t)),o=this.body(t),s=A(A({url:i},n),{body:o}),[4,ma(i,A(A({},n),{body:o}))];case 1:return[4,(a=f.sent()).text()];case 2:return u=f.sent(),c=function(){if(200!==a.status){var t=null==l?void 0:l.error,e=(null==t?void 0:t.message)||"",n={status:a.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(h.opts.throwErrorOnHttpErrorCode)throw new ca(n);return n}},l=function(){try{return JSON.parse(u)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),d=c(),[2,{data:null==l?void 0:l.data,rawResponse:a,request:s,error:d,pagination:null==l?void 0:l.pagination}]}}))}))},this.contextProvider=t}return t.prototype.getDefaultHeaders=function(){var t,e,n=this.contextProvider.getCurrentToken(),r=(null===(t=this.opts)||void 0===t?void 0:t.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(e=da())||void 0===e?void 0:e.version).concat(r)}},t}(),ha=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return S(e,t),e}(pa),fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return S(e,t),e}(pa),va=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return S(e,t),e}(pa),ma=function(t,e,n,r){return void 0===e&&(e={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(i,o){var s=function(n){return la(t,e).then((function(t){i(t)})).catch((function(t){return P(void 0,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return n>0?[4,(i=r,new Promise((function(t){setTimeout((function(){t()}),i)})))]:[3,2];case 1:return e.sent(),[2,s(n-1)];case 2:return[2,o(t)]}var i}))}))}))};return s(n)}))},ba=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists projects for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),ya=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ga=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given project",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId)},e.body=function(){},e}return S(e,t),e}(ha),wa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given project. Fails if the project isn't empty.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId)},e.body=function(){},e}return S(e,t),e}(va),ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of addons belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),_a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Sa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(ha),Aa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(va),Pa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the credentials for connecting to the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/credentials")},e.body=function(){},e}return S(e,t),e}(ha),Ca=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the available addon types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/addon-types"},e.body=function(){},e}return S(e,t),e}(ha),Ea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the allocated resources for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),xa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the current addon version including available upgrades and upgrade history.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(){},e}return S(e,t),e}(ha),Ia=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Upgrades the addon to a new version.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Oa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the network settings for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ka=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the security rules for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Ua=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of backups for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Da=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Initiates a backup for the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Na=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given backup including restore history",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return S(e,t),e}(ha),Ba=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a given backup",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return S(e,t),e}(va),Ra=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores the given addon to the given backup state.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/restore")},e.body=function(){},e}return S(e,t),e}(fa),Ta=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Imports a database from an external archive or existing live database.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),La=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > Deployment > View Instances",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/containers").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),qa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pause")},e.body=function(){},e}return S(e,t),e}(fa),Fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resume the given addon if it is paused.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/resume")},e.body=function(){},e}return S(e,t),e}(fa),Ga=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restart the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/restart")},e.body=function(){},e}return S(e,t),e}(fa),Ma=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the in progress backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort")},e.body=function(){},e}return S(e,t),e}(fa),za=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/retain")},e.body=function(){},e}return S(e,t),e}(fa),Ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generates a temporary download link for downloading the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/download-link")},e.body=function(){},e}return S(e,t),e}(ha),Wa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts an in-progress backup restore.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort-restore")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),$a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about an addon's backup schedules",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Va=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Ha=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules/").concat(t.parameters.scheduleId)},e.body=function(){},e}return S(e,t),e}(va),Ya=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of past invoices",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Za=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Ka=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud providers",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/cloud-providers"},e.body=function(){},e}return S(e,t),e}(ha),Xa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Qa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),tu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return S(e,t),e}(ha),eu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given integration. Fails if the integration is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Delete",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return S(e,t),e}(va),ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists clusters for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ou=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return S(e,t),e}(ha),su=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update an existing cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),au=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given cluster. Fails if the cluster has associated projects.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Delete",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return S(e,t),e}(va),uu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of jobs belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),cu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return S(e,t),e}(ha),lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return S(e,t),e}(va),du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Scale Job",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modify cron job to toggle suspending of its schedule.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pause")},e.body=function(){},e}return S(e,t),e}(fa),mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetches run history for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Starts a new job run for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns data about the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return S(e,t),e}(ha),wu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return S(e,t),e}(va),ju=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates settings for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),_u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(){},e}return S(e,t),e}(ha),Su=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Au=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists builds for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given job. Given a commit sha, it will build that commit.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Cu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(ha),Eu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job build",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(va),xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Ou=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the Docker CMD override for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/cmd-override")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ku=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the Docker entrypoint override for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/entrypoint-override")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Uu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets build arguments for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > Update Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments/details")},e.body=function(){},e}return S(e,t),e}(ha),Bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > Update Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Tu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment/details")},e.body=function(){},e}return S(e,t),e}(ha),Lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(){},e}return S(e,t),e}(ha),qu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/containers").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/branches").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pull-requests").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),zu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the container registry credentials saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Ju=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new set of container registry credentials to this account.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Create",e.endpointUrl=function(t){return"/v1/integrations/registries"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Wu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Views a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read Encrypted",e.endpointUrl=function(t){return"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return S(e,t),e}(ha),$u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Delete",e.endpointUrl=function(t){return"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return S(e,t),e}(va),Vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Update",e.endpointUrl=function(t){return"/v1/integrations/registries/".concat(t.parameters.credentialId,"/modify")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available domains",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Registers a new domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Zu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return S(e,t),e}(ha),Ku=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a domain and each of its registered subdomains.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Delete",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return S(e,t),e}(va),Xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attempts to verify the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/verify")},e.body=function(){},e}return S(e,t),e}(fa),Qu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new subdomain to the domain.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),tc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return S(e,t),e}(ha),ec=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from a domain.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return S(e,t),e}(va),nc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/verify")},e.body=function(){},e}return S(e,t),e}(fa),rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assigns a service port to the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ic=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from its assigned service",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(){},e}return S(e,t),e}(va),oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available billing plans",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/plans"},e.body=function(){},e}return S(e,t),e}(ha),sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available project regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/regions"},e.body=function(){},e}return S(e,t),e}(ha),ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the partially random string used when generating host names for the authenticated account.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/dns-id"},e.body=function(){},e}return S(e,t),e}(ha),uc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists linked version control providers",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){return"/v1/integrations/vcs"},e.body=function(){},e}return S(e,t),e}(ha),cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of secrets belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/secrets").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),lc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),dc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret including its contents",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId).concat(r)},e.body=function(){},e}return S(e,t),e}(ha),pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(){},e}return S(e,t),e}(va),hc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),fc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret with details about its linked addons",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/details")},e.body=function(){},e}return S(e,t),e}(ha),vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Link an addon to the secret group or edit the settings of the linked addon.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a given addon link.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(ha),bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unlinks an addon from the secret group.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(va),yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of services belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),wc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),jc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),_c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId)},e.body=function(){},e}return S(e,t),e}(ha),Sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId)},e.body=function(){},e}return S(e,t),e}(va),Ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Scale Service",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(){},e}return S(e,t),e}(ha),Cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Ec=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restarts the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/restart")},e.body=function(){},e}return S(e,t),e}(fa),xc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pause")},e.body=function(){},e}return S(e,t),e}(fa),Ic=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(){},e}return S(e,t),e}(ha),kc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the list of ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Uc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Dc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given build or combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Nc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the Docker CMD override for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/cmd-override")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the Docker entrypoint override for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/entrypoint-override")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(){},e}return S(e,t),e}(ha),Tc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Lc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the builds for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Fc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(ha),Gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given service build",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(va),Mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/containers").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/branches").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Jc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pull-requests").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Wc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of templates",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),$c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return"/v1/templates"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId).concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Hc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Update",e.endpointUrl=function(t){return"/v1/templates/".concat(t.parameters.templateId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),Yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return"/v1/templates/".concat(t.parameters.templateId)},e.body=function(){},e}return S(e,t),e}(va),Zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Run a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Run",e.endpointUrl=function(t){return"/v1/templates/".concat(t.parameters.templateId,"/runs")},e.body=function(){},e}return S(e,t),e}(fa),Kc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId,"/runs").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Xc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId,"/runs/").concat(t.parameters.templateRunId).concat(r)},e.body=function(){},e}return S(e,t),e}(ha),Qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of repositories accessible to this account",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},e.body=function(){},e}return S(e,t),e}(ha),tl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of branches for the repo",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(t.parameters.vcsService,"/").concat(t.parameters.repositoryOwner,"/").concat(t.parameters.repositoryName,"/branches").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),el=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of volumes belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(){},e}return S(e,t),e}(ha),nl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a volume with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),rl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return S(e,t),e}(ha),il=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update volume mounts and storage size",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ol=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes this volume and its associated data.",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return S(e,t),e}(va),sl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),al=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Detach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ul=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Build Parameters",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),cl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the build arguments for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > Update Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),ll=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments/details")},e.body=function(){},e}return S(e,t),e}(ha),dl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Environment Variables",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment").concat(r)},e.body=function(){},e}return S(e,t),e}(ha),pl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > Update Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(fa),hl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment/details")},e.body=function(){},e}return S(e,t),e}(ha),fl=function(){function t(){this.loadContext()}return t.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},t.prototype.getInfo=function(){return""},t.prototype.storeContext=function(t){return P(this,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,this.writeContext(t)];case 1:return e.sent(),this.contextWrapper=t,[2]}}))}))},t.prototype.addContext=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){switch(o.label){case 0:if(e||void 0===this.findContext(t.name))return[3,1];throw new Error("Context with name ".concat(t.name," already exists"));case 1:return[4,this.removeContext(t.name)];case 2:o.sent(),o.label=3;case 3:return n=A({host:"https://api.northflank.com"},t),r=this.contextWrapper,i={current:n.name,contexts:E(E([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(i)];case 4:return o.sent(),[2]}}))}))},t.prototype.removeContext=function(t){return P(this,void 0,void 0,(function(){var e,n,r,i;return C(this,(function(o){switch(o.label){case 0:return e=this.contextWrapper,n=e.contexts.filter((function(e){return e.name!==t})),r=e.current===t?void 0:e.current,i={current:r,contexts:E([],n,!0),lastUpdateCheck:e.lastUpdateCheck},[4,this.storeContext(i)];case 1:return o.sent(),[2]}}))}))},t.prototype.getCurrentContext=function(){var t=this.contextWrapper.current;return void 0===t?t:this.findContext(t)},t.prototype.findContext=function(t){return this.contextWrapper.contexts.find((function(e){return e.name===t}))},t.prototype.getCurrentBaseUrl=function(t){var e=this.getCurrentContext();if(!0===t&&!(null==e?void 0:e.host))throw new Error("Context (".concat(null==e?void 0:e.name,") doesn't have a target API host. Please login again."));return null==e?void 0:e.host},t.prototype.getCurrentProjectName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.project},t.prototype.getCurrentName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.name},t.prototype.getCurrentToken=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.token},t.prototype.getCurrentServiceName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.service},t.prototype.getCurrentJobName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.job},t.prototype.getCurrentPlanId=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.plan},t.prototype.getCurrentRegion=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.region},t.prototype.useContext=function(t){return P(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(!this.findContext(t))throw new Error("Context with name ".concat(t," doesn't exist"));return e=this.contextWrapper,n=A(A({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.updateToken=function(t,e){return P(this,void 0,void 0,(function(){var n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:if(n=null!=e?e:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(e," doesn't exist"));return i=this.contextWrapper,o=i.contexts.map((function(e){return e.name===n?A(A({},r),{token:t}):e})),s=A(A({},i),{contexts:o}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},t.prototype.useProjectId=function(t){return P(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=A(A({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useServiceId=function(t){return P(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=A(A({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useJobId=function(t){return P(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=A(A({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.usePlanId=function(t){return P(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=A(A({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useRegion=function(t){return P(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=A(A({},e),{region:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},t.prototype.setLastUpdateCheck=function(t){return P(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:return e=this.contextWrapper,n=A(A({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t}(),vl=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return P(n,void 0,void 0,(function(){var e;return C(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,b.promises.mkdir(t,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 3:return[2]}}))}))},n.configPath=e||"".concat(d.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return S(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(b.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return P(this,void 0,void 0,(function(){var e;return C(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,b.promises.writeFile(this.configFile,JSON.stringify(t,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw e=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(e.message)),e;case 5:return[2]}}))}))},e.prototype.assertConfigDir=function(){return P(this,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return t.sent(),[2]}}))}))},e.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},e}(fl),ml=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return S(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return P(this,void 0,void 0,(function(){return C(this,(function(e){return this.inMemoryContextWrapper=t,[2]}))}))},e}(fl),bl=function(t,e){void 0===e&&(e={});var n,r=this;this.baseUrl=function(){return r.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new oa(t,new yc(t,e).call,new ja(t,e).call),this.exec=new ua(t),this.endpoints={list:(n={},n.projects=new ba(t,e),n.addons=new ja(t,e),n.invoices=new Ya(t,e),n.providers=new Ka(t,e),n.integrations=new Xa(t,e),n.clusters=new ru(t,e),n.jobs=new uu(t,e),n.registries=new zu(t,e),n.domains=new Hu(t,e),n.plans=new oc(t,e),n.regions=new sc(t,e),n.vcs=new uc(t,e),n.secrets=new cc(t,e),n.services=new yc(t,e),n.templates=new Wc(t,e),n.templateRuns=new Kc(t,e),n.repos=new Qc(t,e),n.branches=new tl(t,e),n.volumes=new el(t,e),n),create:function(){var n,r={};return r.project=new ya(t,e),r.addon=((n=new _a(t,e)).backupSchedule=new Va(t,e),n),r.integration=new Qa(t,e),r.cluster=new iu(t,e),r.job=function(){var n={};return n.manual=new du(t,e),n.cron=new pu(t,e),n}(),r.domain=new Yu(t,e),r.secret=new lc(t,e),r.service=function(){var n={};return n.combined=new gc(t,e),n.deployment=new wc(t,e),n.build=new jc(t,e),n}(),r.template=new $c(t,e),r.volume=new nl(t,e),r}(),get:function(){var n,r,i={};return i.project=new ga(t,e),i.addon=((r=new Sa(t,e)).credentials=new Pa(t,e),r.types=new Ca(t,e),r.version=new xa(t,e),r.backups=new Ua(t,e),r.backup=((n=new Na(t,e)).download=new Ja(t,e),n),r.containers=new La(t,e),r.backupSchedules=new $a(t,e),r),i.invoice=function(){var n={};return n.details=new Za(t,e),n}(),i.integration=new tu(t,e),i.cluster=new ou(t,e),i.job=function(){var n=new cu(t,e);return n.runs=new bu(t,e),n.run=new gu(t,e),n.healthChecks=new _u(t,e),n.builds=new Au(t,e),n.build=new Cu(t,e),n.buildArguments=new Uu(t,e),n.buildArgumentDetails=new Nu(t,e),n.runtimeEnvironment=new Bu(t,e),n.runtimeEnvironmentDetails=new Tu(t,e),n.deployment=new Lu(t,e),n.containers=new Fu(t,e),n.branches=new Gu(t,e),n.pullRequests=new Mu(t,e),n}(),i.registry=new Wu(t,e),i.domain=new Zu(t,e),i.subdomain=new tc(t,e),i.dnsId=new ac(t,e),i.secret=new dc(t,e),i.secretDetails=new fc(t,e),i.secretLink=new mc(t,e),i.service=function(){var n=new _c(t,e);return n.deployment=new Pc(t,e),n.ports=new Oc(t,e),n.healthChecks=new Rc(t,e),n.builds=new Lc(t,e),n.build=new Fc(t,e),n.containers=new Mc(t,e),n.branches=new zc(t,e),n.pullRequests=new Jc(t,e),n.buildArguments=new ul(t,e),n.buildArgumentDetails=new ll(t,e),n.runtimeEnvironment=new dl(t,e),n.runtimeEnvironmentDetails=new hl(t,e),n}(),i.template=new Vc(t,e),i.templateRun=new Xc(t,e),i.volume=new rl(t,e),i}(),delete:function(){var n,r={};return r.project=new wa(t,e),r.addon=((n=new Aa(t,e)).backupSchedule=new Ha(t,e),n),r.backup=new Ba(t,e),r.integration=new nu(t,e),r.cluster=new au(t,e),r.job=new lu(t,e),r.registry=new $u(t,e),r.domain=new Ku(t,e),r.subdomain=new ec(t,e),r.secret=new pc(t,e),r.secretLink=new bc(t,e),r.service=new Sc(t,e),r.template=new Yc(t,e),r.volume=new ol(t,e),r}(),scale:function(){var n={};return n.addon=new Ea(t,e),n.job=new hu(t,e),n.service=new Ac(t,e),n}(),update:function(){var n,r={};return r.addon=((n={}).version=new Ia(t,e),n.networkSettings=new Oa(t,e),n.security=new ka(t,e),n),r.integration=new eu(t,e),r.cluster=new su(t,e),r.job=function(){var n={};return n.settings=new ju(t,e),n.healthChecks=new Su(t,e),n.buildOptions=new xu(t,e),n.buildSource=new Iu(t,e),n.cmdOverride=new Ou(t,e),n.entrypointOverride=new ku(t,e),n.buildArguments=new Du(t,e),n.runtimeEnvironment=new Ru(t,e),n.deployment=new qu(t,e),n}(),r.registry=new Vu(t,e),r.secret=new hc(t,e),r.secretLink=new vc(t,e),r.service=function(){var n={};return n.deployment=new Cc(t,e),n.ports=new kc(t,e),n.buildOptions=new Uc(t,e),n.buildSource=new Dc(t,e),n.cmdOverride=new Nc(t,e),n.entrypointOverride=new Bc(t,e),n.healthChecks=new Tc(t,e),n.buildArguments=new cl(t,e),n.runtimeEnvironment=new pl(t,e),n}(),r.template=new Hc(t,e),r.volume=new il(t,e),r}(),backup:function(){var n={};return n.addon=new Da(t,e),n}(),restore:function(){var n,r={};return r.addon=((n={}).backup=new Ra(t,e),n),r}(),import:function(){var n,r={};return r.addon=((n={}).backup=new Ta(t,e),n),r}(),pause:function(){var n={};return n.addon=new qa(t,e),n.job=new vu(t,e),n.service=new xc(t,e),n}(),resume:function(){var n={};return n.addon=new Fa(t,e),n.job=new mu(t,e),n.service=new Ic(t,e),n}(),restart:function(){var n={};return n.addon=new Ga(t,e),n.service=new Ec(t,e),n}(),abort:function(){var n,r={};return r.addon=((n={}).backup=new Ma(t,e),n.restore=new Wa(t,e),n),r.job=function(){var n={};return n.run=new wu(t,e),n.build=new Eu(t,e),n}(),r.service=function(){var n={};return n.build=new Gc(t,e),n}(),r}(),retain:function(){var n,r={};return r.addon=((n={}).backup=new za(t,e),n),r}(),suspend:function(){var n={};return n.job=new fu(t,e),n}(),start:function(){var n,r={};return r.job=((n={}).run=new yu(t,e),n.build=new Pu(t,e),n),r.service=function(){var n={};return n.build=new qc(t,e),n}(),r}(),add:function(){var n,r={};return r.registry=new Ju(t,e),r.domain=((n={}).subdomain=new Qu(t,e),n),r}(),verify:function(){var n={};return n.domain=new Xu(t,e),n.subdomain=new nc(t,e),n}(),assign:function(){var n,r={};return r.subdomain=((n={}).service=new rc(t,e),n),r}(),unassign:function(){var n={};return n.subdomain=new ic(t,e),n}(),run:function(){var n={};return n.template=new Zc(t,e),n}(),attach:function(){var n={};return n.volume=new sl(t,e),n}(),detach:function(){var n={};return n.volume=new al(t,e),n}()},this.list=function(){var t={};return t.projects=r.endpoints.list.projects.call,t.addons=r.endpoints.list.addons.call,t.invoices=r.endpoints.list.invoices.call,t.providers=r.endpoints.list.providers.call,t.integrations=r.endpoints.list.integrations.call,t.clusters=r.endpoints.list.clusters.call,t.jobs=r.endpoints.list.jobs.call,t.registries=r.endpoints.list.registries.call,t.domains=r.endpoints.list.domains.call,t.plans=r.endpoints.list.plans.call,t.regions=r.endpoints.list.regions.call,t.vcs=r.endpoints.list.vcs.call,t.secrets=r.endpoints.list.secrets.call,t.services=r.endpoints.list.services.call,t.templates=r.endpoints.list.templates.call,t.templateRuns=r.endpoints.list.templateRuns.call,t.repos=r.endpoints.list.repos.call,t.branches=r.endpoints.list.branches.call,t.volumes=r.endpoints.list.volumes.call,t}(),this.create=function(){var t,e={};return e.project=r.endpoints.create.project.call,e.addon=((t=r.endpoints.create.addon.call).backupSchedule=r.endpoints.create.addon.backupSchedule.call,t),e.integration=r.endpoints.create.integration.call,e.cluster=r.endpoints.create.cluster.call,e.job=function(){var t={};return t.manual=r.endpoints.create.job.manual.call,t.cron=r.endpoints.create.job.cron.call,t}(),e.domain=r.endpoints.create.domain.call,e.secret=r.endpoints.create.secret.call,e.service=function(){var t={};return t.combined=r.endpoints.create.service.combined.call,t.deployment=r.endpoints.create.service.deployment.call,t.build=r.endpoints.create.service.build.call,t}(),e.template=r.endpoints.create.template.call,e.volume=r.endpoints.create.volume.call,e}(),this.get=function(){var t,e,n={};return n.project=r.endpoints.get.project.call,n.addon=((e=r.endpoints.get.addon.call).credentials=r.endpoints.get.addon.credentials.call,e.types=r.endpoints.get.addon.types.call,e.version=r.endpoints.get.addon.version.call,e.backups=r.endpoints.get.addon.backups.call,e.backup=((t=r.endpoints.get.addon.backup.call).download=r.endpoints.get.addon.backup.download.call,t),e.containers=r.endpoints.get.addon.containers.call,e.backupSchedules=r.endpoints.get.addon.backupSchedules.call,e),n.invoice=function(){var t={};return t.details=r.endpoints.get.invoice.details.call,t}(),n.integration=r.endpoints.get.integration.call,n.cluster=r.endpoints.get.cluster.call,n.job=function(){var t=r.endpoints.get.job.call;return t.runs=r.endpoints.get.job.runs.call,t.run=r.endpoints.get.job.run.call,t.healthChecks=r.endpoints.get.job.healthChecks.call,t.builds=r.endpoints.get.job.builds.call,t.build=r.endpoints.get.job.build.call,t.buildArguments=r.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=r.endpoints.get.job.buildArgumentDetails.call,t.runtimeEnvironment=r.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=r.endpoints.get.job.runtimeEnvironmentDetails.call,t.deployment=r.endpoints.get.job.deployment.call,t.containers=r.endpoints.get.job.containers.call,t.branches=r.endpoints.get.job.branches.call,t.pullRequests=r.endpoints.get.job.pullRequests.call,t}(),n.registry=r.endpoints.get.registry.call,n.domain=r.endpoints.get.domain.call,n.subdomain=r.endpoints.get.subdomain.call,n.dnsId=r.endpoints.get.dnsId.call,n.secret=r.endpoints.get.secret.call,n.secretDetails=r.endpoints.get.secretDetails.call,n.secretLink=r.endpoints.get.secretLink.call,n.service=function(){var t=r.endpoints.get.service.call;return t.deployment=r.endpoints.get.service.deployment.call,t.ports=r.endpoints.get.service.ports.call,t.healthChecks=r.endpoints.get.service.healthChecks.call,t.builds=r.endpoints.get.service.builds.call,t.build=r.endpoints.get.service.build.call,t.containers=r.endpoints.get.service.containers.call,t.branches=r.endpoints.get.service.branches.call,t.pullRequests=r.endpoints.get.service.pullRequests.call,t.buildArguments=r.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=r.endpoints.get.service.buildArgumentDetails.call,t.runtimeEnvironment=r.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=r.endpoints.get.service.runtimeEnvironmentDetails.call,t}(),n.template=r.endpoints.get.template.call,n.templateRun=r.endpoints.get.templateRun.call,n.volume=r.endpoints.get.volume.call,n}(),this.delete=function(){var t,e={};return e.project=r.endpoints.delete.project.call,e.addon=((t=r.endpoints.delete.addon.call).backupSchedule=r.endpoints.delete.addon.backupSchedule.call,t),e.backup=r.endpoints.delete.backup.call,e.integration=r.endpoints.delete.integration.call,e.cluster=r.endpoints.delete.cluster.call,e.job=r.endpoints.delete.job.call,e.registry=r.endpoints.delete.registry.call,e.domain=r.endpoints.delete.domain.call,e.subdomain=r.endpoints.delete.subdomain.call,e.secret=r.endpoints.delete.secret.call,e.secretLink=r.endpoints.delete.secretLink.call,e.service=r.endpoints.delete.service.call,e.template=r.endpoints.delete.template.call,e.volume=r.endpoints.delete.volume.call,e}(),this.scale=function(){var t={};return t.addon=r.endpoints.scale.addon.call,t.job=r.endpoints.scale.job.call,t.service=r.endpoints.scale.service.call,t}(),this.update=function(){var t,e={};return e.addon=((t={}).version=r.endpoints.update.addon.version.call,t.networkSettings=r.endpoints.update.addon.networkSettings.call,t.security=r.endpoints.update.addon.security.call,t),e.integration=r.endpoints.update.integration.call,e.cluster=r.endpoints.update.cluster.call,e.job=function(){var t={};return t.settings=r.endpoints.update.job.settings.call,t.healthChecks=r.endpoints.update.job.healthChecks.call,t.buildOptions=r.endpoints.update.job.buildOptions.call,t.buildSource=r.endpoints.update.job.buildSource.call,t.cmdOverride=r.endpoints.update.job.cmdOverride.call,t.entrypointOverride=r.endpoints.update.job.entrypointOverride.call,t.buildArguments=r.endpoints.update.job.buildArguments.call,t.runtimeEnvironment=r.endpoints.update.job.runtimeEnvironment.call,t.deployment=r.endpoints.update.job.deployment.call,t}(),e.registry=r.endpoints.update.registry.call,e.secret=r.endpoints.update.secret.call,e.secretLink=r.endpoints.update.secretLink.call,e.service=function(){var t={};return t.deployment=r.endpoints.update.service.deployment.call,t.ports=r.endpoints.update.service.ports.call,t.buildOptions=r.endpoints.update.service.buildOptions.call,t.buildSource=r.endpoints.update.service.buildSource.call,t.cmdOverride=r.endpoints.update.service.cmdOverride.call,t.entrypointOverride=r.endpoints.update.service.entrypointOverride.call,t.healthChecks=r.endpoints.update.service.healthChecks.call,t.buildArguments=r.endpoints.update.service.buildArguments.call,t.runtimeEnvironment=r.endpoints.update.service.runtimeEnvironment.call,t}(),e.template=r.endpoints.update.template.call,e.volume=r.endpoints.update.volume.call,e}(),this.backup=function(){var t={};return t.addon=r.endpoints.backup.addon.call,t}(),this.restore=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.restore.addon.backup.call,t),e}(),this.import=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.import.addon.backup.call,t),e}(),this.pause=function(){var t={};return t.addon=r.endpoints.pause.addon.call,t.job=r.endpoints.pause.job.call,t.service=r.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.addon=r.endpoints.resume.addon.call,t.job=r.endpoints.resume.job.call,t.service=r.endpoints.resume.service.call,t}(),this.restart=function(){var t={};return t.addon=r.endpoints.restart.addon.call,t.service=r.endpoints.restart.service.call,t}(),this.abort=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.abort.addon.backup.call,t.restore=r.endpoints.abort.addon.restore.call,t),e.job=function(){var t={};return t.run=r.endpoints.abort.job.run.call,t.build=r.endpoints.abort.job.build.call,t}(),e.service=function(){var t={};return t.build=r.endpoints.abort.service.build.call,t}(),e}(),this.retain=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.retain.addon.backup.call,t),e}(),this.suspend=function(){var t={};return t.job=r.endpoints.suspend.job.call,t}(),this.start=function(){var t,e={};return e.job=((t={}).run=r.endpoints.start.job.run.call,t.build=r.endpoints.start.job.build.call,t),e.service=function(){var t={};return t.build=r.endpoints.start.service.build.call,t}(),e}(),this.add=function(){var t,e={};return e.registry=r.endpoints.add.registry.call,e.domain=((t={}).subdomain=r.endpoints.add.domain.subdomain.call,t),e}(),this.verify=function(){var t={};return t.domain=r.endpoints.verify.domain.call,t.subdomain=r.endpoints.verify.subdomain.call,t}(),this.assign=function(){var t,e={};return e.subdomain=((t={}).service=r.endpoints.assign.subdomain.service.call,t),e}(),this.unassign=function(){var t={};return t.subdomain=r.endpoints.unassign.subdomain.call,t}(),this.run=function(){var t={};return t.template=r.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=r.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=r.endpoints.detach.volume.call,t}()};export{Ma as AbortAddonBackupEndpoint,Wa as AbortAddonRestoreEndpoint,Eu as AbortJobBuildEndpoint,wu as AbortJobRunEndpoint,Gc as AbortServiceBuildEndpoint,Qu as AddDomainSubdomainEndpoint,Ju as AddRegistryEndpoint,bl as ApiClient,fl as ApiClientContextProvider,vl as ApiClientFileContextProvider,ml as ApiClientInMemoryContextProvider,pa as ApiEndpoint,rc as AssignSubdomainServiceEndpoint,sl as AttachVolumeEndpoint,Da as BackupAddonEndpoint,Va as CreateAddonBackupscheduleEndpoint,_a as CreateAddonEndpoint,iu as CreateClusterEndpoint,Yu as CreateDomainEndpoint,Qa as CreateIntegrationEndpoint,pu as CreateJobCronEndpoint,du as CreateJobManualEndpoint,ya as CreateProjectEndpoint,lc as CreateSecretEndpoint,jc as CreateServiceBuildEndpoint,gc as CreateServiceCombinedEndpoint,wc as CreateServiceDeploymentEndpoint,$c as CreateTemplateEndpoint,nl as CreateVolumeEndpoint,Ha as DeleteAddonBackupscheduleEndpoint,Aa as DeleteAddonEndpoint,va as DeleteApiEndpoint,Ba as DeleteBackupEndpoint,au as DeleteClusterEndpoint,Ku as DeleteDomainEndpoint,nu as DeleteIntegrationEndpoint,lu as DeleteJobEndpoint,wa as DeleteProjectEndpoint,$u as DeleteRegistryEndpoint,pc as DeleteSecretEndpoint,bc as DeleteSecretlinkEndpoint,Sc as DeleteServiceEndpoint,ec as DeleteSubdomainEndpoint,Yc as DeleteTemplateEndpoint,ol as DeleteVolumeEndpoint,al as DetachVolumeEndpoint,aa as ExecCommandStandard,Ja as GetAddonBackupDownloadEndpoint,Na as GetAddonBackupEndpoint,Ua as GetAddonBackupsEndpoint,$a as GetAddonBackupschedulesEndpoint,La as GetAddonContainersEndpoint,Pa as GetAddonCredentialsEndpoint,Sa as GetAddonEndpoint,Ca as GetAddonTypesEndpoint,xa as GetAddonVersionEndpoint,ha as GetApiEndpoint,ou as GetClusterEndpoint,ac as GetDnsidEndpoint,Zu as GetDomainEndpoint,tu as GetIntegrationEndpoint,Za as GetInvoiceDetailsEndpoint,Gu as GetJobBranchesEndpoint,Cu as GetJobBuildEndpoint,Nu as GetJobBuildargumentdetailsEndpoint,Uu as GetJobBuildargumentsEndpoint,Au as GetJobBuildsEndpoint,Fu as GetJobContainersEndpoint,Lu as GetJobDeploymentEndpoint,cu as GetJobEndpoint,_u as GetJobHealthchecksEndpoint,Mu as GetJobPullrequestsEndpoint,gu as GetJobRunEndpoint,bu as GetJobRunsEndpoint,Bu as GetJobRuntimeenvironmentEndpoint,Tu as GetJobRuntimeenvironmentdetailsEndpoint,ga as GetProjectEndpoint,Wu as GetRegistryEndpoint,dc as GetSecretEndpoint,fc as GetSecretdetailsEndpoint,mc as GetSecretlinkEndpoint,zc as GetServiceBranchesEndpoint,Fc as GetServiceBuildEndpoint,ll as GetServiceBuildargumentdetailsEndpoint,ul as GetServiceBuildargumentsEndpoint,Lc as GetServiceBuildsEndpoint,Mc as GetServiceContainersEndpoint,Pc as GetServiceDeploymentEndpoint,_c as GetServiceEndpoint,Rc as GetServiceHealthchecksEndpoint,Oc as GetServicePortsEndpoint,Jc as GetServicePullrequestsEndpoint,dl as GetServiceRuntimeenvironmentEndpoint,hl as GetServiceRuntimeenvironmentdetailsEndpoint,tc as GetSubdomainEndpoint,Vc as GetTemplateEndpoint,Xc as GetTemplaterunEndpoint,rl as GetVolumeEndpoint,Ta as ImportAddonBackupEndpoint,ja as ListAddonsEndpoint,tl as ListBranchesEndpoint,ru as ListClustersEndpoint,Hu as ListDomainsEndpoint,Xa as ListIntegrationsEndpoint,Ya as ListInvoicesEndpoint,uu as ListJobsEndpoint,oc as ListPlansEndpoint,ba as ListProjectsEndpoint,Ka as ListProvidersEndpoint,sc as ListRegionsEndpoint,zu as ListRegistriesEndpoint,Qc as ListReposEndpoint,cc as ListSecretsEndpoint,yc as ListServicesEndpoint,Kc as ListTemplaterunsEndpoint,Wc as ListTemplatesEndpoint,uc as ListVcsEndpoint,el as ListVolumesEndpoint,ca as NorthflankApiCallError,ua as NorthflankExecCommand,oa as NorthflankPortForwarder,qa as PauseAddonEndpoint,vu as PauseJobEndpoint,xc as PauseServiceEndpoint,fa as PostApiEndpoint,Ga as RestartAddonEndpoint,Ec as RestartServiceEndpoint,Ra as RestoreAddonBackupEndpoint,Fa as ResumeAddonEndpoint,mu as ResumeJobEndpoint,Ic as ResumeServiceEndpoint,za as RetainAddonBackupEndpoint,Zc as RunTemplateEndpoint,Ea as ScaleAddonEndpoint,hu as ScaleJobEndpoint,Ac as ScaleServiceEndpoint,Pu as StartJobBuildEndpoint,yu as StartJobRunEndpoint,qc as StartServiceBuildEndpoint,fu as SuspendJobEndpoint,ic as UnassignSubdomainEndpoint,Oa as UpdateAddonNetworksettingsEndpoint,ka as UpdateAddonSecurityEndpoint,Ia as UpdateAddonVersionEndpoint,su as UpdateClusterEndpoint,eu as UpdateIntegrationEndpoint,Du as UpdateJobBuildargumentsEndpoint,xu as UpdateJobBuildoptionsEndpoint,Iu as UpdateJobBuildsourceEndpoint,Ou as UpdateJobCmdoverrideEndpoint,qu as UpdateJobDeploymentEndpoint,ku as UpdateJobEntrypointoverrideEndpoint,Su as UpdateJobHealthchecksEndpoint,Ru as UpdateJobRuntimeenvironmentEndpoint,ju as UpdateJobSettingsEndpoint,Vu as UpdateRegistryEndpoint,hc as UpdateSecretEndpoint,vc as UpdateSecretlinkEndpoint,cl as UpdateServiceBuildargumentsEndpoint,Uc as UpdateServiceBuildoptionsEndpoint,Dc as UpdateServiceBuildsourceEndpoint,Nc as UpdateServiceCmdoverrideEndpoint,Cc as UpdateServiceDeploymentEndpoint,Bc as UpdateServiceEntrypointoverrideEndpoint,Tc as UpdateServiceHealthchecksEndpoint,kc as UpdateServicePortsEndpoint,pl as UpdateServiceRuntimeenvironmentEndpoint,Hc as UpdateTemplateEndpoint,il as UpdateVolumeEndpoint,Xu as VerifyDomainEndpoint,nc as VerifySubdomainEndpoint};
1
+ import t,{EventEmitter as e}from"events";import*as n from"stream";import r,{Transform as i}from"stream";import o from"http";import s,{fileURLToPath as a}from"url";import u from"punycode";import c from"https";import l from"zlib";import d from"os";import*as p from"net";import h,{Socket as f}from"net";import{spawn as v,execSync as m}from"child_process";import b from"fs";import y from"path";import g from"tls";import w from"crypto";import j from"dgram";var _=function(t,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},_(t,e)};function S(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var P=function(){return P=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},P.apply(this,arguments)};function A(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}function C(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function E(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var I="object"==typeof global&&global&&global.Object===Object&&global,k="object"==typeof self&&self&&self.Object===Object&&self,O=I||k||Function("return this")(),x=O.Symbol,U=Object.prototype,D=U.hasOwnProperty,N=U.toString,R=x?x.toStringTag:void 0;var B=Object.prototype.toString;var T=x?x.toStringTag:void 0;function L(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":T&&T in Object(t)?function(t){var e=D.call(t,R),n=t[R];try{t[R]=void 0;var r=!0}catch(t){}var i=N.call(t);return r&&(e?t[R]=n:delete t[R]),i}(t):function(t){return B.call(t)}(t)}function q(t){return null!=t&&"object"==typeof t}function F(t){return"symbol"==typeof t||q(t)&&"[object Symbol]"==L(t)}function G(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var M=Array.isArray,J=x?x.prototype:void 0,z=J?J.toString:void 0;function W(t){if("string"==typeof t)return t;if(M(t))return G(t,W)+"";if(F(t))return z?z.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function $(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function V(t){return t}function H(t){if(!$(t))return!1;var e=L(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Y,Z=O["__core-js_shared__"],K=(Y=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var X=Function.prototype.toString;function Q(t){if(null!=t){try{return X.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var tt=/^\[object .+?Constructor\]$/,et=Function.prototype,nt=Object.prototype,rt=et.toString,it=nt.hasOwnProperty,ot=RegExp("^"+rt.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function st(t){return!(!$(t)||(e=t,K&&K in e))&&(H(t)?ot:tt).test(Q(t));var e}function at(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return st(n)?n:void 0}var ut=at(O,"WeakMap"),ct=Object.create,lt=function(){function t(){}return function(e){if(!$(e))return{};if(ct)return ct(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function dt(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var pt=Date.now;var ht,ft,vt,mt=function(){try{var t=at(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),bt=mt,yt=bt?function(t,e){return bt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:V,gt=(ht=yt,ft=0,vt=0,function(){var t=pt(),e=16-(t-vt);if(vt=t,e>0){if(++ft>=800)return arguments[0]}else ft=0;return ht.apply(void 0,arguments)}),wt=/^(?:0|[1-9]\d*)$/;function jt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&wt.test(t))&&t>-1&&t%1==0&&t<e}function _t(t,e,n){"__proto__"==e&&bt?bt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function St(t,e){return t===e||t!=t&&e!=e}var Pt=Object.prototype.hasOwnProperty;function At(t,e,n){var r=t[e];Pt.call(t,e)&&St(r,n)&&(void 0!==n||e in t)||_t(t,e,n)}var Ct=Math.max;function Et(t,e){return gt(function(t,e,n){return e=Ct(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Ct(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),dt(t,this,a)}}(t,e,V),t+"")}function It(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function kt(t){return null!=t&&It(t.length)&&!H(t)}var Ot=Object.prototype;function xt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function Ut(t){return q(t)&&"[object Arguments]"==L(t)}var Dt=Object.prototype,Nt=Dt.hasOwnProperty,Rt=Dt.propertyIsEnumerable,Bt=Ut(function(){return arguments}())?Ut:function(t){return q(t)&&Nt.call(t,"callee")&&!Rt.call(t,"callee")};var Tt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Tt&&"object"==typeof module&&module&&!module.nodeType&&module,qt=Lt&&Lt.exports===Tt?O.Buffer:void 0,Ft=(qt?qt.isBuffer:void 0)||function(){return!1},Gt={};Gt["[object Float32Array]"]=Gt["[object Float64Array]"]=Gt["[object Int8Array]"]=Gt["[object Int16Array]"]=Gt["[object Int32Array]"]=Gt["[object Uint8Array]"]=Gt["[object Uint8ClampedArray]"]=Gt["[object Uint16Array]"]=Gt["[object Uint32Array]"]=!0,Gt["[object Arguments]"]=Gt["[object Array]"]=Gt["[object ArrayBuffer]"]=Gt["[object Boolean]"]=Gt["[object DataView]"]=Gt["[object Date]"]=Gt["[object Error]"]=Gt["[object Function]"]=Gt["[object Map]"]=Gt["[object Number]"]=Gt["[object Object]"]=Gt["[object RegExp]"]=Gt["[object Set]"]=Gt["[object String]"]=Gt["[object WeakMap]"]=!1;var Mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Jt=Mt&&"object"==typeof module&&module&&!module.nodeType&&module,zt=Jt&&Jt.exports===Mt&&I.process,Wt=function(){try{var t=Jt&&Jt.require&&Jt.require("util").types;return t||zt&&zt.binding&&zt.binding("util")}catch(t){}}(),$t=Wt&&Wt.isTypedArray,Vt=$t?function(t){return function(e){return t(e)}}($t):function(t){return q(t)&&It(t.length)&&!!Gt[L(t)]},Ht=Vt,Yt=Object.prototype.hasOwnProperty;function Zt(t,e){var n=M(t),r=!n&&Bt(t),i=!n&&!r&&Ft(t),o=!n&&!r&&!i&&Ht(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=a.length;for(var c in t)!e&&!Yt.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||jt(c,u))||a.push(c);return a}function Kt(t,e){return function(n){return t(e(n))}}var Xt=Kt(Object.keys,Object),Qt=Object.prototype.hasOwnProperty;function te(t){return kt(t)?Zt(t):function(t){if(!xt(t))return Xt(t);var e=[];for(var n in Object(t))Qt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var ee=Object.prototype.hasOwnProperty;function ne(t){if(!$(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=xt(t),n=[];for(var r in t)("constructor"!=r||!e&&ee.call(t,r))&&n.push(r);return n}function re(t){return kt(t)?Zt(t,!0):ne(t)}var ie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oe=/^\w*$/;function se(t,e){if(M(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!F(t))||(oe.test(t)||!ie.test(t)||null!=e&&t in Object(e))}var ae=at(Object,"create");var ue=Object.prototype.hasOwnProperty;var ce=Object.prototype.hasOwnProperty;function le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function de(t,e){for(var n=t.length;n--;)if(St(t[n][0],e))return n;return-1}le.prototype.clear=function(){this.__data__=ae?ae(null):{},this.size=0},le.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},le.prototype.get=function(t){var e=this.__data__;if(ae){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ue.call(e,t)?e[t]:void 0},le.prototype.has=function(t){var e=this.__data__;return ae?void 0!==e[t]:ce.call(e,t)},le.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ae&&void 0===e?"__lodash_hash_undefined__":e,this};var pe=Array.prototype.splice;function he(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=de(e,t);return!(n<0)&&(n==e.length-1?e.pop():pe.call(e,n,1),--this.size,!0)},he.prototype.get=function(t){var e=this.__data__,n=de(e,t);return n<0?void 0:e[n][1]},he.prototype.has=function(t){return de(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=de(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var fe=at(O,"Map");function ve(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function me(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}me.prototype.clear=function(){this.size=0,this.__data__={hash:new le,map:new(fe||he),string:new le}},me.prototype.delete=function(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e},me.prototype.get=function(t){return ve(this,t).get(t)},me.prototype.has=function(t){return ve(this,t).has(t)},me.prototype.set=function(t,e){var n=ve(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function be(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(be.Cache||me),n}be.Cache=me;var ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ge=/\\(\\)?/g,we=function(t){var e=be(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ye,(function(t,n,r,i){e.push(r?i.replace(ge,"$1"):n||t)})),e})),je=we;function _e(t){return null==t?"":W(t)}function Se(t,e){return M(t)?t:se(t,e)?[t]:je(_e(t))}function Pe(t){if("string"==typeof t||F(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Ae(t,e){for(var n=0,r=(e=Se(e,t)).length;null!=t&&n<r;)t=t[Pe(e[n++])];return n&&n==r?t:void 0}function Ce(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Ee=x?x.isConcatSpreadable:void 0;function Ie(t){return M(t)||Bt(t)||!!(Ee&&t&&t[Ee])}function ke(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Ie),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?ke(a,e-1,n,r,i):Ce(i,a):r||(i[i.length]=a)}return i}var Oe=Kt(Object.getPrototypeOf,Object),xe=Function.prototype,Ue=Object.prototype,De=xe.toString,Ne=Ue.hasOwnProperty,Re=De.call(Object);function Be(t){var e=this.__data__=new he(t);this.size=e.size}Be.prototype.clear=function(){this.__data__=new he,this.size=0},Be.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Be.prototype.get=function(t){return this.__data__.get(t)},Be.prototype.has=function(t){return this.__data__.has(t)},Be.prototype.set=function(t,e){var n=this.__data__;if(n instanceof he){var r=n.__data__;if(!fe||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new me(r)}return n.set(t,e),this.size=n.size,this};var Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,Le=Te&&"object"==typeof module&&module&&!module.nodeType&&module,qe=Le&&Le.exports===Te?O.Buffer:void 0,Fe=qe?qe.allocUnsafe:void 0;var Ge=Object.prototype.propertyIsEnumerable,Me=Object.getOwnPropertySymbols,Je=Me?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}(Me(t),(function(e){return Ge.call(t,e)})))}:function(){return[]};function ze(t){return function(t,e,n){var r=e(t);return M(t)?r:Ce(r,n(t))}(t,te,Je)}var We=at(O,"DataView"),$e=at(O,"Promise"),Ve=at(O,"Set"),He=Q(We),Ye=Q(fe),Ze=Q($e),Ke=Q(Ve),Xe=Q(ut),Qe=L;(We&&"[object DataView]"!=Qe(new We(new ArrayBuffer(1)))||fe&&"[object Map]"!=Qe(new fe)||$e&&"[object Promise]"!=Qe($e.resolve())||Ve&&"[object Set]"!=Qe(new Ve)||ut&&"[object WeakMap]"!=Qe(new ut))&&(Qe=function(t){var e=L(t),n="[object Object]"==e?t.constructor:void 0,r=n?Q(n):"";if(r)switch(r){case He:return"[object DataView]";case Ye:return"[object Map]";case Ze:return"[object Promise]";case Ke:return"[object Set]";case Xe:return"[object WeakMap]"}return e});var tn=Qe,en=O.Uint8Array;function nn(t,e){var n,r,i=e?(n=t.buffer,r=new n.constructor(n.byteLength),new en(r).set(new en(n)),r):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function rn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new me;++e<n;)this.add(t[e])}function on(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}rn.prototype.add=rn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},rn.prototype.has=function(t){return this.__data__.has(t)};function sn(t,e,n,r,i,o){var s=1&n,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var c=o.get(t),l=o.get(e);if(c&&l)return c==e&&l==t;var d=-1,p=!0,h=2&n?new rn:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var f=t[d],v=e[d];if(r)var m=s?r(v,f,d,e,t,o):r(f,v,d,t,e,o);if(void 0!==m){if(m)continue;p=!1;break}if(h){if(!on(e,(function(t,e){if(s=e,!h.has(s)&&(f===t||i(f,t,n,r,o)))return h.push(e);var s}))){p=!1;break}}else if(f!==v&&!i(f,v,n,r,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var cn=x?x.prototype:void 0,ln=cn?cn.valueOf:void 0;var dn=Object.prototype.hasOwnProperty;var pn="[object Object]",hn=Object.prototype.hasOwnProperty;function fn(t,e,n,r,i,o){var s=M(t),a=M(e),u=s?"[object Array]":tn(t),c=a?"[object Array]":tn(e),l=(u="[object Arguments]"==u?pn:u)==pn,d=(c="[object Arguments]"==c?pn:c)==pn,p=u==c;if(p&&Ft(t)){if(!Ft(e))return!1;s=!0,l=!1}if(p&&!l)return o||(o=new Be),s||Ht(t)?sn(t,e,n,r,i,o):function(t,e,n,r,i,o,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new en(t),new en(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return St(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=an;case"[object Set]":var u=1&r;if(a||(a=un),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var l=sn(a(t),a(e),r,i,o,s);return s.delete(t),l;case"[object Symbol]":if(ln)return ln.call(t)==ln.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var h=l&&hn.call(t,"__wrapped__"),f=d&&hn.call(e,"__wrapped__");if(h||f){var v=h?t.value():t,m=f?e.value():e;return o||(o=new Be),i(v,m,n,r,o)}}return!!p&&(o||(o=new Be),function(t,e,n,r,i,o){var s=1&n,a=ze(t),u=a.length;if(u!=ze(e).length&&!s)return!1;for(var c=u;c--;){var l=a[c];if(!(s?l in e:dn.call(e,l)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var h=!0;o.set(t,e),o.set(e,t);for(var f=s;++c<u;){var v=t[l=a[c]],m=e[l];if(r)var b=s?r(m,v,l,e,t,o):r(v,m,l,t,e,o);if(!(void 0===b?v===m||i(v,m,n,r,o):b)){h=!1;break}f||(f="constructor"==l)}if(h&&!f){var y=t.constructor,g=e.constructor;y==g||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(h=!1)}return o.delete(t),o.delete(e),h}(t,e,n,r,i,o))}function vn(t,e,n,r,i){return t===e||(null==t||null==e||!q(t)&&!q(e)?t!=t&&e!=e:fn(t,e,n,r,vn,i))}function mn(t){return t==t&&!$(t)}function bn(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function yn(t){var e=function(t){for(var e=te(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,mn(i)]}return e}(t);return 1==e.length&&e[0][2]?bn(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var u=(a=n[i])[0],c=t[u],l=a[1];if(s&&a[2]){if(void 0===c&&!(u in t))return!1}else{var d=new Be;if(r)var p=r(c,l,u,t,e,d);if(!(void 0===p?vn(l,c,3,r,d):p))return!1}}return!0}(n,t,e)}}function gn(t,e){return null!=t&&e in Object(t)}function wn(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Se(e,t)).length,o=!1;++r<i;){var s=Pe(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&It(i)&&jt(s,i)&&(M(t)||Bt(t))}(t,e,gn)}function jn(t,e){return se(t)&&mn(e)?bn(Pe(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ae(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?wn(n,t):vn(e,r,3)}}function _n(t){return se(t)?(e=Pe(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ae(e,t)}}(t);var e}function Sn(t){return"function"==typeof t?t:null==t?V:"object"==typeof t?M(t)?jn(t[0],t[1]):yn(t):_n(t)}var Pn,An=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),s=o.length;s--;){var a=o[Pn?s:++r];if(!1===e(i[a],a,i))break}return t};var Cn=function(t,e){return function(n,r){if(null==n)return n;if(!kt(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=Object(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}((function(t,e){return t&&An(t,e,te)})),En=Cn;function In(t,e,n){(void 0!==n&&!St(t[e],n)||void 0===n&&!(e in t))&&_t(t,e,n)}function kn(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function On(t){return function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=r?r(n[a],t[a],a,n,t):void 0;void 0===u&&(u=t[a]),i?_t(n,a,u):At(n,a,u)}return n}(t,re(t))}function xn(t,e,n,r,i,o,s){var a=kn(t,n),u=kn(e,n),c=s.get(u);if(c)In(t,n,c);else{var l,d=o?o(a,u,n+"",t,e,s):void 0,p=void 0===d;if(p){var h=M(u),f=!h&&Ft(u),v=!h&&!f&&Ht(u);d=u,h||f||v?M(a)?d=a:q(l=a)&&kt(l)?d=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(a):f?(p=!1,d=function(t,e){if(e)return t.slice();var n=t.length,r=Fe?Fe(n):new t.constructor(n);return t.copy(r),r}(u,!0)):v?(p=!1,d=nn(u,!0)):d=[]:function(t){if(!q(t)||"[object Object]"!=L(t))return!1;var e=Oe(t);if(null===e)return!0;var n=Ne.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Re}(u)||Bt(u)?(d=a,Bt(a)?d=On(a):$(a)&&!H(a)||(d=function(t){return"function"!=typeof t.constructor||xt(t)?{}:lt(Oe(t))}(u))):p=!1}p&&(s.set(u,d),i(d,u,r,o,s),s.delete(u)),In(t,n,d)}}function Un(t,e,n,r,i){t!==e&&An(e,(function(o,s){if(i||(i=new Be),$(o))xn(t,e,s,n,Un,r,i);else{var a=r?r(kn(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),In(t,s,a)}}),re)}var Dn=/[\\^$.*+?()[\]{}|]/g,Nn=RegExp(Dn.source);function Rn(t,e){var n=-1,r=kt(t)?Array(t.length):[];return En(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Bn(t,e){return ke(function(t,e){return(M(t)?G:Rn)(t,Sn(e))}(t,e),1)}function Tn(t,e){return t>e}function Ln(t){return"string"==typeof t||!M(t)&&q(t)&&"[object String]"==L(t)}function qn(t,e){return t&&t.length?function(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(void 0===a?s==s&&!F(s):n(s,a)))var a=s,u=o}return u}(t,Sn(e),Tn):void 0}var Fn,Gn=(Fn=function(t,e,n){Un(t,e,n)},Et((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Fn.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!$(n))return!1;var r=typeof e;return!!("number"==r?kt(n)&&jt(e,n.length):"string"==r&&e in n)&&St(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Fn(t,s,n,i)}return t})));function Mn(t,e){return t(e={exports:{}},e.exports),e.exports}var Jn={},zn=Jn;function Wn(t){return t<0?-1:1}function $n(t,e){e.unsigned||--t;const n=e.unsigned?0:-Math.pow(2,t),r=Math.pow(2,t)-1,i=e.moduloBitLength?Math.pow(2,e.moduloBitLength):Math.pow(2,t),o=e.moduloBitLength?Math.pow(2,e.moduloBitLength-1):Math.pow(2,t-1);return function(t,s){s||(s={});let a=+t;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=Wn(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(t){return t%1==.5&&0==(1&t)?Math.floor(t):Math.round(t)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=Wn(a)*Math.floor(Math.abs(a)),a%=i,!e.unsigned&&a>=o)return a-i;if(e.unsigned)if(a<0)a+=i;else if(-0===a)return 0;return a}}Jn.void=function(){},Jn.boolean=function(t){return!!t},Jn.byte=$n(8,{unsigned:!1}),Jn.octet=$n(8,{unsigned:!0}),Jn.short=$n(16,{unsigned:!1}),Jn["unsigned short"]=$n(16,{unsigned:!0}),Jn.long=$n(32,{unsigned:!1}),Jn["unsigned long"]=$n(32,{unsigned:!0}),Jn["long long"]=$n(32,{unsigned:!1,moduloBitLength:64}),Jn["unsigned long long"]=$n(32,{unsigned:!0,moduloBitLength:64}),Jn.double=function(t){const e=+t;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},Jn["unrestricted double"]=function(t){const e=+t;if(isNaN(e))throw new TypeError("Argument is NaN");return e},Jn.float=Jn.double,Jn["unrestricted float"]=Jn["unrestricted double"],Jn.DOMString=function(t,e){return e||(e={}),e.treatNullAsEmptyString&&null===t?"":String(t)},Jn.ByteString=function(t,e){const n=String(t);let r;for(let t=0;void 0!==(r=n.codePointAt(t));++t)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},Jn.USVString=function(t){const e=String(t),n=e.length,r=[];for(let t=0;t<n;++t){const i=e.charCodeAt(t);if(i<55296||i>57343)r.push(String.fromCodePoint(i));else if(56320<=i&&i<=57343)r.push(String.fromCodePoint(65533));else if(t===n-1)r.push(String.fromCodePoint(65533));else{const n=e.charCodeAt(t+1);if(56320<=n&&n<=57343){const e=1023&i,o=1023&n;r.push(String.fromCodePoint(65536+1024*e+o)),++t}else r.push(String.fromCodePoint(65533))}}return r.join("")},Jn.Date=function(t,e){if(!(t instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(t))return t},Jn.RegExp=function(t,e){return t instanceof RegExp||(t=new RegExp(t)),t};var Vn=Mn((function(t){t.exports.mixin=function(t,e){const n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;++r)Object.defineProperty(t,n[r],Object.getOwnPropertyDescriptor(e,n[r]))},t.exports.wrapperSymbol=Symbol("wrapper"),t.exports.implSymbol=Symbol("impl"),t.exports.wrapperForImpl=function(e){return e[t.exports.wrapperSymbol]},t.exports.implForWrapper=function(e){return e[t.exports.implSymbol]}}));Vn.mixin,Vn.wrapperSymbol,Vn.implSymbol,Vn.wrapperForImpl,Vn.implForWrapper;var Hn,Yn=(Hn=Object.freeze({__proto__:null}))&&Hn.default||Hn,Zn={TRANSITIONAL:0,NONTRANSITIONAL:1};function Kn(t){return t.split("\0").map((function(t){return t.normalize("NFC")})).join("\0")}function Xn(t){for(var e=0,n=Yn.length-1;e<=n;){var r=Math.floor((e+n)/2),i=Yn[r];if(i[0][0]<=t&&i[0][1]>=t)return i;i[0][0]>t?n=r-1:e=r+1}return null}var Qn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function tr(t){return t.replace(Qn,"_").length}var er=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function nr(t,e){"xn--"===t.substr(0,4)&&(t=u.toUnicode(t));var n=!1;(Kn(t)!==t||"-"===t[3]&&"-"===t[4]||"-"===t[0]||"-"===t[t.length-1]||-1!==t.indexOf(".")||0===t.search(er))&&(n=!0);for(var r=tr(t),i=0;i<r;++i){var o=Xn(t.codePointAt(i));if(rr===Zn.TRANSITIONAL&&"valid"!==o[1]||rr===Zn.NONTRANSITIONAL&&"valid"!==o[1]&&"deviation"!==o[1]){n=!0;break}}return{label:t,error:n}}function rr(t,e,n){var r=function(t,e,n){for(var r=!1,i="",o=tr(t),s=0;s<o;++s){var a=t.codePointAt(s),u=Xn(a);switch(u[1]){case"disallowed":r=!0,i+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":i+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":i+=n===Zn.TRANSITIONAL?String.fromCodePoint.apply(String,u[2]):String.fromCodePoint(a);break;case"valid":i+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":e?(r=!0,i+=String.fromCodePoint(a)):i+=String.fromCodePoint.apply(String,u[2]);break;case"disallowed_STD3_valid":e&&(r=!0),i+=String.fromCodePoint(a)}}return{string:i,error:r}}(t,e,n);r.string=Kn(r.string);for(var i=r.string.split("."),o=0;o<i.length;++o)try{var s=nr(i[o]);i[o]=s.label,r.error=r.error||s.error}catch(t){r.error=!0}return{string:i.join("."),error:r.error}}var ir={toASCII:function(t,e,n,r){var i=rr(t,e,n),o=i.string.split(".");if(o=o.map((function(t){try{return u.toASCII(t)}catch(e){return i.error=!0,t}})),r){var s=o.slice(0,o.length-1).join(".").length;(s.length>253||0===s.length)&&(i.error=!0);for(var a=0;a<o.length;++a)if(o.length>63||0===o.length){i.error=!0;break}}return i.error?null:o.join(".")},toUnicode:function(t,e){var n=rr(t,e,Zn.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Zn},or=Mn((function(t){const e={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(t){return u.ucs2.decode(t).length}function i(t,e){const n=t[e];return isNaN(n)?void 0:String.fromCodePoint(n)}function o(t){return t>=48&&t<=57}function s(t){return t>=65&&t<=90||t>=97&&t<=122}function a(t){return o(t)||t>=65&&t<=70||t>=97&&t<=102}function c(t){return"."===t||"%2e"===t.toLowerCase()}function l(t){return 2===t.length&&s(t.codePointAt(0))&&(":"===t[1]||"|"===t[1])}function d(t){return void 0!==e[t]}function p(t){return d(t.scheme)}function h(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function f(t){return t<=31||t>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(t){return f(t)||v.has(t)}const b=new Set([47,58,59,61,64,91,92,93,94,124]);function y(t){return m(t)||b.has(t)}function g(t,e){const n=String.fromCodePoint(t);return e(t)?function(t){const e=new Buffer(t);let n="";for(let t=0;t<e.length;++t)n+=h(e[t]);return n}(n):n}function w(t){let e=10;if(t.length>=2&&"0"===t.charAt(0)&&"x"===t.charAt(1).toLowerCase()?(t=t.substring(2),e=16):t.length>=2&&"0"===t.charAt(0)&&(t=t.substring(1),e=8),""===t)return 0;return(10===e?/[^0-9]/:16===e?/[^0-9A-Fa-f]/:/[^0-7]/).test(t)?n:parseInt(t,e)}function j(t,e){if("["===t[0])return"]"!==t[t.length-1]?n:function(t){const e=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(t=u.ucs2.decode(t))[c]){if(58!==t[c+1])return n;c+=2,++r,s=r}for(;c<t.length;){if(8===r)return n;if(58===t[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,l=0;for(;l<4&&a(t[c]);)u=16*u+parseInt(i(t,c),16),++c,++l;if(46===t[c]){if(0===l)return n;if(c-=l,r>6)return n;let s=0;for(;void 0!==t[c];){let a=null;if(s>0){if(!(46===t[c]&&s<4))return n;++c}if(!o(t[c]))return n;for(;o(t[c]);){const e=parseInt(i(t,c));if(null===a)a=e;else{if(0===a)return n;a=10*a+e}if(a>255)return n;++c}e[r]=256*e[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===t[c]){if(++c,void 0===t[c])return n}else if(void 0!==t[c])return n;e[r]=u,++r}if(null!==s){let t=r-s;for(r=7;0!==r&&t>0;){const n=e[s+t-1];e[s+t-1]=e[r],e[r]=n,--r,--t}}else if(null===s&&8!==r)return n;return e}(t.substring(1,t.length-1));if(!e)return function(t){if(e=t,-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var e;let r="";const i=u.ucs2.decode(t);for(let t=0;t<i.length;++t)r+=g(i[t],f);return r}(t);const r=function(t){const e=new Buffer(t),n=[];for(let t=0;t<e.length;++t)37!==e[t]?n.push(e[t]):37===e[t]&&a(e[t+1])&&a(e[t+2])?(n.push(parseInt(e.slice(t+1,t+3).toString(),16)),t+=2):n.push(e[t]);return new Buffer(n).toString()}(t),s=ir.toASCII(r,!1,ir.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(t){const e=t.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return t;const r=[];for(const i of e){if(""===i)return t;const e=w(i);if(e===n)return t;r.push(e)}for(let t=0;t<r.length-1;++t)if(r[t]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let i=r.pop(),o=0;for(const t of r)i+=t*Math.pow(256,3-o),++o;return i}(s);return"number"==typeof c||c===n?c:s}function _(t){return"number"==typeof t?function(t){let e="",n=t;for(let t=1;t<=4;++t)e=String(n%256)+e,4!==t&&(e="."+e),n=Math.floor(n/256);return e}(t):t instanceof Array?"["+function(t){let e="";const n=function(t){let e=null,n=1,r=null,i=0;for(let o=0;o<t.length;++o)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),{idx:e,len:n}}(t).idx;let r=!1;for(let i=0;i<=7;++i)r&&0===t[i]||(r&&(r=!1),n!==i?(e+=t[i].toString(16),7!==i&&(e+=":")):(e+=0===i?"::":":",r=!0));return e}(t)+"]":t}function S(t){const e=t.path;var n;0!==e.length&&("file"===t.scheme&&1===e.length&&(n=e[0],/^[A-Za-z]:$/.test(n))||e.pop())}function P(t){return""!==t.username||""!==t.password}function A(t,e,r,i,o){if(this.pointer=0,this.input=t,this.base=e||null,this.encodingOverride=r||"utf-8",this.stateOverride=o,this.url=i,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const t=function(t){return t.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);t!==this.input&&(this.parseError=!0),this.input=t}const s=function(t){return t.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=o||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=u.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const t=this.input[this.pointer],e=isNaN(t)?void 0:String.fromCodePoint(t),r=this["parse "+this.state](t,e);if(!r)break;if(r===n){this.failure=!0;break}}}A.prototype["parse scheme start"]=function(t,e){if(s(t))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},A.prototype["parse scheme"]=function(t,e){if(function(t){return s(t)||o(t)}(t)||43===t||45===t||46===t)this.buffer+=e.toLowerCase();else if(58===t){if(this.stateOverride){if(p(this.url)&&!d(this.buffer))return!1;if(!p(this.url)&&d(this.buffer))return!1;if((P(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},A.prototype["parse no scheme"]=function(t){return null===this.base||this.base.cannotBeABaseURL&&35!==t?n:(this.base.cannotBeABaseURL&&35===t?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},A.prototype["parse special relative or authority"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},A.prototype["parse path or authority"]=function(t){return 47===t?this.state="authority":(this.state="path",--this.pointer),!0},A.prototype["parse relative"]=function(t){return this.url.scheme=this.base.scheme,isNaN(t)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===t?this.state="relative slash":63===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):p(this.url)&&92===t?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},A.prototype["parse relative slash"]=function(t){return!p(this.url)||47!==t&&92!==t?47===t?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===t&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},A.prototype["parse special authority slashes"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},A.prototype["parse special authority ignore slashes"]=function(t){return 47!==t&&92!==t?(this.state="authority",--this.pointer):this.parseError=!0,!0},A.prototype["parse authority"]=function(t,e){if(64===t){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const t=r(this.buffer);for(let e=0;e<t;++e){const t=this.buffer.codePointAt(e);if(58===t&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=g(t,y);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},A.prototype["parse hostname"]=A.prototype["parse host"]=function(t,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==t||this.arrFlag)if(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(P(this.url)||null!==this.url.port))return this.parseError=!0,!1;const t=j(this.buffer,p(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===t?this.arrFlag=!0:93===t&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,n;const t=j(this.buffer,p(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},A.prototype["parse port"]=function(t,r){if(o(t))this.buffer+=r;else{if(!(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const t=parseInt(this.buffer);if(t>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=t===(i=this.url.scheme,e[i])?null:t,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var i;return!0};const C=new Set([47,92,63,35]);A.prototype["parse file"]=function(t){var e,n;return this.url.scheme="file",47===t||92===t?(92===t&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(t)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(e=t,n=this.input[this.pointer+1],!s(e)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!C.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),S(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},A.prototype["parse file slash"]=function(t){var e;return 47===t||92===t?(92===t&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(e=this.base.path[0]).length&&s(e.codePointAt(0))&&":"===e[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},A.prototype["parse file host"]=function(t,e){if(isNaN(t)||47===t||92===t||63===t||35===t)if(--this.pointer,!this.stateOverride&&l(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let t=j(this.buffer,p(this.url));if(t===n)return n;if("localhost"===t&&(t=""),this.url.host=t,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},A.prototype["parse path start"]=function(t){return p(this.url)?(92===t&&(this.parseError=!0),this.state="path",47!==t&&92!==t&&--this.pointer):this.stateOverride||63!==t?this.stateOverride||35!==t?void 0!==t&&(this.state="path",47!==t&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},A.prototype["parse path"]=function(t){if(isNaN(t)||47===t||p(this.url)&&92===t||!this.stateOverride&&(63===t||35===t)){if(p(this.url)&&92===t&&(this.parseError=!0),".."===(e=(e=this.buffer).toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e?(S(this.url),47===t||p(this.url)&&92===t||this.url.path.push("")):!c(this.buffer)||47===t||p(this.url)&&92===t?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&l(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""),this.buffer="","file"===this.url.scheme&&(void 0===t||63===t||35===t))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===t&&(this.url.query="",this.state="query"),35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=g(t,m);var e;return!0},A.prototype["parse cannot-be-a-base-URL path"]=function(t){return 63===t?(this.url.query="",this.state="query"):35===t?(this.url.fragment="",this.state="fragment"):(isNaN(t)||37===t||(this.parseError=!0),37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(t)||(this.url.path[0]=this.url.path[0]+g(t,f))),!0},A.prototype["parse query"]=function(t,e){if(isNaN(t)||!this.stateOverride&&35===t){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const e=new Buffer(this.buffer);for(let t=0;t<e.length;++t)e[t]<33||e[t]>126||34===e[t]||35===e[t]||60===e[t]||62===e[t]?this.url.query+=h(e[t]):this.url.query+=String.fromCodePoint(e[t]);this.buffer="",35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e;return!0},A.prototype["parse fragment"]=function(t){return isNaN(t)||(0===t?this.parseError=!0:(37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=g(t,f))),!0},t.exports.serializeURL=function(t,e){let n=t.scheme+":";if(null!==t.host?(n+="//",""===t.username&&""===t.password||(n+=t.username,""!==t.password&&(n+=":"+t.password),n+="@"),n+=_(t.host),null!==t.port&&(n+=":"+t.port)):null===t.host&&"file"===t.scheme&&(n+="//"),t.cannotBeABaseURL)n+=t.path[0];else for(const e of t.path)n+="/"+e;return null!==t.query&&(n+="?"+t.query),e||null===t.fragment||(n+="#"+t.fragment),n},t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return t.exports.serializeURLOrigin(t.exports.parseURL(e.path[0]))}catch(t){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t){let e=t.scheme+"://";return e+=_(t.host),null!==t.port&&(e+=":"+t.port),e}({scheme:e.scheme,host:e.host,port:e.port});case"file":return"file://";default:return"null"}},t.exports.basicURLParse=function(t,e){void 0===e&&(e={});const n=new A(t,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return n.failure?"failure":n.url},t.exports.setTheUsername=function(t,e){t.username="";const n=u.ucs2.decode(e);for(let e=0;e<n.length;++e)t.username+=g(n[e],y)},t.exports.setThePassword=function(t,e){t.password="";const n=u.ucs2.decode(e);for(let e=0;e<n.length;++e)t.password+=g(n[e],y)},t.exports.serializeHost=_,t.exports.cannotHaveAUsernamePasswordPort=function(t){return null===t.host||""===t.host||t.cannotBeABaseURL||"file"===t.scheme},t.exports.serializeInteger=function(t){return String(t)},t.exports.parseURL=function(e,n){return void 0===n&&(n={}),t.exports.basicURLParse(e,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));or.serializeURL,or.serializeURLOrigin,or.basicURLParse,or.setTheUsername,or.setThePassword,or.serializeHost,or.cannotHaveAUsernamePasswordPort,or.serializeInteger,or.parseURL;var sr=class{constructor(t){const e=t[0],n=t[1];let r=null;if(void 0!==n&&(r=or.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const i=or.basicURLParse(e,{baseURL:r});if("failure"===i)throw new TypeError("Invalid URL");this._url=i}get href(){return or.serializeURL(this._url)}set href(t){const e=or.basicURLParse(t);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return or.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(t){or.basicURLParse(t+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){or.cannotHaveAUsernamePasswordPort(this._url)||or.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){or.cannotHaveAUsernamePasswordPort(this._url)||or.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?or.serializeHost(t.host):or.serializeHost(t.host)+":"+or.serializeInteger(t.port)}set host(t){this._url.cannotBeABaseURL||or.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":or.serializeHost(this._url.host)}set hostname(t){this._url.cannotBeABaseURL||or.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":or.serializeInteger(this._url.port)}set port(t){or.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:or.basicURLParse(t,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(t){this._url.cannotBeABaseURL||(this._url.path=[],or.basicURLParse(t,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(t){const e=this._url;if(""===t)return void(e.query=null);const n="?"===t[0]?t.substring(1):t;e.query="",or.basicURLParse(n,{url:e,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(t){if(""===t)return void(this._url.fragment=null);const e="#"===t[0]?t.substring(1):t;this._url.fragment="",or.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},ar=Mn((function(t){const e=Vn.implSymbol;function n(r){if(!this||this[e]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const i=[];for(let t=0;t<arguments.length&&t<2;++t)i[t]=arguments[t];i[0]=zn.USVString(i[0]),void 0!==i[1]&&(i[1]=zn.USVString(i[1])),t.exports.setup(this,i)}n.prototype.toJSON=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let t=0;t<arguments.length&&t<0;++t)n[t]=arguments[t];return this[e].toJSON.apply(this[e],n)},Object.defineProperty(n.prototype,"href",{get(){return this[e].href},set(t){t=zn.USVString(t),this[e].href=t},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[e].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[e].protocol},set(t){t=zn.USVString(t),this[e].protocol=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[e].username},set(t){t=zn.USVString(t),this[e].username=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[e].password},set(t){t=zn.USVString(t),this[e].password=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[e].host},set(t){t=zn.USVString(t),this[e].host=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[e].hostname},set(t){t=zn.USVString(t),this[e].hostname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[e].port},set(t){t=zn.USVString(t),this[e].port=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[e].pathname},set(t){t=zn.USVString(t),this[e].pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[e].search},set(t){t=zn.USVString(t),this[e].search=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[e].hash},set(t){t=zn.USVString(t),this[e].hash=t},enumerable:!0,configurable:!0}),t.exports={is:t=>!!t&&t[e]instanceof sr,create(t,e){let r=Object.create(n.prototype);return this.setup(r,t,e),r},setup(t,n,r){r||(r={}),r.wrapper=t,t[e]=new sr(n,r),t[e][Vn.wrapperSymbol]=t},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));ar.is,ar.create,ar.setup,ar.expose;var ur={URL:ar.interface,serializeURL:or.serializeURL,serializeURLOrigin:or.serializeURLOrigin,basicURLParse:or.basicURLParse,setTheUsername:or.setTheUsername,setThePassword:or.setThePassword,serializeHost:or.serializeHost,serializeInteger:or.serializeInteger,parseURL:or.parseURL};const cr=r.Readable,lr=Symbol("buffer"),dr=Symbol("type");class pr{constructor(){this[dr]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,i=Number(e.length);for(let t=0;t<i;t++){const i=e[t];let o;o=i instanceof Buffer?i:ArrayBuffer.isView(i)?Buffer.from(i.buffer,i.byteOffset,i.byteLength):i instanceof ArrayBuffer?Buffer.from(i):i instanceof pr?i[lr]:Buffer.from("string"==typeof i?i:String(i)),r+=o.length,n.push(o)}}this[lr]=Buffer.concat(n);let i=e&&void 0!==e.type&&String(e.type).toLowerCase();i&&!/[^\u0020-\u007E]/.test(i)&&(this[dr]=i)}get size(){return this[lr].length}get type(){return this[dr]}text(){return Promise.resolve(this[lr].toString())}arrayBuffer(){const t=this[lr],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new cr;return t._read=function(){},t.push(this[lr]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,i;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),i=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const o=Math.max(i-r,0),s=this[lr].slice(r,r+o),a=new pr([],{type:arguments[2]});return a[lr]=s,a}}function hr(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let fr;Object.defineProperties(pr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(pr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),hr.prototype=Object.create(Error.prototype),hr.prototype.constructor=hr,hr.prototype.name="FetchError";try{fr=require("encoding").convert}catch(t){}const vr=Symbol("Body internals"),mr=r.PassThrough;function br(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.size;let o=void 0===i?0:i;var s=n.timeout;let a=void 0===s?0:s;null==t?t=null:gr(t)?t=Buffer.from(t.toString()):wr(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof r||(t=Buffer.from(String(t)))),this[vr]={body:t,disturbed:!1,error:null},this.size=o,this.timeout=a,t instanceof r&&t.on("error",(function(t){const n="AbortError"===t.name?t:new hr(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[vr].error=n}))}function yr(){var t=this;if(this[vr].disturbed)return br.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[vr].disturbed=!0,this[vr].error)return br.Promise.reject(this[vr].error);let e=this.body;if(null===e)return br.Promise.resolve(Buffer.alloc(0));if(wr(e)&&(e=e.stream()),Buffer.isBuffer(e))return br.Promise.resolve(e);if(!(e instanceof r))return br.Promise.resolve(Buffer.alloc(0));let n=[],i=0,o=!1;return new br.Promise((function(r,s){let a;t.timeout&&(a=setTimeout((function(){o=!0,s(new hr(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(o=!0,s(e)):s(new hr(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!o&&null!==e){if(t.size&&i+e.length>t.size)return o=!0,void s(new hr(`content size at ${t.url} over limit: ${t.size}`,"max-size"));i+=e.length,n.push(e)}})),e.on("end",(function(){if(!o){clearTimeout(a);try{r(Buffer.concat(n,i))}catch(e){s(new hr(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function gr(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function wr(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function jr(t){let e,n,i=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof r&&"function"!=typeof i.getBoundary&&(e=new mr,n=new mr,i.pipe(e),i.pipe(n),t[vr].body=e,i=n),i}function _r(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":gr(t)?"application/x-www-form-urlencoded;charset=UTF-8":wr(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof r?null:"text/plain;charset=UTF-8"}function Sr(t){const e=t.body;return null===e?0:wr(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}br.prototype={get body(){return this[vr].body},get bodyUsed(){return this[vr].disturbed},arrayBuffer(){return yr.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return yr.call(this).then((function(e){return Object.assign(new pr([],{type:t.toLowerCase()}),{[lr]:e})}))},json(){var t=this;return yr.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return br.Promise.reject(new hr(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return yr.call(this).then((function(t){return t.toString()}))},buffer(){return yr.call(this)},textConverted(){var t=this;return yr.call(this).then((function(e){return function(t,e){if("function"!=typeof fr)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,i,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));i=t.slice(0,1024).toString(),!r&&i&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(i));!r&&i&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(i),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(i),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&i&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(i));r&&(o=r.pop(),"gb2312"!==o&&"gbk"!==o||(o="gb18030"));return fr(t,"UTF-8",o).toString()}(e,t.headers)}))}},Object.defineProperties(br.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),br.mixIn=function(t){for(const e of Object.getOwnPropertyNames(br.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(br.prototype,e);Object.defineProperty(t,e,n)}},br.Promise=global.Promise;const Pr=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Ar=/[^\t\x20-\x7e\x80-\xff]/;function Cr(t){if(t=`${t}`,Pr.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function Er(t){if(t=`${t}`,Ar.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function Ir(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const kr=Symbol("map");class Or{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[kr]=Object.create(null),t instanceof Or){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){Cr(t=`${t}`);const e=Ir(this[kr],t);return void 0===e?null:this[kr][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=xr(this),r=0;for(;r<n.length;){var i=n[r];const o=i[0],s=i[1];t.call(e,s,o,this),n=xr(this),r++}}set(t,e){e=`${e}`,Cr(t=`${t}`),Er(e);const n=Ir(this[kr],t);this[kr][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,Cr(t=`${t}`),Er(e);const n=Ir(this[kr],t);void 0!==n?this[kr][n].push(e):this[kr][t]=[e]}has(t){return Cr(t=`${t}`),void 0!==Ir(this[kr],t)}delete(t){Cr(t=`${t}`);const e=Ir(this[kr],t);void 0!==e&&delete this[kr][e]}raw(){return this[kr]}keys(){return Dr(this,"key")}values(){return Dr(this,"value")}[Symbol.iterator](){return Dr(this,"key+value")}}function xr(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const n=Object.keys(t[kr]).sort();return n.map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[kr][e].join(", ")}:function(e){return[e.toLowerCase(),t[kr][e].join(", ")]})}Or.prototype.entries=Or.prototype[Symbol.iterator],Object.defineProperty(Or.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Or.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const Ur=Symbol("internal");function Dr(t,e){const n=Object.create(Nr);return n[Ur]={target:t,kind:e,index:0},n}const Nr=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Nr)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[Ur];const e=t.target,n=t.kind,r=t.index,i=xr(e,n);return r>=i.length?{value:void 0,done:!0}:(this[Ur].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Rr(t){const e=Object.assign({__proto__:null},t[kr]),n=Ir(t[kr],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(Nr,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Br=Symbol("Response internals"),Tr=o.STATUS_CODES;class Lr{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};br.call(this,t,e);const n=e.status||200,r=new Or(e.headers);if(null!=t&&!r.has("Content-Type")){const e=_r(t);e&&r.append("Content-Type",e)}this[Br]={url:e.url,status:n,statusText:e.statusText||Tr[n],headers:r,counter:e.counter}}get url(){return this[Br].url||""}get status(){return this[Br].status}get ok(){return this[Br].status>=200&&this[Br].status<300}get redirected(){return this[Br].counter>0}get statusText(){return this[Br].statusText}get headers(){return this[Br].headers}clone(){return new Lr(jr(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}br.mixIn(Lr.prototype),Object.defineProperties(Lr.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Lr.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const qr=Symbol("Request internals"),Fr=s.URL||ur.URL,Gr=s.parse,Mr=s.format;function Jr(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new Fr(t).toString()),Gr(t)}const zr="destroy"in r.Readable.prototype;function Wr(t){return"object"==typeof t&&"object"==typeof t[qr]}class $r{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Wr(t)?e=Jr(t.url):(e=t&&t.href?Jr(t.href):Jr(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||Wr(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:Wr(t)&&null!==t.body?jr(t):null;br.call(this,i,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const o=new Or(n.headers||t.headers||{});if(null!=i&&!o.has("Content-Type")){const t=_r(i);t&&o.append("Content-Type",t)}let s=Wr(t)?t.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[qr]={method:r,redirect:n.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[qr].method}get url(){return Mr(this[qr].parsedURL)}get headers(){return this[qr].headers}get redirect(){return this[qr].redirect}get signal(){return this[qr].signal}clone(){return new $r(this)}}function Vr(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}br.mixIn($r.prototype),Object.defineProperty($r.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties($r.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Vr.prototype=Object.create(Error.prototype),Vr.prototype.constructor=Vr,Vr.prototype.name="AbortError";const Hr=s.URL||ur.URL,Yr=r.PassThrough;function Zr(t,e){if(!Zr.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return br.Promise=Zr.Promise,new Zr.Promise((function(n,i){const s=new $r(t,e),a=function(t){const e=t[qr].parsedURL,n=new Or(t[qr].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof r.Readable&&!zr)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let i=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(i="0"),null!=t.body){const e=Sr(t);"number"==typeof e&&(i=String(e))}i&&n.set("Content-Length",i),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=t.agent;return"function"==typeof o&&(o=o(e)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:Rr(n),agent:o})}(s),u=("https:"===a.protocol?c:o).request,d=s.signal;let p=null;const h=function(){let t=new Vr("The user aborted a request.");i(t),s.body&&s.body instanceof r.Readable&&s.body.destroy(t),p&&p.body&&p.body.emit("error",t)};if(d&&d.aborted)return void h();const f=function(){h(),b()},v=u(a);let m;function b(){v.abort(),d&&d.removeEventListener("abort",f),clearTimeout(m)}d&&d.addEventListener("abort",f),s.timeout&&v.once("socket",(function(t){m=setTimeout((function(){i(new hr(`network timeout at: ${s.url}`,"request-timeout")),b()}),s.timeout)})),v.on("error",(function(t){i(new hr(`request to ${s.url} failed, reason: ${t.message}`,"system",t)),b()})),v.on("response",(function(t){clearTimeout(m);const e=function(t){const e=new Or;for(const n of Object.keys(t))if(!Pr.test(n))if(Array.isArray(t[n]))for(const r of t[n])Ar.test(r)||(void 0===e[kr][n]?e[kr][n]=[r]:e[kr][n].push(r));else Ar.test(t[n])||(e[kr][n]=[t[n]]);return e}(t.headers);if(Zr.isRedirect(t.statusCode)){const r=e.get("Location");let o=null;try{o=null===r?null:new Hr(r,s.url).toString()}catch(t){if("manual"!==s.redirect)return i(new hr(`uri requested responds with an invalid redirect URL: ${r}`,"invalid-redirect")),void b()}switch(s.redirect){case"error":return i(new hr(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void b();case"manual":if(null!==o)try{e.set("Location",o)}catch(t){i(t)}break;case"follow":if(null===o)break;if(s.counter>=s.follow)return i(new hr(`maximum redirect reached at: ${s.url}`,"max-redirect")),void b();const r={headers:new Or(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(t,e){const n=new Hr(e).hostname,r=new Hr(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,o))for(const t of["authorization","www-authenticate","cookie","cookie2"])r.headers.delete(t);return 303!==t.statusCode&&s.body&&null===Sr(s)?(i(new hr("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==s.method)||(r.method="GET",r.body=void 0,r.headers.delete("content-length")),n(Zr(new $r(o,r))),void b())}}t.once("end",(function(){d&&d.removeEventListener("abort",f)}));let r=t.pipe(new Yr);const o={url:s.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:s.size,timeout:s.timeout,counter:s.counter},a=e.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===a||204===t.statusCode||304===t.statusCode)return p=new Lr(r,o),void n(p);const u={flush:l.Z_SYNC_FLUSH,finishFlush:l.Z_SYNC_FLUSH};if("gzip"==a||"x-gzip"==a)return r=r.pipe(l.createGunzip(u)),p=new Lr(r,o),void n(p);if("deflate"!=a&&"x-deflate"!=a){if("br"==a&&"function"==typeof l.createBrotliDecompress)return r=r.pipe(l.createBrotliDecompress()),p=new Lr(r,o),void n(p);p=new Lr(r,o),n(p)}else{t.pipe(new Yr).once("data",(function(t){r=8==(15&t[0])?r.pipe(l.createInflate()):r.pipe(l.createInflateRaw()),p=new Lr(r,o),n(p)}))}})),function(t,e){const n=e.body;null===n?t.end():wr(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(v,s)}))}Zr.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Zr.Promise=global.Promise;var Kr=function(){function t(t){this.contextProvider=t}return t.prototype.getServiceDetails=function(t,e){return A(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/services/").concat(e))]}))}))},t.prototype.getAddonDetails=function(t,e){return A(this,void 0,void 0,(function(){return C(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/addons/").concat(e))]}))}))},t.prototype.fetch=function(t,e){return A(this,void 0,void 0,(function(){var n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:return n=Gn({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},P({},e)),[4,Zr(t,n)];case 1:return(r=a.sent()).ok?[3,3]:(i=Error.bind,s=(o=JSON).stringify,[4,r.json()]);case 2:throw new(i.apply(Error,[void 0,s.apply(o,[a.sent()])]));case 3:return[4,r.json()];case 4:return[2,a.sent()]}}))}))},t}(),Xr=function(t,e,n){return A(void 0,void 0,void 0,(function(){var r,i,o,s,a;return C(this,(function(u){switch(u.label){case 0:if(r=ei(e||"127.0.0.1"),(i=ei(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===d.platform()&&(o=function(t){return A(void 0,void 0,void 0,(function(){var e;return C(this,(function(n){switch(n.label){case 0:return e="lo0 alias ".concat(t," up"),[4,ti.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=i?(a=ni(s),[4,Qr(t,a)]):[3,6];case 2:return u.sent()?o?[4,o(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("No ip available")}}))}))},Qr=function(t,e){return new Promise((function(n){var r=new f,i=!1;r.on("connect",(function(){i=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){i=!1,r.destroy()})),r.on("error",(function(){i=!1})),r.on("close",(function(){n(!i)})),e?r.connect(t,e):r.connect(t)}))},ti=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return A(void 0,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return"/sbin/ifconfig",[4,ri("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}}))}))},ei=function(t){var e=t.split(".").reverse();if(4!==e.length)throw new Error("Invalid ip address: ".concat(t));for(var n=0,r=0;r<4;r+=1){var i=Number.parseInt(e[r],10);if(i<0||i>255)throw new Error("Invalid ip address: ".concat(t));n+=i<<8*r}return n},ni=function(t){if(!Number.isSafeInteger(t))throw new Error("Number is not an integer");if(t<0||t>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var e=[],n=0;n<4;n+=1)e.push(t>>8*n&255);return e.reverse().join(".")},ri=function(t,e,n){var r=v(t,e,P({windowsHide:!0},n)),i=new Promise((function(i,o){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(t){s+=t})),r.stderr&&r.stderr.on("data",(function(t){a+=t}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(t," ").concat(e.join(" "),"': ").concat(a);o({message:u,result:r})}else i(r)}))}));return{process:r,resultPromise:i}},ii=function(t,e,n){return A(void 0,void 0,void 0,(function(){var r,i;return C(this,(function(o){switch(o.label){case 0:return r=oi(t,10),[4,b.promises.writeFile(r,e,n)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,4,,6]),[4,b.promises.rename(r,t)];case 3:return o.sent(),[3,6];case 4:return i=o.sent(),[4,b.promises.unlink(r).catch((function(){}))];case 5:throw o.sent(),i;case 6:return[2]}}))}))},oi=function(t,e){for(var n,r=y.dirname(t),i=y.basename(t),o=0;null===(n=o<e)||void 0===n||n;o+=1){var s=E([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(i),u=y.join(r,a);if(!b.existsSync(u))return u}throw new Error("Could not write file to file '".concat(t,"'."))},si="win32"===process.platform?"\r\n":"\n",ai=function(){function t(t,e){this.nodes=t,this.config=e}return t.prototype.add=function(t,e,n){var r=this;if(0===e.length)return this;var i=this.findOrCreateEntry(t,n);return e.forEach((function(t){if(!i.hosts.find((function(e){return e.host===t}))){var e=1;0===i.hosts.length&&(e=r.config.indent-"".concat(i.ipPrefixWhitespace).concat(i.ip).length),i.hosts.push({whitespace:" ".repeat(e<1?1:e),host:t})}})),this},t.prototype.remove=function(t,e){var n=this;return this.findEntries(t).forEach((function(t){e.forEach((function(e){var r=t.hosts.findIndex((function(t){return t.host===e}));r<0||(0===r&&void 0!==t.hosts[1]&&(t.hosts[1].whitespace=t.hosts[0].whitespace),t.hosts.splice(r,1),0===t.hosts.length&&n.removeEntry(t))}))})),this},t.prototype.removeHosts=function(t){var e=this;fi(this.nodes,"entry").forEach((function(n){e.remove(n.ip,t)}))},t.prototype.removeIps=function(t){var e=this;return t.forEach((function(t){e.findEntries(t).forEach((function(t){return e.removeEntry(t)}))})),this},t.prototype.resolveHosts=function(t){return Bn(this.findEntries(t),(function(t){return t.hosts.map((function(t){return t.host}))}))},t.prototype.resolveIps=function(t){return fi(this.nodes,"entry").filter((function(e){return e.hosts.some((function(e){return e.host===t}))})).map((function(t){return t.ip}))},t.prototype.toString=function(){return di(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||q(e)&&"[object Number]"==L(e)?t:this.nodes.findIndex((function(e){return e===t}));n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return fi(this.nodes,"entry").filter((function(e){return e.ip===t}))},t.prototype.findOrCreateEntry=function(t,e){var n=this.findEntries(t)[0];if(n)return n;var r=this.makeEntry(t);if(e){var i=li(e),o=this.nodes.findIndex((function(t){return"comment"===t.type&&t.line===i}));if(o>=0)this.insertAt(o+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[ui(),ci(i),r]:[ci(i),r];this.insertAt.apply(this,E([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},t.prototype.insertAt=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.nodes).splice.apply(e,E([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return P({type:"entry",ip:t,ipPrefixWhitespace:n,hosts:[]},e)},t.fromNodes=function(e,n){var r,i;return new t(e.filter((function(t){return"eol"!==t.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var t,n=fi(e,"eol").map((function(t){return t.line}));return null!==(t=vi(n))&&void 0!==t?t:si}(),indent:null!==(i=null==n?void 0:n.indent)&&void 0!==i?i:function(){var t,n=Bn(fi(e,"entry"),(function(t){var e=t.ipPrefixWhitespace,n=t.ip,r=t.hosts[0];return r?["".concat(e).concat(n).concat(r.whitespace).length]:[]}));return null!==(t=vi(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(pi(t),e)},t}(),ui=function(){return{type:"blank",line:""}},ci=function(t){return{type:"comment",line:li(t)}},li=function(t){return t.startsWith("#")?t:"# ".concat(t)},di=function(t,e){var n=t.map((function(t){switch(t.type){case"entry":var e=t.hosts.map((function(t){var e=t.whitespace,n=t.host;return"".concat(e).concat(n)})).join("");return"".concat(t.ipPrefixWhitespace).concat(t.ip).concat(e);case"blank":case"comment":case"invalid":return t.line;default:return""}}));return n.join(null!=e?e:si)},pi=function(t){return t.split(/(\r?\n)/).map((function(t){return function(t){return t.match(/^\s*#.*$/)}(t)?{type:"comment",line:t}:function(t){return t.match(/^(\r?\n)$/)}(t)?{type:"eol",line:t}:function(t){return t.match(/^\s*$/)}(t)?{type:"blank",line:t}:hi(t)}))},hi=function(t){var e=t.match(/^(\s*)(\S+)(.+)?$/);if(!e)return{type:"invalid",line:t};var n=e[1],r=e[2],i=e.slice(3),o=!1,s=Bn(i.filter((function(t){return void 0!==t})),(function(t){var e=t.match(/(\s+)(\S+)/g);return e?e.map((function(t){var e=t.match(/^(\s+)(\S+)$/);e||(o=!0);var n=null!=e?e:[];return{whitespace:n[1],host:n[2]}})):(o=!0,[])}));return o?{type:"invalid",line:t}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},fi=function(t,e){return t.filter((function(t){return t.type===e}))},vi=function(t){var e=new Map;t.forEach((function(t){var n;e.set(t,(null!==(n=e.get(t))&&void 0!==n?n:0)+1)}));var n=qn(Array.from(e.entries()),(function(t){return t[1]}));if(n)return n[0]},mi="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",bi=function(){function t(t){this.ast=ai.fromNodes([]);var e={writeMode:"atomic",hostsFile:mi};this.config=P(P({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!Ln(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!Ln(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.add(t,e,this.config.header),this},t.prototype.remove=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!Ln(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!Ln(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.remove(t,e),this},t.prototype.removeHosts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!Ln(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeHosts(t),this},t.prototype.removeIps=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!Ln(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeIps(t),this},t.prototype.read=function(){return A(this,void 0,void 0,(function(){var t;return C(this,(function(e){switch(e.label){case 0:return[4,b.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=ai.parse(t.toString(),this.config),[2,this]}}))}))},t.prototype.write=function(t){return A(this,void 0,void 0,(function(){var e,n,r,i;return C(this,(function(o){switch(o.label){case 0:switch(e=P(P({},this.config),t),n=e.hostsFile,r=e.writeMode,i=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,ii(n,i)];case 2:case 4:return o.sent(),[3,6];case 3:return[4,b.promises.writeFile(n,i)];case 5:return[3,6];case 6:return[2,this]}}))}))},t.prototype.backup=function(t){return A(this,void 0,void 0,(function(){var e,n,r,i;return C(this,(function(o){switch(o.label){case 0:return b.existsSync(this.config.hostsFile)?(e=y.dirname(this.config.hostsFile),n=y.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),i=y.resolve(e,r),b.existsSync(i)&&!t.rewrite?[3,2]:[4,b.promises.copyFile(this.config.hostsFile,i)]):[2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},t.load=function(e){return A(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,new t(e).read()];case 1:return[2,n.sent()]}}))}))},t}(),yi=function(){function t(){this.previousPromise=Promise.resolve()}return t.prototype.enter=function(t){return A(this,void 0,void 0,(function(){var e;return C(this,(function(n){return e=this.previousPromise.then((function(){return t()})).catch((function(){return t()})),this.previousPromise=e,[2,e]}))}))},t}(),gi=function t(e,n){if(e&&n)return t(e)(n);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),i=t[t.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(t){r[t]=i[t]})),r}};var wi=gi(_i),ji=gi(Si);function _i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Si(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}_i.proto=_i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return _i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Si(this)},configurable:!0})})),wi.strict=ji;var Pi=function(){},Ai=function(t,e,n){if("function"==typeof e)return Ai(t,null,e);e||(e={}),n=wi(n||Pi);var r=t._writableState,i=t._readableState,o=e.readable||!1!==e.readable&&t.readable,s=e.writable||!1!==e.writable&&t.writable,a=!1,u=function(){t.writable||c()},c=function(){s=!1,o||n.call(t)},l=function(){o=!1,s||n.call(t)},d=function(e){n.call(t,e?new Error("exited with error code: "+e):null)},p=function(e){n.call(t,e)},h=function(){process.nextTick(f)},f=function(){if(!a)return(!o||i&&i.ended&&!i.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(t,new Error("premature close"))},v=function(){t.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?s&&!r&&(t.on("end",u),t.on("close",u)):(t.on("complete",c),t.on("abort",h),t.req?v():t.on("request",v)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",d),t.on("end",l),t.on("finish",c),!1!==e.error&&t.on("error",p),t.on("close",h),function(){a=!0,t.removeListener("complete",c),t.removeListener("abort",h),t.removeListener("request",v),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("exit",d),t.removeListener("end",l),t.removeListener("error",p),t.removeListener("close",h)}},Ci=Ai,Ei=function(){},Ii=/^v?\.0/.test(process.version),ki=function(t){return"function"==typeof t},Oi=function(t,e,n,r){r=wi(r);var i=!1;t.on("close",(function(){i=!0})),Ci(t,{readable:e,writable:n},(function(t){if(t)return r(t);i=!0,r()}));var o=!1;return function(e){if(!i&&!o)return o=!0,function(t){return!!Ii&&!!b&&(t instanceof(b.ReadStream||Ei)||t instanceof(b.WriteStream||Ei))&&ki(t.close)}(t)?t.close(Ei):function(t){return t.setHeader&&ki(t.abort)}(t)?t.abort():ki(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},xi=function(t){t()},Ui=function(t,e){return t.pipe(e)},Di=function(){var t,e=Array.prototype.slice.call(arguments),n=ki(e[e.length-1]||Ei)&&e.pop()||Ei;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map((function(i,o){var s=o<e.length-1;return Oi(i,s,o>0,(function(e){t||(t=e),e&&r.forEach(xi),s||(r.forEach(xi),n(t))}))}));return e.reduce(Ui)};const{Duplex:Ni}=r;function Ri(t){t.emit("close")}function Bi(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ti(t){this.removeListener("error",Ti),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var Li=function(t,e){let n=!0;const r=new Ni({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",(function(e,n){const i=!n&&r._readableState.objectMode?e.toString():e;r.push(i)||t.pause()})),t.once("error",(function(t){r.destroyed||(n=!1,r.destroy(t))})),t.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(e,i){if(t.readyState===t.CLOSED)return i(e),void process.nextTick(Ri,r);let o=!1;t.once("error",(function(t){o=!0,i(t)})),t.once("close",(function(){o||i(e),process.nextTick(Ri,r)})),n&&t.terminate()},r._final=function(e){t.readyState!==t.CONNECTING?null!==t._socket&&(t._socket._writableState.finished?(e(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",(function(){e()})),t.close())):t.once("open",(function(){r._final(e)}))},r._read=function(){t.isPaused&&t.resume()},r._write=function(e,n,i){t.readyState!==t.CONNECTING?t.send(e,i):t.once("open",(function(){r._write(e,n,i)}))},r.on("end",Bi),r.on("error",Ti),r},qi={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:()=>{}},Fi="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},Gi=process.config&&process.config.variables||{},Mi=!!process.env.PREBUILDS_ONLY,Ji=process.versions.modules,zi=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",Wi=process.env.npm_config_arch||d.arch(),$i=process.env.npm_config_platform||d.platform(),Vi=process.env.LIBC||(function(t){return"linux"===t&&b.existsSync("/etc/alpine-release")}($i)?"musl":"glibc"),Hi=process.env.ARM_VERSION||("arm64"===Wi?"8":Gi.arm_version)||"",Yi=(process.versions.uv||"").split(".")[0],Zi=Ki;function Ki(t){return Fi(Ki.path(t))}function Xi(t){try{return b.readdirSync(t)}catch(t){return[]}}function Qi(t,e){var n=Xi(t).filter(e);return n[0]&&y.join(t,n[0])}function to(t){return/\.node$/.test(t)}function eo(t){var e=t.split("-");if(2===e.length){var n=e[0],r=e[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:t,platform:n,architectures:r}}}function no(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function ro(t,e){return t.architectures.length-e.architectures.length}function io(t){var e=t.split("."),n={file:t,specificity:0};if("node"===e.pop()){for(var r=0;r<e.length;r++){var i=e[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function oo(t,e){return function(n){return null!=n&&(!(n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi!==e&&!n.napi)&&((!n.uv||n.uv===Yi)&&((!n.armv||n.armv===Hi)&&(!n.libc||n.libc===Vi)))))}}function so(t){return function(e,n){return e.runtime!==n.runtime?e.runtime===t?-1:1:e.abi!==n.abi?e.abi?-1:1:e.specificity!==n.specificity?e.specificity>n.specificity?-1:1:0}}Ki.path=function(t){t=y.resolve(t||".");try{var e=Fi(y.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!Mi){var n=Qi(y.join(t,"build/Release"),to);if(n)return n;var r=Qi(y.join(t,"build/Debug"),to);if(r)return r}var i=a(t);if(i)return i;var o=a(y.dirname(process.execPath));if(o)return o;var s=["platform="+$i,"arch="+Wi,"runtime="+zi,"abi="+Ji,"uv="+Yi,Hi?"armv="+Hi:"","libc="+Vi,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+t+"\n");function a(t){var e=Xi(y.join(t,"prebuilds")).map(eo).filter(no($i,Wi)).sort(ro)[0];if(e){var n=y.join(t,"prebuilds",e.name),r=Xi(n).map(io).filter(oo(zi,Ji)).sort(so(zi))[0];return r?y.join(n,r.file):void 0}}},Ki.parseTags=io,Ki.matchTags=oo,Ki.compareTags=so,Ki.parseTuple=eo,Ki.matchTuple=no,Ki.compareTuples=ro;var ao={mask:(t,e,n,r,i)=>{for(var o=0;o<i;o++)n[r+o]=t[o]^e[3&o]},unmask:(t,e)=>{const n=t.length;for(var r=0;r<n;r++)t[r]^=e[3&r]}},uo=Mn((function(t){try{t.exports=Zi(__dirname)}catch(e){t.exports=ao}})),co=Mn((function(t){const{EMPTY_BUFFER:e}=qi;function n(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[o]^e[3&o]}function r(t,e){for(let n=0;n<t.length;n++)t[n]^=e[3&n]}if(t.exports={concat:function(t,n){if(0===t.length)return e;if(1===t.length)return t[0];const r=Buffer.allocUnsafe(n);let i=0;for(let e=0;e<t.length;e++){const n=t[e];r.set(n,i),i+=n.length}return i<n?r.slice(0,i):r},mask:n,toArrayBuffer:function(t){return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)},toBuffer:function t(e){if(t.readOnly=!0,Buffer.isBuffer(e))return e;let n;return e instanceof ArrayBuffer?n=Buffer.from(e):ArrayBuffer.isView(e)?n=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(n=Buffer.from(e),t.readOnly=!1),n},unmask:r},!process.env.WS_NO_BUFFER_UTIL)try{const e=uo;t.exports.mask=function(t,r,i,o,s){s<48?n(t,r,i,o,s):e.mask(t,r,i,o,s)},t.exports.unmask=function(t,n){t.length<32?r(t,n):e.unmask(t,n)}}catch(t){}}));co.concat,co.mask,co.toArrayBuffer,co.toBuffer,co.unmask;const lo=Symbol("kDone"),po=Symbol("kRun");var ho=class{constructor(t){this[lo]=()=>{this.pending--,this[po]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[po]()}[po](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[lo])}}};const{kStatusCode:fo}=qi,vo=Buffer.from([0,0,255,255]),mo=Symbol("permessage-deflate"),bo=Symbol("total-length"),yo=Symbol("callback"),go=Symbol("buffers"),wo=Symbol("error");let jo;var _o=class{constructor(t,e,n){if(this._maxPayload=0|n,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!jo){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;jo=new ho(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[yo];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,n=t.find((t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"==typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"==typeof e.clientMaxWindowBits&&!t.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(n.server_no_context_takeover=!0),e.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof e.serverMaxWindowBits&&(n.server_max_window_bits=e.serverMaxWindowBits),"number"==typeof e.clientMaxWindowBits?n.client_max_window_bits=e.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach((t=>{Object.keys(t).forEach((e=>{let n=t[e];if(n.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(n=n[0],"client_max_window_bits"===e){if(!0!==n){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}else if("server_max_window_bits"===e){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}t[e]=n}))})),t}decompress(t,e,n){jo.add((r=>{this._decompress(t,e,((t,e)=>{r(),n(t,e)}))}))}compress(t,e,n){jo.add((r=>{this._compress(t,e,((t,e)=>{r(),n(t,e)}))}))}_decompress(t,e,n){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?l.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=l.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[mo]=this,this._inflate[bo]=0,this._inflate[go]=[],this._inflate.on("error",Ao),this._inflate.on("data",Po)}this._inflate[yo]=n,this._inflate.write(t),e&&this._inflate.write(vo),this._inflate.flush((()=>{const t=this._inflate[wo];if(t)return this._inflate.close(),this._inflate=null,void n(t);const i=co.concat(this._inflate[go],this._inflate[bo]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[bo]=0,this._inflate[go]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,i)}))}_compress(t,e,n){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?l.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=l.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[bo]=0,this._deflate[go]=[],this._deflate.on("data",So)}this._deflate[yo]=n,this._deflate.write(t),this._deflate.flush(l.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=co.concat(this._deflate[go],this._deflate[bo]);e&&(t=t.slice(0,t.length-4)),this._deflate[yo]=null,this._deflate[bo]=0,this._deflate[go]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)}))}};function So(t){this[go].push(t),this[bo]+=t.length}function Po(t){this[bo]+=t.length,this[mo]._maxPayload<1||this[bo]<=this[mo]._maxPayload?this[go].push(t):(this[wo]=new RangeError("Max payload size exceeded"),this[wo].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[wo][fo]=1009,this.removeListener("data",Po),this.reset())}function Ao(t){this[mo]._inflate=null,t[fo]=1007,this[yo](t)}var Co=function(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}return!0},Eo=Mn((function(t){try{t.exports=Zi(__dirname)}catch(e){t.exports=Co}})),Io=Mn((function(t){function e(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}return!0}if(t.exports={isValidStatusCode:function(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999},isValidUTF8:e,tokenChars:[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]},!process.env.WS_NO_UTF_8_VALIDATE)try{const n=Eo;t.exports.isValidUTF8=function(t){return t.length<150?e(t):n(t)}}catch(t){}}));Io.isValidStatusCode,Io.isValidUTF8,Io.tokenChars;const{Writable:ko}=r,{BINARY_TYPES:Oo,EMPTY_BUFFER:xo,kStatusCode:Uo,kWebSocket:Do}=qi,{concat:No,toArrayBuffer:Ro,unmask:Bo}=co,{isValidStatusCode:To,isValidUTF8:Lo}=Io;var qo=class extends ko{constructor(t={}){super(),this._binaryType=t.binaryType||Oo[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[Do]=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._state=0,this._loop=!1}_write(t,e,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){const e=this._buffers[0];return this._buffers[0]=e.slice(t),e.slice(0,t)}const e=Buffer.allocUnsafe(t);do{const n=this._buffers[0],r=e.length-t;t>=n.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(n.buffer,n.byteOffset,t),r),this._buffers[0]=n.slice(t)),t-=n.length}while(t>0);return e}startLoop(t){let e;this._loop=!0;do{switch(this._state){case 0:e=this.getInfo();break;case 1:e=this.getPayloadLength16();break;case 2:e=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:e=this.getData(t);break;default:return void(this._loop=!1)}}while(this._loop);t(e)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(0!=(48&t[0]))return this._loop=!1,Fo(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const e=64==(64&t[0]);if(e&&!this._extensions[_o.extensionName])return this._loop=!1,Fo(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(e)return this._loop=!1,Fo(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Fo(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,Fo(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=e}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,Fo(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,Fo(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(e)return this._loop=!1,Fo(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125)return this._loop=!1,Fo(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&t[1]),this._isServer){if(!this._masked)return this._loop=!1,Fo(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Fo(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),e=t.readUInt32BE(0);return e>Math.pow(2,21)-1?(this._loop=!1,Fo(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=e*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Fo(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(t){let e=xo;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);e=this.consume(this._payloadLength),this._masked&&0!=(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Bo(e,this._mask)}return this._opcode>7?this.controlMessage(e):this._compressed?(this._state=5,void this.decompress(e,t)):(e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage())}decompress(t,e){this._extensions[_o.extensionName].decompress(t,this._fin,((t,n)=>{if(t)return e(t);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return e(Fo(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return e(r);this.startLoop(e)}))}dataMessage(){if(this._fin){const t=this._messageLength,e=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?No(e,t):"arraybuffer"===this._binaryType?Ro(No(e,t)):e,this.emit("message",n,!0)}else{const n=No(e,t);if(!this._skipUTF8Validation&&!Lo(n))return this._loop=!1,Fo(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(t){if(8===this._opcode)if(this._loop=!1,0===t.length)this.emit("conclude",1005,xo),this.end();else{if(1===t.length)return Fo(RangeError,"invalid payload length 1",!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");{const e=t.readUInt16BE(0);if(!To(e))return Fo(RangeError,`invalid status code ${e}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=t.slice(2);if(!this._skipUTF8Validation&&!Lo(n))return Fo(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",e,n),this.end()}}else 9===this._opcode?this.emit("ping",t):this.emit("pong",t);this._state=0}};function Fo(t,e,n,r,i){const o=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(o,Fo),o.code=i,o[Uo]=r,o}const{randomFillSync:Go}=w,{EMPTY_BUFFER:Mo}=qi,{isValidStatusCode:Jo}=Io,{mask:zo,toBuffer:Wo}=co,$o=Symbol("kByteLength"),Vo=Buffer.alloc(4);class Ho{constructor(t,e,n){this._extensions=e||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,e){let n,r,i=!1,o=2,s=!1;e.mask&&(n=e.maskBuffer||Vo,e.generateMask?e.generateMask(n):Go(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),o=6),"string"==typeof t?r=e.mask&&!s||void 0===e[$o]?(t=Buffer.from(t)).length:e[$o]:(r=t.length,i=e.mask&&e.readOnly&&!s);let a=r;r>=65536?(o+=8,a=127):r>125&&(o+=2,a=126);const u=Buffer.allocUnsafe(i?r+o:o);return u[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),e.mask?(u[1]|=128,u[o-4]=n[0],u[o-3]=n[1],u[o-2]=n[2],u[o-1]=n[3],s?[u,t]:i?(zo(t,n,u,o,r),[u]):(zo(t,n,t,0,r),[u,t])):[u,t]}close(t,e,n,r){let i;if(void 0===t)i=Mo;else{if("number"!=typeof t||!Jo(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==e&&e.length){const n=Buffer.byteLength(e);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+n),i.writeUInt16BE(t,0),"string"==typeof e?i.write(e,2):i.set(e,2)}else i=Buffer.allocUnsafe(2),i.writeUInt16BE(t,0)}const o={[$o]:i.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,i,!1,o,r]):this.sendFrame(Ho.frame(i,o),r)}ping(t,e,n){let r,i;if("string"==typeof t?(r=Buffer.byteLength(t),i=!1):(r=(t=Wo(t)).length,i=Wo.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[$o]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(Ho.frame(t,o),n)}pong(t,e,n){let r,i;if("string"==typeof t?(r=Buffer.byteLength(t),i=!1):(r=(t=Wo(t)).length,i=Wo.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const o={[$o]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,n]):this.sendFrame(Ho.frame(t,o),n)}send(t,e,n){const r=this._extensions[_o.extensionName];let i,o,s=e.binary?2:1,a=e.compress;if("string"==typeof t?(i=Buffer.byteLength(t),o=!1):(i=(t=Wo(t)).length,o=Wo.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=i>=r._threshold),this._compress=a):(a=!1,s=0),e.fin&&(this._firstFragment=!0),r){const r={[$o]:i,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:a};this._deflating?this.enqueue([this.dispatch,t,this._compress,r,n]):this.dispatch(t,this._compress,r,n)}else this.sendFrame(Ho.frame(t,{[$o]:i,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:!1}),n)}dispatch(t,e,n,r){if(!e)return void this.sendFrame(Ho.frame(t,n),r);const i=this._extensions[_o.extensionName];this._bufferedBytes+=n[$o],this._deflating=!0,i.compress(t,n.fin,((t,e)=>{if(this._socket.destroyed){const t=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(t);for(let e=0;e<this._queue.length;e++){const n=this._queue[e],r=n[n.length-1];"function"==typeof r&&r(t)}}else this._bufferedBytes-=n[$o],this._deflating=!1,n.readOnly=!1,this.sendFrame(Ho.frame(e,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][$o],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][$o],this._queue.push(t)}sendFrame(t,e){2===t.length?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}}var Yo=Ho;const{kForOnEventAttribute:Zo,kListener:Ko}=qi,Xo=Symbol("kCode"),Qo=Symbol("kData"),ts=Symbol("kError"),es=Symbol("kMessage"),ns=Symbol("kReason"),rs=Symbol("kTarget"),is=Symbol("kType"),os=Symbol("kWasClean");class ss{constructor(t){this[rs]=null,this[is]=t}get target(){return this[rs]}get type(){return this[is]}}Object.defineProperty(ss.prototype,"target",{enumerable:!0}),Object.defineProperty(ss.prototype,"type",{enumerable:!0});class as extends ss{constructor(t,e={}){super(t),this[Xo]=void 0===e.code?0:e.code,this[ns]=void 0===e.reason?"":e.reason,this[os]=void 0!==e.wasClean&&e.wasClean}get code(){return this[Xo]}get reason(){return this[ns]}get wasClean(){return this[os]}}Object.defineProperty(as.prototype,"code",{enumerable:!0}),Object.defineProperty(as.prototype,"reason",{enumerable:!0}),Object.defineProperty(as.prototype,"wasClean",{enumerable:!0});class us extends ss{constructor(t,e={}){super(t),this[ts]=void 0===e.error?null:e.error,this[es]=void 0===e.message?"":e.message}get error(){return this[ts]}get message(){return this[es]}}Object.defineProperty(us.prototype,"error",{enumerable:!0}),Object.defineProperty(us.prototype,"message",{enumerable:!0});class cs extends ss{constructor(t,e={}){super(t),this[Qo]=void 0===e.data?null:e.data}get data(){return this[Qo]}}Object.defineProperty(cs.prototype,"data",{enumerable:!0});const ls={addEventListener(t,e,n={}){let r;if("message"===t)r=function(t,n){const r=new cs("message",{data:n?t:t.toString()});r[rs]=this,e.call(this,r)};else if("close"===t)r=function(t,n){const r=new as("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[rs]=this,e.call(this,r)};else if("error"===t)r=function(t){const n=new us("error",{error:t,message:t.message});n[rs]=this,e.call(this,n)};else{if("open"!==t)return;r=function(){const t=new ss("open");t[rs]=this,e.call(this,t)}}r[Zo]=!!n[Zo],r[Ko]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[Ko]===e&&!n[Zo]){this.removeListener(t,n);break}}};var ds={CloseEvent:as,ErrorEvent:us,Event:ss,EventTarget:ls,MessageEvent:cs};const{tokenChars:ps}=Io;function hs(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var fs={format:function(t){return Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>[e].concat(Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>!0===t?e:`${e}=${t}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(t){const e=Object.create(null);let n,r,i=Object.create(null),o=!1,s=!1,a=!1,u=-1,c=-1,l=-1,d=0;for(;d<t.length;d++)if(c=t.charCodeAt(d),void 0===n)if(-1===l&&1===ps[c])-1===u&&(u=d);else if(0===d||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);const r=t.slice(u,l);44===c?(hs(e,r,i),i=Object.create(null)):n=r,u=l=-1}}else-1===l&&-1!==u&&(l=d);else if(void 0===r)if(-1===l&&1===ps[c])-1===u&&(u=d);else if(32===c||9===c)-1===l&&-1!==u&&(l=d);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d),hs(i,t.slice(u,l),!0),44===c&&(hs(e,n,i),i=Object.create(null),n=void 0),u=l=-1}else{if(61!==c||-1===u||-1!==l)throw new SyntaxError(`Unexpected character at index ${d}`);r=t.slice(u,d),u=l=-1}else if(s){if(1!==ps[c])throw new SyntaxError(`Unexpected character at index ${d}`);-1===u?u=d:o||(o=!0),s=!1}else if(a)if(1===ps[c])-1===u&&(u=d);else if(34===c&&-1!==u)a=!1,l=d;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${d}`);s=!0}else if(34===c&&61===t.charCodeAt(d-1))a=!0;else if(-1===l&&1===ps[c])-1===u&&(u=d);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${d}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${d}`);-1===l&&(l=d);let s=t.slice(u,l);o&&(s=s.replace(/\\/g,""),o=!1),hs(i,r,s),44===c&&(hs(e,n,i),i=Object.create(null),n=void 0),r=void 0,u=l=-1}}else-1===l&&(l=d);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===l&&(l=d);const p=t.slice(u,l);return void 0===n?hs(e,p,i):(void 0===r?hs(i,p,!0):hs(i,r,o?p.replace(/\\/g,""):p),hs(e,n,i)),e}};const{randomBytes:vs,createHash:ms}=w,{URL:bs}=s,{BINARY_TYPES:ys,EMPTY_BUFFER:gs,GUID:ws,kForOnEventAttribute:js,kListener:_s,kStatusCode:Ss,kWebSocket:Ps,NOOP:As}=qi,{EventTarget:{addEventListener:Cs,removeEventListener:Es}}=ds,{format:Is,parse:ks}=fs,{toBuffer:Os}=co,xs=Symbol("kAborted"),Us=[8,13],Ds=["CONNECTING","OPEN","CLOSING","CLOSED"],Ns=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Rs extends t{constructor(t,e,n){super(),this._binaryType=ys[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=gs,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Rs.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===e?e=[]:Array.isArray(e)||("object"==typeof e&&null!==e?(n=e,e=[]):e=[e]),Ts(this,t,e,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(t){ys.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}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(t,e,n){const r=new qo({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Yo(t,this._extensions,n.generateMask),this._receiver=r,this._socket=t,r[Ps]=this,t[Ps]=this,r.on("conclude",Js),r.on("drain",zs),r.on("error",Ws),r.on("message",Vs),r.on("ping",Hs),r.on("pong",Ys),t.setTimeout(0),t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",Ks),t.on("data",Xs),t.on("end",Qs),t.on("error",ta),this._readyState=Rs.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Rs.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[_o.extensionName]&&this._extensions[_o.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Rs.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Rs.CLOSED){if(this.readyState===Rs.CONNECTING){const t="WebSocket was closed before the connection was established";return Gs(this,this._req,t)}this.readyState!==Rs.CLOSING?(this._readyState=Rs.CLOSING,this._sender.close(t,e,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end()}}pause(){this.readyState!==Rs.CONNECTING&&this.readyState!==Rs.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Rs.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Rs.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||gs,e,n)):Ms(this,t,n)}pong(t,e,n){if(this.readyState===Rs.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Rs.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||gs,e,n)):Ms(this,t,n)}resume(){this.readyState!==Rs.CONNECTING&&this.readyState!==Rs.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Rs.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof e&&(n=e,e={}),"number"==typeof t&&(t=t.toString()),this.readyState!==Rs.OPEN)return void Ms(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[_o.extensionName]||(r.compress=!1),this._sender.send(t||gs,r,n)}terminate(){if(this.readyState!==Rs.CLOSED){if(this.readyState===Rs.CONNECTING){const t="WebSocket was closed before the connection was established";return Gs(this,this._req,t)}this._socket&&(this._readyState=Rs.CLOSING,this._socket.destroy())}}}Object.defineProperty(Rs,"CONNECTING",{enumerable:!0,value:Ds.indexOf("CONNECTING")}),Object.defineProperty(Rs.prototype,"CONNECTING",{enumerable:!0,value:Ds.indexOf("CONNECTING")}),Object.defineProperty(Rs,"OPEN",{enumerable:!0,value:Ds.indexOf("OPEN")}),Object.defineProperty(Rs.prototype,"OPEN",{enumerable:!0,value:Ds.indexOf("OPEN")}),Object.defineProperty(Rs,"CLOSING",{enumerable:!0,value:Ds.indexOf("CLOSING")}),Object.defineProperty(Rs.prototype,"CLOSING",{enumerable:!0,value:Ds.indexOf("CLOSING")}),Object.defineProperty(Rs,"CLOSED",{enumerable:!0,value:Ds.indexOf("CLOSED")}),Object.defineProperty(Rs.prototype,"CLOSED",{enumerable:!0,value:Ds.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(Rs.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(Rs.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[js])return e[_s];return null},set(e){for(const e of this.listeners(t))if(e[js]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[js]:!0})}})})),Rs.prototype.addEventListener=Cs,Rs.prototype.removeEventListener=Es;var Bs=Rs;function Ts(t,e,n,r){const i={protocolVersion:Us[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!Us.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Us.join(", ")})`);let s;if(e instanceof bs)s=e,t._url=e.href;else{try{s=new bs(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}t._url=e}const a="wss:"===s.protocol,u="ws+unix:"===s.protocol;let l;if("ws:"===s.protocol||a||u?u&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"):l='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',l){const e=new SyntaxError(l);if(0===t._redirects)throw e;return void Ls(t,e)}const d=a?443:80,p=vs(16).toString("base64"),h=a?c.request:o.request,f=new Set;let v,m;if(i.createConnection=a?Fs:qs,i.defaultPort=i.defaultPort||d,i.port=s.port||d,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(v=new _o(!0!==i.perMessageDeflate?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=Is({[_o.extensionName]:v.offer()})),n.length){for(const t of n){if("string"!=typeof t||!Ns.test(t)||f.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(t)}i.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),u){const t=i.path.split(":");i.socketPath=t[0],i.path=t[1]}if(i.followRedirects){if(0===t._redirects){t._originalIpc=u,t._originalSecure=a,t._originalHostOrSocketPath=u?i.socketPath:s.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,n]of Object.entries(e))r.headers[t.toLowerCase()]=n}else if(0===t.listenerCount("redirect")){const e=u?!!t._originalIpc&&i.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&s.host===t._originalHostOrSocketPath;(!e||t._originalSecure&&!a)&&(delete i.headers.authorization,delete i.headers.cookie,e||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),m=t._req=h(i),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=h(i);i.timeout&&m.on("timeout",(()=>{Gs(t,m,"Opening handshake has timed out")})),m.on("error",(e=>{null===m||m[xs]||(m=t._req=null,Ls(t,e))})),m.on("response",(o=>{const s=o.headers.location,a=o.statusCode;if(s&&i.followRedirects&&a>=300&&a<400){if(++t._redirects>i.maxRedirects)return void Gs(t,m,"Maximum redirects exceeded");let o;m.abort();try{o=new bs(s,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${s}`);return void Ls(t,n)}Ts(t,o,n,r)}else t.emit("unexpected-response",m,o)||Gs(t,m,`Unexpected server response: ${o.statusCode}`)})),m.on("upgrade",((e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Rs.CONNECTING)return;if(m=t._req=null,"websocket"!==e.headers.upgrade.toLowerCase())return void Gs(t,n,"Invalid Upgrade header");const o=ms("sha1").update(p+ws).digest("base64");if(e.headers["sec-websocket-accept"]!==o)return void Gs(t,n,"Invalid Sec-WebSocket-Accept header");const s=e.headers["sec-websocket-protocol"];let a;if(void 0!==s?f.size?f.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":f.size&&(a="Server sent no subprotocol"),a)return void Gs(t,n,a);s&&(t._protocol=s);const u=e.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void Gs(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=ks(u)}catch(e){return void Gs(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==_o.extensionName){return void Gs(t,n,"Server indicated an extension that was not requested")}try{v.accept(e[_o.extensionName])}catch(e){return void Gs(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[_o.extensionName]=v}t.setSocket(n,r,{generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})})),m.end()}function Ls(t,e){t._readyState=Rs.CLOSING,t.emit("error",e),t.emitClose()}function qs(t){return t.path=t.socketPath,h.connect(t)}function Fs(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=h.isIP(t.host)?"":t.host),g.connect(t)}function Gs(t,e,n){t._readyState=Rs.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Gs),e.setHeader?(e[xs]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Ls,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Ms(t,e,n){if(e){const n=Os(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(n){n(new Error(`WebSocket is not open: readyState ${t.readyState} (${Ds[t.readyState]})`))}}function Js(t,e){const n=this[Ps];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[Ps]&&(n._socket.removeListener("data",Xs),process.nextTick(Zs,n._socket),1005===t?n.close():n.close(t,e))}function zs(){const t=this[Ps];t.isPaused||t._socket.resume()}function Ws(t){const e=this[Ps];void 0!==e._socket[Ps]&&(e._socket.removeListener("data",Xs),process.nextTick(Zs,e._socket),e.close(t[Ss])),e.emit("error",t)}function $s(){this[Ps].emitClose()}function Vs(t,e){this[Ps].emit("message",t,e)}function Hs(t){const e=this[Ps];e.pong(t,!e._isServer,As),e.emit("ping",t)}function Ys(t){this[Ps].emit("pong",t)}function Zs(t){t.resume()}function Ks(){const t=this[Ps];let e;this.removeListener("close",Ks),this.removeListener("data",Xs),this.removeListener("end",Qs),t._readyState=Rs.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[Ps]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",$s),t._receiver.on("finish",$s))}function Xs(t){this[Ps]._receiver.write(t)||this.pause()}function Qs(){const t=this[Ps];t._readyState=Rs.CLOSING,t._receiver.end(),this.end()}function ta(){const t=this[Ps];this.removeListener("error",ta),this.on("error",As),t&&(t._readyState=Rs.CLOSING,this.destroy())}var ea=function(t){function e(e,n,r,i,o){void 0===o&&(o=5e3);var s=t.call(this)||this;s.endpoint=e,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=i,s.closeTimeout=o,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(t){return(e=_e(e=t))&&Nn.test(e)?e.replace(Dn,"\\$&"):e;var e})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return S(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return A(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,i=n.address;t.tcpServer.listen(r,i,(function(){t.emit("tunnel-open",{address:i,port:r}),e({address:i,port:r})}))}else t.tcpServer.listen(0,(function(){var n=t.tcpServer.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:i},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return A(this,void 0,void 0,(function(){var t,e=this;return C(this,(function(n){switch(n.label){case 0:return t=!1,[4,Promise.race([new Promise((function(n){e.tcpServer.close((function(){t=!0,e.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(t){return setTimeout(t,e.closeTimeout)})).then((function(){t||(e.openConnections.forEach((function(t){t.destroy(),e.openConnections.delete(t)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},e.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=new Bs(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Li(n),i=this.getHeaderTransform();this.rewriteHostHeader&&i?Di(t,i,r):Di(t,r),Di(r,t),n.on("close",(function(t,n,r){e.emit("connection-close",t,n,r)})),r.on("error",(function(t){e.emit("connection-error",t)})),t.on("error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var t=this.rewriteHostHeader.targetHostname,e=this.hostRegex;return new i({transform:function(n,r,i){var o=n.toString();if(o.split("\n",1)[0].includes("HTTP")){var s=o.replace(e,"Host: ".concat(t));i(null,Buffer.from(s))}else i(null,n)}})}},e}(e),na=function(t){function e(e,n,r){var i=t.call(this)||this;return i.endpoint=e,i.headers=n,i.bindToAssign=r,i.protocol="UDP",i.udpSocket=j.createSocket("udp4"),i.handleConnection(),i}return S(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return A(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,i=n.address;t.udpSocket.bind(r,i,(function(){t.emit("tunnel-open",{address:i,port:r}),e({address:i,port:r})}))}else t.udpSocket.bind(0,(function(){var n=t.udpSocket.address(),r=n.address,i=n.port,o="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:o,port:i},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return A(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){t.udpSocket.close((function(){t.emit("tunnel-close"),e()}))}))];case 1:return e.sent(),[2]}}))}))},e.prototype.handleConnection=function(){var t,e=this,n=new Bs(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Li(n);this.udpSocket.on("message",(function(e,n){t=n,r.write(e)})),r.on("data",(function(n){t&&e.udpSocket.send(n,t.port,t.address,(function(t){t&&e.emit("connection-error",t)}))})),this.udpSocket.on("error",(function(t){e.emit("connection-error",t)})),r.on("error",(function(t){e.emit("connection-error",t)})),n.on("connection-close",(function(t,n,r){e.emit("connection-close",t,n,r)})),n.on("connection-error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e}(e);var ra="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,ia=function(t,e){return A(void 0,void 0,void 0,(function(){var n;return C(this,(function(r){return n=Promise.resolve([]),[2,t.reduce((function(t,n){return t.then((function(t){return e(n).then((function(e){return t.push(e),t}))}))}),n)]}))}))},oa=function(t){function e(e){void 0===e&&(e=8192);var n=t.call(this)||this;return n.bufferDefaultSize=e,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return S(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.getContentsAsString=function(t,e){void 0===t&&(t="utf8");var n=this.buffer.toString(t,0,Math.min(e||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},e.prototype.adaptBuffer=function(t){if(this.buffer.length-this.size<t){var e=Math.ceil((t-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*e);this.buffer.copy(n,0,0,this.size),this.buffer=n}},e.prototype._write=function(t,e,n){this.adaptBuffer(t.length),t.copy(this.buffer,this.size,0),this._size+=t.length,n()},e}(r.Writable),sa=function(t){function e(e,n,r){var i=t.call(this)||this;return i.contextProvider=e,i.listServices=n,i.listAddons=r,i.connections=[],i.hostsFileMutex=new yi,i.ipAllocationMutex=new yi,i.stopForwarding=function(t){return A(i,void 0,void 0,(function(){var e,n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:return[4,t.tunnel.close()];case 1:return a.sent(),e=t.forwardingContext,n=e.projectId,r=e.type,i=e.id,(o=e.hostnames).length>0?[4,this.unregisterHostnames(null===(s=t.tunnel.bindTo)||void 0===s?void 0:s.address,o)]:[3,3];case 2:a.sent(),a.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(t){var e=t.forwardingContext,o=e.type,s=e.id,a=e.projectId;return s===i&&a===n&&o===r})),1),[2]}}))}))},i.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(t=null===process||void 0===process?void 0:process.getuid)||void 0===t?void 0:t.call(process),"). Try running with 'sudo'.")}:{error:!1,type:"unix-admin"}:function(){try{return m("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return m("fltmc"),!0}catch(t){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var t},i.assertStartedWithNodejs=function(){if(!ra)throw new Error("Port forwarding only possible when started with nodejs")},i.proxyApiClient=new Kr(e),i}return S(e,t),e.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),A(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardProject(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopProjectForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),A(this,void 0,void 0,(function(){var n,r,i,o,s,a=this;return C(this,(function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return i=u.sent(),[4,Promise.all(r.data.services.map((function(t){return A(a,void 0,void 0,(function(){return C(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:t.id},e)]}))}))})))];case 3:return o=u.sent(),[4,Promise.all(i.data.addons.map((function(t){return A(a,void 0,void 0,(function(){return C(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:t.id},e)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=u.sent(),[2,{services:o,addons:s}]}}))}))},e.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),A(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardService(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopServiceForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),A(this,void 0,void 0,(function(){var n,r,i,o,s,a,u,c=this;return C(this,(function(l){switch(l.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,r=t.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return i=l.sent(),o=i.namespace,s=i.targetDomain,a=i.instances,u=i.ports,0===a.length?[2,[]]:[4,ia(u,(function(t){var i,u="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(t.internalPort),l="".concat(r,".").concat(o,".svc.cluster.local"),d=["".concat(r)];t.name&&d.push("".concat(t.name,".").concat(r)),"HTTP"===t.protocol&&(i={altHostnames:d,targetHostname:l});var p=e?[]:E([l],d,!0);return c.forwardPort(u,t,p,"service",r,n,e,i)}))];case 2:return[2,l.sent()]}}))}))},e.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),A(this,void 0,void 0,(function(){var r;return C(this,(function(i){switch(i.label){case 0:return[4,this.forwardAddon(t,n)];case 1:r=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,i.sent()];case 4:return[4,this.stopAddonForwarding(t)];case 5:return i.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),A(this,void 0,void 0,(function(){var n,r,i,o,s=this;return C(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=t.addonId,r=t.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return i=a.sent(),o=i.instances.map((function(t){var e=t.podName,n=t.internalHostname;return t.ports.map((function(t){return{podName:e,internalHostname:n,port:t}}))})),[4,ia((u=o,null!=u&&u.length?ke(u,1/0):[]),(function(t){var o=t.podName,a=t.internalHostname,u=t.port;return A(s,void 0,void 0,(function(){var t;return C(this,(function(s){return t="https://".concat(i.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(o,"/port/").concat(u.internalPort),[2,this.forwardPort(t,u,e?[]:[a],"addon",n,r,e)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},e.prototype.allocateIpAddress=function(t){return A(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return A(e,void 0,void 0,(function(){var e,n,r,i,o;return C(this,(function(s){switch(s.label){case 0:return e="127.24.1.1",n="127.24.255.255",r=null!==(o=this.nextIpAddress)&&void 0!==o?o:e,[4,Xr(t,r,n)];case 1:return i=s.sent(),this.nextIpAddress=ni(ei(i)+1),ei(this.nextIpAddress)>ei(n)&&(this.nextIpAddress=e),[2,i]}}))}))}))]}))}))},e.prototype.forwardPort=function(t,e,n,r,i,o,s,a){var u;return void 0===s&&(s=!0),A(this,void 0,void 0,(function(){var c,l,d,p,h,f,v=this;return C(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(l=this.canExecuteWithHostnames()).error)throw new Error("".concat(l.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(o,i,r,e,s)];case 1:return d=m.sent(),p="UDP"===e.protocol?new na(t,c,d):new ea(t,c,a,d),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return A(v,void 0,void 0,(function(){return C(this,(function(t){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return h=m.sent(),f={projectId:o,id:i,type:r,hostnames:n,port:h.port,address:h.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",p,f),p.on("connection-error",(function(t){return v.emit("connection-error",p,f,t)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,f)})),this.connections.push({tunnel:p,forwardingContext:f}),[2,{data:f}]}}))}))},e.prototype.determineSocketAddress=function(t,e,n,r,i){var o;return A(this,void 0,void 0,(function(){var s,a,u;return C(this,(function(c){switch(c.label){case 0:return i?[2,void 0]:(s=this.connections.find((function(r){return r.forwardingContext.projectId===t&&r.forwardingContext.id===e&&r.forwardingContext.type===n})),a=(null===(o=null==s?void 0:s.forwardingContext)||void 0===o?void 0:o.port)!==r.internalPort,s&&a?[2,{address:s.forwardingContext.address,port:r.internalPort}]:(u={},[4,this.allocateIpAddress(r.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=r.internalPort,u)]}}))}))},e.prototype.registerHostnames=function(t,e){return A(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,e),n.add.apply(n,E([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.unregisterHostnames=function(t,e){return A(this,void 0,void 0,(function(){return C(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,E([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.modifyHostsFile=function(t){return A(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return A(e,void 0,void 0,(function(){var e,n=this;return C(this,(function(r){switch(r.label){case 0:return[4,bi.load({header:"Northflank Proxy"})];case 1:return e=r.sent(),t(e),[4,e.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,aa(5)((function(){return A(n,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"atomic"})];case 1:return t.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,aa(5)((function(){return A(n,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"standard"})];case 1:return t.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopProjectForwarding=function(t){return A(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return e.forwardingContext.projectId===t.projectId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopServiceForwarding=function(t){return A(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"service"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.serviceId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopAddonForwarding=function(t){return A(this,void 0,void 0,(function(){var e=this;return C(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"addon"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.addonId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stop=function(){return A(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this.connections.map((function(e){return A(t,void 0,void 0,(function(){return C(this,(function(t){return[2,this.stopForwarding(e)]}))}))})))];case 1:return e.sent(),[2]}}))}))},e}(e),aa=function(t,e){return void 0===e&&(e=50),function(n){var r=t,i=function(){return A(void 0,void 0,void 0,(function(){var t;return C(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,4]),[4,n()];case 1:return[2,o.sent()];case 2:if(t=o.sent(),r<=0)throw t;return r-=1,[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 3:return o.sent(),[2,i()];case 4:return[2]}}))}))};return i()}},ua=function(t){function e(e,r,i,o,s,a){void 0===o&&(o=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var u=t.call(this)||this;return u.baseUrl=e,u.execConfig=r,u.token=i,u.stdOut=o,u.stdErr=s,u.stdIn=a,u.waitForCommandResult=function(){return A(u,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,t.sent()]}}))}))},u.sendInputToCurrentCommand=function(t){return A(u,void 0,void 0,(function(){var e;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(e=this.duplex)||void 0===e||e.write(this.constructPayloadPacket(t)),[2]}))}))},u.resizeTerminal=function(t){return A(u,void 0,void 0,(function(){var e;return C(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(e=this.duplex)||void 0===e||e.write(JSON.stringify({type:"resize",data:{ttyRows:null==t?void 0:t.rows,ttyColumns:null==t?void 0:t.columns}})),[2]}))}))},u.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},u}return S(e,t),Object.defineProperty(e.prototype,"execEndpoint",{get:function(){var t=this.execConfig,e=t.entityId,n=t.entityType,r=t.projectId,i="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(i).concat(function(){switch(n){case"service":return"services/".concat(e);case"job":return"jobs/".concat(e);case"addon":return"addons/".concat(e);case"build":return"builds/".concat(e);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),e.prototype.start=function(){return A(this,void 0,void 0,(function(){var t=this;return C(this,(function(e){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(e,n){var r,i,o;void 0!==t.remote&&n(Error("Command is already running"));var s,a=t.execEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new Bs(a);try{t.duplex=Li(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),t.stdIn.on("data",(function(e){var n,r;(null===(n=t.duplex)||void 0===n?void 0:n.writable)&&(null===(r=t.duplex)||void 0===r||r.write(t.constructPayloadPacket(e)))})),null===(r=t.duplex)||void 0===r||r.on("data",(function(e){var n,r,i=JSON.parse(e.toString());switch(null==i?void 0:i.type){case"init":var o=i.data;"successful"!==o.auth&&u("Command initialization failed: ".concat(null!==(n=null==o?void 0:o.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":s=i.data,t.emit("command-result",s),null===(r=t.duplex)||void 0===r||r.end();break;case"stdOut":t.emit("std-out-data",i.data),t.stdOut.write(i.data);break;case"stdErr":t.emit("std-err-data",i.data),t.stdErr.write(i.data);break;case"error":u(i.data);break;default:var a="unable to parse message: ".concat(JSON.stringify(i));u(a)}})),null===(i=t.duplex)||void 0===i||i.on("end",(function(){t.emit("command-completed"),t.reset(),e(s)})),null===(o=t.duplex)||void 0===o||o.on("error",(function(n){t.emit("error",n),t.emit("command-completed"),t.reset(),e(s)}));var u=function(e){t.emit("error",e),t.reset(),n(new Error(e))};t.emit("command-started")})),[2,this.currentCommand]}))}))},e.prototype.initialAuth=function(){var t,e=this.execConfig,n=e.command,r=e.containerName,i=e.shell,o=e.user,s=e.group,a=e.ttyColumns,u=e.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:i,user:o,group:s,ttyColumns:a,ttyRows:u}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(c))},e.prototype.reset=function(){var t;this.remote=void 0,this.currentCommand=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(e),ca=function(){function t(t){this.contextProvider=t,this.assertStartedWithNodejs=function(){if(!ra)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return A(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.serviceId,r=t.projectId,"service",i=P({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(i)]}))}))},t.prototype.execServiceSession=function(t,e){return A(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.serviceId,r=t.projectId,"service",i=P({projectId:r,entityId:n,entityType:"service"},e),[2,this.shellSession(i)]}))}))},t.prototype.execJobCommand=function(t,e){return A(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.jobId,r=t.projectId,"job",i=P({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(i)]}))}))},t.prototype.execJobSession=function(t,e){return A(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){return n=t.jobId,r=t.projectId,"job",i=P({projectId:r,entityId:n,entityType:"job"},e),[2,this.shellSession(i)]}))}))},t.prototype.execCommand=function(t){return A(this,void 0,void 0,(function(){var e,n,r;return C(this,(function(i){switch(i.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(P({shell:"none"},t)),n=new oa,r=new oa,e.stdOut.pipe(n),e.stdErr.pipe(r),e.on("error",(function(t){throw new Error(t)})),[4,e.start()];case 1:return[2,{commandResult:i.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},t.prototype.shellSession=function(t){this.assertStartedWithNodejs();var e=this.getCommandRunner(t);return e.start(),e},t.prototype.getCommandRunner=function(t){var e=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new ua(e,t,n)},t}(),la=function(t){function e(e){var n=this.constructor,r=t.call(this,e.message)||this;r.name="NorthflankApiCallError",r.message=e.message,r.status=e.status,r.id=e.id,r.details=e.details;var i=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,i):r.__proto__=i,r}return S(e,t),e}(Error),da=ra?Zr:window.fetch,pa=function(){if(ra)try{return JSON.parse(b.readFileSync(y.join(y.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(t){return console.log("Failed to check version of northflank CLI (".concat(t.message,")")),{}}return{}},ha=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return A(n,void 0,void 0,(function(){var e,n,r,i,o,s,a,u,c,l,d,p,h=this;return C(this,(function(f){switch(f.label){case 0:if(e=this.method,n={method:e,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return i="".concat(r).concat(this.endpointUrl(t)),o=this.body(t),s=P(P({url:i},n),{body:o}),[4,ga(i,P(P({},n),{body:o}))];case 1:return[4,(a=f.sent()).text()];case 2:return u=f.sent(),c=function(){if(200!==a.status){var t=null==l?void 0:l.error,e=(null==t?void 0:t.message)||"",n={status:a.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(h.opts.throwErrorOnHttpErrorCode)throw new la(n);return n}},l=function(){try{return JSON.parse(u)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),d=c(),[2,{data:null==l?void 0:l.data,rawResponse:a,request:s,error:d,pagination:null==l?void 0:l.pagination}]}}))}))},this.contextProvider=t}return t.prototype.getDefaultHeaders=function(){var t,e,n=this.contextProvider.getCurrentToken(),r=(null===(t=this.opts)||void 0===t?void 0:t.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(e=pa())||void 0===e?void 0:e.version).concat(r)}},t}(),fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return S(e,t),e}(ha),va=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return S(e,t),e}(ha),ma=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return S(e,t),e}(ha),ba=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="put",e}return S(e,t),e}(ha),ya=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="patch",e}return S(e,t),e}(ha),ga=function(t,e,n,r){return void 0===e&&(e={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(i,o){var s=function(n){return da(t,e).then((function(t){i(t)})).catch((function(t){return A(void 0,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return n>0?[4,(i=r,new Promise((function(t){setTimeout((function(){t()}),i)})))]:[3,2];case 1:return e.sent(),[2,s(n-1)];case 2:return[2,o(t)]}var i}))}))}))};return s(n)}))},wa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists projects for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),_a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given project",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId)},e.body=function(){},e}return S(e,t),e}(fa),Sa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given project. Fails if the project isn't empty.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId)},e.body=function(){},e}return S(e,t),e}(ma),Pa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of addons belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Aa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Ca=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ba),Ea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(fa),Ia=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ya),ka=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(ma),Oa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the credentials for connecting to the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/credentials")},e.body=function(){},e}return S(e,t),e}(fa),xa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the available addon types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/addon-types"},e.body=function(){},e}return S(e,t),e}(fa),Ua=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the allocated resources for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Da=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the current addon version including available upgrades and upgrade history.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(){},e}return S(e,t),e}(fa),Na=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Upgrades the addon to a new version.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Ra=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the network settings for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Ba=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the security rules for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Ta=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of backups for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),La=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Initiates a backup for the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),qa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return S(e,t),e}(fa),Fa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a given backup",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return S(e,t),e}(ma),Ga=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores the given addon to the given backup state.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/restore")},e.body=function(){},e}return S(e,t),e}(va),Ma=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of restores for the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/restores").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Ja=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Imports a database from an external archive or existing live database.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),za=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > Deployment > View Instances",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/containers").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Wa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pause")},e.body=function(){},e}return S(e,t),e}(va),$a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resume the given addon if it is paused.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/resume")},e.body=function(){},e}return S(e,t),e}(va),Va=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restart the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/restart")},e.body=function(){},e}return S(e,t),e}(va),Ha=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the in progress backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort")},e.body=function(){},e}return S(e,t),e}(va),Ya=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/retain")},e.body=function(){},e}return S(e,t),e}(va),Za=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generates a temporary download link for downloading the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/download-link")},e.body=function(){},e}return S(e,t),e}(fa),Ka=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts an in-progress backup restore.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort-restore")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Xa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about an addon's backup schedules",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Qa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),tu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules/").concat(t.parameters.scheduleId)},e.body=function(){},e}return S(e,t),e}(ma),eu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the valid window for performing a point-in-time restore (PITR) on this addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pitr-window")},e.body=function(){},e}return S(e,t),e}(fa),nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores an addon to a specific point in time.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pitr")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of past invoices",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),ou=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud providers",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/cloud-providers"},e.body=function(){},e}return S(e,t),e}(fa),su=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),au=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),uu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return S(e,t),e}(fa),cu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given integration. Fails if the integration is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Delete",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return S(e,t),e}(ma),du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists clusters for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return S(e,t),e}(fa),fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update an existing cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given cluster. Fails if the cluster has associated projects.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Delete",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return S(e,t),e}(ma),mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of jobs belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return S(e,t),e}(fa),yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return S(e,t),e}(ma),gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),wu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ba),ju=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual/").concat(t.parameters.jobId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ya),_u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Su=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ba),Pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron/").concat(t.parameters.jobId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ya),Au=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Scale Job",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Cu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modify cron job to toggle suspending of its schedule.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Eu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pause")},e.body=function(){},e}return S(e,t),e}(va),Iu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),ku=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetches run history for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Ou=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Starts a new job run for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns data about the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return S(e,t),e}(fa),Uu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return S(e,t),e}(ma),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates settings for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(){},e}return S(e,t),e}(fa),Ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists builds for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Tu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given job. Given a commit sha, it will build that commit.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(fa),qu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job build",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(ma),Fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Ju=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets build arguments for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > Update Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),zu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments/details")},e.body=function(){},e}return S(e,t),e}(fa),Wu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),$u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > Update Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment/details")},e.body=function(){},e}return S(e,t),e}(fa),Hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(){},e}return S(e,t),e}(fa),Yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Zu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/containers").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Ku=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/branches").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pull-requests").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Qu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of log sinks added to this account.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),tc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Create",e.endpointUrl=function(t){return"/v1/integrations/log-sinks"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),ec=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){return"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId)},e.body=function(){},e}return S(e,t),e}(fa),nc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Delete",e.endpointUrl=function(t){return"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId)},e.body=function(){},e}return S(e,t),e}(ma),rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the settings for a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),ic=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pauses a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/pause")},e.body=function(){},e}return S(e,t),e}(va),oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes a paused log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/resume")},e.body=function(){},e}return S(e,t),e}(va),sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the container registry credentials saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new set of container registry credentials to this account.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Create",e.endpointUrl=function(t){return"/v1/integrations/registries"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),uc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Views a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read Encrypted",e.endpointUrl=function(t){return"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return S(e,t),e}(fa),cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Delete",e.endpointUrl=function(t){return"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return S(e,t),e}(ma),lc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Update",e.endpointUrl=function(t){return"/v1/integrations/registries/".concat(t.parameters.credentialId,"/modify")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),dc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available domains",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Registers a new domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),hc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return S(e,t),e}(fa),fc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a domain and each of its registered subdomains.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Delete",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return S(e,t),e}(ma),vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attempts to verify the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/verify")},e.body=function(){},e}return S(e,t),e}(va),mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new subdomain to the domain.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return S(e,t),e}(fa),yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from a domain.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return S(e,t),e}(ma),gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/verify")},e.body=function(){},e}return S(e,t),e}(va),wc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assigns a service port to the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),jc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from its assigned service",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(){},e}return S(e,t),e}(ma),_c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available billing plans",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/plans"},e.body=function(){},e}return S(e,t),e}(fa),Sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available project regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/regions"},e.body=function(){},e}return S(e,t),e}(fa),Pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the partially random string used when generating host names for the authenticated account.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/dns-id"},e.body=function(){},e}return S(e,t),e}(fa),Ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists linked version control providers",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){return"/v1/integrations/vcs"},e.body=function(){},e}return S(e,t),e}(fa),Cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of secrets belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/secrets").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Ec=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Ic=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ba),kc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ya),Oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret including its contents",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId).concat(r)},e.body=function(){},e}return S(e,t),e}(fa),xc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(){},e}return S(e,t),e}(ma),Uc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Dc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret with details about its linked addons",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/details")},e.body=function(){},e}return S(e,t),e}(fa),Nc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Link an addon to the secret group or edit the settings of the linked addon.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a given addon link.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(fa),Bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unlinks an addon from the secret group.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return S(e,t),e}(ma),Tc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of services belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Lc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ba),Fc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/combined/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ya),Gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ba),Jc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/deployment/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ya),zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Wc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ba),$c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/build/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(ya),Vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId)},e.body=function(){},e}return S(e,t),e}(fa),Hc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId)},e.body=function(){},e}return S(e,t),e}(ma),Yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Scale Service",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(){},e}return S(e,t),e}(fa),Kc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Xc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restarts the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/restart")},e.body=function(){},e}return S(e,t),e}(va),Qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pause")},e.body=function(){},e}return S(e,t),e}(va),tl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),el=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(){},e}return S(e,t),e}(fa),nl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the list of ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),rl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),il=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given build or combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),ol=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(){},e}return S(e,t),e}(fa),sl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),al=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the builds for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),ul=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),cl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(fa),ll=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given service build",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return S(e,t),e}(ma),dl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/containers").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),pl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/branches").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),hl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pull-requests").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),fl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of templates",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),vl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return"/v1/templates"},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),ml=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId).concat(r)},e.body=function(){},e}return S(e,t),e}(fa),bl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Update",e.endpointUrl=function(t){return"/v1/templates/".concat(t.parameters.templateId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),yl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return"/v1/templates/".concat(t.parameters.templateId)},e.body=function(){},e}return S(e,t),e}(ma),gl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Run a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Run",e.endpointUrl=function(t){return"/v1/templates/".concat(t.parameters.templateId,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),wl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId,"/runs").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),jl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId,"/runs/").concat(t.parameters.templateRunId).concat(r)},e.body=function(){},e}return S(e,t),e}(fa),_l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of repositories accessible to this account",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Sl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of branches for the repo",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(t.parameters.vcsService,"/").concat(t.parameters.repositoryOwner,"/").concat(t.parameters.repositoryName,"/branches").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Pl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of volumes belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(){},e}return S(e,t),e}(fa),Al=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a volume with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Create",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Cl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return S(e,t),e}(fa),El=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update volume mounts and storage size",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Il=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes this volume and its associated data.",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Delete",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return S(e,t),e}(ma),kl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Ol=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Detach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),xl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Build Parameters",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Ul=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the build arguments for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > Update Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Dl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Build Parameters",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments/details")},e.body=function(){},e}return S(e,t),e}(fa),Nl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Environment Variables",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment").concat(r)},e.body=function(){},e}return S(e,t),e}(fa),Rl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > Update Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return S(e,t),e}(va),Bl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Environment Variables",e.endpointUrl=function(t){return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment/details")},e.body=function(){},e}return S(e,t),e}(fa),Tl=function(){function t(){this.loadContext()}return t.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},t.prototype.getInfo=function(){return""},t.prototype.storeContext=function(t){return A(this,void 0,void 0,(function(){return C(this,(function(e){switch(e.label){case 0:return[4,this.writeContext(t)];case 1:return e.sent(),this.contextWrapper=t,[2]}}))}))},t.prototype.addContext=function(t,e){return void 0===e&&(e=!0),A(this,void 0,void 0,(function(){var n,r,i;return C(this,(function(o){switch(o.label){case 0:if(e||void 0===this.findContext(t.name))return[3,1];throw new Error("Context with name ".concat(t.name," already exists"));case 1:return[4,this.removeContext(t.name)];case 2:o.sent(),o.label=3;case 3:return n=P({host:"https://api.northflank.com"},t),r=this.contextWrapper,i={current:n.name,contexts:E(E([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(i)];case 4:return o.sent(),[2]}}))}))},t.prototype.removeContext=function(t){return A(this,void 0,void 0,(function(){var e,n,r,i;return C(this,(function(o){switch(o.label){case 0:return e=this.contextWrapper,n=e.contexts.filter((function(e){return e.name!==t})),r=e.current===t?void 0:e.current,i={current:r,contexts:E([],n,!0),lastUpdateCheck:e.lastUpdateCheck},[4,this.storeContext(i)];case 1:return o.sent(),[2]}}))}))},t.prototype.getCurrentContext=function(){var t=this.contextWrapper.current;return void 0===t?t:this.findContext(t)},t.prototype.findContext=function(t){return this.contextWrapper.contexts.find((function(e){return e.name===t}))},t.prototype.getCurrentBaseUrl=function(t){var e=this.getCurrentContext();if(!0===t&&!(null==e?void 0:e.host))throw new Error("Context (".concat(null==e?void 0:e.name,") doesn't have a target API host. Please login again."));return null==e?void 0:e.host},t.prototype.getCurrentProjectName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.project},t.prototype.getCurrentName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.name},t.prototype.getCurrentToken=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.token},t.prototype.getCurrentServiceName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.service},t.prototype.getCurrentJobName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.job},t.prototype.getCurrentPlanId=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.plan},t.prototype.getCurrentRegion=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.region},t.prototype.useContext=function(t){return A(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(!this.findContext(t))throw new Error("Context with name ".concat(t," doesn't exist"));return e=this.contextWrapper,n=P(P({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.updateToken=function(t,e){return A(this,void 0,void 0,(function(){var n,r,i,o,s;return C(this,(function(a){switch(a.label){case 0:if(n=null!=e?e:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(e," doesn't exist"));return i=this.contextWrapper,o=i.contexts.map((function(e){return e.name===n?P(P({},r),{token:t}):e})),s=P(P({},i),{contexts:o}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},t.prototype.useProjectId=function(t){return A(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=P(P({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useServiceId=function(t){return A(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=P(P({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useJobId=function(t){return A(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=P(P({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.usePlanId=function(t){return A(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=P(P({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useRegion=function(t){return A(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=P(P({},e),{region:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},t.prototype.setLastUpdateCheck=function(t){return A(this,void 0,void 0,(function(){var e,n;return C(this,(function(r){switch(r.label){case 0:return e=this.contextWrapper,n=P(P({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t}(),Ll=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return A(n,void 0,void 0,(function(){var e;return C(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,b.promises.mkdir(t,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 3:return[2]}}))}))},n.configPath=e||"".concat(d.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return S(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(b.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return A(this,void 0,void 0,(function(){var e;return C(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,b.promises.writeFile(this.configFile,JSON.stringify(t,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw e=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(e.message)),e;case 5:return[2]}}))}))},e.prototype.assertConfigDir=function(){return A(this,void 0,void 0,(function(){return C(this,(function(t){switch(t.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return t.sent(),[2]}}))}))},e.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},e}(Tl),ql=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return S(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return A(this,void 0,void 0,(function(){return C(this,(function(e){return this.inMemoryContextWrapper=t,[2]}))}))},e}(Tl),Fl=function(t,e){void 0===e&&(e={});var n,r=this;this.baseUrl=function(){return r.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new sa(t,new Tc(t,e).call,new Pa(t,e).call),this.exec=new ca(t),this.endpoints={list:(n={},n.projects=new wa(t,e),n.addons=new Pa(t,e),n.invoices=new ru(t,e),n.providers=new ou(t,e),n.integrations=new su(t,e),n.clusters=new du(t,e),n.jobs=new mu(t,e),n.logSinks=new Qu(t,e),n.registries=new sc(t,e),n.domains=new dc(t,e),n.plans=new _c(t,e),n.regions=new Sc(t,e),n.vcs=new Ac(t,e),n.secrets=new Cc(t,e),n.services=new Tc(t,e),n.templates=new fl(t,e),n.templateRuns=new wl(t,e),n.repos=new _l(t,e),n.branches=new Sl(t,e),n.volumes=new Pl(t,e),n),create:function(){var n,r={};return r.project=new ja(t,e),r.addon=((n=new Aa(t,e)).backupSchedule=new Qa(t,e),n),r.integration=new au(t,e),r.cluster=new pu(t,e),r.job=function(){var n={};return n.manual=new gu(t,e),n.cron=new _u(t,e),n}(),r.logSink=new tc(t,e),r.domain=new pc(t,e),r.secret=new Ec(t,e),r.service=function(){var n={};return n.combined=new Lc(t,e),n.deployment=new Gc(t,e),n.build=new zc(t,e),n}(),r.template=new vl(t,e),r.volume=new Al(t,e),r}(),get:function(){var n,r,i={};return i.project=new _a(t,e),i.addon=((r=new Ea(t,e)).credentials=new Oa(t,e),r.types=new xa(t,e),r.version=new Da(t,e),r.backups=new Ta(t,e),r.backup=((n=new qa(t,e)).download=new Za(t,e),n),r.restores=new Ma(t,e),r.containers=new za(t,e),r.backupSchedules=new Xa(t,e),r.pitrWindow=new eu(t,e),r),i.invoice=function(){var n={};return n.details=new iu(t,e),n}(),i.integration=new uu(t,e),i.cluster=new hu(t,e),i.job=function(){var n=new bu(t,e);return n.runs=new ku(t,e),n.run=new xu(t,e),n.healthChecks=new Nu(t,e),n.builds=new Bu(t,e),n.build=new Lu(t,e),n.buildArguments=new Mu(t,e),n.buildArgumentDetails=new zu(t,e),n.runtimeEnvironment=new Wu(t,e),n.runtimeEnvironmentDetails=new Vu(t,e),n.deployment=new Hu(t,e),n.containers=new Zu(t,e),n.branches=new Ku(t,e),n.pullRequests=new Xu(t,e),n}(),i.logSink=new ec(t,e),i.registry=new uc(t,e),i.domain=new hc(t,e),i.subdomain=new bc(t,e),i.dnsId=new Pc(t,e),i.secret=new Oc(t,e),i.secretDetails=new Dc(t,e),i.secretLink=new Rc(t,e),i.service=function(){var n=new Vc(t,e);return n.deployment=new Zc(t,e),n.ports=new el(t,e),n.healthChecks=new ol(t,e),n.builds=new al(t,e),n.build=new cl(t,e),n.containers=new dl(t,e),n.branches=new pl(t,e),n.pullRequests=new hl(t,e),n.buildArguments=new xl(t,e),n.buildArgumentDetails=new Dl(t,e),n.runtimeEnvironment=new Nl(t,e),n.runtimeEnvironmentDetails=new Bl(t,e),n}(),i.template=new ml(t,e),i.templateRun=new jl(t,e),i.volume=new Cl(t,e),i}(),delete:function(){var n,r={};return r.project=new Sa(t,e),r.addon=((n=new ka(t,e)).backupSchedule=new tu(t,e),n),r.backup=new Fa(t,e),r.integration=new lu(t,e),r.cluster=new vu(t,e),r.job=new yu(t,e),r.logSink=new nc(t,e),r.registry=new cc(t,e),r.domain=new fc(t,e),r.subdomain=new yc(t,e),r.secret=new xc(t,e),r.secretLink=new Bc(t,e),r.service=new Hc(t,e),r.template=new yl(t,e),r.volume=new Il(t,e),r}(),put:function(){var n,r={};return r.addon=new Ca(t,e),r.job=((n={}).manual=new wu(t,e),n.cron=new Su(t,e),n),r.secret=new Ic(t,e),r.service=function(){var n={};return n.combined=new qc(t,e),n.deployment=new Mc(t,e),n.build=new Wc(t,e),n}(),r}(),patch:function(){var n,r={};return r.addon=new Ia(t,e),r.job=((n={}).manual=new ju(t,e),n.cron=new Pu(t,e),n),r.secret=new kc(t,e),r.service=function(){var n={};return n.combined=new Fc(t,e),n.deployment=new Jc(t,e),n.build=new $c(t,e),n}(),r}(),scale:function(){var n={};return n.addon=new Ua(t,e),n.job=new Au(t,e),n.service=new Yc(t,e),n}(),update:function(){var n,r={};return r.addon=((n={}).version=new Na(t,e),n.networkSettings=new Ra(t,e),n.security=new Ba(t,e),n),r.integration=new cu(t,e),r.cluster=new fu(t,e),r.job=function(){var n={};return n.settings=new Du(t,e),n.healthChecks=new Ru(t,e),n.buildOptions=new Fu(t,e),n.buildSource=new Gu(t,e),n.buildArguments=new Ju(t,e),n.runtimeEnvironment=new $u(t,e),n.deployment=new Yu(t,e),n}(),r.logSink=new rc(t,e),r.registry=new lc(t,e),r.secret=new Uc(t,e),r.secretLink=new Nc(t,e),r.service=function(){var n={};return n.deployment=new Kc(t,e),n.ports=new nl(t,e),n.buildOptions=new rl(t,e),n.buildSource=new il(t,e),n.healthChecks=new sl(t,e),n.buildArguments=new Ul(t,e),n.runtimeEnvironment=new Rl(t,e),n}(),r.template=new bl(t,e),r.volume=new El(t,e),r}(),backup:function(){var n={};return n.addon=new La(t,e),n}(),restore:function(){var n,r={};return r.addon=((n={}).backup=new Ga(t,e),n),r}(),import:function(){var n,r={};return r.addon=((n={}).backup=new Ja(t,e),n),r}(),pause:function(){var n={};return n.addon=new Wa(t,e),n.job=new Eu(t,e),n.logSink=new ic(t,e),n.service=new Qc(t,e),n}(),resume:function(){var n={};return n.addon=new $a(t,e),n.job=new Iu(t,e),n.logSink=new oc(t,e),n.service=new tl(t,e),n}(),restart:function(){var n={};return n.addon=new Va(t,e),n.service=new Xc(t,e),n}(),abort:function(){var n,r={};return r.addon=((n={}).backup=new Ha(t,e),n.restore=new Ka(t,e),n),r.job=function(){var n={};return n.run=new Uu(t,e),n.build=new qu(t,e),n}(),r.service=function(){var n={};return n.build=new ll(t,e),n}(),r}(),retain:function(){var n,r={};return r.addon=((n={}).backup=new Ya(t,e),n),r}(),start:function(){var n,r={};return r.addon=((n={}).pitr=new nu(t,e),n),r.job=function(){var n={};return n.run=new Ou(t,e),n.build=new Tu(t,e),n}(),r.service=function(){var n={};return n.build=new ul(t,e),n}(),r}(),suspend:function(){var n={};return n.job=new Cu(t,e),n}(),add:function(){var n,r={};return r.registry=new ac(t,e),r.domain=((n={}).subdomain=new mc(t,e),n),r}(),verify:function(){var n={};return n.domain=new vc(t,e),n.subdomain=new gc(t,e),n}(),assign:function(){var n,r={};return r.subdomain=((n={}).service=new wc(t,e),n),r}(),unassign:function(){var n={};return n.subdomain=new jc(t,e),n}(),run:function(){var n={};return n.template=new gl(t,e),n}(),attach:function(){var n={};return n.volume=new kl(t,e),n}(),detach:function(){var n={};return n.volume=new Ol(t,e),n}()},this.list=function(){var t={};return t.projects=r.endpoints.list.projects.call,t.addons=r.endpoints.list.addons.call,t.invoices=r.endpoints.list.invoices.call,t.providers=r.endpoints.list.providers.call,t.integrations=r.endpoints.list.integrations.call,t.clusters=r.endpoints.list.clusters.call,t.jobs=r.endpoints.list.jobs.call,t.logSinks=r.endpoints.list.logSinks.call,t.registries=r.endpoints.list.registries.call,t.domains=r.endpoints.list.domains.call,t.plans=r.endpoints.list.plans.call,t.regions=r.endpoints.list.regions.call,t.vcs=r.endpoints.list.vcs.call,t.secrets=r.endpoints.list.secrets.call,t.services=r.endpoints.list.services.call,t.templates=r.endpoints.list.templates.call,t.templateRuns=r.endpoints.list.templateRuns.call,t.repos=r.endpoints.list.repos.call,t.branches=r.endpoints.list.branches.call,t.volumes=r.endpoints.list.volumes.call,t}(),this.create=function(){var t,e={};return e.project=r.endpoints.create.project.call,e.addon=((t=r.endpoints.create.addon.call).backupSchedule=r.endpoints.create.addon.backupSchedule.call,t),e.integration=r.endpoints.create.integration.call,e.cluster=r.endpoints.create.cluster.call,e.job=function(){var t={};return t.manual=r.endpoints.create.job.manual.call,t.cron=r.endpoints.create.job.cron.call,t}(),e.logSink=r.endpoints.create.logSink.call,e.domain=r.endpoints.create.domain.call,e.secret=r.endpoints.create.secret.call,e.service=function(){var t={};return t.combined=r.endpoints.create.service.combined.call,t.deployment=r.endpoints.create.service.deployment.call,t.build=r.endpoints.create.service.build.call,t}(),e.template=r.endpoints.create.template.call,e.volume=r.endpoints.create.volume.call,e}(),this.get=function(){var t,e,n={};return n.project=r.endpoints.get.project.call,n.addon=((e=r.endpoints.get.addon.call).credentials=r.endpoints.get.addon.credentials.call,e.types=r.endpoints.get.addon.types.call,e.version=r.endpoints.get.addon.version.call,e.backups=r.endpoints.get.addon.backups.call,e.backup=((t=r.endpoints.get.addon.backup.call).download=r.endpoints.get.addon.backup.download.call,t),e.restores=r.endpoints.get.addon.restores.call,e.containers=r.endpoints.get.addon.containers.call,e.backupSchedules=r.endpoints.get.addon.backupSchedules.call,e.pitrWindow=r.endpoints.get.addon.pitrWindow.call,e),n.invoice=function(){var t={};return t.details=r.endpoints.get.invoice.details.call,t}(),n.integration=r.endpoints.get.integration.call,n.cluster=r.endpoints.get.cluster.call,n.job=function(){var t=r.endpoints.get.job.call;return t.runs=r.endpoints.get.job.runs.call,t.run=r.endpoints.get.job.run.call,t.healthChecks=r.endpoints.get.job.healthChecks.call,t.builds=r.endpoints.get.job.builds.call,t.build=r.endpoints.get.job.build.call,t.buildArguments=r.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=r.endpoints.get.job.buildArgumentDetails.call,t.runtimeEnvironment=r.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=r.endpoints.get.job.runtimeEnvironmentDetails.call,t.deployment=r.endpoints.get.job.deployment.call,t.containers=r.endpoints.get.job.containers.call,t.branches=r.endpoints.get.job.branches.call,t.pullRequests=r.endpoints.get.job.pullRequests.call,t}(),n.logSink=r.endpoints.get.logSink.call,n.registry=r.endpoints.get.registry.call,n.domain=r.endpoints.get.domain.call,n.subdomain=r.endpoints.get.subdomain.call,n.dnsId=r.endpoints.get.dnsId.call,n.secret=r.endpoints.get.secret.call,n.secretDetails=r.endpoints.get.secretDetails.call,n.secretLink=r.endpoints.get.secretLink.call,n.service=function(){var t=r.endpoints.get.service.call;return t.deployment=r.endpoints.get.service.deployment.call,t.ports=r.endpoints.get.service.ports.call,t.healthChecks=r.endpoints.get.service.healthChecks.call,t.builds=r.endpoints.get.service.builds.call,t.build=r.endpoints.get.service.build.call,t.containers=r.endpoints.get.service.containers.call,t.branches=r.endpoints.get.service.branches.call,t.pullRequests=r.endpoints.get.service.pullRequests.call,t.buildArguments=r.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=r.endpoints.get.service.buildArgumentDetails.call,t.runtimeEnvironment=r.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=r.endpoints.get.service.runtimeEnvironmentDetails.call,t}(),n.template=r.endpoints.get.template.call,n.templateRun=r.endpoints.get.templateRun.call,n.volume=r.endpoints.get.volume.call,n}(),this.delete=function(){var t,e={};return e.project=r.endpoints.delete.project.call,e.addon=((t=r.endpoints.delete.addon.call).backupSchedule=r.endpoints.delete.addon.backupSchedule.call,t),e.backup=r.endpoints.delete.backup.call,e.integration=r.endpoints.delete.integration.call,e.cluster=r.endpoints.delete.cluster.call,e.job=r.endpoints.delete.job.call,e.logSink=r.endpoints.delete.logSink.call,e.registry=r.endpoints.delete.registry.call,e.domain=r.endpoints.delete.domain.call,e.subdomain=r.endpoints.delete.subdomain.call,e.secret=r.endpoints.delete.secret.call,e.secretLink=r.endpoints.delete.secretLink.call,e.service=r.endpoints.delete.service.call,e.template=r.endpoints.delete.template.call,e.volume=r.endpoints.delete.volume.call,e}(),this.put=function(){var t,e={};return e.addon=r.endpoints.put.addon.call,e.job=((t={}).manual=r.endpoints.put.job.manual.call,t.cron=r.endpoints.put.job.cron.call,t),e.secret=r.endpoints.put.secret.call,e.service=function(){var t={};return t.combined=r.endpoints.put.service.combined.call,t.deployment=r.endpoints.put.service.deployment.call,t.build=r.endpoints.put.service.build.call,t}(),e}(),this.patch=function(){var t,e={};return e.addon=r.endpoints.patch.addon.call,e.job=((t={}).manual=r.endpoints.patch.job.manual.call,t.cron=r.endpoints.patch.job.cron.call,t),e.secret=r.endpoints.patch.secret.call,e.service=function(){var t={};return t.combined=r.endpoints.patch.service.combined.call,t.deployment=r.endpoints.patch.service.deployment.call,t.build=r.endpoints.patch.service.build.call,t}(),e}(),this.scale=function(){var t={};return t.addon=r.endpoints.scale.addon.call,t.job=r.endpoints.scale.job.call,t.service=r.endpoints.scale.service.call,t}(),this.update=function(){var t,e={};return e.addon=((t={}).version=r.endpoints.update.addon.version.call,t.networkSettings=r.endpoints.update.addon.networkSettings.call,t.security=r.endpoints.update.addon.security.call,t),e.integration=r.endpoints.update.integration.call,e.cluster=r.endpoints.update.cluster.call,e.job=function(){var t={};return t.settings=r.endpoints.update.job.settings.call,t.healthChecks=r.endpoints.update.job.healthChecks.call,t.buildOptions=r.endpoints.update.job.buildOptions.call,t.buildSource=r.endpoints.update.job.buildSource.call,t.buildArguments=r.endpoints.update.job.buildArguments.call,t.runtimeEnvironment=r.endpoints.update.job.runtimeEnvironment.call,t.deployment=r.endpoints.update.job.deployment.call,t}(),e.logSink=r.endpoints.update.logSink.call,e.registry=r.endpoints.update.registry.call,e.secret=r.endpoints.update.secret.call,e.secretLink=r.endpoints.update.secretLink.call,e.service=function(){var t={};return t.deployment=r.endpoints.update.service.deployment.call,t.ports=r.endpoints.update.service.ports.call,t.buildOptions=r.endpoints.update.service.buildOptions.call,t.buildSource=r.endpoints.update.service.buildSource.call,t.healthChecks=r.endpoints.update.service.healthChecks.call,t.buildArguments=r.endpoints.update.service.buildArguments.call,t.runtimeEnvironment=r.endpoints.update.service.runtimeEnvironment.call,t}(),e.template=r.endpoints.update.template.call,e.volume=r.endpoints.update.volume.call,e}(),this.backup=function(){var t={};return t.addon=r.endpoints.backup.addon.call,t}(),this.restore=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.restore.addon.backup.call,t),e}(),this.import=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.import.addon.backup.call,t),e}(),this.pause=function(){var t={};return t.addon=r.endpoints.pause.addon.call,t.job=r.endpoints.pause.job.call,t.logSink=r.endpoints.pause.logSink.call,t.service=r.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.addon=r.endpoints.resume.addon.call,t.job=r.endpoints.resume.job.call,t.logSink=r.endpoints.resume.logSink.call,t.service=r.endpoints.resume.service.call,t}(),this.restart=function(){var t={};return t.addon=r.endpoints.restart.addon.call,t.service=r.endpoints.restart.service.call,t}(),this.abort=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.abort.addon.backup.call,t.restore=r.endpoints.abort.addon.restore.call,t),e.job=function(){var t={};return t.run=r.endpoints.abort.job.run.call,t.build=r.endpoints.abort.job.build.call,t}(),e.service=function(){var t={};return t.build=r.endpoints.abort.service.build.call,t}(),e}(),this.retain=function(){var t,e={};return e.addon=((t={}).backup=r.endpoints.retain.addon.backup.call,t),e}(),this.start=function(){var t,e={};return e.addon=((t={}).pitr=r.endpoints.start.addon.pitr.call,t),e.job=function(){var t={};return t.run=r.endpoints.start.job.run.call,t.build=r.endpoints.start.job.build.call,t}(),e.service=function(){var t={};return t.build=r.endpoints.start.service.build.call,t}(),e}(),this.suspend=function(){var t={};return t.job=r.endpoints.suspend.job.call,t}(),this.add=function(){var t,e={};return e.registry=r.endpoints.add.registry.call,e.domain=((t={}).subdomain=r.endpoints.add.domain.subdomain.call,t),e}(),this.verify=function(){var t={};return t.domain=r.endpoints.verify.domain.call,t.subdomain=r.endpoints.verify.subdomain.call,t}(),this.assign=function(){var t,e={};return e.subdomain=((t={}).service=r.endpoints.assign.subdomain.service.call,t),e}(),this.unassign=function(){var t={};return t.subdomain=r.endpoints.unassign.subdomain.call,t}(),this.run=function(){var t={};return t.template=r.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=r.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=r.endpoints.detach.volume.call,t}()};export{Ha as AbortAddonBackupEndpoint,Ka as AbortAddonRestoreEndpoint,qu as AbortJobBuildEndpoint,Uu as AbortJobRunEndpoint,ll as AbortServiceBuildEndpoint,mc as AddDomainSubdomainEndpoint,ac as AddRegistryEndpoint,Fl as ApiClient,Tl as ApiClientContextProvider,Ll as ApiClientFileContextProvider,ql as ApiClientInMemoryContextProvider,ha as ApiEndpoint,wc as AssignSubdomainServiceEndpoint,kl as AttachVolumeEndpoint,La as BackupAddonEndpoint,Qa as CreateAddonBackupscheduleEndpoint,Aa as CreateAddonEndpoint,pu as CreateClusterEndpoint,pc as CreateDomainEndpoint,au as CreateIntegrationEndpoint,_u as CreateJobCronEndpoint,gu as CreateJobManualEndpoint,tc as CreateLogsinkEndpoint,ja as CreateProjectEndpoint,Ec as CreateSecretEndpoint,zc as CreateServiceBuildEndpoint,Lc as CreateServiceCombinedEndpoint,Gc as CreateServiceDeploymentEndpoint,vl as CreateTemplateEndpoint,Al as CreateVolumeEndpoint,tu as DeleteAddonBackupscheduleEndpoint,ka as DeleteAddonEndpoint,ma as DeleteApiEndpoint,Fa as DeleteBackupEndpoint,vu as DeleteClusterEndpoint,fc as DeleteDomainEndpoint,lu as DeleteIntegrationEndpoint,yu as DeleteJobEndpoint,nc as DeleteLogsinkEndpoint,Sa as DeleteProjectEndpoint,cc as DeleteRegistryEndpoint,xc as DeleteSecretEndpoint,Bc as DeleteSecretlinkEndpoint,Hc as DeleteServiceEndpoint,yc as DeleteSubdomainEndpoint,yl as DeleteTemplateEndpoint,Il as DeleteVolumeEndpoint,Ol as DetachVolumeEndpoint,ua as ExecCommandStandard,Za as GetAddonBackupDownloadEndpoint,qa as GetAddonBackupEndpoint,Ta as GetAddonBackupsEndpoint,Xa as GetAddonBackupschedulesEndpoint,za as GetAddonContainersEndpoint,Oa as GetAddonCredentialsEndpoint,Ea as GetAddonEndpoint,eu as GetAddonPitrwindowEndpoint,Ma as GetAddonRestoresEndpoint,xa as GetAddonTypesEndpoint,Da as GetAddonVersionEndpoint,fa as GetApiEndpoint,hu as GetClusterEndpoint,Pc as GetDnsidEndpoint,hc as GetDomainEndpoint,uu as GetIntegrationEndpoint,iu as GetInvoiceDetailsEndpoint,Ku as GetJobBranchesEndpoint,Lu as GetJobBuildEndpoint,zu as GetJobBuildargumentdetailsEndpoint,Mu as GetJobBuildargumentsEndpoint,Bu as GetJobBuildsEndpoint,Zu as GetJobContainersEndpoint,Hu as GetJobDeploymentEndpoint,bu as GetJobEndpoint,Nu as GetJobHealthchecksEndpoint,Xu as GetJobPullrequestsEndpoint,xu as GetJobRunEndpoint,ku as GetJobRunsEndpoint,Wu as GetJobRuntimeenvironmentEndpoint,Vu as GetJobRuntimeenvironmentdetailsEndpoint,ec as GetLogsinkEndpoint,_a as GetProjectEndpoint,uc as GetRegistryEndpoint,Oc as GetSecretEndpoint,Dc as GetSecretdetailsEndpoint,Rc as GetSecretlinkEndpoint,pl as GetServiceBranchesEndpoint,cl as GetServiceBuildEndpoint,Dl as GetServiceBuildargumentdetailsEndpoint,xl as GetServiceBuildargumentsEndpoint,al as GetServiceBuildsEndpoint,dl as GetServiceContainersEndpoint,Zc as GetServiceDeploymentEndpoint,Vc as GetServiceEndpoint,ol as GetServiceHealthchecksEndpoint,el as GetServicePortsEndpoint,hl as GetServicePullrequestsEndpoint,Nl as GetServiceRuntimeenvironmentEndpoint,Bl as GetServiceRuntimeenvironmentdetailsEndpoint,bc as GetSubdomainEndpoint,ml as GetTemplateEndpoint,jl as GetTemplaterunEndpoint,Cl as GetVolumeEndpoint,Ja as ImportAddonBackupEndpoint,Pa as ListAddonsEndpoint,Sl as ListBranchesEndpoint,du as ListClustersEndpoint,dc as ListDomainsEndpoint,su as ListIntegrationsEndpoint,ru as ListInvoicesEndpoint,mu as ListJobsEndpoint,Qu as ListLogsinksEndpoint,_c as ListPlansEndpoint,wa as ListProjectsEndpoint,ou as ListProvidersEndpoint,Sc as ListRegionsEndpoint,sc as ListRegistriesEndpoint,_l as ListReposEndpoint,Cc as ListSecretsEndpoint,Tc as ListServicesEndpoint,wl as ListTemplaterunsEndpoint,fl as ListTemplatesEndpoint,Ac as ListVcsEndpoint,Pl as ListVolumesEndpoint,la as NorthflankApiCallError,ca as NorthflankExecCommand,sa as NorthflankPortForwarder,Ia as PatchAddonEndpoint,ya as PatchApiEndpoint,Pu as PatchJobCronEndpoint,ju as PatchJobManualEndpoint,kc as PatchSecretEndpoint,$c as PatchServiceBuildEndpoint,Fc as PatchServiceCombinedEndpoint,Jc as PatchServiceDeploymentEndpoint,Wa as PauseAddonEndpoint,Eu as PauseJobEndpoint,ic as PauseLogsinkEndpoint,Qc as PauseServiceEndpoint,va as PostApiEndpoint,Ca as PutAddonEndpoint,ba as PutApiEndpoint,Su as PutJobCronEndpoint,wu as PutJobManualEndpoint,Ic as PutSecretEndpoint,Wc as PutServiceBuildEndpoint,qc as PutServiceCombinedEndpoint,Mc as PutServiceDeploymentEndpoint,Va as RestartAddonEndpoint,Xc as RestartServiceEndpoint,Ga as RestoreAddonBackupEndpoint,$a as ResumeAddonEndpoint,Iu as ResumeJobEndpoint,oc as ResumeLogsinkEndpoint,tl as ResumeServiceEndpoint,Ya as RetainAddonBackupEndpoint,gl as RunTemplateEndpoint,Ua as ScaleAddonEndpoint,Au as ScaleJobEndpoint,Yc as ScaleServiceEndpoint,nu as StartAddonPitrEndpoint,Tu as StartJobBuildEndpoint,Ou as StartJobRunEndpoint,ul as StartServiceBuildEndpoint,Cu as SuspendJobEndpoint,jc as UnassignSubdomainEndpoint,Ra as UpdateAddonNetworksettingsEndpoint,Ba as UpdateAddonSecurityEndpoint,Na as UpdateAddonVersionEndpoint,fu as UpdateClusterEndpoint,cu as UpdateIntegrationEndpoint,Ju as UpdateJobBuildargumentsEndpoint,Fu as UpdateJobBuildoptionsEndpoint,Gu as UpdateJobBuildsourceEndpoint,Yu as UpdateJobDeploymentEndpoint,Ru as UpdateJobHealthchecksEndpoint,$u as UpdateJobRuntimeenvironmentEndpoint,Du as UpdateJobSettingsEndpoint,rc as UpdateLogsinkEndpoint,lc as UpdateRegistryEndpoint,Uc as UpdateSecretEndpoint,Nc as UpdateSecretlinkEndpoint,Ul as UpdateServiceBuildargumentsEndpoint,rl as UpdateServiceBuildoptionsEndpoint,il as UpdateServiceBuildsourceEndpoint,Kc as UpdateServiceDeploymentEndpoint,sl as UpdateServiceHealthchecksEndpoint,nl as UpdateServicePortsEndpoint,Rl as UpdateServiceRuntimeenvironmentEndpoint,bl as UpdateTemplateEndpoint,El as UpdateVolumeEndpoint,vc as VerifyDomainEndpoint,gc as VerifySubdomainEndpoint};