@rabbi696/ezrouter 0.5.73 → 0.5.75

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 (675) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +12 -12
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  97. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  98. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  100. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  128. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +3 -3
  138. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +3 -3
  187. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  204. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/usage/stream/route.js +3 -3
  303. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  353. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  355. package/app/.next-cli-build/server/app/callback.html +1 -1
  356. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  357. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  358. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  359. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  360. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  361. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  364. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  365. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  366. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  369. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  370. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  371. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  372. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  374. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  375. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  376. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  379. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  380. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  382. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  385. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  389. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  390. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  392. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
  395. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  396. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  399. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
  400. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
  402. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  405. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  406. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  409. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  410. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  412. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  415. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  416. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  420. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  421. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  423. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  426. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  431. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  433. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  436. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  441. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  443. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  446. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  452. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  454. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  457. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  462. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  464. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  467. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  472. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  474. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  477. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  482. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  484. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  487. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  488. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  492. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  494. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
  497. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  499. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
  502. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
  504. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  509. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  510. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  511. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  513. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  520. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  521. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  525. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  527. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  530. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  531. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  535. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  537. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  540. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  541. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  545. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  547. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  550. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  551. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  555. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  556. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  557. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  559. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  560. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  561. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  564. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  566. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  568. package/app/.next-cli-build/server/app/index.html +1 -1
  569. package/app/.next-cli-build/server/app/index.rsc +3 -3
  570. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  571. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  572. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  574. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  576. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  577. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  578. package/app/.next-cli-build/server/app/landing.html +1 -1
  579. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  580. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  581. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  583. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  585. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/login/page.js +1 -1
  587. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  588. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  589. package/app/.next-cli-build/server/app/login.html +1 -1
  590. package/app/.next-cli-build/server/app/login.rsc +4 -4
  591. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  592. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  594. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  595. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  596. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  598. package/app/.next-cli-build/server/app/page.js +1 -1
  599. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  600. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  601. package/app/.next-cli-build/server/app-paths-manifest.json +12 -12
  602. package/app/.next-cli-build/server/chunks/1329.js +1 -1
  603. package/app/.next-cli-build/server/chunks/1531.js +1 -1
  604. package/app/.next-cli-build/server/chunks/1770.js +1 -1
  605. package/app/.next-cli-build/server/chunks/2236.js +300 -0
  606. package/app/.next-cli-build/server/chunks/2547.js +7 -7
  607. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  608. package/app/.next-cli-build/server/chunks/369.js +30 -24
  609. package/app/.next-cli-build/server/chunks/3814.js +2 -2
  610. package/app/.next-cli-build/server/chunks/3904.js +1 -1
  611. package/app/.next-cli-build/server/chunks/399.js +1 -0
  612. package/app/.next-cli-build/server/chunks/{2391.js → 4013.js} +1 -1
  613. package/app/.next-cli-build/server/chunks/412.js +1 -1
  614. package/app/.next-cli-build/server/chunks/476.js +1 -0
  615. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  616. package/app/.next-cli-build/server/chunks/5296.js +1 -0
  617. package/app/.next-cli-build/server/chunks/5315.js +1 -1
  618. package/app/.next-cli-build/server/chunks/5345.js +1 -1
  619. package/app/.next-cli-build/server/chunks/5502.js +1 -1
  620. package/app/.next-cli-build/server/chunks/5767.js +1 -1
  621. package/app/.next-cli-build/server/chunks/5841.js +1 -1
  622. package/app/.next-cli-build/server/chunks/6252.js +1 -1
  623. package/app/.next-cli-build/server/chunks/6606.js +1 -1
  624. package/app/.next-cli-build/server/chunks/6982.js +1 -1
  625. package/app/.next-cli-build/server/chunks/7302.js +4 -4
  626. package/app/.next-cli-build/server/chunks/7335.js +1 -1
  627. package/app/.next-cli-build/server/chunks/7353.js +1 -1
  628. package/app/.next-cli-build/server/chunks/7591.js +1 -1
  629. package/app/.next-cli-build/server/chunks/7726.js +1 -1
  630. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  631. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  632. package/app/.next-cli-build/server/chunks/8002.js +1 -1
  633. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  634. package/app/.next-cli-build/server/chunks/8243.js +3 -3
  635. package/app/.next-cli-build/server/chunks/8421.js +1 -1
  636. package/app/.next-cli-build/server/chunks/8658.js +1 -0
  637. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  638. package/app/.next-cli-build/server/chunks/915.js +1 -1
  639. package/app/.next-cli-build/server/chunks/921.js +1 -1
  640. package/app/.next-cli-build/server/chunks/9212.js +1 -1
  641. package/app/.next-cli-build/server/chunks/9217.js +1 -1
  642. package/app/.next-cli-build/server/chunks/9356.js +13 -13
  643. package/app/.next-cli-build/server/chunks/9489.js +1 -1
  644. package/app/.next-cli-build/server/chunks/9573.js +1 -1
  645. package/app/.next-cli-build/server/chunks/9998.js +2 -0
  646. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  647. package/app/.next-cli-build/server/middleware.js +1 -1
  648. package/app/.next-cli-build/server/pages/404.html +1 -1
  649. package/app/.next-cli-build/server/pages/500.html +1 -1
  650. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  651. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  652. package/app/.next-cli-build/static/chunks/{1321-0b5b745194dd8287.js → 1321-49d1935ccfa63e5b.js} +1 -1
  653. package/app/.next-cli-build/static/chunks/316-60e8ba3cfa73b4f9.js +1 -0
  654. package/app/.next-cli-build/static/chunks/{5497-b8180f32d8b8d12d.js → 5497-acc549e1dfb9fdba.js} +3 -3
  655. package/app/.next-cli-build/static/chunks/8105-82276794a3ebab29.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-f767dcc53bb237c6.js → page-965c6b2d338bdcb3.js} +4 -4
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-0453d0891ec1b63a.js +1 -0
  658. package/app/CHANGELOG.md +34 -1
  659. package/app/package.json +1 -1
  660. package/app/public/CHANGELOG.md +34 -1
  661. package/app/src/lib/db/adapters/sqljsAdapter.js +44 -1
  662. package/hooks/sqliteRuntime.js +8 -9
  663. package/package.json +1 -1
  664. package/app/.next-cli-build/server/chunks/1260.js +0 -1
  665. package/app/.next-cli-build/server/chunks/3016.js +0 -1
  666. package/app/.next-cli-build/server/chunks/4293.js +0 -1
  667. package/app/.next-cli-build/server/chunks/4843.js +0 -1
  668. package/app/.next-cli-build/server/chunks/7889.js +0 -1
  669. package/app/.next-cli-build/server/chunks/8327.js +0 -300
  670. package/app/.next-cli-build/server/chunks/9055.js +0 -2
  671. package/app/.next-cli-build/static/chunks/316-338292ed1e0e0c2d.js +0 -1
  672. package/app/.next-cli-build/static/chunks/8105-b31a40db8aab725b.js +0 -1
  673. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-40b649726913b166.js +0 -1
  674. /package/app/.next-cli-build/static/{Z40GVayXuBZ9gdYf-v3w6 → 2-U8p0TTru7jjf9f4QMVz}/_buildManifest.js +0 -0
  675. /package/app/.next-cli-build/static/{Z40GVayXuBZ9gdYf-v3w6 → 2-U8p0TTru7jjf9f4QMVz}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- exports.id=9212,exports.ids=[9212],exports.modules={16329:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(16329);async function m(){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","ezrouter"):f().join(j().homedir(),".ezrouter"),"mitm",".mitm.pid");if(!h().existsSync(a))return;let b=parseInt(h().readFileSync(a,"utf8").trim(),10);if(!b)return;if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}try{h().unlinkSync(a)}catch{}}catch{}}();let a=function(){let a=[];if("win32"===process.platform){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(b=>{let c=b.toLowerCase();if(c.includes("9router")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=b.match(/^"(\d+)"/);c&&c[1]&&c[1]!==process.pid.toString()&&a.push(c[1])}})}catch{}for(let b of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${b} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(b=>{let c=b.trim();c&&!isNaN(c)&&a.push(c)})}catch{}}else try{(0,d.execSync)("ps aux 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").forEach(b=>{if(b.includes("9router")||b.includes("next-server")||b.includes("cloudflared")||b.includes("/bin/app/")||b.includes("tray_darwin")||b.includes("tray_linux")){let c=b.trim().split(/\s+/)[1];c&&!isNaN(c)&&c!==process.pid.toString()&&a.push(c)}})}catch{}return a}(),b=process.platform;a.forEach(a=>{try{"win32"===b?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),a.length>0&&await new Promise(a=>setTimeout(a,1500))}function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"ezrouter"):f().join(j().homedir(),".ezrouter"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--skip-update"];(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,UPDATER_PKG_NAME:a,UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:String(process.env.PORT||k.h0.appPort),UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(g)}}).unref(),setTimeout(()=>(0,l.Om)(0),k.h0.exitDelayMs)}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{"use strict";a.exports={rE:"0.5.73"}},60290:(a,b,c)=>{"use strict";c.d(b,{C8:()=>t,DR:()=>s,IK:()=>m,Ps:()=>h,Qn:()=>q,SA:()=>p,UH:()=>k,Uc:()=>n,Ur:()=>g,Z1:()=>j,cI:()=>r,eo:()=>o,gx:()=>d,pH:()=>l,v1:()=>e,xM:()=>i}),c(87252);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,PAYLOAD_TOO_LARGE:413,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,sessionAffinityMaxSize:5e3,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}function g(){return{firstActionTimeoutMs:f("COMBO_RESPONSE_FIRST_ACTION_TIMEOUT_MS",5e3),maxBytes:f("COMBO_RESPONSE_PREFLIGHT_MAX_BYTES",65536)}}let h=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",i=f("STREAM_STALL_TIMEOUT_MS",36e4),j=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",2e5),k=(()=>{let a=process.env.SSE_KEEPALIVE_MS;if(null==a||""===a)return 1e4;let b=parseInt(a,10);return Number.isFinite(b)&&b>=0?b:1e4})(),l=f("FETCH_CONNECT_TIMEOUT_MS",6e4);f("RESPONSE_BODY_TIMEOUT_MS",3e5);let m=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),n=64e3,o=32e3,p="x-9router-token-saver",q={maxTokenLength:160,maxAttempts:32,headers:{requestedModel:"X-9Router-Requested-Model",routePath:"X-9Router-Route-Path",resolvedProvider:"X-9Router-Resolved-Provider",resolvedModel:"X-9Router-Resolved-Model",fallbackCount:"X-9Router-Fallback-Count",attemptedModels:"X-9Router-Attempted-Models"}},r={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function s(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let t=["Please write a 5-10 word title for the following conversation:"]},78335:()=>{},87252:(a,b,c)=>{"use strict";c.d(b,{Dp:()=>g,EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},413:{type:"invalid_request_error",code:"context_length_exceeded"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",413:"Your input exceeds the context window of this model",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:18e5,maxLevel:15},g=42e4,h=26784e5,i=[{text:"monthly_request_count",cooldownMs:216e5},{text:"monthly limit",cooldownMs:216e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:413,fallback:!1},{status:429,backoff:!0}]},96487:()=>{}};
1
+ exports.id=9212,exports.ids=[9212],exports.modules={16329:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},21719:(a,b,c)=>{"use strict";c.d(b,{g:()=>n,l:()=>m});var d=c(79646),e=c(33873),f=c.n(e),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(30869),l=c(16329);async function m(){!function(){try{let a=f().join("win32"===process.platform?f().join(process.env.APPDATA||"","ezrouter"):f().join(j().homedir(),".ezrouter"),"mitm",".mitm.pid");if(!h().existsSync(a))return;let b=parseInt(h().readFileSync(a,"utf8").trim(),10);if(!b)return;if("win32"===process.platform)try{(0,d.execSync)(`taskkill /F /T /PID ${b}`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{try{(0,d.execSync)(`powershell -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Id ${b} -Force"`,{stdio:"ignore",windowsHide:!0,timeout:3e3})}catch{}}else try{(0,d.execSync)(`sudo -n kill -9 ${b} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{try{process.kill(b,"SIGKILL")}catch{}}try{h().unlinkSync(a)}catch{}}catch{}}();let a=function(){let a=[];if("win32"===process.platform){try{(0,d.execSync)('powershell -NonInteractive -WindowStyle Hidden -Command "Get-WmiObject Win32_Process -Filter \'Name=\\"node.exe\\"\' | Select-Object ProcessId,CommandLine | ConvertTo-Csv -NoTypeInformation"',{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").slice(1).filter(a=>a.trim()).forEach(b=>{let c=b.toLowerCase();if(c.includes("9router")||c.includes("next-server")||c.includes("\\bin\\app\\")||c.includes("/bin/app/")||c.includes("cli.js")){let c=b.match(/^"(\d+)"/);c&&c[1]&&c[1]!==process.pid.toString()&&a.push(c[1])}})}catch{}for(let b of["cloudflared","tray_windows_release"])try{let c=`powershell -NonInteractive -WindowStyle Hidden -Command "Get-Process ${b} -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"`;(0,d.execSync)(c,{encoding:"utf8",windowsHide:!0,timeout:5e3}).split("\n").forEach(b=>{let c=b.trim();c&&!isNaN(c)&&a.push(c)})}catch{}}else try{(0,d.execSync)("ps aux 2>/dev/null",{encoding:"utf8",timeout:5e3}).split("\n").forEach(b=>{if(b.includes("9router")||b.includes("next-server")||b.includes("cloudflared")||b.includes("/bin/app/")||b.includes("tray_darwin")||b.includes("tray_linux")){let c=b.trim().split(/\s+/)[1];c&&!isNaN(c)&&c!==process.pid.toString()&&a.push(c)}})}catch{}return a}(),b=process.platform;a.forEach(a=>{try{"win32"===b?(0,d.execSync)(`taskkill /F /PID ${a} 2>nul`,{stdio:"ignore",shell:!0,windowsHide:!0,timeout:3e3}):(0,d.execSync)(`kill -9 ${a} 2>/dev/null`,{stdio:"ignore",timeout:3e3})}catch{}}),a.length>0&&await new Promise(a=>setTimeout(a,1500))}function n(a=k.h0.npmPackageName){let b=function(a){try{if(!a||!h().existsSync(a))return a;let b=f().join(process.env.DATA_DIR?process.env.DATA_DIR:"win32"===process.platform?f().join(process.env.APPDATA||f().join(j().homedir(),"AppData","Roaming"),"ezrouter"):f().join(j().homedir(),".ezrouter"),"runtime","updater"),c=f().join(b,"updater.js");if(h().existsSync(c))try{if(h().statSync(a).size===h().statSync(c).size)return c}catch{}return h().mkdirSync(b,{recursive:!0}),h().copyFileSync(a,c),c}catch{return a}}(function(){if(process.env.UPDATER_SCRIPT_PATH&&h().existsSync(process.env.UPDATER_SCRIPT_PATH))return process.env.UPDATER_SCRIPT_PATH;let a=f().join(process.cwd(),"src","lib","updater","updater.js");if(h().existsSync(a))return a;let b=f().join(process.cwd(),"..","src","lib","updater","updater.js");return h().existsSync(b)?b:a}()),c="1"===process.env.TRAY_MODE,e={cmd:"win32"===process.platform?"npx.cmd":"npx",args:[k.h0.npmPackageName]},g=c?[...e.args,"--tray","--skip-update"]:[...e.args,"--skip-update"];(0,d.spawn)(process.execPath,[b],{detached:!0,stdio:"ignore",windowsHide:!0,env:{...process.env,UPDATER_PKG_NAME:a,UPDATER_PORT:String(k.h0.statusPort),UPDATER_TAIL_LINES:String(k.h0.statusLogTailLines),UPDATER_RETRIES:String(k.h0.installRetries),UPDATER_RETRY_DELAY_MS:String(k.h0.installRetryDelayMs),UPDATER_LINGER_MS:String(k.h0.lingerAfterDoneMs),UPDATER_WAIT_MIN_MS:String(k.h0.waitForExitMinMs),UPDATER_WAIT_MAX_MS:String(k.h0.waitForExitMaxMs),UPDATER_WAIT_CHECK_MS:String(k.h0.waitForExitCheckMs),UPDATER_APP_PORT:String(process.env.PORT||k.h0.appPort),UPDATER_RELAUNCH:"1",UPDATER_RELAUNCH_CMD:e.cmd,UPDATER_RELAUNCH_ARGS:JSON.stringify(g)}}).unref(),setTimeout(()=>(0,l.Om)(0),k.h0.exitDelayMs)}},30869:(a,b,c)=>{"use strict";c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rabbi696/ezrouter",installCmd:"npm i -g @rabbi696/ezrouter",installCmdLatest:"npm i -g @rabbi696/ezrouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20126},h={maxLines:200,pollIntervalMs:1e3,streamTimeoutMs:5e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingInactiveSession:!0,inactiveMinPingIntervalMs:18e6,pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},39006:a=>{"use strict";a.exports={rE:"0.5.75"}},60290:(a,b,c)=>{"use strict";c.d(b,{C8:()=>t,DR:()=>s,IK:()=>m,Ps:()=>h,Qn:()=>q,SA:()=>p,UH:()=>k,Uc:()=>n,Ur:()=>g,Z1:()=>j,cI:()=>r,eo:()=>o,gx:()=>d,pH:()=>l,v1:()=>e,xM:()=>i}),c(87252);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,PAYLOAD_TOO_LARGE:413,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,sessionAffinityMaxSize:5e3,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20};function f(a,b){let c=process.env[a];if(null==c||""===c)return b;let d=parseInt(c,10);return Number.isFinite(d)&&d>0?d:b}function g(){return{firstActionTimeoutMs:f("COMBO_RESPONSE_FIRST_ACTION_TIMEOUT_MS",5e3),maxBytes:f("COMBO_RESPONSE_PREFLIGHT_MAX_BYTES",65536)}}let h=process.env.SEARXNG_URL?.trim()||"http://localhost:8888/search",i=f("STREAM_STALL_TIMEOUT_MS",36e4),j=f("STREAM_FIRST_CHUNK_TIMEOUT_MS",2e5),k=(()=>{let a=process.env.SSE_KEEPALIVE_MS;if(null==a||""===a)return 1e4;let b=parseInt(a,10);return Number.isFinite(b)&&b>=0?b:1e4})(),l=f("FETCH_CONNECT_TIMEOUT_MS",6e4);f("RESPONSE_BODY_TIMEOUT_MS",3e5);let m=f("GEMINI_NATIVE_TTS_FETCH_TIMEOUT_MS",45e3),n=64e3,o=32e3,p="x-9router-token-saver",q={maxTokenLength:160,maxAttempts:32,headers:{requestedModel:"X-9Router-Requested-Model",routePath:"X-9Router-Route-Path",resolvedProvider:"X-9Router-Resolved-Provider",resolvedModel:"X-9Router-Resolved-Model",fallbackCount:"X-9Router-Fallback-Count",attemptedModels:"X-9Router-Attempted-Models"}},r={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function s(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let t=["Please write a 5-10 word title for the following conversation:"]},78335:()=>{},87252:(a,b,c)=>{"use strict";c.d(b,{Dp:()=>g,EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},413:{type:"invalid_request_error",code:"context_length_exceeded"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",413:"Your input exceeds the context window of this model",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:18e5,maxLevel:15},g=42e4,h=26784e5,i=[{text:"monthly_request_count",cooldownMs:216e5},{text:"monthly limit",cooldownMs:216e5},{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:413,fallback:!1},{status:429,backoff:!0}]},96487:()=>{}};
@@ -1 +1 @@
1
- "use strict";exports.id=9217,exports.ids=[9217],exports.modules={9217:(a,b,c)=>{c.d(b,{exchangeTokens:()=>p,fetchKiroProfileArn:()=>l}),c(68327);var d=c(55511),e=c.n(d);c(25467);var f=c(13073),g=c(25482);function h(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 i(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 j(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 k(a){let b=j(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function l(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}}let m=null;async function n(){if(m)return m;try{let a=await fetch(g.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return m={authorizeUrl:h(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:h(b.token_endpoint,"token_endpoint")}}}catch{}return m={authorizeUrl:g.oT.authorizeUrl,tokenUrl:g.oT.tokenUrl}}let o={claude:{config:f.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})},codex:{config:f.DI,flowType:"authorization_code_pkce",fixedPort:f.DI.fixedPort,callbackPath:f.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=function(a){let b=j(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}}(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||k(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},xai:{config:g.oT,flowType:"authorization_code_pkce",fixedPort:g.oT.loopbackPort,callbackPath:g.oT.callbackPath,pkceVerifierBytes:g.Ue,prepareConfig:async a=>{let b=await n();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=i(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}},"grok-cli":{config:f.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-version":"0.2.93"}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=i(a.id_token)||k(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,f=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:f,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}}}},"frontier-for-all":{config:f.V1,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.scope})});if(!b.ok){let a=await b.text();throw Error(`Frontier device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.deviceTokenUrl||a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch(f.V1.modelsUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json"}});if(b.ok){let a=await b.json();return{model:a?.data?.[0]||null}}}catch{}return{model:null}},mapTokens:(a,b)=>{let c=b?.model||null,d=c?.frontier||{};return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null,scope:a.scope,displayName:c?.id?`Frontier — ${c.id}`:void 0,providerSpecificData:{authMethod:"device_code",resolvedModel:c?.id||null,upstreamProvider:d.provider||null,eligible:d.eligible??null}}}},"gemini-cli":{config:f.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(`${f.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";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,f.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},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})},antigravity:{config:f.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":f.YT.loadCodeAssistUserAgent,"X-Goog-Api-Client":f.YT.loadCodeAssistApiClient,"Client-Metadata":f.YT.loadCodeAssistClientMetadata,"x-request-source":"local"},c=(0,f.cD)(),d=await fetch(`${f.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),e=d.ok?await d.json():{},g="",h="legacy-tier";try{let a=await fetch(f.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(f.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:e,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})},iflow:{config:f.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(`${f.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 d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},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})},qoder:{config:f.hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),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(5345).then(c.bind(c,37726)),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||""}}}},qwen:{config:f.Hp,flowType:"device_code",requestDeviceCode:async(a,b)=>{let c=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.scope,code_challenge:b,code_challenge_method:a.codeChallengeMethod})});if(!c.ok){let a=await c.text();throw Error(`Device code request failed: ${a}`)}return await c.json()},pollToken: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:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b,code_verifier:c})});return{ok:d.ok,data:await d.json()}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{resourceUrl:a.resource_url}})},github:{config:f.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(f.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(f.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.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}})},kiro:{config:f.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,f.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${d}.amazonaws.com/client/register`,i=`https://oidc.${d}.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:e})});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:d,_authMethod:g,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,g=d?._region||"us-east-1";(0,f.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:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await i.json()}catch(a){e={error:"invalid_response",error_description:await i.text()}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=k(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||f.Tx.startUrl}}}},cursor:{config:f.WN,flowType:"authorization_code_pkce",buildAuthUrl:()=>null,mapTokens:a=>a},kimi:{config:f.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),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,10793)),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}:{}}})},kilocode:{config:f.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}}:{}})},cline:{config:f.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}})},clinepass:{config:f.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}})},gitlab:{config:f.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"}})},"codebuddy-cn":{config:f.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:{}})},kimchi:{config:f.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}}}}};async function p(a,b,c,d,e,f){let g=function(a){let b=o["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(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)}}};
1
+ "use strict";exports.id=9217,exports.ids=[9217],exports.modules={9217:(a,b,c)=>{c.d(b,{exchangeTokens:()=>p,fetchKiroProfileArn:()=>l}),c(42236);var d=c(55511),e=c.n(d);c(25467);var f=c(13073),g=c(25482);function h(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 i(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 j(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 k(a){let b=j(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function l(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}}let m=null;async function n(){if(m)return m;try{let a=await fetch(g.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return m={authorizeUrl:h(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:h(b.token_endpoint,"token_endpoint")}}}catch{}return m={authorizeUrl:g.oT.authorizeUrl,tokenUrl:g.oT.tokenUrl}}let o={claude:{config:f.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})},codex:{config:f.DI,flowType:"authorization_code_pkce",fixedPort:f.DI.fixedPort,callbackPath:f.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=function(a){let b=j(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}}(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||k(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},xai:{config:g.oT,flowType:"authorization_code_pkce",fixedPort:g.oT.loopbackPort,callbackPath:g.oT.callbackPath,pkceVerifierBytes:g.Ue,prepareConfig:async a=>{let b=await n();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=i(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}},"grok-cli":{config:f.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-version":"0.2.93"}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=i(a.id_token)||k(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,f=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:f,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}}}},"frontier-for-all":{config:f.V1,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.scope})});if(!b.ok){let a=await b.text();throw Error(`Frontier device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.deviceTokenUrl||a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{c={error:"invalid_response",error_description:await d.text()}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch(f.V1.modelsUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json"}});if(b.ok){let a=await b.json();return{model:a?.data?.[0]||null}}}catch{}return{model:null}},mapTokens:(a,b)=>{let c=b?.model||null,d=c?.frontier||{};return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null,scope:a.scope,displayName:c?.id?`Frontier — ${c.id}`:void 0,providerSpecificData:{authMethod:"device_code",resolvedModel:c?.id||null,upstreamProvider:d.provider||null,eligible:d.eligible??null}}}},"gemini-cli":{config:f.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(`${f.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";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,f.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},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})},antigravity:{config:f.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":f.YT.loadCodeAssistUserAgent,"X-Goog-Api-Client":f.YT.loadCodeAssistApiClient,"Client-Metadata":f.YT.loadCodeAssistClientMetadata,"x-request-source":"local"},c=(0,f.cD)(),d=await fetch(`${f.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),e=d.ok?await d.json():{},g="",h="legacy-tier";try{let a=await fetch(f.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(f.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:e,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})},iflow:{config:f.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(`${f.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 d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},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})},qoder:{config:f.hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(5345).then(c.bind(c,37726)),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(5345).then(c.bind(c,37726)),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||""}}}},qwen:{config:f.Hp,flowType:"device_code",requestDeviceCode:async(a,b)=>{let c=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.scope,code_challenge:b,code_challenge_method:a.codeChallengeMethod})});if(!c.ok){let a=await c.text();throw Error(`Device code request failed: ${a}`)}return await c.json()},pollToken: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:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b,code_verifier:c})});return{ok:d.ok,data:await d.json()}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{resourceUrl:a.resource_url}})},github:{config:f.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(f.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(f.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":f.Nu.apiVersion,"User-Agent":f.Nu.userAgent}});return{copilotToken:c,userInfo:d.ok?await d.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}})},kiro:{config:f.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,f.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,g="idc"===c.authMethod?"idc":"builder-id",h=`https://oidc.${d}.amazonaws.com/client/register`,i=`https://oidc.${d}.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:e})});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:d,_authMethod:g,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,g=d?._region||"us-east-1";(0,f.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:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await i.json()}catch(a){e={error:"invalid_response",error_description:await i.text()}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=k(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||f.Tx.startUrl}}}},cursor:{config:f.WN,flowType:"authorization_code_pkce",buildAuthUrl:()=>null,mapTokens:a=>a},kimi:{config:f.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,10793)),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,10793)),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}:{}}})},kilocode:{config:f.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}}:{}})},cline:{config:f.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}})},clinepass:{config:f.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}})},gitlab:{config:f.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"}})},"codebuddy-cn":{config:f.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:{}})},kimchi:{config:f.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}}}}};async function p(a,b,c,d,e,f){let g=function(a){let b=o["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}(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)}}};