@techysy/10router 1.5.1 → 1.6.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 (662) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +6 -6
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +18 -18
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.html +2 -2
  88. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  89. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  90. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
  91. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/gateway-probe/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/claim-compensation/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  299. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  305. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/rerank/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/rerank/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/version/shell-update/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  409. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  411. package/app/.next-cli-build/server/app/callback.html +2 -2
  412. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  413. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  414. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
  416. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  418. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
  419. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  420. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  423. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
  424. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  425. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/combos.html +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  428. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
  429. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  430. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/endpoint.html +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  433. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
  434. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  435. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/experimental.html +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +8 -8
  438. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +8 -8
  439. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +8 -8
  440. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  443. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +8 -8
  444. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  445. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/mitm.html +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  448. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
  449. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  450. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard/profile.html +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  453. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
  454. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  455. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/providers/new.html +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  458. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
  459. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  460. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/providers.html +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  463. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
  464. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  465. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  468. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
  469. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  470. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +8 -8
  473. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +8 -8
  474. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +8 -8
  475. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  478. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
  479. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  480. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  486. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  487. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  488. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/skills.html +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  491. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
  492. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  493. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/token-saver.html +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
  496. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
  497. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
  498. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/translator.html +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  501. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +8 -8
  502. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  503. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/usage.html +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
  507. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  508. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard.html +2 -2
  510. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  511. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  513. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  515. package/app/.next-cli-build/server/app/index.html +1 -1
  516. package/app/.next-cli-build/server/app/index.rsc +6 -6
  517. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  518. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  519. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  521. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  522. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  523. package/app/.next-cli-build/server/app/landing.html +2 -2
  524. package/app/.next-cli-build/server/app/landing.rsc +7 -7
  525. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +7 -7
  526. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +7 -7
  528. package/app/.next-cli-build/server/app/login/page.js +1 -1
  529. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  530. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  531. package/app/.next-cli-build/server/app/login.html +2 -2
  532. package/app/.next-cli-build/server/app/login.rsc +7 -7
  533. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  534. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  535. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
  536. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/page.js +1 -1
  538. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  540. package/app/.next-cli-build/server/app-paths-manifest.json +6 -6
  541. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  542. package/app/.next-cli-build/server/chunks/1806.js +1 -1
  543. package/app/.next-cli-build/server/chunks/{9417.js → 1819.js} +2 -2
  544. package/app/.next-cli-build/server/chunks/1884.js +1 -1
  545. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  546. package/app/.next-cli-build/server/chunks/2154.js +1 -0
  547. package/app/.next-cli-build/server/chunks/2557.js +4 -4
  548. package/app/.next-cli-build/server/chunks/2812.js +1 -1
  549. package/app/.next-cli-build/server/chunks/318.js +10 -8
  550. package/app/.next-cli-build/server/chunks/3217.js +1 -0
  551. package/app/.next-cli-build/server/chunks/3267.js +1 -0
  552. package/app/.next-cli-build/server/chunks/3500.js +2 -2
  553. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  554. package/app/.next-cli-build/server/chunks/3792.js +1 -1
  555. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  556. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  557. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  558. package/app/.next-cli-build/server/chunks/4386.js +1 -0
  559. package/app/.next-cli-build/server/chunks/447.js +1 -0
  560. package/app/.next-cli-build/server/chunks/4575.js +1 -1
  561. package/app/.next-cli-build/server/chunks/4692.js +1 -1
  562. package/app/.next-cli-build/server/chunks/4775.js +1 -1
  563. package/app/.next-cli-build/server/chunks/{2112.js → 4906.js} +1 -1
  564. package/app/.next-cli-build/server/chunks/4927.js +4 -4
  565. package/app/.next-cli-build/server/chunks/5210.js +15 -13
  566. package/app/.next-cli-build/server/chunks/539.js +1 -1
  567. package/app/.next-cli-build/server/chunks/5598.js +1 -0
  568. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  569. package/app/.next-cli-build/server/chunks/5625.js +1 -0
  570. package/app/.next-cli-build/server/chunks/5663.js +1 -0
  571. package/app/.next-cli-build/server/chunks/5757.js +1 -1
  572. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  573. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  574. package/app/.next-cli-build/server/chunks/615.js +1 -1
  575. package/app/.next-cli-build/server/chunks/6306.js +1 -1
  576. package/app/.next-cli-build/server/chunks/6326.js +1 -1
  577. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  578. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  579. package/app/.next-cli-build/server/chunks/6790.js +1 -1
  580. package/app/.next-cli-build/server/chunks/6877.js +1 -1
  581. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  582. package/app/.next-cli-build/server/chunks/6956.js +1 -1
  583. package/app/.next-cli-build/server/chunks/6960.js +2 -2
  584. package/app/.next-cli-build/server/chunks/7067.js +1 -1
  585. package/app/.next-cli-build/server/chunks/7122.js +1 -1
  586. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  587. package/app/.next-cli-build/server/chunks/7274.js +4 -4
  588. package/app/.next-cli-build/server/chunks/7322.js +2 -2
  589. package/app/.next-cli-build/server/chunks/7729.js +1 -0
  590. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  591. package/app/.next-cli-build/server/chunks/8172.js +2 -2
  592. package/app/.next-cli-build/server/chunks/8318.js +1 -1
  593. package/app/.next-cli-build/server/chunks/8370.js +2 -2
  594. package/app/.next-cli-build/server/chunks/8499.js +3 -3
  595. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  596. package/app/.next-cli-build/server/chunks/8689.js +1 -1
  597. package/app/.next-cli-build/server/chunks/8749.js +1 -1
  598. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  599. package/app/.next-cli-build/server/chunks/8895.js +8 -8
  600. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  601. package/app/.next-cli-build/server/chunks/9046.js +1 -1
  602. package/app/.next-cli-build/server/chunks/9154.js +1 -1
  603. package/app/.next-cli-build/server/chunks/9489.js +3 -2
  604. package/app/.next-cli-build/server/chunks/9601.js +1 -1
  605. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  606. package/app/.next-cli-build/server/chunks/9628.js +1 -1
  607. package/app/.next-cli-build/server/chunks/976.js +1 -1
  608. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  609. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  610. package/app/.next-cli-build/server/middleware.js +5 -5
  611. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  612. package/app/.next-cli-build/server/pages/404.html +2 -2
  613. package/app/.next-cli-build/server/pages/500.html +1 -1
  614. package/app/.next-cli-build/static/chunks/1243-72ef45af27dc7a4a.js +3 -0
  615. package/app/.next-cli-build/static/chunks/1321-77ba328dd4d69fdb.js +1 -0
  616. package/app/.next-cli-build/static/chunks/5497-ec8a6308121a2b70.js +7 -0
  617. package/app/.next-cli-build/static/chunks/{9749-80768075d38162d1.js → 9749-1f31c98804847f2a.js} +8 -8
  618. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8f6aadfc8bf2eb7b.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/experimental/{page-7ee730e7a1ddb6e5.js → page-01bf0e3f4117f6c1.js} +1 -1
  620. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-bce04d7851a6bf65.js → page-6db03f8140121a40.js} +10 -10
  621. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-7c9d46f8c09d480e.js → page-73d4979c8eec774c.js} +1 -1
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-a6b07fa9d0712cee.js +14 -0
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-ceb259d31ded818a.js → page-1e4e3f6f20152da1.js} +1 -1
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c77260f73f62aa0e.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-db46cbc3bf22d61a.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/landing/page-c6c3a32dd06bc907.js +1 -0
  627. package/app/.next-cli-build/static/css/17275fac82e1641e.css +1 -0
  628. package/app/package.json +71 -71
  629. package/app/public/donate/alipay.svg +1 -0
  630. package/app/public/donate/ifdian.svg +1 -0
  631. package/app/public/donate/wechat.svg +1 -0
  632. package/app/public/i18n/changelog/en.md +513 -477
  633. package/app/public/i18n/changelog/zh-CN.md +511 -475
  634. package/app/public/i18n/changelog/zh-TW.md +513 -477
  635. package/app/public/i18n/literals/zh-CN.json +2107 -2063
  636. package/app/public/i18n/literals/zh-TW.json +951 -907
  637. package/app/public/providers/alitp-intl.png +0 -0
  638. package/app/public/providers/alitp.png +0 -0
  639. package/app/public/providers/inception.png +0 -0
  640. package/app/src/mitm/server.js +12 -12
  641. package/app/src/shared/services/quotaAutoPing.js +345 -313
  642. package/app/src/sse/services/codebuddyCheckin.js +687 -890
  643. package/app/src/sse/services/minimaxCheckin.js +340 -0
  644. package/package.json +61 -61
  645. package/app/.next-cli-build/server/chunks/3599.js +0 -1
  646. package/app/.next-cli-build/server/chunks/6593.js +0 -1
  647. package/app/.next-cli-build/server/chunks/7070.js +0 -1
  648. package/app/.next-cli-build/server/chunks/7252.js +0 -1
  649. package/app/.next-cli-build/server/chunks/8672.js +0 -1
  650. package/app/.next-cli-build/server/chunks/8972.js +0 -1
  651. package/app/.next-cli-build/server/chunks/939.js +0 -1
  652. package/app/.next-cli-build/static/chunks/1243-acdc1dcbfcd9336d.js +0 -3
  653. package/app/.next-cli-build/static/chunks/1321-f4736e33b06bb9d6.js +0 -1
  654. package/app/.next-cli-build/static/chunks/5497-f54b1274c2141bf0.js +0 -7
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-14745e08d1edafb2.js +0 -1
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-244e20b305c911c6.js +0 -14
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c70550b49f94cbc4.js +0 -1
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-cefb3cbfe469dd51.js +0 -1
  659. package/app/.next-cli-build/static/chunks/app/landing/page-38924391f8649361.js +0 -1
  660. package/app/.next-cli-build/static/css/cd8cdc4426ba0a3b.css +0 -1
  661. /package/app/.next-cli-build/static/{4BxfiRlz5UJXZcUl6uinS → 1q0xTGDYtD52dGw4uiY4-}/_buildManifest.js +0 -0
  662. /package/app/.next-cli-build/static/{4BxfiRlz5UJXZcUl6uinS → 1q0xTGDYtD52dGw4uiY4-}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";exports.id=8972,exports.ids=[8972],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||""}}}}},12132:(a,b,c)=>{c.d(b,{$6:()=>G,Fp:()=>I,ND:()=>p,Nv:()=>F,XX:()=>x,getMimoAccountCookie:()=>H,readDesktopPassToken:()=>A});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={cn:"https://mimo-server-cn.xiaomimimo.com",sgp:"https://mimo-server-sgp.xiaomimimo.com",ams:"https://mimo-server-ams.xiaomimimo.com",ru:"https://mimo-server-ru.xiaomimimo.com",in:"https://mimo-server-in.xiaomimimo.com"},n={cn:"mimopc",sgp:"mimosgp",ams:"mimoams",ru:"mimoru",in:"mimoin"};function o(a=null){return String(a?.region||"").toLowerCase()}function p(a=null){return m[o(a)]||m.cn}m.cn;let q="account.xiaomi.com",r="miNative PC/Normal Windows_NT/10.0.19045 SDKV/1.0.0 DEVT/PC DEVS/Windows APP/miaccount_desktop APPV/0.1.0",s="MiClaw/1.0",t=new Set(["EBUSY","EPERM","EACCES"]),u=new Map,v=new Map,w="Xiaomi MiMo";function x(){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 y(){let a,b=i().join((a=g().homedir(),"win32"===process.platform?i().join(process.env.APPDATA||i().join(a,"AppData","Roaming"),w):"darwin"===process.platform?i().join(a,"Library","Application Support",w):i().join(process.env.XDG_CONFIG_HOME||i().join(a,".config"),w)),"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(t.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,80099,23)),b=null;try{let c=(b=new a(d,{readOnly:!0})).prepare("SELECT name, value FROM cookies WHERE host_key = ?").all("."+q),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 z(d)}}async function z(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 A(){try{let a=await y();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 B(a,b){for(let c of b.headers.getSetCookie?.()||[]){let b=/^([^=]+)=([^;]*)/.exec(c.trim());b&&b[2]&&(a[b[1]]=b[2])}}function C(a){return Object.entries(a).filter(([,a])=>a).map(([a,b])=>`${a}=${b}`).join("; ")}async function D(a,b,c=null){var d;let e,f={...a},g=p(c),h=function(a=null){return n[o(a)]||n.cn}(c),i=(await (0,l.proxyAwareFetch)(`${g}/api/user/xiaomi/me`,{redirect:"manual",headers:{"User-Agent":r,Cookie:C(f)},signal:AbortSignal.timeout(1e4)},b)).headers.get("location");if(!i)return null;let j=new URL(i).searchParams.get("callback");if(!j)return null;let m=await (0,l.proxyAwareFetch)(`https://${q}/pass/serviceLogin?sid=passportapi&_json=true`,{headers:{Cookie:C(f),"User-Agent":s,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),t=JSON.parse((await m.text()).replace(/^&&&START&&&/,"")),u=t.nonce||(t.location?new URL(t.location).searchParams.get("nonce"):null);if(!u||!t.location)return null;let v=await (0,l.proxyAwareFetch)(`${t.location}&clientSign=${(e=`nonce=${u}`+((d=t.ssecurity)&&d.trim()?`&${d}`:""),encodeURIComponent(k().createHash("sha1").update(e).digest("base64")))}`,{redirect:"manual",headers:{Cookie:C(f),"User-Agent":s},signal:AbortSignal.timeout(1e4)},b);B(f,v);let w=await (0,l.proxyAwareFetch)(`https://${q}/pass/serviceLogin?sid=${encodeURIComponent(h)}&callback=${encodeURIComponent(j)}&_json=true`,{headers:{Cookie:C(f),"User-Agent":s,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b),x=JSON.parse((await w.text()).replace(/^&&&START&&&/,""));if(B(f,w),!x?.location||!/\/api\/sts/.test(x.location))return null;let y=await (0,l.proxyAwareFetch)(x.location,{redirect:"manual",headers:{"User-Agent":r,Cookie:C(f)},signal:AbortSignal.timeout(1e4)},b);if(B(f,y),!f.serviceToken)return null;let z={};for(let a of["serviceToken","mimopc_ph","mimopc_slh","userId"])f[a]&&(z[a]=f[a]);return C(z)}async function E(a,b){let c=a?.mimoPassToken?{passToken:a.mimoPassToken,userId:a.mimoUserId,cUserId:a.mimoCUserId}:null;if(!c)try{c=await y()}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}|${o(a)}`).digest("hex"),e=u.get(d);if(e&&Date.now()-e.at<18e5)return{cookie:e.cookie};let f=v.get(d);if(f){let a=await f;return a?{cookie:a}:{cookie:null,reason:"sso-failed"}}let g=(async()=>{try{return await D(c,b,a)}catch{return null}finally{v.delete(d)}})();v.set(d,g);let h=await g;return h?(u.set(d,{cookie:h,at:Date.now()}),{cookie:h}):{cookie:null,reason:"sso-failed"}}function F(){u.clear()}let G=r;async function H(a=null,b=null){try{let{cookie:c}=await E(a,b);return c}catch{return null}}async function I(a=null,b=null){let{cookie:c,reason:d}=await E(a,b);if(!c)return{error:"no-pass-token"===d||"desktop-locked"===d?"no-session":"session-failed"};try{let d=await (0,l.proxyAwareFetch)(`${p(a)}/api/user/usage`,{headers:{"User-Agent":r,Cookie:c,Accept:"application/json"},signal:AbortSignal.timeout(1e4)},b);if(!d.ok)return{error:`http-${d.status}`};let e=await d.json().catch(()=>null);if(!e||0!==e.code||!e.data)return{error:"bad-response"};return{percent:e.data.percent,resetDate:e.data.resetDate,resetAt:e.data.resetAt}}catch(a){return{error:a.message}}}},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}}}}},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}})}},20386:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(92990);let e="1.0.0",f={config:d.sA,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","x-api-version":e},body:new URLSearchParams({client_id:a.clientId})});if(!b.ok){let a=await b.text();throw Error(`Muse Code 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","x-api-version":e},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 f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||f,data:c}},postExchange:async a=>{let b,c;for(let c=0;(429===(b=await fetch("https://api.meta.ai/muse-code/key",{method:"POST",headers:{Accept:"application/json",Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","x-api-version":e},body:JSON.stringify({onboard:!0}),redirect:"error"})).status||b.status>=500)&&!(c>=2);c++)await new Promise(a=>setTimeout(a,5e3*(c+1)));let d=await b.text();if(!b.ok){let a=`${b.status} ${d.slice(0,200)}`;try{let b=JSON.parse(d);(b?.title||b?.detail)&&(a=[b.title,b.detail].filter(Boolean).join(": "),b.action_url&&(a+=` — ${b.action_url}`))}catch{}throw Error(`Muse Code key mint failed: ${a}`)}try{c=JSON.parse(d)}catch{throw Error("Muse Code key mint returned invalid JSON")}if(!1===c.is_subs_active)throw Error("Muse Code subscription is inactive — activate it on muse.ai first");let f=c.action_url||c.require_payment_action_url;if(!c.api_key&&(c.require_payment||f))throw Error(`Muse Code subscription required${f?`: ${f}`:""}`);if(!c.api_key)throw Error("Muse Code key response is missing api_key");return{key:c}},mapTokens:(a,b)=>{let c=b?.key||{};return{accessToken:c.api_key,refreshToken:null,expiresIn:null,email:c.user_email?.trim().toLowerCase()||void 0,providerSpecificData:{authMethod:"device_code",oauthAccessToken:a.access_token,subscriptionTier:c.subs_tier_name||null}}}}},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)},31111:(a,b,c)=>{c.d(b,{LH:()=>i,Of:()=>j});var d=c(92990);function e(a,b){return"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0}function f(a,b){return"number"==typeof a?.[b]&&Number.isFinite(a[b])&&a[b]>0?a[b]:void 0}async function g(a,b){let c,d=await fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(b).toString(),signal:AbortSignal.timeout(3e4)});try{c=JSON.parse(await d.text())}catch{c={error:`invalid_json_response (HTTP ${d.status})`}}return{status:d.status,body:c}}function h(a){return{config:a,flowType:"device_code",async requestDeviceCode(a,b){let c,d,h;if(!b)throw Error("MiniMax Code sign-in requires a PKCE code challenge");let{status:i,body:j}=await g(a.deviceUrl,{client_id:a.clientId,scope:a.scope,audience:a.audience,code_challenge:b,code_challenge_method:"S256"}),k=e(j,"user_code"),l=e(j,"device_code"),m=e(j,"verification_uri_complete")??e(j,"verification_uri")??e(j,"verification_url");if(!k||!m)throw Error(`MiniMax device code response unusable (HTTP ${i})`);let n=!l;return{device_code:l??k,user_code:k,verification_uri:m,verification_uri_complete:e(j,"verification_uri_complete")||m,expires_in:(c=f(j,"expires_in"),d=f(j,"expired_in"),(c||(d?d<1e12?d:Math.max(1,Math.ceil((d-Date.now())/1e3)):void 0))??600),interval:(h=f(j,"interval"))?n&&h>=60?Math.round(h/1e3):h:5,_minimaxPollByUser:n}},async pollToken(a,b,c,d){if(!b)return{ok:!0,data:{error:"authorization_pending"}};let f={grant_type:"urn:ietf:params:oauth:grant-type:device_code",...d?._minimaxPollByUser?{user_code:b}:{device_code:b},client_id:a.clientId,code_verifier:c},{body:h}=await g(a.tokenUrl,f),i=e(h,"status");return"pending"===i?{ok:!0,data:{error:"authorization_pending"}}:"slow_down"===i?{ok:!0,data:{error:"slow_down"}}:"denied"===i||"access_denied"===i?{ok:!0,data:{error:"access_denied"}}:"expired"===i||"expired_token"===i?{ok:!0,data:{error:"expired_token"}}:i?{ok:!0,data:{error:`unexpected_status:${i}`}}:e(h,"error")?{ok:!0,data:{error:e(h,"error"),error_description:e(h,"error_description")}}:e(h,"access_token")?{ok:!0,data:h}:{ok:!0,data:{error:"no_access_token"}}},mapTokens(a){let b=f(a,"expires_in");return{accessToken:e(a,"access_token"),refreshToken:e(a,"refresh_token")??"",expiresIn:b??3600,providerSpecificData:{authMethod:"device_code"}}}}}let i=h(d.Vv),j=h(d.b3)},34940:(a,b,c)=>{c.d(b,{A:()=>g});var d=c(90737),e=c(92990),f=c(53129);let g={config:e.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":d.hY},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,e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":d.hY},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await e.json()}catch{c={error:"invalid_response",error_description:await e.text()}}let f=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:e.ok||f,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":d.hY,"x-xai-token-auth":"xai-grok-cli","x-grok-client-version":d.uG}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,f.pG)(a.id_token)||(0,f.J_)(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,e=[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:e||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}})}},40626:(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||""}})}},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})}},43659:(a,b,c)=>{c.d(b,{A1:()=>k,Yx:()=>i,lR:()=>m,wO:()=>l,xJ:()=>f,yj:()=>g,zL:()=>j});var d=c(3662),e=c(12557);function f(a,b){let c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""});return{type:"error",error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}}}function g(a,b,c=null){return new Response(JSON.stringify(f(a,b)),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*",...c}})}let h=/"validation_url"\s*:\s*"([^"]+)"/;function i(a){if(!a||!a.includes("VALIDATION_REQUIRED"))return null;let b=h.exec(a);if(!b)return null;let c=b[1];try{c=JSON.parse(`"${c}"`)}catch{}return`Google requires account verification (VALIDATION_REQUIRED): ${c} (Complete 'Verify your account' in a browser signed in to the affected account, or check 18+ age verification at https://myaccount.google.com/age-verification)`}async function j(a,b=null){let c="";try{c=await a.text()}catch{c=""}let e=i(c);if(b&&"function"==typeof b.parseError)try{let f=b.parseError(a,c);if(f&&"object"==typeof f){let b=e||f.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:f.status||a.status,message:b,resetsAtMs:f.resetsAtMs}}}catch{}if(e)return{statusCode:a.status,message:e};let f="";try{let a=JSON.parse(c);if(a?.code===11133||a?.displayTips||a?.displayMsg){let b=a.displayTips?.zh||a.displayTips?.en||a.displayTips?.["zh-hant"],c=a.displayMsg?.zh||a.displayMsg?.en||a.displayMsg?.["zh-hant"]||a.msg||a.message;b?f=`${c?`${c}:`:""}${b}`:c&&(f=c)}f||(f=a.error?.message||a.message||a.msg||a.error||c)}catch{f=c}let g=("string"==typeof f?f:JSON.stringify(f))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function k(a,b,c,d=null){return{success:!1,status:a,error:b,resetsAtMs:c,response:g(a,b,d)}}function l(a,b,c,d,e=null){let f=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1),g=402===a||/insufficient[_\s-]*balance|余额不足|欠费/i.test(b);return new Response(JSON.stringify({type:"error",error:{type:a>=500?"api_error":"invalid_request_error",message:g||!d?b:`${b} (${d})`}}),{status:a,headers:{...e,"Content-Type":"application/json",...!g?{"retry-after":String(f)}:{}}})}function m(a,b,c,d){let f=d||a.code||"FETCH_FAILED",g=a.message||"Unknown error",h=a.cause?.code,i=a.cause?.message,j=h||i?` (cause: ${[h,i].filter(Boolean).join(": ")})`:"",k=`[${f}]: ${g}${j}`,l=(0,e.Bp)(k,b);return(0,e.dN)(l,b)}},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"}})}},66678:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Gj:()=>K,PY:()=>N,Re:()=>L,Su:()=>M,YR:()=>g.YR,gR:()=>g.gR,kP:()=>J,sO:()=>I});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(40626),E=c(81884),F=c(20386),G=c(31111),H=a([e]);e=(H.then?(await H)():H)[0];let O={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,glm:E.A,muse:F.A,"minimax-code":G.LH,"minimax-code-global":G.Of};function I(a){let b=O["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function J(a,b,c){let d=I(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 K(a,b,c,d,e,f){let g=I(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 L(a,b,c){let d=I(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 M(a,b,c,d){let e=I(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;if(e.postExchange)try{b=await e.postExchange(f.data)}catch(b){return console.warn(`[oauth] ${a} postExchange failed:`,b?.message||b),{success:!1,error:"exchange_failed",errorDescription:b.message,fatal:!0}}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 P=!1;async function N(){if(!P){P=!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){P=!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})}},81884:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(55511),e=c.n(d);async function f(a,b){let c=await g(a,b),d={Authorization:`Bearer ${c}`,"Content-Type":"application/json"},e=function(a){let b=(Array.isArray(a?.organizations)?a.organizations:[]).map(a=>({organization:a,projects:(a?.projects||[]).filter(a=>"2"!==String(a?.projectType??"").trim())})).filter(({organization:a,projects:b})=>!!(a?.organizationId&&b.length));if(!b.length)return null;let c=b.find(({organization:a})=>i(a.organizationName))||b[0],d=c.projects.find(a=>i(a?.projectName))||c.projects[0];return c.organization?.organizationId&&d?.projectId?{organizationId:c.organization.organizationId,projectId:d.projectId}:null}(await h(`${a.apiBaseUrl}/api/biz/customer/getCustomerInfo`,{headers:d},"customer info"));if(!e)throw Error("Unable to resolve Z.ai organization and project for the coding plan");let f=`${a.apiBaseUrl}/api/biz/v1/organization/${e.organizationId}/projects/${e.projectId}/api_keys`,j=await h(f,{headers:d},"api keys")||[],k=Array.isArray(j)?j.find(b=>b?.name===a.planApiKeyName):null;k||(k=await h(f,{method:"POST",headers:d,body:JSON.stringify({name:a.planApiKeyName})},"api key create"));let l=k?.apiKey?.trim();if(!l)throw Error("Z.ai api_keys response is missing apiKey");let m=await h(`${f}/copy/${encodeURIComponent(l)}`,{headers:d},"api key copy"),n=m?.secretKey?.trim();if(!n)throw Error("Z.ai api key copy response is missing secretKey");return{planApiKey:`${l}.${n}`,businessToken:c}}async function g(a,b){let c=await h(a.businessLoginUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b})},"Z.ai business login"),d=c?.access_token?.trim()||c?.accessToken?.trim();if(!d)throw Error("Z.ai business login response is missing access_token");return d}async function h(a,b,c){let d,e=await fetch(a,b),f=await e.text();if(!e.ok)throw Error(`Z.ai ${c} request failed (HTTP ${e.status}): ${f.slice(0,200)}`);try{d=JSON.parse(f)}catch{throw Error(`Z.ai ${c} response is not valid JSON`)}if(!j(d?.code)||d?.success===!1)throw Error(d?.msg||`Z.ai ${c} returned business error ${d?.code}`);return d?.data??d??null}function i(a){let b=String(a||"").trim().toLowerCase();return b.includes("默认机构")||b.includes("默认项目")||"default"===b}function j(a){return null==a||0===a||200===a||"0"===a||"200"===a}let k={config:c(92990)._0,flowType:"device_code",requestDeviceCode:async a=>{let b=e().randomBytes(32).toString("hex"),c=await fetch(a.cliInitUrl,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${b}`},body:JSON.stringify({provider:a.providerId||"zai"})});if(!c.ok){let a=await c.text();throw Error(`Zai OAuth init failed: ${a}`)}let d=await c.json();if(!j(d.code)||!d.data)throw Error(d.msg||"Zai OAuth init returned no data");let f=d.data;if(!f.flow_id||!f.authorize_url)throw Error("Zai OAuth init response missing flow_id/authorize_url");return{device_code:f.flow_id,verification_uri:f.authorize_url,expires_in:function(a){let b=Number(a);if(!Number.isFinite(b)||b<=0)return null;let c=Math.floor(((b>1e12?b:1e3*b)-Date.now())/1e3);return c>0?c:null}(f.expires_at)??300,interval:f.poll_interval_sec||3,_zcodePollToken:b}},pollToken:async(a,b,c,d)=>{let e=d?._zcodePollToken;if(!e)return{ok:!0,data:{error:"access_denied",error_description:"Missing Zai poll token — restart the login flow"}};let g=await fetch(`${a.cliPollUrl}/${encodeURIComponent(b)}`,{headers:{Authorization:`Bearer ${e}`}});if(!g.ok)return{ok:!0,data:{error:"access_denied",error_description:`Zai poll failed (HTTP ${g.status})`}};let h=await g.json();if(!j(h.code))return{ok:!0,data:{error:"access_denied",error_description:h.msg||"Zai poll failed"}};let i=h.data||{};if("pending"===i.status)return{ok:!0,data:{error:"authorization_pending"}};if("failed"===i.status)return{ok:!0,data:{error:"access_denied",error_description:"Zai authorization failed or was cancelled"}};if("ready"!==i.status)return{ok:!0,data:{error:"authorization_pending",error_description:`Unknown status: ${i.status}`}};let k=i[a.providerId]||i[i.providerId]||{},l=k.access_token||k.accessToken||i.accessToken||i.access_token;if(!l)return{ok:!0,data:{error:"access_denied",error_description:"Zai poll response missing access token"}};let{planApiKey:m,businessToken:n}=await f(a,l);return{ok:!0,data:{access_token:m,_zcodeJwtToken:i.token||"",_zaiBusinessToken:n,_zaiRefreshToken:k.refresh_token||k.refreshToken||i.refresh_token||i.refreshToken||"",_zcodeUser:i.user||{}}}},mapTokens:a=>{let b=a._zcodeUser||{},c=b.name||b.email||null;return{accessToken:a.access_token,refreshToken:null,email:b.email||null,...c?{displayName:c}:{},providerSpecificData:{authMethod:"cli_poll",username:b.name||void 0,userId:b.user_id||void 0,zcodeJwtToken:a._zcodeJwtToken||void 0,zaiBusinessToken:a._zaiBusinessToken||void 0,...a._zaiRefreshToken?{zaiRefreshToken:a._zaiRefreshToken}:{}}}}}},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 +0,0 @@
