commandmate 0.19.0 → 0.21.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 (830) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +259 -238
  3. package/.next/app-path-routes-manifest.json +28 -26
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +18 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update/route.js +5 -3
  10. package/.next/server/app/api/app/update/route.js.nft.json +1 -1
  11. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update-check/route.js +1 -1
  13. package/.next/server/app/api/app/update-check/route.js.nft.json +1 -1
  14. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  16. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  17. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  19. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  20. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/assistant/messages/route.js +1 -1
  22. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  23. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/assistant/session/route.js +1 -1
  25. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  26. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/assistant/start/route.js +1 -1
  28. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  29. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/assistant/terminal/route.js +1 -1
  31. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  32. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/assistant/tools/route.js +1 -1
  34. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  35. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/auth/login/route.js +1 -1
  37. package/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  38. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/auth/logout/route.js +1 -1
  40. package/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  41. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/auth/status/route.js +1 -1
  43. package/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  44. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/daily-summary/route.js +1 -1
  46. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  47. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  49. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  50. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/external-apps/[id]/health/route.js +1 -1
  52. package/.next/server/app/api/external-apps/[id]/health/route.js.nft.json +1 -1
  53. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/external-apps/[id]/route.js +1 -1
  55. package/.next/server/app/api/external-apps/[id]/route.js.nft.json +1 -1
  56. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/external-apps/route.js +1 -1
  58. package/.next/server/app/api/external-apps/route.js.nft.json +1 -1
  59. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/fs/browse/route.js +2 -2
  61. package/.next/server/app/api/fs/browse/route.js.nft.json +1 -1
  62. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/fs/recent-paths/route.js +2 -2
  64. package/.next/server/app/api/fs/recent-paths/route.js.nft.json +1 -1
  65. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/hooks/agent-event/route.js +1 -1
  67. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  68. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/hooks/claude-done/route.js +1 -1
  70. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  71. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/metrics/vibe/route.js +2 -2
  73. package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -1
  74. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/ollama/models/route.js +1 -1
  76. package/.next/server/app/api/ollama/models/route.js.nft.json +1 -1
  77. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  79. package/.next/server/app/api/push/subscriptions/route.js.nft.json +1 -1
  80. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/push/vapid/route.js +1 -1
  82. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  83. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/repositories/[id]/route.js +1 -1
  85. package/.next/server/app/api/repositories/[id]/route.js.nft.json +1 -1
  86. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  88. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js.nft.json +1 -1
  89. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  91. package/.next/server/app/api/repositories/[id]/todos/route.js.nft.json +1 -1
  92. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  94. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  95. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/repositories/clone/route.js +1 -1
  97. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  98. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/repositories/excluded/route.js +1 -1
  100. package/.next/server/app/api/repositories/excluded/route.js.nft.json +1 -1
  101. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/repositories/restore/route.js +1 -1
  103. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  104. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/repositories/route.js +1 -1
  106. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  107. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/repositories/scan/route.js +1 -1
  109. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  110. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/repositories/sync/route.js +1 -1
  112. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  113. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/repositories/validate-path/route.js +1 -1
  115. package/.next/server/app/api/repositories/validate-path/route.js.nft.json +1 -1
  116. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/sidebar/group-order/route.js +2 -2
  118. package/.next/server/app/api/sidebar/group-order/route.js.nft.json +1 -1
  119. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/skills/[id]/route.js +1 -1
  121. package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -1
  122. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/skills/installations/route.js +1 -1
  124. package/.next/server/app/api/skills/installations/route.js.nft.json +1 -1
  125. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/skills/operations/route.js +3 -3
  127. package/.next/server/app/api/skills/operations/route.js.nft.json +1 -1
  128. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/skills/reindex/route.js +1 -1
  130. package/.next/server/app/api/skills/reindex/route.js.nft.json +1 -1
  131. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/skills/route.js +1 -1
  133. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  134. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/slash-commands/route.js +1 -1
  136. package/.next/server/app/api/slash-commands/route.js.nft.json +1 -1
  137. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/tasks/[taskId]/cancel/route.js +2 -2
  139. package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +1 -1
  140. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/tasks/[taskId]/route.js +2 -2
  142. package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -1
  143. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/templates/[id]/route.js +2 -2
  145. package/.next/server/app/api/templates/[id]/route.js.nft.json +1 -1
  146. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/templates/route.js +2 -2
  148. package/.next/server/app/api/templates/route.js.nft.json +1 -1
  149. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/todos/route.js +1 -1
  151. package/.next/server/app/api/todos/route.js.nft.json +1 -1
  152. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  154. package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +1 -1
  155. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/verification/runs/route.js +1 -1
  157. package/.next/server/app/api/verification/runs/route.js.nft.json +1 -1
  158. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  161. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  164. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js.nft.json +1 -1
  167. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +2 -2
  169. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  170. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  173. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js.nft.json +1 -1
  176. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  178. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  179. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js.nft.json +1 -1
  182. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js.nft.json +1 -1
  185. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js.nft.json +1 -1
  188. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +1 -1
  191. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js.nft.json +1 -1
  194. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/git/commit/route.js.nft.json +1 -1
  197. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +1 -1
  200. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js.nft.json +1 -1
  203. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +1 -1
  206. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/git/pull/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/git/push/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/git/reset/route.js.nft.json +1 -1
  215. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/git/revert/route.js.nft.json +1 -1
  218. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +1 -1
  221. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  223. package/.next/server/app/api/worktrees/[id]/git/stage/route.js.nft.json +1 -1
  224. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  226. package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +1 -1
  227. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  229. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +1 -1
  230. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  232. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js.nft.json +1 -1
  233. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js.nft.json +1 -1
  236. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js.nft.json +1 -1
  239. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +1 -1
  242. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +1 -1
  245. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js.nft.json +1 -1
  248. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +1 -1
  251. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  254. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  255. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  257. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  259. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -1
  260. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  261. package/.next/server/app/api/worktrees/[id]/logs/route.js +2 -2
  262. package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
  263. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  264. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +6 -6
  265. package/.next/server/app/api/worktrees/[id]/marp-render/route.js.nft.json +1 -1
  266. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  267. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  268. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js.nft.json +1 -1
  269. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  270. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  271. package/.next/server/app/api/worktrees/[id]/memos/route.js.nft.json +1 -1
  272. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  273. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  274. package/.next/server/app/api/worktrees/[id]/messages/route.js.nft.json +1 -1
  275. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  276. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  277. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  278. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  279. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  280. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  281. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  282. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  283. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  284. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  285. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
  286. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  287. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  288. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  289. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  290. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  291. package/.next/server/app/api/worktrees/[id]/schedules/route.js +3 -3
  292. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  293. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  294. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
  295. package/.next/server/app/api/worktrees/[id]/search/route.js.nft.json +1 -1
  296. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  297. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  298. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  299. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  300. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
  301. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  302. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  303. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -1
  304. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -1
  305. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  306. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -1
  307. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -1
  308. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  309. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -1
  310. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -1
  311. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  312. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -1
  313. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -1
  314. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  315. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js +1 -0
  316. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route.js.nft.json +1 -0
  317. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -0
  318. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js +1 -0
  319. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.js.nft.json +1 -0
  320. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -0
  321. package/.next/server/app/api/worktrees/[id]/skills/route.js +2 -2
  322. package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +1 -1
  323. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  324. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  325. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js.nft.json +1 -1
  326. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  327. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  328. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  329. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  330. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
  331. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
  332. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  333. package/.next/server/app/api/worktrees/[id]/tasks/route.js +4 -4
  334. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -1
  335. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  336. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  337. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  338. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  339. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  340. package/.next/server/app/api/worktrees/[id]/timers/history/route.js.nft.json +1 -1
  341. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  342. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  343. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  344. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  345. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  346. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js.nft.json +1 -1
  347. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  348. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  349. package/.next/server/app/api/worktrees/[id]/todos/route.js.nft.json +1 -1
  350. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  351. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  352. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js.nft.json +1 -1
  353. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  354. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  355. package/.next/server/app/api/worktrees/[id]/tree/route.js.nft.json +1 -1
  356. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  357. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -1
  358. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js.nft.json +1 -1
  359. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  360. package/.next/server/app/api/worktrees/[id]/verify/route.js +2 -2
  361. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  362. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  363. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  364. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +1 -1
  365. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  366. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  367. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js.nft.json +1 -1
  368. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  369. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  370. package/.next/server/app/api/worktrees/[id]/viewed/route.js.nft.json +1 -1
  371. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  372. package/.next/server/app/api/worktrees/route.js +1 -1
  373. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  374. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  375. package/.next/server/app/apple-icon.png/route.js +1 -1
  376. package/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
  377. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  378. package/.next/server/app/icon.png/route.js +1 -1
  379. package/.next/server/app/icon.png/route.js.nft.json +1 -1
  380. package/.next/server/app/icon1.png/route.js +1 -1
  381. package/.next/server/app/icon1.png/route.js.nft.json +1 -1
  382. package/.next/server/app/icon2.png/route.js +1 -1
  383. package/.next/server/app/icon2.png/route.js.nft.json +1 -1
  384. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  385. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  386. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  387. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  388. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  389. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  390. package/.next/server/app/page_client-reference-manifest.js +1 -1
  391. package/.next/server/app/proxy/[...path]/route.js +1 -1
  392. package/.next/server/app/proxy/[...path]/route.js.nft.json +1 -1
  393. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  394. package/.next/server/app/repositories/page.js +1 -1
  395. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  396. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  397. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  398. package/.next/server/app/skills/[skillId]/page.js +2 -2
  399. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -1
  400. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  401. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  402. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  403. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
  404. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
  405. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  406. package/.next/server/app/worktrees/[id]/page.js +8 -8
  407. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  408. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  409. package/.next/server/app/worktrees/[id]/terminal/page.js +3 -3
  410. package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
  411. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  412. package/.next/server/app-paths-manifest.json +28 -26
  413. package/.next/server/chunks/1029.js +1 -0
  414. package/.next/server/chunks/1068.js +1 -1
  415. package/.next/server/chunks/1503.js +1 -1
  416. package/.next/server/chunks/1598.js +4 -0
  417. package/.next/server/chunks/22.js +1 -1
  418. package/.next/server/chunks/2328.js +1 -1
  419. package/.next/server/chunks/2546.js +1 -0
  420. package/.next/server/chunks/2710.js +2 -2
  421. package/.next/server/chunks/28.js +2 -2
  422. package/.next/server/chunks/3417.js +1 -0
  423. package/.next/server/chunks/3451.js +1 -1
  424. package/.next/server/chunks/3543.js +1 -1
  425. package/.next/server/chunks/365.js +1 -0
  426. package/.next/server/chunks/3736.js +1 -1
  427. package/.next/server/chunks/3753.js +33 -20
  428. package/.next/server/chunks/3945.js +1 -1
  429. package/.next/server/chunks/406.js +5 -5
  430. package/.next/server/chunks/4444.js +1 -1
  431. package/.next/server/chunks/{1185.js → 5048.js} +1 -1
  432. package/.next/server/chunks/5064.js +1 -1
  433. package/.next/server/chunks/5737.js +1 -1
  434. package/.next/server/chunks/5959.js +10 -3
  435. package/.next/server/chunks/{5381.js → 5998.js} +2 -2
  436. package/.next/server/chunks/6130.js +1 -1
  437. package/.next/server/chunks/6274.js +5 -5
  438. package/.next/server/chunks/6283.js +1 -1
  439. package/.next/server/chunks/6401.js +1 -0
  440. package/.next/server/chunks/641.js +1 -0
  441. package/.next/server/chunks/848.js +1 -0
  442. package/.next/server/chunks/8536.js +1 -0
  443. package/.next/server/chunks/8543.js +1 -0
  444. package/.next/server/chunks/8584.js +1 -1
  445. package/.next/server/chunks/8807.js +157 -143
  446. package/.next/server/chunks/8856.js +2 -2
  447. package/.next/server/chunks/9058.js +1 -0
  448. package/.next/server/chunks/9067.js +1 -0
  449. package/.next/server/chunks/9123.js +1 -1
  450. package/.next/server/chunks/9360.js +2 -0
  451. package/.next/server/chunks/9687.js +1 -1
  452. package/.next/server/middleware-manifest.json +5 -5
  453. package/.next/server/pages/500.html +1 -1
  454. package/.next/server/server-reference-manifest.json +1 -1
  455. package/.next/server/src/middleware.js +1 -1
  456. package/.next/server/src/middleware.js.map +1 -1
  457. package/.next/static/chunks/{8562-6e2ab32452f4fa5b.js → 2053-52d3c82014e1cd54.js} +1 -1
  458. package/.next/static/chunks/2751-9ef0f4b450bd4ef0.js +1 -0
  459. package/.next/static/chunks/{6488-2c412c29258637b6.js → 6488-b5e707dfdd33d633.js} +1 -1
  460. package/.next/static/chunks/744-fa8c0ae444c8338c.js +1 -0
  461. package/.next/static/chunks/app/api/app/update/route-be21650964d61b1d.js +1 -0
  462. package/.next/static/chunks/app/api/app/update-check/route-be21650964d61b1d.js +1 -0
  463. package/.next/static/chunks/app/api/assistant/conversation/route-be21650964d61b1d.js +1 -0
  464. package/.next/static/chunks/app/api/assistant/current-output/route-be21650964d61b1d.js +1 -0
  465. package/.next/static/chunks/app/api/assistant/messages/route-be21650964d61b1d.js +1 -0
  466. package/.next/static/chunks/app/api/assistant/session/route-be21650964d61b1d.js +1 -0
  467. package/.next/static/chunks/app/api/assistant/start/route-be21650964d61b1d.js +1 -0
  468. package/.next/static/chunks/app/api/assistant/terminal/route-be21650964d61b1d.js +1 -0
  469. package/.next/static/chunks/app/api/assistant/tools/route-be21650964d61b1d.js +1 -0
  470. package/.next/static/chunks/app/api/auth/login/route-be21650964d61b1d.js +1 -0
  471. package/.next/static/chunks/app/api/auth/logout/route-be21650964d61b1d.js +1 -0
  472. package/.next/static/chunks/app/api/auth/status/route-be21650964d61b1d.js +1 -0
  473. package/.next/static/chunks/app/api/daily-summary/route-be21650964d61b1d.js +1 -0
  474. package/.next/static/chunks/app/api/daily-summary/status/route-be21650964d61b1d.js +1 -0
  475. package/.next/static/chunks/app/api/external-apps/[id]/health/route-be21650964d61b1d.js +1 -0
  476. package/.next/static/chunks/app/api/external-apps/[id]/route-be21650964d61b1d.js +1 -0
  477. package/.next/static/chunks/app/api/external-apps/route-be21650964d61b1d.js +1 -0
  478. package/.next/static/chunks/app/api/fs/browse/route-be21650964d61b1d.js +1 -0
  479. package/.next/static/chunks/app/api/fs/recent-paths/route-be21650964d61b1d.js +1 -0
  480. package/.next/static/chunks/app/api/hooks/agent-event/route-be21650964d61b1d.js +1 -0
  481. package/.next/static/chunks/app/api/hooks/claude-done/route-be21650964d61b1d.js +1 -0
  482. package/.next/static/chunks/app/api/metrics/vibe/route-be21650964d61b1d.js +1 -0
  483. package/.next/static/chunks/app/api/ollama/models/route-be21650964d61b1d.js +1 -0
  484. package/.next/static/chunks/app/api/push/subscriptions/route-be21650964d61b1d.js +1 -0
  485. package/.next/static/chunks/app/api/push/vapid/route-be21650964d61b1d.js +1 -0
  486. package/.next/static/chunks/app/api/repositories/[id]/route-be21650964d61b1d.js +1 -0
  487. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-be21650964d61b1d.js +1 -0
  488. package/.next/static/chunks/app/api/repositories/[id]/todos/route-be21650964d61b1d.js +1 -0
  489. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-be21650964d61b1d.js +1 -0
  490. package/.next/static/chunks/app/api/repositories/clone/route-be21650964d61b1d.js +1 -0
  491. package/.next/static/chunks/app/api/repositories/excluded/route-be21650964d61b1d.js +1 -0
  492. package/.next/static/chunks/app/api/repositories/restore/route-be21650964d61b1d.js +1 -0
  493. package/.next/static/chunks/app/api/repositories/route-be21650964d61b1d.js +1 -0
  494. package/.next/static/chunks/app/api/repositories/scan/route-be21650964d61b1d.js +1 -0
  495. package/.next/static/chunks/app/api/repositories/sync/route-be21650964d61b1d.js +1 -0
  496. package/.next/static/chunks/app/api/repositories/validate-path/route-be21650964d61b1d.js +1 -0
  497. package/.next/static/chunks/app/api/sidebar/group-order/route-be21650964d61b1d.js +1 -0
  498. package/.next/static/chunks/app/api/skills/[id]/route-be21650964d61b1d.js +1 -0
  499. package/.next/static/chunks/app/api/skills/installations/route-be21650964d61b1d.js +1 -0
  500. package/.next/static/chunks/app/api/skills/operations/route-be21650964d61b1d.js +1 -0
  501. package/.next/static/chunks/app/api/skills/reindex/route-be21650964d61b1d.js +1 -0
  502. package/.next/static/chunks/app/api/skills/route-be21650964d61b1d.js +1 -0
  503. package/.next/static/chunks/app/api/slash-commands/route-be21650964d61b1d.js +1 -0
  504. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-be21650964d61b1d.js +1 -0
  505. package/.next/static/chunks/app/api/tasks/[taskId]/route-be21650964d61b1d.js +1 -0
  506. package/.next/static/chunks/app/api/templates/[id]/route-be21650964d61b1d.js +1 -0
  507. package/.next/static/chunks/app/api/templates/route-be21650964d61b1d.js +1 -0
  508. package/.next/static/chunks/app/api/todos/route-be21650964d61b1d.js +1 -0
  509. package/.next/static/chunks/app/api/verification/runs/[runId]/route-be21650964d61b1d.js +1 -0
  510. package/.next/static/chunks/app/api/verification/runs/route-be21650964d61b1d.js +1 -0
  511. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-be21650964d61b1d.js +1 -0
  512. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-be21650964d61b1d.js +1 -0
  513. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-be21650964d61b1d.js +1 -0
  514. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-be21650964d61b1d.js +1 -0
  515. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-be21650964d61b1d.js +1 -0
  516. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-be21650964d61b1d.js +1 -0
  517. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-be21650964d61b1d.js +1 -0
  518. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-be21650964d61b1d.js +1 -0
  519. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-be21650964d61b1d.js +1 -0
  520. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-be21650964d61b1d.js +1 -0
  521. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-be21650964d61b1d.js +1 -0
  522. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-be21650964d61b1d.js +1 -0
  523. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-be21650964d61b1d.js +1 -0
  524. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-be21650964d61b1d.js +1 -0
  525. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-be21650964d61b1d.js +1 -0
  526. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-be21650964d61b1d.js +1 -0
  527. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-be21650964d61b1d.js +1 -0
  528. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-be21650964d61b1d.js +1 -0
  529. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-be21650964d61b1d.js +1 -0
  530. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-be21650964d61b1d.js +1 -0
  531. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-be21650964d61b1d.js +1 -0
  532. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-be21650964d61b1d.js +1 -0
  533. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-be21650964d61b1d.js +1 -0
  534. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-be21650964d61b1d.js +1 -0
  535. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-be21650964d61b1d.js +1 -0
  536. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-be21650964d61b1d.js +1 -0
  537. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-be21650964d61b1d.js +1 -0
  538. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-be21650964d61b1d.js +1 -0
  539. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-be21650964d61b1d.js +1 -0
  540. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-be21650964d61b1d.js +1 -0
  541. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-be21650964d61b1d.js +1 -0
  542. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-be21650964d61b1d.js +1 -0
  543. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-be21650964d61b1d.js +1 -0
  544. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-be21650964d61b1d.js +1 -0
  545. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-be21650964d61b1d.js +1 -0
  546. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-be21650964d61b1d.js +1 -0
  547. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-be21650964d61b1d.js +1 -0
  548. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-be21650964d61b1d.js +1 -0
  549. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-be21650964d61b1d.js +1 -0
  550. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-be21650964d61b1d.js +1 -0
  551. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-be21650964d61b1d.js +1 -0
  552. package/.next/static/chunks/app/api/worktrees/[id]/route-be21650964d61b1d.js +1 -0
  553. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-be21650964d61b1d.js +1 -0
  554. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-be21650964d61b1d.js +1 -0
  555. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-be21650964d61b1d.js +1 -0
  556. package/.next/static/chunks/app/api/worktrees/[id]/search/route-be21650964d61b1d.js +1 -0
  557. package/.next/static/chunks/app/api/worktrees/[id]/send/route-be21650964d61b1d.js +1 -0
  558. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-be21650964d61b1d.js +1 -0
  559. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-be21650964d61b1d.js +1 -0
  560. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-be21650964d61b1d.js +1 -0
  561. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-be21650964d61b1d.js +1 -0
  562. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-be21650964d61b1d.js +1 -0
  563. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-be21650964d61b1d.js +1 -0
  564. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-be21650964d61b1d.js +1 -0
  565. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-be21650964d61b1d.js +1 -0
  566. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-be21650964d61b1d.js +1 -0
  567. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-be21650964d61b1d.js +1 -0
  568. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-be21650964d61b1d.js +1 -0
  569. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-be21650964d61b1d.js +1 -0
  570. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-be21650964d61b1d.js +1 -0
  571. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-be21650964d61b1d.js +1 -0
  572. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-be21650964d61b1d.js +1 -0
  573. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-be21650964d61b1d.js +1 -0
  574. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-be21650964d61b1d.js +1 -0
  575. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-be21650964d61b1d.js +1 -0
  576. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-be21650964d61b1d.js +1 -0
  577. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-be21650964d61b1d.js +1 -0
  578. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-be21650964d61b1d.js +1 -0
  579. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-be21650964d61b1d.js +1 -0
  580. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-be21650964d61b1d.js +1 -0
  581. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-be21650964d61b1d.js +1 -0
  582. package/.next/static/chunks/app/api/worktrees/route-be21650964d61b1d.js +1 -0
  583. package/.next/static/chunks/app/manifest.webmanifest/route-be21650964d61b1d.js +1 -0
  584. package/.next/static/chunks/app/proxy/[...path]/route-be21650964d61b1d.js +1 -0
  585. package/.next/static/chunks/app/repositories/page-202680fe6ec169c8.js +1 -0
  586. package/.next/static/chunks/app/skills/[skillId]/page-10d6f983e5f06ffb.js +1 -0
  587. package/.next/static/chunks/app/worktrees/[id]/layout-be21650964d61b1d.js +1 -0
  588. package/.next/static/chunks/app/worktrees/[id]/page-b73ac6531829c698.js +1 -0
  589. package/.next/trace +12 -12
  590. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/update/route.ts +347 -0
  591. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/update-plan/route.ts +347 -0
  592. package/.next/types/routes.d.ts +5 -2
  593. package/.next/types/validator.ts +27 -0
  594. package/README.md +10 -1
  595. package/dist/cli/commands/auto-yes.d.ts.map +1 -1
  596. package/dist/cli/commands/auto-yes.js +4 -3
  597. package/dist/cli/commands/capture.d.ts +1 -0
  598. package/dist/cli/commands/capture.d.ts.map +1 -1
  599. package/dist/cli/commands/capture.js +112 -2
  600. package/dist/cli/commands/ls.d.ts.map +1 -1
  601. package/dist/cli/commands/ls.js +9 -3
  602. package/dist/cli/commands/respond.d.ts.map +1 -1
  603. package/dist/cli/commands/respond.js +34 -8
  604. package/dist/cli/commands/send.d.ts.map +1 -1
  605. package/dist/cli/commands/send.js +6 -5
  606. package/dist/cli/commands/skill-format.d.ts +7 -1
  607. package/dist/cli/commands/skill-format.d.ts.map +1 -1
  608. package/dist/cli/commands/skill-format.js +67 -0
  609. package/dist/cli/commands/skill.d.ts +2 -0
  610. package/dist/cli/commands/skill.d.ts.map +1 -1
  611. package/dist/cli/commands/skill.js +149 -0
  612. package/dist/cli/commands/sync.d.ts +14 -0
  613. package/dist/cli/commands/sync.d.ts.map +1 -0
  614. package/dist/cli/commands/sync.js +53 -0
  615. package/dist/cli/commands/update.d.ts.map +1 -1
  616. package/dist/cli/commands/update.js +66 -0
  617. package/dist/cli/commands/wait.d.ts.map +1 -1
  618. package/dist/cli/commands/wait.js +3 -2
  619. package/dist/cli/config/agent-target-options.d.ts +46 -0
  620. package/dist/cli/config/agent-target-options.d.ts.map +1 -0
  621. package/dist/cli/config/agent-target-options.js +54 -0
  622. package/dist/cli/docs/agent-operations.d.ts +2 -2
  623. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  624. package/dist/cli/docs/agent-operations.js +72 -17
  625. package/dist/cli/program.d.ts.map +1 -1
  626. package/dist/cli/program.js +3 -0
  627. package/dist/cli/types/api-responses.d.ts +174 -0
  628. package/dist/cli/types/api-responses.d.ts.map +1 -1
  629. package/dist/cli/types/index.d.ts +31 -0
  630. package/dist/cli/types/index.d.ts.map +1 -1
  631. package/dist/cli/utils/api-client.d.ts +4 -1
  632. package/dist/cli/utils/api-client.d.ts.map +1 -1
  633. package/dist/cli/utils/api-client.js +43 -5
  634. package/dist/cli/utils/npm-runner.d.ts +24 -0
  635. package/dist/cli/utils/npm-runner.d.ts.map +1 -1
  636. package/dist/cli/utils/npm-runner.js +51 -1
  637. package/dist/cli/utils/pid-manager.d.ts +12 -2
  638. package/dist/cli/utils/pid-manager.d.ts.map +1 -1
  639. package/dist/cli/utils/pid-manager.js +76 -13
  640. package/dist/cli/utils/verify-runner.d.ts +9 -0
  641. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  642. package/dist/cli/utils/verify-runner.js +28 -2
  643. package/dist/config/history-display-config.d.ts +61 -0
  644. package/dist/config/history-display-config.d.ts.map +1 -0
  645. package/dist/config/history-display-config.js +62 -0
  646. package/dist/server/server.js +107 -14
  647. package/dist/server/src/lib/auto-yes-poller.js +49 -0
  648. package/dist/server/src/lib/auto-yes-state.js +64 -0
  649. package/dist/server/src/lib/db/chat-db.js +75 -1
  650. package/dist/server/src/lib/db/db-repository.js +66 -2
  651. package/dist/server/src/lib/db/db.js +13 -3
  652. package/dist/server/src/lib/db/migrations/index.js +6 -0
  653. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  654. package/dist/server/src/lib/db/migrations/v53-worktree-aliases.js +53 -0
  655. package/dist/server/src/lib/db/migrations/v54-worktree-id-path-derived.js +204 -0
  656. package/dist/server/src/lib/db/migrations/v55-compact-churned-worktree-ids.js +207 -0
  657. package/dist/server/src/lib/db/migrations/worktree-id-rename.js +153 -0
  658. package/dist/server/src/lib/db/worktree-alias-db.js +155 -0
  659. package/dist/server/src/lib/db/worktree-db.js +53 -71
  660. package/dist/server/src/lib/detection/cli-patterns.js +86 -2
  661. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +10 -1
  662. package/dist/server/src/lib/git/worktree-id.js +145 -0
  663. package/dist/server/src/lib/git/worktree-redirect.js +155 -0
  664. package/dist/server/src/lib/git/worktrees.js +173 -27
  665. package/dist/server/src/lib/logger.js +13 -1
  666. package/dist/server/src/lib/polling/auto-yes-manager.js +3 -1
  667. package/dist/server/src/lib/polling/auto-yes-suppression-state.js +54 -0
  668. package/dist/server/src/lib/polling/prompt-dedup.js +22 -0
  669. package/dist/server/src/lib/polling/response-checker.js +53 -13
  670. package/dist/server/src/lib/polling/response-dedup.js +22 -0
  671. package/dist/server/src/lib/polling/response-poller-core.js +107 -0
  672. package/dist/server/src/lib/polling/response-poller.js +4 -1
  673. package/dist/server/src/lib/response-extractor.js +22 -2
  674. package/dist/server/src/lib/session/claude-session.js +117 -35
  675. package/dist/server/src/lib/session/current-output-builder.js +16 -1
  676. package/dist/server/src/lib/session/session-start-error.js +125 -0
  677. package/dist/server/src/lib/session/worktree-session-reconcile.js +603 -0
  678. package/dist/server/src/lib/skills/install-apply.js +63 -23
  679. package/dist/server/src/lib/skills/operation-audit.js +5 -6
  680. package/dist/server/src/lib/skills/startup-reconcile.js +26 -5
  681. package/dist/server/src/lib/skills/updater.js +830 -0
  682. package/dist/server/src/lib/tasks/contract-parser.js +17 -1
  683. package/dist/server/src/lib/tasks/task-state-machine.js +23 -1
  684. package/dist/server/src/lib/tmux/control-mode-tmux-transport.js +7 -0
  685. package/dist/server/src/lib/tmux/read-mode.js +22 -2
  686. package/dist/server/src/lib/tmux/tmux-capture-cache.js +33 -0
  687. package/dist/server/src/lib/tmux/tmux-control-client.js +12 -0
  688. package/dist/server/src/lib/tmux/tmux-control-registry.js +55 -11
  689. package/dist/server/src/lib/tmux/tmux.js +61 -0
  690. package/dist/server/src/lib/ws-server.js +104 -1
  691. package/package.json +1 -1
  692. package/.next/server/chunks/1117.js +0 -1
  693. package/.next/server/chunks/1356.js +0 -4
  694. package/.next/server/chunks/1692.js +0 -1
  695. package/.next/server/chunks/3042.js +0 -1
  696. package/.next/server/chunks/4018.js +0 -1
  697. package/.next/server/chunks/4390.js +0 -1
  698. package/.next/server/chunks/4440.js +0 -2
  699. package/.next/server/chunks/4548.js +0 -1
  700. package/.next/server/chunks/5793.js +0 -1
  701. package/.next/server/chunks/8681.js +0 -1
  702. package/.next/static/chunks/2751-7fabd91275b14ca3.js +0 -1
  703. package/.next/static/chunks/744-d5e47fe16e7b9e06.js +0 -1
  704. package/.next/static/chunks/app/api/app/update/route-8440b6c72bed83a1.js +0 -1
  705. package/.next/static/chunks/app/api/app/update-check/route-8440b6c72bed83a1.js +0 -1
  706. package/.next/static/chunks/app/api/assistant/conversation/route-8440b6c72bed83a1.js +0 -1
  707. package/.next/static/chunks/app/api/assistant/current-output/route-8440b6c72bed83a1.js +0 -1
  708. package/.next/static/chunks/app/api/assistant/messages/route-8440b6c72bed83a1.js +0 -1
  709. package/.next/static/chunks/app/api/assistant/session/route-8440b6c72bed83a1.js +0 -1
  710. package/.next/static/chunks/app/api/assistant/start/route-8440b6c72bed83a1.js +0 -1
  711. package/.next/static/chunks/app/api/assistant/terminal/route-8440b6c72bed83a1.js +0 -1
  712. package/.next/static/chunks/app/api/assistant/tools/route-8440b6c72bed83a1.js +0 -1
  713. package/.next/static/chunks/app/api/auth/login/route-8440b6c72bed83a1.js +0 -1
  714. package/.next/static/chunks/app/api/auth/logout/route-8440b6c72bed83a1.js +0 -1
  715. package/.next/static/chunks/app/api/auth/status/route-8440b6c72bed83a1.js +0 -1
  716. package/.next/static/chunks/app/api/daily-summary/route-8440b6c72bed83a1.js +0 -1
  717. package/.next/static/chunks/app/api/daily-summary/status/route-8440b6c72bed83a1.js +0 -1
  718. package/.next/static/chunks/app/api/external-apps/[id]/health/route-8440b6c72bed83a1.js +0 -1
  719. package/.next/static/chunks/app/api/external-apps/[id]/route-8440b6c72bed83a1.js +0 -1
  720. package/.next/static/chunks/app/api/external-apps/route-8440b6c72bed83a1.js +0 -1
  721. package/.next/static/chunks/app/api/fs/browse/route-8440b6c72bed83a1.js +0 -1
  722. package/.next/static/chunks/app/api/fs/recent-paths/route-8440b6c72bed83a1.js +0 -1
  723. package/.next/static/chunks/app/api/hooks/agent-event/route-8440b6c72bed83a1.js +0 -1
  724. package/.next/static/chunks/app/api/hooks/claude-done/route-8440b6c72bed83a1.js +0 -1
  725. package/.next/static/chunks/app/api/metrics/vibe/route-8440b6c72bed83a1.js +0 -1
  726. package/.next/static/chunks/app/api/ollama/models/route-8440b6c72bed83a1.js +0 -1
  727. package/.next/static/chunks/app/api/push/subscriptions/route-8440b6c72bed83a1.js +0 -1
  728. package/.next/static/chunks/app/api/push/vapid/route-8440b6c72bed83a1.js +0 -1
  729. package/.next/static/chunks/app/api/repositories/[id]/route-8440b6c72bed83a1.js +0 -1
  730. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +0 -1
  731. package/.next/static/chunks/app/api/repositories/[id]/todos/route-8440b6c72bed83a1.js +0 -1
  732. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8440b6c72bed83a1.js +0 -1
  733. package/.next/static/chunks/app/api/repositories/clone/route-8440b6c72bed83a1.js +0 -1
  734. package/.next/static/chunks/app/api/repositories/excluded/route-8440b6c72bed83a1.js +0 -1
  735. package/.next/static/chunks/app/api/repositories/restore/route-8440b6c72bed83a1.js +0 -1
  736. package/.next/static/chunks/app/api/repositories/route-8440b6c72bed83a1.js +0 -1
  737. package/.next/static/chunks/app/api/repositories/scan/route-8440b6c72bed83a1.js +0 -1
  738. package/.next/static/chunks/app/api/repositories/sync/route-8440b6c72bed83a1.js +0 -1
  739. package/.next/static/chunks/app/api/repositories/validate-path/route-8440b6c72bed83a1.js +0 -1
  740. package/.next/static/chunks/app/api/sidebar/group-order/route-8440b6c72bed83a1.js +0 -1
  741. package/.next/static/chunks/app/api/skills/[id]/route-8440b6c72bed83a1.js +0 -1
  742. package/.next/static/chunks/app/api/skills/installations/route-8440b6c72bed83a1.js +0 -1
  743. package/.next/static/chunks/app/api/skills/operations/route-8440b6c72bed83a1.js +0 -1
  744. package/.next/static/chunks/app/api/skills/reindex/route-8440b6c72bed83a1.js +0 -1
  745. package/.next/static/chunks/app/api/skills/route-8440b6c72bed83a1.js +0 -1
  746. package/.next/static/chunks/app/api/slash-commands/route-8440b6c72bed83a1.js +0 -1
  747. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8440b6c72bed83a1.js +0 -1
  748. package/.next/static/chunks/app/api/tasks/[taskId]/route-8440b6c72bed83a1.js +0 -1
  749. package/.next/static/chunks/app/api/templates/[id]/route-8440b6c72bed83a1.js +0 -1
  750. package/.next/static/chunks/app/api/templates/route-8440b6c72bed83a1.js +0 -1
  751. package/.next/static/chunks/app/api/todos/route-8440b6c72bed83a1.js +0 -1
  752. package/.next/static/chunks/app/api/verification/runs/[runId]/route-8440b6c72bed83a1.js +0 -1
  753. package/.next/static/chunks/app/api/verification/runs/route-8440b6c72bed83a1.js +0 -1
  754. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8440b6c72bed83a1.js +0 -1
  755. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8440b6c72bed83a1.js +0 -1
  756. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8440b6c72bed83a1.js +0 -1
  757. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8440b6c72bed83a1.js +0 -1
  758. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8440b6c72bed83a1.js +0 -1
  759. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8440b6c72bed83a1.js +0 -1
  760. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8440b6c72bed83a1.js +0 -1
  761. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8440b6c72bed83a1.js +0 -1
  762. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8440b6c72bed83a1.js +0 -1
  763. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8440b6c72bed83a1.js +0 -1
  764. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8440b6c72bed83a1.js +0 -1
  765. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8440b6c72bed83a1.js +0 -1
  766. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8440b6c72bed83a1.js +0 -1
  767. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8440b6c72bed83a1.js +0 -1
  768. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8440b6c72bed83a1.js +0 -1
  769. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8440b6c72bed83a1.js +0 -1
  770. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8440b6c72bed83a1.js +0 -1
  771. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8440b6c72bed83a1.js +0 -1
  772. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8440b6c72bed83a1.js +0 -1
  773. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8440b6c72bed83a1.js +0 -1
  774. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8440b6c72bed83a1.js +0 -1
  775. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8440b6c72bed83a1.js +0 -1
  776. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8440b6c72bed83a1.js +0 -1
  777. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8440b6c72bed83a1.js +0 -1
  778. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8440b6c72bed83a1.js +0 -1
  779. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8440b6c72bed83a1.js +0 -1
  780. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8440b6c72bed83a1.js +0 -1
  781. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8440b6c72bed83a1.js +0 -1
  782. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8440b6c72bed83a1.js +0 -1
  783. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8440b6c72bed83a1.js +0 -1
  784. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8440b6c72bed83a1.js +0 -1
  785. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8440b6c72bed83a1.js +0 -1
  786. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8440b6c72bed83a1.js +0 -1
  787. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8440b6c72bed83a1.js +0 -1
  788. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8440b6c72bed83a1.js +0 -1
  789. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8440b6c72bed83a1.js +0 -1
  790. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8440b6c72bed83a1.js +0 -1
  791. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8440b6c72bed83a1.js +0 -1
  792. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8440b6c72bed83a1.js +0 -1
  793. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8440b6c72bed83a1.js +0 -1
  794. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8440b6c72bed83a1.js +0 -1
  795. package/.next/static/chunks/app/api/worktrees/[id]/route-8440b6c72bed83a1.js +0 -1
  796. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8440b6c72bed83a1.js +0 -1
  797. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8440b6c72bed83a1.js +0 -1
  798. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8440b6c72bed83a1.js +0 -1
  799. package/.next/static/chunks/app/api/worktrees/[id]/search/route-8440b6c72bed83a1.js +0 -1
  800. package/.next/static/chunks/app/api/worktrees/[id]/send/route-8440b6c72bed83a1.js +0 -1
  801. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8440b6c72bed83a1.js +0 -1
  802. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8440b6c72bed83a1.js +0 -1
  803. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8440b6c72bed83a1.js +0 -1
  804. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8440b6c72bed83a1.js +0 -1
  805. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8440b6c72bed83a1.js +0 -1
  806. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8440b6c72bed83a1.js +0 -1
  807. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8440b6c72bed83a1.js +0 -1
  808. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8440b6c72bed83a1.js +0 -1
  809. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8440b6c72bed83a1.js +0 -1
  810. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8440b6c72bed83a1.js +0 -1
  811. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8440b6c72bed83a1.js +0 -1
  812. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8440b6c72bed83a1.js +0 -1
  813. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8440b6c72bed83a1.js +0 -1
  814. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +0 -1
  815. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8440b6c72bed83a1.js +0 -1
  816. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8440b6c72bed83a1.js +0 -1
  817. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8440b6c72bed83a1.js +0 -1
  818. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8440b6c72bed83a1.js +0 -1
  819. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8440b6c72bed83a1.js +0 -1
  820. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8440b6c72bed83a1.js +0 -1
  821. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8440b6c72bed83a1.js +0 -1
  822. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8440b6c72bed83a1.js +0 -1
  823. package/.next/static/chunks/app/api/worktrees/route-8440b6c72bed83a1.js +0 -1
  824. package/.next/static/chunks/app/manifest.webmanifest/route-8440b6c72bed83a1.js +0 -1
  825. package/.next/static/chunks/app/proxy/[...path]/route-8440b6c72bed83a1.js +0 -1
  826. package/.next/static/chunks/app/repositories/page-1ed1e5a542ecc168.js +0 -1
  827. package/.next/static/chunks/app/skills/[skillId]/page-6008b904225ebb25.js +0 -1
  828. package/.next/static/chunks/app/worktrees/[id]/page-f6e09d25cd3b56f9.js +0 -1
  829. /package/.next/static/{-E7I667pJDTBamyG8M_Z- → _AR-TSCnEog5nL9JjjCna}/_buildManifest.js +0 -0
  830. /package/.next/static/{-E7I667pJDTBamyG8M_Z- → _AR-TSCnEog5nL9JjjCna}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=1068,exports.ids=[1068],exports.modules={23197:(a,b,c)=>{c.d(b,{$M:()=>e,H1:()=>d,q5:()=>f});let d="__global__",e=2e3,f=900},61068:(a,b,c)=>{c.d(b,{Nz:()=>u,EB:()=>v,l7:()=>x});var d=c(95220),e=c(18896),f=c(11099),g=c(85775),h=c(72626),i=c(31268),j=c(11665);let k=(0,h.h)("global-session-poller"),l=new Map,m=new Map;var n=c(93997),o=c(15194),p=c(23197),q=c(77093),r=c(82325);let s=(0,h.h)("session-cleanup");async function t(a,b){let c={worktreeId:a,sessionsKilled:[],sessionErrors:[],pollersStopped:[],pollerErrors:[]};for(let e of((0,n.pc)(),o.XH)){try{await b(a,e)&&(c.sessionsKilled.push(e),s.info("session:killed",{worktreeId:a,cliToolId:e}))}catch(d){let b=`${e}: ${(0,q.u1)(d)}`;c.sessionErrors.push(b),s.warn("session:kill-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}try{(0,d.stopPolling)(a,e),c.pollersStopped.push(`response-poller:${e}`)}catch(d){let b=`response-poller:${e}: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("response-poller:stop-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}}try{(0,e._C)(a),c.pollersStopped.push("auto-yes-poller")}catch(d){let b=`auto-yes-poller: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-poller:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,e.LP)(a),c.pollersStopped.push("auto-yes-state")}catch(d){let b=`auto-yes-state: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-state:delete-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,f.Yg)(a),c.pollersStopped.push("schedule-manager")}catch(d){let b=`schedule-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("schedule-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,g.Tm)(a),c.pollersStopped.push("timer-manager")}catch(d){let b=`timer-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("timer-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}return c}async function u(a,b){let c=await Promise.allSettled(a.map(a=>t(a,b))),d=[],e=[];for(let b=0;b<c.length;b++){let f=c[b],g=a[b];if("fulfilled"===f.status){let a=f.value;for(let b of(d.push(a),a.sessionErrors))e.push(`Session kill error (${g}): ${b}`);for(let b of a.pollerErrors)e.push(`Poller stop error (${g}): ${b}`)}else e.push(`Cleanup failed (${g}): ${(0,q.u1)(f.reason)}`)}return{results:d,warnings:e}}async function v(a,b){try{let c=i.s.getInstance().getTool(b);if(!await c.isRunning(a))return!1;let e=`${a}:${b}`;(0,d.clearPromptHashCache)(e);let f=c.getSessionName(a);return(0,j.fY)(f)}catch{return!1}}async function w(){for(let a of l.keys()){let b=l.get(a);b&&clearTimeout(b)}l.clear(),m.clear(),k.info("poll:all-stopped");let a=0,b=i.s.getInstance();for(let c of o.XH)try{let d=b.getTool(c).getSessionName(p.H1);await (0,j.N)(d)&&await (0,j.fY)(d)&&(a++,s.info("global-session:killed",{cliToolId:c,sessionName:d}))}catch(a){s.warn("global-session:kill-failed",{cliToolId:c,error:(0,q.u1)(a)})}return a}async function x(a,b){let c=(0,r.L0)(a,b);try{await w()}catch(a){s.warn("sync:global-cleanup-failed",{error:(0,q.u1)(a)})}let d=[];if(c.deletedIds.length>0)try{let a=await u(c.deletedIds,v);a.warnings.length>0&&(s.warn("sync:cleanup-warnings",{warnings:a.warnings}),d=[`${a.warnings.length} session cleanup warning(s) occurred`])}catch(a){s.error("sync:cleanup-failed",{error:(0,q.u1)(a)}),d=["Session cleanup encountered an error"]}return{syncResult:c,cleanupWarnings:d}}},82325:(a,b,c)=>{c.d(b,{Hz:()=>l,L0:()=>o,Mg:()=>p,YM:()=>m,Yp:()=>n});var d=c(79646),e=c(28354),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(56791);let k=(0,c(72626).h)("worktrees");function l(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0):[]}async function m(a){let b=(0,e.promisify)(d.exec);try{let{stdout:c}=await b("git worktree list",{cwd:a}),d=function(a){if(!a||""===a.trim())return[];let b=a.trim().split("\n"),c=[];for(let a of b){let b=a.trim();if(!b)continue;let d=b.match(/^(.+?)\s+([a-z0-9]+)\s+(?:\[(.+?)\]|\(detached HEAD\))/);if(d){let[,a,b,e]=d;c.push({path:a.trim(),branch:e||`detached-${b}`,commit:b})}}return c}(c),e=i().resolve(a),f=i().basename(e);return d.map(a=>({id:function(a,b){if(!a)return"";let c=a=>a.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),d=c(a);if(b){let a=c(b);return`${a}-${d}`}return d}(a.branch,f),name:a.branch,branch:a.branch,path:i().resolve(a.path),repositoryPath:e,repositoryName:f})).filter(a=>["/etc","/root","/sys","/proc","/dev","/boot","/bin","/sbin","/usr/bin","/usr/sbin"].some(b=>a.path.startsWith(b))?(k.warn("worktree:unsafe-path-skipped",{path:a.path}),!1):!(a.path.includes("\0")||a.path.includes(".."))||(k.warn("worktree:malicious-path-skipped",{path:a.path}),!1))}catch(c){let a=c instanceof Error?c.message:String(c),b=c.code;if(a?.includes("not a git repository")||128===b)return[];throw c}}async function n(a){let b=await Promise.allSettled(a.map(async a=>{k.info("repository:scan-start",{repoPath:a});let b=await m(a);return k.info("repository:scan-complete",{repoPath:a,worktreeCount:b.length}),b})),c=[];for(let d=0;d<b.length;d++){let e=b[d];"fulfilled"===e.status?c.push(...e.value):k.error("repository:scan-failed",{repoPath:a[d],error:e.reason instanceof Error?e.reason.message:String(e.reason)})}return c}function o(a,b){if(0===b.length)return{deletedIds:[],upsertedCount:0};let c=[],d=0,e=new Map;for(let a of b){let b=a.repositoryPath||"";e.has(b)||e.set(b,[]),e.get(b).push(a)}for(let[b,f]of e){if(!b)continue;let e=(0,j.uJp)(a,b),g=new Set(f.map(a=>i().resolve(a.path))),h=e.filter(a=>!g.has(i().resolve(a.path))).map(a=>a.id);if(h.length>0){let b=(0,j.Rm5)(a,h);c.push(...h),k.info("worktree:cleanup",{deletedCount:b.deletedCount})}for(let b of f)(0,j.ZL2)(a,b),d++}return{deletedIds:c,upsertedCount:d}}function p(a,b){let c=new Set(b.map(a=>a.repositoryPath).filter(a=>!!a)),d=[];for(let b of(0,j.NVZ)(a)){let e=b.path;if(!e||c.has(e)||function(a){if(!a)return!1;try{return g().existsSync(a)&&g().existsSync(i().join(a,".git"))}catch{return!0}}(e))continue;let f=(0,j.uJp)(a,e).map(a=>a.id);if(0===f.length)continue;let h=(0,j.Rm5)(a,f);d.push(...f),k.info("worktree:stale-repo-pruned",{repoPath:e,deletedCount:h.deletedCount})}return d}},85775:(a,b,c)=>{c.d(b,{Tm:()=>o,x4:()=>m,xJ:()=>n});var d=c(34129),e=c(31268),f=c(88807),g=c(72626),h=c(87374),i=c(39687);let j=(0,g.h)("timer-manager");function k(){return globalThis.__timerManagerState||(globalThis.__timerManagerState={timers:new Map,timerWorktrees:new Map,initialized:!1}),globalThis.__timerManagerState}async function l(a){let b=k(),c=(0,f.getDbInstance)();try{let b=(0,d.kx)(c,a);if(!b||"pending"!==b.status)return;let f=e.s.getInstance().getTool(b.cliToolId),g=b.instanceId;if(!await f.isRunning(b.worktreeId,g)){j.warn("timer:no-session",{timerId:a,worktreeId:b.worktreeId,instanceId:g}),(0,d.j2)(c,a,h.HR.NO_SESSION);return}(0,d.j2)(c,a,"sending");let k=await (0,i.d)(c,{worktreeId:b.worktreeId,content:b.message,cliToolId:b.cliToolId,instanceId:g});if(!k.ok){let b=`[${k.stage}] ${k.error}`;(0,d.j2)(c,a,"failed",void 0,b),j.error("timer:send-failed",{timerId:a,stage:k.stage,error:k.error});return}(0,d.j2)(c,a,"sent",Date.now()),j.info("timer:sent",{timerId:a,worktreeId:b.worktreeId})}catch(e){let b=e instanceof Error?e.message:String(e);try{(0,d.j2)(c,a,"failed",void 0,b)}catch{}j.error("timer:send-failed",{timerId:a,error:b})}finally{b.timers.delete(a),b.timerWorktrees.delete(a)}}function m(a,b,c){let d=k(),e=setTimeout(()=>{l(a)},c);d.timers.set(a,e),d.timerWorktrees.set(a,b)}function n(a){let b=k(),c=b.timers.get(a);c&&(clearTimeout(c),b.timers.delete(a),b.timerWorktrees.delete(a));let e=(0,f.getDbInstance)();(0,d.Ud)(e,a)}function o(a){let b=k(),c=(0,f.getDbInstance)();for(let[c,d]of b.timerWorktrees)if(d===a){let a=b.timers.get(c);a&&clearTimeout(a),b.timers.delete(c),b.timerWorktrees.delete(c)}(0,d.$$)(c,a)}}};
1
+ "use strict";exports.id=1068,exports.ids=[1068],exports.modules={23197:(a,b,c)=>{c.d(b,{$M:()=>e,H1:()=>d,q5:()=>f});let d="__global__",e=2e3,f=900},61068:(a,b,c)=>{c.d(b,{Nz:()=>u,EB:()=>v,l7:()=>x});var d=c(95220),e=c(18896),f=c(11099),g=c(85775),h=c(72626),i=c(31268),j=c(11665);let k=(0,h.h)("global-session-poller"),l=new Map,m=new Map;var n=c(93997),o=c(15194),p=c(23197),q=c(77093),r=c(82325);let s=(0,h.h)("session-cleanup");async function t(a,b){let c={worktreeId:a,sessionsKilled:[],sessionErrors:[],pollersStopped:[],pollerErrors:[]};for(let e of((0,n.pc)(),o.XH)){try{await b(a,e)&&(c.sessionsKilled.push(e),s.info("session:killed",{worktreeId:a,cliToolId:e}))}catch(d){let b=`${e}: ${(0,q.u1)(d)}`;c.sessionErrors.push(b),s.warn("session:kill-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}try{(0,d.stopPolling)(a,e),c.pollersStopped.push(`response-poller:${e}`)}catch(d){let b=`response-poller:${e}: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("response-poller:stop-failed",{worktreeId:a,cliToolId:e,error:d instanceof Error?d.message:String(d)})}}try{(0,e._C)(a),c.pollersStopped.push("auto-yes-poller")}catch(d){let b=`auto-yes-poller: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-poller:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,e.LP)(a),c.pollersStopped.push("auto-yes-state")}catch(d){let b=`auto-yes-state: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("auto-yes-state:delete-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,f.Yg)(a),c.pollersStopped.push("schedule-manager")}catch(d){let b=`schedule-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("schedule-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}try{(0,g.Tm)(a),c.pollersStopped.push("timer-manager")}catch(d){let b=`timer-manager: ${(0,q.u1)(d)}`;c.pollerErrors.push(b),s.warn("timer-manager:stop-failed",{worktreeId:a,error:d instanceof Error?d.message:String(d)})}return c}async function u(a,b){let c=await Promise.allSettled(a.map(a=>t(a,b))),d=[],e=[];for(let b=0;b<c.length;b++){let f=c[b],g=a[b];if("fulfilled"===f.status){let a=f.value;for(let b of(d.push(a),a.sessionErrors))e.push(`Session kill error (${g}): ${b}`);for(let b of a.pollerErrors)e.push(`Poller stop error (${g}): ${b}`)}else e.push(`Cleanup failed (${g}): ${(0,q.u1)(f.reason)}`)}return{results:d,warnings:e}}async function v(a,b){try{let c=i.s.getInstance().getTool(b);if(!await c.isRunning(a))return!1;let e=`${a}:${b}`;(0,d.clearPromptHashCache)(e);let f=c.getSessionName(a);return(0,j.fY)(f)}catch{return!1}}async function w(){for(let a of l.keys()){let b=l.get(a);b&&clearTimeout(b)}l.clear(),m.clear(),k.info("poll:all-stopped");let a=0,b=i.s.getInstance();for(let c of o.XH)try{let d=b.getTool(c).getSessionName(p.H1);await (0,j.N)(d)&&await (0,j.fY)(d)&&(a++,s.info("global-session:killed",{cliToolId:c,sessionName:d}))}catch(a){s.warn("global-session:kill-failed",{cliToolId:c,error:(0,q.u1)(a)})}return a}async function x(a,b){let c=(0,r.L0)(a,b);try{await w()}catch(a){s.warn("sync:global-cleanup-failed",{error:(0,q.u1)(a)})}let d=[];if(c.deletedIds.length>0)try{let a=await u(c.deletedIds,v);a.warnings.length>0&&(s.warn("sync:cleanup-warnings",{warnings:a.warnings}),d=[`${a.warnings.length} session cleanup warning(s) occurred`])}catch(a){s.error("sync:cleanup-failed",{error:(0,q.u1)(a)}),d=["Session cleanup encountered an error"]}return{syncResult:c,cleanupWarnings:d}}},82325:(a,b,c)=>{c.d(b,{Hz:()=>m,L0:()=>p,Mg:()=>q,YM:()=>n,Yp:()=>o});var d=c(79646),e=c(28354),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(23718),k=c(56791);let l=(0,c(72626).h)("worktrees");function m(){let a=process.env.WORKTREE_REPOS;return a&&a.trim()?a.split(",").map(a=>a.trim()).filter(a=>a.length>0):[]}async function n(a){let b=(0,e.promisify)(d.exec);try{let{stdout:c}=await b("git worktree list",{cwd:a}),d=function(a){if(!a||""===a.trim())return[];let b=a.trim().split("\n"),c=[];for(let a of b){let b=a.trim();if(!b)continue;let d=b.match(/^(.+?)\s+([a-z0-9]+)\s+(?:\[(.+?)\]|\(detached HEAD\))/);if(d){let[,a,b,e]=d;c.push({path:a.trim(),branch:e||`detached-${b}`,commit:b})}}return c}(c),e=i().resolve(a),f=i().basename(e);return d.map(a=>{let b=i().resolve(a.path);return{id:(0,j.ko)(b),name:a.branch,branch:a.branch,path:b,repositoryPath:e,repositoryName:f}}).filter(a=>["/etc","/root","/sys","/proc","/dev","/boot","/bin","/sbin","/usr/bin","/usr/sbin"].some(b=>a.path.startsWith(b))?(l.warn("worktree:unsafe-path-skipped",{path:a.path}),!1):!(a.path.includes("\0")||a.path.includes(".."))||(l.warn("worktree:malicious-path-skipped",{path:a.path}),!1))}catch(c){let a=c instanceof Error?c.message:String(c),b=c.code;if(a?.includes("not a git repository")||128===b)return[];throw c}}async function o(a){let b=await Promise.allSettled(a.map(async a=>{l.info("repository:scan-start",{repoPath:a});let b=await n(a);return l.info("repository:scan-complete",{repoPath:a,worktreeCount:b.length}),b})),c=[];for(let d=0;d<b.length;d++){let e=b[d];"fulfilled"===e.status?c.push(...e.value):l.error("repository:scan-failed",{repoPath:a[d],error:e.reason instanceof Error?e.reason.message:String(e.reason)})}return c}function p(a,b){if(0===b.length)return{deletedIds:[],upsertedCount:0};let c=[],d=0,e=new Map;for(let a of b){let b=a.repositoryPath||"";e.has(b)||e.set(b,[]),e.get(b).push(a)}let f=new Set([...(0,k.nO1)(a),...(0,k.r3d)(a)]),g=new Map((0,k.SjY)(a).map(a=>[i().resolve(a.path),a.id])),h=new Map,m=new Map;for(let[a,b]of g)h.set(a,new Set([b])),m.set(b,a);for(let b of(0,k.fXo)(a)){let a=m.get(b.worktreeId);a&&h.get(a)?.add(b.oldId)}let n=new Set(b.map(a=>i().resolve(a.path)));for(let[b,o]of e){if(!b)continue;let e=(0,k.uJp)(a,b).filter(a=>!n.has(i().resolve(a.path))).map(a=>a.id);if(e.length>0){let b=(0,k.Rm5)(a,e);for(let a of(c.push(...e),e)){f.delete(a);let b=m.get(a);void 0!==b&&(g.delete(b),h.delete(b))}l.info("worktree:cleanup",{deletedCount:b.deletedCount})}for(let b of o){let c=i().resolve(b.path),e=g.get(c),l=b.id,n=e??(l&&!f.has(l)?l:function(a,b,c){if(!c||0===c.size)return(0,j.ko)(a,b);let d=new Set(b);for(let a of c)d.delete(a);return(0,j.ko)(a,d)}(c,f,h.get(c)));f.add(n),g.set(c,n),m.set(n,c),(0,k.ZL2)(a,{...b,id:n,name:b.branch??b.name}),d++}}return{deletedIds:c,upsertedCount:d}}function q(a,b){let c=new Set(b.map(a=>a.repositoryPath).filter(a=>!!a)),d=[];for(let b of(0,k.NVZ)(a)){let e=b.path;if(!e||c.has(e)||function(a){if(!a)return!1;try{return g().existsSync(a)&&g().existsSync(i().join(a,".git"))}catch{return!0}}(e))continue;let f=(0,k.uJp)(a,e).map(a=>a.id);if(0===f.length)continue;let h=(0,k.Rm5)(a,f);d.push(...f),l.info("worktree:stale-repo-pruned",{repoPath:e,deletedCount:h.deletedCount})}return d}},85775:(a,b,c)=>{c.d(b,{Tm:()=>o,x4:()=>m,xJ:()=>n});var d=c(34129),e=c(31268),f=c(88807),g=c(72626),h=c(87374),i=c(39687);let j=(0,g.h)("timer-manager");function k(){return globalThis.__timerManagerState||(globalThis.__timerManagerState={timers:new Map,timerWorktrees:new Map,initialized:!1}),globalThis.__timerManagerState}async function l(a){let b=k(),c=(0,f.getDbInstance)();try{let b=(0,d.kx)(c,a);if(!b||"pending"!==b.status)return;let f=e.s.getInstance().getTool(b.cliToolId),g=b.instanceId;if(!await f.isRunning(b.worktreeId,g)){j.warn("timer:no-session",{timerId:a,worktreeId:b.worktreeId,instanceId:g}),(0,d.j2)(c,a,h.HR.NO_SESSION);return}(0,d.j2)(c,a,"sending");let k=await (0,i.d)(c,{worktreeId:b.worktreeId,content:b.message,cliToolId:b.cliToolId,instanceId:g});if(!k.ok){let b=`[${k.stage}] ${k.error}`;(0,d.j2)(c,a,"failed",void 0,b),j.error("timer:send-failed",{timerId:a,stage:k.stage,error:k.error});return}(0,d.j2)(c,a,"sent",Date.now()),j.info("timer:sent",{timerId:a,worktreeId:b.worktreeId})}catch(e){let b=e instanceof Error?e.message:String(e);try{(0,d.j2)(c,a,"failed",void 0,b)}catch{}j.error("timer:send-failed",{timerId:a,error:b})}finally{b.timers.delete(a),b.timerWorktrees.delete(a)}}function m(a,b,c){let d=k(),e=setTimeout(()=>{l(a)},c);d.timers.set(a,e),d.timerWorktrees.set(a,b)}function n(a){let b=k(),c=b.timers.get(a);c&&(clearTimeout(c),b.timers.delete(a),b.timerWorktrees.delete(a));let e=(0,f.getDbInstance)();(0,d.Ud)(e,a)}function o(a){let b=k(),c=(0,f.getDbInstance)();for(let[c,d]of b.timerWorktrees)if(d===a){let a=b.timers.get(c);a&&clearTimeout(a),b.timers.delete(c),b.timerWorktrees.delete(c)}(0,d.$$)(c,a)}}};
@@ -1,2 +1,2 @@
1
1
  "use strict";exports.id=1503,exports.ids=[1503],exports.modules={2400:(a,b,c)=>{let{tokenChars:d}=c(11998);function e(a,b,c){void 0===a[b]?a[b]=[c]:a[b].push(c)}a.exports={format:function(a){return Object.keys(a).map(b=>{let c=a[b];return Array.isArray(c)||(c=[c]),c.map(a=>[b].concat(Object.keys(a).map(b=>{let c=a[b];return Array.isArray(c)||(c=[c]),c.map(a=>!0===a?b:`${b}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(a){let b,c,f=Object.create(null),g=Object.create(null),h=!1,i=!1,j=!1,k=-1,l=-1,m=-1,n=0;for(;n<a.length;n++)if(l=a.charCodeAt(n),void 0===b)if(-1===m&&1===d[l])-1===k&&(k=n);else if(0!==n&&(32===l||9===l))-1===m&&-1!==k&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n);let c=a.slice(k,m);44===l?(e(f,c,g),g=Object.create(null)):b=c,k=m=-1}else throw SyntaxError(`Unexpected character at index ${n}`);else if(void 0===c)if(-1===m&&1===d[l])-1===k&&(k=n);else if(32===l||9===l)-1===m&&-1!==k&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n),e(g,a.slice(k,m),!0),44===l&&(e(f,b,g),g=Object.create(null),b=void 0),k=m=-1}else if(61===l&&-1!==k&&-1===m)c=a.slice(k,n),k=m=-1;else throw SyntaxError(`Unexpected character at index ${n}`);else if(i){if(1!==d[l])throw SyntaxError(`Unexpected character at index ${n}`);-1===k?k=n:h||(h=!0),i=!1}else if(j)if(1===d[l])-1===k&&(k=n);else if(34===l&&-1!==k)j=!1,m=n;else if(92===l)i=!0;else throw SyntaxError(`Unexpected character at index ${n}`);else if(34===l&&61===a.charCodeAt(n-1))j=!0;else if(-1===m&&1===d[l])-1===k&&(k=n);else if(-1!==k&&(32===l||9===l))-1===m&&(m=n);else if(59===l||44===l){if(-1===k)throw SyntaxError(`Unexpected character at index ${n}`);-1===m&&(m=n);let d=a.slice(k,m);h&&(d=d.replace(/\\/g,""),h=!1),e(g,c,d),44===l&&(e(f,b,g),g=Object.create(null),b=void 0),c=void 0,k=m=-1}else throw SyntaxError(`Unexpected character at index ${n}`);if(-1===k||j||32===l||9===l)throw SyntaxError("Unexpected end of input");-1===m&&(m=n);let o=a.slice(k,m);return void 0===b?e(f,o,g):(void 0===c?e(g,o,!0):h?e(g,c,o.replace(/\\/g,"")):e(g,c,o),e(f,b,g)),f}}},3266:(a,b,c)=>{let d=c(94735),e=c(55591),f=c(81630),g=c(91645),h=c(34631),{randomBytes:i,createHash:j}=c(55511),{Duplex:k,Readable:l}=c(27910),{URL:m}=c(79551),n=c(6597),o=c(94740),p=c(64188),{isBlob:q}=c(11998),{BINARY_TYPES:r,CLOSE_TIMEOUT:s,EMPTY_BUFFER:t,GUID:u,kForOnEventAttribute:v,kListener:w,kStatusCode:x,kWebSocket:y,NOOP:z}=c(27768),{EventTarget:{addEventListener:A,removeEventListener:B}}=c(92095),{format:C,parse:D}=c(2400),{toBuffer:E}=c(94100),F=Symbol("kAborted"),G=[8,13],H=["CONNECTING","OPEN","CLOSING","CLOSED"],I=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class J extends d{constructor(a,b,c){super(),this._binaryType=r[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=t,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=J.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==a?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===b?b=[]:Array.isArray(b)||("object"==typeof b&&null!==b?(c=b,b=[]):b=[b]),function a(b,c,d,g){let h,k,l,o,p={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:s,protocolVersion:G[1],maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...g,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(b._autoPong=p.autoPong,b._closeTimeout=p.closeTimeout,!G.includes(p.protocolVersion))throw RangeError(`Unsupported protocol version: ${p.protocolVersion} (supported versions: ${G.join(", ")})`);if(c instanceof m)h=c;else try{h=new m(c)}catch(a){throw SyntaxError(`Invalid URL: ${c}`)}"http:"===h.protocol?h.protocol="ws:":"https:"===h.protocol&&(h.protocol="wss:"),b._url=h.href;let q="wss:"===h.protocol,r="ws+unix:"===h.protocol;if("ws:"===h.protocol||q||r?r&&!h.pathname?k="The URL's pathname is empty":h.hash&&(k="The URL contains a fragment identifier"):k='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',k){let a=SyntaxError(k);if(0!==b._redirects)return void K(b,a);throw a}let t=q?443:80,v=i(16).toString("base64"),w=q?e.request:f.request,x=new Set;if(p.createConnection=p.createConnection||(q?M:L),p.defaultPort=p.defaultPort||t,p.port=h.port||t,p.host=h.hostname.startsWith("[")?h.hostname.slice(1,-1):h.hostname,p.headers={...p.headers,"Sec-WebSocket-Version":p.protocolVersion,"Sec-WebSocket-Key":v,Connection:"Upgrade",Upgrade:"websocket"},p.path=h.pathname+h.search,p.timeout=p.handshakeTimeout,p.perMessageDeflate&&(l=new n(!0!==p.perMessageDeflate?p.perMessageDeflate:{},!1,p.maxPayload),p.headers["Sec-WebSocket-Extensions"]=C({[n.extensionName]:l.offer()})),d.length){for(let a of d){if("string"!=typeof a||!I.test(a)||x.has(a))throw SyntaxError("An invalid or duplicated subprotocol was specified");x.add(a)}p.headers["Sec-WebSocket-Protocol"]=d.join(",")}if(p.origin&&(p.protocolVersion<13?p.headers["Sec-WebSocket-Origin"]=p.origin:p.headers.Origin=p.origin),(h.username||h.password)&&(p.auth=`${h.username}:${h.password}`),r){let a=p.path.split(":");p.socketPath=a[0],p.path=a[1]}if(p.followRedirects){if(0===b._redirects){b._originalIpc=r,b._originalSecure=q,b._originalHostOrSocketPath=r?p.socketPath:h.host;let a=g&&g.headers;if(g={...g,headers:{}},a)for(let[b,c]of Object.entries(a))g.headers[b.toLowerCase()]=c}else if(0===b.listenerCount("redirect")){let a=r?!!b._originalIpc&&p.socketPath===b._originalHostOrSocketPath:!b._originalIpc&&h.host===b._originalHostOrSocketPath;a&&(!b._originalSecure||q)||(delete p.headers.authorization,delete p.headers.cookie,a||delete p.headers.host,p.auth=void 0)}p.auth&&!g.headers.authorization&&(g.headers.authorization="Basic "+Buffer.from(p.auth).toString("base64")),o=b._req=w(p),b._redirects&&b.emit("redirect",b.url,o)}else o=b._req=w(p);p.timeout&&o.on("timeout",()=>{N(b,o,"Opening handshake has timed out")}),o.on("error",a=>{null===o||o[F]||(o=b._req=null,K(b,a))}),o.on("response",e=>{let f=e.headers.location,h=e.statusCode;if(f&&p.followRedirects&&h>=300&&h<400){let e;if(++b._redirects>p.maxRedirects)return void N(b,o,"Maximum redirects exceeded");o.abort();try{e=new m(f,c)}catch(a){K(b,SyntaxError(`Invalid URL: ${f}`));return}a(b,e,d,g)}else b.emit("unexpected-response",o,e)||N(b,o,`Unexpected server response: ${e.statusCode}`)}),o.on("upgrade",(a,c,d)=>{let e;if(b.emit("upgrade",a),b.readyState!==J.CONNECTING)return;o=b._req=null;let f=a.headers.upgrade;if(void 0===f||"websocket"!==f.toLowerCase())return void N(b,c,"Invalid Upgrade header");let g=j("sha1").update(v+u).digest("base64");if(a.headers["sec-websocket-accept"]!==g)return void N(b,c,"Invalid Sec-WebSocket-Accept header");let h=a.headers["sec-websocket-protocol"];if(void 0!==h?x.size?x.has(h)||(e="Server sent an invalid subprotocol"):e="Server sent a subprotocol but none was requested":x.size&&(e="Server sent no subprotocol"),e)return void N(b,c,e);h&&(b._protocol=h);let i=a.headers["sec-websocket-extensions"];if(void 0!==i){let a;if(!l)return void N(b,c,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{a=D(i)}catch(a){N(b,c,"Invalid Sec-WebSocket-Extensions header");return}let d=Object.keys(a);if(1!==d.length||d[0]!==n.extensionName)return void N(b,c,"Server indicated an extension that was not requested");try{l.accept(a[n.extensionName])}catch(a){N(b,c,"Invalid Sec-WebSocket-Extensions header");return}b._extensions[n.extensionName]=l}b.setSocket(c,d,{allowSynchronousEvents:p.allowSynchronousEvents,generateMask:p.generateMask,maxPayload:p.maxPayload,skipUTF8Validation:p.skipUTF8Validation})}),p.finishRequest?p.finishRequest(o,b):o.end()}(this,a,b,c)):(this._autoPong=c.autoPong,this._closeTimeout=c.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(a){r.includes(a)&&(this._binaryType=a,this._receiver&&(this._receiver._binaryType=a))}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(a,b,c){let d=new o({allowSynchronousEvents:c.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:c.maxPayload,skipUTF8Validation:c.skipUTF8Validation}),e=new p(a,this._extensions,c.generateMask);this._receiver=d,this._sender=e,this._socket=a,d[y]=this,e[y]=this,a[y]=this,d.on("conclude",P),d.on("drain",Q),d.on("error",R),d.on("message",T),d.on("ping",U),d.on("pong",V),e.onerror=X,a.setTimeout&&a.setTimeout(0),a.setNoDelay&&a.setNoDelay(),b.length>0&&a.unshift(b),a.on("close",Z),a.on("data",$),a.on("end",_),a.on("error",aa),this._readyState=J.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=J.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[n.extensionName]&&this._extensions[n.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=J.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(a,b){if(this.readyState!==J.CLOSED){if(this.readyState===J.CONNECTING)return void N(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===J.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=J.CLOSING,this._sender.close(a,b,!this._isServer,a=>{!a&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Y(this)}}pause(){this.readyState!==J.CONNECTING&&this.readyState!==J.CLOSED&&(this._paused=!0,this._socket.pause())}ping(a,b,c){if(this.readyState===J.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof a?(c=a,a=b=void 0):"function"==typeof b&&(c=b,b=void 0),"number"==typeof a&&(a=a.toString()),this.readyState!==J.OPEN)return void O(this,a,c);void 0===b&&(b=!this._isServer),this._sender.ping(a||t,b,c)}pong(a,b,c){if(this.readyState===J.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof a?(c=a,a=b=void 0):"function"==typeof b&&(c=b,b=void 0),"number"==typeof a&&(a=a.toString()),this.readyState!==J.OPEN)return void O(this,a,c);void 0===b&&(b=!this._isServer),this._sender.pong(a||t,b,c)}resume(){this.readyState!==J.CONNECTING&&this.readyState!==J.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(a,b,c){if(this.readyState===J.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof b&&(c=b,b={}),"number"==typeof a&&(a=a.toString()),this.readyState!==J.OPEN)return void O(this,a,c);let d={binary:"string"!=typeof a,mask:!this._isServer,compress:!0,fin:!0,...b};this._extensions[n.extensionName]||(d.compress=!1),this._sender.send(a||t,d,c)}terminate(){if(this.readyState!==J.CLOSED){if(this.readyState===J.CONNECTING)return void N(this,this._req,"WebSocket was closed before the connection was established");this._socket&&(this._readyState=J.CLOSING,this._socket.destroy())}}}function K(a,b){a._readyState=J.CLOSING,a._errorEmitted=!0,a.emit("error",b),a.emitClose()}function L(a){return a.path=a.socketPath,g.connect(a)}function M(a){return a.path=void 0,a.servername||""===a.servername||(a.servername=g.isIP(a.host)?"":a.host),h.connect(a)}function N(a,b,c){a._readyState=J.CLOSING;let d=Error(c);Error.captureStackTrace(d,N),b.setHeader?(b[F]=!0,b.abort(),b.socket&&!b.socket.destroyed&&b.socket.destroy(),process.nextTick(K,a,d)):(b.destroy(d),b.once("error",a.emit.bind(a,"error")),b.once("close",a.emitClose.bind(a)))}function O(a,b,c){if(b){let c=q(b)?b.size:E(b).length;a._socket?a._sender._bufferedBytes+=c:a._bufferedAmount+=c}if(c){let b=Error(`WebSocket is not open: readyState ${a.readyState} (${H[a.readyState]})`);process.nextTick(c,b)}}function P(a,b){let c=this[y];c._closeFrameReceived=!0,c._closeMessage=b,c._closeCode=a,void 0!==c._socket[y]&&(c._socket.removeListener("data",$),process.nextTick(W,c._socket),1005===a?c.close():c.close(a,b))}function Q(){let a=this[y];a.isPaused||a._socket.resume()}function R(a){let b=this[y];void 0!==b._socket[y]&&(b._socket.removeListener("data",$),process.nextTick(W,b._socket),b.close(a[x])),b._errorEmitted||(b._errorEmitted=!0,b.emit("error",a))}function S(){this[y].emitClose()}function T(a,b){this[y].emit("message",a,b)}function U(a){let b=this[y];b._autoPong&&b.pong(a,!this._isServer,z),b.emit("ping",a)}function V(a){this[y].emit("pong",a)}function W(a){a.resume()}function X(a){let b=this[y];b.readyState!==J.CLOSED&&(b.readyState===J.OPEN&&(b._readyState=J.CLOSING,Y(b)),this._socket.end(),b._errorEmitted||(b._errorEmitted=!0,b.emit("error",a)))}function Y(a){a._closeTimer=setTimeout(a._socket.destroy.bind(a._socket),a._closeTimeout)}function Z(){let a=this[y];if(this.removeListener("close",Z),this.removeListener("data",$),this.removeListener("end",_),a._readyState=J.CLOSING,!this._readableState.endEmitted&&!a._closeFrameReceived&&!a._receiver._writableState.errorEmitted&&0!==this._readableState.length){let b=this.read(this._readableState.length);a._receiver.write(b)}a._receiver.end(),this[y]=void 0,clearTimeout(a._closeTimer),a._receiver._writableState.finished||a._receiver._writableState.errorEmitted?a.emitClose():(a._receiver.on("error",S),a._receiver.on("finish",S))}function $(a){this[y]._receiver.write(a)||this.pause()}function _(){let a=this[y];a._readyState=J.CLOSING,a._receiver.end(),this.end()}function aa(){let a=this[y];this.removeListener("error",aa),this.on("error",z),a&&(a._readyState=J.CLOSING,this.destroy())}Object.defineProperty(J,"CONNECTING",{enumerable:!0,value:H.indexOf("CONNECTING")}),Object.defineProperty(J.prototype,"CONNECTING",{enumerable:!0,value:H.indexOf("CONNECTING")}),Object.defineProperty(J,"OPEN",{enumerable:!0,value:H.indexOf("OPEN")}),Object.defineProperty(J.prototype,"OPEN",{enumerable:!0,value:H.indexOf("OPEN")}),Object.defineProperty(J,"CLOSING",{enumerable:!0,value:H.indexOf("CLOSING")}),Object.defineProperty(J.prototype,"CLOSING",{enumerable:!0,value:H.indexOf("CLOSING")}),Object.defineProperty(J,"CLOSED",{enumerable:!0,value:H.indexOf("CLOSED")}),Object.defineProperty(J.prototype,"CLOSED",{enumerable:!0,value:H.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(a=>{Object.defineProperty(J.prototype,a,{enumerable:!0})}),["open","error","close","message"].forEach(a=>{Object.defineProperty(J.prototype,`on${a}`,{enumerable:!0,get(){for(let b of this.listeners(a))if(b[v])return b[w];return null},set(b){for(let b of this.listeners(a))if(b[v]){this.removeListener(a,b);break}"function"==typeof b&&this.addEventListener(a,b,{[v]:!0})}})}),J.prototype.addEventListener=A,J.prototype.removeEventListener=B,a.exports=J},6597:(a,b,c)=>{let d,e=c(74075),f=c(94100),g=c(47109),{kStatusCode:h}=c(27768),i=Buffer[Symbol.species],j=Buffer.from([0,0,255,255]),k=Symbol("permessage-deflate"),l=Symbol("total-length"),m=Symbol("callback"),n=Symbol("buffers"),o=Symbol("error");class p{constructor(a,b,c){this._maxPayload=0|c,this._options=a||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!b,this._deflate=null,this._inflate=null,this.params=null,d||(d=new g(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let a={};return this._options.serverNoContextTakeover&&(a.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(a.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(a.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?a.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(a.client_max_window_bits=!0),a}accept(a){return a=this.normalizeParams(a),this.params=this._isServer?this.acceptAsServer(a):this.acceptAsClient(a),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let a=this._deflate[m];this._deflate.close(),this._deflate=null,a&&a(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(a){let b=this._options,c=a.find(a=>(!1!==b.serverNoContextTakeover||!a.server_no_context_takeover)&&(!a.server_max_window_bits||!1!==b.serverMaxWindowBits&&("number"!=typeof b.serverMaxWindowBits||!(b.serverMaxWindowBits>a.server_max_window_bits)))&&("number"!=typeof b.clientMaxWindowBits||!!a.client_max_window_bits));if(!c)throw Error("None of the extension offers can be accepted");return b.serverNoContextTakeover&&(c.server_no_context_takeover=!0),b.clientNoContextTakeover&&(c.client_no_context_takeover=!0),"number"==typeof b.serverMaxWindowBits&&(c.server_max_window_bits=b.serverMaxWindowBits),"number"==typeof b.clientMaxWindowBits?c.client_max_window_bits=b.clientMaxWindowBits:(!0===c.client_max_window_bits||!1===b.clientMaxWindowBits)&&delete c.client_max_window_bits,c}acceptAsClient(a){let b=a[0];if(!1===this._options.clientNoContextTakeover&&b.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(b.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&b.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(b.client_max_window_bits=this._options.clientMaxWindowBits);return b}normalizeParams(a){return a.forEach(a=>{Object.keys(a).forEach(b=>{let c=a[b];if(c.length>1)throw Error(`Parameter "${b}" must have only a single value`);if(c=c[0],"client_max_window_bits"===b){if(!0!==c){let a=+c;if(!Number.isInteger(a)||a<8||a>15)throw TypeError(`Invalid value for parameter "${b}": ${c}`);c=a}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${b}": ${c}`)}else if("server_max_window_bits"===b){let a=+c;if(!Number.isInteger(a)||a<8||a>15)throw TypeError(`Invalid value for parameter "${b}": ${c}`);c=a}else if("client_no_context_takeover"===b||"server_no_context_takeover"===b){if(!0!==c)throw TypeError(`Invalid value for parameter "${b}": ${c}`)}else throw Error(`Unknown parameter "${b}"`);a[b]=c})}),a}decompress(a,b,c){d.add(d=>{this._decompress(a,b,(a,b)=>{d(),c(a,b)})})}compress(a,b,c){d.add(d=>{this._compress(a,b,(a,b)=>{d(),c(a,b)})})}_decompress(a,b,c){let d=this._isServer?"client":"server";if(!this._inflate){let a=`${d}_max_window_bits`,b="number"!=typeof this.params[a]?e.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=e.createInflateRaw({...this._options.zlibInflateOptions,windowBits:b}),this._inflate[k]=this,this._inflate[l]=0,this._inflate[n]=[],this._inflate.on("error",s),this._inflate.on("data",r)}this._inflate[m]=c,this._inflate.write(a),b&&this._inflate.write(j),this._inflate.flush(()=>{let a=this._inflate[o];if(a){this._inflate.close(),this._inflate=null,c(a);return}let e=f.concat(this._inflate[n],this._inflate[l]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[l]=0,this._inflate[n]=[],b&&this.params[`${d}_no_context_takeover`]&&this._inflate.reset()),c(null,e)})}_compress(a,b,c){let d=this._isServer?"server":"client";if(!this._deflate){let a=`${d}_max_window_bits`,b="number"!=typeof this.params[a]?e.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=e.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:b}),this._deflate[l]=0,this._deflate[n]=[],this._deflate.on("data",q)}this._deflate[m]=c,this._deflate.write(a),this._deflate.flush(e.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=f.concat(this._deflate[n],this._deflate[l]);b&&(a=new i(a.buffer,a.byteOffset,a.length-4)),this._deflate[m]=null,this._deflate[l]=0,this._deflate[n]=[],b&&this.params[`${d}_no_context_takeover`]&&this._deflate.reset(),c(null,a)})}}function q(a){this[n].push(a),this[l]+=a.length}function r(a){if(this[l]+=a.length,this[k]._maxPayload<1||this[l]<=this[k]._maxPayload)return void this[n].push(a);this[o]=RangeError("Max payload size exceeded"),this[o].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[o][h]=1009,this.removeListener("data",r),this.reset()}function s(a){if(this[k]._inflate=null,this[o])return void this[m](this[o]);a[h]=1007,this[m](a)}a.exports=p},11998:(a,b,c)=>{let{isUtf8:d}=c(79428),{hasBlob:e}=c(27768);function f(a){let b=a.length,c=0;for(;c<b;)if((128&a[c])==0)c++;else if((224&a[c])==192){if(c+1===b||(192&a[c+1])!=128||(254&a[c])==192)return!1;c+=2}else if((240&a[c])==224){if(c+2>=b||(192&a[c+1])!=128||(192&a[c+2])!=128||224===a[c]&&(224&a[c+1])==128||237===a[c]&&(224&a[c+1])==160)return!1;c+=3}else{if((248&a[c])!=240||c+3>=b||(192&a[c+1])!=128||(192&a[c+2])!=128||(192&a[c+3])!=128||240===a[c]&&(240&a[c+1])==128||244===a[c]&&a[c+1]>143||a[c]>244)return!1;c+=4}return!0}if(a.exports={isBlob:function(a){return e&&"object"==typeof a&&"function"==typeof a.arrayBuffer&&"string"==typeof a.type&&"function"==typeof a.stream&&("Blob"===a[Symbol.toStringTag]||"File"===a[Symbol.toStringTag])},isValidStatusCode:function(a){return a>=1e3&&a<=1014&&1004!==a&&1005!==a&&1006!==a||a>=3e3&&a<=4999},isValidUTF8:f,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]},d)a.exports.isValidUTF8=function(a){return a.length<24?f(a):d(a)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let b=c(47990);a.exports.isValidUTF8=function(a){return a.length<32?f(a):b(a)}}catch(a){}},25967:(a,b,c)=>{let{tokenChars:d}=c(11998);a.exports={parse:function(a){let b=new Set,c=-1,e=-1,f=0;for(;f<a.length;f++){let g=a.charCodeAt(f);if(-1===e&&1===d[g])-1===c&&(c=f);else if(0!==f&&(32===g||9===g))-1===e&&-1!==c&&(e=f);else if(44===g){if(-1===c)throw SyntaxError(`Unexpected character at index ${f}`);-1===e&&(e=f);let d=a.slice(c,e);if(b.has(d))throw SyntaxError(`The "${d}" subprotocol is duplicated`);b.add(d),c=e=-1}else throw SyntaxError(`Unexpected character at index ${f}`)}if(-1===c||-1!==e)throw SyntaxError("Unexpected end of input");let g=a.slice(c,f);if(b.has(g))throw SyntaxError(`The "${g}" subprotocol is duplicated`);return b.add(g),b}}},27768:a=>{let b=["nodebuffer","arraybuffer","fragments"],c="undefined"!=typeof Blob;c&&b.push("blob"),a.exports={BINARY_TYPES:b,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:c,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},47109:a=>{let b=Symbol("kDone"),c=Symbol("kRun");class d{constructor(a){this[b]=()=>{this.pending--,this[c]()},this.concurrency=a||1/0,this.jobs=[],this.pending=0}add(a){this.jobs.push(a),this[c]()}[c](){if(this.pending!==this.concurrency&&this.jobs.length){let a=this.jobs.shift();this.pending++,a(this[b])}}}a.exports=d},64188:(a,b,c)=>{let d,{Duplex:e}=c(27910),{randomFillSync:f}=c(55511),g=c(6597),{EMPTY_BUFFER:h,kWebSocket:i,NOOP:j}=c(27768),{isBlob:k,isValidStatusCode:l}=c(11998),{mask:m,toBuffer:n}=c(94100),o=Symbol("kByteLength"),p=Buffer.alloc(4),q=8192;class r{constructor(a,b,c){this._extensions=b||{},c&&(this._generateMask=c,this._maskBuffer=Buffer.alloc(4)),this._socket=a,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=j,this[i]=void 0}static frame(a,b){let c,e,g=!1,h=2,i=!1;b.mask&&(c=b.maskBuffer||p,b.generateMask?b.generateMask(c):(8192===q&&(void 0===d&&(d=Buffer.alloc(8192)),f(d,0,8192),q=0),c[0]=d[q++],c[1]=d[q++],c[2]=d[q++],c[3]=d[q++]),i=(c[0]|c[1]|c[2]|c[3])==0,h=6),"string"==typeof a?e=(!b.mask||i)&&void 0!==b[o]?b[o]:(a=Buffer.from(a)).length:(e=a.length,g=b.mask&&b.readOnly&&!i);let j=e;e>=65536?(h+=8,j=127):e>125&&(h+=2,j=126);let k=Buffer.allocUnsafe(g?e+h:h);return(k[0]=b.fin?128|b.opcode:b.opcode,b.rsv1&&(k[0]|=64),k[1]=j,126===j?k.writeUInt16BE(e,2):127===j&&(k[2]=k[3]=0,k.writeUIntBE(e,4,6)),b.mask)?(k[1]|=128,k[h-4]=c[0],k[h-3]=c[1],k[h-2]=c[2],k[h-1]=c[3],i)?[k,a]:g?(m(a,c,k,h,e),[k]):(m(a,c,a,0,e),[k,a]):[k,a]}close(a,b,c,d){let e;if(void 0===a)e=h;else if("number"==typeof a&&l(a))if(void 0!==b&&b.length){let c=Buffer.byteLength(b);if(c>123)throw RangeError("The message must not be greater than 123 bytes");(e=Buffer.allocUnsafe(2+c)).writeUInt16BE(a,0),"string"==typeof b?e.write(b,2):e.set(b,2)}else(e=Buffer.allocUnsafe(2)).writeUInt16BE(a,0);else throw TypeError("First argument must be a valid error code number");let f={[o]:e.length,fin:!0,generateMask:this._generateMask,mask:c,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,e,!1,f,d]):this.sendFrame(r.frame(e,f),d)}ping(a,b,c){let d,e;if("string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),d>125)throw RangeError("The data size must not be greater than 125 bytes");let f={[o]:d,fin:!0,generateMask:this._generateMask,mask:b,maskBuffer:this._maskBuffer,opcode:9,readOnly:e,rsv1:!1};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,!1,f,c]):this.getBlobData(a,!1,f,c):0!==this._state?this.enqueue([this.dispatch,a,!1,f,c]):this.sendFrame(r.frame(a,f),c)}pong(a,b,c){let d,e;if("string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),d>125)throw RangeError("The data size must not be greater than 125 bytes");let f={[o]:d,fin:!0,generateMask:this._generateMask,mask:b,maskBuffer:this._maskBuffer,opcode:10,readOnly:e,rsv1:!1};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,!1,f,c]):this.getBlobData(a,!1,f,c):0!==this._state?this.enqueue([this.dispatch,a,!1,f,c]):this.sendFrame(r.frame(a,f),c)}send(a,b,c){let d,e,f=this._extensions[g.extensionName],h=b.binary?2:1,i=b.compress;"string"==typeof a?(d=Buffer.byteLength(a),e=!1):k(a)?(d=a.size,e=!1):(d=(a=n(a)).length,e=n.readOnly),this._firstFragment?(this._firstFragment=!1,i&&f&&f.params[f._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(i=d>=f._threshold),this._compress=i):(i=!1,h=0),b.fin&&(this._firstFragment=!0);let j={[o]:d,fin:b.fin,generateMask:this._generateMask,mask:b.mask,maskBuffer:this._maskBuffer,opcode:h,readOnly:e,rsv1:i};k(a)?0!==this._state?this.enqueue([this.getBlobData,a,this._compress,j,c]):this.getBlobData(a,this._compress,j,c):0!==this._state?this.enqueue([this.dispatch,a,this._compress,j,c]):this.dispatch(a,this._compress,j,c)}getBlobData(a,b,c,d){this._bufferedBytes+=c[o],this._state=2,a.arrayBuffer().then(a=>{if(this._socket.destroyed){let a=Error("The socket was closed while the blob was being read");process.nextTick(s,this,a,d);return}this._bufferedBytes-=c[o];let e=n(a);b?this.dispatch(e,b,c,d):(this._state=0,this.sendFrame(r.frame(e,c),d),this.dequeue())}).catch(a=>{process.nextTick(t,this,a,d)})}dispatch(a,b,c,d){if(!b)return void this.sendFrame(r.frame(a,c),d);let e=this._extensions[g.extensionName];this._bufferedBytes+=c[o],this._state=1,e.compress(a,c.fin,(a,b)=>{if(this._socket.destroyed)return void s(this,Error("The socket was closed while data was being compressed"),d);this._bufferedBytes-=c[o],this._state=0,c.readOnly=!1,this.sendFrame(r.frame(b,c),d),this.dequeue()})}dequeue(){for(;0===this._state&&this._queue.length;){let a=this._queue.shift();this._bufferedBytes-=a[3][o],Reflect.apply(a[0],this,a.slice(1))}}enqueue(a){this._bufferedBytes+=a[3][o],this._queue.push(a)}sendFrame(a,b){2===a.length?(this._socket.cork(),this._socket.write(a[0]),this._socket.write(a[1],b),this._socket.uncork()):this._socket.write(a[0],b)}}function s(a,b,c){"function"==typeof c&&c(b);for(let c=0;c<a._queue.length;c++){let d=a._queue[c],e=d[d.length-1];"function"==typeof e&&e(b)}}function t(a,b,c){s(a,b,c),a.onerror(b)}a.exports=r},77536:(a,b,c)=>{let d=c(94735),e=c(81630),{Duplex:f}=c(27910),{createHash:g}=c(55511),h=c(2400),i=c(6597),j=c(25967),k=c(3266),{CLOSE_TIMEOUT:l,GUID:m,kWebSocket:n}=c(27768),o=/^[+/0-9A-Za-z]{22}==$/;class p extends d{constructor(a,b){if(super(),null==(a={allowSynchronousEvents:!0,autoPong:!0,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:l,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:k,...a}).port&&!a.server&&!a.noServer||null!=a.port&&(a.server||a.noServer)||a.server&&a.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=a.port?(this._server=e.createServer((a,b)=>{let c=e.STATUS_CODES[426];b.writeHead(426,{"Content-Length":c.length,"Content-Type":"text/plain"}),b.end(c)}),this._server.listen(a.port,a.host,a.backlog,b)):a.server&&(this._server=a.server),this._server){let a=this.emit.bind(this,"connection");this._removeListeners=function(a,b){for(let c of Object.keys(b))a.on(c,b[c]);return function(){for(let c of Object.keys(b))a.removeListener(c,b[c])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(b,c,d)=>{this.handleUpgrade(b,c,d,a)}})}!0===a.perMessageDeflate&&(a.perMessageDeflate={}),a.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=a,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(a){if(2===this._state){a&&this.once("close",()=>{a(Error("The server is not running"))}),process.nextTick(q,this);return}if(a&&this.once("close",a),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(q,this);else{let a=this._server;this._removeListeners(),this._removeListeners=this._server=null,a.close(()=>{q(this)})}}shouldHandle(a){if(this.options.path){let b=a.url.indexOf("?");if((-1!==b?a.url.slice(0,b):a.url)!==this.options.path)return!1}return!0}handleUpgrade(a,b,c,d){b.on("error",r);let e=a.headers["sec-websocket-key"],f=a.headers.upgrade,g=+a.headers["sec-websocket-version"];if("GET"!==a.method)return void t(this,a,b,405,"Invalid HTTP method");if(void 0===f||"websocket"!==f.toLowerCase())return void t(this,a,b,400,"Invalid Upgrade header");if(void 0===e||!o.test(e))return void t(this,a,b,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==g&&8!==g)return void t(this,a,b,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(a))return void s(b,400);let k=a.headers["sec-websocket-protocol"],l=new Set;if(void 0!==k)try{l=j.parse(k)}catch(c){t(this,a,b,400,"Invalid Sec-WebSocket-Protocol header");return}let m=a.headers["sec-websocket-extensions"],n={};if(this.options.perMessageDeflate&&void 0!==m){let c=new i(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let a=h.parse(m);a[i.extensionName]&&(c.accept(a[i.extensionName]),n[i.extensionName]=c)}catch(c){t(this,a,b,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let f={origin:a.headers[`${8===g?"sec-websocket-origin":"origin"}`],secure:!!(a.socket.authorized||a.socket.encrypted),req:a};if(2===this.options.verifyClient.length)return void this.options.verifyClient(f,(f,g,h,i)=>{if(!f)return s(b,g||401,h,i);this.completeUpgrade(n,e,l,a,b,c,d)});if(!this.options.verifyClient(f))return s(b,401)}this.completeUpgrade(n,e,l,a,b,c,d)}completeUpgrade(a,b,c,d,e,f,j){if(!e.readable||!e.writable)return e.destroy();if(e[n])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return s(e,503);let k=g("sha1").update(b+m).digest("base64"),l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${k}`],o=new this.options.WebSocket(null,void 0,this.options);if(c.size){let a=this.options.handleProtocols?this.options.handleProtocols(c,d):c.values().next().value;a&&(l.push(`Sec-WebSocket-Protocol: ${a}`),o._protocol=a)}if(a[i.extensionName]){let b=a[i.extensionName].params,c=h.format({[i.extensionName]:[b]});l.push(`Sec-WebSocket-Extensions: ${c}`),o._extensions=a}this.emit("headers",l,d),e.write(l.concat("\r\n").join("\r\n")),e.removeListener("error",r),o.setSocket(e,f,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(o),o.on("close",()=>{this.clients.delete(o),this._shouldEmitClose&&!this.clients.size&&process.nextTick(q,this)})),j(o,d)}}function q(a){a._state=2,a.emit("close")}function r(){this.destroy()}function s(a,b,c,d){c=c||e.STATUS_CODES[b],d={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(c),...d},a.once("finish",a.destroy),a.end(`HTTP/1.1 ${b} ${e.STATUS_CODES[b]}\r
2
- `+Object.keys(d).map(a=>`${a}: ${d[a]}`).join("\r\n")+"\r\n\r\n"+c)}function t(a,b,c,d,e,f){if(a.listenerCount("wsClientError")){let d=Error(e);Error.captureStackTrace(d,t),a.emit("wsClientError",d,c,b)}else s(c,d,e,f)}a.exports=p},81503:(a,b,c)=>{c.d(b,{kb:()=>d}),c(91909),c(94740),c(64188);var d=c(3266);c(77536)},91909:(a,b,c)=>{c(3266);let{Duplex:d}=c(27910);function e(a){a.emit("close")}function f(){!this.destroyed&&this._writableState.finished&&this.destroy()}function g(a){this.removeListener("error",g),this.destroy(),0===this.listenerCount("error")&&this.emit("error",a)}a.exports=function(a,b){let c=!0,h=new d({...b,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return a.on("message",function(b,c){let d=!c&&h._readableState.objectMode?b.toString():b;h.push(d)||a.pause()}),a.once("error",function(a){h.destroyed||(c=!1,h.destroy(a))}),a.once("close",function(){h.destroyed||h.push(null)}),h._destroy=function(b,d){if(a.readyState===a.CLOSED){d(b),process.nextTick(e,h);return}let f=!1;a.once("error",function(a){f=!0,d(a)}),a.once("close",function(){f||d(b),process.nextTick(e,h)}),c&&a.terminate()},h._final=function(b){if(a.readyState===a.CONNECTING)return void a.once("open",function(){h._final(b)});null!==a._socket&&(a._socket._writableState.finished?(b(),h._readableState.endEmitted&&h.destroy()):(a._socket.once("finish",function(){b()}),a.close()))},h._read=function(){a.isPaused&&a.resume()},h._write=function(b,c,d){if(a.readyState===a.CONNECTING)return void a.once("open",function(){h._write(b,c,d)});a.send(b,d)},h.on("end",f),h.on("error",g),h}},92095:(a,b,c)=>{let{kForOnEventAttribute:d,kListener:e}=c(27768),f=Symbol("kCode"),g=Symbol("kData"),h=Symbol("kError"),i=Symbol("kMessage"),j=Symbol("kReason"),k=Symbol("kTarget"),l=Symbol("kType"),m=Symbol("kWasClean");class n{constructor(a){this[k]=null,this[l]=a}get target(){return this[k]}get type(){return this[l]}}Object.defineProperty(n.prototype,"target",{enumerable:!0}),Object.defineProperty(n.prototype,"type",{enumerable:!0});class o extends n{constructor(a,b={}){super(a),this[f]=void 0===b.code?0:b.code,this[j]=void 0===b.reason?"":b.reason,this[m]=void 0!==b.wasClean&&b.wasClean}get code(){return this[f]}get reason(){return this[j]}get wasClean(){return this[m]}}Object.defineProperty(o.prototype,"code",{enumerable:!0}),Object.defineProperty(o.prototype,"reason",{enumerable:!0}),Object.defineProperty(o.prototype,"wasClean",{enumerable:!0});class p extends n{constructor(a,b={}){super(a),this[h]=void 0===b.error?null:b.error,this[i]=void 0===b.message?"":b.message}get error(){return this[h]}get message(){return this[i]}}Object.defineProperty(p.prototype,"error",{enumerable:!0}),Object.defineProperty(p.prototype,"message",{enumerable:!0});class q extends n{constructor(a,b={}){super(a),this[g]=void 0===b.data?null:b.data}get data(){return this[g]}}function r(a,b,c){"object"==typeof a&&a.handleEvent?a.handleEvent.call(a,c):a.call(b,c)}Object.defineProperty(q.prototype,"data",{enumerable:!0}),a.exports={CloseEvent:o,ErrorEvent:p,Event:n,EventTarget:{addEventListener(a,b,c={}){let f;for(let f of this.listeners(a))if(!c[d]&&f[e]===b&&!f[d])return;if("message"===a)f=function(a,c){let d=new q("message",{data:c?a:a.toString()});d[k]=this,r(b,this,d)};else if("close"===a)f=function(a,c){let d=new o("close",{code:a,reason:c.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});d[k]=this,r(b,this,d)};else if("error"===a)f=function(a){let c=new p("error",{error:a,message:a.message});c[k]=this,r(b,this,c)};else{if("open"!==a)return;f=function(){let a=new n("open");a[k]=this,r(b,this,a)}}f[d]=!!c[d],f[e]=b,c.once?this.once(a,f):this.on(a,f)},removeEventListener(a,b){for(let c of this.listeners(a))if(c[e]===b&&!c[d]){this.removeListener(a,c);break}}},MessageEvent:q}},94100:(a,b,c)=>{let{EMPTY_BUFFER:d}=c(27768),e=Buffer[Symbol.species];function f(a,b,c,d,e){for(let f=0;f<e;f++)c[d+f]=a[f]^b[3&f]}function g(a,b){for(let c=0;c<a.length;c++)a[c]^=b[3&c]}function h(a){let b;return(h.readOnly=!0,Buffer.isBuffer(a))?a:(a instanceof ArrayBuffer?b=new e(a):ArrayBuffer.isView(a)?b=new e(a.buffer,a.byteOffset,a.byteLength):(b=Buffer.from(a),h.readOnly=!1),b)}if(a.exports={concat:function(a,b){if(0===a.length)return d;if(1===a.length)return a[0];let c=Buffer.allocUnsafe(b),f=0;for(let b=0;b<a.length;b++){let d=a[b];c.set(d,f),f+=d.length}return f<b?new e(c.buffer,c.byteOffset,f):c},mask:f,toArrayBuffer:function(a){return a.length===a.buffer.byteLength?a.buffer:a.buffer.slice(a.byteOffset,a.byteOffset+a.length)},toBuffer:h,unmask:g},!process.env.WS_NO_BUFFER_UTIL)try{let b=c(39727);a.exports.mask=function(a,c,d,e,g){g<48?f(a,c,d,e,g):b.mask(a,c,d,e,g)},a.exports.unmask=function(a,c){a.length<32?g(a,c):b.unmask(a,c)}}catch(a){}},94740:(a,b,c)=>{let{Writable:d}=c(27910),e=c(6597),{BINARY_TYPES:f,EMPTY_BUFFER:g,kStatusCode:h,kWebSocket:i}=c(27768),{concat:j,toArrayBuffer:k,unmask:l}=c(94100),{isValidStatusCode:m,isValidUTF8:n}=c(11998),o=Buffer[Symbol.species];class p extends d{constructor(a={}){super(),this._allowSynchronousEvents=void 0===a.allowSynchronousEvents||a.allowSynchronousEvents,this._binaryType=a.binaryType||f[0],this._extensions=a.extensions||{},this._isServer=!!a.isServer,this._maxPayload=0|a.maxPayload,this._skipUTF8Validation=!!a.skipUTF8Validation,this[i]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(a,b,c){if(8===this._opcode&&0==this._state)return c();this._bufferedBytes+=a.length,this._buffers.push(a),this.startLoop(c)}consume(a){if(this._bufferedBytes-=a,a===this._buffers[0].length)return this._buffers.shift();if(a<this._buffers[0].length){let b=this._buffers[0];return this._buffers[0]=new o(b.buffer,b.byteOffset+a,b.length-a),new o(b.buffer,b.byteOffset,a)}let b=Buffer.allocUnsafe(a);do{let c=this._buffers[0],d=b.length-a;a>=c.length?b.set(this._buffers.shift(),d):(b.set(new Uint8Array(c.buffer,c.byteOffset,a),d),this._buffers[0]=new o(c.buffer,c.byteOffset+a,c.length-a)),a-=c.length}while(a>0);return b}startLoop(a){this._loop=!0;do switch(this._state){case 0:this.getInfo(a);break;case 1:this.getPayloadLength16(a);break;case 2:this.getPayloadLength64(a);break;case 3:this.getMask();break;case 4:this.getData(a);break;case 5:case 6:this._loop=!1;return}while(this._loop);this._errored||a()}getInfo(a){if(this._bufferedBytes<2){this._loop=!1;return}let b=this.consume(2);if((48&b[0])!=0)return void a(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let c=(64&b[0])==64;if(c&&!this._extensions[e.extensionName])return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&b[0])==128,this._opcode=15&b[0],this._payloadLength=127&b[1],0===this._opcode){if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void a(this.createError(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 void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=c}else{if(!(this._opcode>7)||!(this._opcode<11))return void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void a(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void a(this.createError(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&b[1])==128,this._isServer){if(!this._masked)return void a(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void a(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(a)}getPayloadLength16(a){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(a)}getPayloadLength64(a){if(this._bufferedBytes<8){this._loop=!1;return}let b=this.consume(8),c=b.readUInt32BE(0);if(c>2097151)return void a(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"));this._payloadLength=0x100000000*c+b.readUInt32BE(4),this.haveLength(a)}haveLength(a){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return void a(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(a){let b=g;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}b=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&l(b,this._mask)}if(this._opcode>7)return void this.controlMessage(b,a);if(this._compressed){this._state=5,this.decompress(b,a);return}b.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(b)),this.dataMessage(a)}decompress(a,b){this._extensions[e.extensionName].decompress(a,this._fin,(a,c)=>{if(a)return b(a);if(c.length){if(this._messageLength+=c.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void b(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(c)}this.dataMessage(b),0===this._state&&this.startLoop(b)})}dataMessage(a){if(!this._fin){this._state=0;return}let b=this._messageLength,c=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let d;d="nodebuffer"===this._binaryType?j(c,b):"arraybuffer"===this._binaryType?k(j(c,b)):"blob"===this._binaryType?new Blob(c):c,this._allowSynchronousEvents?(this.emit("message",d,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!0),this._state=0,this.startLoop(a)}))}else{let d=j(c,b);if(!this._skipUTF8Validation&&!n(d))return void a(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));5===this._state||this._allowSynchronousEvents?(this.emit("message",d,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!1),this._state=0,this.startLoop(a)}))}}controlMessage(a,b){if(8===this._opcode){if(0===a.length)this._loop=!1,this.emit("conclude",1005,g),this.end();else{let c=a.readUInt16BE(0);if(!m(c))return void b(this.createError(RangeError,`invalid status code ${c}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let d=new o(a.buffer,a.byteOffset+2,a.length-2);if(!this._skipUTF8Validation&&!n(d))return void b(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",c,d),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",a),this._state=0):(this._state=6,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",a),this._state=0,this.startLoop(b)}))}createError(a,b,c,d,e){this._loop=!1,this._errored=!0;let f=new a(c?`Invalid WebSocket frame: ${b}`:b);return Error.captureStackTrace(f,this.createError),f.code=e,f[h]=d,f}}a.exports=p}};
2
+ `+Object.keys(d).map(a=>`${a}: ${d[a]}`).join("\r\n")+"\r\n\r\n"+c)}function t(a,b,c,d,e,f){if(a.listenerCount("wsClientError")){let d=Error(e);Error.captureStackTrace(d,t),a.emit("wsClientError",d,c,b)}else s(c,d,e,f)}a.exports=p},81503:(a,b,c)=>{c.d(b,{kb:()=>d,zu:()=>e}),c(91909),c(94740),c(64188);var d=c(3266),e=c(77536)},91909:(a,b,c)=>{c(3266);let{Duplex:d}=c(27910);function e(a){a.emit("close")}function f(){!this.destroyed&&this._writableState.finished&&this.destroy()}function g(a){this.removeListener("error",g),this.destroy(),0===this.listenerCount("error")&&this.emit("error",a)}a.exports=function(a,b){let c=!0,h=new d({...b,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return a.on("message",function(b,c){let d=!c&&h._readableState.objectMode?b.toString():b;h.push(d)||a.pause()}),a.once("error",function(a){h.destroyed||(c=!1,h.destroy(a))}),a.once("close",function(){h.destroyed||h.push(null)}),h._destroy=function(b,d){if(a.readyState===a.CLOSED){d(b),process.nextTick(e,h);return}let f=!1;a.once("error",function(a){f=!0,d(a)}),a.once("close",function(){f||d(b),process.nextTick(e,h)}),c&&a.terminate()},h._final=function(b){if(a.readyState===a.CONNECTING)return void a.once("open",function(){h._final(b)});null!==a._socket&&(a._socket._writableState.finished?(b(),h._readableState.endEmitted&&h.destroy()):(a._socket.once("finish",function(){b()}),a.close()))},h._read=function(){a.isPaused&&a.resume()},h._write=function(b,c,d){if(a.readyState===a.CONNECTING)return void a.once("open",function(){h._write(b,c,d)});a.send(b,d)},h.on("end",f),h.on("error",g),h}},92095:(a,b,c)=>{let{kForOnEventAttribute:d,kListener:e}=c(27768),f=Symbol("kCode"),g=Symbol("kData"),h=Symbol("kError"),i=Symbol("kMessage"),j=Symbol("kReason"),k=Symbol("kTarget"),l=Symbol("kType"),m=Symbol("kWasClean");class n{constructor(a){this[k]=null,this[l]=a}get target(){return this[k]}get type(){return this[l]}}Object.defineProperty(n.prototype,"target",{enumerable:!0}),Object.defineProperty(n.prototype,"type",{enumerable:!0});class o extends n{constructor(a,b={}){super(a),this[f]=void 0===b.code?0:b.code,this[j]=void 0===b.reason?"":b.reason,this[m]=void 0!==b.wasClean&&b.wasClean}get code(){return this[f]}get reason(){return this[j]}get wasClean(){return this[m]}}Object.defineProperty(o.prototype,"code",{enumerable:!0}),Object.defineProperty(o.prototype,"reason",{enumerable:!0}),Object.defineProperty(o.prototype,"wasClean",{enumerable:!0});class p extends n{constructor(a,b={}){super(a),this[h]=void 0===b.error?null:b.error,this[i]=void 0===b.message?"":b.message}get error(){return this[h]}get message(){return this[i]}}Object.defineProperty(p.prototype,"error",{enumerable:!0}),Object.defineProperty(p.prototype,"message",{enumerable:!0});class q extends n{constructor(a,b={}){super(a),this[g]=void 0===b.data?null:b.data}get data(){return this[g]}}function r(a,b,c){"object"==typeof a&&a.handleEvent?a.handleEvent.call(a,c):a.call(b,c)}Object.defineProperty(q.prototype,"data",{enumerable:!0}),a.exports={CloseEvent:o,ErrorEvent:p,Event:n,EventTarget:{addEventListener(a,b,c={}){let f;for(let f of this.listeners(a))if(!c[d]&&f[e]===b&&!f[d])return;if("message"===a)f=function(a,c){let d=new q("message",{data:c?a:a.toString()});d[k]=this,r(b,this,d)};else if("close"===a)f=function(a,c){let d=new o("close",{code:a,reason:c.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});d[k]=this,r(b,this,d)};else if("error"===a)f=function(a){let c=new p("error",{error:a,message:a.message});c[k]=this,r(b,this,c)};else{if("open"!==a)return;f=function(){let a=new n("open");a[k]=this,r(b,this,a)}}f[d]=!!c[d],f[e]=b,c.once?this.once(a,f):this.on(a,f)},removeEventListener(a,b){for(let c of this.listeners(a))if(c[e]===b&&!c[d]){this.removeListener(a,c);break}}},MessageEvent:q}},94100:(a,b,c)=>{let{EMPTY_BUFFER:d}=c(27768),e=Buffer[Symbol.species];function f(a,b,c,d,e){for(let f=0;f<e;f++)c[d+f]=a[f]^b[3&f]}function g(a,b){for(let c=0;c<a.length;c++)a[c]^=b[3&c]}function h(a){let b;return(h.readOnly=!0,Buffer.isBuffer(a))?a:(a instanceof ArrayBuffer?b=new e(a):ArrayBuffer.isView(a)?b=new e(a.buffer,a.byteOffset,a.byteLength):(b=Buffer.from(a),h.readOnly=!1),b)}if(a.exports={concat:function(a,b){if(0===a.length)return d;if(1===a.length)return a[0];let c=Buffer.allocUnsafe(b),f=0;for(let b=0;b<a.length;b++){let d=a[b];c.set(d,f),f+=d.length}return f<b?new e(c.buffer,c.byteOffset,f):c},mask:f,toArrayBuffer:function(a){return a.length===a.buffer.byteLength?a.buffer:a.buffer.slice(a.byteOffset,a.byteOffset+a.length)},toBuffer:h,unmask:g},!process.env.WS_NO_BUFFER_UTIL)try{let b=c(39727);a.exports.mask=function(a,c,d,e,g){g<48?f(a,c,d,e,g):b.mask(a,c,d,e,g)},a.exports.unmask=function(a,c){a.length<32?g(a,c):b.unmask(a,c)}}catch(a){}},94740:(a,b,c)=>{let{Writable:d}=c(27910),e=c(6597),{BINARY_TYPES:f,EMPTY_BUFFER:g,kStatusCode:h,kWebSocket:i}=c(27768),{concat:j,toArrayBuffer:k,unmask:l}=c(94100),{isValidStatusCode:m,isValidUTF8:n}=c(11998),o=Buffer[Symbol.species];class p extends d{constructor(a={}){super(),this._allowSynchronousEvents=void 0===a.allowSynchronousEvents||a.allowSynchronousEvents,this._binaryType=a.binaryType||f[0],this._extensions=a.extensions||{},this._isServer=!!a.isServer,this._maxPayload=0|a.maxPayload,this._skipUTF8Validation=!!a.skipUTF8Validation,this[i]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(a,b,c){if(8===this._opcode&&0==this._state)return c();this._bufferedBytes+=a.length,this._buffers.push(a),this.startLoop(c)}consume(a){if(this._bufferedBytes-=a,a===this._buffers[0].length)return this._buffers.shift();if(a<this._buffers[0].length){let b=this._buffers[0];return this._buffers[0]=new o(b.buffer,b.byteOffset+a,b.length-a),new o(b.buffer,b.byteOffset,a)}let b=Buffer.allocUnsafe(a);do{let c=this._buffers[0],d=b.length-a;a>=c.length?b.set(this._buffers.shift(),d):(b.set(new Uint8Array(c.buffer,c.byteOffset,a),d),this._buffers[0]=new o(c.buffer,c.byteOffset+a,c.length-a)),a-=c.length}while(a>0);return b}startLoop(a){this._loop=!0;do switch(this._state){case 0:this.getInfo(a);break;case 1:this.getPayloadLength16(a);break;case 2:this.getPayloadLength64(a);break;case 3:this.getMask();break;case 4:this.getData(a);break;case 5:case 6:this._loop=!1;return}while(this._loop);this._errored||a()}getInfo(a){if(this._bufferedBytes<2){this._loop=!1;return}let b=this.consume(2);if((48&b[0])!=0)return void a(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let c=(64&b[0])==64;if(c&&!this._extensions[e.extensionName])return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&b[0])==128,this._opcode=15&b[0],this._payloadLength=127&b[1],0===this._opcode){if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void a(this.createError(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 void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=c}else{if(!(this._opcode>7)||!(this._opcode<11))return void a(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void a(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(c)return void a(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void a(this.createError(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&b[1])==128,this._isServer){if(!this._masked)return void a(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void a(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(a)}getPayloadLength16(a){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(a)}getPayloadLength64(a){if(this._bufferedBytes<8){this._loop=!1;return}let b=this.consume(8),c=b.readUInt32BE(0);if(c>2097151)return void a(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"));this._payloadLength=0x100000000*c+b.readUInt32BE(4),this.haveLength(a)}haveLength(a){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return void a(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(a){let b=g;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}b=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&l(b,this._mask)}if(this._opcode>7)return void this.controlMessage(b,a);if(this._compressed){this._state=5,this.decompress(b,a);return}b.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(b)),this.dataMessage(a)}decompress(a,b){this._extensions[e.extensionName].decompress(a,this._fin,(a,c)=>{if(a)return b(a);if(c.length){if(this._messageLength+=c.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void b(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(c)}this.dataMessage(b),0===this._state&&this.startLoop(b)})}dataMessage(a){if(!this._fin){this._state=0;return}let b=this._messageLength,c=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let d;d="nodebuffer"===this._binaryType?j(c,b):"arraybuffer"===this._binaryType?k(j(c,b)):"blob"===this._binaryType?new Blob(c):c,this._allowSynchronousEvents?(this.emit("message",d,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!0),this._state=0,this.startLoop(a)}))}else{let d=j(c,b);if(!this._skipUTF8Validation&&!n(d))return void a(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));5===this._state||this._allowSynchronousEvents?(this.emit("message",d,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",d,!1),this._state=0,this.startLoop(a)}))}}controlMessage(a,b){if(8===this._opcode){if(0===a.length)this._loop=!1,this.emit("conclude",1005,g),this.end();else{let c=a.readUInt16BE(0);if(!m(c))return void b(this.createError(RangeError,`invalid status code ${c}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let d=new o(a.buffer,a.byteOffset+2,a.length-2);if(!this._skipUTF8Validation&&!n(d))return void b(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",c,d),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",a),this._state=0):(this._state=6,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",a),this._state=0,this.startLoop(b)}))}createError(a,b,c,d,e){this._loop=!1,this._errored=!0;let f=new a(c?`Invalid WebSocket frame: ${b}`:b);return Error.captureStackTrace(f,this.createError),f.code=e,f[h]=d,f}}a.exports=p}};
@@ -0,0 +1,4 @@
1
+ exports.id=1598,exports.ids=[1598],exports.modules={3421:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(71237),e=c(55088),f=c(17679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},3465:(a,b,c)=>{"use strict";let d=c(26699),e=c(47734).a,f=c(56840).Buffer;function g(a,b){if(e.call(this,b),!f.isBuffer(a))return void this.error("Input not Buffer");this.base=a,this.offset=0,this.length=a.length}function h(a,b){if(Array.isArray(a))this.length=0,this.value=a.map(function(a){return h.isEncoderBuffer(a)||(a=new h(a,b)),this.length+=a.length,a},this);else if("number"==typeof a){if(!(0<=a&&a<=255))return b.error("non-byte EncoderBuffer value");this.value=a,this.length=1}else if("string"==typeof a)this.value=a,this.length=f.byteLength(a);else{if(!f.isBuffer(a))return b.error("Unsupported type: "+typeof a);this.value=a,this.length=a.length}}d(g,e),b.t=g,g.isDecoderBuffer=function(a){return a instanceof g||"object"==typeof a&&f.isBuffer(a.base)&&"DecoderBuffer"===a.constructor.name&&"number"==typeof a.offset&&"number"==typeof a.length&&"function"==typeof a.save&&"function"==typeof a.restore&&"function"==typeof a.isEmpty&&"function"==typeof a.readUInt8&&"function"==typeof a.skip&&"function"==typeof a.raw},g.prototype.save=function(){return{offset:this.offset,reporter:e.prototype.save.call(this)}},g.prototype.restore=function(a){let b=new g(this.base);return b.offset=a.offset,b.length=this.offset,this.offset=a.offset,e.prototype.restore.call(this,a.reporter),b},g.prototype.isEmpty=function(){return this.offset===this.length},g.prototype.readUInt8=function(a){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(a||"DecoderBuffer overrun")},g.prototype.skip=function(a,b){if(!(this.offset+a<=this.length))return this.error(b||"DecoderBuffer overrun");let c=new g(this.base);return c._reporterState=this._reporterState,c.offset=this.offset,c.length=this.offset+a,this.offset+=a,c},g.prototype.raw=function(a){return this.base.slice(a?a.offset:this.offset,this.length)},b.d=h,h.isEncoderBuffer=function(a){return a instanceof h||"object"==typeof a&&"EncoderBuffer"===a.constructor.name&&"number"==typeof a.length&&"function"==typeof a.join},h.prototype.join=function(a,b){return a||(a=f.alloc(this.length)),b||(b=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(c){c.join(a,b),b+=c.length}):("number"==typeof this.value?a[b]=this.value:"string"==typeof this.value?a.write(this.value,b):f.isBuffer(this.value)&&this.value.copy(a,b),b+=this.length)),a}},4036:a=>{"use strict";a.exports={validate:function(a){return/^[A-Za-z0-9\-_]+$/.test(a)}}},5390:function(a,b,c){"use strict";var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.parseProxyResponse=void 0;let e=(0,d(c(11223)).default)("https-proxy-agent:parse-proxy-response");b.parseProxyResponse=function(a){return new Promise((b,c)=>{let d=0,f=[];function g(){let i=a.read();i?function(i){f.push(i),d+=i.length;let j=Buffer.concat(f,d),k=j.indexOf("\r\n\r\n");if(-1===k){e("have not received end of HTTP headers yet..."),g();return}let l=j.slice(0,k).toString("ascii").split("\r\n"),m=l.shift();if(!m)return a.destroy(),c(Error("No header received from proxy CONNECT response"));let n=m.split(" "),o=+n[1],p=n.slice(2).join(" "),q={};for(let b of l){if(!b)continue;let d=b.indexOf(":");if(-1===d)return a.destroy(),c(Error(`Invalid header from proxy CONNECT response: "${b}"`));let e=b.slice(0,d).toLowerCase(),f=b.slice(d+1).trimStart(),g=q[e];"string"==typeof g?q[e]=[g,f]:Array.isArray(g)?g.push(f):q[e]=f}e("got proxy server response: %o %o",m,q),h(),b({connect:{statusCode:o,statusText:p,headers:q},buffered:j})}(i):a.once("readable",g)}function h(){a.removeListener("end",i),a.removeListener("error",j),a.removeListener("readable",g)}function i(){h(),e("onend"),c(Error("Proxy connection ended before receiving CONNECT response"))}function j(a){h(),e("onerror %o",a),c(a)}a.on("error",j),a.on("end",i),g()})}},9379:a=>{function b(a,b){if(!a)throw Error(b||"Assertion failed")}a.exports=b,b.equal=function(a,b,c){if(a!=b)throw Error(c||"Assertion failed: "+a+" != "+b)}},11223:(a,b,c)=>{"undefined"==typeof process||"renderer"===process.type||process.__nwjs?a.exports=c(36115):a.exports=c(90007)},15954:(a,b,c)=>{"use strict";b.bignum=c(23174),b.define=c(63941).define,b.base=c(58219),b.constants=c(95695),b.decoders=c(69311),b.encoders=c(42547)},19606:a=>{"use strict";let b={};b.supportedContentEncodings={AES_GCM:"aesgcm",AES_128_GCM:"aes128gcm"},b.supportedUrgency={VERY_LOW:"very-low",LOW:"low",NORMAL:"normal",HIGH:"high"},a.exports=b},22405:(a,b,c)=>{"use strict";let d,e=c(21820),f=c(83997),g=c(87202),{env:h}=process;function i(a){return 0!==a&&{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}function j(a,b){if(0===d)return 0;if(g("color=16m")||g("color=full")||g("color=truecolor"))return 3;if(g("color=256"))return 2;if(a&&!b&&void 0===d)return 0;let c=d||0;if("dumb"===h.TERM)return c;if("win32"===process.platform){let a=e.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in h)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(a=>a in h)||"codeship"===h.CI_NAME?1:c;if("TEAMCITY_VERSION"in h)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(h.TEAMCITY_VERSION);if("truecolor"===h.COLORTERM)return 3;if("TERM_PROGRAM"in h){let a=parseInt((h.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(h.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(h.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(h.TERM)||"COLORTERM"in h?1:c}g("no-color")||g("no-colors")||g("color=false")||g("color=never")?d=0:(g("color")||g("colors")||g("color=true")||g("color=always"))&&(d=1),"FORCE_COLOR"in h&&(d="true"===h.FORCE_COLOR?1:"false"===h.FORCE_COLOR?0:0===h.FORCE_COLOR.length?1:Math.min(parseInt(h.FORCE_COLOR,10),3)),a.exports={supportsColor:function(a){return i(j(a,a&&a.isTTY))},stdout:i(j(!0,f.isatty(1))),stderr:i(j(!0,f.isatty(2)))}},23174:function(a,b,c){!function(a,b){"use strict";function d(a,b){if(!a)throw Error(b||"Assertion failed")}function e(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}function f(a,b,c){if(f.isBN(a))return a;this.negative=0,this.words=null,this.length=0,this.red=null,null!==a&&(("le"===b||"be"===b)&&(c=b,b=10),this._init(a||0,b||10,c||"be"))}"object"==typeof a?a.exports=f:b.BN=f,f.BN=f,f.wordSize=26;try{j="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:c(79428).Buffer}catch(a){}function g(a,b){var c=a.charCodeAt(b);return c>=65&&c<=70?c-55:c>=97&&c<=102?c-87:c-48&15}function h(a,b,c){var d=g(a,c);return c-1>=b&&(d|=g(a,c-1)<<4),d}function i(a,b,c,d){for(var e=0,f=Math.min(a.length,c),g=b;g<f;g++){var h=a.charCodeAt(g)-48;e*=d,h>=49?e+=h-49+10:h>=17?e+=h-17+10:e+=h}return e}f.isBN=function(a){return a instanceof f||null!==a&&"object"==typeof a&&a.constructor.wordSize===f.wordSize&&Array.isArray(a.words)},f.max=function(a,b){return a.cmp(b)>0?a:b},f.min=function(a,b){return 0>a.cmp(b)?a:b},f.prototype._init=function(a,b,c){if("number"==typeof a)return this._initNumber(a,b,c);if("object"==typeof a)return this._initArray(a,b,c);"hex"===b&&(b=16),d(b===(0|b)&&b>=2&&b<=36);var e=0;"-"===(a=a.toString().replace(/\s+/g,""))[0]&&(e++,this.negative=1),e<a.length&&(16===b?this._parseHex(a,e,c):(this._parseBase(a,b,e),"le"===c&&this._initArray(this.toArray(),b,c)))},f.prototype._initNumber=function(a,b,c){a<0&&(this.negative=1,a=-a),a<0x4000000?(this.words=[0x3ffffff&a],this.length=1):a<0x10000000000000?(this.words=[0x3ffffff&a,a/0x4000000&0x3ffffff],this.length=2):(d(a<0x20000000000000),this.words=[0x3ffffff&a,a/0x4000000&0x3ffffff,1],this.length=3),"le"===c&&this._initArray(this.toArray(),b,c)},f.prototype._initArray=function(a,b,c){if(d("number"==typeof a.length),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=Array(this.length);for(var e,f,g=0;g<this.length;g++)this.words[g]=0;var h=0;if("be"===c)for(g=a.length-1,e=0;g>=0;g-=3)f=a[g]|a[g-1]<<8|a[g-2]<<16,this.words[e]|=f<<h&0x3ffffff,this.words[e+1]=f>>>26-h&0x3ffffff,(h+=24)>=26&&(h-=26,e++);else if("le"===c)for(g=0,e=0;g<a.length;g+=3)f=a[g]|a[g+1]<<8|a[g+2]<<16,this.words[e]|=f<<h&0x3ffffff,this.words[e+1]=f>>>26-h&0x3ffffff,(h+=24)>=26&&(h-=26,e++);return this.strip()},f.prototype._parseHex=function(a,b,c){this.length=Math.ceil((a.length-b)/6),this.words=Array(this.length);for(var d,e=0;e<this.length;e++)this.words[e]=0;var f=0,g=0;if("be"===c)for(e=a.length-1;e>=b;e-=2)d=h(a,b,e)<<f,this.words[g]|=0x3ffffff&d,f>=18?(f-=18,g+=1,this.words[g]|=d>>>26):f+=8;else for(e=(a.length-b)%2==0?b+1:b;e<a.length;e+=2)d=h(a,b,e)<<f,this.words[g]|=0x3ffffff&d,f>=18?(f-=18,g+=1,this.words[g]|=d>>>26):f+=8;this.strip()},f.prototype._parseBase=function(a,b,c){this.words=[0],this.length=1;for(var d=0,e=1;e<=0x3ffffff;e*=b)d++;d--,e=e/b|0;for(var f=a.length-c,g=f%d,h=Math.min(f,f-g)+c,j=0,k=c;k<h;k+=d)j=i(a,k,k+d,b),this.imuln(e),this.words[0]+j<0x4000000?this.words[0]+=j:this._iaddn(j);if(0!==g){var l=1;for(j=i(a,k,a.length,b),k=0;k<g;k++)l*=b;this.imuln(l),this.words[0]+j<0x4000000?this.words[0]+=j:this._iaddn(j)}this.strip()},f.prototype.copy=function(a){a.words=Array(this.length);for(var b=0;b<this.length;b++)a.words[b]=this.words[b];a.length=this.length,a.negative=this.negative,a.red=this.red},f.prototype.clone=function(){var a=new f(null);return this.copy(a),a},f.prototype._expand=function(a){for(;this.length<a;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},f.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var j,k=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,0x2000000,0x290d741,0x1000000,0x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function n(a,b,c){c.negative=b.negative^a.negative;var d=a.length+b.length|0;c.length=d,d=d-1|0;var e=0|a.words[0],f=0|b.words[0],g=e*f,h=0x3ffffff&g,i=g/0x4000000|0;c.words[0]=h;for(var j=1;j<d;j++){for(var k=i>>>26,l=0x3ffffff&i,m=Math.min(j,b.length-1),n=Math.max(0,j-a.length+1);n<=m;n++){var o=j-n|0;k+=(g=(e=0|a.words[o])*(f=0|b.words[n])+l)/0x4000000|0,l=0x3ffffff&g}c.words[j]=0|l,i=0|k}return 0!==i?c.words[j]=0|i:c.length--,c.strip()}f.prototype.toString=function(a,b){if(b=0|b||1,16===(a=a||10)||"hex"===a){for(var c="",e=0,f=0,g=0;g<this.length;g++){var h=this.words[g],i=((h<<e|f)&0xffffff).toString(16);f=h>>>24-e&0xffffff,(e+=2)>=26&&(e-=26,g--),c=0!==f||g!==this.length-1?k[6-i.length]+i+c:i+c}for(0!==f&&(c=f.toString(16)+c);c.length%b!=0;)c="0"+c;return 0!==this.negative&&(c="-"+c),c}if(a===(0|a)&&a>=2&&a<=36){var j=l[a],n=m[a];c="";var o=this.clone();for(o.negative=0;!o.isZero();){var p=o.modn(n).toString(a);c=(o=o.idivn(n)).isZero()?p+c:k[j-p.length]+p+c}for(this.isZero()&&(c="0"+c);c.length%b!=0;)c="0"+c;return 0!==this.negative&&(c="-"+c),c}d(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var a=this.words[0];return 2===this.length?a+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?a+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&d(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-a:a},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(a,b){return d(void 0!==j),this.toArrayLike(j,a,b)},f.prototype.toArray=function(a,b){return this.toArrayLike(Array,a,b)},f.prototype.toArrayLike=function(a,b,c){var e,f,g=this.byteLength(),h=c||Math.max(1,g);d(g<=h,"byte array longer than desired length"),d(h>0,"Requested array length <= 0"),this.strip();var i=new a(h),j=this.clone();if("le"===b){for(f=0;!j.isZero();f++)e=j.andln(255),j.iushrn(8),i[f]=e;for(;f<h;f++)i[f]=0}else{for(f=0;f<h-g;f++)i[f]=0;for(f=0;!j.isZero();f++)e=j.andln(255),j.iushrn(8),i[h-f-1]=e}return i},Math.clz32?f.prototype._countBits=function(a){return 32-Math.clz32(a)}:f.prototype._countBits=function(a){var b=a,c=0;return b>=4096&&(c+=13,b>>>=13),b>=64&&(c+=7,b>>>=7),b>=8&&(c+=4,b>>>=4),b>=2&&(c+=2,b>>>=2),c+b},f.prototype._zeroBits=function(a){if(0===a)return 26;var b=a,c=0;return(8191&b)==0&&(c+=13,b>>>=13),(127&b)==0&&(c+=7,b>>>=7),(15&b)==0&&(c+=4,b>>>=4),(3&b)==0&&(c+=2,b>>>=2),(1&b)==0&&c++,c},f.prototype.bitLength=function(){var a=this.words[this.length-1],b=this._countBits(a);return(this.length-1)*26+b},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,b=0;b<this.length;b++){var c=this._zeroBits(this.words[b]);if(a+=c,26!==c)break}return a},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(a){return 0!==this.negative?this.abs().inotn(a).iaddn(1):this.clone()},f.prototype.fromTwos=function(a){return this.testn(a-1)?this.notn(a).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return 0!==this.negative},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(a){for(;this.length<a.length;)this.words[this.length++]=0;for(var b=0;b<a.length;b++)this.words[b]=this.words[b]|a.words[b];return this.strip()},f.prototype.ior=function(a){return d((this.negative|a.negative)==0),this.iuor(a)},f.prototype.or=function(a){return this.length>a.length?this.clone().ior(a):a.clone().ior(this)},f.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},f.prototype.iuand=function(a){var b;b=this.length>a.length?a:this;for(var c=0;c<b.length;c++)this.words[c]=this.words[c]&a.words[c];return this.length=b.length,this.strip()},f.prototype.iand=function(a){return d((this.negative|a.negative)==0),this.iuand(a)},f.prototype.and=function(a){return this.length>a.length?this.clone().iand(a):a.clone().iand(this)},f.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},f.prototype.iuxor=function(a){this.length>a.length?(b=this,c=a):(b=a,c=this);for(var b,c,d=0;d<c.length;d++)this.words[d]=b.words[d]^c.words[d];if(this!==b)for(;d<b.length;d++)this.words[d]=b.words[d];return this.length=b.length,this.strip()},f.prototype.ixor=function(a){return d((this.negative|a.negative)==0),this.iuxor(a)},f.prototype.xor=function(a){return this.length>a.length?this.clone().ixor(a):a.clone().ixor(this)},f.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},f.prototype.inotn=function(a){d("number"==typeof a&&a>=0);var b=0|Math.ceil(a/26),c=a%26;this._expand(b),c>0&&b--;for(var e=0;e<b;e++)this.words[e]=0x3ffffff&~this.words[e];for(c>0&&(this.words[e]=~this.words[e]&0x3ffffff>>26-c,e++);e<this.length;e++)this.words[e]=0;return this.strip()},f.prototype.notn=function(a){return this.clone().inotn(a)},f.prototype.setn=function(a,b){d("number"==typeof a&&a>=0);var c=a/26|0,e=a%26;return this._expand(c+1),b?this.words[c]=this.words[c]|1<<e:this.words[c]=this.words[c]&~(1<<e),this.strip()},f.prototype.iadd=function(a){if(0!==this.negative&&0===a.negative)return this.negative=0,b=this.isub(a),this.negative^=1,this._normSign();if(0===this.negative&&0!==a.negative)return a.negative=0,b=this.isub(a),a.negative=1,b._normSign();this.length>a.length?(c=this,d=a):(c=a,d=this);for(var b,c,d,e=0,f=0;f<d.length;f++)b=(0|c.words[f])+(0|d.words[f])+e,this.words[f]=0x3ffffff&b,e=b>>>26;for(;0!==e&&f<c.length;f++)b=(0|c.words[f])+e,this.words[f]=0x3ffffff&b,e=b>>>26;if(this.length=c.length,0!==e)this.words[this.length]=e,this.length++;else if(c!==this)for(;f<c.length;f++)this.words[f]=c.words[f];return this},f.prototype.add=function(a){var b;return 0!==a.negative&&0===this.negative?(a.negative=0,b=this.sub(a),a.negative^=1,b):0===a.negative&&0!==this.negative?(this.negative=0,b=a.sub(this),this.negative=1,b):this.length>a.length?this.clone().iadd(a):a.clone().iadd(this)},f.prototype.isub=function(a){if(0!==a.negative){a.negative=0;var b,c,d=this.iadd(a);return a.negative=1,d._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var e=this.cmp(a);if(0===e)return this.negative=0,this.length=1,this.words[0]=0,this;e>0?(b=this,c=a):(b=a,c=this);for(var f=0,g=0;g<c.length;g++)f=(d=(0|b.words[g])-(0|c.words[g])+f)>>26,this.words[g]=0x3ffffff&d;for(;0!==f&&g<b.length;g++)f=(d=(0|b.words[g])+f)>>26,this.words[g]=0x3ffffff&d;if(0===f&&g<b.length&&b!==this)for(;g<b.length;g++)this.words[g]=b.words[g];return this.length=Math.max(this.length,g),b!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(a){return this.clone().isub(a)};var o=function(a,b,c){var d,e,f,g=a.words,h=b.words,i=c.words,j=0,k=0|g[0],l=8191&k,m=k>>>13,n=0|g[1],o=8191&n,p=n>>>13,q=0|g[2],r=8191&q,s=q>>>13,t=0|g[3],u=8191&t,v=t>>>13,w=0|g[4],x=8191&w,y=w>>>13,z=0|g[5],A=8191&z,B=z>>>13,C=0|g[6],D=8191&C,E=C>>>13,F=0|g[7],G=8191&F,H=F>>>13,I=0|g[8],J=8191&I,K=I>>>13,L=0|g[9],M=8191&L,N=L>>>13,O=0|h[0],P=8191&O,Q=O>>>13,R=0|h[1],S=8191&R,T=R>>>13,U=0|h[2],V=8191&U,W=U>>>13,X=0|h[3],Y=8191&X,Z=X>>>13,$=0|h[4],_=8191&$,aa=$>>>13,ab=0|h[5],ac=8191&ab,ad=ab>>>13,ae=0|h[6],af=8191&ae,ag=ae>>>13,ah=0|h[7],ai=8191&ah,aj=ah>>>13,ak=0|h[8],al=8191&ak,am=ak>>>13,an=0|h[9],ao=8191&an,ap=an>>>13;c.negative=a.negative^b.negative,c.length=19,d=Math.imul(l,P);var aq=(j+d|0)+((8191&(e=(e=Math.imul(l,Q))+Math.imul(m,P)|0))<<13)|0;j=((f=Math.imul(m,Q))+(e>>>13)|0)+(aq>>>26)|0,aq&=0x3ffffff,d=Math.imul(o,P),e=(e=Math.imul(o,Q))+Math.imul(p,P)|0,f=Math.imul(p,Q),d=d+Math.imul(l,S)|0;var ar=(j+d|0)+((8191&(e=(e=e+Math.imul(l,T)|0)+Math.imul(m,S)|0))<<13)|0;j=((f=f+Math.imul(m,T)|0)+(e>>>13)|0)+(ar>>>26)|0,ar&=0x3ffffff,d=Math.imul(r,P),e=(e=Math.imul(r,Q))+Math.imul(s,P)|0,f=Math.imul(s,Q),d=d+Math.imul(o,S)|0,e=(e=e+Math.imul(o,T)|0)+Math.imul(p,S)|0,f=f+Math.imul(p,T)|0,d=d+Math.imul(l,V)|0;var as=(j+d|0)+((8191&(e=(e=e+Math.imul(l,W)|0)+Math.imul(m,V)|0))<<13)|0;j=((f=f+Math.imul(m,W)|0)+(e>>>13)|0)+(as>>>26)|0,as&=0x3ffffff,d=Math.imul(u,P),e=(e=Math.imul(u,Q))+Math.imul(v,P)|0,f=Math.imul(v,Q),d=d+Math.imul(r,S)|0,e=(e=e+Math.imul(r,T)|0)+Math.imul(s,S)|0,f=f+Math.imul(s,T)|0,d=d+Math.imul(o,V)|0,e=(e=e+Math.imul(o,W)|0)+Math.imul(p,V)|0,f=f+Math.imul(p,W)|0,d=d+Math.imul(l,Y)|0;var at=(j+d|0)+((8191&(e=(e=e+Math.imul(l,Z)|0)+Math.imul(m,Y)|0))<<13)|0;j=((f=f+Math.imul(m,Z)|0)+(e>>>13)|0)+(at>>>26)|0,at&=0x3ffffff,d=Math.imul(x,P),e=(e=Math.imul(x,Q))+Math.imul(y,P)|0,f=Math.imul(y,Q),d=d+Math.imul(u,S)|0,e=(e=e+Math.imul(u,T)|0)+Math.imul(v,S)|0,f=f+Math.imul(v,T)|0,d=d+Math.imul(r,V)|0,e=(e=e+Math.imul(r,W)|0)+Math.imul(s,V)|0,f=f+Math.imul(s,W)|0,d=d+Math.imul(o,Y)|0,e=(e=e+Math.imul(o,Z)|0)+Math.imul(p,Y)|0,f=f+Math.imul(p,Z)|0,d=d+Math.imul(l,_)|0;var au=(j+d|0)+((8191&(e=(e=e+Math.imul(l,aa)|0)+Math.imul(m,_)|0))<<13)|0;j=((f=f+Math.imul(m,aa)|0)+(e>>>13)|0)+(au>>>26)|0,au&=0x3ffffff,d=Math.imul(A,P),e=(e=Math.imul(A,Q))+Math.imul(B,P)|0,f=Math.imul(B,Q),d=d+Math.imul(x,S)|0,e=(e=e+Math.imul(x,T)|0)+Math.imul(y,S)|0,f=f+Math.imul(y,T)|0,d=d+Math.imul(u,V)|0,e=(e=e+Math.imul(u,W)|0)+Math.imul(v,V)|0,f=f+Math.imul(v,W)|0,d=d+Math.imul(r,Y)|0,e=(e=e+Math.imul(r,Z)|0)+Math.imul(s,Y)|0,f=f+Math.imul(s,Z)|0,d=d+Math.imul(o,_)|0,e=(e=e+Math.imul(o,aa)|0)+Math.imul(p,_)|0,f=f+Math.imul(p,aa)|0,d=d+Math.imul(l,ac)|0;var av=(j+d|0)+((8191&(e=(e=e+Math.imul(l,ad)|0)+Math.imul(m,ac)|0))<<13)|0;j=((f=f+Math.imul(m,ad)|0)+(e>>>13)|0)+(av>>>26)|0,av&=0x3ffffff,d=Math.imul(D,P),e=(e=Math.imul(D,Q))+Math.imul(E,P)|0,f=Math.imul(E,Q),d=d+Math.imul(A,S)|0,e=(e=e+Math.imul(A,T)|0)+Math.imul(B,S)|0,f=f+Math.imul(B,T)|0,d=d+Math.imul(x,V)|0,e=(e=e+Math.imul(x,W)|0)+Math.imul(y,V)|0,f=f+Math.imul(y,W)|0,d=d+Math.imul(u,Y)|0,e=(e=e+Math.imul(u,Z)|0)+Math.imul(v,Y)|0,f=f+Math.imul(v,Z)|0,d=d+Math.imul(r,_)|0,e=(e=e+Math.imul(r,aa)|0)+Math.imul(s,_)|0,f=f+Math.imul(s,aa)|0,d=d+Math.imul(o,ac)|0,e=(e=e+Math.imul(o,ad)|0)+Math.imul(p,ac)|0,f=f+Math.imul(p,ad)|0,d=d+Math.imul(l,af)|0;var aw=(j+d|0)+((8191&(e=(e=e+Math.imul(l,ag)|0)+Math.imul(m,af)|0))<<13)|0;j=((f=f+Math.imul(m,ag)|0)+(e>>>13)|0)+(aw>>>26)|0,aw&=0x3ffffff,d=Math.imul(G,P),e=(e=Math.imul(G,Q))+Math.imul(H,P)|0,f=Math.imul(H,Q),d=d+Math.imul(D,S)|0,e=(e=e+Math.imul(D,T)|0)+Math.imul(E,S)|0,f=f+Math.imul(E,T)|0,d=d+Math.imul(A,V)|0,e=(e=e+Math.imul(A,W)|0)+Math.imul(B,V)|0,f=f+Math.imul(B,W)|0,d=d+Math.imul(x,Y)|0,e=(e=e+Math.imul(x,Z)|0)+Math.imul(y,Y)|0,f=f+Math.imul(y,Z)|0,d=d+Math.imul(u,_)|0,e=(e=e+Math.imul(u,aa)|0)+Math.imul(v,_)|0,f=f+Math.imul(v,aa)|0,d=d+Math.imul(r,ac)|0,e=(e=e+Math.imul(r,ad)|0)+Math.imul(s,ac)|0,f=f+Math.imul(s,ad)|0,d=d+Math.imul(o,af)|0,e=(e=e+Math.imul(o,ag)|0)+Math.imul(p,af)|0,f=f+Math.imul(p,ag)|0,d=d+Math.imul(l,ai)|0;var ax=(j+d|0)+((8191&(e=(e=e+Math.imul(l,aj)|0)+Math.imul(m,ai)|0))<<13)|0;j=((f=f+Math.imul(m,aj)|0)+(e>>>13)|0)+(ax>>>26)|0,ax&=0x3ffffff,d=Math.imul(J,P),e=(e=Math.imul(J,Q))+Math.imul(K,P)|0,f=Math.imul(K,Q),d=d+Math.imul(G,S)|0,e=(e=e+Math.imul(G,T)|0)+Math.imul(H,S)|0,f=f+Math.imul(H,T)|0,d=d+Math.imul(D,V)|0,e=(e=e+Math.imul(D,W)|0)+Math.imul(E,V)|0,f=f+Math.imul(E,W)|0,d=d+Math.imul(A,Y)|0,e=(e=e+Math.imul(A,Z)|0)+Math.imul(B,Y)|0,f=f+Math.imul(B,Z)|0,d=d+Math.imul(x,_)|0,e=(e=e+Math.imul(x,aa)|0)+Math.imul(y,_)|0,f=f+Math.imul(y,aa)|0,d=d+Math.imul(u,ac)|0,e=(e=e+Math.imul(u,ad)|0)+Math.imul(v,ac)|0,f=f+Math.imul(v,ad)|0,d=d+Math.imul(r,af)|0,e=(e=e+Math.imul(r,ag)|0)+Math.imul(s,af)|0,f=f+Math.imul(s,ag)|0,d=d+Math.imul(o,ai)|0,e=(e=e+Math.imul(o,aj)|0)+Math.imul(p,ai)|0,f=f+Math.imul(p,aj)|0,d=d+Math.imul(l,al)|0;var ay=(j+d|0)+((8191&(e=(e=e+Math.imul(l,am)|0)+Math.imul(m,al)|0))<<13)|0;j=((f=f+Math.imul(m,am)|0)+(e>>>13)|0)+(ay>>>26)|0,ay&=0x3ffffff,d=Math.imul(M,P),e=(e=Math.imul(M,Q))+Math.imul(N,P)|0,f=Math.imul(N,Q),d=d+Math.imul(J,S)|0,e=(e=e+Math.imul(J,T)|0)+Math.imul(K,S)|0,f=f+Math.imul(K,T)|0,d=d+Math.imul(G,V)|0,e=(e=e+Math.imul(G,W)|0)+Math.imul(H,V)|0,f=f+Math.imul(H,W)|0,d=d+Math.imul(D,Y)|0,e=(e=e+Math.imul(D,Z)|0)+Math.imul(E,Y)|0,f=f+Math.imul(E,Z)|0,d=d+Math.imul(A,_)|0,e=(e=e+Math.imul(A,aa)|0)+Math.imul(B,_)|0,f=f+Math.imul(B,aa)|0,d=d+Math.imul(x,ac)|0,e=(e=e+Math.imul(x,ad)|0)+Math.imul(y,ac)|0,f=f+Math.imul(y,ad)|0,d=d+Math.imul(u,af)|0,e=(e=e+Math.imul(u,ag)|0)+Math.imul(v,af)|0,f=f+Math.imul(v,ag)|0,d=d+Math.imul(r,ai)|0,e=(e=e+Math.imul(r,aj)|0)+Math.imul(s,ai)|0,f=f+Math.imul(s,aj)|0,d=d+Math.imul(o,al)|0,e=(e=e+Math.imul(o,am)|0)+Math.imul(p,al)|0,f=f+Math.imul(p,am)|0,d=d+Math.imul(l,ao)|0;var az=(j+d|0)+((8191&(e=(e=e+Math.imul(l,ap)|0)+Math.imul(m,ao)|0))<<13)|0;j=((f=f+Math.imul(m,ap)|0)+(e>>>13)|0)+(az>>>26)|0,az&=0x3ffffff,d=Math.imul(M,S),e=(e=Math.imul(M,T))+Math.imul(N,S)|0,f=Math.imul(N,T),d=d+Math.imul(J,V)|0,e=(e=e+Math.imul(J,W)|0)+Math.imul(K,V)|0,f=f+Math.imul(K,W)|0,d=d+Math.imul(G,Y)|0,e=(e=e+Math.imul(G,Z)|0)+Math.imul(H,Y)|0,f=f+Math.imul(H,Z)|0,d=d+Math.imul(D,_)|0,e=(e=e+Math.imul(D,aa)|0)+Math.imul(E,_)|0,f=f+Math.imul(E,aa)|0,d=d+Math.imul(A,ac)|0,e=(e=e+Math.imul(A,ad)|0)+Math.imul(B,ac)|0,f=f+Math.imul(B,ad)|0,d=d+Math.imul(x,af)|0,e=(e=e+Math.imul(x,ag)|0)+Math.imul(y,af)|0,f=f+Math.imul(y,ag)|0,d=d+Math.imul(u,ai)|0,e=(e=e+Math.imul(u,aj)|0)+Math.imul(v,ai)|0,f=f+Math.imul(v,aj)|0,d=d+Math.imul(r,al)|0,e=(e=e+Math.imul(r,am)|0)+Math.imul(s,al)|0,f=f+Math.imul(s,am)|0,d=d+Math.imul(o,ao)|0;var aA=(j+d|0)+((8191&(e=(e=e+Math.imul(o,ap)|0)+Math.imul(p,ao)|0))<<13)|0;j=((f=f+Math.imul(p,ap)|0)+(e>>>13)|0)+(aA>>>26)|0,aA&=0x3ffffff,d=Math.imul(M,V),e=(e=Math.imul(M,W))+Math.imul(N,V)|0,f=Math.imul(N,W),d=d+Math.imul(J,Y)|0,e=(e=e+Math.imul(J,Z)|0)+Math.imul(K,Y)|0,f=f+Math.imul(K,Z)|0,d=d+Math.imul(G,_)|0,e=(e=e+Math.imul(G,aa)|0)+Math.imul(H,_)|0,f=f+Math.imul(H,aa)|0,d=d+Math.imul(D,ac)|0,e=(e=e+Math.imul(D,ad)|0)+Math.imul(E,ac)|0,f=f+Math.imul(E,ad)|0,d=d+Math.imul(A,af)|0,e=(e=e+Math.imul(A,ag)|0)+Math.imul(B,af)|0,f=f+Math.imul(B,ag)|0,d=d+Math.imul(x,ai)|0,e=(e=e+Math.imul(x,aj)|0)+Math.imul(y,ai)|0,f=f+Math.imul(y,aj)|0,d=d+Math.imul(u,al)|0,e=(e=e+Math.imul(u,am)|0)+Math.imul(v,al)|0,f=f+Math.imul(v,am)|0,d=d+Math.imul(r,ao)|0;var aB=(j+d|0)+((8191&(e=(e=e+Math.imul(r,ap)|0)+Math.imul(s,ao)|0))<<13)|0;j=((f=f+Math.imul(s,ap)|0)+(e>>>13)|0)+(aB>>>26)|0,aB&=0x3ffffff,d=Math.imul(M,Y),e=(e=Math.imul(M,Z))+Math.imul(N,Y)|0,f=Math.imul(N,Z),d=d+Math.imul(J,_)|0,e=(e=e+Math.imul(J,aa)|0)+Math.imul(K,_)|0,f=f+Math.imul(K,aa)|0,d=d+Math.imul(G,ac)|0,e=(e=e+Math.imul(G,ad)|0)+Math.imul(H,ac)|0,f=f+Math.imul(H,ad)|0,d=d+Math.imul(D,af)|0,e=(e=e+Math.imul(D,ag)|0)+Math.imul(E,af)|0,f=f+Math.imul(E,ag)|0,d=d+Math.imul(A,ai)|0,e=(e=e+Math.imul(A,aj)|0)+Math.imul(B,ai)|0,f=f+Math.imul(B,aj)|0,d=d+Math.imul(x,al)|0,e=(e=e+Math.imul(x,am)|0)+Math.imul(y,al)|0,f=f+Math.imul(y,am)|0,d=d+Math.imul(u,ao)|0;var aC=(j+d|0)+((8191&(e=(e=e+Math.imul(u,ap)|0)+Math.imul(v,ao)|0))<<13)|0;j=((f=f+Math.imul(v,ap)|0)+(e>>>13)|0)+(aC>>>26)|0,aC&=0x3ffffff,d=Math.imul(M,_),e=(e=Math.imul(M,aa))+Math.imul(N,_)|0,f=Math.imul(N,aa),d=d+Math.imul(J,ac)|0,e=(e=e+Math.imul(J,ad)|0)+Math.imul(K,ac)|0,f=f+Math.imul(K,ad)|0,d=d+Math.imul(G,af)|0,e=(e=e+Math.imul(G,ag)|0)+Math.imul(H,af)|0,f=f+Math.imul(H,ag)|0,d=d+Math.imul(D,ai)|0,e=(e=e+Math.imul(D,aj)|0)+Math.imul(E,ai)|0,f=f+Math.imul(E,aj)|0,d=d+Math.imul(A,al)|0,e=(e=e+Math.imul(A,am)|0)+Math.imul(B,al)|0,f=f+Math.imul(B,am)|0,d=d+Math.imul(x,ao)|0;var aD=(j+d|0)+((8191&(e=(e=e+Math.imul(x,ap)|0)+Math.imul(y,ao)|0))<<13)|0;j=((f=f+Math.imul(y,ap)|0)+(e>>>13)|0)+(aD>>>26)|0,aD&=0x3ffffff,d=Math.imul(M,ac),e=(e=Math.imul(M,ad))+Math.imul(N,ac)|0,f=Math.imul(N,ad),d=d+Math.imul(J,af)|0,e=(e=e+Math.imul(J,ag)|0)+Math.imul(K,af)|0,f=f+Math.imul(K,ag)|0,d=d+Math.imul(G,ai)|0,e=(e=e+Math.imul(G,aj)|0)+Math.imul(H,ai)|0,f=f+Math.imul(H,aj)|0,d=d+Math.imul(D,al)|0,e=(e=e+Math.imul(D,am)|0)+Math.imul(E,al)|0,f=f+Math.imul(E,am)|0,d=d+Math.imul(A,ao)|0;var aE=(j+d|0)+((8191&(e=(e=e+Math.imul(A,ap)|0)+Math.imul(B,ao)|0))<<13)|0;j=((f=f+Math.imul(B,ap)|0)+(e>>>13)|0)+(aE>>>26)|0,aE&=0x3ffffff,d=Math.imul(M,af),e=(e=Math.imul(M,ag))+Math.imul(N,af)|0,f=Math.imul(N,ag),d=d+Math.imul(J,ai)|0,e=(e=e+Math.imul(J,aj)|0)+Math.imul(K,ai)|0,f=f+Math.imul(K,aj)|0,d=d+Math.imul(G,al)|0,e=(e=e+Math.imul(G,am)|0)+Math.imul(H,al)|0,f=f+Math.imul(H,am)|0,d=d+Math.imul(D,ao)|0;var aF=(j+d|0)+((8191&(e=(e=e+Math.imul(D,ap)|0)+Math.imul(E,ao)|0))<<13)|0;j=((f=f+Math.imul(E,ap)|0)+(e>>>13)|0)+(aF>>>26)|0,aF&=0x3ffffff,d=Math.imul(M,ai),e=(e=Math.imul(M,aj))+Math.imul(N,ai)|0,f=Math.imul(N,aj),d=d+Math.imul(J,al)|0,e=(e=e+Math.imul(J,am)|0)+Math.imul(K,al)|0,f=f+Math.imul(K,am)|0,d=d+Math.imul(G,ao)|0;var aG=(j+d|0)+((8191&(e=(e=e+Math.imul(G,ap)|0)+Math.imul(H,ao)|0))<<13)|0;j=((f=f+Math.imul(H,ap)|0)+(e>>>13)|0)+(aG>>>26)|0,aG&=0x3ffffff,d=Math.imul(M,al),e=(e=Math.imul(M,am))+Math.imul(N,al)|0,f=Math.imul(N,am),d=d+Math.imul(J,ao)|0;var aH=(j+d|0)+((8191&(e=(e=e+Math.imul(J,ap)|0)+Math.imul(K,ao)|0))<<13)|0;j=((f=f+Math.imul(K,ap)|0)+(e>>>13)|0)+(aH>>>26)|0,aH&=0x3ffffff,d=Math.imul(M,ao);var aI=(j+d|0)+((8191&(e=(e=Math.imul(M,ap))+Math.imul(N,ao)|0))<<13)|0;return j=((f=Math.imul(N,ap))+(e>>>13)|0)+(aI>>>26)|0,aI&=0x3ffffff,i[0]=aq,i[1]=ar,i[2]=as,i[3]=at,i[4]=au,i[5]=av,i[6]=aw,i[7]=ax,i[8]=ay,i[9]=az,i[10]=aA,i[11]=aB,i[12]=aC,i[13]=aD,i[14]=aE,i[15]=aF,i[16]=aG,i[17]=aH,i[18]=aI,0!==j&&(i[19]=j,c.length++),c};function p(a,b,c){return new q().mulp(a,b,c)}function q(a,b){this.x=a,this.y=b}Math.imul||(o=n),f.prototype.mulTo=function(a,b){var c=this.length+a.length;return 10===this.length&&10===a.length?o(this,a,b):c<63?n(this,a,b):c<1024?function(a,b,c){c.negative=b.negative^a.negative,c.length=a.length+b.length;for(var d=0,e=0,f=0;f<c.length-1;f++){var g=e;e=0;for(var h=0x3ffffff&d,i=Math.min(f,b.length-1),j=Math.max(0,f-a.length+1);j<=i;j++){var k=f-j,l=(0|a.words[k])*(0|b.words[j]),m=0x3ffffff&l;g=g+(l/0x4000000|0)|0,h=0x3ffffff&(m=m+h|0),e+=(g=g+(m>>>26)|0)>>>26,g&=0x3ffffff}c.words[f]=h,d=g,g=e}return 0!==d?c.words[f]=d:c.length--,c.strip()}(this,a,b):p(this,a,b)},q.prototype.makeRBT=function(a){for(var b=Array(a),c=f.prototype._countBits(a)-1,d=0;d<a;d++)b[d]=this.revBin(d,c,a);return b},q.prototype.revBin=function(a,b,c){if(0===a||a===c-1)return a;for(var d=0,e=0;e<b;e++)d|=(1&a)<<b-e-1,a>>=1;return d},q.prototype.permute=function(a,b,c,d,e,f){for(var g=0;g<f;g++)d[g]=b[a[g]],e[g]=c[a[g]]},q.prototype.transform=function(a,b,c,d,e,f){this.permute(f,a,b,c,d,e);for(var g=1;g<e;g<<=1)for(var h=g<<1,i=Math.cos(2*Math.PI/h),j=Math.sin(2*Math.PI/h),k=0;k<e;k+=h)for(var l=i,m=j,n=0;n<g;n++){var o=c[k+n],p=d[k+n],q=c[k+n+g],r=d[k+n+g],s=l*q-m*r;r=l*r+m*q,q=s,c[k+n]=o+q,d[k+n]=p+r,c[k+n+g]=o-q,d[k+n+g]=p-r,n!==h&&(s=i*l-j*m,m=i*m+j*l,l=s)}},q.prototype.guessLen13b=function(a,b){var c=1|Math.max(b,a),d=1&c,e=0;for(c=c/2|0;c;c>>>=1)e++;return 1<<e+1+d},q.prototype.conjugate=function(a,b,c){if(!(c<=1))for(var d=0;d<c/2;d++){var e=a[d];a[d]=a[c-d-1],a[c-d-1]=e,e=b[d],b[d]=-b[c-d-1],b[c-d-1]=-e}},q.prototype.normalize13b=function(a,b){for(var c=0,d=0;d<b/2;d++){var e=8192*Math.round(a[2*d+1]/b)+Math.round(a[2*d]/b)+c;a[d]=0x3ffffff&e,c=e<0x4000000?0:e/0x4000000|0}return a},q.prototype.convert13b=function(a,b,c,e){for(var f=0,g=0;g<b;g++)f+=0|a[g],c[2*g]=8191&f,f>>>=13,c[2*g+1]=8191&f,f>>>=13;for(g=2*b;g<e;++g)c[g]=0;d(0===f),d((-8192&f)==0)},q.prototype.stub=function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=0;return b},q.prototype.mulp=function(a,b,c){var d=2*this.guessLen13b(a.length,b.length),e=this.makeRBT(d),f=this.stub(d),g=Array(d),h=Array(d),i=Array(d),j=Array(d),k=Array(d),l=Array(d),m=c.words;m.length=d,this.convert13b(a.words,a.length,g,d),this.convert13b(b.words,b.length,j,d),this.transform(g,f,h,i,d,e),this.transform(j,f,k,l,d,e);for(var n=0;n<d;n++){var o=h[n]*k[n]-i[n]*l[n];i[n]=h[n]*l[n]+i[n]*k[n],h[n]=o}return this.conjugate(h,i,d),this.transform(h,i,m,f,d,e),this.conjugate(m,f,d),this.normalize13b(m,d),c.negative=a.negative^b.negative,c.length=a.length+b.length,c.strip()},f.prototype.mul=function(a){var b=new f(null);return b.words=Array(this.length+a.length),this.mulTo(a,b)},f.prototype.mulf=function(a){var b=new f(null);return b.words=Array(this.length+a.length),p(this,a,b)},f.prototype.imul=function(a){return this.clone().mulTo(a,this)},f.prototype.imuln=function(a){d("number"==typeof a),d(a<0x4000000);for(var b=0,c=0;c<this.length;c++){var e=(0|this.words[c])*a,f=(0x3ffffff&e)+(0x3ffffff&b);b>>=26,b+=(e/0x4000000|0)+(f>>>26),this.words[c]=0x3ffffff&f}return 0!==b&&(this.words[c]=b,this.length++),0===a&&(this.length=1,this._normSign()),this},f.prototype.muln=function(a){return this.clone().imuln(a)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(a){var b=function(a){for(var b=Array(a.bitLength()),c=0;c<b.length;c++){var d=c/26|0,e=c%26;b[c]=(a.words[d]&1<<e)>>>e}return b}(a);if(0===b.length)return new f(1);for(var c=this,d=0;d<b.length&&0===b[d];d++,c=c.sqr());if(++d<b.length)for(var e=c.sqr();d<b.length;d++,e=e.sqr())0!==b[d]&&(c=c.mul(e));return c},f.prototype.iushln=function(a){d("number"==typeof a&&a>=0);var b,c=a%26,e=(a-c)/26,f=0x3ffffff>>>26-c<<26-c;if(0!==c){var g=0;for(b=0;b<this.length;b++){var h=this.words[b]&f,i=(0|this.words[b])-h<<c;this.words[b]=i|g,g=h>>>26-c}g&&(this.words[b]=g,this.length++)}if(0!==e){for(b=this.length-1;b>=0;b--)this.words[b+e]=this.words[b];for(b=0;b<e;b++)this.words[b]=0;this.length+=e}return this.strip()},f.prototype.ishln=function(a){return d(0===this.negative),this.iushln(a)},f.prototype.iushrn=function(a,b,c){d("number"==typeof a&&a>=0);var e=b?(b-b%26)/26:0,f=a%26,g=Math.min((a-f)/26,this.length),h=0x3ffffff^0x3ffffff>>>f<<f;if(e-=g,e=Math.max(0,e),c){for(var i=0;i<g;i++)c.words[i]=this.words[i];c.length=g}if(0===g);else if(this.length>g)for(this.length-=g,i=0;i<this.length;i++)this.words[i]=this.words[i+g];else this.words[0]=0,this.length=1;var j=0;for(i=this.length-1;i>=0&&(0!==j||i>=e);i--){var k=0|this.words[i];this.words[i]=j<<26-f|k>>>f,j=k&h}return c&&0!==j&&(c.words[c.length++]=j),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(a,b,c){return d(0===this.negative),this.iushrn(a,b,c)},f.prototype.shln=function(a){return this.clone().ishln(a)},f.prototype.ushln=function(a){return this.clone().iushln(a)},f.prototype.shrn=function(a){return this.clone().ishrn(a)},f.prototype.ushrn=function(a){return this.clone().iushrn(a)},f.prototype.testn=function(a){d("number"==typeof a&&a>=0);var b=a%26,c=(a-b)/26;return!(this.length<=c)&&!!(this.words[c]&1<<b)},f.prototype.imaskn=function(a){d("number"==typeof a&&a>=0);var b=a%26,c=(a-b)/26;return(d(0===this.negative,"imaskn works only with positive numbers"),this.length<=c)?this:(0!==b&&c++,this.length=Math.min(c,this.length),0!==b&&(this.words[this.length-1]&=0x3ffffff^0x3ffffff>>>b<<b),0===this.length&&(this.words[0]=0,this.length=1),this.strip())},f.prototype.maskn=function(a){return this.clone().imaskn(a)},f.prototype.iaddn=function(a){return(d("number"==typeof a),d(a<0x4000000),a<0)?this.isubn(-a):0!==this.negative?(1===this.length&&(0|this.words[0])<a?(this.words[0]=a-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(a),this.negative=1),this):this._iaddn(a)},f.prototype._iaddn=function(a){this.words[0]+=a;for(var b=0;b<this.length&&this.words[b]>=0x4000000;b++)this.words[b]-=0x4000000,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},f.prototype.isubn=function(a){if(d("number"==typeof a),d(a<0x4000000),a<0)return this.iaddn(-a);if(0!==this.negative)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=0x4000000,this.words[b+1]-=1;return this.strip()},f.prototype.addn=function(a){return this.clone().iaddn(a)},f.prototype.subn=function(a){return this.clone().isubn(a)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(a,b,c){var e,f,g=a.length+c;this._expand(g);var h=0;for(e=0;e<a.length;e++){f=(0|this.words[e+c])+h;var i=(0|a.words[e])*b;f-=0x3ffffff&i,h=(f>>26)-(i/0x4000000|0),this.words[e+c]=0x3ffffff&f}for(;e<this.length-c;e++)h=(f=(0|this.words[e+c])+h)>>26,this.words[e+c]=0x3ffffff&f;if(0===h)return this.strip();for(d(-1===h),h=0,e=0;e<this.length;e++)h=(f=-(0|this.words[e])+h)>>26,this.words[e]=0x3ffffff&f;return this.negative=1,this.strip()},f.prototype._wordDiv=function(a,b){var c,d=this.length-a.length,e=this.clone(),g=a,h=0|g.words[g.length-1];0!=(d=26-this._countBits(h))&&(g=g.ushln(d),e.iushln(d),h=0|g.words[g.length-1]);var i=e.length-g.length;if("mod"!==b){(c=new f(null)).length=i+1,c.words=Array(c.length);for(var j=0;j<c.length;j++)c.words[j]=0}var k=e.clone()._ishlnsubmul(g,1,i);0===k.negative&&(e=k,c&&(c.words[i]=1));for(var l=i-1;l>=0;l--){var m=(0|e.words[g.length+l])*0x4000000+(0|e.words[g.length+l-1]);for(m=Math.min(m/h|0,0x3ffffff),e._ishlnsubmul(g,m,l);0!==e.negative;)m--,e.negative=0,e._ishlnsubmul(g,1,l),e.isZero()||(e.negative^=1);c&&(c.words[l]=m)}return c&&c.strip(),e.strip(),"div"!==b&&0!==d&&e.iushrn(d),{div:c||null,mod:e}},f.prototype.divmod=function(a,b,c){var e,g,h;return(d(!a.isZero()),this.isZero())?{div:new f(0),mod:new f(0)}:0!==this.negative&&0===a.negative?(h=this.neg().divmod(a,b),"mod"!==b&&(e=h.div.neg()),"div"!==b&&(g=h.mod.neg(),c&&0!==g.negative&&g.iadd(a)),{div:e,mod:g}):0===this.negative&&0!==a.negative?(h=this.divmod(a.neg(),b),"mod"!==b&&(e=h.div.neg()),{div:e,mod:h.mod}):(this.negative&a.negative)!=0?(h=this.neg().divmod(a.neg(),b),"div"!==b&&(g=h.mod.neg(),c&&0!==g.negative&&g.isub(a)),{div:h.div,mod:g}):a.length>this.length||0>this.cmp(a)?{div:new f(0),mod:this}:1===a.length?"div"===b?{div:this.divn(a.words[0]),mod:null}:"mod"===b?{div:null,mod:new f(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new f(this.modn(a.words[0]))}:this._wordDiv(a,b)},f.prototype.div=function(a){return this.divmod(a,"div",!1).div},f.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},f.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},f.prototype.divRound=function(a){var b=this.divmod(a);if(b.mod.isZero())return b.div;var c=b.mod.abs(),d=a.abs().iushrn(1),e=1&a.words[0],g=c.cmp(d);if(g<0||1===e&&0===g)return b.div;var h=new f(1);return h.negative=this.negative^a.negative,b.div.iadd(h)},f.prototype.modn=function(a){d(a<=0x3ffffff);for(var b=0x4000000%a,c=0,e=this.length-1;e>=0;e--)c=(b*c+(0|this.words[e]))%a;return c},f.prototype.idivn=function(a){d(a<=0x3ffffff);for(var b=0,c=this.length-1;c>=0;c--){var e=(0|this.words[c])+0x4000000*b;this.words[c]=e/a|0,b=e%a}return this.strip()},f.prototype.divn=function(a){return this.clone().idivn(a)},f.prototype.egcd=function(a){d(0===a.negative),d(!a.isZero());var b=this,c=a.clone();b=0!==b.negative?b.umod(a):b.clone();for(var e=new f(1),g=new f(0),h=new f(0),i=new f(1),j=0;b.isEven()&&c.isEven();)b.iushrn(1),c.iushrn(1),++j;for(var k=c.clone(),l=b.clone();!b.isZero();){for(var m=0,n=1;(b.words[0]&n)==0&&m<26;++m,n<<=1);if(m>0)for(b.iushrn(m);m-- >0;)(e.isOdd()||g.isOdd())&&(e.iadd(k),g.isub(l)),e.iushrn(1),g.iushrn(1);for(var o=0,p=1;(c.words[0]&p)==0&&o<26;++o,p<<=1);if(o>0)for(c.iushrn(o);o-- >0;)(h.isOdd()||i.isOdd())&&(h.iadd(k),i.isub(l)),h.iushrn(1),i.iushrn(1);b.cmp(c)>=0?(b.isub(c),e.isub(h),g.isub(i)):(c.isub(b),h.isub(e),i.isub(g))}return{a:h,b:i,gcd:c.iushln(j)}},f.prototype._invmp=function(a){d(0===a.negative),d(!a.isZero());var b,c=this,e=a.clone();c=0!==c.negative?c.umod(a):c.clone();for(var g=new f(1),h=new f(0),i=e.clone();c.cmpn(1)>0&&e.cmpn(1)>0;){for(var j=0,k=1;(c.words[0]&k)==0&&j<26;++j,k<<=1);if(j>0)for(c.iushrn(j);j-- >0;)g.isOdd()&&g.iadd(i),g.iushrn(1);for(var l=0,m=1;(e.words[0]&m)==0&&l<26;++l,m<<=1);if(l>0)for(e.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(i),h.iushrn(1);c.cmp(e)>=0?(c.isub(e),g.isub(h)):(e.isub(c),h.isub(g))}return 0>(b=0===c.cmpn(1)?g:h).cmpn(0)&&b.iadd(a),b},f.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var b=this.clone(),c=a.clone();b.negative=0,c.negative=0;for(var d=0;b.isEven()&&c.isEven();d++)b.iushrn(1),c.iushrn(1);for(;;){for(;b.isEven();)b.iushrn(1);for(;c.isEven();)c.iushrn(1);var e=b.cmp(c);if(e<0){var f=b;b=c,c=f}else if(0===e||0===c.cmpn(1))break;b.isub(c)}return c.iushln(d)},f.prototype.invm=function(a){return this.egcd(a).a.umod(a)},f.prototype.isEven=function(){return(1&this.words[0])==0},f.prototype.isOdd=function(){return(1&this.words[0])==1},f.prototype.andln=function(a){return this.words[0]&a},f.prototype.bincn=function(a){d("number"==typeof a);var b=a%26,c=(a-b)/26,e=1<<b;if(this.length<=c)return this._expand(c+1),this.words[c]|=e,this;for(var f=e,g=c;0!==f&&g<this.length;g++){var h=0|this.words[g];h+=f,f=h>>>26,h&=0x3ffffff,this.words[g]=h}return 0!==f&&(this.words[g]=f,this.length++),this},f.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},f.prototype.cmpn=function(a){var b,c=a<0;if(0!==this.negative&&!c)return -1;if(0===this.negative&&c)return 1;if(this.strip(),this.length>1)b=1;else{c&&(a=-a),d(a<=0x3ffffff,"Number is too big");var e=0|this.words[0];b=e===a?0:e<a?-1:1}return 0!==this.negative?0|-b:b},f.prototype.cmp=function(a){if(0!==this.negative&&0===a.negative)return -1;if(0===this.negative&&0!==a.negative)return 1;var b=this.ucmp(a);return 0!==this.negative?0|-b:b},f.prototype.ucmp=function(a){if(this.length>a.length)return 1;if(this.length<a.length)return -1;for(var b=0,c=this.length-1;c>=0;c--){var d=0|this.words[c],e=0|a.words[c];if(d!==e){d<e?b=-1:d>e&&(b=1);break}}return b},f.prototype.gtn=function(a){return 1===this.cmpn(a)},f.prototype.gt=function(a){return 1===this.cmp(a)},f.prototype.gten=function(a){return this.cmpn(a)>=0},f.prototype.gte=function(a){return this.cmp(a)>=0},f.prototype.ltn=function(a){return -1===this.cmpn(a)},f.prototype.lt=function(a){return -1===this.cmp(a)},f.prototype.lten=function(a){return 0>=this.cmpn(a)},f.prototype.lte=function(a){return 0>=this.cmp(a)},f.prototype.eqn=function(a){return 0===this.cmpn(a)},f.prototype.eq=function(a){return 0===this.cmp(a)},f.red=function(a){return new x(a)},f.prototype.toRed=function(a){return d(!this.red,"Already a number in reduction context"),d(0===this.negative,"red works only with positives"),a.convertTo(this)._forceRed(a)},f.prototype.fromRed=function(){return d(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(a){return this.red=a,this},f.prototype.forceRed=function(a){return d(!this.red,"Already a number in reduction context"),this._forceRed(a)},f.prototype.redAdd=function(a){return d(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},f.prototype.redIAdd=function(a){return d(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},f.prototype.redSub=function(a){return d(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},f.prototype.redISub=function(a){return d(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},f.prototype.redShl=function(a){return d(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},f.prototype.redMul=function(a){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},f.prototype.redIMul=function(a){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},f.prototype.redSqr=function(){return d(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return d(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return d(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return d(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return d(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(a){return d(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var r={k256:null,p224:null,p192:null,p25519:null};function s(a,b){this.name=a,this.p=new f(b,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function t(){s.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){s.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){s.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){s.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(a){if("string"==typeof a){var b=f._prime(a);this.m=b.p,this.prime=b}else d(a.gtn(1),"modulus must be greater than 1"),this.m=a,this.prime=null}function y(a){x.call(this,a),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s.prototype._tmp=function(){var a=new f(null);return a.words=Array(Math.ceil(this.n/13)),a},s.prototype.ireduce=function(a){var b,c=a;do this.split(c,this.tmp),b=(c=(c=this.imulK(c)).iadd(this.tmp)).bitLength();while(b>this.n);var d=b<this.n?-1:c.ucmp(this.p);return 0===d?(c.words[0]=0,c.length=1):d>0?c.isub(this.p):void 0!==c.strip?c.strip():c._strip(),c},s.prototype.split=function(a,b){a.iushrn(this.n,0,b)},s.prototype.imulK=function(a){return a.imul(this.k)},e(t,s),t.prototype.split=function(a,b){for(var c=Math.min(a.length,9),d=0;d<c;d++)b.words[d]=a.words[d];if(b.length=c,a.length<=9){a.words[0]=0,a.length=1;return}var e=a.words[9];for(d=10,b.words[b.length++]=4194303&e;d<a.length;d++){var f=0|a.words[d];a.words[d-10]=(4194303&f)<<4|e>>>22,e=f}e>>>=22,a.words[d-10]=e,0===e&&a.length>10?a.length-=10:a.length-=9},t.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var b=0,c=0;c<a.length;c++){var d=0|a.words[c];b+=977*d,a.words[c]=0x3ffffff&b,b=64*d+(b/0x4000000|0)}return 0===a.words[a.length-1]&&(a.length--,0===a.words[a.length-1]&&a.length--),a},e(u,s),e(v,s),e(w,s),w.prototype.imulK=function(a){for(var b=0,c=0;c<a.length;c++){var d=(0|a.words[c])*19+b,e=0x3ffffff&d;d>>>=26,a.words[c]=e,b=d}return 0!==b&&(a.words[a.length++]=b),a},f._prime=function(a){var b;if(r[a])return r[a];if("k256"===a)b=new t;else if("p224"===a)b=new u;else if("p192"===a)b=new v;else if("p25519"===a)b=new w;else throw Error("Unknown prime "+a);return r[a]=b,b},x.prototype._verify1=function(a){d(0===a.negative,"red works only with positives"),d(a.red,"red works only with red numbers")},x.prototype._verify2=function(a,b){d((a.negative|b.negative)==0,"red works only with positives"),d(a.red&&a.red===b.red,"red works only with red numbers")},x.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},x.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},x.prototype.add=function(a,b){this._verify2(a,b);var c=a.add(b);return c.cmp(this.m)>=0&&c.isub(this.m),c._forceRed(this)},x.prototype.iadd=function(a,b){this._verify2(a,b);var c=a.iadd(b);return c.cmp(this.m)>=0&&c.isub(this.m),c},x.prototype.sub=function(a,b){this._verify2(a,b);var c=a.sub(b);return 0>c.cmpn(0)&&c.iadd(this.m),c._forceRed(this)},x.prototype.isub=function(a,b){this._verify2(a,b);var c=a.isub(b);return 0>c.cmpn(0)&&c.iadd(this.m),c},x.prototype.shl=function(a,b){return this._verify1(a),this.imod(a.ushln(b))},x.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},x.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},x.prototype.isqr=function(a){return this.imul(a,a.clone())},x.prototype.sqr=function(a){return this.mul(a,a)},x.prototype.sqrt=function(a){if(a.isZero())return a.clone();var b=this.m.andln(3);if(d(b%2==1),3===b){var c=this.m.add(new f(1)).iushrn(2);return this.pow(a,c)}for(var e=this.m.subn(1),g=0;!e.isZero()&&0===e.andln(1);)g++,e.iushrn(1);d(!e.isZero());var h=new f(1).toRed(this),i=h.redNeg(),j=this.m.subn(1).iushrn(1),k=this.m.bitLength();for(k=new f(2*k*k).toRed(this);0!==this.pow(k,j).cmp(i);)k.redIAdd(i);for(var l=this.pow(k,e),m=this.pow(a,e.addn(1).iushrn(1)),n=this.pow(a,e),o=g;0!==n.cmp(h);){for(var p=n,q=0;0!==p.cmp(h);q++)p=p.redSqr();d(q<o);var r=this.pow(l,new f(1).iushln(o-q-1));m=m.redMul(r),l=r.redSqr(),n=n.redMul(l),o=q}return m},x.prototype.invm=function(a){var b=a._invmp(this.m);return 0!==b.negative?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},x.prototype.pow=function(a,b){if(b.isZero())return new f(1).toRed(this);if(0===b.cmpn(1))return a.clone();var c=Array(16);c[0]=new f(1).toRed(this),c[1]=a;for(var d=2;d<c.length;d++)c[d]=this.mul(c[d-1],a);var e=c[0],g=0,h=0,i=b.bitLength()%26;for(0===i&&(i=26),d=b.length-1;d>=0;d--){for(var j=b.words[d],k=i-1;k>=0;k--){var l=j>>k&1;if(e!==c[0]&&(e=this.sqr(e)),0===l&&0===g){h=0;continue}g<<=1,g|=l,(4==++h||0===d&&0===k)&&(e=this.mul(e,c[g]),h=0,g=0)}i=26}return e},x.prototype.convertTo=function(a){var b=a.umod(this.m);return b===a?b.clone():b},x.prototype.convertFrom=function(a){var b=a.clone();return b.red=null,b},f.mont=function(a){return new y(a)},e(y,x),y.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},y.prototype.convertFrom=function(a){var b=this.imod(a.mul(this.rinv));return b.red=null,b},y.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var c=a.imul(b),d=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=c.isub(d).iushrn(this.shift),f=e;return e.cmp(this.m)>=0?f=e.isub(this.m):0>e.cmpn(0)&&(f=e.iadd(this.m)),f._forceRed(this)},y.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new f(0)._forceRed(this);var c=a.mul(b),d=c.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=c.isub(d).iushrn(this.shift),g=e;return e.cmp(this.m)>=0?g=e.isub(this.m):0>e.cmpn(0)&&(g=e.iadd(this.m)),g._forceRed(this)},y.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(a=c.nmd(a),this)},26699:(a,b,c)=>{try{var d=c(28354);if("function"!=typeof d.inherits)throw"";a.exports=d.inherits}catch(b){a.exports=c(85748)}},27976:(a,b)=>{"use strict";function c(a){let b={};return Object.keys(a).forEach(function(c){(0|c)==c&&(c|=0),b[a[c]]=c}),b}b.tagClass={0:"universal",1:"application",2:"context",3:"private"},b.tagClassByName=c(b.tagClass),b.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},b.tagByName=c(b.tag)},30266:function(a,b,c){"use strict";var d=this&&this.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c);var e=Object.getOwnPropertyDescriptor(b,c);(!e||("get"in e?!b.__esModule:e.writable||e.configurable))&&(e={enumerable:!0,get:function(){return b[c]}}),Object.defineProperty(a,d,e)}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),e=this&&this.__setModuleDefault||(Object.create?function(a,b){Object.defineProperty(a,"default",{enumerable:!0,value:b})}:function(a,b){a.default=b}),f=this&&this.__importStar||function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)"default"!==c&&Object.prototype.hasOwnProperty.call(a,c)&&d(b,a,c);return e(b,a),b};Object.defineProperty(b,"__esModule",{value:!0}),b.req=b.json=b.toBuffer=void 0;let g=f(c(81630)),h=f(c(55591));async function i(a){let b=0,c=[];for await(let d of a)b+=d.length,c.push(d);return Buffer.concat(c,b)}b.toBuffer=i,b.json=async function(a){let b=(await i(a)).toString("utf8");try{return JSON.parse(b)}catch(a){throw a.message+=` (input: ${b})`,a}},b.req=function(a,b={}){let c=(("string"==typeof a?a:a.href).startsWith("https:")?h:g).request(a,b),d=new Promise((a,b)=>{c.once("response",a).once("error",b).end()});return c.then=d.then.bind(d),c}},30721:(a,b,c)=>{"use strict";let d=c(26699),e=c(56840).Buffer,f=c(41720);function g(a){f.call(this,a),this.enc="pem"}d(g,f),a.exports=g,g.prototype.decode=function(a,b){let c=a.toString().split(/[\r\n]+/g),d=b.label.toUpperCase(),g=/^-----(BEGIN|END) ([^-]+)-----$/,h=-1,i=-1;for(let a=0;a<c.length;a++){let b=c[a].match(g);if(null!==b&&b[2]===d)if(-1===h){if("BEGIN"!==b[1])break;h=a}else{if("END"!==b[1])break;i=a;break}}if(-1===h||-1===i)throw Error("PEM section not found for: "+d);let j=c.slice(h+1,i).join("");j.replace(/[^a-z0-9+/=]+/gi,"");let k=e.from(j,"base64");return f.prototype.decode.call(this,k,b)}},31788:(a,b,c)=>{"use strict";var d,e=c(55511),f="aes-128-gcm",g={aes128gcm:1,aesgcm:2},h="encrypt",i="decrypt";function j(a){return"string"==typeof a?Buffer.from(a,"base64url"):a}function k(a,b){var c=e.createHmac("sha256",a);return c.update(b),c.digest()}function l(a,b){return d("salt",a),d("ikm",b),d("extract",k(a,b))}function m(a,b,c){d("prk",a),d("info",b);var e=Buffer.alloc(0),f=Buffer.alloc(0);b=Buffer.from(b,"ascii");for(var g=0,h=Buffer.alloc(1);e.length<c;)h.writeUIntBE(++g,0,1),f=k(a,Buffer.concat([f,b,h])),e=Buffer.concat([e,f]);return d("expand",e.slice(0,c))}function n(a,b){var c=Buffer.concat([Buffer.from("Content-Encoding: "+a+"\0","ascii"),b]);return d("info "+a,c),c}function o(a){var b=Buffer.concat([Buffer.alloc(2),a]);return b.writeUIntBE(a.length,0,2),b}function p(a,b,c){if(!a.salt)throw Error("must include a salt parameter for "+a.version);if("aesgcm"===a.version){var e,f,g,j=function(a,b){var c,e,f,g={secret:null,context:Buffer.alloc(0)};if(a.key){if(g.secret=a.key,16!==g.secret.length)throw Error("An explicit key must be 16 bytes")}else a.dh?g=function(a,b){var c,d,e=a.privateKey;if(b===h)c=e.getPublicKey(),d=a.dh;else if(b===i)c=a.dh,d=e.getPublicKey();else throw Error("Unknown mode only "+h+" and "+i+" supported");return{secret:e.computeSecret(a.dh),context:Buffer.concat([Buffer.from(a.keylabel,"ascii"),Buffer.from([0]),o(d),o(c)])}}(a,b):(a.keyid,g.secret=a.keymap[a.keyid]);if(!g.secret)throw Error("Unable to determine key");return d("secret",g.secret),d("context",g.context),a.authSecret&&(g.secret=(c=a.authSecret,e=g.secret,f=n("auth",Buffer.alloc(0)),m(l(c,e),f,32)),d("authsecret",g.secret)),g}(a,b,c);e=n("aesgcm",j.context),f=n("nonce",j.context),g=j.secret}else if("aes128gcm"===a.version)e=Buffer.from("Content-Encoding: aes128gcm\0"),f=Buffer.from("Content-Encoding: nonce\0"),g=function(a,b,c){if(c&&"function"!=typeof c)throw Error("Callback is not a function");if(a.key){if(16!==a.key.length)throw Error("An explicit key must be 16 bytes");return d("secret key",a.key)}if(!a.privateKey){if(c)var e=c(a.keyid);else var e=a.keymap&&a.keymap[a.keyid];if(!e)throw Error('No saved key (keyid: "'+a.keyid+'")');return e}return function(a,b){var c,e,f,g,j,k;if(!a.authSecret)throw Error("No authentication secret for webpush");if(d("authsecret",a.authSecret),b===h)e=a.privateKey.getPublicKey(),c=f=a.dh;else if(b===i)c=e=a.keyid,f=a.privateKey.getPublicKey();else throw Error("Unknown mode only "+h+" and "+i+" supported");return d("remote pubkey",c),d("sender pubkey",e),d("receiver pubkey",f),d("secret dh",(g=a.authSecret,j=a.privateKey.computeSecret(c),k=Buffer.concat([Buffer.from("WebPush: info\0"),f,e]),m(l(g,j),k,32)))}(a,b)}(a,b,c);else throw Error("Unable to set context for mode "+a.version);var k=l(a.salt,g),p={key:m(k,e,16),nonce:m(k,f,12)};return d("key",p.key),d("nonce base",p.nonce),p}function q(a){var b={};b.version=a.version||"aes128gcm",b.rs=parseInt(a.rs,10),isNaN(b.rs)&&(b.rs=4096);var c=g[b.version];if("aes128gcm"===b.version&&(c+=16),b.rs<=c)throw Error("The rs parameter has to be greater than "+c);if(a.salt&&(b.salt=j(a.salt),16!==b.salt.length))throw Error("The salt parameter must be 16 bytes");return b.keyid=a.keyid,a.key?b.key=j(a.key):(b.privateKey=a.privateKey,b.privateKey||(b.keymap=a.keymap),"aes128gcm"!==b.version&&(b.keylabel=a.keylabel||"P-256"),a.dh&&(b.dh=j(a.dh))),a.authSecret&&(b.authSecret=j(a.authSecret)),b}function r(a,b){var c=Buffer.from(a),e=c.readUIntBE(c.length-6,6);return c.writeUIntBE(((e^b)&0xffffff)+((e/0x1000000^b/0x1000000)&0xffffff)*0x1000000,c.length-6,6),d("nonce"+b,c),c}d="1"===process.env.ECE_KEYLOG?function(a,b){return console.warn(a+" ["+b.length+"]: "+b.toString("base64url")),b}:function(a,b){return b},a.exports={decrypt:function(a,b,c){var h=q(b);if("aes128gcm"===h.version){var j,k,l=(k=(j=a).readUIntBE(20,1),h.salt=j.slice(0,16),h.rs=j.readUIntBE(16,4),h.keyid=j.slice(21,21+k),21+k);a=a.slice(l)}var m=p(h,i,c),n=0,o=Buffer.alloc(0),s=h.rs;"aes128gcm"!==h.version&&(s+=16);for(var t=0;n<a.length;++t){var u=n+s;if("aes128gcm"!==h.version&&u===a.length)throw Error("Truncated payload");if((u=Math.min(u,a.length))-n<=16)throw Error("Invalid block: too small at "+t);var v=function(a,b,c,h,i){d("decrypt",c);var j=r(a.nonce,b),k=e.createDecipheriv(f,a.key,j);k.setAuthTag(c.slice(c.length-16));var l=k.update(c.slice(0,c.length-16));if(l=Buffer.concat([l,k.final()]),d("decrypted",l),"aes128gcm"!==h.version)return function(a,b){var c=g[b],e=a.readUIntBE(0,c);if(e+c>a.length)throw Error("padding exceeds block size");d("padding",a.slice(0,c+e));var f=Buffer.alloc(e);if(f.fill(0),0!==f.compare(a.slice(c,c+e)))throw Error("invalid padding");return a.slice(c+e)}(l,h.version);for(var m=l,n=m.length-1;n>=0;){if(m[n]){if(i){if(2!==m[n])throw Error("last record needs to start padding with a 2")}else if(1!==m[n])throw Error("last record needs to start padding with a 2");return m.slice(0,n)}--n}throw Error("all zero plaintext")}(m,t,a.slice(n,u),h,u>=a.length);o=Buffer.concat([o,v]),n=u}return o},encrypt:function(a,b,c){if(!Buffer.isBuffer(a))throw Error("buffer argument must be a Buffer");var i,j=q(b);j.salt||(j.salt=e.randomBytes(16)),"aes128gcm"===j.version?(j.privateKey&&!j.keyid&&(j.keyid=j.privateKey.getPublicKey()),i=function(a){var b=Buffer.alloc(5),c=Buffer.from(a.keyid||[]);if(c.length>255)throw Error("keyid is too large");return b.writeUIntBE(a.rs,0,4),b.writeUIntBE(c.length,4,1),Buffer.concat([a.salt,b,c])}(j)):i=Buffer.alloc(0);var k=p(j,h,c),l=0,m=g[j.version],n=m;"aes128gcm"===j.version&&(n+=16);for(var o=isNaN(parseInt(b.pad,10))?0:parseInt(b.pad,10),s=0,t=!1;!t;){var u=Math.min(j.rs-n-1,o);"aes128gcm"!==j.version&&(u=Math.min((1<<8*m)-1,u)),o>0&&0===u&&++u,o-=u;var v=l+j.rs-n-u;t=(t="aes128gcm"!==j.version?v>a.length:v>=a.length)&&o<=0;var w=function(a,b,c,h,i,j){d("encrypt",c),h=h||0;var k=r(a.nonce,b),l=e.createCipheriv(f,a.key,k),m=[],n=g[i.version],o=Buffer.alloc(h+n);if(o.fill(0),"aes128gcm"!==i.version){if(o.writeUIntBE(h,0,n),d("padding",o),m.push(l.update(o)),m.push(l.update(c)),!j&&o.length+c.length<i.rs)throw Error("Unable to pad to record size")}else m.push(l.update(c)),o.writeUIntBE(j?2:1,0,1),d("padding",o),m.push(l.update(o));l.final();var p=l.getAuthTag();if(16!==p.length)throw Error("invalid tag generated");return m.push(p),d("encrypted",Buffer.concat(m))}(k,s,a.slice(l,v),u,j,t);i=Buffer.concat([i,w]),l=v,++s}return i}}},36115:(a,b,c)=>{b.formatArgs=function(b){if(b[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+b[0]+(this.useColors?"%c ":" ")+"+"+a.exports.humanize(this.diff),!this.useColors)return;let c="color: "+this.color;b.splice(1,0,c,"color: inherit");let d=0,e=0;b[0].replace(/%[a-zA-Z%]/g,a=>{"%%"!==a&&(d++,"%c"===a&&(e=d))}),b.splice(e,0,c)},b.save=function(a){try{a?b.storage.setItem("debug",a):b.storage.removeItem("debug")}catch(a){}},b.load=function(){let a;try{a=b.storage.getItem("debug")||b.storage.getItem("DEBUG")}catch(a){}return!a&&"undefined"!=typeof process&&"env"in process&&(a=process.env.DEBUG),a},b.useColors=function(){let a;return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(a=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},b.storage=function(){try{return localStorage}catch(a){}}(),b.destroy=(()=>{let a=!1;return()=>{a||(a=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),b.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],b.log=console.debug||console.log||(()=>{}),a.exports=c(98102)(b);let{formatters:d}=a.exports;d.j=function(a){try{return JSON.stringify(a)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}}},36624:(a,b,c)=>{"use strict";var d=c(93619).Buffer,e=c(77390);function f(a){if(d.isBuffer(a))return a;if("string"==typeof a)return d.from(a,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function g(a,b,c){for(var d=0;b+d<c&&0===a[b+d];)++d;return a[b+d]>=128&&--d,d}a.exports={derToJose:function(a,b){a=f(a);var c=e(b),g=c+1,h=a.length,i=0;if(48!==a[i++])throw Error('Could not find expected "seq"');var j=a[i++];if(129===j&&(j=a[i++]),h-i<j)throw Error('"seq" specified length of "'+j+'", only "'+(h-i)+'" remaining');if(2!==a[i++])throw Error('Could not find expected "int" for "r"');var k=a[i++];if(h-i-2<k)throw Error('"r" specified length of "'+k+'", only "'+(h-i-2)+'" available');if(g<k)throw Error('"r" specified length of "'+k+'", max of "'+g+'" is acceptable');var l=i;if(i+=k,2!==a[i++])throw Error('Could not find expected "int" for "s"');var m=a[i++];if(h-i!==m)throw Error('"s" specified length of "'+m+'", expected "'+(h-i)+'"');if(g<m)throw Error('"s" specified length of "'+m+'", max of "'+g+'" is acceptable');var n=i;if((i+=m)!==h)throw Error('Expected to consume entire buffer, but "'+(h-i)+'" bytes remain');var o=c-k,p=c-m,q=d.allocUnsafe(o+k+p+m);for(i=0;i<o;++i)q[i]=0;a.copy(q,i,l+Math.max(-o,0),l+k),i=c;for(var r=i;i<r+p;++i)q[i]=0;return a.copy(q,i,n+Math.max(-p,0),n+m),q=(q=q.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(a,b){a=f(a);var c=e(b),h=a.length;if(h!==2*c)throw TypeError('"'+b+'" signatures must be "'+2*c+'" bytes, saw "'+h+'"');var i=g(a,0,c),j=g(a,c,a.length),k=c-i,l=c-j,m=2+k+1+1+l,n=m<128,o=d.allocUnsafe((n?2:3)+m),p=0;return o[p++]=48,n?o[p++]=m:(o[p++]=129,o[p++]=255&m),o[p++]=2,o[p++]=k,i<0?(o[p++]=0,p+=a.copy(o,p,0,c)):p+=a.copy(o,p,i,c),o[p++]=2,o[p++]=l,j<0?(o[p++]=0,a.copy(o,p,c)):a.copy(o,p,c+j),o}}},41720:(a,b,c)=>{"use strict";let d=c(26699),e=c(23174),f=c(3465).t,g=c(44955),h=c(27976);function i(a){this.enc="der",this.name=a.name,this.entity=a,this.tree=new j,this.tree._init(a.body)}function j(a){g.call(this,"der",a)}function k(a,b){let c=a.readUInt8(b);if(a.isError(c))return c;let d=h.tagClass[c>>6],e=(32&c)==0;if((31&c)==31){let d=c;for(c=0;(128&d)==128;){if(d=a.readUInt8(b),a.isError(d))return d;c<<=7,c|=127&d}}else c&=31;let f=h.tag[c];return{cls:d,primitive:e,tag:c,tagStr:f}}function l(a,b,c){let d=a.readUInt8(c);if(a.isError(d))return d;if(!b&&128===d)return null;if((128&d)==0)return d;let e=127&d;if(e>4)return a.error("length octect is too long");d=0;for(let b=0;b<e;b++){d<<=8;let b=a.readUInt8(c);if(a.isError(b))return b;d|=b}return d}a.exports=i,i.prototype.decode=function(a,b){return f.isDecoderBuffer(a)||(a=new f(a,b)),this.tree._decode(a,b)},d(j,g),j.prototype._peekTag=function(a,b,c){if(a.isEmpty())return!1;let d=a.save(),e=k(a,'Failed to peek tag: "'+b+'"');return a.isError(e)?e:(a.restore(d),e.tag===b||e.tagStr===b||e.tagStr+"of"===b||c)},j.prototype._decodeTag=function(a,b,c){let d=k(a,'Failed to decode tag of "'+b+'"');if(a.isError(d))return d;let e=l(a,d.primitive,'Failed to get length of "'+b+'"');if(a.isError(e))return e;if(!c&&d.tag!==b&&d.tagStr!==b&&d.tagStr+"of"!==b)return a.error('Failed to match tag: "'+b+'"');if(d.primitive||null!==e)return a.skip(e,'Failed to match body of: "'+b+'"');let f=a.save(),g=this._skipUntilEnd(a,'Failed to skip indefinite length body: "'+this.tag+'"');return a.isError(g)?g:(e=a.offset-f.offset,a.restore(f),a.skip(e,'Failed to match body of: "'+b+'"'))},j.prototype._skipUntilEnd=function(a,b){for(;;){let c,d=k(a,b);if(a.isError(d))return d;let e=l(a,d.primitive,b);if(a.isError(e))return e;if(c=d.primitive||null!==e?a.skip(e):this._skipUntilEnd(a,b),a.isError(c))return c;if("end"===d.tagStr)break}},j.prototype._decodeList=function(a,b,c,d){let e=[];for(;!a.isEmpty();){let b=this._peekTag(a,"end");if(a.isError(b))return b;let f=c.decode(a,"der",d);if(a.isError(f)&&b)break;e.push(f)}return e},j.prototype._decodeStr=function(a,b){if("bitstr"===b){let b=a.readUInt8();return a.isError(b)?b:{unused:b,data:a.raw()}}if("bmpstr"===b){let b=a.raw();if(b.length%2==1)return a.error("Decoding of string type: bmpstr length mismatch");let c="";for(let a=0;a<b.length/2;a++)c+=String.fromCharCode(b.readUInt16BE(2*a));return c}if("numstr"===b){let b=a.raw().toString("ascii");return this._isNumstr(b)?b:a.error("Decoding of string type: numstr unsupported characters")}if("octstr"===b)return a.raw();if("objDesc"===b)return a.raw();else if("printstr"===b){let b=a.raw().toString("ascii");return this._isPrintstr(b)?b:a.error("Decoding of string type: printstr unsupported characters")}else if(/str$/.test(b))return a.raw().toString();else return a.error("Decoding of string type: "+b+" unsupported")},j.prototype._decodeObjid=function(a,b,c){let d,e=[],f=0,g=0;for(;!a.isEmpty();)g=a.readUInt8(),f<<=7,f|=127&g,(128&g)==0&&(e.push(f),f=0);128&g&&e.push(f);let h=e[0]/40|0,i=e[0]%40;if(d=c?e:[h,i].concat(e.slice(1)),b){let a=b[d.join(" ")];void 0===a&&(a=b[d.join(".")]),void 0!==a&&(d=a)}return d},j.prototype._decodeTime=function(a,b){let c,d,e,f,g,h,i=a.raw().toString();if("gentime"===b)c=0|i.slice(0,4),d=0|i.slice(4,6),e=0|i.slice(6,8),f=0|i.slice(8,10),g=0|i.slice(10,12),h=0|i.slice(12,14);else{if("utctime"!==b)return a.error("Decoding "+b+" time is not supported yet");c=0|i.slice(0,2),d=0|i.slice(2,4),e=0|i.slice(4,6),f=0|i.slice(6,8),g=0|i.slice(8,10),h=0|i.slice(10,12),c=c<70?2e3+c:1900+c}return Date.UTC(c,d-1,e,f,g,h,0)},j.prototype._decodeNull=function(){return null},j.prototype._decodeBool=function(a){let b=a.readUInt8();return a.isError(b)?b:0!==b},j.prototype._decodeInt=function(a,b){let c=new e(a.raw());return b&&(c=b[c.toString(10)]||c),c},j.prototype._use=function(a,b){return"function"==typeof a&&(a=a(b)),a._getDecoder("der").tree}},42095:a=>{function b(a,b,c,d){return Math.round(a/c)+" "+d+(b>=1.5*c?"s":"")}a.exports=function(a,c){c=c||{};var d,e,f,g,h=typeof a;if("string"===h&&a.length>0){var i=a;if(!((i=String(i)).length>100)){var j=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(j){var k=parseFloat(j[1]);switch((j[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*k;case"weeks":case"week":case"w":return 6048e5*k;case"days":case"day":case"d":return 864e5*k;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*k;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*k;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*k;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return k;default:break}}}return}if("number"===h&&isFinite(a)){return c.long?(e=Math.abs(d=a))>=864e5?b(d,e,864e5,"day"):e>=36e5?b(d,e,36e5,"hour"):e>=6e4?b(d,e,6e4,"minute"):e>=1e3?b(d,e,1e3,"second"):d+" ms":(g=Math.abs(f=a))>=864e5?Math.round(f/864e5)+"d":g>=36e5?Math.round(f/36e5)+"h":g>=6e4?Math.round(f/6e4)+"m":g>=1e3?Math.round(f/1e3)+"s":f+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}},42547:(a,b,c)=>{"use strict";b.der=c(53108),b.pem=c(75197)},43481:(a,b,c)=>{var d=c(93619).Buffer,e=c(70346),f=c(43667),g=c(27910),h=c(55541),i=c(28354);function j(a,b){return d.from(a,b).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function k(a){var b,c,d,e=a.header,g=a.payload,k=a.secret||a.privateKey,l=a.encoding,m=f(e.alg),n=(b=(b=l)||"utf8",c=j(h(e),"binary"),d=j(h(g),b),i.format("%s.%s",c,d)),o=m.sign(n,k);return i.format("%s.%s",n,o)}function l(a){var b=a.secret;if(b=null==(b=null==b?a.privateKey:b)?a.key:b,!0===/^hs/i.test(a.header.alg)&&null==b)throw TypeError("secret must be a string or buffer or a KeyObject");var c=new e(b);this.readable=!0,this.header=a.header,this.encoding=a.encoding,this.secret=this.privateKey=this.key=c,this.payload=new e(a.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}i.inherits(l,g),l.prototype.sign=function(){try{var a=k({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",a),this.emit("data",a),this.emit("end"),this.readable=!1,a}catch(a){this.readable=!1,this.emit("error",a),this.emit("close")}},l.sign=k,a.exports=l},43667:(a,b,c)=>{var d,e=c(93619).Buffer,f=c(55511),g=c(36624),h=c(28354),i="secret must be a string or buffer",j="key must be a string or a buffer",k="function"==typeof f.createPublicKey;function l(a){if(!e.isBuffer(a)&&"string"!=typeof a&&(!k||"object"!=typeof a||"string"!=typeof a.type||"string"!=typeof a.asymmetricKeyType||"function"!=typeof a.export))throw p(j)}function m(a){if(!e.isBuffer(a)&&"string"!=typeof a&&"object"!=typeof a)throw p("key must be a string, a buffer or an object")}function n(a){return a.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function o(a){var b=4-(a=a.toString()).length%4;if(4!==b)for(var c=0;c<b;++c)a+="=";return a.replace(/\-/g,"+").replace(/_/g,"/")}function p(a){var b=[].slice.call(arguments,1);return TypeError(h.format.bind(h,a).apply(null,b))}function q(a){var b;return b=a,e.isBuffer(b)||"string"==typeof b||(a=JSON.stringify(a)),a}function r(a){return function(b,c){!function(a){if(!e.isBuffer(a)){if("string"!=typeof a){if(!k||"object"!=typeof a||"secret"!==a.type||"function"!=typeof a.export)throw p(i)}}}(c),b=q(b);var d=f.createHmac("sha"+a,c);return n((d.update(b),d.digest("base64")))}}k&&(j+=" or a KeyObject",i+="or a KeyObject");var s="timingSafeEqual"in f?function(a,b){return a.byteLength===b.byteLength&&f.timingSafeEqual(a,b)}:function(a,b){return d||(d=c(75459)),d(a,b)};function t(a){return function(b,c,d){var f=r(a)(b,d);return s(e.from(c),e.from(f))}}function u(a){return function(b,c){m(c),b=q(b);var d=f.createSign("RSA-SHA"+a);return n((d.update(b),d.sign(c,"base64")))}}function v(a){return function(b,c,d){l(d),b=q(b),c=o(c);var e=f.createVerify("RSA-SHA"+a);return e.update(b),e.verify(d,c,"base64")}}function w(a){return function(b,c){m(c),b=q(b);var d=f.createSign("RSA-SHA"+a);return n((d.update(b),d.sign({key:c,padding:f.constants.RSA_PKCS1_PSS_PADDING,saltLength:f.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function x(a){return function(b,c,d){l(d),b=q(b),c=o(c);var e=f.createVerify("RSA-SHA"+a);return e.update(b),e.verify({key:d,padding:f.constants.RSA_PKCS1_PSS_PADDING,saltLength:f.constants.RSA_PSS_SALTLEN_DIGEST},c,"base64")}}function y(a){var b=u(a);return function(){var c=b.apply(null,arguments);return g.derToJose(c,"ES"+a)}}function z(a){var b=v(a);return function(c,d,e){return b(c,d=g.joseToDer(d,"ES"+a).toString("base64"),e)}}function A(){return function(){return""}}function B(){return function(a,b){return""===b}}a.exports=function(a){var b=a.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!b)throw p('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',a);var c=(b[1]||b[3]).toLowerCase(),d=b[2];return{sign:({hs:r,rs:u,ps:w,es:y,none:A})[c](d),verify:({hs:t,rs:v,ps:x,es:z,none:B})[c](d)}}},44955:(a,b,c)=>{"use strict";let d=c(47734).a,e=c(3465).d,f=c(3465).t,g=c(9379),h=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(h);function j(a,b,c){let d={};this._baseState=d,d.name=c,d.enc=a,d.parent=b||null,d.children=null,d.tag=null,d.args=null,d.reverseArgs=null,d.choice=null,d.optional=!1,d.any=!1,d.obj=!1,d.use=null,d.useDecoder=null,d.key=null,d.default=null,d.explicit=null,d.implicit=null,d.contains=null,d.parent||(d.children=[],this._wrap())}a.exports=j;let k=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];j.prototype.clone=function(){let a=this._baseState,b={};k.forEach(function(c){b[c]=a[c]});let c=new this.constructor(b.parent);return c._baseState=b,c},j.prototype._wrap=function(){let a=this._baseState;i.forEach(function(b){this[b]=function(){let c=new this.constructor(this);return a.children.push(c),c[b].apply(c,arguments)}},this)},j.prototype._init=function(a){let b=this._baseState;g(null===b.parent),a.call(this),b.children=b.children.filter(function(a){return a._baseState.parent===this},this),g.equal(b.children.length,1,"Root node can have only one child")},j.prototype._useArgs=function(a){let b=this._baseState,c=a.filter(function(a){return a instanceof this.constructor},this);a=a.filter(function(a){return!(a instanceof this.constructor)},this),0!==c.length&&(g(null===b.children),b.children=c,c.forEach(function(a){a._baseState.parent=this},this)),0!==a.length&&(g(null===b.args),b.args=a,b.reverseArgs=a.map(function(a){if("object"!=typeof a||a.constructor!==Object)return a;let b={};return Object.keys(a).forEach(function(c){c==(0|c)&&(c|=0),b[a[c]]=c}),b}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(a){j.prototype[a]=function(){throw Error(a+" not implemented for encoding: "+this._baseState.enc)}}),h.forEach(function(a){j.prototype[a]=function(){let b=this._baseState,c=Array.prototype.slice.call(arguments);return g(null===b.tag),b.tag=a,this._useArgs(c),this}}),j.prototype.use=function(a){g(a);let b=this._baseState;return g(null===b.use),b.use=a,this},j.prototype.optional=function(){return this._baseState.optional=!0,this},j.prototype.def=function(a){let b=this._baseState;return g(null===b.default),b.default=a,b.optional=!0,this},j.prototype.explicit=function(a){let b=this._baseState;return g(null===b.explicit&&null===b.implicit),b.explicit=a,this},j.prototype.implicit=function(a){let b=this._baseState;return g(null===b.explicit&&null===b.implicit),b.implicit=a,this},j.prototype.obj=function(){let a=this._baseState,b=Array.prototype.slice.call(arguments);return a.obj=!0,0!==b.length&&this._useArgs(b),this},j.prototype.key=function(a){let b=this._baseState;return g(null===b.key),b.key=a,this},j.prototype.any=function(){return this._baseState.any=!0,this},j.prototype.choice=function(a){let b=this._baseState;return g(null===b.choice),b.choice=a,this._useArgs(Object.keys(a).map(function(b){return a[b]})),this},j.prototype.contains=function(a){let b=this._baseState;return g(null===b.use),b.contains=a,this},j.prototype._decode=function(a,b){let c,d=this._baseState;if(null===d.parent)return a.wrapResult(d.children[0]._decode(a,b));let e=d.default,g=!0,h=null;if(null!==d.key&&(h=a.enterKey(d.key)),d.optional){let c=null;if(null!==d.explicit?c=d.explicit:null!==d.implicit?c=d.implicit:null!==d.tag&&(c=d.tag),null!==c||d.any){if(g=this._peekTag(a,c,d.any),a.isError(g))return g}else{let c=a.save();try{null===d.choice?this._decodeGeneric(d.tag,a,b):this._decodeChoice(a,b),g=!0}catch(a){g=!1}a.restore(c)}}if(d.obj&&g&&(c=a.enterObject()),g){if(null!==d.explicit){let b=this._decodeTag(a,d.explicit);if(a.isError(b))return b;a=b}let c=a.offset;if(null===d.use&&null===d.choice){let b;d.any&&(b=a.save());let c=this._decodeTag(a,null!==d.implicit?d.implicit:d.tag,d.any);if(a.isError(c))return c;d.any?e=a.raw(b):a=c}if(b&&b.track&&null!==d.tag&&b.track(a.path(),c,a.length,"tagged"),b&&b.track&&null!==d.tag&&b.track(a.path(),a.offset,a.length,"content"),d.any||(e=null===d.choice?this._decodeGeneric(d.tag,a,b):this._decodeChoice(a,b)),a.isError(e))return e;if(d.any||null!==d.choice||null===d.children||d.children.forEach(function(c){c._decode(a,b)}),d.contains&&("octstr"===d.tag||"bitstr"===d.tag)){let c=new f(e);e=this._getUse(d.contains,a._reporterState.obj)._decode(c,b)}}return d.obj&&g&&(e=a.leaveObject(c)),null!==d.key&&(null!==e||!0===g)?a.leaveKey(h,d.key,e):null!==h&&a.exitKey(h),e},j.prototype._decodeGeneric=function(a,b,c){let d=this._baseState;if("seq"===a||"set"===a)return null;if("seqof"===a||"setof"===a)return this._decodeList(b,a,d.args[0],c);if(/str$/.test(a))return this._decodeStr(b,a,c);if("objid"===a&&d.args)return this._decodeObjid(b,d.args[0],d.args[1],c);if("objid"===a)return this._decodeObjid(b,null,null,c);if("gentime"===a||"utctime"===a)return this._decodeTime(b,a,c);else if("null_"===a)return this._decodeNull(b,c);else if("bool"===a)return this._decodeBool(b,c);else if("objDesc"===a)return this._decodeStr(b,a,c);else if("int"===a||"enum"===a)return this._decodeInt(b,d.args&&d.args[0],c);return null!==d.use?this._getUse(d.use,b._reporterState.obj)._decode(b,c):b.error("unknown tag: "+a)},j.prototype._getUse=function(a,b){let c=this._baseState;return c.useDecoder=this._use(a,b),g(null===c.useDecoder._baseState.parent),c.useDecoder=c.useDecoder._baseState.children[0],c.implicit!==c.useDecoder._baseState.implicit&&(c.useDecoder=c.useDecoder.clone(),c.useDecoder._baseState.implicit=c.implicit),c.useDecoder},j.prototype._decodeChoice=function(a,b){let c=this._baseState,d=null,e=!1;return(Object.keys(c.choice).some(function(f){let g=a.save(),h=c.choice[f];try{let c=h._decode(a,b);if(a.isError(c))return!1;d={type:f,value:c},e=!0}catch(b){return a.restore(g),!1}return!0},this),e)?d:a.error("Choice not matched")},j.prototype._createEncoderBuffer=function(a){return new e(a,this.reporter)},j.prototype._encode=function(a,b,c){let d=this._baseState;if(null!==d.default&&d.default===a)return;let e=this._encodeValue(a,b,c);if(void 0!==e&&!this._skipDefault(e,b,c))return e},j.prototype._encodeValue=function(a,b,c){let e=this._baseState;if(null===e.parent)return e.children[0]._encode(a,b||new d);let f=null;if(this.reporter=b,e.optional&&void 0===a)if(null===e.default)return;else a=e.default;let g=null,h=!1;if(e.any)f=this._createEncoderBuffer(a);else if(e.choice)f=this._encodeChoice(a,b);else if(e.contains)g=this._getUse(e.contains,c)._encode(a,b),h=!0;else if(e.children)g=e.children.map(function(c){if("null_"===c._baseState.tag)return c._encode(null,b,a);if(null===c._baseState.key)return b.error("Child should have a key");let d=b.enterKey(c._baseState.key);if("object"!=typeof a)return b.error("Child expected, but input is not object");let e=c._encode(a[c._baseState.key],b,a);return b.leaveKey(d),e},this).filter(function(a){return a}),g=this._createEncoderBuffer(g);else if("seqof"===e.tag||"setof"===e.tag){if(!(e.args&&1===e.args.length))return b.error("Too many args for : "+e.tag);if(!Array.isArray(a))return b.error("seqof/setof, but data is not Array");let c=this.clone();c._baseState.implicit=null,g=this._createEncoderBuffer(a.map(function(c){let d=this._baseState;return this._getUse(d.args[0],a)._encode(c,b)},c))}else null!==e.use?f=this._getUse(e.use,c)._encode(a,b):(g=this._encodePrimitive(e.tag,a),h=!0);if(!e.any&&null===e.choice){let a=null!==e.implicit?e.implicit:e.tag,c=null===e.implicit?"universal":"context";null===a?null===e.use&&b.error("Tag could be omitted only for .use()"):null===e.use&&(f=this._encodeComposite(a,h,c,g))}return null!==e.explicit&&(f=this._encodeComposite(e.explicit,!1,"context",f)),f},j.prototype._encodeChoice=function(a,b){let c=this._baseState,d=c.choice[a.type];return d||g(!1,a.type+" not found in "+JSON.stringify(Object.keys(c.choice))),d._encode(a.value,b)},j.prototype._encodePrimitive=function(a,b){let c=this._baseState;if(/str$/.test(a))return this._encodeStr(b,a);if("objid"===a&&c.args)return this._encodeObjid(b,c.reverseArgs[0],c.args[1]);if("objid"===a)return this._encodeObjid(b,null,null);if("gentime"===a||"utctime"===a)return this._encodeTime(b,a);if("null_"===a)return this._encodeNull();else if("int"===a||"enum"===a)return this._encodeInt(b,c.args&&c.reverseArgs[0]);else if("bool"===a)return this._encodeBool(b);else if("objDesc"===a)return this._encodeStr(b,a);else throw Error("Unsupported tag: "+a)},j.prototype._isNumstr=function(a){return/^[0-9 ]*$/.test(a)},j.prototype._isPrintstr=function(a){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(a)}},45703:(a,b,c)=>{"use strict";let d=c(55511),e=c(31788);a.exports={encrypt:function(a,b,c,f){if(!a)throw Error("No user public key provided for encryption.");if("string"!=typeof a)throw Error("The subscription p256dh value must be a string.");if(65!==Buffer.from(a,"base64url").length)throw Error("The subscription p256dh value should be 65 bytes long.");if(!b)throw Error("No user auth provided for encryption.");if("string"!=typeof b)throw Error("The subscription auth key must be a string.");if(Buffer.from(b,"base64url").length<16)throw Error("The subscription auth key should be at least 16 bytes long");if("string"!=typeof c&&!Buffer.isBuffer(c))throw Error("Payload must be either a string or a Node Buffer.");("string"==typeof c||c instanceof String)&&(c=Buffer.from(c));let g=d.createECDH("prime256v1"),h=g.generateKeys(),i=d.randomBytes(16).toString("base64url"),j=e.encrypt(c,{version:f,dh:a,privateKey:g,salt:i,authSecret:b});return{localPublicKey:h,salt:i,cipherText:j}}}},46165:(a,b,c)=>{var d=c(93619).Buffer,e=c(70346),f=c(43667),g=c(27910),h=c(55541),i=c(28354),j=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function k(a){var b=a.split(".",1)[0],c=d.from(b,"base64").toString("binary");if("[object Object]"===Object.prototype.toString.call(c))return c;try{return JSON.parse(c)}catch(a){return}}function l(a){return a.split(".")[2]}function m(a){return j.test(a)&&!!k(a)}function n(a,b,c){if(!b){var d=Error("Missing algorithm parameter for jws.verify");throw d.code="MISSING_ALGORITHM",d}var e=l(a=h(a)),g=a.split(".",2).join(".");return f(b).verify(g,e,c)}function o(a,b){if(b=b||{},!m(a=h(a)))return null;var c,e,f=k(a);if(!f)return null;var g=(c=c||"utf8",e=a.split(".")[1],d.from(e,"base64").toString(c));return("JWT"===f.typ||b.json)&&(g=JSON.parse(g,b.encoding)),{header:f,payload:g,signature:l(a)}}function p(a){var b=(a=a||{}).secret;if(b=null==(b=null==b?a.publicKey:b)?a.key:b,!0===/^hs/i.test(a.algorithm)&&null==b)throw TypeError("secret must be a string or buffer or a KeyObject");var c=new e(b);this.readable=!0,this.algorithm=a.algorithm,this.encoding=a.encoding,this.secret=this.publicKey=this.key=c,this.signature=new e(a.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}i.inherits(p,g),p.prototype.verify=function(){try{var a=n(this.signature.buffer,this.algorithm,this.key.buffer),b=o(this.signature.buffer,this.encoding);return this.emit("done",a,b),this.emit("data",a),this.emit("end"),this.readable=!1,a}catch(a){this.readable=!1,this.emit("error",a),this.emit("close")}},p.decode=o,p.isValid=m,p.verify=n,a.exports=p},47734:(a,b,c)=>{"use strict";let d=c(26699);function e(a){this._reporterState={obj:null,path:[],options:a||{},errors:[]}}function f(a,b){this.path=a,this.rethrow(b)}b.a=e,e.prototype.isError=function(a){return a instanceof f},e.prototype.save=function(){let a=this._reporterState;return{obj:a.obj,pathLen:a.path.length}},e.prototype.restore=function(a){let b=this._reporterState;b.obj=a.obj,b.path=b.path.slice(0,a.pathLen)},e.prototype.enterKey=function(a){return this._reporterState.path.push(a)},e.prototype.exitKey=function(a){let b=this._reporterState;b.path=b.path.slice(0,a-1)},e.prototype.leaveKey=function(a,b,c){let d=this._reporterState;this.exitKey(a),null!==d.obj&&(d.obj[b]=c)},e.prototype.path=function(){return this._reporterState.path.join("/")},e.prototype.enterObject=function(){let a=this._reporterState,b=a.obj;return a.obj={},b},e.prototype.leaveObject=function(a){let b=this._reporterState,c=b.obj;return b.obj=a,c},e.prototype.error=function(a){let b,c=this._reporterState,d=a instanceof f;if(b=d?a:new f(c.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),a.message||a,a.stack),!c.options.partial)throw b;return d||c.errors.push(b),b},e.prototype.wrapResult=function(a){let b=this._reporterState;return b.options.partial?{result:this.isError(a)?null:a,errors:b.errors}:a},d(f,Error),f.prototype.rethrow=function(a){if(this.message=a+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,f),!this.stack)try{throw Error(this.message)}catch(a){this.stack=a.stack}return this}},48975:(a,b,c)=>{"use strict";let d=c(52974),e=c(45703),f=c(67768),g=c(77117),h=c(19606),i=new f;a.exports={WebPushError:g,supportedContentEncodings:h.supportedContentEncodings,encrypt:e.encrypt,getVapidHeaders:d.getVapidHeaders,generateVAPIDKeys:d.generateVAPIDKeys,setGCMAPIKey:i.setGCMAPIKey,setVapidDetails:i.setVapidDetails,generateRequestDetails:i.generateRequestDetails,sendNotification:i.sendNotification.bind(i)}},52974:(a,b,c)=>{"use strict";let d=c(55511),e=c(15954),f=c(69929),{URL:g}=c(79551),h=c(19606),i=c(4036),j=e.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).objid().optional(),this.key("publicKey").explicit(1).bitstr().optional())});function k(a){if(!a)throw Error("No subject set in vapidDetails.subject.");if("string"!=typeof a||0===a.length)throw Error("The subject value must be a string containing an https: URL or mailto: address. "+a);let b=null;try{b=new g(a)}catch(b){throw Error("Vapid subject is not a valid URL. "+a)}if(!["https:","mailto:"].includes(b.protocol))throw Error("Vapid subject is not an https: or mailto: URL. "+a);"localhost"===b.hostname&&console.warn("Vapid subject points to a localhost web URI, which is unsupported by Apple's push notification server and will result in a BadJwtToken error when sending notifications.")}function l(a){if(!a)throw Error("No key set vapidDetails.publicKey");if("string"!=typeof a)throw Error("Vapid public key is must be a URL safe Base 64 encoded string.");if(!i.validate(a))throw Error('Vapid public key must be a URL safe Base 64 (without "=")');if(65!==(a=Buffer.from(a,"base64url")).length)throw Error("Vapid public key should be 65 bytes long when decoded.")}function m(a){if(!a)throw Error("No key set in vapidDetails.privateKey");if("string"!=typeof a)throw Error("Vapid private key must be a URL safe Base 64 encoded string.");if(!i.validate(a))throw Error('Vapid private key must be a URL safe Base 64 (without "=")');if(32!==(a=Buffer.from(a,"base64url")).length)throw Error("Vapid private key should be 32 bytes long when decoded.")}function n(a){let b=new Date;return b.setSeconds(b.getSeconds()+a),Math.floor(b.getTime()/1e3)}function o(a){if(!Number.isInteger(a))throw Error("`expiration` value must be a number");if(a<0)throw Error("`expiration` must be a positive integer");if(a>=n(86400))throw Error("`expiration` value is greater than maximum of 24 hours")}a.exports={generateVAPIDKeys:function(){let a=d.createECDH("prime256v1");a.generateKeys();let b=a.getPublicKey(),c=a.getPrivateKey();if(c.length<32){let a=Buffer.alloc(32-c.length);a.fill(0),c=Buffer.concat([a,c])}if(b.length<65){let a=Buffer.alloc(65-b.length);a.fill(0),b=Buffer.concat([a,b])}return{publicKey:b.toString("base64url"),privateKey:c.toString("base64url")}},getFutureExpirationTimestamp:n,getVapidHeaders:function(a,b,c,d,e,i){var p;if(!a)throw Error("No audience could be generated for VAPID.");if("string"!=typeof a||0===a.length)throw Error("The audience value must be a string containing the origin of a push service. "+a);try{new g(a)}catch(b){throw Error("VAPID audience is not a url. "+a)}k(b),l(c),m(d),d=Buffer.from(d,"base64url"),i?o(i):i=n(43200);let q={aud:a,exp:i,sub:b},r=f.sign({header:{typ:"JWT",alg:"ES256"},payload:q,privateKey:(p=d,j.encode({version:1,privateKey:p,parameters:[1,2,840,10045,3,1,7]},"pem",{label:"EC PRIVATE KEY"}))});if(e===h.supportedContentEncodings.AES_128_GCM)return{Authorization:"vapid t="+r+", k="+c};if(e===h.supportedContentEncodings.AES_GCM)return{Authorization:"WebPush "+r,"Crypto-Key":"p256ecdsa="+c};throw Error("Unsupported encoding type specified.")},validateSubject:k,validatePublicKey:l,validatePrivateKey:m,validateExpiration:o}},53108:(a,b,c)=>{"use strict";let d=c(26699),e=c(56840).Buffer,f=c(44955),g=c(27976);function h(a){this.enc="der",this.name=a.name,this.entity=a,this.tree=new i,this.tree._init(a.body)}function i(a){f.call(this,"der",a)}function j(a){return a<10?"0"+a:a}a.exports=h,h.prototype.encode=function(a,b){return this.tree._encode(a,b).join()},d(i,f),i.prototype._encodeComposite=function(a,b,c,d){let f=function(a,b,c,d){let e;if("seqof"===a?a="seq":"setof"===a&&(a="set"),g.tagByName.hasOwnProperty(a))e=g.tagByName[a];else{if("number"!=typeof a||(0|a)!==a)return d.error("Unknown tag: "+a);e=a}return e>=31?d.error("Multi-octet tag encoding unsupported"):(b||(e|=32),e|=g.tagClassByName[c||"universal"]<<6)}(a,b,c,this.reporter);if(d.length<128){let a=e.alloc(2);return a[0]=f,a[1]=d.length,this._createEncoderBuffer([a,d])}let h=1;for(let a=d.length;a>=256;a>>=8)h++;let i=e.alloc(2+h);i[0]=f,i[1]=128|h;for(let a=1+h,b=d.length;b>0;a--,b>>=8)i[a]=255&b;return this._createEncoderBuffer([i,d])},i.prototype._encodeStr=function(a,b){if("bitstr"===b)return this._createEncoderBuffer([0|a.unused,a.data]);if("bmpstr"===b){let b=e.alloc(2*a.length);for(let c=0;c<a.length;c++)b.writeUInt16BE(a.charCodeAt(c),2*c);return this._createEncoderBuffer(b)}if("numstr"===b)return this._isNumstr(a)?this._createEncoderBuffer(a):this.reporter.error("Encoding of string type: numstr supports only digits and space");if("printstr"===b)return this._isPrintstr(a)?this._createEncoderBuffer(a):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark");if(/str$/.test(b))return this._createEncoderBuffer(a);else if("objDesc"===b)return this._createEncoderBuffer(a);else return this.reporter.error("Encoding of string type: "+b+" unsupported")},i.prototype._encodeObjid=function(a,b,c){if("string"==typeof a){if(!b)return this.reporter.error("string objid given, but no values map found");if(!b.hasOwnProperty(a))return this.reporter.error("objid not found in values map");a=b[a].split(/[\s.]+/g);for(let b=0;b<a.length;b++)a[b]|=0}else if(Array.isArray(a)){a=a.slice();for(let b=0;b<a.length;b++)a[b]|=0}if(!Array.isArray(a))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(a));if(!c){if(a[1]>=40)return this.reporter.error("Second objid identifier OOB");a.splice(0,2,40*a[0]+a[1])}let d=0;for(let b=0;b<a.length;b++){let c=a[b];for(d++;c>=128;c>>=7)d++}let f=e.alloc(d),g=f.length-1;for(let b=a.length-1;b>=0;b--){let c=a[b];for(f[g--]=127&c;(c>>=7)>0;)f[g--]=128|127&c}return this._createEncoderBuffer(f)},i.prototype._encodeTime=function(a,b){let c,d=new Date(a);return"gentime"===b?c=""+j(d.getUTCFullYear())+j(d.getUTCMonth()+1)+j(d.getUTCDate())+j(d.getUTCHours())+j(d.getUTCMinutes())+j(d.getUTCSeconds())+"Z":"utctime"===b?c=""+j(d.getUTCFullYear()%100)+j(d.getUTCMonth()+1)+j(d.getUTCDate())+j(d.getUTCHours())+j(d.getUTCMinutes())+j(d.getUTCSeconds())+"Z":this.reporter.error("Encoding "+b+" time is not supported yet"),this._encodeStr(c,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(a,b){if("string"==typeof a){if(!b)return this.reporter.error("String int or enum given, but no values map");if(!b.hasOwnProperty(a))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(a));a=b[a]}if("number"!=typeof a&&!e.isBuffer(a)){let b=a.toArray();!a.sign&&128&b[0]&&b.unshift(0),a=e.from(b)}if(e.isBuffer(a)){let b=a.length;0===a.length&&b++;let c=e.alloc(b);return a.copy(c),0===a.length&&(c[0]=0),this._createEncoderBuffer(c)}if(a<128)return this._createEncoderBuffer(a);if(a<256)return this._createEncoderBuffer([0,a]);let c=1;for(let b=a;b>=256;b>>=8)c++;let d=Array(c);for(let b=d.length-1;b>=0;b--)d[b]=255&a,a>>=8;return 128&d[0]&&d.unshift(0),this._createEncoderBuffer(e.from(d))},i.prototype._encodeBool=function(a){return this._createEncoderBuffer(255*!!a)},i.prototype._use=function(a,b){return"function"==typeof a&&(a=a(b)),a._getEncoder("der").tree},i.prototype._skipDefault=function(a,b,c){let d,e=this._baseState;if(null===e.default)return!1;let f=a.join();if(void 0===e.defaultBuffer&&(e.defaultBuffer=this._encodeValue(e.default,b,c).join()),f.length!==e.defaultBuffer.length)return!1;for(d=0;d<f.length;d++)if(f[d]!==e.defaultBuffer[d])return!1;return!0}},55541:(a,b,c)=>{var d=c(79428).Buffer;a.exports=function(a){return"string"==typeof a?a:"number"==typeof a||d.isBuffer(a)?a.toString():JSON.stringify(a)}},56840:(a,b,c)=>{"use strict";var d,e=c(79428),f=e.Buffer,g={};for(d in e)e.hasOwnProperty(d)&&"SlowBuffer"!==d&&"Buffer"!==d&&(g[d]=e[d]);var h=g.Buffer={};for(d in f)f.hasOwnProperty(d)&&"allocUnsafe"!==d&&"allocUnsafeSlow"!==d&&(h[d]=f[d]);if(g.Buffer.prototype=f.prototype,h.from&&h.from!==Uint8Array.from||(h.from=function(a,b,c){if("number"==typeof a)throw TypeError('The "value" argument must not be of type number. Received type '+typeof a);if(a&&void 0===a.length)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof a);return f(a,b,c)}),h.alloc||(h.alloc=function(a,b,c){if("number"!=typeof a)throw TypeError('The "size" argument must be of type number. Received type '+typeof a);if(a<0||a>=2*0x40000000)throw RangeError('The value "'+a+'" is invalid for option "size"');var d=f(a);return b&&0!==b.length?"string"==typeof c?d.fill(b,c):d.fill(b):d.fill(0),d}),!g.kStringMaxLength)try{g.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(a){}!g.constants&&(g.constants={MAX_LENGTH:g.kMaxLength},g.kStringMaxLength&&(g.constants.MAX_STRING_LENGTH=g.kStringMaxLength)),a.exports=g},58219:(a,b,c)=>{"use strict";b.Reporter=c(47734).a,b.DecoderBuffer=c(3465).t,b.EncoderBuffer=c(3465).d,b.Node=c(44955)},60022:function(a,b,c){"use strict";var d=this&&this.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c);var e=Object.getOwnPropertyDescriptor(b,c);(!e||("get"in e?!b.__esModule:e.writable||e.configurable))&&(e={enumerable:!0,get:function(){return b[c]}}),Object.defineProperty(a,d,e)}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),e=this&&this.__setModuleDefault||(Object.create?function(a,b){Object.defineProperty(a,"default",{enumerable:!0,value:b})}:function(a,b){a.default=b}),f=this&&this.__importStar||function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)"default"!==c&&Object.prototype.hasOwnProperty.call(a,c)&&d(b,a,c);return e(b,a),b},g=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.HttpsProxyAgent=void 0;let h=f(c(91645)),i=f(c(34631)),j=g(c(12412)),k=g(c(11223)),l=c(78563),m=c(79551),n=c(5390),o=(0,k.default)("https-proxy-agent"),p=a=>void 0===a.servername&&a.host&&!h.isIP(a.host)?{...a,servername:a.host}:a;class q extends l.Agent{constructor(a,b){super(b),this.options={path:void 0},this.proxy="string"==typeof a?new m.URL(a):a,this.proxyHeaders=b?.headers??{},o("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let c=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),d=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...b?s(b,"headers"):null,host:c,port:d}}async connect(a,b){let c,{proxy:d}=this;if(!b.host)throw TypeError('No "host" provided');"https:"===d.protocol?(o("Creating `tls.Socket`: %o",this.connectOpts),c=i.connect(p(this.connectOpts))):(o("Creating `net.Socket`: %o",this.connectOpts),c=h.connect(this.connectOpts));let e="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},f=h.isIPv6(b.host)?`[${b.host}]`:b.host,g=`CONNECT ${f}:${b.port} HTTP/1.1\r
2
+ `;if(d.username||d.password){let a=`${decodeURIComponent(d.username)}:${decodeURIComponent(d.password)}`;e["Proxy-Authorization"]=`Basic ${Buffer.from(a).toString("base64")}`}for(let a of(e.Host=`${f}:${b.port}`,e["Proxy-Connection"]||(e["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close"),Object.keys(e)))g+=`${a}: ${e[a]}\r
3
+ `;let k=(0,n.parseProxyResponse)(c);c.write(`${g}\r
4
+ `);let{connect:l,buffered:m}=await k;if(a.emit("proxyConnect",l),this.emit("proxyConnect",l,a),200===l.statusCode)return(a.once("socket",r),b.secureEndpoint)?(o("Upgrading socket connection to TLS"),i.connect({...s(p(b),"host","path","port"),socket:c})):c;c.destroy();let q=new h.Socket({writable:!1});return q.readable=!0,a.once("socket",a=>{o("Replaying proxy buffer for failed request"),(0,j.default)(a.listenerCount("data")>0),a.push(m),a.push(null)}),q}}function r(a){a.resume()}function s(a,...b){let c,d={};for(c in a)b.includes(c)||(d[c]=a[c]);return d}q.protocols=["http","https"],b.HttpsProxyAgent=q},63941:(a,b,c)=>{"use strict";let d=c(42547),e=c(69311),f=c(26699);function g(a,b){this.name=a,this.body=b,this.decoders={},this.encoders={}}b.define=function(a,b){return new g(a,b)},g.prototype._createNamed=function(a){let b=this.name;function c(a){this._initNamed(a,b)}return f(c,a),c.prototype._initNamed=function(b,c){a.call(this,b,c)},new c(this)},g.prototype._getDecoder=function(a){return a=a||"der",this.decoders.hasOwnProperty(a)||(this.decoders[a]=this._createNamed(e[a])),this.decoders[a]},g.prototype.decode=function(a,b,c){return this._getDecoder(b).decode(a,c)},g.prototype._getEncoder=function(a){return a=a||"der",this.encoders.hasOwnProperty(a)||(this.encoders[a]=this._createNamed(d[a])),this.encoders[a]},g.prototype.encode=function(a,b,c){return this._getEncoder(b).encode(a,c)}},67768:(a,b,c)=>{"use strict";let d,e=c(79551),f=c(55591),g=c(77117),h=c(52974),i=c(45703),j=c(19606),k=c(4036),l="";function m(){}m.prototype.setGCMAPIKey=function(a){if(null===a){l=null;return}if(void 0===a||"string"!=typeof a||0===a.length)throw Error("The GCM API Key should be a non-empty string or null.");l=a},m.prototype.setVapidDetails=function(a,b,c){if(1==arguments.length&&null===arguments[0]){d=null;return}h.validateSubject(a),h.validatePublicKey(b),h.validatePrivateKey(c),d={subject:a,publicKey:b,privateKey:c}},m.prototype.generateRequestDetails=function(a,b,c){let g,m,n,o;if(!a||!a.endpoint)throw Error("You must pass in a subscription with at least an endpoint.");if("string"!=typeof a.endpoint||0===a.endpoint.length)throw Error("The subscription endpoint must be a string with a valid URL.");if(b&&("object"!=typeof a||!a.keys||!a.keys.p256dh||!a.keys.auth))throw Error("To send a message with a payload, the subscription must have 'auth' and 'p256dh' keys.");let p=l,q=d,r=2419200,s={},t=j.supportedContentEncodings.AES_128_GCM,u=j.supportedUrgency.NORMAL;if(c){let a=["headers","gcmAPIKey","vapidDetails","TTL","contentEncoding","urgency","topic","proxy","agent","timeout"],b=Object.keys(c);for(let c=0;c<b.length;c+=1){let d=b[c];if(!a.includes(d))throw Error("'"+d+"' is an invalid option. The valid options are ['"+a.join("', '")+"'].")}if(c.headers){let a=Object.keys(s=c.headers).filter(function(a){return void 0!==c[a]});if(a.length>0)throw Error("Duplicated headers defined ["+a.join(",")+"]. Please either define the header in thetop level options OR in the 'headers' key.")}if(c.gcmAPIKey&&(p=c.gcmAPIKey),void 0!==c.vapidDetails&&(q=c.vapidDetails),void 0!==c.TTL&&(r=Number(c.TTL))<0)throw Error("TTL should be a number and should be at least 0");if(c.contentEncoding)if(c.contentEncoding===j.supportedContentEncodings.AES_128_GCM||c.contentEncoding===j.supportedContentEncodings.AES_GCM)t=c.contentEncoding;else throw Error("Unsupported content encoding specified.");if(c.urgency)if(c.urgency===j.supportedUrgency.VERY_LOW||c.urgency===j.supportedUrgency.LOW||c.urgency===j.supportedUrgency.NORMAL||c.urgency===j.supportedUrgency.HIGH)u=c.urgency;else throw Error("Unsupported urgency specified.");if(c.topic){if(!k.validate(c.topic))throw Error("Unsupported characters set use the URL or filename-safe Base64 characters set");if(c.topic.length>32)throw Error("use maximum of 32 characters from the URL or filename-safe Base64 characters set");g=c.topic}c.proxy&&("string"==typeof c.proxy||"string"==typeof c.proxy.host?m=c.proxy:console.warn("Attempt to use proxy option, but invalid type it should be a string or proxy options object.")),c.agent&&(c.agent instanceof f.Agent?(m&&console.warn("Agent option will be ignored because proxy option is defined."),n=c.agent):console.warn("Wrong type for the agent option, it should be an instance of https.Agent.")),"number"==typeof c.timeout&&(o=c.timeout)}void 0===r&&(r=2419200);let v={method:"POST",headers:{TTL:r}};Object.keys(s).forEach(function(a){v.headers[a]=s[a]});let w=null;if(b){let c=i.encrypt(a.keys.p256dh,a.keys.auth,b,t);v.headers["Content-Length"]=c.cipherText.length,v.headers["Content-Type"]="application/octet-stream",t===j.supportedContentEncodings.AES_128_GCM?v.headers["Content-Encoding"]=j.supportedContentEncodings.AES_128_GCM:t===j.supportedContentEncodings.AES_GCM&&(v.headers["Content-Encoding"]=j.supportedContentEncodings.AES_GCM,v.headers.Encryption="salt="+c.salt,v.headers["Crypto-Key"]="dh="+c.localPublicKey.toString("base64url")),w=c.cipherText}else v.headers["Content-Length"]=0;let x=a.endpoint.startsWith("https://android.googleapis.com/gcm/send"),y=a.endpoint.startsWith("https://fcm.googleapis.com/fcm/send");if(x)p?v.headers.Authorization="key="+p:console.warn("Attempt to send push notification to GCM endpoint, but no GCM key is defined. Please use setGCMApiKey() or add 'gcmAPIKey' as an option.");else if(q){let b=e.parse(a.endpoint),c=b.protocol+"//"+b.host,d=h.getVapidHeaders(c,q.subject,q.publicKey,q.privateKey,t);v.headers.Authorization=d.Authorization,t===j.supportedContentEncodings.AES_GCM&&(v.headers["Crypto-Key"]?v.headers["Crypto-Key"]+=";"+d["Crypto-Key"]:v.headers["Crypto-Key"]=d["Crypto-Key"])}else y&&p&&(v.headers.Authorization="key="+p);return v.headers.Urgency=u,g&&(v.headers.Topic=g),v.body=w,v.endpoint=a.endpoint,m&&(v.proxy=m),n&&(v.agent=n),o&&(v.timeout=o),v},m.prototype.sendNotification=function(a,b,d){let h;try{h=this.generateRequestDetails(a,b,d)}catch(a){return Promise.reject(a)}return new Promise(function(a,b){let d={},i=e.parse(h.endpoint);if(d.hostname=i.hostname,d.port=i.port,d.path=i.path,d.headers=h.headers,d.method=h.method,h.timeout&&(d.timeout=h.timeout),h.agent&&(d.agent=h.agent),h.proxy){let{HttpsProxyAgent:a}=c(60022);d.agent=new a(h.proxy)}let j=f.request(d,function(c){let d="";c.on("data",function(a){d+=a}),c.on("end",function(){c.statusCode<200||c.statusCode>299?b(new g("Received unexpected response code",c.statusCode,c.headers,d,h.endpoint)):a({statusCode:c.statusCode,body:d,headers:c.headers})})});h.timeout&&j.on("timeout",function(){j.destroy(Error("Socket timeout"))}),j.on("error",function(a){b(a)}),h.body&&j.write(h.body),j.end()})},a.exports=m},69311:(a,b,c)=>{"use strict";b.der=c(41720),b.pem=c(30721)},69929:(a,b,c)=>{var d=c(43481),e=c(46165);b.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],b.sign=d.sign,b.verify=e.verify,b.decode=e.decode,b.isValid=e.isValid,b.createSign=function(a){return new d(a)},b.createVerify=function(a){return new e(a)}},70346:(a,b,c)=>{var d=c(93619).Buffer,e=c(27910);function f(a){if(this.buffer=null,this.writable=!0,this.readable=!0,!a)return this.buffer=d.alloc(0),this;if("function"==typeof a.pipe)return this.buffer=d.alloc(0),a.pipe(this),this;if(a.length||"object"==typeof a)return this.buffer=a,this.writable=!1,process.nextTick((function(){this.emit("end",a),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof a+")")}c(28354).inherits(f,e),f.prototype.write=function(a){this.buffer=d.concat([this.buffer,d.from(a)]),this.emit("data",a)},f.prototype.end=function(a){a&&this.write(a),this.emit("end",a),this.emit("close"),this.writable=!1,this.readable=!1},a.exports=f},75197:(a,b,c)=>{"use strict";let d=c(26699),e=c(53108);function f(a){e.call(this,a),this.enc="pem"}d(f,e),a.exports=f,f.prototype.encode=function(a,b){let c=e.prototype.encode.call(this,a).toString("base64"),d=["-----BEGIN "+b.label+"-----"];for(let a=0;a<c.length;a+=64)d.push(c.slice(a,a+64));return d.push("-----END "+b.label+"-----"),d.join("\n")}},75459:(a,b,c)=>{"use strict";var d=c(79428).Buffer,e=c(79428).SlowBuffer;function f(a,b){if(!d.isBuffer(a)||!d.isBuffer(b)||a.length!==b.length)return!1;for(var c=0,e=0;e<a.length;e++)c|=a[e]^b[e];return 0===c}a.exports=f,f.install=function(){d.prototype.equal=e.prototype.equal=function(a){return f(this,a)}};var g=d.prototype.equal,h=e.prototype.equal;f.restore=function(){d.prototype.equal=g,e.prototype.equal=h}},77117:(a,b,c)=>{"use strict";function d(a,b,c,d,e){Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=a,this.statusCode=b,this.headers=c,this.body=d,this.endpoint=e}c(28354).inherits(d,Error),a.exports=d},77390:a=>{"use strict";function b(a){return(a/8|0)+ +(a%8!=0)}var c={ES256:b(256),ES384:b(384),ES512:b(521)};a.exports=function(a){var b=c[a];if(b)return b;throw Error('Unknown algorithm "'+a+'"')}},78563:function(a,b,c){"use strict";var d=this&&this.__createBinding||(Object.create?function(a,b,c,d){void 0===d&&(d=c);var e=Object.getOwnPropertyDescriptor(b,c);(!e||("get"in e?!b.__esModule:e.writable||e.configurable))&&(e={enumerable:!0,get:function(){return b[c]}}),Object.defineProperty(a,d,e)}:function(a,b,c,d){void 0===d&&(d=c),a[d]=b[c]}),e=this&&this.__setModuleDefault||(Object.create?function(a,b){Object.defineProperty(a,"default",{enumerable:!0,value:b})}:function(a,b){a.default=b}),f=this&&this.__importStar||function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)"default"!==c&&Object.prototype.hasOwnProperty.call(a,c)&&d(b,a,c);return e(b,a),b},g=this&&this.__exportStar||function(a,b){for(var c in a)"default"===c||Object.prototype.hasOwnProperty.call(b,c)||d(b,a,c)};Object.defineProperty(b,"__esModule",{value:!0}),b.Agent=void 0;let h=f(c(91645)),i=f(c(81630)),j=c(55591);g(c(30266),b);let k=Symbol("AgentBaseInternalState");class l extends i.Agent{constructor(a){super(a),this[k]={}}isSecureEndpoint(a){if(a){if("boolean"==typeof a.secureEndpoint)return a.secureEndpoint;if("string"==typeof a.protocol)return"https:"===a.protocol}let{stack:b}=Error();return"string"==typeof b&&b.split("\n").some(a=>-1!==a.indexOf("(https.js:")||-1!==a.indexOf("node:https:"))}incrementSockets(a){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[a]||(this.sockets[a]=[]);let b=new h.Socket({writable:!1});return this.sockets[a].push(b),this.totalSocketCount++,b}decrementSockets(a,b){if(!this.sockets[a]||null===b)return;let c=this.sockets[a],d=c.indexOf(b);-1!==d&&(c.splice(d,1),this.totalSocketCount--,0===c.length&&delete this.sockets[a])}getName(a){return this.isSecureEndpoint(a)?j.Agent.prototype.getName.call(this,a):super.getName(a)}createSocket(a,b,c){let d={...b,secureEndpoint:this.isSecureEndpoint(b)},e=this.getName(d),f=this.incrementSockets(e);Promise.resolve().then(()=>this.connect(a,d)).then(g=>{if(this.decrementSockets(e,f),g instanceof i.Agent)try{return g.addRequest(a,d)}catch(a){return c(a)}this[k].currentSocket=g,super.createSocket(a,b,c)},a=>{this.decrementSockets(e,f),c(a)})}createConnection(){let a=this[k].currentSocket;if(this[k].currentSocket=void 0,!a)throw Error("No socket was returned in the `connect()` function");return a}get defaultPort(){return this[k].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(a){this[k]&&(this[k].defaultPort=a)}get protocol(){return this[k].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(a){this[k]&&(this[k].protocol=a)}}b.Agent=l},85748:a=>{"function"==typeof Object.create?a.exports=function(a,b){b&&(a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:a.exports=function(a,b){if(b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}}},87202:a=>{"use strict";a.exports=(a,b=process.argv)=>{let c=a.startsWith("-")?"":1===a.length?"-":"--",d=b.indexOf(c+a),e=b.indexOf("--");return -1!==d&&(-1===e||d<e)}},90007:(a,b,c)=>{let d=c(83997),e=c(28354);b.init=function(a){a.inspectOpts={};let c=Object.keys(b.inspectOpts);for(let d=0;d<c.length;d++)a.inspectOpts[c[d]]=b.inspectOpts[c[d]]},b.log=function(...a){return process.stderr.write(e.formatWithOptions(b.inspectOpts,...a)+"\n")},b.formatArgs=function(c){let{namespace:d,useColors:e}=this;if(e){let b=this.color,e="\x1b[3"+(b<8?b:"8;5;"+b),f=` ${e};1m${d} \u001B[0m`;c[0]=f+c[0].split("\n").join("\n"+f),c.push(e+"m+"+a.exports.humanize(this.diff)+"\x1b[0m")}else c[0]=(b.inspectOpts.hideDate?"":new Date().toISOString()+" ")+d+" "+c[0]},b.save=function(a){a?process.env.DEBUG=a:delete process.env.DEBUG},b.load=function(){return process.env.DEBUG},b.useColors=function(){return"colors"in b.inspectOpts?!!b.inspectOpts.colors:d.isatty(process.stderr.fd)},b.destroy=e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),b.colors=[6,2,3,4,5,1];try{let a=c(22405);a&&(a.stderr||a).level>=2&&(b.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(a){}b.inspectOpts=Object.keys(process.env).filter(a=>/^debug_/i.test(a)).reduce((a,b)=>{let c=b.substring(6).toLowerCase().replace(/_([a-z])/g,(a,b)=>b.toUpperCase()),d=process.env[b];return d=!!/^(yes|on|true|enabled)$/i.test(d)||!/^(no|off|false|disabled)$/i.test(d)&&("null"===d?null:Number(d)),a[c]=d,a},{}),a.exports=c(98102)(b);let{formatters:f}=a.exports;f.o=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts).split("\n").map(a=>a.trim()).join(" ")},f.O=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts)}},93619:(a,b,c)=>{var d=c(79428),e=d.Buffer;function f(a,b){for(var c in a)b[c]=a[c]}function g(a,b,c){return e(a,b,c)}e.from&&e.alloc&&e.allocUnsafe&&e.allocUnsafeSlow?a.exports=d:(f(d,b),b.Buffer=g),g.prototype=Object.create(e.prototype),f(e,g),g.from=function(a,b,c){if("number"==typeof a)throw TypeError("Argument must not be a number");return e(a,b,c)},g.alloc=function(a,b,c){if("number"!=typeof a)throw TypeError("Argument must be a number");var d=e(a);return void 0!==b?"string"==typeof c?d.fill(b,c):d.fill(b):d.fill(0),d},g.allocUnsafe=function(a){if("number"!=typeof a)throw TypeError("Argument must be a number");return e(a)},g.allocUnsafeSlow=function(a){if("number"!=typeof a)throw TypeError("Argument must be a number");return d.SlowBuffer(a)}},95695:(a,b,c)=>{"use strict";b._reverse=function(a){let b={};return Object.keys(a).forEach(function(c){(0|c)==c&&(c|=0),b[a[c]]=c}),b},b.der=c(27976)},95736:(a,b,c)=>{"use strict";a.exports=c(44870)},98102:(a,b,c)=>{a.exports=function(a){function b(a){let c,e,f,g=null;function h(...a){if(!h.enabled)return;let d=Number(new Date);h.diff=d-(c||d),h.prev=c,h.curr=d,c=d,a[0]=b.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");let e=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(c,d)=>{if("%%"===c)return"%";e++;let f=b.formatters[d];if("function"==typeof f){let b=a[e];c=f.call(h,b),a.splice(e,1),e--}return c}),b.formatArgs.call(h,a),(h.log||b.log).apply(h,a)}return h.namespace=a,h.useColors=b.useColors(),h.color=b.selectColor(a),h.extend=d,h.destroy=b.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==g?g:(e!==b.namespaces&&(e=b.namespaces,f=b.enabled(a)),f),set:a=>{g=a}}),"function"==typeof b.init&&b.init(h),h}function d(a,c){let d=b(this.namespace+(void 0===c?":":c)+a);return d.log=this.log,d}function e(a,b){let c=0,d=0,e=-1,f=0;for(;c<a.length;)if(d<b.length&&(b[d]===a[c]||"*"===b[d]))"*"===b[d]?(e=d,f=c):c++,d++;else{if(-1===e)return!1;d=e+1,c=++f}for(;d<b.length&&"*"===b[d];)d++;return d===b.length}return b.debug=b,b.default=b,b.coerce=function(a){return a instanceof Error?a.stack||a.message:a},b.disable=function(){let a=[...b.names,...b.skips.map(a=>"-"+a)].join(",");return b.enable(""),a},b.enable=function(a){for(let c of(b.save(a),b.namespaces=a,b.names=[],b.skips=[],("string"==typeof a?a:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===c[0]?b.skips.push(c.slice(1)):b.names.push(c)},b.enabled=function(a){for(let c of b.skips)if(e(a,c))return!1;for(let c of b.names)if(e(a,c))return!0;return!1},b.humanize=c(42095),b.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(a).forEach(c=>{b[c]=a[c]}),b.names=[],b.skips=[],b.formatters={},b.selectColor=function(a){let c=0;for(let b=0;b<a.length;b++)c=(c<<5)-c+a.charCodeAt(b)|0;return b.colors[Math.abs(c)%b.colors.length]},b.enable(b.load()),b}}};