@techysy/10router 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1126) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +57 -0
  3. package/README.zh-CN.md +49 -0
  4. package/app/.next-cli-build/BUILD_ID +1 -1
  5. package/app/.next-cli-build/app-path-routes-manifest.json +11 -6
  6. package/app/.next-cli-build/build-manifest.json +3 -3
  7. package/app/.next-cli-build/prerender-manifest.json +51 -23
  8. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  9. package/app/.next-cli-build/routes-manifest.json +30 -0
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js +1 -0
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -0
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -0
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +5 -5
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  83. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  91. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.rsc +18 -17
  95. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +18 -17
  96. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +10 -9
  97. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  98. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +2 -2
  111. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
  123. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  189. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  191. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -0
  207. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -0
  208. package/app/.next-cli-build/server/app/api/models/caps/route_client-reference-manifest.js +1 -0
  209. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/network/egress-region/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js +1 -0
  254. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -0
  255. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route_client-reference-manifest.js +1 -0
  256. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js +1 -0
  257. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -0
  258. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route_client-reference-manifest.js +1 -0
  259. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  266. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  300. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  302. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  306. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  308. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  310. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  312. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  316. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  318. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  320. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  322. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -0
  324. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -0
  325. package/app/.next-cli-build/server/app/api/security/status/route_client-reference-manifest.js +1 -0
  326. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  343. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  401. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  441. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  443. package/app/.next-cli-build/server/app/callback.html +1 -1
  444. package/app/.next-cli-build/server/app/callback.rsc +22 -21
  445. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +22 -21
  446. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  447. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +10 -9
  448. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +20 -19
  450. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +12 -11
  451. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +20 -19
  452. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  453. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +21 -20
  455. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +12 -11
  456. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +21 -20
  457. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  458. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/combos.rsc +23 -22
  460. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +12 -11
  461. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +23 -22
  462. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  463. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +21 -20
  465. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +12 -11
  466. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +21 -20
  467. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  468. package/app/.next-cli-build/server/app/dashboard/experimental.html +1 -0
  469. package/app/.next-cli-build/server/app/dashboard/experimental.meta +36 -0
  470. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +23 -0
  471. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +31 -0
  472. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +23 -0
  473. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +3 -0
  474. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +23 -22
  476. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +12 -11
  477. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +23 -22
  478. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  479. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +20 -19
  481. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +12 -11
  482. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +20 -19
  483. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  484. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/profile.rsc +23 -22
  486. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +12 -11
  487. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +23 -22
  488. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  489. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +23 -22
  491. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +12 -11
  492. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +23 -22
  493. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  494. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/providers.rsc +23 -22
  496. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +12 -11
  497. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +23 -22
  498. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  499. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +23 -22
  501. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +12 -11
  502. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +23 -22
  503. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
  504. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +20 -19
  506. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +12 -11
  507. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +20 -19
  508. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
  509. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/quota.rsc +21 -20
  511. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +13 -12
  512. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +21 -20
  513. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  514. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +22 -21
  519. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +22 -21
  520. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  521. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +11 -10
  522. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/skills.rsc +23 -22
  524. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +12 -11
  525. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +23 -22
  526. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  527. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +20 -19
  529. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +12 -11
  530. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +20 -19
  531. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
  532. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/translator.rsc +23 -22
  534. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +12 -11
  535. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +23 -22
  536. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  537. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/usage.rsc +23 -22
  539. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +12 -11
  540. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +23 -22
  541. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  542. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  543. package/app/.next-cli-build/server/app/dashboard.rsc +21 -20
  544. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +12 -11
  545. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +21 -20
  546. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  547. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  548. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/index.html +1 -1
  550. package/app/.next-cli-build/server/app/index.rsc +17 -16
  551. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +10 -9
  552. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +17 -16
  553. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  554. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  555. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  556. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  557. package/app/.next-cli-build/server/app/landing.html +1 -1
  558. package/app/.next-cli-build/server/app/landing.rsc +22 -21
  559. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +22 -21
  560. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  561. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +11 -10
  562. package/app/.next-cli-build/server/app/login/page.js +1 -1
  563. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  564. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  565. package/app/.next-cli-build/server/app/login.html +1 -1
  566. package/app/.next-cli-build/server/app/login.rsc +22 -21
  567. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +22 -21
  568. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  569. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +11 -10
  570. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  571. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  572. package/app/.next-cli-build/server/app/page.js +1 -1
  573. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  574. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  575. package/app/.next-cli-build/server/app-paths-manifest.json +11 -6
  576. package/app/.next-cli-build/server/chunks/112.js +1 -0
  577. package/app/.next-cli-build/server/chunks/1159.js +3 -3
  578. package/app/.next-cli-build/server/chunks/1330.js +1 -0
  579. package/app/.next-cli-build/server/chunks/1531.js +1 -0
  580. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  581. package/app/.next-cli-build/server/chunks/2120.js +1 -1
  582. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  583. package/app/.next-cli-build/server/chunks/2179.js +1 -1
  584. package/app/.next-cli-build/server/chunks/241.js +1 -1
  585. package/app/.next-cli-build/server/chunks/271.js +1 -0
  586. package/app/.next-cli-build/server/chunks/2812.js +2 -0
  587. package/app/.next-cli-build/server/chunks/3225.js +1 -6
  588. package/app/.next-cli-build/server/chunks/{7843.js → 3500.js} +7 -2
  589. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  590. package/app/.next-cli-build/server/chunks/3651.js +3 -3
  591. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  592. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  593. package/app/.next-cli-build/server/chunks/4123.js +2 -2
  594. package/app/.next-cli-build/server/chunks/4125.js +1 -1
  595. package/app/.next-cli-build/server/chunks/4126.js +1 -0
  596. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  597. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  598. package/app/.next-cli-build/server/chunks/4990.js +9 -0
  599. package/app/.next-cli-build/server/chunks/507.js +1 -1
  600. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  601. package/app/.next-cli-build/server/chunks/5330.js +8 -8
  602. package/app/.next-cli-build/server/chunks/5485.js +1 -1
  603. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  604. package/app/.next-cli-build/server/chunks/5781.js +2 -2
  605. package/app/.next-cli-build/server/chunks/6051.js +1 -0
  606. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  607. package/app/.next-cli-build/server/chunks/615.js +1 -1
  608. package/app/.next-cli-build/server/chunks/6212.js +1 -1
  609. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  610. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  611. package/app/.next-cli-build/server/chunks/6520.js +1 -1
  612. package/app/.next-cli-build/server/chunks/653.js +1 -1
  613. package/app/.next-cli-build/server/chunks/6756.js +1 -0
  614. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  615. package/app/.next-cli-build/server/chunks/6844.js +1 -1
  616. package/app/.next-cli-build/server/chunks/6871.js +1 -1
  617. package/app/.next-cli-build/server/chunks/6960.js +2 -2
  618. package/app/.next-cli-build/server/chunks/698.js +1 -1
  619. package/app/.next-cli-build/server/chunks/6982.js +1 -0
  620. package/app/.next-cli-build/server/chunks/7067.js +1 -0
  621. package/app/.next-cli-build/server/chunks/7122.js +6 -0
  622. package/app/.next-cli-build/server/chunks/7180.js +6 -0
  623. package/app/.next-cli-build/server/chunks/7239.js +4 -4
  624. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  625. package/app/.next-cli-build/server/chunks/7274.js +33 -0
  626. package/app/.next-cli-build/server/chunks/7322.js +1 -1
  627. package/app/.next-cli-build/server/chunks/7365.js +1 -0
  628. package/app/.next-cli-build/server/chunks/75.js +1 -0
  629. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  630. package/app/.next-cli-build/server/chunks/808.js +1 -1
  631. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  632. package/app/.next-cli-build/server/chunks/8410.js +1 -1
  633. package/app/.next-cli-build/server/chunks/8499.js +2 -2
  634. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  635. package/app/.next-cli-build/server/chunks/8546.js +1 -1
  636. package/app/.next-cli-build/server/chunks/8635.js +5 -1
  637. package/app/.next-cli-build/server/chunks/869.js +1 -1
  638. package/app/.next-cli-build/server/chunks/8838.js +1 -1
  639. package/app/.next-cli-build/server/chunks/8895.js +12 -9
  640. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  641. package/app/.next-cli-build/server/chunks/9539.js +9 -0
  642. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  643. package/app/.next-cli-build/server/chunks/9896.js +1 -0
  644. package/app/.next-cli-build/server/chunks/9927.js +1 -1
  645. package/app/.next-cli-build/server/instrumentation.js +1 -1
  646. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  647. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  648. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  649. package/app/.next-cli-build/server/middleware.js +8 -8
  650. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  651. package/app/.next-cli-build/server/pages/404.html +1 -1
  652. package/app/.next-cli-build/server/pages/500.html +1 -1
  653. package/app/.next-cli-build/server/prefetch-hints.json +24 -0
  654. package/app/.next-cli-build/static/chunks/1243-d0e0b9458266e912.js +3 -0
  655. package/app/.next-cli-build/static/chunks/1321-23084daf91733d47.js +1 -0
  656. package/app/.next-cli-build/static/chunks/{3346-0ae97d50d86ac1f7.js → 3346-509e8dd58ea4832d.js} +7 -7
  657. package/app/.next-cli-build/static/chunks/{3521.3c9be8ed83af460d.js → 3521.3107c4bff48fe566.js} +1 -1
  658. package/app/.next-cli-build/static/chunks/5497-d050b53817def025.js +7 -0
  659. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-fa4ba47a6bf0da15.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/page-4dd5e46a2d6f4486.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-9ca09f92fcb7be9f.js +59 -0
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-9a471accf206ea43.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-a2510813ebd64f72.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-48878e82a437e813.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-18da0e8d40af56ac.js +14 -0
  666. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9ec9a9251e22a7c8.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-e84b8de5542a9dc9.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f62700ce9aa54572.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-7833d8a884ba922a.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-158175db070fe14c.js → layout-434f2e27f8b21ae1.js} +1 -1
  671. package/app/.next-cli-build/static/chunks/app/_global-error/page-45a30f9960975021.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-45a30f9960975021.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-45a30f9960975021.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-45a30f9960975021.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-45a30f9960975021.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-45a30f9960975021.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-45a30f9960975021.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-45a30f9960975021.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-45a30f9960975021.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-45a30f9960975021.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-45a30f9960975021.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-45a30f9960975021.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-45a30f9960975021.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-45a30f9960975021.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-45a30f9960975021.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-45a30f9960975021.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-45a30f9960975021.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-45a30f9960975021.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-45a30f9960975021.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-45a30f9960975021.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-45a30f9960975021.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-45a30f9960975021.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-45a30f9960975021.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-45a30f9960975021.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-45a30f9960975021.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-45a30f9960975021.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-45a30f9960975021.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-45a30f9960975021.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-45a30f9960975021.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-45a30f9960975021.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-45a30f9960975021.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-45a30f9960975021.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-45a30f9960975021.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/combos/route-45a30f9960975021.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-45a30f9960975021.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-45a30f9960975021.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-45a30f9960975021.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-45a30f9960975021.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-45a30f9960975021.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-45a30f9960975021.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/health/route-45a30f9960975021.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/init/route-45a30f9960975021.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-45a30f9960975021.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-45a30f9960975021.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/keys/route-45a30f9960975021.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/locale/route-45a30f9960975021.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-45a30f9960975021.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-45a30f9960975021.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-45a30f9960975021.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-45a30f9960975021.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-45a30f9960975021.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-45a30f9960975021.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-45a30f9960975021.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-45a30f9960975021.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-45a30f9960975021.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/models/caps/route-45a30f9960975021.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-45a30f9960975021.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-45a30f9960975021.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-45a30f9960975021.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/models/route-45a30f9960975021.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/models/test/route-45a30f9960975021.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-45a30f9960975021.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-45a30f9960975021.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-45a30f9960975021.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-45a30f9960975021.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-45a30f9960975021.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-45a30f9960975021.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-45a30f9960975021.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-45a30f9960975021.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-45a30f9960975021.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-45a30f9960975021.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-45a30f9960975021.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-45a30f9960975021.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-45a30f9960975021.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-45a30f9960975021.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-45a30f9960975021.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-45a30f9960975021.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-45a30f9960975021.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder/checkin/route-45a30f9960975021.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/oauth/qoder-cn/checkin/route-45a30f9960975021.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-45a30f9960975021.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-45a30f9960975021.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-45a30f9960975021.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-45a30f9960975021.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/pricing/route-45a30f9960975021.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-45a30f9960975021.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-45a30f9960975021.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-45a30f9960975021.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-45a30f9960975021.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-45a30f9960975021.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-45a30f9960975021.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-45a30f9960975021.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-45a30f9960975021.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-45a30f9960975021.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/providers/route-45a30f9960975021.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-45a30f9960975021.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-45a30f9960975021.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-45a30f9960975021.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-45a30f9960975021.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-45a30f9960975021.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-45a30f9960975021.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-45a30f9960975021.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-45a30f9960975021.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-45a30f9960975021.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-45a30f9960975021.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-45a30f9960975021.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-45a30f9960975021.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-45a30f9960975021.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-45a30f9960975021.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-45a30f9960975021.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-45a30f9960975021.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-45a30f9960975021.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/security/status/route-45a30f9960975021.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-45a30f9960975021.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-45a30f9960975021.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-45a30f9960975021.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-45a30f9960975021.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/settings/route-45a30f9960975021.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-45a30f9960975021.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/tags/route-45a30f9960975021.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-45a30f9960975021.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-45a30f9960975021.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-45a30f9960975021.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-45a30f9960975021.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-45a30f9960975021.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-45a30f9960975021.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-45a30f9960975021.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-45a30f9960975021.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-45a30f9960975021.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-45a30f9960975021.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-45a30f9960975021.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-45a30f9960975021.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-45a30f9960975021.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-45a30f9960975021.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-45a30f9960975021.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-45a30f9960975021.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-45a30f9960975021.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-45a30f9960975021.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-45a30f9960975021.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-45a30f9960975021.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-45a30f9960975021.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-45a30f9960975021.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-45a30f9960975021.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-45a30f9960975021.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-45a30f9960975021.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-45a30f9960975021.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-45a30f9960975021.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-45a30f9960975021.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-45a30f9960975021.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-45a30f9960975021.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-45a30f9960975021.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-45a30f9960975021.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-45a30f9960975021.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-45a30f9960975021.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-45a30f9960975021.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-45a30f9960975021.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-45a30f9960975021.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-45a30f9960975021.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/v1/route-45a30f9960975021.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-45a30f9960975021.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-45a30f9960975021.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-45a30f9960975021.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-45a30f9960975021.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-45a30f9960975021.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-45a30f9960975021.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-45a30f9960975021.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-45a30f9960975021.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/version/route-45a30f9960975021.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-45a30f9960975021.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/version/update/route-45a30f9960975021.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-9170ddf38e76b3cf.js → page-3659ea13d950adc1.js} +1 -1
  842. package/app/.next-cli-build/static/chunks/app/landing/page-acb1434862d18ac7.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/layout-ba8ee035fd3fda5f.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/login/page-f1945d5fab85c48f.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-45a30f9960975021.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/page-45a30f9960975021.js +1 -0
  847. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-45a30f9960975021.js +1 -0
  848. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-45a30f9960975021.js +1 -0
  849. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-45a30f9960975021.js +1 -0
  850. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-45a30f9960975021.js +1 -0
  851. package/app/.next-cli-build/static/chunks/{webpack-77a7ed7beb6725df.js → webpack-b43a2a1c513882e9.js} +1 -1
  852. package/app/.next-cli-build/static/css/6e249fe05f9d7227.css +1 -0
  853. package/app/.next-cli-build/static/css/7a3e1568f247f3d0.css +1 -0
  854. package/app/.next-cli-build/static/mzc6AVdJokpIsYjtjKON0/_buildManifest.js +1 -0
  855. package/app/custom-server.js +8 -8
  856. package/app/package.json +1 -1
  857. package/app/public/i18n/changelog/en.md +64 -0
  858. package/app/public/i18n/changelog/zh-CN.md +64 -0
  859. package/app/public/i18n/changelog/zh-TW.md +64 -0
  860. package/app/public/i18n/literals/ar.json +4 -4
  861. package/app/public/i18n/literals/bn.json +4 -4
  862. package/app/public/i18n/literals/cs.json +4 -4
  863. package/app/public/i18n/literals/da.json +4 -4
  864. package/app/public/i18n/literals/de.json +4 -4
  865. package/app/public/i18n/literals/el.json +4 -4
  866. package/app/public/i18n/literals/es.json +4 -4
  867. package/app/public/i18n/literals/fa.json +31 -34
  868. package/app/public/i18n/literals/fi.json +4 -4
  869. package/app/public/i18n/literals/fr.json +4 -4
  870. package/app/public/i18n/literals/he.json +4 -4
  871. package/app/public/i18n/literals/hi.json +4 -4
  872. package/app/public/i18n/literals/hu.json +4 -4
  873. package/app/public/i18n/literals/id.json +4 -4
  874. package/app/public/i18n/literals/it.json +4 -4
  875. package/app/public/i18n/literals/ja.json +4 -4
  876. package/app/public/i18n/literals/km.json +31 -34
  877. package/app/public/i18n/literals/ko.json +4 -4
  878. package/app/public/i18n/literals/nl.json +4 -4
  879. package/app/public/i18n/literals/no.json +4 -4
  880. package/app/public/i18n/literals/pl.json +4 -4
  881. package/app/public/i18n/literals/pt-BR.json +12 -12
  882. package/app/public/i18n/literals/pt-PT.json +4 -4
  883. package/app/public/i18n/literals/ro.json +4 -4
  884. package/app/public/i18n/literals/ru.json +4 -4
  885. package/app/public/i18n/literals/sv.json +4 -4
  886. package/app/public/i18n/literals/th.json +31 -34
  887. package/app/public/i18n/literals/tl.json +4 -4
  888. package/app/public/i18n/literals/tr.json +4 -4
  889. package/app/public/i18n/literals/uk.json +4 -4
  890. package/app/public/i18n/literals/ur.json +4 -4
  891. package/app/public/i18n/literals/vi.json +4 -4
  892. package/app/public/i18n/literals/zh-CN.json +1857 -1755
  893. package/app/public/i18n/literals/zh-TW.json +695 -578
  894. package/app/public/providers/mimo-desktop.png +0 -0
  895. package/app/public/providers/qoder-cn.png +0 -0
  896. package/app/public/providers/qoder.png +0 -0
  897. package/app/public/providers/stepfun.png +0 -0
  898. package/app/public/providers/xiaomi-tokenplan.png +0 -0
  899. package/app/src/lib/db/adapters/betterSqliteAdapter.js +6 -2
  900. package/app/src/lib/db/migrate.js +5 -2
  901. package/app/src/lib/oauth/services/qoder.js +13 -3
  902. package/app/src/lib/oauth/xiaomiIdentity.js +50 -41
  903. package/app/src/lib/updater/updater.js +95 -5
  904. package/app/src/mitm/server.js +14 -14
  905. package/app/src/sse/services/qoderCheckin.js +437 -0
  906. package/cli.js +91 -9
  907. package/hooks/postinstall.js +11 -1
  908. package/hooks/sqliteRuntime.js +27 -9
  909. package/hooks/trayRuntime.js +5 -2
  910. package/package.json +11 -2
  911. package/src/cli/doctor.js +525 -0
  912. package/src/cli/i18n/locales/en/core.json +42 -2
  913. package/src/cli/i18n/locales/en/settings.json +3 -3
  914. package/src/cli/i18n/locales/zh-CN/core.json +42 -2
  915. package/src/cli/i18n/locales/zh-CN/settings.json +3 -3
  916. package/src/cli/i18n/locales/zh-TW/core.json +42 -2
  917. package/src/cli/i18n/locales/zh-TW/settings.json +3 -3
  918. package/src/cli/menus/settings.js +26 -8
  919. package/src/cli/staleServer.js +216 -0
  920. package/app/.next-cli-build/server/chunks/1377.js +0 -1
  921. package/app/.next-cli-build/server/chunks/1937.js +0 -1
  922. package/app/.next-cli-build/server/chunks/1968.js +0 -1
  923. package/app/.next-cli-build/server/chunks/2268.js +0 -1
  924. package/app/.next-cli-build/server/chunks/3395.js +0 -1
  925. package/app/.next-cli-build/server/chunks/3546.js +0 -1
  926. package/app/.next-cli-build/server/chunks/4055.js +0 -9
  927. package/app/.next-cli-build/server/chunks/4531.js +0 -1
  928. package/app/.next-cli-build/server/chunks/4848.js +0 -1
  929. package/app/.next-cli-build/server/chunks/4862.js +0 -1
  930. package/app/.next-cli-build/server/chunks/4985.js +0 -1
  931. package/app/.next-cli-build/server/chunks/5217.js +0 -9
  932. package/app/.next-cli-build/server/chunks/7805.js +0 -33
  933. package/app/.next-cli-build/server/chunks/8910.js +0 -2
  934. package/app/.next-cli-build/server/chunks/8990.js +0 -1
  935. package/app/.next-cli-build/static/0UB55QZoHsERFCcuezqF6/_buildManifest.js +0 -1
  936. package/app/.next-cli-build/static/chunks/1243-220f1fd87235cb92.js +0 -3
  937. package/app/.next-cli-build/static/chunks/1321-c260dcc02a05636e.js +0 -1
  938. package/app/.next-cli-build/static/chunks/5497-5558a45da400f48e.js +0 -7
  939. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-395c2359af9bc2a9.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-b0d4fedb7b84fe8a.js +0 -59
  941. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-502e7efb917191b9.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-720b5ab2e46fc6bb.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-df0197fa38b2dd6d.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6fa55fa547594c8c.js +0 -14
  945. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-c44ffd57ebec461e.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-5f5434b22c7f7b73.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c640efd5ea8efb38.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-27bf96f0f2568f09.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/_global-error/page-f2f9b74f8844db3a.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f2f9b74f8844db3a.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f2f9b74f8844db3a.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f2f9b74f8844db3a.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f2f9b74f8844db3a.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f2f9b74f8844db3a.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f2f9b74f8844db3a.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-f2f9b74f8844db3a.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-f2f9b74f8844db3a.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-f2f9b74f8844db3a.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-f2f9b74f8844db3a.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f2f9b74f8844db3a.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-f2f9b74f8844db3a.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f2f9b74f8844db3a.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f2f9b74f8844db3a.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f2f9b74f8844db3a.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f2f9b74f8844db3a.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f2f9b74f8844db3a.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f2f9b74f8844db3a.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f2f9b74f8844db3a.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f2f9b74f8844db3a.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f2f9b74f8844db3a.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f2f9b74f8844db3a.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f2f9b74f8844db3a.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-f2f9b74f8844db3a.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f2f9b74f8844db3a.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-f2f9b74f8844db3a.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f2f9b74f8844db3a.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f2f9b74f8844db3a.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f2f9b74f8844db3a.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f2f9b74f8844db3a.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f2f9b74f8844db3a.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f2f9b74f8844db3a.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/combos/route-f2f9b74f8844db3a.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f2f9b74f8844db3a.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f2f9b74f8844db3a.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f2f9b74f8844db3a.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f2f9b74f8844db3a.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f2f9b74f8844db3a.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f2f9b74f8844db3a.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/health/route-f2f9b74f8844db3a.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/init/route-f2f9b74f8844db3a.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f2f9b74f8844db3a.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-f2f9b74f8844db3a.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/keys/route-f2f9b74f8844db3a.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/locale/route-f2f9b74f8844db3a.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f2f9b74f8844db3a.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f2f9b74f8844db3a.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f2f9b74f8844db3a.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f2f9b74f8844db3a.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f2f9b74f8844db3a.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f2f9b74f8844db3a.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f2f9b74f8844db3a.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f2f9b74f8844db3a.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f2f9b74f8844db3a.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-f2f9b74f8844db3a.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f2f9b74f8844db3a.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f2f9b74f8844db3a.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/models/route-f2f9b74f8844db3a.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/models/test/route-f2f9b74f8844db3a.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/network/egress-region/route-f2f9b74f8844db3a.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f2f9b74f8844db3a.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f2f9b74f8844db3a.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-f2f9b74f8844db3a.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-f2f9b74f8844db3a.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f2f9b74f8844db3a.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f2f9b74f8844db3a.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f2f9b74f8844db3a.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f2f9b74f8844db3a.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f2f9b74f8844db3a.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f2f9b74f8844db3a.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f2f9b74f8844db3a.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f2f9b74f8844db3a.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f2f9b74f8844db3a.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-f2f9b74f8844db3a.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f2f9b74f8844db3a.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f2f9b74f8844db3a.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-f2f9b74f8844db3a.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-f2f9b74f8844db3a.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-f2f9b74f8844db3a.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-f2f9b74f8844db3a.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/pricing/route-f2f9b74f8844db3a.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f2f9b74f8844db3a.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f2f9b74f8844db3a.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f2f9b74f8844db3a.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f2f9b74f8844db3a.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f2f9b74f8844db3a.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f2f9b74f8844db3a.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f2f9b74f8844db3a.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f2f9b74f8844db3a.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f2f9b74f8844db3a.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/providers/route-f2f9b74f8844db3a.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f2f9b74f8844db3a.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f2f9b74f8844db3a.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f2f9b74f8844db3a.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f2f9b74f8844db3a.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f2f9b74f8844db3a.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f2f9b74f8844db3a.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f2f9b74f8844db3a.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f2f9b74f8844db3a.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f2f9b74f8844db3a.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f2f9b74f8844db3a.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f2f9b74f8844db3a.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-f2f9b74f8844db3a.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f2f9b74f8844db3a.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f2f9b74f8844db3a.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f2f9b74f8844db3a.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f2f9b74f8844db3a.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f2f9b74f8844db3a.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-f2f9b74f8844db3a.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f2f9b74f8844db3a.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f2f9b74f8844db3a.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f2f9b74f8844db3a.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/settings/route-f2f9b74f8844db3a.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f2f9b74f8844db3a.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/tags/route-f2f9b74f8844db3a.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f2f9b74f8844db3a.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f2f9b74f8844db3a.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f2f9b74f8844db3a.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f2f9b74f8844db3a.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f2f9b74f8844db3a.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f2f9b74f8844db3a.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f2f9b74f8844db3a.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f2f9b74f8844db3a.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f2f9b74f8844db3a.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f2f9b74f8844db3a.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f2f9b74f8844db3a.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f2f9b74f8844db3a.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f2f9b74f8844db3a.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f2f9b74f8844db3a.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f2f9b74f8844db3a.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f2f9b74f8844db3a.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/usage/dashboard/route-f2f9b74f8844db3a.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f2f9b74f8844db3a.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f2f9b74f8844db3a.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f2f9b74f8844db3a.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f2f9b74f8844db3a.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f2f9b74f8844db3a.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f2f9b74f8844db3a.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f2f9b74f8844db3a.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f2f9b74f8844db3a.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f2f9b74f8844db3a.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f2f9b74f8844db3a.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f2f9b74f8844db3a.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f2f9b74f8844db3a.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f2f9b74f8844db3a.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f2f9b74f8844db3a.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f2f9b74f8844db3a.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f2f9b74f8844db3a.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f2f9b74f8844db3a.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f2f9b74f8844db3a.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f2f9b74f8844db3a.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f2f9b74f8844db3a.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f2f9b74f8844db3a.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/v1/route-f2f9b74f8844db3a.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f2f9b74f8844db3a.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-f2f9b74f8844db3a.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-f2f9b74f8844db3a.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-f2f9b74f8844db3a.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-f2f9b74f8844db3a.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f2f9b74f8844db3a.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f2f9b74f8844db3a.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f2f9b74f8844db3a.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/version/route-f2f9b74f8844db3a.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f2f9b74f8844db3a.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/version/update/route-f2f9b74f8844db3a.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/landing/page-3c92a951f3cc5eee.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/layout-034acae46f56c420.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/login/page-0da5fcc5d841cbb9.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f2f9b74f8844db3a.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/page-f2f9b74f8844db3a.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f2f9b74f8844db3a.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f2f9b74f8844db3a.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f2f9b74f8844db3a.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f2f9b74f8844db3a.js +0 -1
  1124. package/app/.next-cli-build/static/css/246bebea1dda73a2.css +0 -1
  1125. package/app/.next-cli-build/static/css/8f9ac5a7bd3a79e5.css +0 -1
  1126. /package/app/.next-cli-build/static/{0UB55QZoHsERFCcuezqF6 → mzc6AVdJokpIsYjtjKON0}/_ssgManifest.js +0 -0
