9router 0.4.9 → 0.4.10

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 (683) hide show
  1. package/README.md +74 -32
  2. package/app/.next/BUILD_ID +1 -1
  3. package/app/.next/app-path-routes-manifest.json +8 -6
  4. package/app/.next/build-manifest.json +2 -2
  5. package/app/.next/routes-manifest.json +12 -0
  6. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  10. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  13. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  16. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  19. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  22. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  25. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page.js +3 -3
  28. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page.js.nft.json +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/combo/[id]/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  31. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  34. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  37. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  40. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  43. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  46. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  49. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  50. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  52. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  55. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  58. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  59. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  60. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  61. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  62. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  63. package/app/.next/server/app/_global-error/page.js +3 -3
  64. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/_global-error.html +1 -1
  66. package/app/.next/server/app/_global-error.rsc +1 -1
  67. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  69. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  70. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  71. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  72. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  73. package/app/.next/server/app/_not-found/page.js +2 -2
  74. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  75. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  76. package/app/.next/server/app/_not-found.html +1 -1
  77. package/app/.next/server/app/_not-found.rsc +4 -4
  78. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  79. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  80. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  81. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  82. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  83. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  84. package/app/.next/server/app/api/auth/login/route.js +1 -1
  85. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  86. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  87. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  88. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +1 -1
  89. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
  90. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  91. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +1 -1
  92. package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  93. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  94. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  95. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  96. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  97. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  98. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  99. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  100. package/app/.next/server/app/api/combos/route.js +1 -1
  101. package/app/.next/server/app/api/health/route.js +1 -1
  102. package/app/.next/server/app/api/init/route.js +1 -1
  103. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  104. package/app/.next/server/app/api/keys/route.js +1 -1
  105. package/app/.next/server/app/api/locale/route.js +1 -1
  106. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -0
  107. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -0
  108. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -0
  109. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  110. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  111. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -0
  112. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -0
  113. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -0
  114. package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
  115. package/app/.next/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  116. package/app/.next/server/app/api/models/alias/route.js +1 -1
  117. package/app/.next/server/app/api/models/availability/route.js +1 -1
  118. package/app/.next/server/app/api/models/custom/route.js +1 -1
  119. package/app/.next/server/app/api/models/route.js +1 -1
  120. package/app/.next/server/app/api/models/route.js.nft.json +1 -1
  121. package/app/.next/server/app/api/models/test/route.js +1 -1
  122. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  123. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  124. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  125. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  126. package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
  127. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
  128. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  129. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  130. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  131. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  132. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  133. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  134. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  135. package/app/.next/server/app/api/pricing/route.js +1 -1
  136. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  137. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  138. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  139. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  140. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  141. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  142. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  143. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  144. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  145. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  146. package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  147. package/app/.next/server/app/api/providers/client/route.js +1 -1
  148. package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
  149. package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
  150. package/app/.next/server/app/api/providers/route.js +1 -1
  151. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  152. package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
  153. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  154. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  155. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  156. package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
  157. package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
  158. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  159. package/app/.next/server/app/api/proxy-pools/route.js +1 -1
  160. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  161. package/app/.next/server/app/api/settings/database/route.js +1 -1
  162. package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
  163. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  164. package/app/.next/server/app/api/settings/route.js +1 -1
  165. package/app/.next/server/app/api/shutdown/route.js +1 -1
  166. package/app/.next/server/app/api/tags/route.js +1 -1
  167. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  168. package/app/.next/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  169. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  170. package/app/.next/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  171. package/app/.next/server/app/api/translator/load/route.js +1 -1
  172. package/app/.next/server/app/api/translator/save/route.js +1 -1
  173. package/app/.next/server/app/api/translator/send/route.js +1 -1
  174. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  175. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  176. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  177. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  178. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  179. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +23 -4
  180. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  181. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  182. package/app/.next/server/app/api/tunnel/tailscale-install/route.js +2 -2
  183. package/app/.next/server/app/api/tunnel/tailscale-login/route.js +23 -4
  184. package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  185. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  186. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  187. package/app/.next/server/app/api/usage/chart/route.js +1 -1
  188. package/app/.next/server/app/api/usage/history/route.js +1 -1
  189. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  190. package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
  191. package/app/.next/server/app/api/usage/request-details/route.js +1 -1
  192. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  193. package/app/.next/server/app/api/usage/stats/route.js +1 -1
  194. package/app/.next/server/app/api/usage/stream/route.js +2 -2
  195. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  196. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  197. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  198. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  199. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  200. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  201. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  202. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  203. package/app/.next/server/app/api/v1/images/generations/route.js +2 -2
  204. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  205. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  206. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  207. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  208. package/app/.next/server/app/api/v1/models/route.js +1 -1
  209. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  210. package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
  211. package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  212. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  213. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  214. package/app/.next/server/app/api/v1/route.js +1 -1
  215. package/app/.next/server/app/api/v1/search/route.js +1 -1
  216. package/app/.next/server/app/api/v1/search/route.js.nft.json +1 -1
  217. package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
  218. package/app/.next/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  219. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  220. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  221. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  222. package/app/.next/server/app/api/v1beta/models/route.js.nft.json +1 -1
  223. package/app/.next/server/app/api/version/route.js +1 -1
  224. package/app/.next/server/app/api/version/update/route.js +1 -1
  225. package/app/.next/server/app/api/version/update/route.js.nft.json +1 -1
  226. package/app/.next/server/app/callback/page.js +2 -2
  227. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  228. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  229. package/app/.next/server/app/callback.html +1 -1
  230. package/app/.next/server/app/callback.rsc +4 -4
  231. package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
  232. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  233. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  234. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  235. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  236. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  237. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  238. package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
  239. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  240. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  241. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  242. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  243. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  244. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  245. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  246. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  247. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  248. package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
  249. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  250. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  251. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  252. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  253. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  254. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  255. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  256. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  257. package/app/.next/server/app/dashboard/combos.html +1 -1
  258. package/app/.next/server/app/dashboard/combos.rsc +6 -6
  259. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  260. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  261. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  262. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  263. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  264. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  265. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  266. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  267. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  268. package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
  269. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  270. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  271. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  272. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  273. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  274. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  275. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  276. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  277. package/app/.next/server/app/dashboard/media-providers/web.html +1 -1
  278. package/app/.next/server/app/dashboard/media-providers/web.rsc +6 -6
  279. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  280. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  281. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  282. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  283. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  284. package/app/.next/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  285. package/app/.next/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  286. package/app/.next/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  287. package/app/.next/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  288. package/app/.next/server/app/dashboard/mitm.html +1 -1
  289. package/app/.next/server/app/dashboard/mitm.rsc +6 -6
  290. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  291. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  292. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  293. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  294. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  295. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  296. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  297. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  298. package/app/.next/server/app/dashboard/profile.html +1 -1
  299. package/app/.next/server/app/dashboard/profile.rsc +6 -6
  300. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  301. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  302. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  303. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  304. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  305. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  306. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  307. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  308. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  309. package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
  310. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  311. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  312. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  313. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  314. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  315. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  316. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  317. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  318. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  319. package/app/.next/server/app/dashboard/providers.html +1 -1
  320. package/app/.next/server/app/dashboard/providers.rsc +6 -6
  321. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  322. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  323. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  324. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  325. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  326. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  327. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  328. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  329. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  330. package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
  331. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  332. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  333. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  334. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  335. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  336. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  337. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  338. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  339. package/app/.next/server/app/dashboard/quota.html +2 -2
  340. package/app/.next/server/app/dashboard/quota.rsc +7 -7
  341. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  342. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  343. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  344. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  345. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  346. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  347. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  348. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  349. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  350. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  351. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  352. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  353. package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
  354. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  355. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  356. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  357. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  358. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  359. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  360. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  361. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  362. package/app/.next/server/app/dashboard/translator.html +1 -1
  363. package/app/.next/server/app/dashboard/translator.rsc +6 -6
  364. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  365. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  366. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  367. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  368. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  369. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  370. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  371. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  372. package/app/.next/server/app/dashboard/usage.html +1 -1
  373. package/app/.next/server/app/dashboard/usage.rsc +6 -6
  374. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  375. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  376. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  377. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  378. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  379. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  380. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  381. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  382. package/app/.next/server/app/dashboard.html +1 -1
  383. package/app/.next/server/app/dashboard.rsc +6 -6
  384. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  385. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  386. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  387. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +6 -6
  388. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  389. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
  390. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  391. package/app/.next/server/app/favicon.ico/route.js +1 -1
  392. package/app/.next/server/app/index.html +1 -1
  393. package/app/.next/server/app/index.rsc +4 -4
  394. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  395. package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
  396. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  397. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  398. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  399. package/app/.next/server/app/landing/page.js +2 -2
  400. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  401. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  402. package/app/.next/server/app/landing.html +1 -1
  403. package/app/.next/server/app/landing.rsc +4 -4
  404. package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
  405. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  406. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  407. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  408. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  409. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  410. package/app/.next/server/app/login/page.js +2 -2
  411. package/app/.next/server/app/login/page.js.nft.json +1 -1
  412. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  413. package/app/.next/server/app/login.html +1 -1
  414. package/app/.next/server/app/login.rsc +5 -5
  415. package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
  416. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  417. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  418. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  419. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  420. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  421. package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
  422. package/app/.next/server/app/page.js +2 -2
  423. package/app/.next/server/app/page.js.nft.json +1 -1
  424. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  425. package/app/.next/server/app-paths-manifest.json +8 -6
  426. package/app/.next/server/chunks/2049.js +1 -1
  427. package/app/.next/server/chunks/21.js +1 -0
  428. package/app/.next/server/chunks/2141.js +1 -0
  429. package/app/.next/server/chunks/253.js +1 -1
  430. package/app/.next/server/chunks/450.js +1 -1
  431. package/app/.next/server/chunks/5053.js +2 -2
  432. package/app/.next/server/chunks/5339.js +1 -0
  433. package/app/.next/server/chunks/6762.js +1 -1
  434. package/app/.next/server/chunks/8035.js +1 -1
  435. package/app/.next/server/chunks/8193.js +1 -0
  436. package/app/.next/server/chunks/8202.js +1 -1
  437. package/app/.next/server/chunks/8443.js +1 -0
  438. package/app/.next/server/chunks/8513.js +37 -5
  439. package/app/.next/server/middleware-build-manifest.js +1 -1
  440. package/app/.next/server/middleware.js +4 -4
  441. package/app/.next/server/pages/404.html +1 -1
  442. package/app/.next/server/pages/500.html +1 -1
  443. package/app/.next/static/chunks/{4156-1f56c7a3aae06a55.js → 4156-dffbf1c435fa1271.js} +1 -1
  444. package/app/.next/static/chunks/{4380-a1b3532b40aa042e.js → 4380-8da8f918438df3db.js} +1 -1
  445. package/app/.next/static/chunks/505-95735f48c78c669c.js +1 -0
  446. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-b983df0546f58fc3.js → page-72f2d697d6bc8b5f.js} +10 -10
  447. package/app/.next/static/chunks/app/_global-error/page-4474a75ccd0bff0e.js +1 -0
  448. package/app/.next/static/chunks/app/api/auth/login/route-4474a75ccd0bff0e.js +1 -0
  449. package/app/.next/static/chunks/app/api/auth/logout/route-4474a75ccd0bff0e.js +1 -0
  450. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4474a75ccd0bff0e.js +1 -0
  451. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-4474a75ccd0bff0e.js +1 -0
  452. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-4474a75ccd0bff0e.js +1 -0
  453. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-4474a75ccd0bff0e.js +1 -0
  454. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-4474a75ccd0bff0e.js +1 -0
  455. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-4474a75ccd0bff0e.js +1 -0
  456. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-4474a75ccd0bff0e.js +1 -0
  457. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-4474a75ccd0bff0e.js +1 -0
  458. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-4474a75ccd0bff0e.js +1 -0
  459. package/app/.next/static/chunks/app/api/cloud/auth/route-4474a75ccd0bff0e.js +1 -0
  460. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-4474a75ccd0bff0e.js +1 -0
  461. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-4474a75ccd0bff0e.js +1 -0
  462. package/app/.next/static/chunks/app/api/cloud/models/alias/route-4474a75ccd0bff0e.js +1 -0
  463. package/app/.next/static/chunks/app/api/combos/[id]/route-4474a75ccd0bff0e.js +1 -0
  464. package/app/.next/static/chunks/app/api/combos/route-4474a75ccd0bff0e.js +1 -0
  465. package/app/.next/static/chunks/app/api/health/route-4474a75ccd0bff0e.js +1 -0
  466. package/app/.next/static/chunks/app/api/init/route-4474a75ccd0bff0e.js +1 -0
  467. package/app/.next/static/chunks/app/api/keys/[id]/route-4474a75ccd0bff0e.js +1 -0
  468. package/app/.next/static/chunks/app/api/keys/route-4474a75ccd0bff0e.js +1 -0
  469. package/app/.next/static/chunks/app/api/locale/route-4474a75ccd0bff0e.js +1 -0
  470. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4474a75ccd0bff0e.js +1 -0
  471. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4474a75ccd0bff0e.js +1 -0
  472. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-4474a75ccd0bff0e.js +1 -0
  473. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-4474a75ccd0bff0e.js +1 -0
  474. package/app/.next/static/chunks/app/api/models/alias/route-4474a75ccd0bff0e.js +1 -0
  475. package/app/.next/static/chunks/app/api/models/availability/route-4474a75ccd0bff0e.js +1 -0
  476. package/app/.next/static/chunks/app/api/models/custom/route-4474a75ccd0bff0e.js +1 -0
  477. package/app/.next/static/chunks/app/api/models/route-4474a75ccd0bff0e.js +1 -0
  478. package/app/.next/static/chunks/app/api/models/test/route-4474a75ccd0bff0e.js +1 -0
  479. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-4474a75ccd0bff0e.js +1 -0
  480. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-4474a75ccd0bff0e.js +1 -0
  481. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-4474a75ccd0bff0e.js +1 -0
  482. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-4474a75ccd0bff0e.js +1 -0
  483. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-4474a75ccd0bff0e.js +1 -0
  484. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-4474a75ccd0bff0e.js +1 -0
  485. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-4474a75ccd0bff0e.js +1 -0
  486. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-4474a75ccd0bff0e.js +1 -0
  487. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-4474a75ccd0bff0e.js +1 -0
  488. package/app/.next/static/chunks/app/api/pricing/route-4474a75ccd0bff0e.js +1 -0
  489. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-4474a75ccd0bff0e.js +1 -0
  490. package/app/.next/static/chunks/app/api/provider-nodes/route-4474a75ccd0bff0e.js +1 -0
  491. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-4474a75ccd0bff0e.js +1 -0
  492. package/app/.next/static/chunks/app/api/providers/[id]/models/route-4474a75ccd0bff0e.js +1 -0
  493. package/app/.next/static/chunks/app/api/providers/[id]/route-4474a75ccd0bff0e.js +1 -0
  494. package/app/.next/static/chunks/app/api/providers/[id]/test/route-4474a75ccd0bff0e.js +1 -0
  495. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-4474a75ccd0bff0e.js +1 -0
  496. package/app/.next/static/chunks/app/api/providers/client/route-4474a75ccd0bff0e.js +1 -0
  497. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-4474a75ccd0bff0e.js +1 -0
  498. package/app/.next/static/chunks/app/api/providers/route-4474a75ccd0bff0e.js +1 -0
  499. package/app/.next/static/chunks/app/api/providers/suggested-models/route-4474a75ccd0bff0e.js +1 -0
  500. package/app/.next/static/chunks/app/api/providers/test-batch/route-4474a75ccd0bff0e.js +1 -0
  501. package/app/.next/static/chunks/app/api/providers/validate/route-4474a75ccd0bff0e.js +1 -0
  502. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-4474a75ccd0bff0e.js +1 -0
  503. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-4474a75ccd0bff0e.js +1 -0
  504. package/app/.next/static/chunks/app/api/proxy-pools/route-4474a75ccd0bff0e.js +1 -0
  505. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-4474a75ccd0bff0e.js +1 -0
  506. package/app/.next/static/chunks/app/api/settings/database/route-4474a75ccd0bff0e.js +1 -0
  507. package/app/.next/static/chunks/app/api/settings/proxy-test/route-4474a75ccd0bff0e.js +1 -0
  508. package/app/.next/static/chunks/app/api/settings/require-login/route-4474a75ccd0bff0e.js +1 -0
  509. package/app/.next/static/chunks/app/api/settings/route-4474a75ccd0bff0e.js +1 -0
  510. package/app/.next/static/chunks/app/api/shutdown/route-4474a75ccd0bff0e.js +1 -0
  511. package/app/.next/static/chunks/app/api/tags/route-4474a75ccd0bff0e.js +1 -0
  512. package/app/.next/static/chunks/app/api/translator/console-logs/route-4474a75ccd0bff0e.js +1 -0
  513. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-4474a75ccd0bff0e.js +1 -0
  514. package/app/.next/static/chunks/app/api/translator/load/route-4474a75ccd0bff0e.js +1 -0
  515. package/app/.next/static/chunks/app/api/translator/save/route-4474a75ccd0bff0e.js +1 -0
  516. package/app/.next/static/chunks/app/api/translator/send/route-4474a75ccd0bff0e.js +1 -0
  517. package/app/.next/static/chunks/app/api/translator/translate/route-4474a75ccd0bff0e.js +1 -0
  518. package/app/.next/static/chunks/app/api/tunnel/disable/route-4474a75ccd0bff0e.js +1 -0
  519. package/app/.next/static/chunks/app/api/tunnel/enable/route-4474a75ccd0bff0e.js +1 -0
  520. package/app/.next/static/chunks/app/api/tunnel/status/route-4474a75ccd0bff0e.js +1 -0
  521. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-4474a75ccd0bff0e.js +1 -0
  522. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-4474a75ccd0bff0e.js +1 -0
  523. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-4474a75ccd0bff0e.js +1 -0
  524. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-4474a75ccd0bff0e.js +1 -0
  525. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-4474a75ccd0bff0e.js +1 -0
  526. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-4474a75ccd0bff0e.js +1 -0
  527. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-4474a75ccd0bff0e.js +1 -0
  528. package/app/.next/static/chunks/app/api/usage/chart/route-4474a75ccd0bff0e.js +1 -0
  529. package/app/.next/static/chunks/app/api/usage/history/route-4474a75ccd0bff0e.js +1 -0
  530. package/app/.next/static/chunks/app/api/usage/providers/route-4474a75ccd0bff0e.js +1 -0
  531. package/app/.next/static/chunks/app/api/usage/request-details/route-4474a75ccd0bff0e.js +1 -0
  532. package/app/.next/static/chunks/app/api/usage/request-logs/route-4474a75ccd0bff0e.js +1 -0
  533. package/app/.next/static/chunks/app/api/usage/stats/route-4474a75ccd0bff0e.js +1 -0
  534. package/app/.next/static/chunks/app/api/usage/stream/route-4474a75ccd0bff0e.js +1 -0
  535. package/app/.next/static/chunks/app/api/v1/api/chat/route-4474a75ccd0bff0e.js +1 -0
  536. package/app/.next/static/chunks/app/api/v1/audio/speech/route-4474a75ccd0bff0e.js +1 -0
  537. package/app/.next/static/chunks/app/api/v1/chat/completions/route-4474a75ccd0bff0e.js +1 -0
  538. package/app/.next/static/chunks/app/api/v1/embeddings/route-4474a75ccd0bff0e.js +1 -0
  539. package/app/.next/static/chunks/app/api/v1/images/generations/route-4474a75ccd0bff0e.js +1 -0
  540. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-4474a75ccd0bff0e.js +1 -0
  541. package/app/.next/static/chunks/app/api/v1/messages/route-4474a75ccd0bff0e.js +1 -0
  542. package/app/.next/static/chunks/app/api/v1/models/route-4474a75ccd0bff0e.js +1 -0
  543. package/app/.next/static/chunks/app/api/v1/responses/compact/route-4474a75ccd0bff0e.js +1 -0
  544. package/app/.next/static/chunks/app/api/v1/responses/route-4474a75ccd0bff0e.js +1 -0
  545. package/app/.next/static/chunks/app/api/v1/route-4474a75ccd0bff0e.js +1 -0
  546. package/app/.next/static/chunks/app/api/v1/search/route-4474a75ccd0bff0e.js +1 -0
  547. package/app/.next/static/chunks/app/api/v1/web/fetch/route-4474a75ccd0bff0e.js +1 -0
  548. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-4474a75ccd0bff0e.js +1 -0
  549. package/app/.next/static/chunks/app/api/v1beta/models/route-4474a75ccd0bff0e.js +1 -0
  550. package/app/.next/static/chunks/app/api/version/route-4474a75ccd0bff0e.js +1 -0
  551. package/app/.next/static/chunks/app/api/version/update/route-4474a75ccd0bff0e.js +1 -0
  552. package/app/.next/static/chunks/app/manifest.webmanifest/route-4474a75ccd0bff0e.js +1 -0
  553. package/app/.next/static/chunks/app/page-4474a75ccd0bff0e.js +1 -0
  554. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-4474a75ccd0bff0e.js +1 -0
  555. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-4474a75ccd0bff0e.js +1 -0
  556. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-4474a75ccd0bff0e.js +1 -0
  557. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4474a75ccd0bff0e.js +1 -0
  558. package/app/.next/static/css/{7d19c5a9e0755804.css → e7f512f42893c6a3.css} +1 -1
  559. package/app/.next/static/opvV5qhNp8aVYocKuuu2V/_buildManifest.js +1 -0
  560. package/app/package.json +1 -1
  561. package/app/public/providers/coqui.png +0 -0
  562. package/app/public/providers/inworld.png +0 -0
  563. package/app/public/providers/tortoise.png +0 -0
  564. package/app/public/providers/voyage-ai.png +0 -0
  565. package/app/src/mitm/server.js +47 -24
  566. package/package.json +1 -1
  567. package/app/.next/server/chunks/1389.js +0 -1
  568. package/app/.next/server/chunks/2947.js +0 -1
  569. package/app/.next/server/chunks/5445.js +0 -1
  570. package/app/.next/server/chunks/9737.js +0 -1
  571. package/app/.next/server/chunks/9939.js +0 -1
  572. package/app/.next/static/chunks/505-b98ff32c878b32ba.js +0 -1
  573. package/app/.next/static/chunks/app/_global-error/page-d05c42dc5814fed2.js +0 -1
  574. package/app/.next/static/chunks/app/api/auth/login/route-d05c42dc5814fed2.js +0 -1
  575. package/app/.next/static/chunks/app/api/auth/logout/route-d05c42dc5814fed2.js +0 -1
  576. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d05c42dc5814fed2.js +0 -1
  577. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-d05c42dc5814fed2.js +0 -1
  578. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-d05c42dc5814fed2.js +0 -1
  579. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-d05c42dc5814fed2.js +0 -1
  580. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-d05c42dc5814fed2.js +0 -1
  581. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-d05c42dc5814fed2.js +0 -1
  582. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-d05c42dc5814fed2.js +0 -1
  583. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-d05c42dc5814fed2.js +0 -1
  584. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-d05c42dc5814fed2.js +0 -1
  585. package/app/.next/static/chunks/app/api/cloud/auth/route-d05c42dc5814fed2.js +0 -1
  586. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-d05c42dc5814fed2.js +0 -1
  587. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-d05c42dc5814fed2.js +0 -1
  588. package/app/.next/static/chunks/app/api/cloud/models/alias/route-d05c42dc5814fed2.js +0 -1
  589. package/app/.next/static/chunks/app/api/combos/[id]/route-d05c42dc5814fed2.js +0 -1
  590. package/app/.next/static/chunks/app/api/combos/route-d05c42dc5814fed2.js +0 -1
  591. package/app/.next/static/chunks/app/api/health/route-d05c42dc5814fed2.js +0 -1
  592. package/app/.next/static/chunks/app/api/init/route-d05c42dc5814fed2.js +0 -1
  593. package/app/.next/static/chunks/app/api/keys/[id]/route-d05c42dc5814fed2.js +0 -1
  594. package/app/.next/static/chunks/app/api/keys/route-d05c42dc5814fed2.js +0 -1
  595. package/app/.next/static/chunks/app/api/locale/route-d05c42dc5814fed2.js +0 -1
  596. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d05c42dc5814fed2.js +0 -1
  597. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-d05c42dc5814fed2.js +0 -1
  598. package/app/.next/static/chunks/app/api/models/alias/route-d05c42dc5814fed2.js +0 -1
  599. package/app/.next/static/chunks/app/api/models/availability/route-d05c42dc5814fed2.js +0 -1
  600. package/app/.next/static/chunks/app/api/models/custom/route-d05c42dc5814fed2.js +0 -1
  601. package/app/.next/static/chunks/app/api/models/route-d05c42dc5814fed2.js +0 -1
  602. package/app/.next/static/chunks/app/api/models/test/route-d05c42dc5814fed2.js +0 -1
  603. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-d05c42dc5814fed2.js +0 -1
  604. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-d05c42dc5814fed2.js +0 -1
  605. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-d05c42dc5814fed2.js +0 -1
  606. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-d05c42dc5814fed2.js +0 -1
  607. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-d05c42dc5814fed2.js +0 -1
  608. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-d05c42dc5814fed2.js +0 -1
  609. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-d05c42dc5814fed2.js +0 -1
  610. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-d05c42dc5814fed2.js +0 -1
  611. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-d05c42dc5814fed2.js +0 -1
  612. package/app/.next/static/chunks/app/api/pricing/route-d05c42dc5814fed2.js +0 -1
  613. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-d05c42dc5814fed2.js +0 -1
  614. package/app/.next/static/chunks/app/api/provider-nodes/route-d05c42dc5814fed2.js +0 -1
  615. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-d05c42dc5814fed2.js +0 -1
  616. package/app/.next/static/chunks/app/api/providers/[id]/models/route-d05c42dc5814fed2.js +0 -1
  617. package/app/.next/static/chunks/app/api/providers/[id]/route-d05c42dc5814fed2.js +0 -1
  618. package/app/.next/static/chunks/app/api/providers/[id]/test/route-d05c42dc5814fed2.js +0 -1
  619. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-d05c42dc5814fed2.js +0 -1
  620. package/app/.next/static/chunks/app/api/providers/client/route-d05c42dc5814fed2.js +0 -1
  621. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-d05c42dc5814fed2.js +0 -1
  622. package/app/.next/static/chunks/app/api/providers/route-d05c42dc5814fed2.js +0 -1
  623. package/app/.next/static/chunks/app/api/providers/suggested-models/route-d05c42dc5814fed2.js +0 -1
  624. package/app/.next/static/chunks/app/api/providers/test-batch/route-d05c42dc5814fed2.js +0 -1
  625. package/app/.next/static/chunks/app/api/providers/validate/route-d05c42dc5814fed2.js +0 -1
  626. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-d05c42dc5814fed2.js +0 -1
  627. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-d05c42dc5814fed2.js +0 -1
  628. package/app/.next/static/chunks/app/api/proxy-pools/route-d05c42dc5814fed2.js +0 -1
  629. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-d05c42dc5814fed2.js +0 -1
  630. package/app/.next/static/chunks/app/api/settings/database/route-d05c42dc5814fed2.js +0 -1
  631. package/app/.next/static/chunks/app/api/settings/proxy-test/route-d05c42dc5814fed2.js +0 -1
  632. package/app/.next/static/chunks/app/api/settings/require-login/route-d05c42dc5814fed2.js +0 -1
  633. package/app/.next/static/chunks/app/api/settings/route-d05c42dc5814fed2.js +0 -1
  634. package/app/.next/static/chunks/app/api/shutdown/route-d05c42dc5814fed2.js +0 -1
  635. package/app/.next/static/chunks/app/api/tags/route-d05c42dc5814fed2.js +0 -1
  636. package/app/.next/static/chunks/app/api/translator/console-logs/route-d05c42dc5814fed2.js +0 -1
  637. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-d05c42dc5814fed2.js +0 -1
  638. package/app/.next/static/chunks/app/api/translator/load/route-d05c42dc5814fed2.js +0 -1
  639. package/app/.next/static/chunks/app/api/translator/save/route-d05c42dc5814fed2.js +0 -1
  640. package/app/.next/static/chunks/app/api/translator/send/route-d05c42dc5814fed2.js +0 -1
  641. package/app/.next/static/chunks/app/api/translator/translate/route-d05c42dc5814fed2.js +0 -1
  642. package/app/.next/static/chunks/app/api/tunnel/disable/route-d05c42dc5814fed2.js +0 -1
  643. package/app/.next/static/chunks/app/api/tunnel/enable/route-d05c42dc5814fed2.js +0 -1
  644. package/app/.next/static/chunks/app/api/tunnel/status/route-d05c42dc5814fed2.js +0 -1
  645. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-d05c42dc5814fed2.js +0 -1
  646. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-d05c42dc5814fed2.js +0 -1
  647. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-d05c42dc5814fed2.js +0 -1
  648. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-d05c42dc5814fed2.js +0 -1
  649. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-d05c42dc5814fed2.js +0 -1
  650. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-d05c42dc5814fed2.js +0 -1
  651. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-d05c42dc5814fed2.js +0 -1
  652. package/app/.next/static/chunks/app/api/usage/chart/route-d05c42dc5814fed2.js +0 -1
  653. package/app/.next/static/chunks/app/api/usage/history/route-d05c42dc5814fed2.js +0 -1
  654. package/app/.next/static/chunks/app/api/usage/providers/route-d05c42dc5814fed2.js +0 -1
  655. package/app/.next/static/chunks/app/api/usage/request-details/route-d05c42dc5814fed2.js +0 -1
  656. package/app/.next/static/chunks/app/api/usage/request-logs/route-d05c42dc5814fed2.js +0 -1
  657. package/app/.next/static/chunks/app/api/usage/stats/route-d05c42dc5814fed2.js +0 -1
  658. package/app/.next/static/chunks/app/api/usage/stream/route-d05c42dc5814fed2.js +0 -1
  659. package/app/.next/static/chunks/app/api/v1/api/chat/route-d05c42dc5814fed2.js +0 -1
  660. package/app/.next/static/chunks/app/api/v1/audio/speech/route-d05c42dc5814fed2.js +0 -1
  661. package/app/.next/static/chunks/app/api/v1/chat/completions/route-d05c42dc5814fed2.js +0 -1
  662. package/app/.next/static/chunks/app/api/v1/embeddings/route-d05c42dc5814fed2.js +0 -1
  663. package/app/.next/static/chunks/app/api/v1/images/generations/route-d05c42dc5814fed2.js +0 -1
  664. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-d05c42dc5814fed2.js +0 -1
  665. package/app/.next/static/chunks/app/api/v1/messages/route-d05c42dc5814fed2.js +0 -1
  666. package/app/.next/static/chunks/app/api/v1/models/route-d05c42dc5814fed2.js +0 -1
  667. package/app/.next/static/chunks/app/api/v1/responses/compact/route-d05c42dc5814fed2.js +0 -1
  668. package/app/.next/static/chunks/app/api/v1/responses/route-d05c42dc5814fed2.js +0 -1
  669. package/app/.next/static/chunks/app/api/v1/route-d05c42dc5814fed2.js +0 -1
  670. package/app/.next/static/chunks/app/api/v1/search/route-d05c42dc5814fed2.js +0 -1
  671. package/app/.next/static/chunks/app/api/v1/web/fetch/route-d05c42dc5814fed2.js +0 -1
  672. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-d05c42dc5814fed2.js +0 -1
  673. package/app/.next/static/chunks/app/api/v1beta/models/route-d05c42dc5814fed2.js +0 -1
  674. package/app/.next/static/chunks/app/api/version/route-d05c42dc5814fed2.js +0 -1
  675. package/app/.next/static/chunks/app/api/version/update/route-d05c42dc5814fed2.js +0 -1
  676. package/app/.next/static/chunks/app/manifest.webmanifest/route-d05c42dc5814fed2.js +0 -1
  677. package/app/.next/static/chunks/app/page-d05c42dc5814fed2.js +0 -1
  678. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-d05c42dc5814fed2.js +0 -1
  679. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-d05c42dc5814fed2.js +0 -1
  680. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-d05c42dc5814fed2.js +0 -1
  681. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d05c42dc5814fed2.js +0 -1
  682. package/app/.next/static/gCRsyLIe80K11L3X2GfjE/_buildManifest.js +0 -1
  683. /package/app/.next/static/{gCRsyLIe80K11L3X2GfjE → opvV5qhNp8aVYocKuuu2V}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ exports.id=8443,exports.ids=[8443],exports.modules={23016:(a,b,c)=>{"use strict";c.d(b,{C8:()=>j,DR:()=>i,Uc:()=>f,cI:()=>h,eo:()=>g,gx:()=>d,v1:()=>e}),c(73714);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20},f=64e3,g=32e3,h={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function i(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let j=["Please write a 5-10 word title for the following conversation:"]},24429:()=>{},64749:()=>{},72947:(a,b,c)=>{"use strict";c.d(b,{Nq:()=>E,Op:()=>G,PE:()=>O});var d=c(29807),e=c(23016),f=c(79646),g=c(28354),h=c(79748),i=c(21820),j=c(33873);let k=(0,g.promisify)(f.execFile);function l(a,b,c){let d=Buffer.from(a,"base64");return"json"===c?{success:!0,response:new Response(JSON.stringify({audio:a,format:b}),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}:{success:!0,response:new Response(d,{headers:{"Content-Type":`audio/${b}`,"Content-Length":String(d.length),"Access-Control-Allow-Origin":"*"}})}}let m={token:null,tokenTime:0},n={token:null,tokenTime:0},o="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";async function p(){let a=Date.now();if(m.token&&a-m.tokenTime<66e4)return m.token;let b=await fetch("https://translate.google.com/",{headers:{"User-Agent":o}});if(!b.ok)throw Error(`Google translate fetch failed: ${b.status}`);let c=await b.text(),d=c.match(/"FdrFJe":"(.*?)"/)?.[1],e=c.match(/"cfb2h":"(.*?)"/)?.[1];if(!d||!e)throw Error("Failed to parse Google token");return m.token={"f.sid":d,bl:e},m.tokenTime=a,m.token}let q=0;async function r(a,b){let c=await p(),d=a.replace(/[@^*()\\/\-_+=><"'\u201c\u201d\u3010\u3011]/g," ").replaceAll(", ",". "),e="jQ1olc",f=1e5*++q+Math.floor(1e3+9e3*Math.random()),g=new URLSearchParams({rpcids:e,"f.sid":c["f.sid"],bl:c.bl,hl:b,"soc-app":1,"soc-platform":1,"soc-device":1,_reqid:f,rt:"c"}),h=[d,b,null,"undefined",[0]],i=new URLSearchParams;i.append("f.req",JSON.stringify([[[e,JSON.stringify(h),null,"generic"]]]));let j=await fetch(`https://translate.google.com/_/TranslateWebserverUi/data/batchexecute?${g}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Referer:"https://translate.google.com/"},body:i.toString()});if(!j.ok)throw Error(`Google TTS failed: ${j.status}`);let k=JSON.parse(JSON.parse((await j.text()).split("\n")[3])[0][2])[0];if(!k||k.length<100)throw Error("Google TTS returned empty audio");return k}async function s(){let a=Date.now();if(n.token&&a-n.tokenTime<3e5)return n.token;let b=await fetch("https://www.bing.com/translator",{headers:{"User-Agent":o,"Accept-Language":"vi,en-US;q=0.9,en;q=0.8"}});if(!b.ok)throw Error(`Bing translator fetch failed: ${b.status}`);let c=(b.headers.getSetCookie?.()||[]).map(a=>a.split(";")[0]).join("; "),d=(await b.text()).match(/params_AbusePreventionHelper\s*=\s*\[([^,]+),([^,]+),/);if(!d)throw Error("Failed to parse Bing token");return n.token={key:d[1],token:d[2].replace(/"/g,""),cookie:c},n.tokenTime=a,n.token}async function t(a,b,c){let d=b.split("-").slice(0,2).join("-"),e=b.toLowerCase().includes("male")?"Male":"Female",f=`<speak version='1.0' xml:lang='${d}'><voice xml:lang='${d}' xml:gender='${e}' name='${b}'><prosody rate='0.00%'>${a}</prosody></voice></speak>`,g=new URLSearchParams;return g.append("ssml",f),g.append("token",c.token),g.append("key",c.key),fetch("https://www.bing.com/tfettts?isVertical=1&&IG=1&IID=translator.5023&SFX=1",{method:"POST",body:g.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"*/*",Origin:"https://www.bing.com",Referer:"https://www.bing.com/translator","User-Agent":o,...c.cookie?{Cookie:c.cookie}:{}}})}async function u(a,b){let c=await s(),d=await t(a,b,c);if((429===d.status||403===d.status)&&(n.token=null,n.tokenTime=0,c=await s(),d=await t(a,b,c)),!d.ok){let a=await d.text().catch(()=>"");throw Error(`Bing TTS failed: ${d.status}${a?" - "+a:""}`)}let e=await d.arrayBuffer();if(e.byteLength<1024)throw Error("Bing TTS returned empty audio");return Buffer.from(e).toString("base64")}let v=null;async function w(){let{stdout:a}=await k("say",["-v","?"]),b=[];for(let c of a.split("\n")){let a=c.match(/^([^\s].*?)\s{2,}([a-z]{2}_[A-Z]{2})/);if(!a)continue;let d=a[1].trim(),e=a[2].trim(),f=e.split("_")[0],g=e.split("_")[1];b.push({id:d,name:d,locale:e,lang:f,country:g,gender:""})}return b}async function x(){let{stdout:a}=await k("powershell.exe",["-NoProfile","-NonInteractive","-WindowStyle","Hidden","-Command","Add-Type -AssemblyName System.Speech; $s = New-Object System.Speech.Synthesis.SpeechSynthesizer; $s.GetInstalledVoices() | ForEach-Object { $v = $_.VoiceInfo; [PSCustomObject]@{ Name=$v.Name; Culture=$v.Culture.Name; Gender=$v.Gender } } | ConvertTo-Json -Compress"],{windowsHide:!0}),b=JSON.parse(a.trim()||"[]");return(Array.isArray(b)?b:[b]).map(a=>{let b=a.Culture||"en-US",[c,d=""]=b.split("-");return{id:a.Name,name:a.Name,locale:b.replace("-","_"),lang:c,country:d,gender:({1:"Male",2:"Female",Male:"Male",Female:"Female"})[a.Gender]||""}})}async function y(){if(v)return v;try{let a="win32"===process.platform?await x():await w();return v=a,a}catch{return[]}}async function z(a,b){let c=await (0,h.mkdtemp)((0,j.join)((0,i.tmpdir)(),"tts-")),d=(0,j.join)(c,"out.aiff"),e=(0,j.join)(c,"out.mp3");try{let c=b?["-v",b,"-o",d,a]:["-o",d,a];return await k("say",c),await k("ffmpeg",["-y","-i",d,"-codec:a","libmp3lame","-qscale:a","4",e]),(await (0,h.readFile)(e)).toString("base64")}finally{await (0,h.rm)(c,{recursive:!0,force:!0})}}let A=null,B=0;async function C(){let a=Date.now();if(A&&a-B<864e5)return A;let b=await fetch("https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list?trustedclienttoken=6A5AA1D4EAFF4E9FB37E23D68491D6F4",{headers:{"User-Agent":o}});if(!b.ok)throw Error(`Edge TTS voices fetch failed: ${b.status}`);let c=await b.json();return A=c,B=a,c}let D=new Map;async function E(a){if(!a)throw Error("ElevenLabs API key required");let b=Date.now(),c=D.get(a);if(c&&b-c.time<864e5)return c.voices;let d=await fetch("https://api.elevenlabs.io/v1/voices",{headers:{"xi-api-key":a,"Content-Type":"application/json"}});if(!d.ok)throw Error(`ElevenLabs voices fetch failed: ${d.status}`);let e=((await d.json()).voices||[]).map(a=>({...a,lang:a.labels?.language||"en"}));return D.set(a,{voices:e,time:b}),e}async function F(a,b,c,d="eleven_flash_v2_5"){let e=await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${b}`,{method:"POST",headers:{"xi-api-key":c,"Content-Type":"application/json"},body:JSON.stringify({text:a,model_id:d,voice_settings:{stability:.5,similarity_boost:.75}})});if(!e.ok){let a=await e.json().catch(()=>({}));throw Error(a?.detail?.message||`ElevenLabs TTS failed: ${e.status}`)}let f=await e.arrayBuffer();if(f.byteLength<1024)throw Error("ElevenLabs TTS returned empty audio");return Buffer.from(f).toString("base64")}let G={"edge-tts":C,"local-device":y,elevenlabs:E};async function H({model:a,input:b,credentials:c,responseFormat:f="mp3"}){if(!c?.apiKey)return(0,d.A1)(e.gx.UNAUTHORIZED,"No OpenRouter API key configured");let g="openai/gpt-4o-mini-tts",h="alloy";if(a&&a.includes("/")){let b=a.lastIndexOf("/"),c=a.slice(b+1),d=a.slice(0,b);d.includes("/")?(g=d,h=c):h=a}else a&&(h=a);let i=await fetch("https://openrouter.ai/api/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${c.apiKey}`,"HTTP-Referer":"https://endpoint-proxy.local","X-Title":"Endpoint Proxy"},body:JSON.stringify({model:g,modalities:["text","audio"],audio:{voice:h,format:"wav"},stream:!0,messages:[{role:"user",content:b}]})});if(!i.ok){let a=await i.json().catch(()=>({}));return(0,d.A1)(i.status,a?.error?.message||`OpenRouter TTS failed: ${i.status}`)}let j=[],k=i.body.getReader(),m=new TextDecoder,n="";for(;;){let{done:a,value:b}=await k.read();if(a)break;let c=(n+=m.decode(b,{stream:!0})).split("\n");for(let a of(n=c.pop(),c))if(a.startsWith("data: ")&&"data: [DONE]"!==a)try{let b=JSON.parse(a.slice(6)),c=b.choices?.[0]?.delta?.audio?.data;c&&j.push(c)}catch{}}return 0===j.length?(0,d.A1)(e.gx.BAD_GATEWAY,"OpenRouter TTS returned no audio data"):l(j.join(""),"wav",f)}async function I({model:a,input:b,credentials:c,responseFormat:f="mp3"}){if(!c?.apiKey)return(0,d.A1)(e.gx.UNAUTHORIZED,"No OpenAI API key configured");let g="gpt-4o-mini-tts",h="alloy";if(a&&a.includes("/")){let b=a.split("/");2===b.length&&([g,h]=b)}else a&&(h=a);let i=(c.baseUrl||"https://api.openai.com").replace(/\/+$/,""),j=await fetch(`${i}/v1/audio/speech`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${c.apiKey}`},body:JSON.stringify({model:g,voice:h,input:b})});if(!j.ok){let a=await j.json().catch(()=>({}));return(0,d.A1)(j.status,a?.error?.message||`OpenAI TTS failed: ${j.status}`)}let k=await j.arrayBuffer();return l(Buffer.from(k).toString("base64"),"mp3",f)}async function J(a,b="mp3"){let c=await a.arrayBuffer();if(c.byteLength<100)throw Error("Upstream returned empty audio");let d=a.headers.get("content-type")||"",e=b;return d.includes("wav")?e="wav":d.includes("mpeg")||d.includes("mp3")?e="mp3":d.includes("ogg")&&(e="ogg"),{base64:Buffer.from(c).toString("base64"),format:e}}async function K(a){let b=await a.text().catch(()=>""),c=`Upstream error (${a.status})`;try{let a=JSON.parse(b);c=a?.error?.message||a?.message||a?.detail?.message||("string"==typeof a?.detail?a.detail:null)||b||c}catch{c=b||c}throw Error(c)}let L={hyperbolic:async function({baseUrl:a,apiKey:b,text:c}){let d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({text:c})});return d.ok||await K(d),{base64:(await d.json()).audio,format:"mp3"}},deepgram:async function({baseUrl:a,apiKey:b,text:c,modelId:d}){let e=new URL(a);e.searchParams.set("model",d||"aura-asteria-en");let f=await fetch(e.toString(),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Token ${b}`},body:JSON.stringify({text:c})});return f.ok||await K(f),J(f,"mp3")},"nvidia-tts":async function({baseUrl:a,apiKey:b,text:c,modelId:d,voiceId:e}){let f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({input:{text:c},voice:e||"default",model:d})});return f.ok||await K(f),J(f,"wav")},"huggingface-tts":async function({baseUrl:a,apiKey:b,text:c,modelId:d}){if(!d||d.includes(".."))throw Error("Invalid HuggingFace model ID");let e=await fetch(`${a}/${d}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({inputs:c})});return e.ok||await K(e),J(e,"wav")},inworld:async function({baseUrl:a,apiKey:b,text:c,modelId:d,voiceId:e}){let f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${b}`},body:JSON.stringify({text:c,voiceId:e||"Alex",modelId:d||"inworld-tts-1.5-mini",audioConfig:{audioEncoding:"MP3"}})});f.ok||await K(f);let g=await f.json();if(!g.audioContent)throw Error("Inworld TTS returned no audio");return{base64:g.audioContent,format:"mp3"}},cartesia:async function({baseUrl:a,apiKey:b,text:c,modelId:d,voiceId:e}){let f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":b,"Cartesia-Version":"2024-06-10"},body:JSON.stringify({model_id:d||"sonic-2",transcript:c,...e?{voice:{mode:"id",id:e}}:{},output_format:{container:"mp3",bit_rate:128e3,sample_rate:44100}})});return f.ok||await K(f),J(f,"mp3")},playht:async function({baseUrl:a,apiKey:b,text:c,modelId:d,voiceId:e}){let[f,g]=(b||":").split(":"),h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/mpeg","X-USER-ID":f||"",Authorization:`Bearer ${g||b}`},body:JSON.stringify({text:c,voice:e||"s3://voice-cloning-zero-shot/d9ff78ba-d016-47f6-b0ef-dd630f59414e/female-cs/manifest.json",voice_engine:d||"PlayDialog",output_format:"mp3",speed:1})});return h.ok||await K(h),J(h,"mp3")},coqui:async function({baseUrl:a,text:b,voiceId:c}){let d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b,...c?{speaker_id:c}:{}})});return d.ok||await K(d),J(d,"wav")},tortoise:async function({baseUrl:a,text:b,voiceId:c}){let d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b,voice:c||"random"})});return d.ok||await K(d),J(d,"wav")},openai:async function({baseUrl:a,apiKey:b,text:c,modelId:d,voiceId:e}){let f={"Content-Type":"application/json"};b&&(f.Authorization=`Bearer ${b}`);let g=await fetch(a,{method:"POST",headers:f,body:JSON.stringify({model:d,input:c,voice:e||"alloy",response_format:"mp3",speed:1})});return g.ok||await K(g),J(g,"mp3")}},M={"google-tts":{synthesize:async(a,b)=>({base64:await r(a,b||"en"),format:"mp3"}),requiresCredentials:!1},"edge-tts":{synthesize:async(a,b)=>({base64:await u(a,b||"vi-VN-HoaiMyNeural"),format:"mp3"}),requiresCredentials:!1},"local-device":{synthesize:async(a,b)=>({base64:await z(a,b),format:"mp3"}),requiresCredentials:!1},elevenlabs:{synthesize:async(a,b,c)=>{if(!c?.apiKey)throw Error("ElevenLabs API key required");let d="eleven_flash_v2_5",e=b;return b&&b.includes("/")&&([d,e]=b.split("/")),{base64:await F(a,e,c.apiKey,d),format:"mp3"}},requiresCredentials:!0},openai:{synthesize:async(a,b,c,d)=>await I({model:b,input:a,credentials:c,responseFormat:d}),requiresCredentials:!0},openrouter:{synthesize:async(a,b,c,d)=>await H({model:b,input:a,credentials:c,responseFormat:d}),requiresCredentials:!0}};async function N(a,b,d,e){let{AI_PROVIDERS:f}=await c.e(21).then(c.bind(c,50021)),g=f[a]?.ttsConfig;if(!g)return null;let h=L[g.format];if(!h)return null;let i=e?.apiKey;if("none"!==g.authType&&!i)throw Error(`${a} API key required`);let{modelId:j,voiceId:k}=function(a,b="",c="",d=[]){if(!a)return{modelId:b,voiceId:c};for(let b of d.map(a=>a.id||a).filter(Boolean).sort((a,b)=>b.length-a.length)){if(a===b)return{modelId:b,voiceId:c};if(a.startsWith(`${b}/`))return{modelId:b,voiceId:a.slice(b.length+1)}}let e=a.lastIndexOf("/");return e>0?{modelId:a.slice(0,e),voiceId:a.slice(e+1)}:{modelId:b||a,voiceId:c||a}}(d,g.models?.[0]?.id||"","",g.models||[]);return h({baseUrl:g.baseUrl,apiKey:i,text:b,modelId:j,voiceId:k})}async function O({provider:a,model:b,input:c,credentials:f,responseFormat:g="mp3"}){if(!c?.trim())return(0,d.A1)(e.gx.BAD_REQUEST,"Missing required field: input");let h=M[a];try{if(h){let a=await h.synthesize(c.trim(),b,f,g);if(void 0!==a.success)return a;return l(a.base64,a.format,g)}let i=await N(a,c.trim(),b,f);if(i)return l(i.base64,i.format,g);return(0,d.A1)(e.gx.BAD_REQUEST,`Provider '${a}' does not support TTS via this route.`)}catch(a){return(0,d.A1)(e.gx.BAD_GATEWAY,a.message||"TTS synthesis failed")}}},73714:(a,b,c)=>{"use strict";c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:429,backoff:!0}]}};
@@ -1,5 +1,37 @@
1
- "use strict";exports.id=8513,exports.ids=[8513],exports.modules={6021:(a,b,c)=>{c(33873),c(29021);let{MITM_DIR:d}=c(17893),{generateRootCA:e,loadRootCA:f,generateLeafCert:g}=c(89998);a.exports={generateCert:async function a(){return await e()},getCertForDomain:function(a){try{let b=f(),c=g(a,b);return{key:c.key,cert:c.cert}}catch(b){return console.error(`Failed to generate cert for ${a}:`,b.message),null}}}},17893:(a,b,c)=>{let d=c(33873),e=c(21820),f=process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?d.join(process.env.APPDATA||d.join(e.homedir(),"AppData","Roaming"),"9router"):d.join(e.homedir(),".9router"),g=d.join(f,"mitm");a.exports={DATA_DIR:f,MITM_DIR:g}},28059:(a,b,c)=>{let d=c(29021),e=c(55511),{exec:f}=c(79646),{execWithPassword:g,isSudoAvailable:h}=c(98012),{log:i,err:j}=c(93741),k="win32"===process.platform,l="darwin"===process.platform,m="/usr/local/share/ca-certificates";function n(a){let b=d.readFileSync(a,"utf-8"),c=Buffer.from(b.replace(/-----[^-]+-----/g,"").replace(/\s/g,""),"base64");return e.createHash("sha1").update(c).digest("hex").toUpperCase().match(/.{2}/g).join(":")}async function o(a){var b;let c;return k?new Promise(a=>{f('certutil -store Root "9Router MITM Root CA"',{windowsHide:!0},b=>{a(!b)})}):l?(b=a,new Promise(a=>{try{let c=n(b).replace(/:/g,"");f(`security verify-cert -c "${b}" -p ssl -k /Library/Keychains/System.keychain 2>/dev/null`,{windowsHide:!0},b=>{if(!b)return a(!0);f(`security dump-trust-settings -d 2>/dev/null | grep -i "${c}"`,{windowsHide:!0},(b,c)=>{a(!b&&!!c?.trim())})})}catch{a(!1)}})):(c=`${m}/9router-root-ca.crt`,Promise.resolve(d.existsSync(c)))}async function p(a,b){let c=`security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${b}"`;try{await g(`security delete-certificate -c "9Router MITM Root CA" /Library/Keychains/System.keychain 2>/dev/null || true && ${c}`,a),i("\uD83D\uDD10 Cert: ✅ installed to system keychain")}catch(a){throw Error(a.message?.includes("canceled")?"User canceled authorization":"Certificate install failed")}}async function q(a){return new Promise((b,c)=>{f(`certutil -addstore Root "${a}"`,{windowsHide:!0},a=>{a?c(Error(`Failed to install certificate: ${a.message}`)):(i("\uD83D\uDD10 Cert: ✅ installed to Windows Root store"),b())})})}async function r(a,b){let c=n(b).replace(/:/g,""),d=`security delete-certificate -Z "${c}" /Library/Keychains/System.keychain`;try{await g(d,a),i("\uD83D\uDD10 Cert: ✅ uninstalled from system keychain")}catch(a){throw Error("Failed to uninstall certificate")}}async function s(){return new Promise((a,b)=>{f('certutil -delstore Root "9Router MITM Root CA"',{windowsHide:!0},c=>{c?b(Error(`Failed to uninstall certificate: ${c.message}`)):(i("\uD83D\uDD10 Cert: ✅ uninstalled from Windows Root store"),a())})})}async function t(a,b){if(!h())return void i(`🔐 Cert: cannot install to system store without sudo — trust this file on clients: ${b}`);let c=`${m}/9router-root-ca.crt`,d=`cp "${b}" "${c}" && (update-ca-certificates 2>/dev/null || update-ca-trust 2>/dev/null || true)`;try{await g(d,a),i("\uD83D\uDD10 Cert: ✅ installed to Linux trust store")}catch(a){throw Error("Certificate install failed")}}async function u(a){if(!h())return;let b=`${m}/9router-root-ca.crt`,c=`rm -f "${b}" && (update-ca-certificates 2>/dev/null || update-ca-trust 2>/dev/null || true)`;try{await g(c,a),i("\uD83D\uDD10 Cert: ✅ uninstalled from Linux trust store")}catch(a){throw Error("Failed to uninstall certificate")}}a.exports={installCert:async function a(a,b){if(!d.existsSync(b))throw Error(`Certificate file not found: ${b}`);await o(b)?i("\uD83D\uDD10 Cert: already trusted ✅"):k?await q(b):l?await p(a,b):await t(a,b)},uninstallCert:async function a(a,b){await o(b)?k?await s():l?await r(a,b):await u(a):i("\uD83D\uDD10 Cert: not found in system store")},checkCertInstalled:o}},50514:(a,b,c)=>{let{exec:d,spawn:e,execSync:f}=c(79646),g=c(33873),h=c(29021),i=c(21820),j=c(91645),k=c(55591),l=c(55511),{addDNSEntry:m,removeDNSEntry:n,removeAllDNSEntries:o,checkAllDNSStatus:p,TOOL_HOSTS:q,isSudoAvailable:r}=c(98012),s="win32"===process.platform,t="darwin"===process.platform,{generateCert:u}=c(6021),{installCert:v,uninstallCert:w}=c(28059),{isCertExpired:x}=c(89998),{DATA_DIR:y,MITM_DIR:z}=c(17893),{log:A,err:B}=c(93741),C="http://localhost:20128";function D(a){return null==a||""===a?"''":`'${String(a).replace(/'/g,"'\\''")}'`}async function E(){if(!U)return C;try{let a=await U(),b=a&&null!=a.mitmRouterBaseUrl?String(a.mitmRouterBaseUrl).trim():"";if(!b)return C;let c=new URL(b);if("http:"!==c.protocol&&"https:"!==c.protocol)return C;return b.replace(/\/+$/,"")}catch{return C}}let F=g.join(z,".mitm.pid"),G=[5e3,1e4,2e4,3e4,6e4],H=0,I=0,J=!1,K=function(a){try{if(!a||!h.existsSync(a)||!a.includes(`${g.sep}node_modules${g.sep}`))return a;let b=g.join(y,"runtime","mitm"),c=g.join(b,"server.js");if(h.existsSync(c))try{if(h.statSync(a).size===h.statSync(c).size)return c}catch{}return h.mkdirSync(b,{recursive:!0}),h.copyFileSync(a,c),c}catch(b){try{A(`[MITM] runtime copy failed: ${b.message}`)}catch{}return a}}(function(){if(process.env.MITM_SERVER_PATH)return process.env.MITM_SERVER_PATH;let a=g.join(__dirname,"server.js");if(h.existsSync(a))return a;let b=g.join(process.cwd(),"src","mitm","server.js");if(h.existsSync(b))return b;let c=g.join(process.cwd(),"..","src","mitm","server.js");return h.existsSync(c)?c:b}()),L="aes-256-gcm",M="9router-mitm-pwd",N=null,O=null;function P(){return globalThis.__mitmSudoPassword||null}function Q(a){globalThis.__mitmSudoPassword=a}function R(a){try{return process.kill(a,0),!0}catch(a){return"EACCES"===a.code}}function S(a,b=!1,e=null){if(s)d(`taskkill ${b?"/F ":""}/PID ${a}`,{windowsHide:!0},()=>{});else{let f=b?"SIGKILL":"SIGTERM",g=`pkill -${f} -P ${a} 2>/dev/null; kill -${f} ${a} 2>/dev/null`;if(e){let{execWithPassword:a}=c(98012);a(g,e).catch(()=>d(g,{windowsHide:!0},()=>{}))}else d(g,{windowsHide:!0},()=>{})}}function T(){try{let{machineIdSync:a}=c(20243),b=a();return l.createHash("sha256").update(b+M).digest()}catch{return l.createHash("sha256").update(M).digest()}}let U=null,V=null;async function W(a,b){if(V)try{let c,d,e,f,g,h={mitmEnabled:a};b&&(c=T(),d=l.randomBytes(12),e=l.createCipheriv(L,c,d),f=Buffer.concat([e.update(b,"utf8"),e.final()]),g=e.getAuthTag(),h.mitmSudoEncrypted=`${d.toString("hex")}:${g.toString("hex")}:${f.toString("hex")}`),await V(h)}catch(a){B(`Failed to save settings: ${a.message}`)}}async function X(){if(V)try{await V({mitmSudoEncrypted:null})}catch(a){B(`Failed to clear encrypted password: ${a.message}`)}}async function Y(){if(!U)return null;try{let a=await U();if(!a.mitmSudoEncrypted)return null;return function(a){try{let[b,c,d]=a.split(":");if(!b||!c||!d)return null;let e=T(),f=l.createDecipheriv(L,e,Buffer.from(b,"hex"));return f.setAuthTag(Buffer.from(c,"hex")),f.update(Buffer.from(d,"hex"))+f.final("utf8")}catch{return null}}(a.mitmSudoEncrypted)}catch{return null}}async function Z(a){if(N&&!N.killed){try{N.kill("SIGKILL")}catch{}N=null,O=null}try{if(h.existsSync(F)){let b=parseInt(h.readFileSync(F,"utf-8").trim(),10);b&&R(b)&&(S(b,!0,a),await new Promise(a=>setTimeout(a,500))),h.unlinkSync(F)}}catch{}if(!s&&K)try{let b=K.replace(/'/g,"'\\''");if(a){let{execWithPassword:d}=c(98012);await d(`pkill -SIGKILL -f "${b}" 2>/dev/null || true`,a).catch(()=>{})}else d(`pkill -SIGKILL -f "${b}" 2>/dev/null || true`,{windowsHide:!0},()=>{});await new Promise(a=>setTimeout(a,500))}catch{}}async function $(){let a=null!==N&&!N.killed,b=O;if(!a)try{if(h.existsSync(F)){let c=parseInt(h.readFileSync(F,"utf-8").trim(),10);c&&R(c)?(a=!0,b=c):h.unlinkSync(F)}}catch{}let d=p(),e=g.join(z,"rootCA.crt"),f=h.existsSync(e),{checkCertInstalled:i}=c(28059),j=!!f&&await i(e);return{running:a,pid:b,certExists:f,certTrusted:j,dnsStatus:d}}async function _(a){if(J)return;if(Date.now()-I>=6e4&&(H=0),H>=5)return void B("Max restart attempts reached. Giving up.");let b=G[Math.min(H,G.length-1)];H++,J=!0,A(`Restarting in ${b/1e3}s... (${H}/5)`),await new Promise(a=>setTimeout(a,b));try{let b=U?await U():null;if(b&&!b.mitmEnabled){A("MITM disabled, skipping restart"),J=!1;return}let c=P()||await Y();if(!c&&!s){B("No cached password, cannot auto-restart"),J=!1;return}await aa(a,c),A("\uD83D\uDD04 Restarted successfully"),H=0,J=!1}catch(b){B(`Restart attempt ${H}/5 failed: ${b.message}`),J=!1,_(a)}}async function aa(a,b){if(!N||N.killed)try{if(h.existsSync(F)){let a=parseInt(h.readFileSync(F,"utf-8").trim(),10);if(a&&R(a))return O=a,A(`♻️ Reusing existing process (PID: ${a})`),await W(!0,b),b&&Q(b),{running:!0,pid:a};h.unlinkSync(F)}}catch{}if(N&&!N.killed)throw Error("MITM server is already running");if(await Z(b),!s){let a=await new Promise(a=>{let b=j.createServer();b.once("error",b=>{"EADDRINUSE"===b.code?a("in-use"):a("no-permission")}),b.once("listening",()=>{b.close(()=>a("free"))}),b.listen(443,"127.0.0.1")});if("in-use"===a||"no-permission"===a){let a=await new Promise(a=>{s?d('powershell -NonInteractive -WindowStyle Hidden -Command "$c = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1; if ($c) { $c.OwningProcess } else { 0 }"',{windowsHide:!0},(b,c)=>{if(b)return a(null);let e=parseInt(c.trim(),10);if(!e||e<=4)return a(null);d(`tasklist /FI "PID eq ${e}" /FO CSV /NH`,{windowsHide:!0},(b,c)=>{let d=c?.match(/"([^"]+)"/);a({pid:e,name:d?d[1]:"unknown"})})}):d("lsof -nP -iTCP:443 -sTCP:LISTEN -t",{windowsHide:!0},(b,c)=>{if(b||!c?.trim())return a(null);let e=parseInt(c.trim().split("\n")[0],10);if(!e||isNaN(e))return a(null);d(`ps -p ${e} -o comm=`,{windowsHide:!0},(b,c)=>{a({pid:e,name:c?.trim()||"unknown"})})})});if(a&&("node"===a.name||a.name.includes("node"))){A(`Killing orphan node process on port 443 (PID ${a.pid}, name=${a.name})...`);try{let{execWithPassword:d}=c(98012);await d(`kill -9 ${a.pid}`,b),await new Promise(a=>setTimeout(a,800))}catch{}}else if(a){let b=a.name.includes("/")?a.name.split("/").filter(Boolean).pop():a.name;throw Error(`Port 443 is already in use by "${b}" (PID ${a.pid}). Stop that process first.`)}}}let l=g.join(z,"rootCA.crt"),m=g.join(z,"rootCA.key"),n=h.existsSync(l)&&h.existsSync(m);if(!n||x(l)){if(n){A("\uD83D\uDD10 Cert expired — uninstalling old cert...");let a=b||P()||await Y();try{await w(a,l)}catch{}}A("\uD83D\uDD10 Generating Root CA..."),await u()}let{checkCertInstalled:o}=c(28059),q=await o(l),y=!s&&!t&&!r();if(q)A("\uD83D\uDD10 Cert: already trusted ✅");else{A("\uD83D\uDD10 Cert: not trusted → installing...");let a=b||P()||await Y();if(y)A(`🔐 Cert: skipping system trust (no sudo). Install ${l} as a trusted CA on machines that use this proxy.`);else{if(!a&&!s)throw Error("Sudo password required to install Root CA certificate");try{await v(a,l),A("\uD83D\uDD10 Cert: ✅ trusted")}catch(a){throw Error(`Failed to trust certificate: ${a.message}`)}}}let C=await E();if(A(`🚀 Starting server... (router: ${C})`),s){try{f('powershell -NonInteractive -WindowStyle Hidden -Command "$c = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1; if ($c -and $c.OwningProcess -gt 4) { Stop-Process -Id $c.OwningProcess -Force -ErrorAction SilentlyContinue }"',{windowsHide:!0}),await new Promise(a=>setTimeout(a,500))}catch{}N=e(process.execPath,[K],{detached:!1,windowsHide:!0,stdio:["ignore","pipe","pipe"],env:{...process.env,ROUTER_API_KEY:a,NODE_ENV:"production",MITM_ROUTER_BASE:C}}),V&&await V({mitmCertInstalled:!0}).catch(()=>{})}else r()?((N=e("sudo",["-S","-E","sh","-c",[`HOME=${D(i.homedir())}`,`ROUTER_API_KEY=${D(a)}`,`MITM_ROUTER_BASE=${D(C)}`,"NODE_ENV=production",D(process.execPath),D(K)].join(" ")],{detached:!1,windowsHide:!0,stdio:["pipe","pipe","pipe"]})).stdin.write(`${b}
2
- `),N.stdin.end()):N=e(process.execPath,[K],{detached:!1,windowsHide:!0,stdio:["ignore","pipe","pipe"],env:{...process.env,ROUTER_API_KEY:a,NODE_ENV:"production",MITM_ROUTER_BASE:C}});N&&(O=N.pid,h.writeFileSync(F,String(O)),I=Date.now());let G=null;N&&(N.stdout.on("data",a=>{process.stdout.write(a)}),N.stderr.on("data",a=>{let b=a.toString().trim();b&&(s||!b.includes("Password:")&&!b.includes("password for"))&&(B(b),G=b),!s&&(b.includes("incorrect password")||b.includes("no password was provided"))&&(Q(null),X(),J=!0)}),N.on("exit",b=>{A(`Server exited (code: ${b})`),N=null,O=null;try{h.unlinkSync(F)}catch{}0===b||J||_(a)}));let H=await function(a=443){return new Promise(b=>{let c=Date.now()+8e3,d=()=>{let e=k.request({hostname:"127.0.0.1",port:a,path:"/_mitm_health",method:"GET",rejectUnauthorized:!1},a=>{let c="";a.on("data",a=>{c+=a}),a.on("end",()=>{try{let a=JSON.parse(c);b(!0===a.ok?{ok:!0,pid:a.pid||null}:null)}catch{b(null)}})});e.on("error",()=>{Date.now()<c?setTimeout(d,500):b(null)}),e.end()};d()})}(443);if(!H){if(N&&!N.killed){try{N.kill()}catch{}N=null}let a=function(){try{if(s){let a=f('powershell -NonInteractive -WindowStyle Hidden -Command "$c = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1; if ($c) { $c.OwningProcess } else { 0 }"',{encoding:"utf8",windowsHide:!0}).trim(),b=parseInt(a,10);if(b&&b>4){let a=f(`tasklist /FI "PID eq ${b}" /FO CSV /NH`,{encoding:"utf8",windowsHide:!0}).match(/"([^"]+)"/);if(a)return a[1].replace(".exe","")}}else{let a=f("lsof -i :443",{encoding:"utf8",windowsHide:!0}).trim().split("\n");if(a.length>1)return a[1].split(/\s+/)[0]}}catch{}return null}(),b=a?` Port 443 already in use by ${a}.`:"",c=G||`Check sudo password or port 443 access.${b}`;throw Error(`MITM server failed to start. ${c}`)}for(let[a,b]of(V&&await V({mitmCertInstalled:!0}).catch(()=>{}),A(`✅ Server healthy (PID: ${O||H.pid})`),Object.entries(p())))A(`🌐 DNS ${a}: ${b?"✅ active":"❌ inactive"}`);return await W(!0,b),b&&Q(b),{running:!0,pid:O}}async function ab(a){J=!0,H=0,A("⏹ Stopping server...");let b=N,d=b&&!b.killed?b.pid:(()=>{try{return parseInt(h.readFileSync(F,"utf-8").trim(),10)}catch{return null}})();if(d&&R(d)&&(A(`Killing server (PID: ${d})...`),S(d,!1,a),await new Promise(a=>setTimeout(a,1e3)),R(d)&&S(d,!0,a)),N=null,O=null,s){let a=g.join(process.env.SystemRoot||"C:\\Windows","System32","drivers","etc","hosts"),b=Object.values(q).flat();try{let d=h.readFileSync(a,"utf8").split(/\r?\n/).filter(a=>!b.some(b=>a.includes(b))).join("\r\n");h.writeFileSync(a,d,"utf8"),c(79646).execSync("ipconfig /flushdns",{windowsHide:!0})}catch(a){B(`Failed to clean hosts: ${a.message}`)}}else await o(a);try{h.unlinkSync(F)}catch{}return await W(!1,null),J=!1,{running:!1,pid:null}}async function ac(a,b){if(!(await $()).running)throw Error("MITM server is not running. Start the server first.");let c=b||P()||await Y();return await m(a,c),{success:!0}}a.exports={getMitmStatus:$,startServer:aa,stopServer:ab,enableToolDNS:ac,disableToolDNS:async function a(a,b){let c=b||P()||await Y();return await n(a,c),{success:!0}},trustCert:async function a(a){let b=g.join(z,"rootCA.crt");if(!h.existsSync(b))throw Error("Root CA not found. Start server first to generate it.");let{installCert:d}=c(28059);if(!s&&!t&&!r())return void A(`🔐 Cert: system trust unavailable (no sudo). Use file: ${b}`);let e=a||P()||await Y();if(!e&&!s)throw Error("Sudo password required to trust certificate");await d(e,b),e&&Q(e)},startMitm:aa,stopMitm:ab,getCachedPassword:P,setCachedPassword:Q,loadEncryptedPassword:Y,clearEncryptedPassword:X,initDbHooks:function(a,b){U=a,V=b}}},66233:a=>{a.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},81372:(a,b,c)=>{c.d(b,{n:()=>i});var d=c(33873),e=c.n(d),f=c(21820),g=c.n(f);let h="9router",i=process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?e().join(process.env.APPDATA||e().join(g().homedir(),"AppData","Roaming"),h):e().join(g().homedir(),`.${h}`)},89998:(a,b,c)=>{let d=c(33873),e=c(29021),f=c(65978),{MITM_DIR:g}=c(17893),h=d.join(g,"rootCA.key"),i=d.join(g,"rootCA.crt");function j(a){try{let b=f.pki.certificateFromPem(e.readFileSync(a,"utf8")),c=new Date(Date.now()+2592e6);return b.validity.notAfter<c}catch{return!0}}a.exports={generateRootCA:async function a(){let a=e.existsSync(h)&&e.existsSync(i);if(a&&!j(i))return console.log("✅ Root CA already exists"),{key:h,cert:i};if(a){console.log("\uD83D\uDD10 Root CA expired or expiring soon — regenerating...");try{e.unlinkSync(h)}catch{}try{e.unlinkSync(i)}catch{}}e.existsSync(g)||e.mkdirSync(g,{recursive:!0}),console.log("\uD83D\uDD10 Generating Root CA certificate...");let b=f.pki.rsa.generateKeyPair(2048),c=f.pki.createCertificate();c.publicKey=b.publicKey,c.serialNumber="01",c.validity.notBefore=new Date,c.validity.notAfter=new Date,c.validity.notAfter.setFullYear(c.validity.notBefore.getFullYear()+10);let d=[{name:"commonName",value:"9Router MITM Root CA"},{name:"organizationName",value:"9Router"},{name:"countryName",value:"US"}];c.setSubject(d),c.setIssuer(d),c.setExtensions([{name:"basicConstraints",cA:!0,critical:!0},{name:"keyUsage",keyCertSign:!0,cRLSign:!0,critical:!0},{name:"subjectKeyIdentifier"}]),c.sign(b.privateKey,f.md.sha256.create());let k=f.pki.privateKeyToPem(b.privateKey),l=f.pki.certificateToPem(c);return e.writeFileSync(h,k),e.writeFileSync(i,l),console.log("✅ Root CA generated successfully"),{key:h,cert:i}},loadRootCA:function(){if(!e.existsSync(h)||!e.existsSync(i))throw Error("Root CA not found. Generate it first.");let a=e.readFileSync(h,"utf8"),b=e.readFileSync(i,"utf8");return{key:f.pki.privateKeyFromPem(a),cert:f.pki.certificateFromPem(b)}},generateLeafCert:function(a,b){let c=f.pki.rsa.generateKeyPair(2048),d=f.pki.createCertificate();return d.publicKey=c.publicKey,d.serialNumber=Math.floor(1e6*Math.random()).toString(),d.validity.notBefore=new Date,d.validity.notAfter=new Date,d.validity.notAfter.setFullYear(d.validity.notBefore.getFullYear()+1),d.setSubject([{name:"commonName",value:a}]),d.setIssuer(b.cert.subject.attributes),d.setExtensions([{name:"basicConstraints",cA:!1},{name:"keyUsage",digitalSignature:!0,keyEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0},{name:"subjectAltName",altNames:[{type:2,value:a},{type:2,value:`*.${a}`}]}]),d.sign(b.key,f.md.sha256.create()),{key:f.pki.privateKeyToPem(c.privateKey),cert:f.pki.certificateToPem(d)}},isCertExpired:j,ROOT_CA_CERT_PATH:i,ROOT_CA_KEY_PATH:h}},93741:a=>{function b(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}a.exports={log:a=>console.log(`[${b()}] [MITM] ${a}`),err:a=>console.error(`[${b()}] ❌ [MITM] ${a}`)}},98012:(a,b,c)=>{let{exec:d,spawn:e,execSync:f}=c(79646),g=c(29021),h=c(33873),i=c(21820),{log:j,err:k}=c(93741),{TOOL_HOSTS:l}=c(66233),m="win32"===process.platform,n="darwin"===process.platform,o=m?h.join(process.env.SystemRoot||"C:\\Windows","System32","drivers","etc","hosts"):"/etc/hosts";function p(){if(m)return!1;try{return f("command -v sudo",{stdio:"ignore",windowsHide:!0}),!0}catch{return!1}}function q(a,b){return new Promise((c,d)=>{let f=p(),g=f?e("sudo",["-S","sh","-c",a],{stdio:["pipe","pipe","pipe"],windowsHide:!0}):e("sh",["-c",a],{stdio:["ignore","pipe","pipe"],windowsHide:!0}),h="",i="";g.stdout.on("data",a=>{h+=a}),g.stderr.on("data",a=>{i+=a}),g.on("close",a=>{0===a?c(h):d(Error(i||`Exit code ${a}`))}),f&&(g.stdin.write(`${b}
3
- `),g.stdin.end())})}async function r(a){m||(n?await q("dscacheutil -flushcache && killall -HUP mDNSResponder",a):await q("resolvectl flush-caches 2>/dev/null || true",a))}function s(a=null){try{let b=g.readFileSync(o,"utf8");if(a)return b.includes(a);return l.antigravity.every(a=>b.includes(a))}catch{return!1}}async function t(a,b){let d=l[a];if(!d)throw Error(`Unknown tool: ${a}`);let e=d.filter(a=>!s(a));if(0===e.length)return void j(`🌐 DNS ${a}: already active`);let f=e.map(a=>`127.0.0.1 ${a}`).join("\n");try{if(m){let a=e.map(a=>`127.0.0.1 ${a}`).join("\r\n")+"\r\n";g.appendFileSync(o,a,"utf8"),c(79646).execSync("ipconfig /flushdns",{windowsHide:!0})}else await q(`echo "${f}" >> ${o}`,b),await r(b);j(`🌐 DNS ${a}: ✅ added ${e.join(", ")}`)}catch(a){throw Error(a.message?.includes("incorrect password")?"Wrong sudo password":"Failed to add DNS entry")}}async function u(a,b){let d=l[a];if(!d)throw Error(`Unknown tool: ${a}`);let e=d.filter(a=>s(a));if(0===e.length)return void j(`🌐 DNS ${a}: already inactive`);try{if(m){let a=g.readFileSync(o,"utf8").split(/\r?\n/).filter(a=>!e.some(b=>a.includes(b))).join("\r\n");g.writeFileSync(o,a,"utf8"),c(79646).execSync("ipconfig /flushdns",{windowsHide:!0})}else{for(let a of e){let c=n?`sed -i '' '/${a}/d' ${o}`:`sed -i '/${a}/d' ${o}`;await q(c,b)}await r(b)}j(`🌐 DNS ${a}: ✅ removed ${e.join(", ")}`)}catch(a){throw Error(a.message?.includes("incorrect password")?"Wrong sudo password":"Failed to remove DNS entry")}}async function v(a){for(let b of Object.keys(l))try{await u(b,a)}catch(a){k(`DNS ${b}: failed to remove — ${a.message}`)}}a.exports={TOOL_HOSTS:l,addDNSEntry:t,removeDNSEntry:u,removeAllDNSEntries:v,removeAllDNSEntriesSync:function(){try{if(!g.existsSync(o))return;let a=Object.values(l).flat(),b=g.readFileSync(o,"utf8"),c=b.split(/\r?\n/).filter(b=>!a.some(a=>b.includes(a))).join(m?"\r\n":"\n");if(c===b)return;if(g.writeFileSync(o,c,"utf8"),m)try{f("ipconfig /flushdns",{windowsHide:!0,stdio:"ignore"})}catch{}else if(n)try{f("dscacheutil -flushcache && killall -HUP mDNSResponder",{stdio:"ignore"})}catch{}else try{f("resolvectl flush-caches 2>/dev/null || true",{stdio:"ignore"})}catch{}}catch{}},execWithPassword:q,isSudoAvailable:p,executeElevatedPowerShell:function(a,b=3e4){let c=h.join(i.tmpdir(),`ps_done_${Date.now()}.flag`),e=g.readFileSync(a,"utf8");e+=`
4
- Set-Content -Path '${c.replace(/'/g,"''")}' -Value 'done' -Encoding UTF8
5
- `,g.writeFileSync(a,e,"utf8");let f=`Start-Process powershell -ArgumentList '-NoProfile','-ExecutionPolicy','Bypass','-WindowStyle','Hidden','-File','${a.replace(/'/g,"''")}' -Verb RunAs -WindowStyle Hidden`;return new Promise((e,h)=>{let i=!1,j=(a,b)=>{i||(i=!0,a(b))};d(`powershell -NoProfile -NonInteractive -WindowStyle Hidden -Command "${f}"`,{windowsHide:!0},()=>{});let k=Date.now()+b,l=()=>{if(!i){if(g.existsSync(c)){try{g.unlinkSync(c),g.unlinkSync(a)}catch{}return j(e)}if(Date.now()>k){try{g.unlinkSync(a)}catch{}return j(h,Error("Timed out waiting for UAC confirmation"))}setTimeout(l,500)}};setTimeout(l,300)})},checkDNSEntry:s,checkAllDNSStatus:function(){try{let a=g.readFileSync(o,"utf8"),b={};for(let[c,d]of Object.entries(l))b[c]=d.every(b=>a.includes(b));return b}catch{return Object.fromEntries(Object.keys(l).map(a=>[a,!1]))}}}}};
1
+ "use strict";exports.id=8513,exports.ids=[8513],exports.modules={6021:(a,b,c)=>{c(33873),c(29021);let{MITM_DIR:d}=c(17893),{generateRootCA:e,loadRootCA:f,generateLeafCert:g}=c(89998);a.exports={generateCert:async function a(){return await e()},getCertForDomain:function(a){try{let b=f(),c=g(a,b);return{key:c.key,cert:c.cert}}catch(b){return console.error(`Failed to generate cert for ${a}:`,b.message),null}}}},17893:(a,b,c)=>{let d=c(33873),e=c(21820),f=process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?d.join(process.env.APPDATA||d.join(e.homedir(),"AppData","Roaming"),"9router"):d.join(e.homedir(),".9router"),g=d.join(f,"mitm");a.exports={DATA_DIR:f,MITM_DIR:g}},28059:(a,b,c)=>{let d=c(29021),e=c(55511),{exec:f}=c(79646),{execWithPassword:g,isSudoAvailable:h}=c(98012),{runElevatedPowerShell:i,quotePs:j}=c(55757),{log:k,err:l}=c(93741),m="win32"===process.platform,n="darwin"===process.platform,o="/usr/local/share/ca-certificates",p="9Router MITM Root CA";function q(a){let b=d.readFileSync(a,"utf-8"),c=Buffer.from(b.replace(/-----[^-]+-----/g,"").replace(/\s/g,""),"base64");return e.createHash("sha1").update(c).digest("hex").toUpperCase().match(/.{2}/g).join(":")}async function r(a){var b,c;let e;return m?(b=a,new Promise(a=>{let c;try{c=q(b).replace(/:/g,"")}catch{return a(!1)}f(`certutil -store Root ${c}`,{windowsHide:!0},b=>{a(!b)})})):n?(c=a,new Promise(a=>{try{let b=q(c).replace(/:/g,"");f(`security verify-cert -c "${c}" -p ssl -k /Library/Keychains/System.keychain 2>/dev/null`,{windowsHide:!0},c=>{if(!c)return a(!0);f(`security dump-trust-settings -d 2>/dev/null | grep -i "${b}"`,{windowsHide:!0},(b,c)=>{a(!b&&!!c?.trim())})})}catch{a(!1)}})):(e=`${o}/9router-root-ca.crt`,Promise.resolve(d.existsSync(e)))}async function s(a,b){let c=`security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${b}"`;try{await g(`security delete-certificate -c "9Router MITM Root CA" /Library/Keychains/System.keychain 2>/dev/null || true && ${c}`,a),k("\uD83D\uDD10 Cert: ✅ installed to system keychain")}catch(a){throw Error(a.message?.includes("canceled")?"User canceled authorization":"Certificate install failed")}}async function t(a){let b=`
2
+ certutil -delstore Root ${j(p)} 2>$null | Out-Null
3
+ $exit = & certutil -addstore Root ${j(a)} 2>&1
4
+ if ($LASTEXITCODE -ne 0) { throw "certutil exit $LASTEXITCODE" }
5
+ `;try{await i(b),k("\uD83D\uDD10 Cert: ✅ installed to Windows Root store")}catch(a){throw Error(`Failed to install certificate: ${a.message}`)}}async function u(a,b){let c=q(b).replace(/:/g,""),d=`security delete-certificate -Z "${c}" /Library/Keychains/System.keychain`;try{await g(d,a),k("\uD83D\uDD10 Cert: ✅ uninstalled from system keychain")}catch(a){throw Error("Failed to uninstall certificate")}}async function v(){let a=`certutil -delstore Root ${j(p)}`;try{await i(a),k("\uD83D\uDD10 Cert: ✅ uninstalled from Windows Root store")}catch(a){throw Error(`Failed to uninstall certificate: ${a.message}`)}}async function w(a,b){if(!h())return void k(`🔐 Cert: cannot install to system store without sudo — trust this file on clients: ${b}`);let c=`${o}/9router-root-ca.crt`,d=`cp "${b}" "${c}" && (update-ca-certificates 2>/dev/null || update-ca-trust 2>/dev/null || true)`;try{await g(d,a),k("\uD83D\uDD10 Cert: ✅ installed to Linux trust store")}catch(a){throw Error("Certificate install failed")}}async function x(a){if(!h())return;let b=`${o}/9router-root-ca.crt`,c=`rm -f "${b}" && (update-ca-certificates 2>/dev/null || update-ca-trust 2>/dev/null || true)`;try{await g(c,a),k("\uD83D\uDD10 Cert: ✅ uninstalled from Linux trust store")}catch(a){throw Error("Failed to uninstall certificate")}}a.exports={installCert:async function a(a,b){if(!d.existsSync(b))throw Error(`Certificate file not found: ${b}`);await r(b)?k("\uD83D\uDD10 Cert: already trusted ✅"):m?await t(b):n?await s(a,b):await w(a,b)},uninstallCert:async function a(a,b){await r(b)?m?await v():n?await u(a,b):await x(a):k("\uD83D\uDD10 Cert: not found in system store")},checkCertInstalled:r}},50514:(a,b,c)=>{let{exec:d,spawn:e,execSync:f}=c(79646),g=c(33873),h=c(29021),i=c(21820),j=c(91645),k=c(55591),l=c(55511),{addDNSEntry:m,removeDNSEntry:n,removeAllDNSEntries:o,checkAllDNSStatus:p,TOOL_HOSTS:q,isSudoAvailable:r}=c(98012),s="win32"===process.platform,t="darwin"===process.platform,{generateCert:u}=c(6021),{installCert:v,uninstallCert:w}=c(28059),{isCertExpired:x}=c(89998),{DATA_DIR:y,MITM_DIR:z}=c(17893),{log:A,err:B}=c(93741),C="http://localhost:20128";function D(a){return null==a||""===a?"''":`'${String(a).replace(/'/g,"'\\''")}'`}async function E(){if(!U)return C;try{let a=await U(),b=a&&null!=a.mitmRouterBaseUrl?String(a.mitmRouterBaseUrl).trim():"";if(!b)return C;let c=new URL(b);if("http:"!==c.protocol&&"https:"!==c.protocol)return C;return b.replace(/\/+$/,"")}catch{return C}}let F=g.join(z,".mitm.pid"),G=[5e3,1e4,2e4,3e4,6e4],H=0,I=0,J=!1,K=function(a){try{if(!a||!h.existsSync(a)||!a.includes(`${g.sep}node_modules${g.sep}`))return a;let b=g.join(y,"runtime","mitm"),c=g.join(b,"server.js");if(h.existsSync(c))try{if(h.statSync(a).size===h.statSync(c).size)return c}catch{}return h.mkdirSync(b,{recursive:!0}),h.copyFileSync(a,c),c}catch(b){try{A(`[MITM] runtime copy failed: ${b.message}`)}catch{}return a}}(function(){if(process.env.MITM_SERVER_PATH)return process.env.MITM_SERVER_PATH;let a=g.join(__dirname,"server.js");if(h.existsSync(a))return a;let b=g.join(process.cwd(),"src","mitm","server.js");if(h.existsSync(b))return b;let c=g.join(process.cwd(),"..","src","mitm","server.js");return h.existsSync(c)?c:b}()),L="aes-256-gcm",M="9router-mitm-pwd",N=null,O=null;function P(){return globalThis.__mitmSudoPassword||null}function Q(a){globalThis.__mitmSudoPassword=a}function R(a){try{return process.kill(a,0),!0}catch(a){return"EACCES"===a.code}}function S(a,b=!1,e=null){if(s)d(`taskkill ${b?"/F ":""}/PID ${a}`,{windowsHide:!0},()=>{});else{let f=b?"SIGKILL":"SIGTERM",g=`pkill -${f} -P ${a} 2>/dev/null; kill -${f} ${a} 2>/dev/null`;if(e){let{execWithPassword:a}=c(98012);a(g,e).catch(()=>d(g,{windowsHide:!0},()=>{}))}else d(g,{windowsHide:!0},()=>{})}}function T(){try{let{machineIdSync:a}=c(20243),b=a();return l.createHash("sha256").update(b+M).digest()}catch{return l.createHash("sha256").update(M).digest()}}let U=null,V=null;async function W(a,b){if(V)try{let c,d,e,f,g,h={mitmEnabled:a};b&&(c=T(),d=l.randomBytes(12),e=l.createCipheriv(L,c,d),f=Buffer.concat([e.update(b,"utf8"),e.final()]),g=e.getAuthTag(),h.mitmSudoEncrypted=`${d.toString("hex")}:${g.toString("hex")}:${f.toString("hex")}`),await V(h)}catch(a){B(`Failed to save settings: ${a.message}`)}}async function X(){if(V)try{await V({mitmSudoEncrypted:null})}catch(a){B(`Failed to clear encrypted password: ${a.message}`)}}async function Y(){if(!U)return null;try{let a=await U();if(!a.mitmSudoEncrypted)return null;return function(a){try{let[b,c,d]=a.split(":");if(!b||!c||!d)return null;let e=T(),f=l.createDecipheriv(L,e,Buffer.from(b,"hex"));return f.setAuthTag(Buffer.from(c,"hex")),f.update(Buffer.from(d,"hex"))+f.final("utf8")}catch{return null}}(a.mitmSudoEncrypted)}catch{return null}}async function Z(a){if(N&&!N.killed){try{N.kill("SIGKILL")}catch{}N=null,O=null}try{if(h.existsSync(F)){let b=parseInt(h.readFileSync(F,"utf-8").trim(),10);b&&R(b)&&(S(b,!0,a),await new Promise(a=>setTimeout(a,500))),h.unlinkSync(F)}}catch{}if(!s&&K)try{let b=K.replace(/'/g,"'\\''");if(a){let{execWithPassword:d}=c(98012);await d(`pkill -SIGKILL -f "${b}" 2>/dev/null || true`,a).catch(()=>{})}else d(`pkill -SIGKILL -f "${b}" 2>/dev/null || true`,{windowsHide:!0},()=>{});await new Promise(a=>setTimeout(a,500))}catch{}}async function $(){let a=null!==N&&!N.killed,b=O;if(!a)try{if(h.existsSync(F)){let c=parseInt(h.readFileSync(F,"utf-8").trim(),10);c&&R(c)?(a=!0,b=c):h.unlinkSync(F)}}catch{}let d=p(),e=g.join(z,"rootCA.crt"),f=h.existsSync(e),{checkCertInstalled:i}=c(28059),j=!!f&&await i(e);return{running:a,pid:b,certExists:f,certTrusted:j,dnsStatus:d}}async function _(a){if(J)return;if(Date.now()-I>=6e4&&(H=0),H>=5)return void B("Max restart attempts reached. Giving up.");let b=G[Math.min(H,G.length-1)];H++,J=!0,A(`Restarting in ${b/1e3}s... (${H}/5)`),await new Promise(a=>setTimeout(a,b));try{let b=U?await U():null;if(b&&!b.mitmEnabled){A("MITM disabled, skipping restart"),J=!1;return}let c=P()||await Y();if(!c&&!s){B("No cached password, cannot auto-restart"),J=!1;return}await aa(a,c),A("\uD83D\uDD04 Restarted successfully"),H=0,J=!1}catch(b){B(`Restart attempt ${H}/5 failed: ${b.message}`),J=!1,_(a)}}async function aa(a,b){if(!N||N.killed)try{if(h.existsSync(F)){let a=parseInt(h.readFileSync(F,"utf-8").trim(),10);if(a&&R(a))return O=a,A(`♻️ Reusing existing process (PID: ${a})`),await W(!0,b),b&&Q(b),{running:!0,pid:a};h.unlinkSync(F)}}catch{}if(N&&!N.killed)throw Error("MITM server is already running");if(await Z(b),!s){let a=await new Promise(a=>{let b=j.createServer();b.once("error",b=>{"EADDRINUSE"===b.code?a("in-use"):a("no-permission")}),b.once("listening",()=>{b.close(()=>a("free"))}),b.listen(443,"127.0.0.1")});if("in-use"===a||"no-permission"===a){let a=await new Promise(a=>{s?d('powershell -NonInteractive -WindowStyle Hidden -Command "$c = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1; if ($c) { $c.OwningProcess } else { 0 }"',{windowsHide:!0},(b,c)=>{if(b)return a(null);let e=parseInt(c.trim(),10);if(!e||e<=4)return a(null);d(`tasklist /FI "PID eq ${e}" /FO CSV /NH`,{windowsHide:!0},(b,c)=>{let d=c?.match(/"([^"]+)"/);a({pid:e,name:d?d[1]:"unknown"})})}):d("lsof -nP -iTCP:443 -sTCP:LISTEN -t",{windowsHide:!0},(b,c)=>{if(b||!c?.trim())return a(null);let e=parseInt(c.trim().split("\n")[0],10);if(!e||isNaN(e))return a(null);d(`ps -p ${e} -o comm=`,{windowsHide:!0},(b,c)=>{a({pid:e,name:c?.trim()||"unknown"})})})});if(a&&("node"===a.name||a.name.includes("node"))){A(`Killing orphan node process on port 443 (PID ${a.pid}, name=${a.name})...`);try{let{execWithPassword:d}=c(98012);await d(`kill -9 ${a.pid}`,b),await new Promise(a=>setTimeout(a,800))}catch{}}else if(a){let b=a.name.includes("/")?a.name.split("/").filter(Boolean).pop():a.name;throw Error(`Port 443 is already in use by "${b}" (PID ${a.pid}). Stop that process first.`)}}}let l=g.join(z,"rootCA.crt"),m=g.join(z,"rootCA.key"),n=h.existsSync(l)&&h.existsSync(m);if(!n||x(l)){if(n){A("\uD83D\uDD10 Cert expired — uninstalling old cert...");let a=b||P()||await Y();try{await w(a,l)}catch{}}A("\uD83D\uDD10 Generating Root CA..."),await u()}let{checkCertInstalled:o}=c(28059),q=await o(l),y=!s&&!t&&!r();if(q)A("\uD83D\uDD10 Cert: already trusted ✅");else{A("\uD83D\uDD10 Cert: not trusted → installing...");let a=b||P()||await Y();if(y)A(`🔐 Cert: skipping system trust (no sudo). Install ${l} as a trusted CA on machines that use this proxy.`);else{if(!a&&!s)throw Error("Sudo password required to install Root CA certificate");try{await v(a,l),A("\uD83D\uDD10 Cert: ✅ trusted")}catch(a){throw Error(`Failed to trust certificate: ${a.message}`)}}}let C=await E();if(A(`🚀 Starting server... (router: ${C})`),s){try{f('powershell -NonInteractive -WindowStyle Hidden -Command "$c = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1; if ($c -and $c.OwningProcess -gt 4) { Stop-Process -Id $c.OwningProcess -Force -ErrorAction SilentlyContinue }"',{windowsHide:!0}),await new Promise(a=>setTimeout(a,500))}catch{}N=e(process.execPath,[K],{detached:!1,windowsHide:!0,stdio:["ignore","pipe","pipe"],env:{...process.env,ROUTER_API_KEY:a,NODE_ENV:"production",MITM_ROUTER_BASE:C}}),V&&await V({mitmCertInstalled:!0}).catch(()=>{})}else r()?((N=e("sudo",["-S","-E","sh","-c",[`HOME=${D(i.homedir())}`,`ROUTER_API_KEY=${D(a)}`,`MITM_ROUTER_BASE=${D(C)}`,"NODE_ENV=production",D(process.execPath),D(K)].join(" ")],{detached:!1,windowsHide:!0,stdio:["pipe","pipe","pipe"]})).stdin.write(`${b}
6
+ `),N.stdin.end()):N=e(process.execPath,[K],{detached:!1,windowsHide:!0,stdio:["ignore","pipe","pipe"],env:{...process.env,ROUTER_API_KEY:a,NODE_ENV:"production",MITM_ROUTER_BASE:C}});N&&(O=N.pid,h.writeFileSync(F,String(O)),I=Date.now());let G=null;N&&(N.stdout.on("data",a=>{process.stdout.write(a)}),N.stderr.on("data",a=>{let b=a.toString().trim();b&&(s||!b.includes("Password:")&&!b.includes("password for"))&&(B(b),G=b),!s&&(b.includes("incorrect password")||b.includes("no password was provided"))&&(Q(null),X(),J=!0)}),N.on("exit",b=>{A(`Server exited (code: ${b})`),N=null,O=null;try{h.unlinkSync(F)}catch{}0===b||J||_(a)}));let H=await function(a=443){return new Promise(b=>{let c=Date.now()+8e3,d=()=>{let e=k.request({hostname:"127.0.0.1",port:a,path:"/_mitm_health",method:"GET",rejectUnauthorized:!1},a=>{let c="";a.on("data",a=>{c+=a}),a.on("end",()=>{try{let a=JSON.parse(c);b(!0===a.ok?{ok:!0,pid:a.pid||null}:null)}catch{b(null)}})});e.on("error",()=>{Date.now()<c?setTimeout(d,500):b(null)}),e.end()};d()})}(443);if(!H){if(N&&!N.killed){try{N.kill()}catch{}N=null}let a=function(){try{if(s){let a=f('powershell -NonInteractive -WindowStyle Hidden -Command "$c = Get-NetTCPConnection -LocalPort 443 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1; if ($c) { $c.OwningProcess } else { 0 }"',{encoding:"utf8",windowsHide:!0}).trim(),b=parseInt(a,10);if(b&&b>4){let a=f(`tasklist /FI "PID eq ${b}" /FO CSV /NH`,{encoding:"utf8",windowsHide:!0}).match(/"([^"]+)"/);if(a)return a[1].replace(".exe","")}}else{let a=f("lsof -i :443",{encoding:"utf8",windowsHide:!0}).trim().split("\n");if(a.length>1)return a[1].split(/\s+/)[0]}}catch{}return null}(),b=a?` Port 443 already in use by ${a}.`:"",c=G||`Check sudo password or port 443 access.${b}`;throw Error(`MITM server failed to start. ${c}`)}for(let[a,b]of(V&&await V({mitmCertInstalled:!0}).catch(()=>{}),A(`✅ Server healthy (PID: ${O||H.pid})`),Object.entries(p())))A(`🌐 DNS ${a}: ${b?"✅ active":"❌ inactive"}`);return await W(!0,b),b&&Q(b),{running:!0,pid:O}}async function ab(a){J=!0,H=0,A("⏹ Stopping server...");let b=N,d=b&&!b.killed?b.pid:(()=>{try{return parseInt(h.readFileSync(F,"utf-8").trim(),10)}catch{return null}})();if(d&&R(d)&&(A(`Killing server (PID: ${d})...`),S(d,!1,a),await new Promise(a=>setTimeout(a,1e3)),R(d)&&S(d,!0,a)),N=null,O=null,s){let a=g.join(process.env.SystemRoot||"C:\\Windows","System32","drivers","etc","hosts"),b=Object.values(q).flat();try{let{isAdmin:d,runElevatedPowerShell:e,quotePs:f}=c(55757);if(d()){let d=h.readFileSync(a,"utf8"),e=d.split(/\r?\n/).filter(a=>!b.some(b=>a.includes(b))).join("\r\n");e!==d&&h.writeFileSync(a,e,"utf8");try{c(79646).execSync("ipconfig /flushdns",{windowsHide:!0,stdio:"ignore"})}catch{}A("\uD83C\uDF10 DNS: ✅ all tool hosts removed")}else{let c=b.map(f).join(","),d=`
7
+ $hosts = @(${c})
8
+ $lines = Get-Content -LiteralPath ${f(a)}
9
+ $filtered = $lines | Where-Object {
10
+ $line = $_
11
+ -not ($hosts | Where-Object { $line -match [regex]::Escape($_) })
12
+ }
13
+ Set-Content -LiteralPath ${f(a)} -Value $filtered
14
+ ipconfig /flushdns | Out-Null
15
+ `;await e(d)}}catch(a){B(`Failed to clean hosts: ${a.message}`)}}else await o(a);try{h.unlinkSync(F)}catch{}return await W(!1,null),J=!1,{running:!1,pid:null}}async function ac(a,b){if(!(await $()).running)throw Error("MITM server is not running. Start the server first.");let c=b||P()||await Y();return await m(a,c),{success:!0}}a.exports={getMitmStatus:$,startServer:aa,stopServer:ab,enableToolDNS:ac,disableToolDNS:async function a(a,b){let c=b||P()||await Y();return await n(a,c),{success:!0}},trustCert:async function a(a){let b=g.join(z,"rootCA.crt");if(!h.existsSync(b))throw Error("Root CA not found. Start server first to generate it.");let{installCert:d}=c(28059);if(!s&&!t&&!r())return void A(`🔐 Cert: system trust unavailable (no sudo). Use file: ${b}`);let e=a||P()||await Y();if(!e&&!s)throw Error("Sudo password required to trust certificate");await d(e,b),e&&Q(e)},startMitm:aa,stopMitm:ab,getCachedPassword:P,setCachedPassword:Q,loadEncryptedPassword:Y,clearEncryptedPassword:X,initDbHooks:function(a,b){U=a,V=b}}},55757:(a,b,c)=>{let{exec:d,execSync:e}=c(79646),f="win32"===process.platform;function g(){if(!f)return!1;try{return e("net session >nul 2>&1",{windowsHide:!0,stdio:"ignore"}),!0}catch{return!1}}function h(a){return`'${String(a).replace(/'/g,"''")}'`}a.exports={isAdmin:g,runElevatedPowerShell:function(a){if(!f)return Promise.reject(Error("Windows-only"));let b=Buffer.from(a,"utf16le").toString("base64");if(g())return new Promise((a,c)=>{d(`powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand ${b}`,{windowsHide:!0},(b,d,e)=>{b?c(Error(e||b.message)):a(d)})});let c=`
16
+ $proc = Start-Process powershell -ArgumentList @(
17
+ '-NoProfile','-NonInteractive','-ExecutionPolicy','Bypass',
18
+ '-WindowStyle','Hidden','-EncodedCommand','${b}'
19
+ ) -Verb RunAs -Wait -PassThru -WindowStyle Hidden;
20
+ if ($proc.ExitCode -ne 0) { throw "Elevated command exited with code $($proc.ExitCode)" }
21
+ `;return new Promise((a,b)=>{d(`powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ${h(c)}`,{windowsHide:!0},(c,d,e)=>{if(c){let a=e||c.message;a.includes("canceled by the user")||a.includes("operation was canceled")?b(Error("User canceled UAC prompt")):b(Error(a))}else a(d)})})},quotePs:h}},66233:a=>{a.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},81372:(a,b,c)=>{c.d(b,{n:()=>i});var d=c(33873),e=c.n(d),f=c(21820),g=c.n(f);let h="9router",i=process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?e().join(process.env.APPDATA||e().join(g().homedir(),"AppData","Roaming"),h):e().join(g().homedir(),`.${h}`)},82571:a=>{a.exports={TARGET_HOSTS:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","api2.cursor.sh"],URL_PATTERNS:{antigravity:[":generateContent",":streamGenerateContent"],copilot:["/chat/completions","/v1/messages","/responses"],kiro:["/generateAssistantResponse"],cursor:["/BidiAppend","/RunSSE","/RunPoll","/Run"]},MODEL_SYNONYMS:{antigravity:{"gemini-default":"gemini-3-flash"}},LOG_BLACKLIST_URL_PARTS:["recordCodeAssistMetrics","recordTrajectoryAnalytics","fetchAdminControls","listExperiments","fetchUserInfo"],getToolForHost:function(a){let b=(a||"").split(":")[0];return"api.individual.githubcopilot.com"===b?"copilot":"daily-cloudcode-pa.googleapis.com"===b||"cloudcode-pa.googleapis.com"===b?"antigravity":"q.us-east-1.amazonaws.com"===b?"kiro":"api2.cursor.sh"===b?"cursor":null}}},89998:(a,b,c)=>{let d=c(33873),e=c(29021),f=c(65978),{MITM_DIR:g}=c(17893),h=d.join(g,"rootCA.key"),i=d.join(g,"rootCA.crt");function j(a){try{let b=f.pki.certificateFromPem(e.readFileSync(a,"utf8")),c=new Date(Date.now()+2592e6);return b.validity.notAfter<c}catch{return!0}}a.exports={generateRootCA:async function a(){let a=e.existsSync(h)&&e.existsSync(i);if(a&&!j(i))return console.log("✅ Root CA already exists"),{key:h,cert:i};if(a){console.log("\uD83D\uDD10 Root CA expired or expiring soon — regenerating...");try{e.unlinkSync(h)}catch{}try{e.unlinkSync(i)}catch{}}e.existsSync(g)||e.mkdirSync(g,{recursive:!0}),console.log("\uD83D\uDD10 Generating Root CA certificate...");let b=f.pki.rsa.generateKeyPair(2048),c=f.pki.createCertificate();c.publicKey=b.publicKey,c.serialNumber="01",c.validity.notBefore=new Date,c.validity.notAfter=new Date,c.validity.notAfter.setFullYear(c.validity.notBefore.getFullYear()+10);let d=[{name:"commonName",value:"9Router MITM Root CA"},{name:"organizationName",value:"9Router"},{name:"countryName",value:"US"}];c.setSubject(d),c.setIssuer(d),c.setExtensions([{name:"basicConstraints",cA:!0,critical:!0},{name:"keyUsage",keyCertSign:!0,cRLSign:!0,critical:!0},{name:"subjectKeyIdentifier"}]),c.sign(b.privateKey,f.md.sha256.create());let k=f.pki.privateKeyToPem(b.privateKey),l=f.pki.certificateToPem(c);return e.writeFileSync(h,k),e.writeFileSync(i,l),console.log("✅ Root CA generated successfully"),{key:h,cert:i}},loadRootCA:function(){if(!e.existsSync(h)||!e.existsSync(i))throw Error("Root CA not found. Generate it first.");let a=e.readFileSync(h,"utf8"),b=e.readFileSync(i,"utf8");return{key:f.pki.privateKeyFromPem(a),cert:f.pki.certificateFromPem(b)}},generateLeafCert:function(a,b){let c=f.pki.rsa.generateKeyPair(2048),d=f.pki.createCertificate();return d.publicKey=c.publicKey,d.serialNumber=Math.floor(1e6*Math.random()).toString(),d.validity.notBefore=new Date,d.validity.notAfter=new Date,d.validity.notAfter.setFullYear(d.validity.notBefore.getFullYear()+1),d.setSubject([{name:"commonName",value:a}]),d.setIssuer(b.cert.subject.attributes),d.setExtensions([{name:"basicConstraints",cA:!1},{name:"keyUsage",digitalSignature:!0,keyEncipherment:!0},{name:"extKeyUsage",serverAuth:!0,clientAuth:!0},{name:"subjectAltName",altNames:[{type:2,value:a},{type:2,value:`*.${a}`}]}]),d.sign(b.key,f.md.sha256.create()),{key:f.pki.privateKeyToPem(c.privateKey),cert:f.pki.certificateToPem(d)}},isCertExpired:j,ROOT_CA_CERT_PATH:i,ROOT_CA_KEY_PATH:h}},93741:(a,b,c)=>{let d=c(29021),e=c(33873),f=c(74075),{DATA_DIR:g}=c(17893),{LOG_BLACKLIST_URL_PARTS:h}=c(82571);function i(){return new Date().toLocaleTimeString("en-US",{hour12:!1})}let j=e.join(g,"logs","mitm");d.existsSync(j)||d.mkdirSync(j,{recursive:!0});let k=/^\s*(\{\s*\}|\[\s*\]|null)?\s*$/;function l(a,b=80){return String(a).replace(/[^a-zA-Z0-9]/g,"_").substring(0,b)}function m(a){return!!a&&h.some(b=>a.includes(b))}a.exports={log:a=>console.log(`[${i()}] [MITM] ${a}`),err:a=>console.error(`[${i()}] ❌ [MITM] ${a}`),dumpRequest:function(a,b,c="raw"){if(m(a.url))return null;try{let f=new Date().toISOString().replace(/[:.]/g,"-"),g=l((a.headers.host||"")+a.url),h=e.join(j,`${f}_${c}_${g}.req.json`),i=null;try{i=JSON.parse(b.toString())}catch{}return d.writeFileSync(h,JSON.stringify({method:a.method,url:a.url,host:a.headers.host,headers:a.headers,body:i??b.toString("utf8")},null,2)),h}catch{return null}},createResponseDumper:function(a,b="raw"){if(m(a.url))return null;let c=new Date().toISOString().replace(/[:.]/g,"-"),g=l((a.headers.host||"")+a.url),h=e.join(j,`${c}_${b}_${g}.res.txt`),i=0,n={},o=[];return{writeHeader:(a,b)=>{i=a,n=b||{}},writeChunk:a=>{null!=a&&o.push(Buffer.isBuffer(a)?a:Buffer.from(a))},end:()=>{try{let a=Buffer.concat(o),b=n["content-encoding"]||n["Content-Encoding"],c=(function(a,b){if(!a||0===a.length)return a;try{let c=(b||"").toLowerCase();if(c.includes("gzip"))return f.gunzipSync(a);if(c.includes("br"))return f.brotliDecompressSync(a);if(c.includes("deflate"))return f.inflateSync(a)}catch{}return a})(a,b).toString("utf8");if(k.test(c))return;let e={...n};delete e["content-encoding"],delete e["Content-Encoding"];let g=`STATUS: ${i}
22
+ HEADERS: ${JSON.stringify(e,null,2)}
23
+ ---BODY---
24
+ ${c}`;d.writeFileSync(h,g)}catch{}},file:h}}}},98012:(a,b,c)=>{let{exec:d,spawn:e,execSync:f}=c(79646),g=c(29021),h=c(33873);c(21820);let{log:i,err:j}=c(93741),{TOOL_HOSTS:k}=c(66233),{runElevatedPowerShell:l,quotePs:m,isAdmin:n}=c(55757),o="win32"===process.platform,p="darwin"===process.platform,q=o?h.join(process.env.SystemRoot||"C:\\Windows","System32","drivers","etc","hosts"):"/etc/hosts";function r(){if(o)return!1;try{return f("command -v sudo",{stdio:"ignore",windowsHide:!0}),!0}catch{return!1}}function s(a,b){return new Promise((c,d)=>{let f=r(),g=f?e("sudo",["-S","sh","-c",a],{stdio:["pipe","pipe","pipe"],windowsHide:!0}):e("sh",["-c",a],{stdio:["ignore","pipe","pipe"],windowsHide:!0}),h="",i="";g.stdout.on("data",a=>{h+=a}),g.stderr.on("data",a=>{i+=a}),g.on("close",a=>{0===a?c(h):d(Error(i||`Exit code ${a}`))}),f&&(g.stdin.write(`${b}
25
+ `),g.stdin.end())})}async function t(a){o||(p?await s("dscacheutil -flushcache && killall -HUP mDNSResponder",a):await s("resolvectl flush-caches 2>/dev/null || true",a))}function u(a=null){try{let b=g.readFileSync(q,"utf8");if(a)return b.includes(a);return k.antigravity.every(a=>b.includes(a))}catch{return!1}}async function v(a,b){let c=k[a];if(!c)throw Error(`Unknown tool: ${a}`);let d=c.filter(a=>!u(a));if(0===d.length)return void i(`🌐 DNS ${a}: already active`);let e=d.map(a=>`127.0.0.1 ${a}`).join("\n");try{if(o){let a=d.map(a=>`127.0.0.1 ${a}`).join("`r`n"),b=`
26
+ Add-Content -LiteralPath ${m(q)} -Value ${m(a)}
27
+ ipconfig /flushdns | Out-Null
28
+ `;await l(b)}else await s(`echo "${e}" >> ${q}`,b),await t(b);i(`🌐 DNS ${a}: ✅ added ${d.join(", ")}`)}catch(a){throw Error(a.message?.includes("incorrect password")?"Wrong sudo password":`Failed to add DNS entry: ${a.message}`)}}async function w(a,b){let c=k[a];if(!c)throw Error(`Unknown tool: ${a}`);let d=c.filter(a=>u(a));if(0===d.length)return void i(`🌐 DNS ${a}: already inactive`);try{if(o){let a=d.map(m).join(","),b=`
29
+ $hosts = @(${a})
30
+ $lines = Get-Content -LiteralPath ${m(q)}
31
+ $filtered = $lines | Where-Object {
32
+ $line = $_
33
+ -not ($hosts | Where-Object { $line -match [regex]::Escape($_) })
34
+ }
35
+ Set-Content -LiteralPath ${m(q)} -Value $filtered
36
+ ipconfig /flushdns | Out-Null
37
+ `;await l(b)}else{for(let a of d){let c=p?`sed -i '' '/${a}/d' ${q}`:`sed -i '/${a}/d' ${q}`;await s(c,b)}await t(b)}i(`🌐 DNS ${a}: ✅ removed ${d.join(", ")}`)}catch(a){throw Error(a.message?.includes("incorrect password")?"Wrong sudo password":`Failed to remove DNS entry: ${a.message}`)}}async function x(a){for(let b of Object.keys(k))try{await w(b,a)}catch(a){j(`DNS ${b}: failed to remove — ${a.message}`)}}a.exports={TOOL_HOSTS:k,addDNSEntry:v,removeDNSEntry:w,removeAllDNSEntries:x,removeAllDNSEntriesSync:function(){try{if(!g.existsSync(q))return;let a=Object.values(k).flat(),b=g.readFileSync(q,"utf8"),c=b.split(/\r?\n/).filter(b=>!a.some(a=>b.includes(a))).join(o?"\r\n":"\n");if(c===b)return;if(g.writeFileSync(q,c,"utf8"),o)try{f("ipconfig /flushdns",{windowsHide:!0,stdio:"ignore"})}catch{}else if(p)try{f("dscacheutil -flushcache && killall -HUP mDNSResponder",{stdio:"ignore"})}catch{}else try{f("resolvectl flush-caches 2>/dev/null || true",{stdio:"ignore"})}catch{}}catch{}},execWithPassword:s,isSudoAvailable:r,checkDNSEntry:u,checkAllDNSStatus:function(){try{let a=g.readFileSync(q,"utf8"),b={};for(let[c,d]of Object.entries(k))b[c]=d.every(b=>a.includes(b));return b}catch{return Object.fromEntries(Object.keys(k).map(a=>[a,!1]))}}}}};
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/gCRsyLIe80K11L3X2GfjE/_buildManifest.js","static/gCRsyLIe80K11L3X2GfjE/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-86e40ea2022f394c.js","static/chunks/c7879cf7-255d52e3eda24cb7.js","static/chunks/5158-4b48a3595c794bbc.js","static/chunks/main-app-2c8be355ba1c4e93.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/opvV5qhNp8aVYocKuuu2V/_buildManifest.js","static/opvV5qhNp8aVYocKuuu2V/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-86e40ea2022f394c.js","static/chunks/c7879cf7-255d52e3eda24cb7.js","static/chunks/5158-4b48a3595c794bbc.js","static/chunks/main-app-2c8be355ba1c4e93.js"],rootMainFilesTree:{},pages:{"/_app":[]}};