1
- "use strict";exports.id=939,exports.ids=[939],exports.modules={30939:(a,b,c)=>{c.d(b,{default:()=>d});let d={id:"codebuddy-intl",alias:"cbai",uiAlias:"cbai",hidden:!1,priority:90,display:{name:"CodeBuddy",icon:"smart_toy",color:"#006EFF",website:"https://www.codebuddy.ai",notice:{signupUrl:"https://www.codebuddy.ai",webUrl:"https://www.codebuddy.ai/agents"}},category:"oauth",authModes:["oauth","apikey"],hasOAuth:!0,transport:{baseUrl:"https://www.codebuddy.ai/v2/chat/completions",forceStream:!0,thinkingFormat:"openai",headers:{"User-Agent":"IDE/2.108.1 CodeBuddy/2.108.1","X-Product":"SaaS","X-IDE-Type":"IDE","X-IDE-Name":"IDE","x-requested-with":"XMLHttpRequest","x-codebuddy-request":"1"},auth:{combined:!0,header:"Authorization",scheme:"bearer"},usage:{url:"https://www.codebuddy.ai/v2/billing/meter/get-user-resource"}},models:[{id:"hy4-preview",name:"Hy4-Preview",rateMultiplier:0},{id:"hy3",name:"Hy3",rateMultiplier:0},{id:"gpt-6-astra",name:"GPT 6.0 Astra",rateMultiplier:6.67},{id:"gpt-6-luna",name:"GPT-6-Luna"},{id:"gpt-6-sol",name:"GPT-6-Sol"},{id:"gpt-5.6-sol",name:"GPT-5.6-Sol",rateMultiplier:3.47},{id:"gpt-5.6-terra",name:"GPT-5.6-Terra",rateMultiplier:1.39},{id:"gpt-5.6-luna",name:"GPT-5.6-Luna",rateMultiplier:.14},{id:"gpt-5.5",name:"GPT-5.5",rateMultiplier:3.31},{id:"gpt-5.4",name:"GPT-5.4",rateMultiplier:1.65},{id:"gpt-5.3-codex",name:"GPT-5.3-Codex",rateMultiplier:1.25},{id:"gpt-6.1-sol",name:"GPT-6.1-Sol"},{id:"claude-opus-5.5",name:"Claude-Opus-5.5",rateMultiplier:2.17,paidTier:!0},{id:"claude-sonnet-5.5",name:"Claude-Sonnet-5.5",rateMultiplier:1.33,paidTier:!0},{id:"claude-opus-5",name:"Claude-Opus-5",rateMultiplier:3.33,paidTier:!0},{id:"claude-sonnet-5",name:"Claude-Sonnet-5",rateMultiplier:1.33,paidTier:!0},{id:"claude-opus-4.8",name:"Claude-Opus-4.8",rateMultiplier:3.33,paidTier:!0},{id:"claude-opus-4.7",name:"Claude-Opus-4.7",rateMultiplier:3.33,paidTier:!0},{id:"claude-opus-4.6",name:"Claude-Opus-4.6",rateMultiplier:3.33,paidTier:!0},{id:"claude-sonnet-4.6",name:"Claude-Sonnet-4.6",rateMultiplier:1.33,paidTier:!0},{id:"gemini-3.8-flash",name:"Gemini-3.8-Flash"},{id:"grok-4.7",name:"Grok-4.7",rateMultiplier:1.9},{id:"space-bunny",name:"Space-Bunny",rateMultiplier:.08},{id:"gemini-3.5-flash",name:"Gemini-3.5-Flash",rateMultiplier:.99},{id:"glm-5v-turbo",name:"GLM-5v-Turbo",rateMultiplier:.71},{id:"glm-5.3",name:"GLM-5.3",rateMultiplier:.79},{id:"glm-5.3-flash",name:"GLM-5.3-Flash",rateMultiplier:.06},{id:"glm-5.2",name:"GLM-5.2",rateMultiplier:.79},{id:"glm-5.1",name:"GLM-5.1",rateMultiplier:.79},{id:"minimax-m3",name:"MiniMax-M3",rateMultiplier:.25},{id:"kimi-k3",name:"Kimi-K3",rateMultiplier:1.62},{id:"kimi-k2.7",name:"Kimi-K2.7-Code",rateMultiplier:.57},{id:"kimi-k2.8-preview",name:"Kimi-K2.8-Preview",rateMultiplier:.77,subPriority:!0},{id:"kimi-k2.6",name:"Kimi-K2.6",rateMultiplier:.52},{id:"deepseek-v4.1-flash",name:"DeepSeek-V4.1-Flash",rateMultiplier:.11,promoFreeUntil:"2026-11-01"}],oauth:{baseUrl:"https://www.codebuddy.ai",stateUrl:"https://www.codebuddy.ai/v2/plugin/auth/state",tokenUrl:"https://www.codebuddy.ai/v2/plugin/auth/token",refreshUrl:"https://www.codebuddy.ai/v2/plugin/auth/token/refresh",userAgent:"IDE/2.63.2 CodeBuddy/2.63.2",platform:"ide",pollInterval:5e3},features:{usage:!0,usageApikey:!0}}}};
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1243],{15536:(e,t,l)=>{"use strict";l.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>d,Nv:()=>u,RL:()=>c,ev:()=>m,fl:()=>i,hT:()=>s,oX:()=>a,t6:()=>o});let s=["zh-CN","zh-TW"],a=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,o=5,c=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],u=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},20242:(e,t,l)=>{"use strict";l.d(t,{default:()=>j});var s=l(95155),a=l(12115),n=l(14051),r=l.n(n),i=l(35497),o=l(11059),c=l(15536);async function d(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(c.Iv)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(d);return!!t.length&&new Promise(e=>{let l=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--l&&e(!1)}))})}var u=l(72767);function x({label:e,url:t,copyId:l,copied:a,onCopy:n,badge:r,actions:o}){return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===r||"TS"===r?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,s.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)("button",{onClick:()=>n(t,l),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a===l?"check":"content_copy"})}),o]})}function h({status:e,className:t=""}){return(0,s.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,s.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function p({text:e}){return(0,s.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,s.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function y({message:e,action:t}){return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,s.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}var g=l(73006);function b(e){return e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function f(e){if(!e||"string"!=typeof e)return e;let t=/^(.*?)((?:\s*\(rotated\))*)$/.exec(e),l=(0,g.Tl)(t[1]),s=(t[2].match(/\(rotated\)/g)||[]).length;return s?`${l} ${Array.from({length:s},()=>(0,g.Tl)("(rotated)")).join(" ")}`:l}function j({machineId:e}){let[t,l]=(0,a.useState)([]),[n,r]=(0,a.useState)(!0),[k,w]=(0,a.useState)(!1),[T,v]=(0,a.useState)(""),[N,C]=(0,a.useState)(""),[S,$]=(0,a.useState)(null),[E,_]=(0,a.useState)(""),[P,A]=(0,a.useState)(!1),[L,R]=(0,a.useState)(null),[O,D]=(0,a.useState)(""),[F,I]=(0,a.useState)(""),[U,W]=(0,a.useState)(!1),[K,q]=(0,a.useState)(null),[M,z]=(0,a.useState)(null),[B,H]=(0,a.useState)(!1),[J,Y]=(0,a.useState)(!0),[Q,X]=(0,a.useState)(!1),[Z,G]=(0,a.useState)(!1),V=(0,a.useRef)(!1),[ee,et]=(0,a.useState)(null),[el,es]=(0,a.useState)(!0),[ea,en]=(0,a.useState)(!0),[er,ei]=(0,a.useState)(!1),[eo,ec]=(0,a.useState)(!0),[ed,em]=(0,a.useState)(!1),[eu,ex]=(0,a.useState)(!1),[eh,ep]=(0,a.useState)(""),[ey,eg]=(0,a.useState)(""),[eb,ef]=(0,a.useState)(!1),[ej,ek]=(0,a.useState)(""),[ew,eT]=(0,a.useState)(null),[ev,eN]=(0,a.useState)(!1),[eC,eS]=(0,a.useState)(!1),[e$,eE]=(0,a.useState)(!1),[e_,eP]=(0,a.useState)(!1),[eA,eL]=(0,a.useState)(""),[eR,eO]=(0,a.useState)(!1),[eD,eF]=(0,a.useState)(""),[eI,eU]=(0,a.useState)(null),[eW,eK]=(0,a.useState)(""),[eq,eM]=(0,a.useState)(""),[ez,eB]=(0,a.useState)(null),[eH,eJ]=(0,a.useState)(!1),[eY,eQ]=(0,a.useState)([]),[eX,eZ]=(0,a.useState)(""),[eG,eV]=(0,a.useState)(!1),[e0,e1]=(0,a.useState)(!1),[e5,e2]=(0,a.useState)(!1),e4=(0,a.useRef)(null),e3=(0,a.useRef)(0),e8=(0,a.useRef)(0),e6=(0,a.useRef)(!1),e7=(0,a.useRef)(!1),e9=(0,a.useRef)(!1),te=(0,a.useRef)(!1),[tt,tl]=(0,a.useState)(!1),[ts,ta]=(0,a.useState)(!1),[tn,tr]=(0,a.useState)(new Set),[ti,to]=(0,a.useState)(!1);(0,a.useEffect)(()=>{to(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:tc,copy:td}=(0,o.C)(),tm=!el||!ea,tu=el?"Set a dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,a.useEffect)(()=>{e4.current&&(e4.current.scrollTop=e4.current.scrollHeight)},[eY]),(0,a.useEffect)(()=>{tk(),tp()},[]),(0,a.useEffect)(()=>{if(!(ed||e$))return;let e=!ed||eu,t=!e$||e_,l=()=>{document.hidden||th()};if(document.addEventListener("visibilitychange",l),e&&t)return()=>document.removeEventListener("visibilitychange",l);let s=setInterval(()=>{document.hidden||th()},c.fl);return()=>{clearInterval(s),document.removeEventListener("visibilitychange",l)}},[ed,e$,eu,e_]),(0,a.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(ed&&(eh||ey)){let e=await m(ey,eh);e6.current=e,e?(e3.current=0,ex(!0),e9.current||(e9.current=!0,tl(!0))):(e3.current+=1,e3.current>=c.t6&&ex(!1))}else e6.current=!1;if(e$&&eA){let e=await d(eA);e7.current=e,e?(e8.current=0,eP(!0),te.current||(te.current=!0,ta(!0))):(e8.current+=1,e8.current>=c.t6&&eP(!1))}else e7.current=!1}};if(!(ed&&(eh||ey)||e$&&eA))return;e();let t=!e$||e_;if((!ed||eu)&&t)return;let l=setInterval(e,c.RL);return()=>clearInterval(l)},[ed,eh,ey,e$,eA,eu,e_]);let tx=(0,a.useCallback)((e,t,l,s,a,n)=>{t.current?(l.current=0,s(!0),a.current||(a.current=!0,n(!0))):(l.current+=1,l.current>=c.t6&&s(!1))},[]),th=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),l=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,s=t.tunnel?.tunnelUrl||"";ep(s),eg(t.tunnel?.publicUrl||""),em(l),tx(null,e6,e3,ex,e9,tl);let a=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";eL(n),eE(a),tx(null,e7,e8,eP,te,ta)}catch{}},tp=async()=>{ec(!0);try{let[e,t]=await Promise.all([u.A.getState().fetchSettings(),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e&&(H(e.requireApiKey||!1),Y(!1!==e.dailyTokenLimitEnabled),X(!0===e.apiKeyRotation),es(!1!==e.requireLogin),en(e.hasPassword||!1),ei(e.tunnelDashboardAccess||!1)),t.ok){let e=await t.json(),l=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,s=e.tunnel?.tunnelUrl||"";ep(s),eg(e.tunnel?.publicUrl||""),em(l),tx(null,e6,e3,ex,e9,tl);let a=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";eL(n),eE(a),tx(null,e7,e8,eP,te,ta)}}catch(e){console.log("Error loading settings:",e)}finally{ec(!1)}},ty=async e=>{try{await u.A.getState().patchSettings({tunnelDashboardAccess:e})&&ei(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},tg=async e=>{try{await u.A.getState().patchSettings({requireApiKey:e})&&H(e)}catch(e){console.log("Error updating requireApiKey:",e)}},tb=async e=>{try{await u.A.getState().patchSettings({dailyTokenLimitEnabled:e})&&Y(e)}catch(e){console.log("Error updating dailyTokenLimitEnabled:",e)}},tf=async e=>{try{let t=await u.A.getState().patchSettings({apiKeyRotation:e});return t&&X(e),!!t}catch(e){return console.log("Error updating apiKeyRotation:",e),!1}},tj=async()=>{if(!V.current){V.current=!0,z(null),G(!0);try{let e=await fetch("/api/keys/rotate",{method:"POST"});if(e.ok){let t=await e.json(),s=await fetch("/api/keys");if(s.ok){let e=await s.json();l(e.keys||[])}et(t)}}catch(e){console.log("Error rotating keys:",e)}finally{G(!1),V.current=!1}}},tk=async()=>{try{let e=async()=>{let e=await fetch("/api/keys");return e.ok&&(await e.json()).keys||[]},t=await e();if(0===t.length)try{(await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"Default Key"})})).ok&&(t=await e())}catch{}l(t)}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},tw=async(...e)=>{ef(!0),ek("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),l=Date.now();for(;Date.now()-l<c.Cp;){if(await new Promise(e=>setTimeout(e,c.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return em(!0),ef(!1),ek(""),!0;if((Date.now()-l)%1e4<c.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return eT({type:"error",message:(0,g.Tl)("Tunnel process stopped unexpectedly.")}),ef(!1),ek(""),!1}}catch{}}return eT({type:"error",message:(0,g.Tl)("Tunnel created but not reachable. Please try again.")}),ef(!1),ek(""),!1},tT=async()=>{eN(!1),ef(!0),eT(null),ek("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let l=await t.json();l.download?.downloading?ek(`Downloading cloudflared... ${l.download.progress}%`):e&&ek("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let l=await t.json();if(!t.ok)return void eT({type:"error",message:l.error||"Failed to enable tunnel"});let s=l.tunnelUrl;if(!s)return void eT({type:"error",message:(0,g.Tl)("No tunnel URL returned")});ep(s),eg(l.publicUrl||""),await tw(l.publicUrl,s)}catch(e){eT({type:"error",message:e.message})}finally{e=!1,ef(!1),ek("")}},tv=async()=>{ef(!0),eT(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(em(!1),ep(""),eS(!1),eT({type:"success",message:(0,g.Tl)("Tunnel disabled")})):eT({type:"error",message:t.error||(0,g.Tl)("Failed to disable tunnel")})}catch(e){eT({type:"error",message:e.message})}finally{ef(!1)}},tN=async()=>{eB(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eB(t.installed),t}}catch{}return eB(!1),{installed:!1}},tC=async()=>{eJ(!0),eU(null),eQ([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eX})});eZ("");let t=e.body.getReader(),l=new TextDecoder,s="";for(;;){let{done:e,value:a}=await t.read();if(e)break;let n=(s+=l.decode(a,{stream:!0})).split("\n\n");for(let e of(s=n.pop()||"",n)){let t=e.split("\n"),l="progress",s=null;for(let e of t)if(e.startsWith("event: ")&&(l=e.slice(7).trim()),e.startsWith("data: "))try{s=JSON.parse(e.slice(6))}catch{}if(s)if("progress"===l)eQ(e=>[...e.slice(-50),s.message]);else if("done"===l){eB(!0),eJ(!1),e1(!1),t_();return}else"error"===l&&eU({type:"error",message:s.error||(0,g.Tl)("Install failed")})}}}catch(e){eU({type:"error",message:e.message})}finally{eJ(!1)}},tS=async e=>{eF((0,g.Tl)("Waiting for Tailscale ready..."));let t=`${e}/api/health`,l=Date.now();for(;Date.now()-l<c.Cp;){await new Promise(e=>setTimeout(e,c.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},t$=(e,t)=>{eK(e),eM(t)},tE=()=>{eK(""),eM("")},t_=async()=>{e1(!1),eV(!0),eO(!0),eU(null),eF("Connecting..."),tE();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eL(t.tunnelUrl||"");let e=await tS(t.tunnelUrl);eE(!0),eU(e?null:{type:"warning",message:(0,g.Tl)("Connected but not reachable yet.")});return}if(t.needsLogin&&t.authUrl){t$(t.authUrl,(0,g.Tl)("Open Login Page")),eF((0,g.Tl)('Login required — click "Open Login Page" to continue'));for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tE(),eF((0,g.Tl)("Starting funnel..."));let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eL(t.tunnelUrl||"");let e=await tS(t.tunnelUrl);eE(!0),eU(e?null:{type:"warning",message:(0,g.Tl)("Connected but not reachable yet.")})}else t.funnelNotEnabled&&t.enableUrl?await tP(t.enableUrl):eU({type:"error",message:t.error||(0,g.Tl)("Failed to start funnel")});return}}catch{}}tE(),eU({type:"error",message:(0,g.Tl)("Login timed out. Please try again.")});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tP(t.enableUrl);eU({type:"error",message:t.error||(0,g.Tl)("Failed to connect")})}catch(e){eU({type:"error",message:e.message})}finally{eO(!1),eV(!1),eF(""),tE()}},tP=async e=>{t$(e,(0,g.Tl)("Open Funnel Settings")),eF((0,g.Tl)('Click "Open Funnel Settings" to enable Funnel...'));for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tE(),eL(t.tunnelUrl||"");let e=await tS(t.tunnelUrl);eE(!0),eU(e?null:{type:"warning",message:(0,g.Tl)("Connected but not reachable yet.")});return}if(t.funnelNotEnabled)continue;if(t.error){tE(),eU({type:"error",message:t.error});return}}catch{}}tE(),eU({type:"error",message:(0,g.Tl)("Timed out waiting for Funnel to be enabled.")})},tA=async()=>{eO(!0),eU(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(eE(!1),eL(""),e2(!1),eU({type:"success",message:(0,g.Tl)("Tailscale disabled")})):eU({type:"error",message:t.error||(0,g.Tl)("Failed to disable Tailscale")})}catch(e){eU({type:"error",message:e.message})}finally{eO(!1)}},tL=async()=>{eU(null),eQ([]);let e=await tN();e?.installed&&e?.hasCachedPassword?t_():e1(!0)},tR=async()=>{if(T.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:T.trim(),dailyTokenLimit:N.trim()?Number(N.trim()):void 0})}),t=await e.json();e.ok&&(q(t.key),await tk(),v(""),C(""),w(!1))}catch(e){console.log("Error creating key:",e)}},tO=async()=>{if(S){A(!0);try{(await fetch(`/api/keys/${S.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({dailyTokenLimit:E.trim()?Number(E.trim()):null})})).ok&&($(null),await tk())}catch(e){console.log("Error saving daily limit:",e)}finally{A(!1)}}},tD=async()=>{if(L){W(!0);try{let e=O.split(/[\n,]/).map(e=>e.trim()).filter(Boolean),t=F.split(/[\n,]/).map(e=>e.trim()).filter(Boolean);(await fetch(`/api/keys/${L.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({allowedModels:e.length>0?e:null,allowedCombos:t.length>0?t:null})})).ok&&(R(null),await tk())}catch(e){console.log("Error saving key access control:",e)}finally{W(!1)}}},tF=async e=>{z({title:(0,g.Tl)("Delete API Key"),message:(0,g.Tl)("Delete this API key?"),onConfirm:async()=>{z(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(l(t.filter(t=>t.id!==e)),tr(t=>{let l=new Set(t);return l.delete(e),l}))}catch(e){console.log("Error deleting key:",e)}}})},tI=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&l(l=>l.map(l=>l.id===e?{...l,isActive:t}:l))}catch(e){console.log("Error toggling key:",e)}},[tU,tW]=(0,a.useState)("/v1");return((0,a.useEffect)(()=>{tW(`${window.location.origin}/v1`)},[]),n)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(i.Qv,{}),(0,s.jsx)(i.Qv,{})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),(0,g.Tl)("API Endpoint")]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(x,{label:(0,g.Tl)("Local"),url:tU,copyId:"local_url",copied:tc,onCopy:td}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${ed?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),ed&&!eb&&eu?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.pd,{value:`${ey||eh}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)("button",{onClick:()=>td(`${ey||eh}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===tc?"check":"content_copy"})}),(0,s.jsx)("button",{onClick:()=>eS(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:(0,g.Tl)("Disable Tunnel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ed||eb||eu?eb?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-surface text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ej||(0,g.Tl)("Creating tunnel...")]}),(0,s.jsx)("button",{onClick:()=>{ef(!1),ek("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:(0,g.Tl)("Stop"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ew?.type==="error"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ew.message]}),(0,s.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>eN(!0),children:(0,g.Tl)("Enable")})]}):eo?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-surface text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,s.jsx)("button",{onClick:()=>ec(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:(0,g.Tl)("Stop"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,s.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{tm?eT({type:"error",message:`${(0,g.Tl)("Security required")}: ${tu}`}):B?eN(!0):eT({type:"error",message:(0,g.Tl)('Security required: Enable "Require API key" before activating the tunnel.')})},children:(0,g.Tl)("Enable")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),tt?(0,g.Tl)("Tunnel reconnecting..."):(0,g.Tl)("Tunnel checking...")]}),(0,s.jsx)("button",{onClick:()=>eS(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:(0,g.Tl)("Disable Tunnel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${e$?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),e$&&!eR&&e_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.pd,{value:`${eA}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)("button",{onClick:()=>td(`${eA}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===tc?"check":"content_copy"})}),(0,s.jsx)("button",{onClick:()=>e2(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:(0,g.Tl)("Disable Tailscale"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!e$||eR||e_?eR||eG?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-surface text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eD||(0,g.Tl)("Connecting...")]}),eW&&(0,s.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eW,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eq||(0,g.Tl)("Open")}),(0,s.jsx)("button",{onClick:()=>{eO(!1),eV(!1),eF(""),tE()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:(0,g.Tl)("Stop"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eI?.type==="error"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eI.message]}),(0,s.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:tL,children:(0,g.Tl)("Enable")})]}):(0,s.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{tm?eU({type:"error",message:`${(0,g.Tl)("Security required")}: ${tu}`}):tL()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:(0,g.Tl)("Enable")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ts?(0,g.Tl)("Tailscale reconnecting..."):(0,g.Tl)("Tailscale checking...")]}),(0,s.jsx)("button",{onClick:()=>e2(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:(0,g.Tl)("Disable Tailscale"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),tm&&!ed&&!e$&&(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(y,{message:tu,action:{label:(0,g.Tl)("Open settings"),href:"/dashboard/profile"}})}),(ed||e$)&&(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!B&&(0,s.jsx)(y,{message:(0,g.Tl)("Require API key is disabled — your endpoint is publicly accessible without authentication."),action:{label:(0,g.Tl)("Enable"),href:"#require-api-key"}}),(!el||!ea)&&(0,s.jsx)(y,{message:el?(0,g.Tl)("No dashboard password is set — set one on the Settings page."):(0,g.Tl)("Require login is disabled — anyone can access your dashboard via tunnel."),action:{label:el?(0,g.Tl)("Change password"):(0,g.Tl)("Enable"),href:"/dashboard/profile"}})]}),(ed||e$)&&(0,s.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,s.jsx)(i.lM,{checked:er,onChange:()=>ty(!er)}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("p",{className:"font-medium text-sm",children:(0,g.Tl)("Allow dashboard access via tunnel")}),(0,s.jsx)(p,{text:(0,g.Tl)("When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked.")})]})]})]}),(0,s.jsxs)(i.Zp,{id:"require-api-key",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),(0,g.Tl)("API Keys")]}),(0,s.jsx)(i.$n,{icon:"add",onClick:()=>w(!0),children:(0,g.Tl)("Create Key")})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:(0,g.Tl)("Require API key")}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:(0,g.Tl)("Requests without a valid key will be rejected")})]}),(0,s.jsx)(i.lM,{checked:B,onChange:e=>{e?tg(!0):z({title:(0,g.Tl)("Disable API key requirement?"),message:(0,g.Tl)("Requests without a valid key will be accepted while this is off. You can re-enable it at any time."),onConfirm:()=>tg(!1)})}})]}),ti&&!B&&(0,s.jsx)("div",{className:"mb-4 -mt-2",children:(0,s.jsx)(y,{message:(0,g.Tl)("Endpoint is exposed without an API key.")})}),(0,s.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:(0,g.Tl)("Daily token limits")}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:(0,g.Tl)("Master switch for the per-key daily token caps. Turning this off stops enforcement but keeps every key's configured limit.")})]}),(0,s.jsx)(i.lM,{checked:J,onChange:tb})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 mb-4 border-b border-border gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("p",{className:"font-medium flex items-center gap-2",children:[(0,g.Tl)("Key secret rotation"),(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 dark:text-amber-400",children:(0,g.Tl)("Experimental")})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted truncate",children:(0,g.Tl)("Sign new keys with an auto-generated secret instead of the built-in one")})]}),(0,s.jsx)(p,{text:(0,g.Tl)("When enabled, the HMAC secret used for API key CRC is auto-generated to the data directory (api-key-secret, mode 0600) — or set API_KEY_SECRET to pin your own (env always wins). Existing keys keep working only if they were issued under the same secret; enabling invalidates previously issued keys, and Re-issue all keys re-creates every stored key under the current secret so clients can be updated in one step.")})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[Q&&(0,s.jsx)(i.$n,{size:"xs",onClick:()=>z({title:(0,g.Tl)("Re-issue all API keys?"),message:(0,g.Tl)("Every existing key will be replaced with a new one signed under the current secret. All clients using old keys will stop working until updated. This cannot be undone."),onConfirm:tj}),disabled:Z,children:Z?(0,g.Tl)("Rotating…"):(0,g.Tl)("Rotate all")}),(0,s.jsx)(i.lM,{checked:Q,onChange:e=>{e?z({title:(0,g.Tl)("Enable key secret rotation?"),message:(0,g.Tl)("New keys will be signed with an auto-generated secret. Keys issued BEFORE enabling will stop validating and cannot be restored — re-create them and update every client. This cannot be undone silently."),onConfirm:()=>tf(!0)}):z({title:(0,g.Tl)("Disable key secret rotation?"),message:(0,g.Tl)("New keys will be signed with the built-in secret again. Keys issued while rotation was enabled will stop validating — re-create them and update every client."),onConfirm:()=>tf(!1)})}})]})]}),0===t.length?(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,s.jsx)("p",{className:"text-text-main font-medium mb-1",children:(0,g.Tl)("No API keys yet")}),(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:(0,g.Tl)("Create your first API key to get started")}),(0,s.jsx)(i.$n,{icon:"add",onClick:()=>w(!0),children:(0,g.Tl)("Create Key")})]}):(0,s.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,s.jsxs)("div",{className:`group flex flex-col sm:flex-row sm:items-center justify-between py-3 gap-2 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:f(e.name)}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono",children:tn.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,s.jsx)("button",{onClick:()=>{var t;return t=e.id,void tr(e=>{let l=new Set(e);return l.has(t)?l.delete(t):l.add(t),l})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:tn.has(e.id)?(0,g.Tl)("Hide key"):(0,g.Tl)("Show key"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:tn.has(e.id)?"visibility_off":"visibility"})}),(0,s.jsx)("button",{onClick:()=>td(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:tc===e.id?"check":"content_copy"})})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:[(0,g.Tl)("Created")," ",new Date(e.createdAt).toLocaleDateString()]}),e.dailyTokenLimit?(0,s.jsxs)("p",{className:`text-xs mt-1 ${(e.todayTokens||0)>=e.dailyTokenLimit?"text-red-500":"text-text-muted"}`,children:[(0,g.Tl)("Today"),": ",b(e.todayTokens||0)," / ",b(e.dailyTokenLimit)," ",(0,g.Tl)("tokens"),(e.todayTokens||0)>=e.dailyTokenLimit?` — ${(0,g.Tl)("Limit reached")}`:""]}):null,e.allowedModels?.length||e.allowedCombos?.length?(0,s.jsxs)("p",{className:"text-xs text-primary mt-1 flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"tune"}),(0,g.Tl)("Allowed"),": ",[e.allowedModels?.length?`${e.allowedModels.length} ${(0,g.Tl)("models")}`:null,e.allowedCombos?.length?`${e.allowedCombos.length} ${(0,g.Tl)("combos")}`:null].filter(Boolean).join(" \xb7 ")]}):null,!1===e.isActive&&(0,s.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:(0,g.Tl)("Paused")})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 self-end sm:self-auto shrink-0",children:[(0,s.jsx)("button",{onClick:()=>{R(e),D(e.allowedModels?.join("\n")||""),I(e.allowedCombos?.join("\n")||"")},className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:(0,g.Tl)("Allowed Models & Combos"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"})}),(0,s.jsx)("button",{onClick:()=>{$(e),_(e.dailyTokenLimit?String(e.dailyTokenLimit):"")},className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:(0,g.Tl)("Edit Daily Token Limit"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.dailyTokenLimit?"edit_calendar":"calendar_month"})}),(0,s.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?z({title:(0,g.Tl)("Pause API Key"),message:`${(0,g.Tl)("Pause API key")} "${e.name}"?
2
-
3
- ${(0,g.Tl)("This key will stop working immediately but can be resumed later.")}`,onConfirm:async()=>{z(null),tI(e.id,t)}}):tI(e.id,t)},title:e.isActive?(0,g.Tl)("Pause key"):(0,g.Tl)("Resume key")}),(0,s.jsx)("button",{onClick:()=>tF(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,s.jsx)(i.aF,{isOpen:k,title:(0,g.Tl)("Create API Key"),onClose:()=>{w(!1),v(""),C("")},children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(i.pd,{label:(0,g.Tl)("Key Name"),value:T,onChange:e=>v(e.target.value),placeholder:(0,g.Tl)("Production Key")}),(0,s.jsx)(i.pd,{label:(0,g.Tl)("Daily Token Limit"),type:"number",min:"0",value:N,onChange:e=>C(e.target.value),placeholder:(0,g.Tl)("e.g. 100000000 — empty means unlimited")}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:tR,fullWidth:!0,disabled:!T.trim(),children:(0,g.Tl)("Create")}),(0,s.jsx)(i.$n,{onClick:()=>{w(!1),v(""),C("")},variant:"ghost",fullWidth:!0,children:(0,g.Tl)("Cancel")})]})]})}),(0,s.jsx)(i.aF,{isOpen:!!S,title:`${(0,g.Tl)("Edit Daily Token Limit")}${S?` — ${f(S.name)}`:""}`,onClose:()=>$(null),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(i.pd,{label:(0,g.Tl)("Daily Token Limit"),type:"number",min:"0",value:E,onChange:e=>_(e.target.value),placeholder:(0,g.Tl)("e.g. 100000000 — empty means unlimited"),hint:(0,g.Tl)("Leave empty to remove the limit.")}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:tO,fullWidth:!0,disabled:P,children:(0,g.Tl)("Save")}),(0,s.jsx)(i.$n,{onClick:()=>$(null),variant:"ghost",fullWidth:!0,children:(0,g.Tl)("Cancel")})]})]})}),(0,s.jsx)(i.aF,{isOpen:!!L,title:`${(0,g.Tl)("Allowed Models & Combos")}${L?` — ${f(L.name)}`:""}`,onClose:()=>R(null),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,g.Tl)("Restrict this key to specific models or combos. Leave empty for unrestricted access.")}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-text-muted",children:(0,g.Tl)("Allowed Models (one per line or comma-separated)")}),(0,s.jsx)("textarea",{rows:4,value:O,onChange:e=>D(e.target.value),placeholder:"claude-3-5-sonnet, gpt-4o, anthropic/*",className:"w-full text-xs font-mono p-2.5 rounded-lg border border-border bg-surface-2 focus:outline-none focus:border-primary resize-y"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-text-muted",children:(0,g.Tl)("Allowed Combos (one per line or comma-separated)")}),(0,s.jsx)("textarea",{rows:3,value:F,onChange:e=>I(e.target.value),placeholder:"smart-coding, fallback-claude",className:"w-full text-xs font-mono p-2.5 rounded-lg border border-border bg-surface-2 focus:outline-none focus:border-primary resize-y"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:tD,fullWidth:!0,disabled:U,children:(0,g.Tl)("Save")}),(0,s.jsx)(i.$n,{onClick:()=>R(null),variant:"ghost",fullWidth:!0,children:(0,g.Tl)("Cancel")})]})]})}),(0,s.jsx)(i.aF,{isOpen:!!ee,title:(0,g.Tl)("Keys Re-issued"),onClose:()=>et(null),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:(0,g.Tl)("Save these keys now — shown only once")}),(0,s.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:(0,g.Tl)("Old keys no longer work. Update every client with the new values below.")})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2 max-h-72 overflow-y-auto",children:(ee?.rotated||[]).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-xs font-medium text-text-muted",children:f(e.name)}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.pd,{value:e.key,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,s.jsx)(i.$n,{variant:"secondary",icon:tc===`rot_${e.id}`?"check":"content_copy",onClick:()=>td(e.key,`rot_${e.id}`),children:tc===`rot_${e.id}`?"Copied!":"Copy"})]})]},e.id))}),(0,s.jsx)(i.$n,{onClick:()=>et(null),fullWidth:!0,children:(0,g.Tl)("Done")})]})}),(0,s.jsx)(i.aF,{isOpen:!!K,title:(0,g.Tl)("API Key Created"),onClose:()=>q(null),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:(0,g.Tl)("Save this key now!")}),(0,s.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:(0,g.Tl)("This is the only time you will see this key. Store it securely.")})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.pd,{value:K||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,s.jsx)(i.$n,{variant:"secondary",icon:"created_key"===tc?"check":"content_copy",onClick:()=>td(K,"created_key"),children:"created_key"===tc?(0,g.Tl)("Copied!"):(0,g.Tl)("Copy")})]}),(0,s.jsx)(i.$n,{onClick:()=>q(null),fullWidth:!0,children:(0,g.Tl)("Done")})]})}),(0,s.jsx)(i.aF,{isOpen:ev,title:(0,g.Tl)("Enable Tunnel"),onClose:()=>eN(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:(0,g.Tl)("Cloudflare Tunnel")}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:(0,g.Tl)("Expose your local 10Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere.")})]})]})}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.oX.map(e=>(0,s.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,s.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,g.Tl)("Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s.")}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:tT,fullWidth:!0,children:(0,g.Tl)("Start Tunnel")}),(0,s.jsx)(i.$n,{onClick:()=>eN(!1),variant:"ghost",fullWidth:!0,children:(0,g.Tl)("Cancel")})]})]})}),(0,s.jsx)(i.aF,{isOpen:eC,title:(0,g.Tl)("Disable Tunnel"),onClose:()=>!eb&&eS(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:(0,g.Tl)("The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working.")}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:tv,fullWidth:!0,disabled:eb,variant:"danger",children:eb?"Disabling...":"Disable"}),(0,s.jsx)(i.$n,{onClick:()=>eS(!1),variant:"ghost",fullWidth:!0,disabled:eb,children:(0,g.Tl)("Cancel")})]})]})}),(0,s.jsx)(i.aF,{isOpen:e0,title:(0,g.Tl)("Tailscale Funnel"),onClose:()=>{eH||(e1(!1),eZ(""),eU(null))},children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ez&&(0,s.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),(0,g.Tl)("Checking...")]}),!1===ez&&!eH&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:tC,fullWidth:!0,children:(0,g.Tl)("Install Tailscale")}),(0,s.jsx)(i.$n,{onClick:()=>e1(!1),variant:"ghost",fullWidth:!0,children:(0,g.Tl)("Cancel")})]})]}),eH&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eY.length>0&&(0,s.jsx)("div",{ref:e4,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eY.map((e,t)=>(0,s.jsx)("div",{children:e},t))})]}),!0===ez&&!eH&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:()=>t_(),fullWidth:!0,children:(0,g.Tl)("Connect")}),(0,s.jsx)(i.$n,{onClick:()=>e1(!1),variant:"ghost",fullWidth:!0,children:(0,g.Tl)("Cancel")})]})]}),eI&&(0,s.jsx)(h,{status:eI})]})}),(0,s.jsx)(i.aF,{isOpen:e5,title:(0,g.Tl)("Disable Tailscale"),onClose:()=>!eR&&e2(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:tA,fullWidth:!0,disabled:eR,variant:"danger",children:eR?"Disabling...":"Disable"}),(0,s.jsx)(i.$n,{onClick:()=>e2(!1),variant:"ghost",fullWidth:!0,disabled:eR,children:(0,g.Tl)("Cancel")})]})]})}),(0,s.jsx)(i.uo,{isOpen:!!M,onClose:()=>z(null),onConfirm:()=>{let e=M?.onConfirm;z(null),e?.()},title:M?.title||"Confirm",message:M?.message,variant:"danger"})]})}j.propTypes={machineId:r().string.isRequired}},51243:(e,t,l)=>{Promise.resolve().then(l.bind(l,20242))}}]);