@@ -0,0 +1,9 @@
1
+ "use strict";exports.id=9539,exports.ids=[9539],exports.modules={2521:(a,b,c)=>{c.d(b,{f0:()=>h,kk:()=>g,oO:()=>f});var d=c(77598),e=c.n(d);function f(a){return a&&"string"==typeof a?a.length<=8?a.charAt(0)+"***":a.slice(0,8)+"***":null}function g(a){return a&&"string"==typeof a?e().createHash("sha256").update(a).digest("hex"):null}function h(a){return"string"==typeof a&&a.endsWith("***")}},62674:(a,b,c)=>{function d(a,b,c=null){let e=a.get("SELECT value FROM _meta WHERE key = ?",[b]);return e?e.value:c}function e(a,b,c){a.run("INSERT INTO _meta(key, value) VALUES(?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[b,String(c)])}c.d(b,{dy:()=>d,np:()=>e}),c(36366)},63775:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=1,e=`
2
+ PRAGMA journal_mode = WAL;
3
+ PRAGMA synchronous = NORMAL;
4
+ PRAGMA temp_store = MEMORY;
5
+ PRAGMA mmap_size = 30000000;
6
+ PRAGMA cache_size = -64000;
7
+ PRAGMA foreign_keys = ON;
8
+ PRAGMA busy_timeout = 5000;
9
+ `,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",apiKeyHash:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)","CREATE INDEX IF NOT EXISTS idx_uh_apikey_hash ON usageHistory(apiKeyHash)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}},72082:(a,b,c)=>{c.r(b),c.d(b,{CONNECTION_SECRET_FIELDS:()=>n,CredentialCryptoError:()=>q,UNREADABLE_CREDENTIALS_KEY:()=>z,connectionDataHasPlaintextSecrets:()=>D,decryptConnectionData:()=>B,decryptSecret:()=>v,encryptConnectionData:()=>y,encryptSecret:()=>u,getCredentialKey:()=>s,hasUnreadableCredentials:()=>A,isEncrypted:()=>r,resetCredentialKeyCache:()=>t,restoreUnreadableCredentials:()=>C});var d=c(77598),e=c.n(d),f=c(73024),g=c.n(f),h=c(76760),i=c.n(h),j=c(49120),k=c(77134);let l="enc:v1:",m="aes-256-gcm",n=["accessToken","refreshToken","idToken","apiKey"],o=/(token|secret|password|cookie|credential|api[-_]?key|proxyurl)/i,p=null;class q extends Error{constructor(a){super(a),this.name="CredentialCryptoError"}}function r(a){return"string"==typeof a&&a.startsWith(l)}function s(){if(p)return p;let a=process.env.CREDENTIAL_SECRET;if("string"==typeof a&&a.trim())return p=e().createHash("sha256").update(a.trim()).digest();let b=i().join(j.nJ,"credential-key");try{let a=g().readFileSync(b,"utf8").trim();if(a)return p=e().createHash("sha256").update(a).digest()}catch{}g().mkdirSync(j.nJ,{recursive:!0});let c=e().randomBytes(32).toString("hex");return g().writeFileSync(b,c,{mode:384}),(0,k.E)(b),p=e().createHash("sha256").update(c).digest()}function t(){p=null}function u(a){if("string"!=typeof a||""===a||r(a))return a;let b=e().randomBytes(12),c=e().createCipheriv(m,s(),b),d=Buffer.concat([c.update(a,"utf8"),c.final()]);return`${l}${b.toString("base64url")}:${c.getAuthTag().toString("base64url")}:${d.toString("base64url")}`}function v(a){if("string"!=typeof a||!r(a))return a;let b=a.slice(l.length).split(":");if(3!==b.length)throw new q("stored credential is malformed");let[c,d,f]=b;try{let a=e().createDecipheriv(m,s(),Buffer.from(c,"base64url"));return a.setAuthTag(Buffer.from(d,"base64url")),Buffer.concat([a.update(Buffer.from(f,"base64url")),a.final()]).toString("utf8")}catch{throw new q("stored credential cannot be decrypted with the current key")}}function w(a){return a&&"object"==typeof a?Object.keys(a).filter(b=>o.test(b)&&"string"==typeof a[b]):[]}function x(a){return w(a).filter(b=>""!==a[b])}function y(a){if(!a||"object"!=typeof a)return a;let b={...a};for(let a of n)"string"==typeof b[a]&&(b[a]=u(b[a]));let c=w(b.providerSpecificData);if(c.length){let a={...b.providerSpecificData};for(let b of c)a[b]=u(a[b]);b.providerSpecificData=a}return b}let z="__unreadableCredentials";function A(a){return!!(a&&"object"==typeof a&&a[z])}function B(a){if(!a||"object"!=typeof a)return{data:a,error:null,unreadable:null};let b={...a},c=null,d=null,e=(a,b,c)=>{d||(d={}),d[a]||(d[a]={}),d[a][b]=c};for(let a of n)if(r(b[a]))try{b[a]=v(b[a])}catch(d){e("fields",a,b[a]),delete b[a],c=d.message}let f=x(b.providerSpecificData).filter(a=>r(b.providerSpecificData[a]));if(f.length){let a={...b.providerSpecificData};for(let b of f)try{a[b]=v(a[b])}catch(d){e("providerSpecificData",b,a[b]),delete a[b],c=d.message}b.providerSpecificData=a}return{data:b,error:c,unreadable:d}}function C(a){if(!a||"object"!=typeof a||!a[z])return a;let{[z]:b,...c}=a,d=a=>null==a||""===a;for(let[a,e]of Object.entries(b.fields||{}))d(c[a])&&(c[a]=e);let e=b.providerSpecificData||{};if(Object.keys(e).length){let a={...c.providerSpecificData||{}};for(let[b,c]of Object.entries(e))d(a[b])&&(a[b]=c);c.providerSpecificData=a}let f=b.synthesized;return f&&(c.testStatus===f.testStatus&&delete c.testStatus,c.lastError===f.lastError&&delete c.lastError),c}function D(a){if(!a||"object"!=typeof a)return!1;for(let b of n)if("string"==typeof a[b]&&""!==a[b]&&!r(a[b]))return!0;return x(a.providerSpecificData).some(b=>!r(a.providerSpecificData[b]))}},77134:(a,b,c)=>{c.d(b,{E:()=>i});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(31421);function i(a){if(a){if("win32"===process.platform){try{let b=[process.env.USERDOMAIN,process.env.USERNAME].filter(Boolean).join("\\")||g().userInfo().username;(0,h.execFileSync)("icacls",[a,"/inheritance:r","/grant:r",`${b}:(F)`],{stdio:"ignore",windowsHide:!0})}catch(b){console.warn(`⚠️ Could not restrict ACLs on ${a}: ${b.message}`)}return}try{e().chmodSync(a,384)}catch(b){console.warn(`⚠️ Could not restrict permissions on ${a}: ${b.message}`)}}}},79539:(a,b,c)=>{c.d(b,{runMigrationOnce:()=>G});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(95658),i=c(63775);let j="stepfun",k="stepfun-cn";var l=c(72082),m=c(2521);let n=["mimoPassToken","mimoUserId","mimoCUserId"],o=new Set(["Xiaomi MiMo Desktop","Xiaomi MiMo Desktop Session"]),p="mimo-desktop-session";function q(a){if(!(0,l.isEncrypted)(a))return{ok:!0,value:a};try{return{ok:!0,value:(0,l.decryptSecret)(a)}}catch{return{ok:!1,value:a}}}function r(a){try{return JSON.parse(a.data||"{}")}catch{return null}}function s(a,b=null){let c=a?.providerSpecificData||{},d=q("string"==typeof a?.accessToken?a.accessToken:null),e="string"==typeof c.uid||"number"==typeof c.uid?String(c.uid):null,f="string"==typeof c.mimoUserId||"number"==typeof c.mimoUserId?String(c.mimoUserId):null,g=c.mimoPassToken;return{token:d.ok?d.value:null,uid:e,mu:f,email:"string"==typeof b&&b?b:null,hasSession:null!=g&&""!==g&&q(g).ok}}let t=[{version:1,name:"initial",up(a){for(let[b,c]of Object.entries(i.CG))for(let d of(a.exec((0,i.zE)(b,c)),c.indexes||[]))a.exec(d)}},{version:2,name:"stepfun-cn-rename",up(a){let b;for(let b of(a.run("UPDATE providerConnections SET provider = ? WHERE provider = ?",[k,j]),a.run("UPDATE kv SET key = ? WHERE scope = 'disabledModels' AND key = ?",[k,j]),["modelCaps","customModels"]))a.run("UPDATE kv SET key = ? || substr(key, ?) WHERE scope = ? AND key LIKE ?",[k,j.length+1,b,`${j}|%`]);let c=a.get("SELECT data FROM settings WHERE id = 1");if(!c?.data)return;try{b=JSON.parse(c.data)}catch{return}if(!b||"object"!=typeof b)return;let d=!1;if(Array.isArray(b.providerCardOrder)){let a=b.providerCardOrder.map(a=>a===j?k:a);a.some((a,c)=>a!==b.providerCardOrder[c])&&(b.providerCardOrder=a,d=!0)}for(let a of["topologyVisibility","providerStrategies"]){let c=b[a];c&&"object"==typeof c&&Object.prototype.hasOwnProperty.call(c,j)&&(k in c||(c[k]=c[j]),delete c[j],d=!0)}d&&a.run("UPDATE settings SET data = ? WHERE id = 1",[JSON.stringify(b)])}},{version:3,name:"encrypt-credentials",up(a){let b;try{b=a.all("SELECT id, data FROM providerConnections")}catch(a){console.warn("[migration] encrypt-credentials: could not read connections:",a?.message||a);return}let c=0,d=0;for(let e of b){let b;try{b=JSON.parse(e.data||"{}")}catch{continue}if((0,l.connectionDataHasPlaintextSecrets)(b))try{a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify((0,l.encryptConnectionData)(b)),e.id]),c+=1}catch(a){1===(d+=1)&&console.warn("[migration] encrypt-credentials: could not encrypt a connection — credentials stay in plain text until they are rewritten:",a?.message||a)}}c&&console.log(`[migration] encrypt-credentials: encrypted ${c} connection row(s)`),d&&console.warn(`[migration] encrypt-credentials: ${d} row(s) left in plain text`)}},{version:4,name:"usage-apikey-digest",up(a){try{a.all("PRAGMA table_info(usageHistory)").map(a=>a.name).includes("apiKeyHash")||(a.exec("ALTER TABLE usageHistory ADD COLUMN apiKeyHash TEXT"),console.log("[migration] usage-apikey-digest: added usageHistory.apiKeyHash")),a.exec("CREATE INDEX IF NOT EXISTS idx_uh_apikey_hash ON usageHistory(apiKeyHash)")}catch(a){console.warn("[migration] usage-apikey-digest: could not ensure apiKeyHash column:",a?.message||a)}let b=0;try{for(let c of a.all("SELECT id, apiKey FROM usageHistory WHERE apiKey IS NOT NULL AND apiKey != ''"))(0,m.f0)(c.apiKey)||(a.run("UPDATE usageHistory SET apiKey = ?, apiKeyHash = ? WHERE id = ?",[(0,m.oO)(c.apiKey),(0,m.kk)(c.apiKey),c.id]),b+=1)}catch(a){console.warn("[migration] usage-apikey-digest: history rows skipped:",a?.message||a)}let c=0;try{for(let b of a.all("SELECT dateKey, data FROM usageDaily")){let d;try{d=JSON.parse(b.data||"{}")}catch{continue}let e=d?.byApiKey;if(!e||"object"!=typeof e)continue;let f={},g=!1;for(let[a,b]of Object.entries(e)){if(!b||"object"!=typeof b){f[a]=b;continue}let c="string"==typeof b.apiKey?b.apiKey:null;if(!c&&b.apiKeyHash||!c){f[a]=b;continue}let{apiKey:d,...e}=b,h=(0,m.kk)(c),i=a.split("|"),j=i.length>1?"|"+i.slice(1).join("|"):"";f[`${h||"local-no-key"}${j}`]={...e,apiKeyHash:h,apiKeyMasked:(0,m.oO)(c)},g=!0}g&&(a.run("UPDATE usageDaily SET data = ? WHERE dateKey = ?",[JSON.stringify({...d,byApiKey:f}),b.dateKey]),c+=1)}}catch(a){console.warn("[migration] usage-apikey-digest: daily aggregates skipped:",a?.message||a)}(b||c)&&console.log(`[migration] usage-apikey-digest: rewrote ${b} history row(s), ${c} day aggregate(s)`)}},{version:5,name:"strip-mimo-main-card-session",up(a){let b,c;try{b=a.all("SELECT id, email, data FROM providerConnections WHERE provider = 'xiaomi-mimo'"),c=a.all("SELECT id, email, data FROM providerConnections WHERE provider = 'mimo-desktop'")}catch(a){console.warn("[migration] strip-mimo-main-card-session: could not read connections:",a?.message||a);return}let d=c.map(a=>{let b=r(a);return b?s(b,a.email):null}).filter(Boolean),e=0,f=0,g=0,h=0;for(let c of b){let b=r(c);if(!b||"object"!=typeof b)continue;let i=b.providerSpecificData&&"object"==typeof b.providerSpecificData?b.providerSpecificData:{};if(!(n.some(a=>void 0!==i[a]&&null!==i[a]&&""!==i[a])||o.has(i.provider)||"desktop-session"===i.authMethod||"string"==typeof b.accessToken&&b.accessToken.startsWith(p)))continue;let j=q("string"==typeof b.accessToken?b.accessToken:null);if(!j.ok||i.mimoPassToken&&!q(i.mimoPassToken).ok){h+=1;continue}if(!("string"!=typeof j.value||""===j.value||j.value.startsWith(p))){let d=function(a){let b={...a};for(let a of n)delete b[a];return o.has(b.provider)&&delete b.provider,b}(i);"desktop-session"===d.authMethod&&(d.authMethod="api_key"),a.run("UPDATE providerConnections SET data = ? WHERE id = ?",[JSON.stringify((0,l.encryptConnectionData)({...b,providerSpecificData:d})),c.id]),e+=1;continue}let k=s(b,c.email);if(d.find(a=>(!!a.token&&!!k.token&&a.token===k.token||!!a.uid&&!!k.uid&&a.uid===k.uid||!!a.mu&&!!k.mu&&a.mu===k.mu||!!a.uid&&!!k.mu&&a.uid===k.mu||!!a.mu&&!!k.uid&&a.mu===k.uid||!!a.email&&!!k.email&&a.email===k.email||!1)&&a.hasSession)){a.run("DELETE FROM providerConnections WHERE id = ?",[c.id]),g+=1;continue}a.run("UPDATE providerConnections SET provider = 'mimo-desktop', data = ? WHERE id = ?",[JSON.stringify((0,l.encryptConnectionData)(b)),c.id]),f+=1}(e||f||g||h)&&console.log(`[migration] strip-mimo-main-card-session: stripped ${e} cloud row(s), moved ${f} session-only row(s) to mimo-desktop, removed ${g} duplicate row(s)`+(h?`, ${h} row(s) left untouched (undecryptable credentials)`:""))}}].sort((a,b)=>a.version-b.version);var u=c(62674);let v=null;function w(){if(v)return v;try{let a=g().join(process.cwd(),"package.json");v=JSON.parse(e().readFileSync(a,"utf-8")).version||"0.0.0"}catch{v="0.0.0"}return v}let x=["requestDetails"];function y(a){(0,h.Jh)();let b=w(),c=`${a}-${b}-${function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${a.getFullYear()}${b(a.getMonth()+1)}${b(a.getDate())}-${b(a.getHours())}${b(a.getMinutes())}${b(a.getSeconds())}`}()}`,d=g().join(h.KQ,c);return e().mkdirSync(d,{recursive:!0}),d}function z(){if(e().existsSync(h.KQ))for(let a of e().readdirSync(h.KQ,{withFileTypes:!0}).filter(a=>a.isDirectory()).map(a=>({name:a.name,full:g().join(h.KQ,a.name),mtime:e().statSync(g().join(h.KQ,a.name)).mtimeMs})).sort((a,b)=>b.mtime-a.mtime).slice(3))try{e().rmSync(a.full,{recursive:!0,force:!0})}catch{}}var A=c(644);let B=g().join(h.HG,".migrated-from-json"),C=new WeakSet;class D extends Error{constructor(a,b){super(a),this.name="MigrationAborted",this.droppedRows=b}}function E(a,b,c,d,e){let f=[];for(let a of c)try{d(a)}catch(b){f.push({...e(a),reason:b.message})}let g=a.get(`SELECT COUNT(*) as c FROM ${b}`)?.c??0;if(g!==c.length)throw console.warn(`[DB][migrate] ${b} row-count mismatch: expected ${c.length}, got ${g}. Dropped:`,f),new D(`${b} row-count mismatch: expected ${c.length}, got ${g}`,f)}function F(a){if(!e().existsSync(a))return null;try{return JSON.parse(e().readFileSync(a,"utf-8"))}catch{return null}}async function G(a){if(C.has(a))return;C.add(a);let b=function(a){try{let b=a.get("SELECT COUNT(*) as c FROM _meta");return!b||0===b.c}catch{return!0}}(a);z(),a.exec((0,i.zE)("_meta",i.CG._meta));let c=parseInt((0,u.dy)(a,"backupSchemaVersion","0"),10)||0;if(!b&&c<i.f$)try{let b=y(`schema-${c}-to-${i.f$}`);!function(a,b,c="data.sqlite"){let d=g().join(b,c);try{e().rmSync(d,{force:!0})}catch{}let f=d.replace(/'/g,"''");a.exec(`ATTACH DATABASE '${f}' AS bak`);try{let b=new Set(x),c=a.all("SELECT name, sql FROM main.sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").filter(a=>!b.has(a.name));a.transaction(()=>{for(let b of c){let c=b.sql.replace(/CREATE TABLE\s+/i,"CREATE TABLE bak.");a.exec(c),a.exec(`INSERT INTO bak.${b.name} SELECT * FROM main.${b.name}`)}})}finally{try{a.exec("DETACH DATABASE bak")}catch{}}}(a,b),z(),console.log(`[DB][migrate] pre-schema backup ${c} → ${i.f$}: ${b}`)}catch(a){console.warn(`[DB][migrate] pre-schema backup failed (continuing): ${a.message}`)}!function(a){a.exec((0,i.zE)("_meta",i.CG._meta));let b=parseInt((0,u.dy)(a,"schemaVersion","0"),10)||0;if(b>=(t.length?t[t.length-1].version:0))return;let c=t.filter(a=>a.version>b);for(let b of c)a.transaction(()=>{b.up(a),(0,u.np)(a,"schemaVersion",b.version)}),b.version,console.log(`[DB][migrate] applied #${b.version} ${b.name}`);c.length}(a);for(let[b,c]of Object.entries(i.CG)){a.exec((0,i.zE)(b,c));let d=new Set(a.all(`PRAGMA table_info(${b})`).map(a=>a.name));for(let[e,f]of Object.entries(c.columns))if(!d.has(e)){let c=f.replace(/PRIMARY KEY( AUTOINCREMENT)?/i,"").replace(/UNIQUE/i,"").trim();try{a.exec(`ALTER TABLE ${b} ADD COLUMN ${e} ${c}`),console.log(`[DB][sync] +column ${b}.${e}`)}catch(a){console.warn(`[DB][sync] add column ${b}.${e} failed: ${a.message}`)}}for(let b of c.indexes||[])try{a.exec(b)}catch{}}(0,u.np)(a,"backupSchemaVersion",i.f$);let d=e().existsSync(B),f=F(h.Or.main),j=F(h.Or.usage),k=F(h.Or.disabled),m=F(h.Or.details);if(b&&(f||j||k||m)&&!d){let b=Date.now(),c=y("migrate-from-json");for(let a of Object.values(h.Or))!function(a,b,c=null){if(!e().existsSync(a))return;let d=c||g().basename(a),f=g().join(b,d);e().copyFileSync(a,f)}(a,c);try{a.transaction(()=>{if(f&&"object"==typeof f){for(let[b,c]of(f.settings&&a.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,A.s)(f.settings)]),E(a,"providerConnections",f.providerConnections||[],b=>{let{id:c,provider:d,authType:e,name:f,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...m}=b;a.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c,d,e||"oauth",f||null,g||null,h||null,+(!1!==i),(0,A.s)((0,l.encryptConnectionData)(m)),j||new Date().toISOString(),k||new Date().toISOString()])},a=>({id:a.id??null,provider:a.provider??null,name:a.name??null})),E(a,"providerNodes",f.providerNodes||[],b=>{let{id:c,type:d,name:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,d||null,e||null,(0,A.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null,type:a.type??null,name:a.name??null})),E(a,"proxyPools",f.proxyPools||[],b=>{let{id:c,isActive:d,testStatus:e,createdAt:f,updatedAt:g,...h}=b;a.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[c,+(!1!==d),e||"unknown",(0,A.s)(h),f||new Date().toISOString(),g||new Date().toISOString()])},a=>({id:a.id??null})),E(a,"apiKeys",f.apiKeys||[],b=>{a.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.key,b.name||null,b.machineId||null,+(!1!==b.isActive),b.createdAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),E(a,"combos",f.combos||[],b=>{a.run("INSERT OR REPLACE INTO combos(id, name, kind, models, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[b.id,b.name,b.kind||null,(0,A.s)(b.models||[]),b.createdAt||new Date().toISOString(),b.updatedAt||new Date().toISOString()])},a=>({id:a.id??null,name:a.name??null})),Object.entries(f.modelAliases||{})))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[b,(0,A.s)(c)]);for(let b of f.customModels||[]){let c=`${b.providerAlias}|${b.id}|${b.type||"llm"}`;a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[c,(0,A.s)(b)])}for(let[b,c]of Object.entries(f.mitmAlias||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[b,(0,A.s)(c||{})]);for(let[b,c]of Object.entries(f.pricing||{}))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[b,(0,A.s)(c||{})])}if(j&&"object"==typeof j){for(let b of j.history||[]){let c=b.tokens||{};a.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.apiKey||null,b.endpoint||null,c.prompt_tokens||c.input_tokens||0,c.completion_tokens||c.output_tokens||0,b.cost||0,b.status||"ok",(0,A.s)(c),(0,A.s)({})])}for(let[b,c]of Object.entries(j.dailySummary||{}))a.run("INSERT OR REPLACE INTO usageDaily(dateKey, data) VALUES(?, ?)",[b,(0,A.s)(c)]);"number"==typeof j.totalRequestsLifetime&&(0,u.np)(a,"totalRequestsLifetime",j.totalRequestsLifetime)}if(k&&"object"==typeof k.disabled)for(let[b,c]of Object.entries(k.disabled))a.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('disabledModels', ?, ?)",[b,(0,A.s)(c||[])]);if(m&&Array.isArray(m.records))for(let b of m.records)a.run("INSERT OR REPLACE INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?)",[b.id,b.timestamp||new Date().toISOString(),b.provider||null,b.model||null,b.connectionId||null,b.status||null,(0,A.s)(b)]);(0,u.np)(a,"appVersion",w()),(0,u.np)(a,"backupSchemaVersion",i.f$),(0,u.np)(a,"migratedAt",new Date().toISOString())})}catch(a){if(a instanceof D)return void console.error(`[DB][migrate] aborted: ${a.message} | legacy JSON kept | backup: ${c}`);throw a}try{e().writeFileSync(B,new Date().toISOString())}catch{}z(),console.log(`[DB][migrate] JSON → SQLite in ${Date.now()-b}ms | legacy JSON kept at DATA_DIR | backup: ${c}`);return}let n=w();(0,u.dy)(a,"appVersion",null)!==n&&(0,u.np)(a,"appVersion",n)}}};
@@ -1 +1 @@
1
- "use strict";exports.id=9609,exports.ids=[1281,3662,9609],exports.modules={3662:(a,b,c)=>{c.d(b,{Dt:()=>j,EQ:()=>f,LY:()=>d,O:()=>e,X8:()=>i,fh:()=>h,t2:()=>k,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={short:6e4,long:6e5},j=3e5,k=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"unapproved channel",channelScope:!0,cooldownMs:i.short},{text:"illegal api invocation",channelScope:!0,cooldownMs:i.short},{text:"improperly formed request",cooldownMs:12e4},{text:"mimo desktop account",cooldownMs:0},{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}]},39609:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>q});var d=c(27910),e=c(41004);let f=globalThis.fetch,g=new Map,h=new Map,i=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],j=["8.8.8.8","8.8.4.4"];function k(a){return null==a?"":String(a).trim()}async function l(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),f=new b.Resolver;f.setServers(j);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function m(a,b){let c,d=k(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function n(a){let b=k(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function o(a){let b=n(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(7774).then(c.t.bind(c,47774,19));g.set(b,new a({uri:b}))}return g.get(b)}async function p(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function q(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=k(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&m(a,d)?null:n(c)}(d,c),h=g?null:n(function(a){let b;if(m(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),j=g||h;if(function(a){try{let b=new URL(a).hostname;return i.some(a=>b.includes(a))}catch{return!1}}(d)){if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await l(a.hostname);if(c)return await p(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return f(a,b)}async function r(a,b={}){return q(a,b,null)}globalThis.fetch!==r&&(globalThis.fetch=r)},41004:(a,b,c)=>{c.d(b,{C8:()=>q,DR:()=>p,IK:()=>k,Ps:()=>g,SA:()=>n,Uc:()=>l,Z1:()=>i,cI:()=>o,eo:()=>m,gx:()=>d,pH:()=>j,v1:()=>e,xM:()=>h}),c(3662);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};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}let g=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",h=f("STREAM_STALL_TIMEOUT_MS",36e4),i=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",2e5),j=f("FETCH_CONNECT_TIMEOUT_MS",6e4),k=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),l=64e3,m=32e3,n="x-9router-token-saver",o={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function p(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 q=["Please write a 5-10 word title for the following conversation:"]}};
1
+ "use strict";exports.id=9609,exports.ids=[1281,3662,9609],exports.modules={3662:(a,b,c)=>{c.d(b,{Dt:()=>j,EQ:()=>f,LY:()=>d,O:()=>e,X8:()=>i,fh:()=>h,t2:()=>k,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={short:6e4,long:6e5},j=3e5,k=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"unapproved channel",channelScope:!0,cooldownMs:i.short},{text:"illegal api invocation",channelScope:!0,cooldownMs:i.short},{text:"improperly formed request",cooldownMs:12e4},{text:"mimo desktop account",cooldownMs:0},{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}]},39609:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>q});var d=c(27910),e=c(41004);let f=globalThis.fetch,g=new Map,h=new Map,i=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],j=["8.8.8.8","8.8.4.4"];function k(a){return null==a?"":String(a).trim()}async function l(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),f=new b.Resolver;f.setServers(j);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function m(a,b){let c,d=k(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function n(a){let b=k(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function o(a){let b=n(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(7774).then(c.t.bind(c,47774,19));g.set(b,new a({uri:b}))}return g.get(b)}async function p(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function q(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=k(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&m(a,d)?null:n(c)}(d,c),h=g?null:n(function(a){let b;if(m(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),j=g||h;if(function(a){try{let b=new URL(a).hostname;return i.some(a=>b.includes(a))}catch{return!1}}(d)){if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await l(a.hostname);if(c)return await p(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return f(a,b)}async function r(a,b={}){return q(a,b,null)}globalThis.fetch!==r&&(globalThis.fetch=r)},41004:(a,b,c)=>{c.d(b,{C8:()=>r,DR:()=>q,IK:()=>k,Ps:()=>g,SA:()=>o,Uc:()=>l,Yy:()=>n,Z1:()=>i,cI:()=>p,eo:()=>m,gx:()=>d,pH:()=>j,v1:()=>e,xM:()=>h}),c(3662);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};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}let g=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",h=f("STREAM_STALL_TIMEOUT_MS",36e4),i=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",2e5),j=f("FETCH_CONNECT_TIMEOUT_MS",6e4),k=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),l=64e3,m=32e3,n=256,o="x-9router-token-saver",p={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function q(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 r=["Please write a 5-10 word title for the following conversation:"]}};
@@ -0,0 +1 @@
1
+ exports.id=9896,exports.ids=[615,1281,2179,3662,4755,7247,8546,8838,9896],exports.modules={3662:(a,b,c)=>{"use strict";c.d(b,{Dt:()=>j,EQ:()=>f,LY:()=>d,O:()=>e,X8:()=>i,fh:()=>h,t2:()=>k,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={short:6e4,long:6e5},j=3e5,k=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"unapproved channel",channelScope:!0,cooldownMs:i.short},{text:"illegal api invocation",channelScope:!0,cooldownMs:i.short},{text:"improperly formed request",cooldownMs:12e4},{text:"mimo desktop account",cooldownMs:0},{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}]},12132:(a,b,c)=>{"use strict";c.d(b,{$6:()=>E,Fp:()=>G,Nv:()=>C,SE:()=>D,XX:()=>u,getMimoAccountCookie:()=>F,readDesktopPassToken:()=>x});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(39609);let m="https://mimo-server-cn.xiaomimimo.com",n="account.xiaomi.com",o="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",p="MiClaw/1.0",q=new Set(["EBUSY","EPERM","EACCES"]),r=new Map,s=new Map,t="Xiaomi MiMo";function u(){let a=g().homedir(),b=i().join(a,".local","share","mimocode"),c=process.env.XDG_DATA_HOME,d=c?i().join(c,"mimocode"):b;return(d===b?[d]:[d,b]).map(a=>i().join(a,"auth.json"))}async function v(){let a,b=i().join((a=g().homedir(),"win32"===process.platform?i().join(process.env.APPDATA||i().join(a,"AppData","Roaming"),t):"darwin"===process.platform?i().join(a,"Library","Application Support",t):i().join(process.env.XDG_CONFIG_HOME||i().join(a,".config"),t)),"Partitions","xiaomi-account","Network","Cookies");if(!e().existsSync(b))return null;let d=i().join(g().tmpdir(),`10router-mimo-cookies-${process.pid}-${k().randomBytes(4).toString("hex")}.db`);try{e().copyFileSync(b,d)}catch(a){if(q.has(a?.code)){let a=Error("Xiaomi MiMo Desktop is holding its cookie store (quit the app and retry)");throw a.code="DESKTOP_LOCKED",a}return null}try{e().chmodSync(d,384)}catch{}try{let{DatabaseSync:a}=await Promise.resolve().then(c.t.bind(c,79868,23)),b=null;try{let c=(b=new a(d,{readOnly:!0})).prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+n),e=Object.fromEntries(c.map(a=>[a.name,a.value]));return e.passToken?e:null}finally{try{b?.close()}catch{}}}catch{return null}finally{await w(d)}}async function w(a){for(let b=0;b<3;b++)try{e().unlinkSync(a);return}catch(a){if("ENOENT"===a.code)return;b<2&&await new Promise(a=>setTimeout(a,20))}}async function x(){try{let a=await v();if(!a?.passToken)return null;return{passToken:a.passToken,userId:a.userId||null,cUserId:a.cUserId||null}}catch(a){if(a?.code==="DESKTOP_LOCKED")throw a;return null}}function y(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function z(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}async function A(a,b){var c;let d,e={...a},f=(await (0,l.proxyAwareFetch)(`${m}/api/user/xiaomi/me`,{redirect:"manual",headers:{"User-Agent":o,Cookie:z(e)},signal:AbortSignal.timeout(1e4)},b)).headers.get("location");if(!f)return null;let g=new URL(f).searchParams.get("callback");if(!g)return null;let h=await (0,l.proxyAwareFetch)(`https://${n}/pass/serviceLogin?sid=passportapi&_json=true`,{headers:{Cookie:z(e),"User-Agent":p,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),i=JSON.parse((await h.text()).replace(/^&&&START&&&/,"")),j=i.nonce||(i.location?new URL(i.location).searchParams.get("nonce"):null);if(!j||!i.location)return null;let q=await (0,l.proxyAwareFetch)(`${i.location}&clientSign=${(d=`nonce=${j}`+((c=i.ssecurity)&&c.trim()?`&${c}`:""),encodeURIComponent(k().createHash("sha1").update(d).digest("base64")))}`,{redirect:"manual",headers:{Cookie:z(e),"User-Agent":p},signal:AbortSignal.timeout(1e4)},b);y(e,q);let r=await (0,l.proxyAwareFetch)(`https://${n}/pass/serviceLogin?sid=mimopc&callback=${encodeURIComponent(g)}&_json=true`,{headers:{Cookie:z(e),"User-Agent":p,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),s=JSON.parse((await r.text()).replace(/^&&&START&&&/,""));if(y(e,r),!s?.location||!/\/api\/sts/.test(s.location))return null;let t=await (0,l.proxyAwareFetch)(s.location,{redirect:"manual",headers:{"User-Agent":o,Cookie:z(e)},signal:AbortSignal.timeout(1e4)},b);if(y(e,t),!e.serviceToken)return null;let u={};for(let a of["serviceToken","mimopc_ph","mimopc_slh","userId"])e[a]&&(u[a]=e[a]);return z(u)}async function B(a,b){let c=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:null;if(!c)try{c=await v()}catch(a){if(a?.code==="DESKTOP_LOCKED")return{cookie:null,reason:"desktop-locked"};throw a}if(!c)return{cookie:null,reason:"no-pass-token"};let d=k().createHash("sha256").update(c.passToken).digest("hex"),e=r.get(d);if(e&&Date.now()-e.at<18e5)return{cookie:e.cookie};let f=s.get(d);if(f){let a=await f;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let g=(async()=>{try{return await A(c,b)}catch{return null}finally{s.delete(d)}})();s.set(d,g);let h=await g;return h?(r.set(d,{cookie:h,at:Date.now()}),{cookie:h}):{cookie:null,reason:"sso-failed"}}function C(){r.clear()}let D=m,E=o;async function F(a=null,b=null){try{let{cookie:c}=await B(a,b);return c}catch{return null}}async function G(a=null,b=null){let{cookie:c,reason:d}=await B(a,b);if(!c)return{error:"no-pass-token"===d||"desktop-locked"===d?"no-session":"session-failed"};try{let a=await (0,l.proxyAwareFetch)(`${m}/api/user/usage`,{headers:{"User-Agent":o,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!a.ok)return{error:`http-${a.status}`};let d=await a.json().catch(()=>null);if(!d||0!==d.code||!d.data)return{error:"bad-response"};return{percent:d.data.percent,resetDate:d.data.resetDate,resetAt:d.data.resetAt}}catch(a){return{error:a.message}}}},35024:(a,b,c)=>{"use strict";c.d(b,{Ak:()=>e,normalizeMimoApiBase:()=>h,resolveXiaomiTokenplanBaseUrl:()=>i,sr:()=>d.sr,xq:()=>d.xq});var d=c(26070);function e(a){return(a?.providerSpecificData?.baseUrl?.trim()||"http://localhost:11434").replace(/\/$/,"")}let f=d.xq["xiaomi-tokenplan"]?.regions||{},g=d.xq["xiaomi-tokenplan"]?.defaultRegion;function h(a){let b=String(a||"").trim().replace(/\/+$/,"");return/^https?:\/\//i.test(b)&&(b=(b=(b=(b=b.replace(/\/chat\/completions$/i,"")).replace(/\/anthropic\/v1\/messages$/i,"")).replace(/\/models$/i,"")).replace(/\/v1\/.*$/i,"/v1"))?(/\/anthropic$/i.test(b)&&(b=b.replace(/\/anthropic$/i,"")),/\/v1$/i.test(b)?b:`${b}/v1`):""}function i(a){return f[a?.providerSpecificData?.region]||f[g]}},39006:a=>{"use strict";a.exports={rE:"1.2.0"}},40615:(a,b,c)=>{"use strict";c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(31330);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","credentialFallback","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...a.topologyHiddenByDefault?{topologyHiddenByDefault:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.community?{community:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.default.filter(a=>a.features?.usage).map(a=>a.id),y=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},50122:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},57247:(a,b,c)=>{"use strict";c.d(b,{KC:()=>s,OA:()=>o,PROVIDER_ID_TO_ALIAS:()=>r,PROVIDER_MODELS:()=>f.vq,SM:()=>i,cY:()=>t,ez:()=>n,fZ:()=>j,kt:()=>p,ux:()=>m});var d=c(35024),e=c(31330),f=c(26070),g=c(99511),h=c(59096);function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}let k=new Set(["kr","kiro"]);function l(a,b,c){if(!a)return;let d=a.find(a=>a.id===b);if(d)return d;if(!k.has(c))return;let e=(0,g.Kq)(b);if(e!==b)return a.find(a=>a.id===e)}function m(a,b){let c=f.vq[a];return c?(0,g.gr)(l(c,b,a)):null}function n(a,b){let c=f.vq[a];return c?(0,g.ec)(l(c,b,a)):null}function o(a,b){let c=f.vq[a];if(!c)return null;let d=l(c,b,a);return d?.kind||d?.type||null}function p(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=l(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let q=Object.fromEntries(e.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),r=Object.fromEntries(Object.keys(d.xq).map(a=>[a,q[a]||a]));function s(a){let b=r[a]||a;return f.vq[b]||[]}function t(a,b){return(0,g.g5)(l(f.vq[a],b,a))}},59096:(a,b,c)=>{"use strict";c.d(b,{d5:()=>d,nh:()=>e});let d="-review";function e(a){if(!a||"string"!=typeof a)return!1;let b=a.replace(/\([^()]+\)\s*$/,"").trim(),c=b.includes("/")?b.split("/").pop():b;return/^muse[-_]?spark(?:$|[-_:.\s])/i.test(c)}},66328:(a,b,c)=>{"use strict";c.d(b,{FO:()=>E});var d=c(89718),e=c(39326),f=c(74926),g=c(40615),h=c(57247),i=c(75924),j=c(35024),k=c(19411),l=c(78661),m=c(53225),n=c(69704),o=c(12557),p=c(93943),q=c(92990),r=c(52284),s=c(43659);let t={claude:{checkExpiry:!0,refreshable:!0},codex:{url:"https://chatgpt.com/backend-api/codex/responses",method:"POST",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"Content-Type":"application/json",originator:"codex_cli_rs","User-Agent":`codex_cli_rs/${i.Ch}`},body:JSON.stringify({model:"gpt-5.3-codex",input:[],stream:!1,store:!1}),acceptStatuses:[400],refreshable:!0},"gemini-cli":{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},antigravity:{url:"https://www.googleapis.com/oauth2/v1/userinfo?alt=json",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",refreshable:!0},github:{url:"https://api.github.com/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{"User-Agent":"10Router",Accept:"application/vnd.github+json"}},iflow:{buildUrl:a=>`https://iflow.cn/api/oauth/getUserInfo?accessToken=${encodeURIComponent(a)}`,method:"GET",noAuth:!0},kiro:{checkExpiry:!0,refreshable:!0},kimi:{checkExpiry:!0,refreshable:!0},"kimi-coding":{checkExpiry:!0,refreshable:!0},cursor:{tokenExists:!0},kilocode:{url:`${q.MZ.apiBaseUrl}/api/profile`,method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},cline:{refreshable:!0},gitlab:{url:"https://gitlab.com/api/v4/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer "},"codebuddy-cn":{tokenExists:!0},"codebuddy-intl":{tokenExists:!0},kimchi:{url:q.Td.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json","User-Agent":"kimchi/0.1.40"},refreshable:!1},"grok-cli":{url:j.xq["grok-cli"]?.userUrl||"https://cli-chat-proxy.grok.com/v1/user",method:"GET",authHeader:"Authorization",authPrefix:"Bearer ",extraHeaders:{Accept:"application/json",...j.xq["grok-cli"]?.headers||{"User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":"grok-pager","x-grok-client-version":"0.2.93"}},refreshable:!0,acceptStatuses:[402],softFailMessage:{402:"Connected, but Grok Build credits are exhausted (spending limit). Add credits or upgrade SuperGrok."}}};function u(a,b,c=""){if(!a)return{valid:!1,error:"No response",soft:!1};let d=a.status;if(!(a.ok||b?.acceptStatuses&&b.acceptStatuses.includes(d)))return 401===d?{valid:!1,error:"Token invalid or revoked",soft:!1}:403===d?{valid:!1,error:"Access denied",soft:!1}:{valid:!1,error:`API returned ${d}`,soft:!1};if(!a.ok&&b?.acceptStatuses?.includes(d)){let a=b.softFailMessage||{};if(a[d])return{valid:!0,error:a[d],soft:!0}}return{valid:!0,error:null,soft:!1}}async function v(a){return await fetch("https://api.cline.bot/api/v1/users/me",{method:"GET",headers:(0,r.w$)(a,{Accept:"application/json"})})}let w=JSON.stringify({metadata:{ideType:"IDE_UNSPECIFIED",platform:"PLATFORM_UNSPECIFIED",pluginType:"GEMINI"}});async function x(a,b,c=null){var d,e;let f="antigravity"===a.provider?"google-api-nodejs-client/9.15.1 vscode-antigravity/1.107.0":"google-api-nodejs-client/9.15.1 gemini-cli/0.34.0",g=await C("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${b}`,"Content-Type":"application/json","User-Agent":f},body:w},c);return g.ok?{valid:!0,error:null}:{valid:!1,error:(d=await g.text().catch(()=>""),e=g.status,(0,s.Yx)(d)||function(a,b){if(!a)return b;try{let b=JSON.parse(a),c=b?.error?.message||b?.message||b?.error;if("string"==typeof c&&c.trim())return c.trim();if(c)return JSON.stringify(c)}catch{}return a.trim()||b}(d,`API returned ${e}`)),status:g.status}}async function y(a){let b=a.provider,c=a.refreshToken;if(!c)return null;try{if("gemini-cli"===b||"antigravity"===b){let a="gemini-cli"===b?q.LT:q.YT,d=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:a.clientId,client_secret:a.clientSecret,grant_type:"refresh_token",refresh_token:c})});if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token||c}}if("codex"===b||"grok-cli"===b||"xai"===b)return await (0,p.Vq)(b,a,console);if("claude"===b){let a=await fetch(q.OV.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:c,client_id:q.OV.clientId})});if(!a.ok)return null;let b=await a.json();return{accessToken:b.access_token,expiresIn:b.expires_in,refreshToken:b.refresh_token||c}}if("kiro"===b){let b=a.providerSpecificData||{},d=b.clientId||a.clientId,e=b.clientSecret||a.clientSecret,f=b.region||a.region;if(d&&e){let a=`https://oidc.${f||"us-east-1"}.amazonaws.com/token`,b=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:d,clientSecret:e,refreshToken:c,grantType:"refresh_token"})});if(!b.ok)return null;let g=await b.json();return{accessToken:g.accessToken,expiresIn:g.expiresIn||3600,refreshToken:g.refreshToken||c}}let g=await fetch(q.Tx.socialRefreshUrl,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:c})});if(!g.ok)return null;let h=await g.json();return{accessToken:h.accessToken,expiresIn:h.expiresIn||3600,refreshToken:h.refreshToken||c}}if("cline"===b){let a=await fetch(q.lB.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:c,grantType:"refresh_token",clientType:"extension"})});if(!a.ok)return null;let b=await a.json(),d=b?.data||b,e=d?.expiresAt?Math.max(1,Math.floor((new Date(d.expiresAt).getTime()-Date.now())/1e3)):3600;return{accessToken:d?.accessToken,expiresIn:e,refreshToken:d?.refreshToken||c}}return null}catch(a){return console.log(`Error refreshing ${b} token:`,a.message),null}}let z=new Set(["auto","efficient"]);async function A(a,b=null,c={}){let{model:d}=c,e=null;try{e=await (0,m.EV)(a,{proxyOptions:b,forceRefresh:!0})}catch{e=null}if(e&&Array.isArray(e.models)){let a=e.models.length>0;return d&&!z.has(d)?e.models.some(a=>a.id===d)?{valid:!0,error:null,refreshed:!1}:{valid:!1,error:`Model "${d}" is not available on this Qoder account`,refreshed:!1}:a?{valid:!0,error:null,refreshed:!1}:{valid:!1,error:"No models available on this Qoder account",refreshed:!1}}if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};let f="qoder-cn"===a.provider?n.cn:n._G;try{let c=await C(f,{method:"GET",headers:{Authorization:`Bearer ${a.accessToken}`,Accept:"application/json","User-Agent":"qodercli/1.0.0"}},b);if(!c.ok){let a=401===c.status||403===c.status;return{valid:!1,error:a?"Token invalid or expired":`Qoder userinfo error (${c.status})`,refreshed:!1}}return d?{valid:!0,warning:"Credential OK, but model availability could not be verified (catalog unavailable)",error:null,refreshed:!1}:{valid:!0,error:null,refreshed:!1}}catch(a){return{valid:!1,error:`Qoder test failed: ${a.message}`,refreshed:!1}}}async function B(a,b=null,c={}){if("qoder"===a.provider||"qoder-cn"===a.provider)return A(a,b,c);let d=t[a.provider];if(!d)return{valid:!1,error:"Provider test not supported",refreshed:!1};if(!a.accessToken)return{valid:!1,error:"No access token",refreshed:!1};if(d.tokenExists)return{valid:!0,error:null,refreshed:!1,newTokens:null};let e=a.accessToken,f=!1,g=null,h=(0,p.fp)(a.provider,a);if(d.refreshable&&h&&a.refreshToken){let b=await y(a);if(!b)return{valid:!1,error:"Token expired and refresh failed",refreshed:!1};e=b.accessToken,f=!0,g=b}if(d.checkExpiry)return f?{valid:!0,error:null,refreshed:f,newTokens:g}:h?{valid:!1,error:"Token expired",refreshed:!1}:{valid:!0,error:null,refreshed:!1,newTokens:null};if("gemini-cli"===a.provider||"antigravity"===a.provider){let c=await x(a,e,b);if(c.valid)return{valid:!0,error:null,refreshed:f,newTokens:g};if(401===c.status&&d.refreshable&&!f&&a.refreshToken){let c=await y(a);if(c?.accessToken){let d=await x(a,c.accessToken,b);return d.valid?{valid:!0,error:null,refreshed:!0,newTokens:c}:{valid:!1,error:d.error,refreshed:!0,newTokens:c}}return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}return{valid:!1,error:c.error,refreshed:f}}if("cline"===a.provider){let b=async a=>{let b=await v(a);return b.ok?{valid:!0,error:null,refreshed:f,newTokens:g}:401===b.status?{valid:!1,error:"Token invalid or revoked",refreshed:f}:403===b.status?{valid:!1,error:"Access denied",refreshed:f}:{valid:!1,error:`API returned ${b.status}`,refreshed:f}},c=await b(e);if(c.valid||"Token invalid or revoked"!==c.error||!a.refreshToken)return c;let d=await y(a);return d?.accessToken?(f=!0,g=d,e=d.accessToken,await b(e)):{valid:!1,error:"Token invalid or revoked",refreshed:!1}}try{let c=d.buildUrl?d.buildUrl(e):d.url,h=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e}`,...d.extraHeaders},i={method:d.method,headers:h};d.body&&(i.body=d.body);let j=await C(c,i,b),k=j.ok?"":await j.text().catch(()=>""),l=u(j,d,k);if(l.valid)return{valid:!0,error:l.soft?l.error:null,warning:l.soft?l.error:null,refreshed:f,newTokens:g};if(401===j.status&&d.refreshable&&!f&&a.refreshToken){let e=await y(a);if(e){let a=d.buildUrl?d.buildUrl(e.accessToken):c,f=d.noAuth?{...d.extraHeaders}:{[d.authHeader]:`${d.authPrefix}${e.accessToken}`,...d.extraHeaders},g={method:d.method,headers:f};d.body&&(g.body=d.body);let h=await C(a,g,b),i=h.ok?"":await h.text().catch(()=>""),j=u(h,d,i);if(j.valid)return{valid:!0,error:j.soft?j.error:null,warning:j.soft?j.error:null,refreshed:!0,newTokens:e}}return{valid:!1,error:"Token invalid or revoked",refreshed:!1}}return{valid:!1,error:l.error,refreshed:f}}catch(a){return{valid:!1,error:a.message,refreshed:f}}}async function C(a,b={},d=null){if(b.signal||(b.signal=AbortSignal.timeout(15e3)),d?.vercelRelayUrl){let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{vercelRelayUrl:d.vercelRelayUrl})}if(!d?.connectionProxyEnabled||!d?.connectionProxyUrl)return fetch(a,b);let{proxyAwareFetch:e}=await Promise.resolve().then(c.bind(c,39609));return e(a,b,{connectionProxyEnabled:!0,connectionProxyUrl:d.connectionProxyUrl,connectionNoProxy:d.connectionNoProxy||""})}async function D(a,b=null,d={}){let{model:e}=d;if((0,g.mq)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{let d=await C(`${c.replace(/\/$/,"")}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}if((0,g.gb)(a.provider)){let c=a.providerSpecificData?.baseUrl;if(!c)return{valid:!1,error:"Missing base URL"};try{(c=c.replace(/\/$/,"")).endsWith("/messages")&&(c=c.slice(0,-9));let d=`${c}/v1/messages`,f=e||a.defaultModel||"claude-3-haiku-20240307",g=await C(d,{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json",Authorization:`Bearer ${a.apiKey}`},body:JSON.stringify({model:f,max_tokens:1,messages:[{role:"user",content:"test"}]})},b),h=401!==g.status&&403!==g.status;return{valid:h,error:h?null:"Invalid API key or base URL"}}catch(a){return{valid:!1,error:a.message}}}try{switch(a.provider){case"cloudflare-ai":{let c=(a.providerSpecificData||{}).accountId;if(!c)return{valid:!1,error:"Missing Account ID"};let d=`https://api.cloudflare.com/client/v4/accounts/${c}/ai/v1/chat/completions`,f=e||(0,h.fZ)("cloudflare-ai"),g=await C(d,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:f,messages:[{role:"user",content:"test"}],max_tokens:1})},b),i=401!==g.status&&403!==g.status&&404!==g.status;return{valid:i,error:i?null:"Invalid API token or Account ID"}}case"azure":{let c=a.providerSpecificData||{},d=(c.azureEndpoint||"").replace(/\/$/,""),e=c.deployment||"gpt-4",f=c.apiVersion||"2024-10-01-preview",g=`${d}/openai/deployments/${e}/chat/completions?api-version=${f}`,h={"api-key":a.apiKey,"Content-Type":"application/json"};c.organization&&(h["OpenAI-Organization"]=c.organization);let i=await C(g,{method:"POST",headers:h,body:JSON.stringify({messages:[{role:"user",content:"test"}],max_completion_tokens:1})},b),j=401!==i.status&&403!==i.status;return{valid:j,error:j?null:"Invalid API key or Azure configuration"}}case"openai":{let c=await C("https://api.openai.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"vercel-ai-gateway":{let c=await C("https://ai-gateway.vercel.sh/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"anthropic":{let c=await C("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:e||"claude-3-haiku-20240307",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"gemini":{let c=await C(`https://generativelanguage.googleapis.com/v1/models?key=${a.apiKey}`,{},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"openrouter":{let c=await C("https://openrouter.ai/api/v1/auth/key",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"glm":{let c=await C("https://api.z.ai/api/anthropic/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:e||"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"glm-cn":{let c=await C("https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:e||"glm-4.7",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"minimax":case"minimax-cn":{let c=await C({minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages"}[a.provider],{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:e||"minimax-m2",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"kimi":{let c=await C("https://api.kimi.com/coding/v1/messages",{method:"POST",headers:{"x-api-key":a.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:e||"kimi-latest",max_tokens:1,messages:[{role:"user",content:"test"}]})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"alicode":case"alicode-intl":case"alims-intl":{let c="alicode-intl"===a.provider?"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions":"alims-intl"===a.provider?"https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions":"https://coding.dashscope.aliyuncs.com/v1/chat/completions",d=e||(0,h.fZ)(a.provider),f=await C(c,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:d,max_tokens:1,messages:[{role:"user",content:"test"}]})},b),g=401!==f.status&&403!==f.status;return{valid:g,error:g?null:"Invalid API key"}}case"volcengine-ark":case"byteplus":{let c=e||(0,h.fZ)(a.provider),d=await C(j.xq[a.provider]?.baseUrl,{method:"POST",headers:{Authorization:`Bearer ${a.apiKey}`,"content-type":"application/json"},body:JSON.stringify({model:c,max_tokens:1,messages:[{role:"user",content:"test"}]})},b),f=401!==d.status&&403!==d.status;return{valid:f,error:f?null:"Invalid API key"}}case"deepseek":{let c=await C("https://api.deepseek.com/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"groq":{let c=await C("https://api.groq.com/openai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"mistral":{let c=await C("https://api.mistral.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"xai":{let c=await C("https://api.x.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nvidia":{let c=await C("https://integrate.api.nvidia.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"perplexity":{let c=await C("https://api.perplexity.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"together":{let c=await C("https://api.together.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fireworks":{let c=await C("https://api.fireworks.ai/inference/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cerebras":{let c=await C("https://api.cerebras.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"cohere":{let c=await C("https://api.cohere.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nebius":{let c=await C("https://api.studio.nebius.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"siliconflow":{let c=await C("https://api.siliconflow.com/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"hyperbolic":{let c=await C("https://api.hyperbolic.xyz/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"ollama":{let b=await fetch("https://ollama.com/api/tags",{headers:{Authorization:`Bearer ${a.apiKey}`}});return{valid:b.ok,error:b.ok?null:"Invalid API key"}}case"ollama-local":{let b=(0,j.Ak)(a),c=await fetch(`${b}/api/tags`);return{valid:c.ok,error:c.ok?null:`Ollama not reachable at ${b}`}}case"deepgram":{let c=await C("https://api.deepgram.com/v1/projects",{headers:{Authorization:`Token ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"assemblyai":{let c=await C("https://api.assemblyai.com/v1/account",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"nanobanana":{let c=await C("https://api.nanobananaapi.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"fal-ai":{let c=await C("https://api.fal.ai/v1/models?limit=1",{headers:{Authorization:`Key ${a.apiKey}`}},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"chutes":{let c=await C("https://llm.chutes.ai/v1/models",{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:c.ok,error:c.ok?null:"Invalid API key"}}case"grok-web":{let c=a.apiKey.startsWith("sso=")?a.apiKey.slice(4):a.apiKey,d=a=>Array.from(crypto.getRandomValues(new Uint8Array(a)),a=>a.toString(16).padStart(2,"0")).join(""),e=Buffer.from("e:TypeError: Cannot read properties of null (reading 'children')").toString("base64"),f=await C("https://grok.com/rest/app-chat/conversations/new",{method:"POST",headers:{Accept:"*/*","Content-Type":"application/json",Cookie:`sso=${c}`,Origin:"https://grok.com",Referer:"https://grok.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","x-statsig-id":e,"x-xai-request-id":crypto.randomUUID(),traceparent:`00-${d(16)}-${d(8)}-00`},body:JSON.stringify({temporary:!0,modelName:"grok-4",message:"ping",fileAttachments:[],imageAttachments:[],disableSearch:!1,enableImageGeneration:!1,sendFinalMetadata:!0})},b),g=401!==f.status&&403!==f.status;return{valid:g,error:g?null:"Invalid SSO cookie"}}case"perplexity-web":{let c=a.apiKey;c.startsWith("__Secure-next-auth.session-token=")&&(c=c.slice(33));let d=await C("https://www.perplexity.ai/api/auth/session",{method:"GET",headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36",Cookie:`__Secure-next-auth.session-token=${c}`}},b);if(!d.ok)return{valid:!1,error:"Invalid session cookie"};let e=await d.json().catch(()=>null),f=!!(e&&e.user);return{valid:f,error:f?null:"Session expired — re-paste cookie"}}case"opencode-go":{let c=await C("https://opencode.ai/zen/go/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiKey}`},body:JSON.stringify({model:(0,h.fZ)("opencode-go"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),d=401!==c.status&&403!==c.status;return{valid:d,error:d?null:"Invalid API key"}}case"xiaomi-mimo":case"mimo-desktop":case"xiaomi-tokenplan":{let d=a.providerSpecificData?.authMethod,f="string"==typeof a.apiKey&&a.apiKey.startsWith("mimo-desktop-session"),g="string"==typeof a.apiKey&&a.apiKey.startsWith("sk-")&&!f;if(("xiaomi-mimo"===a.provider||"mimo-desktop"===a.provider)&&!g&&("desktop-session"===d||f||a.providerSpecificData?.mimoPassToken))try{let{getMimoAccountCookie:d}=await Promise.resolve().then(c.bind(c,12132)),f=await d(a.providerSpecificData,b);if(!f)return{valid:!1,error:"Desktop session unavailable — sign in to MiMo Desktop once, then re-import"};let g=await C("https://mimo-server-cn.xiaomimimo.com/api/route/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Cookie:f,Accept:"text/event-stream"},body:JSON.stringify({model:e||"mimo-v2.6-flash",stream:!0,max_tokens:8,messages:[{role:"system",content:"You are CodeBuddy Code."},{role:"user",content:"hi"}]})},b);if(401===g.status||403===g.status){let a="";try{let{getEgressRegion:b}=await c.e(8988).then(c.bind(c,96607)),d=await b({timeoutMs:1500});d?.countryCode&&"CN"!==d.countryCode&&(a=" (detected non-mainland network; desktop preview models require China-side proxy)")}catch{}return{valid:!1,error:`Desktop session expired or unauthorized — sign in to MiMo Desktop again${a}`}}if(!g.ok)return{valid:!1,error:`Preview probe failed (HTTP ${g.status})`};try{await g.body?.cancel?.()}catch{}return{valid:!0,error:null}}catch(a){return{valid:!1,error:a?.message||"Preview probe failed"}}let h="https://api.xiaomimimo.com/v1/models";if("xiaomi-tokenplan"===a.provider){let{resolveXiaomiTokenplanBaseUrl:b}=await Promise.resolve().then(c.bind(c,35024));h=`${b(a)}/models`}else{let{normalizeMimoApiBase:b}=await Promise.resolve().then(c.bind(c,35024)),d=b(a.providerSpecificData?.baseUrl);d&&(h=`${d}/models`)}let i=await C(h,{headers:{Authorization:`Bearer ${a.apiKey}`}},b),j="xiaomi-tokenplan"===a.provider||h.includes("token-plan")?401!==i.status:i.ok;return{valid:j,error:j?null:"Invalid API key"}}case"blackbox":{let c=j.xq.blackbox?.baseUrl?.replace(/\/chat\/completions$/,"")||"https://api.blackbox.ai/v1",d=await C(`${c}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key"}}case"qoder":{let c=a.apiKey||"",d=c.startsWith("pt-")?c:`pt-${c}`,e=await C("https://openapi.qoder.sh/api/v1/jobToken/exchange",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","Cosy-Version":"1.0.1","Cosy-ClientType":"5"},body:JSON.stringify({personal_token:d})},b);return{valid:e.ok,error:e.ok?null:"Invalid Personal Access Token"}}case"llm7":{let c=a.providerSpecificData?.baseUrl||"https://api.llm7.io/v1",d=await C(`${c.replace(/\/$/,"")}/models`,{headers:{Authorization:`Bearer ${a.apiKey}`}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key or base URL"}}case"kimchi":{let c=q.Td.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",d=await C(c,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${a.apiKey}`,"User-Agent":"kimchi/0.1.40"}},b);return{valid:d.ok,error:d.ok?null:"Invalid API key",refreshed:!1}}case"stepfun":case"stepfun-cn":case"stepfun-plan":case"stepfun-plan-cn":case"sensenova":case"longcat":case"bai":case"api-airforce":case"bazaarlink":case"baidu":case"featherless":case"bluesminds":case"alitp-intl":case"tokenbom":{let c,d=j.xq[a.provider]?.validateUrl||j.xq[a.provider]?.baseUrl?.replace(/\/chat\/completions$/,"")+"/models";if(!d||"/models"===d)return{valid:!1,error:"Provider test not supported"};try{c=await C(d,{headers:{Authorization:`Bearer ${a.apiKey}`}},b)}catch(a){return{valid:!1,error:"Endpoint unreachable — the provider may be under maintenance, try again later",maintenance:!0}}let e=c.headers.get("content-type")||"",f=/text\/html/i.test(e)||403===c.status,g=401!==c.status&&403!==c.status;if(!g&&(f||!/json/i.test(e)))return{valid:!1,error:"Provider may be under maintenance — blocked by its gateway (e.g. Cloudflare). Try again later or check the provider status page",maintenance:!0};return{valid:g,error:g?null:"Invalid API key"}}case"codebuddy-cn":{let c=j.xq["codebuddy-cn"]?.baseUrl||"https://copilot.tencent.com/v2/chat/completions",d=await C(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiKey}`},body:JSON.stringify({model:(0,h.fZ)("codebuddy-cn"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"codebuddy-intl":{let c=j.xq["codebuddy-intl"]?.baseUrl||"https://www.codebuddy.ai/v2/chat/completions",d=await C(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiKey}`,...j.xq["codebuddy-intl"]?.headers||{}},body:JSON.stringify({model:(0,h.fZ)("codebuddy-intl"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"commandcode":{let c=j.xq.commandcode?.baseUrl||"https://api.commandcode.ai/alpha/generate",d=await C(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a.apiKey}`,"x-command-code-version":"0.25.7","x-cli-environment":"cli"},body:JSON.stringify({model:(0,h.fZ)("commandcode"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}case"dots":{let c=j.xq.dots?.baseUrl||"https://note3-prev-api.askdiandian.com/v1/chat/completions",d=await C(c,{method:"POST",headers:{"Content-Type":"application/json","api-key":a.apiKey},body:JSON.stringify({model:(0,h.fZ)("dots"),messages:[{role:"user",content:"ping"}],max_tokens:1,stream:!1})},b),e=401!==d.status&&403!==d.status;return{valid:e,error:e?null:"Invalid API key"}}default:return{valid:!1,error:"Provider test not supported"}}}catch(a){return{valid:!1,error:a.message}}}async function E(a,b={}){let c,h=await (0,d.Mc)(a);if(!h)return{valid:!1,error:"Connection not found",latencyMs:0,testedAt:new Date().toISOString()};let i=await (0,e.B)(h.providerSpecificData||{});if(i.connectionProxyEnabled&&i.connectionProxyUrl&&!i.vercelRelayUrl){let b=await (0,f.C)({proxyUrl:i.connectionProxyUrl});if(!b.ok){let c=b.error||`Proxy test failed with status ${b.status}`;return await (0,d.updateProviderConnection)(a,{testStatus:"error",lastError:c,lastErrorAt:new Date().toISOString()}),{valid:!1,error:c,latencyMs:0,testedAt:new Date().toISOString()}}}let j=Date.now();c="apikey"===h.authType||"api_key"===h.authType||"cookie"===h.authType||"xiaomi-mimo"===h.provider||"mimo-desktop"===h.provider?await D(h,i,b):await B(h,i,b);let m=Date.now()-j,n=c.valid&&(c.warning||c.error),p={testStatus:c.valid?"active":"error",lastError:c.valid?n||null:c.error,lastErrorAt:c.valid?n?new Date().toISOString():null:new Date().toISOString()};return c.valid&&Object.assign(p,{backoffLevel:0,rateLimitedUntil:null,errorCode:null,...!h?{}:Object.fromEntries(Object.keys(h).filter(a=>a.startsWith(o.jl)).map(a=>[a,null]))}),c.refreshed&&c.newTokens&&(c.newTokens.accessToken&&(p.accessToken=c.newTokens.accessToken),c.newTokens.refreshToken&&(p.refreshToken=c.newTokens.refreshToken),c.newTokens.idToken&&(p.idToken=c.newTokens.idToken),c.newTokens.lastRefreshAt&&(p.lastRefreshAt=c.newTokens.lastRefreshAt),c.newTokens.expiresIn&&(p.expiresIn=c.newTokens.expiresIn),c.newTokens.expiresIn?p.expiresAt=new Date(Date.now()+1e3*c.newTokens.expiresIn).toISOString():c.newTokens.expiresAt&&(p.expiresAt=c.newTokens.expiresAt),c.newTokens.providerSpecificData&&(p.providerSpecificData={...h.providerSpecificData||{},...c.newTokens.providerSpecificData})),await (0,d.updateProviderConnection)(a,p),c.valid&&g.wb.includes(h.provider)&&(async()=>{try{let b={...h,...p},c=await (0,k.my)(b,i),e=(0,l.Y)(c);e&&await (0,d.updateProviderConnection)(a,{earliestPackageExpiry:e.expiry,earliestPackageName:e.name,quotaCheckedAt:new Date().toISOString()})}catch{}})(),{valid:c.valid,error:c.error,refreshed:!!c.refreshed,latencyMs:m,testedAt:new Date().toISOString()}}},74926:(a,b,c)=>{"use strict";c.d(b,{C:()=>f});var d=c(47774);function e(a){return null==a?"":String(a).trim()}async function f({proxyUrl:a,testUrl:b,timeoutMs:c}={}){let g,h=e(a);if(!h)return{ok:!1,status:400,error:"proxyUrl is required"};let i=e(b)||"https://google.com/",j=Number(c),k=Number.isFinite(j)&&j>0?Math.min(j,3e4):8e3;try{try{g=new d.ProxyAgent({uri:h})}catch(a){return{ok:!1,status:400,error:`Invalid proxy URL: ${a?.message||String(a)}`}}let a=new AbortController,b=Date.now(),c=setTimeout(()=>a.abort(),k);try{let c=await (0,d.hd)(i,{method:"HEAD",dispatcher:g,signal:a.signal,headers:{"User-Agent":"10Router"}});return{ok:c.ok,status:c.status,statusText:c.statusText,url:i,elapsedMs:Date.now()-b}}catch(b){let a=b?.name==="AbortError"?"Proxy test timed out":function(a){if(!a)return"Unknown error";let b=a?.message||String(a),c=a?.cause?.code||a?.code,d=a?.cause?.message;return d&&d!==b?c?`${b}: ${d} (${c})`:`${b}: ${d}`:c&&!b.includes(c)?`${b} (${c})`:b}(b);return{ok:!1,status:500,error:a}}finally{clearTimeout(c)}}finally{try{await g?.close?.()}catch{}}}},78335:()=>{},89718:(a,b,c)=>{"use strict";c.d(b,{Bf:()=>d.Bf,CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Um:()=>d.Um,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,getSettings:()=>d.mt,h1:()=>d.h1,hj:()=>d.hj,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,updateSettings:()=>d.Xx,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(27274)},92990:(a,b,c)=>{"use strict";c.d(b,{DI:()=>i,DV:()=>z,LT:()=>j,MZ:()=>u,Nl:()=>y,Nu:()=>o,OV:()=>h,RY:()=>F,S6:()=>r,SK:()=>D,Td:()=>A,Tx:()=>p,WN:()=>s,Ww:()=>G,YT:()=>m,ZL:()=>l,aV:()=>t,cD:()=>n,eD:()=>E,f7:()=>x,hF:()=>k,lB:()=>v,oe:()=>C,qp:()=>B,w1:()=>w});var d=c(21820),e=c(74129),f=c(26070);function g(){let a=(0,d.platform)(),b=(0,d.arch)();return"darwin"===a?"arm64"===b?2:1:"linux"===a?"arm64"===b?4:3:5*("win32"===a)}let h={...f.sr.claude},i={...f.sr.codex},j={...e.dG,...f.sr["gemini-cli"]},k={...f.sr.qoder},l={...f.sr.iflow},m={...e.XP,...f.sr.antigravity,loadCodeAssistClientMetadata:JSON.stringify({ideType:9,platform:g(),pluginType:2})};function n(){return{ideType:9,platform:g(),pluginType:2}}({...f.sr.openai});let o={...f.sr.github},p={...f.sr.kiro},q=/^[a-z]{2}-[a-z]+-\d{1,2}$/;function r(a){if("string"!=typeof a||!q.test(a))throw Error("Invalid region");return a}let s={...f.sr.cursor,tokenStoragePaths:{linux:"~/.config/Cursor/User/globalStorage/state.vscdb",macos:"/Users/<user>/Library/Application Support/Cursor/User/globalStorage/state.vscdb",windows:"%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb"}},t={...f.sr.kimi,clientId:process.env.KIMI_CODING_OAUTH_CLIENT_ID||process.env.KIMI_OAUTH_CLIENT_ID||f.xq.kimi?.clientId||f.sr.kimi?.clientId},u={...f.sr.kilocode},v={...f.sr.cline},w={...f.sr.clinepass},x={...f.sr.gitlab},y={...f.sr["codebuddy-cn"]},z={...f.sr["codebuddy-intl"]},A={...f.sr.kimchi},B={...f.sr["grok-cli"]},C={platformUrl:process.env.MIMO_PLATFORM_URL||"https://platform.xiaomimimo.com",defaultBaseUrl:"https://api.xiaomimimo.com/v1",kn:"mimocode",app:"MiMo",timeoutMs:3e5,pendingTtlMs:864e5},D={clientId:"ono9krqynydwx5",clientSecret:"-",loginGuidanceUrls:["https://api.marscode.com/cloudide/api/v3/trae/GetLoginGuidance","https://api.trae.ai/cloudide/api/v3/trae/GetLoginGuidance","https://www.trae.ai/cloudide/api/v3/trae/GetLoginGuidance"],apiOrigins:["https://api.marscode.com","https://api.trae.ai","https://www.trae.ai","https://www.marscode.com"],exchangeTokenPath:"/cloudide/api/v3/trae/oauth/ExchangeToken",getUserInfoPath:"/cloudide/api/v3/trae/GetUserInfo",authorizationPath:"/authorization",callbackPath:"/callback",minAppVersion:"3.5.54",defaultAppVersion:"3.5.54",defaultAppType:"stable",defaultPluginVersion:"local",defaultDeviceId:"0",userAgent:"Trae/1.0.0 antigravity-cockpit-tools",webUrl:"https://www.trae.ai",authScheme:"Cloud-IDE-JWT",tokenLifetimeDays:14,oauthTimeoutMs:6e5},E={clientId:"3GUryQ7ldAeKEuD2obYnppsnmj58eP5u",authBaseUrl:"https://www.windsurf.com",signInPath:"/windsurf/signin",registerApiBaseUrl:"https://register.windsurf.com",registerPath:"/exa.seat_management_pb.SeatManagementService/RegisterUser",oneTimeAuthPath:"/exa.seat_management_pb.SeatManagementService/GetOneTimeAuthToken",currentUserPath:"/exa.seat_management_pb.SeatManagementService/GetCurrentUser",planStatusPath:"/exa.seat_management_pb.SeatManagementService/GetPlanStatus",userStatusPath:"/exa.seat_management_pb.SeatManagementService/GetUserStatus",defaultApiServerUrl:"https://server.codeium.com",firebaseApiKey:"AIzaSyDsOl-1XpT5err0Tcn0TFFod1H8gVGIycY",callbackPath:"/windsurf-auth-callback",userAgent:"antigravity-cockpit-tools",oauthTimeoutMs:6e5},F={webBaseUrl:"https://zed.dev",cloudBaseUrl:"https://cloud.zed.dev",llmBaseUrl:"https://cloud.zed.dev",defaultNativeAppPort:58443,oauthTimeoutMs:6e5},G=3e5},94755:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},96487:()=>{}};
@@ -1 +1 @@
1
- "use strict";exports.id=9927,exports.ids=[9927],exports.modules={220:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${d.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},e="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,d.cD)(),mode:1})});if(b.ok){let a=await b.json();e=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},3198:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(55511),e=c.n(d);let f={config:c(92990).aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,75924)),d=e().randomUUID(),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},g=await fetch(a.deviceCodeUrl,{method:"POST",headers:f,body:new URLSearchParams({client_id:a.clientId})});if(!g.ok){let a=await g.text();throw Error(`Device code request failed: ${a}`)}let h=await g.json(),i=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:h.device_code,user_code:h.user_code,verification_uri:h.verification_uri||i,verification_uri_complete:h.verification_uri_complete||`${i}?user_code=${h.user_code}`,expires_in:h.expires_in,interval:h.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,75924)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})}},13342:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(92990),e=c(23358);async function f(a,b,c){let e=`${a.replace(/\/$/,"")}${b}`,f=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":d.eD.userAgent},body:JSON.stringify(c)}),g=await f.text();if(!f.ok)throw Error(`Windsurf ${b} HTTP ${f.status}: ${g.slice(0,200)}`);try{return JSON.parse(g)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function g(a){let b=await f(d.eD.registerApiBaseUrl,d.eD.registerPath,{firebase_id_token:a}),c=(0,e.j)(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:(0,e.j)(b,[["apiServerUrl"],["api_server_url"]])||d.eD.defaultApiServerUrl,name:(0,e.j)(b,[["name"]])}}async function h(a,b){try{let c=await f(a,d.eD.oneTimeAuthPath,{firebaseIdToken:b}),g=(0,e.j)(c,[["authToken"],["auth_token"]]);if(!g)return{email:null,name:null};let h=await f(a,d.eD.currentUserPath,{authToken:g,includeSubscription:!0}),i=h.user||h;return{email:(0,e.j)(i,[["email"]]),name:(0,e.j)(i,[["name"]])}}catch{return{email:null,name:null}}}let i={config:d.eD,flowType:"authorization_code",callbackPath:d.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await g(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:h}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),i=await g(h);return{accessToken:i.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:i.apiServerUrl,firebaseIdToken:h,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await h(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})}},17691:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}}},18245:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(49804);let f={config:d.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||d.RY.defaultNativeAppPort,f=(0,e.le)(a,{nativeAppPort:c});return{...a,...f}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,f)=>{let{userId:g,encryptedAccessToken:h}=(0,e.Q_)(b);return{accessToken:(0,e.Wc)(h,d),userId:g,systemId:a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,e.qJ)(b,{config:d.RY})}catch{}let f=(0,e.k9)(b,c);return{userInfo:c,organizationId:f,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})}},18941:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},23358:(a,b,c)=>{c.d(b,{j:()=>d});function d(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}},24329:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.DI,flowType:"authorization_code_pkce",fixedPort:d.DI.fixedPort,callbackPath:d.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=(0,e.YR)(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||(0,e.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}}},24336:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(55511),e=c.n(d),f=c(92990),g=c(23358);async function h(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of f.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),h=(0,g.j)(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(h)return h;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function i(){return[...f.SK.apiOrigins]}async function j(a,b){let c=JSON.stringify({ClientID:f.SK.clientId,RefreshToken:a,ClientSecret:f.SK.clientSecret,UserID:""}),d="no successful response";for(let e of i()){let h=`${e.replace(/\/$/,"")}${f.SK.exchangeTokenPath}`;try{let e,i={Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent};b&&(i["x-cloudide-token"]=b);let j=await fetch(h,{method:"POST",headers:i,body:c}),k=await j.text();if(!j.ok){d=`${h} HTTP ${j.status}`;continue}try{e=JSON.parse(k)}catch{d=`${h} invalid JSON`;continue}let l=(0,g.j)(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!l){let a=(0,g.j)(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${h} ${a}`;continue}return{accessToken:l,refreshToken:(0,g.j)(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:(0,g.j)(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${h} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function k(a){for(let b of i()){let c=`${b.replace(/\/$/,"")}${f.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:(0,g.j)(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:(0,g.j)(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:(0,g.j)(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:(0,g.j)(d,[["Result","Region"],["Result","region"],["region"]]),tenant:(0,g.j)(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:(0,g.j)(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let l={config:f.SK,flowType:"authorization_code",callbackPath:f.SK.callbackPath,prepareConfig:async a=>{let b=e().randomUUID(),c=await h(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let g,h,i={plugin_version:f.SK.defaultPluginVersion,machine_id:e().randomUUID(),device_id:f.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:f.SK.defaultAppVersion,x_app_type:f.SK.defaultAppType},j=a.loginTraceID||c;return d=a.loginHost,(g=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=f.SK.authorizationPath,(h=new URLSearchParams).set("login_version","1"),h.set("auth_from","trae"),h.set("login_channel","native_ide"),h.set("plugin_version",i.plugin_version),h.set("auth_type","local"),h.set("client_id",f.SK.clientId),h.set("redirect","0"),h.set("login_trace_id",j),h.set("auth_callback_url",b),h.set("machine_id",i.machine_id),h.set("device_id",i.device_id),h.set("x_device_id",i.device_id),h.set("x_machine_id",i.machine_id),h.set("x_device_brand",i.x_device_brand),h.set("x_device_type",i.x_device_type),h.set("x_os_version",i.x_os_version),h.set("x_env",i.x_env),h.set("x_app_version",i.x_app_version),h.set("x_app_type",i.x_app_type),g.search=h.toString(),g.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*f.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await j(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await k(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*f.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},g=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:g,region:e.region||g,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(g||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:f.SK.defaultAppVersion,userRegion:"SG"===g?"SG":"US",userIdentity:"Free"}}}}},34940:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-version":"0.2.93"}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,e.pG)(a.id_token)||(0,e.J_)(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,f=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,g=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:g,scope:a.scope,email:c||void 0,displayName:f||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}}},35152:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`ClinePass token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},41902:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})}},49475:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(d.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}}),c=b.ok?await b.json():{},e=await fetch(d.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}});return{copilotToken:c,userInfo:e.ok?await e.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})}},53129:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}function i(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}c.d(b,{J_:()=>g,YR:()=>i,gR:()=>h,js:()=>d,pG:()=>e})},56187:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})}},57247:(a,b,c)=>{c.d(b,{KC:()=>s,OA:()=>o,PROVIDER_ID_TO_ALIAS:()=>r,PROVIDER_MODELS:()=>f.vq,SM:()=>i,cY:()=>t,ez:()=>n,fZ:()=>j,kt:()=>p,ux:()=>m});var d=c(35024),e=c(62268),f=c(26070),g=c(99511),h=c(59096);function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}let k=new Set(["kr","kiro"]);function l(a,b,c){if(!a)return;let d=a.find(a=>a.id===b);if(d)return d;if(!k.has(c))return;let e=(0,g.Kq)(b);if(e!==b)return a.find(a=>a.id===e)}function m(a,b){let c=f.vq[a];return c?(0,g.gr)(l(c,b,a)):null}function n(a,b){let c=f.vq[a];return c?(0,g.ec)(l(c,b,a)):null}function o(a,b){let c=f.vq[a];if(!c)return null;let d=l(c,b,a);return d?.kind||d?.type||null}function p(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=l(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let q=Object.fromEntries(e.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),r=Object.fromEntries(Object.keys(d.xq).map(a=>[a,q[a]||a]));function s(a){let b=r[a]||a;return f.vq[b]||[]}function t(a,b){return(0,g.g5)(l(f.vq[a],b,a))}},59096:(a,b,c)=>{c.d(b,{d5:()=>d,nh:()=>e});let d="-review";function e(a){if(!a||"string"!=typeof a)return!1;let b=a.replace(/\([^()]+\)\s*$/,"").trim(),c=b.includes("/")?b.split("/").pop():b;return/^muse[-_]?spark(?:$|[-_:.\s])/i.test(c)}},66678:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gj:()=>G,PY:()=>J,Re:()=>H,Su:()=>I,YR:()=>g.YR,gR:()=>g.gR,kP:()=>F,sO:()=>E});var e=c(48895),f=c(13808),g=c(53129),h=c(41902),i=c(24329),j=c(72520),k=c(34940),l=c(220),m=c(79188),n=c(86725),o=c(67377),p=c(49475),q=c(93551),r=c(68446),s=c(3198),t=c(67096),u=c(18941),v=c(35152),w=c(56187),x=c(99799),y=c(86857),z=c(17691),A=c(24336),B=c(13342),C=c(18245),D=a([e]);e=(D.then?(await D)():D)[0];let K={claude:h.A,codex:i.A,xai:j.A,"grok-cli":k.A,"gemini-cli":l.A,antigravity:m.A,iflow:n.A,qoder:o.A,github:p.A,kiro:q.A,cursor:r.A,kimi:s.A,kilocode:t.A,cline:u.A,clinepass:v.A,gitlab:w.A,"codebuddy-cn":x.A,"codebuddy-intl":y.A,kimchi:z.A,trae:A.A,windsurf:B.A,zed:C.A};function E(a){let b=K["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function F(a,b,c){let d=E(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:g,codeChallenge:h,state:i}=(0,f.lz)(d.pkceVerifierBytes),j=e.loginTraceID||i,k=e.privateKeyVerifier||g;return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,j,h,c||{}):d.buildAuthUrl(e,b,j,void 0,c||{}),state:j,codeVerifier:k,codeChallenge:h,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback"}}async function G(a,b,c,d,e,f){let g=E(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function H(a,b,c){let d=E(a);if("device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function I(a,b,c,d){let e=E(a);if("device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if(f.ok)if(f.data.access_token){let b=null;e.postExchange&&(b=await e.postExchange(f.data));let c=e.mapTokens(f.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,g.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let L=!1;async function J(){if(!L){L=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=(0,g.YR)(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){L=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})},67096:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})}},67377:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(3546).then(c.bind(c,73546)),d=new b().initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(3546).then(c.bind(c,73546)),h=new g,i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}},68446:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})}},72520:(a,b,c)=>{c.d(b,{A:()=>j});var d=c(55511),e=c.n(d),f=c(73159),g=c(53129);let h=null;async function i(){if(h)return h;try{let a=await fetch(f.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return h={authorizeUrl:(0,g.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,g.js)(b.token_endpoint,"token_endpoint")}}}catch{}return h={authorizeUrl:f.oT.authorizeUrl,tokenUrl:f.oT.tokenUrl}}let j={config:f.oT,flowType:"authorization_code_pkce",fixedPort:f.oT.loopbackPort,callbackPath:f.oT.callbackPath,pkceVerifierBytes:f.Ue,prepareConfig:async a=>{let b=await i();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let f=e().randomBytes(16).toString("hex"),g=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:f,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${g}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=(0,g.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>e.PY,Re:()=>e.Re,Su:()=>e.Su,exchangeTokens:()=>e.Gj,extractCodexAccountInfo:()=>e.YR,fetchKiroProfileArn:()=>e.gR,kP:()=>e.kP,sO:()=>e.sO});var e=c(66678),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},79188:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":d.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,d.cD)(),e=await fetch(`${d.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),f=e.ok?await e.json():{},g="",h="legacy-tier";try{let a=await fetch(d.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(g=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){h=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return g&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(d.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:h,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:f,projectId:g}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},86725:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${d.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let e=c.data||{};if(!e.apiKey||""===e.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(e.email?.trim()||e.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})}},86857:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).DV,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}},93551:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let e=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,d.S6)(e);let f=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${e}.amazonaws.com/client/register`,i=`https://oidc.${e}.amazonaws.com/device_authorization`,j=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:f})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:e,_authMethod:g,_startUrl:f}},pollToken:async(a,b,c,e)=>{let f,g=e?._region||"us-east-1";(0,d.S6)(g);let h=`https://oidc.${g}.amazonaws.com/token`,i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:e?._clientId,clientSecret:e?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{f=await i.json()}catch(a){f={error:"invalid_response",error_description:await i.text()}}return f.accessToken?{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:f.expiresIn,profile_arn:f?.profileArn||null,_clientId:e?._clientId,_clientSecret:e?._clientSecret,_region:e?._region,_authMethod:e?._authMethod,_startUrl:e?._startUrl}}:{ok:!1,data:{error:f.error||"authorization_pending",error_description:f.error_description||f.message}}},mapTokens:a=>{let b=(0,e.J_)(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||d.Tx.startUrl}}}}},99799:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}}};
1
+ "use strict";exports.id=9927,exports.ids=[7247,9927],exports.modules={220:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${d.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},e="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,d.cD)(),mode:1})});if(b.ok){let a=await b.json();e=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},3198:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(55511),e=c.n(d);let f={config:c(92990).aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,75924)),d=e().randomUUID(),f={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},g=await fetch(a.deviceCodeUrl,{method:"POST",headers:f,body:new URLSearchParams({client_id:a.clientId})});if(!g.ok){let a=await g.text();throw Error(`Device code request failed: ${a}`)}let h=await g.json(),i=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:h.device_code,user_code:h.user_code,verification_uri:h.verification_uri||i,verification_uri_complete:h.verification_uri_complete||`${i}?user_code=${h.user_code}`,expires_in:h.expires_in,interval:h.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,75924)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})}},5867:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(30022);let f={config:{...d.hF,loginUrl:e.ii,deviceTokenUrl:e.h3,userInfoUrl:e.cn},flowType:"device_code",requestDeviceCode:async()=>{let{QoderService:a}=await c.e(1531).then(c.bind(c,91531)),b=new a({deviceTokenUrl:e.h3,loginUrl:e.ii,userInfoUrl:e.cn}).initiateDeviceFlow();return{device_code:b.nonce,user_code:b.nonce.slice(0,8).toUpperCase(),verification_uri:e.ii,verification_uri_complete:b.verificationUriComplete,expires_in:300,interval:2,codeVerifier:b.codeVerifier,_qoderNonce:b.nonce,_qoderMachineId:b.machineId}},pollToken:async(a,b,d,f)=>{let g,{QoderService:h}=await c.e(1531).then(c.bind(c,91531)),i=new h({deviceTokenUrl:e.h3,loginUrl:e.ii,userInfoUrl:e.cn}),j=b||f?._qoderNonce,k=d||f?._qoderVerifier;if(!j||!k)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{g=await i.pollDeviceToken({nonce:j,codeVerifier:k})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===g.status)return{ok:!1,data:{error:"authorization_pending"}};let l=await i.fetchUserInfo(g.accessToken),m=Math.max(86400,Math.floor((g.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:g.accessToken,refresh_token:g.refresh_token||"",expires_in:m,_qoderUserId:g.userId,_qoderMachineId:f?._qoderMachineId||"",_qoderName:l.name,_qoderEmail:l.email,_qoderOrganizationId:l.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||c||(d?`qoder-cn-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c||b||(d?`qoder-cn-user-${d}`:null),providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}},13342:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(92990),e=c(23358);async function f(a,b,c){let e=`${a.replace(/\/$/,"")}${b}`,f=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":d.eD.userAgent},body:JSON.stringify(c)}),g=await f.text();if(!f.ok)throw Error(`Windsurf ${b} HTTP ${f.status}: ${g.slice(0,200)}`);try{return JSON.parse(g)}catch{throw Error(`Windsurf ${b} invalid JSON`)}}async function g(a){let b=await f(d.eD.registerApiBaseUrl,d.eD.registerPath,{firebase_id_token:a}),c=(0,e.j)(b,[["apiKey"],["api_key"]]);if(!c)throw Error("Windsurf RegisterUser missing apiKey");return{apiKey:c,apiServerUrl:(0,e.j)(b,[["apiServerUrl"],["api_server_url"]])||d.eD.defaultApiServerUrl,name:(0,e.j)(b,[["name"]])}}async function h(a,b){try{let c=await f(a,d.eD.oneTimeAuthPath,{firebaseIdToken:b}),g=(0,e.j)(c,[["authToken"],["auth_token"]]);if(!g)return{email:null,name:null};let h=await f(a,d.eD.currentUserPath,{authToken:g,includeSubscription:!0}),i=h.user||h;return{email:(0,e.j)(i,[["email"]]),name:(0,e.j)(i,[["name"]])}}catch{return{email:null,name:null}}}let i={config:d.eD,flowType:"authorization_code",callbackPath:d.eD.callbackPath,buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({response_type:"token",client_id:a.clientId,redirect_uri:b,state:c,prompt:"login",redirect_parameters_type:"query",workflow:"onboarding"});return`${a.authBaseUrl}${a.signInPath}?${d.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=String(b||"").trim();if(!(f.includes("?")||f.includes("access_token="))){let b=f.replace(/^Bearer\s+/i,"");if(b.startsWith("sk-ws-"))return{accessToken:b,refreshToken:null,expiresIn:null,apiServerUrl:a.defaultApiServerUrl,firebaseIdToken:null,_authMethod:"imported"};let c=await g(b);return{accessToken:c.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:c.apiServerUrl,firebaseIdToken:b,_authMethod:"imported"}}let{firebaseIdToken:h}=function(a,b){let c=String(a||"").trim(),d=c;c.includes("?")&&(d=c.slice(c.indexOf("?")+1)),c.startsWith("#")&&(d=c.slice(1));let e=Object.fromEntries(new URLSearchParams(d)),f=a=>{for(let b of a){let a=e[b];if(a&&String(a).trim())return String(a).trim()}return null},g=f(["error"]);if(g){let a=f(["error_description"]);throw Error(a?`Windsurf auth failed: ${g} (${a})`:`Windsurf auth failed: ${g}`)}let h=f(["access_token","token"]);if(!h)throw Error("Windsurf callback missing access_token");let i=f(["state"]);if(b&&i&&i!==b)throw Error("Windsurf callback state mismatch");return{firebaseIdToken:h}}(f,e),i=await g(h);return{accessToken:i.apiKey,refreshToken:null,expiresIn:null,apiServerUrl:i.apiServerUrl,firebaseIdToken:h,_authMethod:"oauth"}},postExchange:async a=>a.firebaseIdToken?{userInfo:await h(a.apiServerUrl,a.firebaseIdToken)}:{userInfo:{email:null,name:null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.userInfo?.email||void 0,displayName:b?.userInfo?.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",apiServerUrl:a.apiServerUrl,firebaseIdToken:a.firebaseIdToken}})}},17691:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}}},18245:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(49804);let f={config:d.RY,flowType:"authorization_code",callbackPath:"/",prepareConfig:async(a,b)=>{let c=Number(b?.nativeAppPort)||d.RY.defaultNativeAppPort,f=(0,e.le)(a,{nativeAppPort:c});return{...a,...f}},buildAuthUrl:(a,b,c)=>a.authUrl,exchangeToken:async(a,b,c,d,f)=>{let{userId:g,encryptedAccessToken:h}=(0,e.Q_)(b);return{accessToken:(0,e.Wc)(h,d),userId:g,systemId:a.systemId}},postExchange:async a=>{let b={accessToken:a.accessToken,providerSpecificData:{userId:a.userId,systemId:a.systemId}},c=null;try{c=await (0,e.qJ)(b,{config:d.RY})}catch{}let f=(0,e.k9)(b,c);return{userInfo:c,organizationId:f,email:c?.email||null,name:c?.name||c?.display_name||null}},mapTokens:(a,b)=>({accessToken:a.accessToken,refreshToken:null,expiresIn:null,email:b?.email||void 0,displayName:b?.name||void 0,providerSpecificData:{authMethod:"oauth",userId:a.userId,systemId:a.systemId,organizationId:b?.organizationId||""}})}},18941:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},23358:(a,b,c)=>{c.d(b,{j:()=>d});function d(a,b){for(let c of b){let b=a;for(let a of c){if(null==b||"object"!=typeof b){b=void 0;break}b=b[a]}if("string"==typeof b&&b.trim())return b.trim();if("number"==typeof b)return String(b)}return null}},24329:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.DI,flowType:"authorization_code_pkce",fixedPort:d.DI.fixedPort,callbackPath:d.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${e}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=(0,e.YR)(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||(0,e.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}}},24336:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(55511),e=c.n(d),f=c(92990),g=c(23358);async function h(a){let b=JSON.stringify({loginTraceID:a,login_trace_id:a}),c="no successful response";for(let a of f.SK.loginGuidanceUrls)try{let d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent},body:b});if(!d.ok){c=`${a} HTTP ${d.status}`;continue}let e=await d.json(),h=(0,g.j)(e,[["Result","LoginHost"],["Result","loginHost"],["Result","LoginURL"],["result","loginHost"],["data","Result","LoginHost"],["data","loginHost"],["LoginHost"],["loginHost"]]);if(h)return h;c=`${a} missing LoginHost`}catch(b){c=`${a} ${b.message}`}throw Error(`Trae GetLoginGuidance failed: ${c}`)}function i(){return[...f.SK.apiOrigins]}async function j(a,b){let c=JSON.stringify({ClientID:f.SK.clientId,RefreshToken:a,ClientSecret:f.SK.clientSecret,UserID:""}),d="no successful response";for(let e of i()){let h=`${e.replace(/\/$/,"")}${f.SK.exchangeTokenPath}`;try{let e,i={Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent};b&&(i["x-cloudide-token"]=b);let j=await fetch(h,{method:"POST",headers:i,body:c}),k=await j.text();if(!j.ok){d=`${h} HTTP ${j.status}`;continue}try{e=JSON.parse(k)}catch{d=`${h} invalid JSON`;continue}let l=(0,g.j)(e,[["Result","AccessToken"],["Result","accessToken"],["result","access_token"],["accessToken"]]);if(!l){let a=(0,g.j)(e,[["message"],["msg"],["error"],["Result","Message"]])||"missing AccessToken";d=`${h} ${a}`;continue}return{accessToken:l,refreshToken:(0,g.j)(e,[["Result","RefreshToken"],["result","refresh_token"],["refreshToken"]])||a,expiresIn:null,expiresAt:(0,g.j)(e,[["Result","ExpiresAt"],["Result","expiresAt"],["result","expires_at"],["expiresAt"]])}}catch(a){d=`${h} ${a.message}`}}throw Error(`Trae ExchangeToken failed: ${d}`)}async function k(a){for(let b of i()){let c=`${b.replace(/\/$/,"")}${f.SK.getUserInfoPath}`;try{let b=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","User-Agent":f.SK.userAgent,"x-cloudide-token":a},body:JSON.stringify({})});if(!b.ok)continue;let d=await b.json();return{email:(0,g.j)(d,[["Result","NonPlainTextEmail"],["Result","Email"],["Result","email"],["email"],["data","email"]]),name:(0,g.j)(d,[["Result","ScreenName"],["Result","Nickname"],["Result","Name"],["result","nickname"],["nickname"],["name"]]),aiRegion:(0,g.j)(d,[["Result","AIRegion"],["Result","aiRegion"],["aiRegion"]]),region:(0,g.j)(d,[["Result","Region"],["Result","region"],["region"]]),tenant:(0,g.j)(d,[["Result","TenantID"],["Result","tenantId"],["tenantId"]]),userId:(0,g.j)(d,[["Result","UserID"],["Result","userId"],["userId"]])}}catch{}}return{email:null,name:null}}let l={config:f.SK,flowType:"authorization_code",callbackPath:f.SK.callbackPath,prepareConfig:async a=>{let b=e().randomUUID(),c=await h(b);return{...a,loginTraceID:b,loginHost:c}},buildAuthUrl:(a,b,c)=>{var d;let g,h,i={plugin_version:f.SK.defaultPluginVersion,machine_id:e().randomUUID(),device_id:f.SK.defaultDeviceId,x_device_brand:"unknown",x_device_type:"unknown",x_os_version:"unknown",x_env:"",x_app_version:f.SK.defaultAppVersion,x_app_type:f.SK.defaultAppType},j=a.loginTraceID||c;return d=a.loginHost,(g=new URL(d.startsWith("http")?d:`https://${d.replace(/^\/+/,"")}`)).pathname=f.SK.authorizationPath,(h=new URLSearchParams).set("login_version","1"),h.set("auth_from","trae"),h.set("login_channel","native_ide"),h.set("plugin_version",i.plugin_version),h.set("auth_type","local"),h.set("client_id",f.SK.clientId),h.set("redirect","0"),h.set("login_trace_id",j),h.set("auth_callback_url",b),h.set("machine_id",i.machine_id),h.set("device_id",i.device_id),h.set("x_device_id",i.device_id),h.set("x_machine_id",i.machine_id),h.set("x_device_brand",i.x_device_brand),h.set("x_device_type",i.x_device_type),h.set("x_os_version",i.x_os_version),h.set("x_env",i.x_env),h.set("x_app_version",i.x_app_version),h.set("x_app_type",i.x_app_type),g.search=h.toString(),g.toString()},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!(/[?=&]/.test(c)&&(c.includes("refreshToken")||c.includes("refresh_token"))))return{accessToken:c.replace(/^(Cloud-IDE-JWT|Bearer)\s+/i,""),refreshToken:null,expiresIn:24*f.SK.tokenLifetimeDays*3600,_authMethod:"imported"};let{refreshToken:d,cloudideToken:e}=function(a){let b=String(a||"").trim(),c=b;b.includes("?")&&(c=b.slice(b.indexOf("?")+1)),b.startsWith("#")&&(c=b.slice(1));let d=Object.fromEntries(new URLSearchParams(c)),e=a=>{for(let b of a){let a=d[b];if(a&&String(a).trim())return String(a).trim()}return null},f=e(["error","error_code","errorCode"]);if(f){let a=e(["error_description","error_desc","message"]);throw Error(a?`Trae auth failed: ${f} (${a})`:`Trae auth failed: ${f}`)}let g=e(["refreshToken","refresh_token","RefreshToken"]);if(!g)throw Error("Trae callback missing refreshToken");let h=e(["loginHost","login_host","LoginHost","host","consoleHost"]);if(!h)throw Error("Trae callback missing loginHost");return{refreshToken:g,loginHost:h,cloudideToken:e(["x-cloudide-token","xCloudideToken","accessToken","access_token","token"])}}(c);return{...await j(d,e),_authMethod:"oauth"}},postExchange:async a=>({userInfo:await k(a.accessToken)}),mapTokens:(a,b)=>{let c,d=a.expiresIn||(a.expiresAt?Math.max(60,Number(a.expiresAt)-Math.floor(Date.now()/1e3)):24*f.SK.tokenLifetimeDays*3600),e=b?.userInfo||{},g=e.aiRegion||"US-East";return{accessToken:a.accessToken,refreshToken:a.refreshToken,expiresIn:d,email:e.email||void 0,displayName:e.name||void 0,providerSpecificData:{authMethod:a._authMethod||"oauth",aiRegion:g,region:e.region||g,tenant:e.tenant||"marscode",userId:e.userId||"",scope:"sg"===(c=(g||"").toLowerCase())||c.includes("singapore")?"marscode-sg":"cn"===c||c.includes("cn")||c.includes("china")?"marscode-cn":"marscode-us",webId:"",bizUserId:"",userUniqueId:"",appLanguage:"en",appVersion:f.SK.defaultAppVersion,userRegion:"SG"===g?"SG":"US",userIdentity:"Free"}}}}},30022:(a,b,c)=>{c.d(b,{_G:()=>d._G,bg:()=>d.bg,cn:()=>d.cn,h3:()=>d.h3,ii:()=>d.ii,rf:()=>d.rf});var d=c(69704)},34940:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-version":"0.2.93"}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,e.pG)(a.id_token)||(0,e.J_)(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,f=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,g=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:g,scope:a.scope,email:c||void 0,displayName:f||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}}},35152:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`ClinePass token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})}},41902:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})}},49475:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(a){c={error:"invalid_response",error_description:await d.text()}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(d.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}}),c=b.ok?await b.json():{},e=await fetch(d.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":d.Nu.apiVersion,"User-Agent":d.Nu.userAgent}});return{copilotToken:c,userInfo:e.ok?await e.json():{}}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})}},53129:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}function i(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}c.d(b,{J_:()=>g,YR:()=>i,gR:()=>h,js:()=>d,pG:()=>e})},56187:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=new URLSearchParams({client_id:e.clientId||"",redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${g.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})}},57247:(a,b,c)=>{c.d(b,{KC:()=>s,OA:()=>o,PROVIDER_ID_TO_ALIAS:()=>r,PROVIDER_MODELS:()=>f.vq,SM:()=>i,cY:()=>t,ez:()=>n,fZ:()=>j,kt:()=>p,ux:()=>m});var d=c(35024),e=c(31330),f=c(26070),g=c(99511),h=c(59096);function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}let k=new Set(["kr","kiro"]);function l(a,b,c){if(!a)return;let d=a.find(a=>a.id===b);if(d)return d;if(!k.has(c))return;let e=(0,g.Kq)(b);if(e!==b)return a.find(a=>a.id===e)}function m(a,b){let c=f.vq[a];return c?(0,g.gr)(l(c,b,a)):null}function n(a,b){let c=f.vq[a];return c?(0,g.ec)(l(c,b,a)):null}function o(a,b){let c=f.vq[a];if(!c)return null;let d=l(c,b,a);return d?.kind||d?.type||null}function p(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=l(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let q=Object.fromEntries(e.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),r=Object.fromEntries(Object.keys(d.xq).map(a=>[a,q[a]||a]));function s(a){let b=r[a]||a;return f.vq[b]||[]}function t(a,b){return(0,g.g5)(l(f.vq[a],b,a))}},59096:(a,b,c)=>{c.d(b,{d5:()=>d,nh:()=>e});let d="-review";function e(a){if(!a||"string"!=typeof a)return!1;let b=a.replace(/\([^()]+\)\s*$/,"").trim(),c=b.includes("/")?b.split("/").pop():b;return/^muse[-_]?spark(?:$|[-_:.\s])/i.test(c)}},66678:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gj:()=>H,PY:()=>K,Re:()=>I,Su:()=>J,YR:()=>g.YR,gR:()=>g.gR,kP:()=>G,sO:()=>F});var e=c(48895),f=c(13808),g=c(53129),h=c(41902),i=c(24329),j=c(72520),k=c(34940),l=c(220),m=c(79188),n=c(86725),o=c(67377),p=c(5867),q=c(49475),r=c(93551),s=c(68446),t=c(3198),u=c(67096),v=c(18941),w=c(35152),x=c(56187),y=c(99799),z=c(86857),A=c(17691),B=c(24336),C=c(13342),D=c(18245),E=a([e]);e=(E.then?(await E)():E)[0];let L={claude:h.A,codex:i.A,xai:j.A,"grok-cli":k.A,"gemini-cli":l.A,antigravity:m.A,iflow:n.A,qoder:o.A,"qoder-cn":p.A,github:q.A,kiro:r.A,cursor:s.A,kimi:t.A,kilocode:u.A,cline:v.A,clinepass:w.A,gitlab:x.A,"codebuddy-cn":y.A,"codebuddy-intl":z.A,kimchi:A.A,trae:B.A,windsurf:C.A,zed:D.A};function F(a){let b=L["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function G(a,b,c){let d=F(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:g,codeChallenge:h,state:i}=(0,f.lz)(d.pkceVerifierBytes),j=e.loginTraceID||i,k=e.privateKeyVerifier||g;return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,j,h,c||{}):d.buildAuthUrl(e,b,j,void 0,c||{}),state:j,codeVerifier:k,codeChallenge:h,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback"}}async function H(a,b,c,d,e,f){let g=F(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function I(a,b,c){let d=F(a);if("device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function J(a,b,c,d){let e=F(a);if("device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if(f.ok)if(f.data.access_token){let b=null;e.postExchange&&(b=await e.postExchange(f.data));let c=e.mapTokens(f.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,g.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let M=!1;async function K(){if(!M){M=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=(0,g.YR)(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){M=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})},67096:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})}},67377:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(1531).then(c.bind(c,91531)),d=new b().initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(1531).then(c.bind(c,91531)),h=new g,i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.max(86400,Math.floor((f.expireTime-Date.now())/1e3));return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:l,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}}},68446:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})}},72520:(a,b,c)=>{c.d(b,{A:()=>j});var d=c(55511),e=c.n(d),f=c(73159),g=c(53129);let h=null;async function i(){if(h)return h;try{let a=await fetch(f.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return h={authorizeUrl:(0,g.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,g.js)(b.token_endpoint,"token_endpoint")}}}catch{}return h={authorizeUrl:f.oT.authorizeUrl,tokenUrl:f.oT.tokenUrl}}let j={config:f.oT,flowType:"authorization_code_pkce",fixedPort:f.oT.loopbackPort,callbackPath:f.oT.callbackPath,pkceVerifierBytes:f.Ue,prepareConfig:async a=>{let b=await i();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let f=e().randomBytes(16).toString("hex"),g=Object.entries({response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:f,plan:"generic",referrer:"cli-proxy-api"}).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${g}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=(0,g.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>e.PY,Re:()=>e.Re,Su:()=>e.Su,exchangeTokens:()=>e.Gj,extractCodexAccountInfo:()=>e.YR,fetchKiroProfileArn:()=>e.gR,kP:()=>e.kP,sO:()=>e.sO});var e=c(66678),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},79188:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":d.YT.loadCodeAssistUserAgent,"x-request-source":"local"},c=(0,d.cD)(),e=await fetch(`${d.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),f=e.ok?await e.json():{},g="",h="legacy-tier";try{let a=await fetch(d.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(g=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){h=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return g&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(d.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:h,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:f,projectId:g}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})}},86725:(a,b,c)=>{c.d(b,{A:()=>e});var d=c(92990);let e={config:d.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${d.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let e=c.data||{};if(!e.apiKey||""===e.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(e.email?.trim()||e.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})}},86857:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).DV,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy Intl state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy Intl state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"www.codebuddy.ai","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}},93551:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990),e=c(53129);let f={config:d.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let e=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,d.S6)(e);let f=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${e}.amazonaws.com/client/register`,i=`https://oidc.${e}.amazonaws.com/device_authorization`,j=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:f})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:e,_authMethod:g,_startUrl:f}},pollToken:async(a,b,c,e)=>{let f,g=e?._region||"us-east-1";(0,d.S6)(g);let h=`https://oidc.${g}.amazonaws.com/token`,i=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:e?._clientId,clientSecret:e?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{f=await i.json()}catch(a){f={error:"invalid_response",error_description:await i.text()}}return f.accessToken?{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:f.expiresIn,profile_arn:f?.profileArn||null,_clientId:e?._clientId,_clientSecret:e?._clientSecret,_region:e?._region,_authMethod:e?._authMethod,_startUrl:e?._startUrl}}:{ok:!1,data:{error:f.error||"authorization_pending",error_description:f.error_description||f.message}}},mapTokens:a=>{let b=(0,e.J_)(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||d.Tx.startUrl}}}}},99799:(a,b,c)=>{c.d(b,{A:()=>d});let d={config:c(92990).Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})}}};
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=6183,a.ids=[6183],a.modules={21820:a=>{a.exports=require("os")},27172:(a,b,c)=>{async function d(){{let{initConsoleLogCapture:a}=await c.e(1968).then(c.bind(c,31968));a()}}c.r(b),c.d(b,{register:()=>d})},94735:a=>{a.exports=require("events")}};var b=require("./webpack-runtime.js");b.C(a);var c=b(b.s=27172);module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=6183,a.ids=[6183],a.modules={21820:a=>{a.exports=require("os")},27172:(a,b,c)=>{async function d(){{let{initConsoleLogCapture:a}=await c.e(4126).then(c.bind(c,84126));a()}}c.r(b),c.d(b,{register:()=>d})},94735:a=>{a.exports=require("events")}};var b=require("./webpack-runtime.js");b.C(a);var c=b(b.s=27172);module.exports=c})();
@@ -1 +1 @@
1
- {"version":1,"files":["../package.json","chunks/1159.js","chunks/1220.js","chunks/1260.js","chunks/1281.js","chunks/1377.js","chunks/1813.js","chunks/1937.js","chunks/1968.js","chunks/1998.js","chunks/2051.js","chunks/2112.js","chunks/2120.js","chunks/2132.js","chunks/2179.js","chunks/2268.js","chunks/2391.js","chunks/241.js","chunks/2430.js","chunks/2732.js","chunks/3225.js","chunks/3395.js","chunks/3535.js","chunks/3546.js","chunks/3593.js","chunks/3651.js","chunks/3662.js","chunks/3943.js","chunks/3962.js","chunks/4037.js","chunks/4055.js","chunks/4123.js","chunks/4125.js","chunks/4152.js","chunks/4293.js","chunks/436.js","chunks/4531.js","chunks/4613.js","chunks/4730.js","chunks/4739.js","chunks/4741.js","chunks/4755.js","chunks/4780.js","chunks/4848.js","chunks/4862.js","chunks/4985.js","chunks/507.js","chunks/5081.js","chunks/5182.js","chunks/5217.js","chunks/5258.js","chunks/5330.js","chunks/5433.js","chunks/5485.js","chunks/5573.js","chunks/5615.js","chunks/5640.js","chunks/5781.js","chunks/595.js","chunks/6070.js","chunks/615.js","chunks/6212.js","chunks/6306.js","chunks/6326.js","chunks/6457.js","chunks/6520.js","chunks/653.js","chunks/6763.js","chunks/6844.js","chunks/6871.js","chunks/6922.js","chunks/6960.js","chunks/698.js","chunks/7239.js","chunks/7247.js","chunks/7322.js","chunks/7774.js","chunks/7805.js","chunks/7828.js","chunks/7843.js","chunks/7965.js","chunks/808.js","chunks/8145.js","chunks/8292.js","chunks/8410.js","chunks/8499.js","chunks/8520.js","chunks/8546.js","chunks/8635.js","chunks/869.js","chunks/877.js","chunks/8838.js","chunks/8895.js","chunks/8910.js","chunks/8920.js","chunks/8988.js","chunks/8990.js","chunks/939.js","chunks/9528.js","chunks/9609.js","chunks/9713.js","chunks/9927.js","webpack-runtime.js"]}
1
+ {"version":1,"files":["../package.json","chunks/112.js","chunks/1159.js","chunks/1220.js","chunks/1260.js","chunks/1281.js","chunks/1330.js","chunks/1531.js","chunks/1813.js","chunks/1998.js","chunks/2051.js","chunks/2112.js","chunks/2120.js","chunks/2132.js","chunks/2179.js","chunks/2391.js","chunks/241.js","chunks/2430.js","chunks/271.js","chunks/2732.js","chunks/2812.js","chunks/3225.js","chunks/3500.js","chunks/3535.js","chunks/3593.js","chunks/3651.js","chunks/3662.js","chunks/3943.js","chunks/3962.js","chunks/4037.js","chunks/4123.js","chunks/4125.js","chunks/4126.js","chunks/4152.js","chunks/4293.js","chunks/436.js","chunks/4613.js","chunks/4730.js","chunks/4739.js","chunks/4741.js","chunks/4755.js","chunks/4780.js","chunks/4990.js","chunks/507.js","chunks/5081.js","chunks/5182.js","chunks/5258.js","chunks/5330.js","chunks/5433.js","chunks/5485.js","chunks/5573.js","chunks/5615.js","chunks/5640.js","chunks/5781.js","chunks/595.js","chunks/6051.js","chunks/6070.js","chunks/615.js","chunks/6212.js","chunks/6306.js","chunks/6326.js","chunks/6457.js","chunks/6520.js","chunks/653.js","chunks/6756.js","chunks/6763.js","chunks/6844.js","chunks/6871.js","chunks/6922.js","chunks/6960.js","chunks/698.js","chunks/6982.js","chunks/7067.js","chunks/7122.js","chunks/7180.js","chunks/7239.js","chunks/7247.js","chunks/7274.js","chunks/7322.js","chunks/7365.js","chunks/75.js","chunks/7774.js","chunks/7828.js","chunks/7965.js","chunks/808.js","chunks/8145.js","chunks/8292.js","chunks/8410.js","chunks/8499.js","chunks/8520.js","chunks/8546.js","chunks/8635.js","chunks/869.js","chunks/877.js","chunks/8838.js","chunks/8895.js","chunks/8920.js","chunks/8988.js","chunks/939.js","chunks/9528.js","chunks/9539.js","chunks/9609.js","chunks/9713.js","chunks/9896.js","chunks/9927.js","webpack-runtime.js"]}
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/0UB55QZoHsERFCcuezqF6/_buildManifest.js","static/0UB55QZoHsERFCcuezqF6/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-77a7ed7beb6725df.js","static/chunks/4bd1b696-8a4ab4fdf0ae305a.js","static/chunks/3794-4d73df1ee3dd1b8a.js","static/chunks/main-app-776fd087f52a1f50.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/mzc6AVdJokpIsYjtjKON0/_buildManifest.js","static/mzc6AVdJokpIsYjtjKON0/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-b43a2a1c513882e9.js","static/chunks/4bd1b696-8a4ab4fdf0ae305a.js","static/chunks/3794-4d73df1ee3dd1b8a.js","static/chunks/main-app-776fd087f52a1f50.js"],rootMainFilesTree:{},pages:{"/_app":[]}};