nggrouter 0.1.21 → 0.1.22

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 (1070) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +26 -24
  3. package/app/.next-cli-build/build-manifest.json +4 -4
  4. package/app/.next-cli-build/prerender-manifest.json +49 -21
  5. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  6. package/app/.next-cli-build/routes-manifest.json +12 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page.js +1 -0
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page.js.nft.json +1 -0
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page_client-reference-manifest.js +1 -0
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  88. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  89. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  97. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  101. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  102. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  103. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  104. package/app/.next-cli-build/server/app/api/addons/list/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/addons/list/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/addons/update/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/addons/update/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/checkin/route.js +1 -0
  131. package/app/.next-cli-build/server/app/api/checkin/route.js.nft.json +1 -0
  132. package/app/.next-cli-build/server/app/api/checkin/route_client-reference-manifest.js +1 -0
  133. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  134. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  160. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +22 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  172. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  174. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  176. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +3 -3
  178. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  182. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  184. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
  186. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  218. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  272. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/bulk-proxy/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/bulk-proxy/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  312. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  314. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +2 -2
  316. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  320. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  322. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  324. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  326. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  328. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  330. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  332. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  334. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  336. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/system/status/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/system/status/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  354. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  376. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  400. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  456. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  458. package/app/.next-cli-build/server/app/callback.html +1 -1
  459. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  460. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  461. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  463. package/app/.next-cli-build/server/app/dashboard/arena.html +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/arena.rsc +5 -5
  465. package/app/.next-cli-build/server/app/dashboard/arena.segments/!KGRhc2hib2FyZCk/dashboard/arena/__PAGE__.segment.rsc +5 -5
  466. package/app/.next-cli-build/server/app/dashboard/arena.segments/_full.segment.rsc +5 -5
  467. package/app/.next-cli-build/server/app/dashboard/arena.segments/_tree.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/dashboard/checkin.html +1 -0
  469. package/app/.next-cli-build/server/app/dashboard/checkin.meta +44 -0
  470. package/app/.next-cli-build/server/app/dashboard/checkin.rsc +45 -0
  471. package/app/.next-cli-build/server/app/dashboard/checkin.segments/!KGRhc2hib2FyZCk/dashboard/checkin/__PAGE__.segment.rsc +47 -0
  472. package/app/.next-cli-build/server/app/dashboard/checkin.segments/_full.segment.rsc +45 -0
  473. package/app/.next-cli-build/server/app/dashboard/checkin.segments/_tree.segment.rsc +11 -0
  474. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  476. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  481. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +5 -5
  482. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  483. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  486. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
  487. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  488. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  491. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +5 -5
  492. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  493. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  496. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
  497. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  498. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  501. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +5 -5
  502. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  503. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  506. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +5 -5
  507. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  508. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  511. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +5 -5
  512. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  513. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  516. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
  517. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  518. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  521. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +5 -5
  522. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  523. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  526. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +6 -6
  527. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  528. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  534. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  535. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  537. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  539. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +5 -5
  540. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  541. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  542. package/app/.next-cli-build/server/app/dashboard/system-status.html +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/system-status.rsc +5 -5
  544. package/app/.next-cli-build/server/app/dashboard/system-status.segments/!KGRhc2hib2FyZCk/dashboard/system-status/__PAGE__.segment.rsc +5 -5
  545. package/app/.next-cli-build/server/app/dashboard/system-status.segments/_full.segment.rsc +5 -5
  546. package/app/.next-cli-build/server/app/dashboard/system-status.segments/_tree.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  549. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +5 -5
  550. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  551. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  552. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  554. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
  555. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  556. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  559. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
  560. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  561. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  562. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  563. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  564. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
  565. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  566. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  568. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  569. package/app/.next-cli-build/server/app/index.html +1 -1
  570. package/app/.next-cli-build/server/app/index.rsc +5 -5
  571. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  572. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  573. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  575. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  576. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  577. package/app/.next-cli-build/server/app/landing.html +1 -1
  578. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  579. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  580. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  581. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  582. package/app/.next-cli-build/server/app/login/page.js +1 -1
  583. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  584. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  585. package/app/.next-cli-build/server/app/login.html +1 -1
  586. package/app/.next-cli-build/server/app/login.rsc +5 -5
  587. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  588. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  589. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  590. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  591. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  592. package/app/.next-cli-build/server/app/page.js +1 -1
  593. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  594. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  595. package/app/.next-cli-build/server/app-paths-manifest.json +26 -24
  596. package/app/.next-cli-build/server/chunks/1306.js +1 -1
  597. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  598. package/app/.next-cli-build/server/chunks/1757.js +22 -2
  599. package/app/.next-cli-build/server/chunks/2236.js +1 -0
  600. package/app/.next-cli-build/server/chunks/238.js +1 -1
  601. package/app/.next-cli-build/server/chunks/24.js +1 -1
  602. package/app/.next-cli-build/server/chunks/2559.js +1 -1
  603. package/app/.next-cli-build/server/chunks/2925.js +1 -1
  604. package/app/.next-cli-build/server/chunks/2970.js +2 -2
  605. package/app/.next-cli-build/server/chunks/3192.js +1 -1
  606. package/app/.next-cli-build/server/chunks/{1851.js → 3360.js} +1 -1
  607. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  608. package/app/.next-cli-build/server/chunks/412.js +1 -1
  609. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  610. package/app/.next-cli-build/server/chunks/4334.js +1 -0
  611. package/app/.next-cli-build/server/chunks/4386.js +1 -1
  612. package/app/.next-cli-build/server/chunks/4732.js +2 -0
  613. package/app/.next-cli-build/server/chunks/4803.js +9 -0
  614. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  615. package/app/.next-cli-build/server/chunks/{3277.js → 5274.js} +1 -1
  616. package/app/.next-cli-build/server/chunks/5299.js +9 -2
  617. package/app/.next-cli-build/server/chunks/5330.js +5 -5
  618. package/app/.next-cli-build/server/chunks/5360.js +2 -0
  619. package/app/.next-cli-build/server/chunks/539.js +1 -0
  620. package/app/.next-cli-build/server/chunks/5390.js +1 -1
  621. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  622. package/app/.next-cli-build/server/chunks/5800.js +9 -0
  623. package/app/.next-cli-build/server/chunks/6103.js +1 -0
  624. package/app/.next-cli-build/server/chunks/6252.js +9 -0
  625. package/app/.next-cli-build/server/chunks/6267.js +1 -0
  626. package/app/.next-cli-build/server/chunks/7121.js +1 -1
  627. package/app/.next-cli-build/server/chunks/7211.js +1 -1
  628. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  629. package/app/.next-cli-build/server/chunks/7373.js +2 -2
  630. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  631. package/app/.next-cli-build/server/chunks/7774.js +13 -13
  632. package/app/.next-cli-build/server/chunks/7828.js +1 -1
  633. package/app/.next-cli-build/server/chunks/7911.js +1 -1
  634. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  635. package/app/.next-cli-build/server/chunks/8062.js +9 -0
  636. package/app/.next-cli-build/server/chunks/8228.js +9 -0
  637. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  638. package/app/.next-cli-build/server/chunks/8432.js +1 -0
  639. package/app/.next-cli-build/server/chunks/8469.js +9 -0
  640. package/app/.next-cli-build/server/chunks/8499.js +3 -3
  641. package/app/.next-cli-build/server/chunks/8895.js +10 -5
  642. package/app/.next-cli-build/server/chunks/8910.js +1 -1
  643. package/app/.next-cli-build/server/instrumentation.js +2 -1
  644. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  645. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  646. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  647. package/app/.next-cli-build/server/middleware.js +6 -6
  648. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/pages/404.html +1 -1
  650. package/app/.next-cli-build/server/pages/500.html +1 -1
  651. package/app/.next-cli-build/server/prefetch-hints.json +24 -0
  652. package/app/.next-cli-build/server/preview-props.json +3 -3
  653. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  654. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  655. package/app/.next-cli-build/static/chunks/{3794-39f2d5bb0d40336b.js → 3794-04350b0fcecd82e5.js} +1 -1
  656. package/app/.next-cli-build/static/chunks/5497-3e838288c83f6c38.js +7 -0
  657. package/app/.next-cli-build/static/chunks/{620-eb4703fefb0a8224.js → 620-d7ed0df2886322ee.js} +1 -1
  658. package/app/.next-cli-build/static/chunks/{6808-e6340e2d4cfe01fe.js → 6808-83c3dfdc65e5daa9.js} +1 -1
  659. package/app/.next-cli-build/static/chunks/{761-ee86f920b407fe8e.js → 761-5fd72f4954b87110.js} +9 -2
  660. package/app/.next-cli-build/static/chunks/8105-63b210e73fb53166.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/checkin/page-42825bd41f565908.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-deb38e87524ff14e.js → page-285b3f759b7dc2d7.js} +1 -1
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-442ec987799f9a5e.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-e2e50aefcea07c9b.js → page-002702d0d2cd95ab.js} +1 -1
  665. package/app/.next-cli-build/static/chunks/app/_global-error/page-9080ff61af91a815.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/addons/list/route-9080ff61af91a815.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/addons/update/route-9080ff61af91a815.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-9080ff61af91a815.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-9080ff61af91a815.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-9080ff61af91a815.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-9080ff61af91a815.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-9080ff61af91a815.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-9080ff61af91a815.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-9080ff61af91a815.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-9080ff61af91a815.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-9080ff61af91a815.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-9080ff61af91a815.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-9080ff61af91a815.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/checkin/route-9080ff61af91a815.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-9080ff61af91a815.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-9080ff61af91a815.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-9080ff61af91a815.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-9080ff61af91a815.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-9080ff61af91a815.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-9080ff61af91a815.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-9080ff61af91a815.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-9080ff61af91a815.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-9080ff61af91a815.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-9080ff61af91a815.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-9080ff61af91a815.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-9080ff61af91a815.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-9080ff61af91a815.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-9080ff61af91a815.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-9080ff61af91a815.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-9080ff61af91a815.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-9080ff61af91a815.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-9080ff61af91a815.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-9080ff61af91a815.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-9080ff61af91a815.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-9080ff61af91a815.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-9080ff61af91a815.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-9080ff61af91a815.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-9080ff61af91a815.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-9080ff61af91a815.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-9080ff61af91a815.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-9080ff61af91a815.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-9080ff61af91a815.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-9080ff61af91a815.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/combos/route-9080ff61af91a815.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-9080ff61af91a815.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-9080ff61af91a815.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-9080ff61af91a815.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-9080ff61af91a815.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-9080ff61af91a815.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-9080ff61af91a815.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/health/route-9080ff61af91a815.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/init/route-9080ff61af91a815.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-9080ff61af91a815.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/keys/route-9080ff61af91a815.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/locale/route-9080ff61af91a815.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-9080ff61af91a815.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-9080ff61af91a815.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-9080ff61af91a815.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-9080ff61af91a815.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-9080ff61af91a815.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-9080ff61af91a815.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-9080ff61af91a815.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-9080ff61af91a815.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-9080ff61af91a815.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-9080ff61af91a815.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-9080ff61af91a815.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-9080ff61af91a815.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/models/route-9080ff61af91a815.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/models/test/route-9080ff61af91a815.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-9080ff61af91a815.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-9080ff61af91a815.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-9080ff61af91a815.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-9080ff61af91a815.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-9080ff61af91a815.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-9080ff61af91a815.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-9080ff61af91a815.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-9080ff61af91a815.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-9080ff61af91a815.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-9080ff61af91a815.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-9080ff61af91a815.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-9080ff61af91a815.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-9080ff61af91a815.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-9080ff61af91a815.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-9080ff61af91a815.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-9080ff61af91a815.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/pricing/route-9080ff61af91a815.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-9080ff61af91a815.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-9080ff61af91a815.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-9080ff61af91a815.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-9080ff61af91a815.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-9080ff61af91a815.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-9080ff61af91a815.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-9080ff61af91a815.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-9080ff61af91a815.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/providers/bulk-proxy/route-9080ff61af91a815.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-9080ff61af91a815.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-9080ff61af91a815.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/providers/route-9080ff61af91a815.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-9080ff61af91a815.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-9080ff61af91a815.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-9080ff61af91a815.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-9080ff61af91a815.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-9080ff61af91a815.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-9080ff61af91a815.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-9080ff61af91a815.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-9080ff61af91a815.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-9080ff61af91a815.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-9080ff61af91a815.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-9080ff61af91a815.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-9080ff61af91a815.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-9080ff61af91a815.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-9080ff61af91a815.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-9080ff61af91a815.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-9080ff61af91a815.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-9080ff61af91a815.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-9080ff61af91a815.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-9080ff61af91a815.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-9080ff61af91a815.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-9080ff61af91a815.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/settings/route-9080ff61af91a815.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-9080ff61af91a815.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/system/status/route-9080ff61af91a815.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/tags/route-9080ff61af91a815.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-9080ff61af91a815.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-9080ff61af91a815.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-9080ff61af91a815.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-9080ff61af91a815.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-9080ff61af91a815.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-9080ff61af91a815.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-9080ff61af91a815.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-9080ff61af91a815.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-9080ff61af91a815.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-9080ff61af91a815.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-9080ff61af91a815.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-9080ff61af91a815.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-9080ff61af91a815.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-9080ff61af91a815.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-9080ff61af91a815.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-9080ff61af91a815.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-9080ff61af91a815.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-9080ff61af91a815.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-9080ff61af91a815.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-9080ff61af91a815.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-9080ff61af91a815.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-9080ff61af91a815.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-9080ff61af91a815.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-9080ff61af91a815.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-9080ff61af91a815.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-9080ff61af91a815.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-9080ff61af91a815.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-9080ff61af91a815.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-9080ff61af91a815.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-9080ff61af91a815.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-9080ff61af91a815.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-9080ff61af91a815.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-9080ff61af91a815.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-9080ff61af91a815.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-9080ff61af91a815.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-9080ff61af91a815.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-9080ff61af91a815.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-9080ff61af91a815.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-9080ff61af91a815.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1/route-9080ff61af91a815.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-9080ff61af91a815.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-9080ff61af91a815.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-9080ff61af91a815.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-9080ff61af91a815.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-9080ff61af91a815.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-9080ff61af91a815.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-9080ff61af91a815.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-9080ff61af91a815.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-9080ff61af91a815.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/version/route-9080ff61af91a815.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-9080ff61af91a815.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/version/update/route-9080ff61af91a815.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-9080ff61af91a815.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/page-9080ff61af91a815.js +1 -0
  843. package/app/.next-cli-build/static/chunks/{main-00cd8c01f6f6e461.js → main-ca004678a0b6b16d.js} +1 -1
  844. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-9080ff61af91a815.js +1 -0
  845. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-9080ff61af91a815.js +1 -0
  846. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-9080ff61af91a815.js +1 -0
  847. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-9080ff61af91a815.js +1 -0
  848. package/app/.next-cli-build/static/chunks/{webpack-c056b5babdc7a81f.js → webpack-867512cebea0fc40.js} +1 -1
  849. package/app/.next-cli-build/static/css/92c71fc2cde6ebf1.css +1 -0
  850. package/app/.next-cli-build/static/yJ-97dxfKFiJYqLiUc_hR/_buildManifest.js +1 -0
  851. package/app/node_modules/@next/env/package.json +1 -1
  852. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  853. package/app/node_modules/baseline-browser-mapping/package.json +3 -3
  854. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  855. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  856. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +1 -1
  857. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
  858. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
  859. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +1 -1
  860. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +1 -1
  861. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  862. package/app/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
  863. package/app/node_modules/next/dist/server/config.js +1 -1
  864. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  865. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  866. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  867. package/app/node_modules/next/dist/server/lib/generate-agent-files.js +3 -3
  868. package/app/node_modules/next/dist/server/lib/router-server.js +1 -1
  869. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  870. package/app/node_modules/next/dist/server/lib/trace/tracer.js +1 -1
  871. package/app/node_modules/next/dist/server/typescript/rules/config.js +2 -2
  872. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  873. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  874. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  875. package/app/node_modules/next/package.json +10 -10
  876. package/app/package.json +2 -2
  877. package/app/public/fonts/material-symbols-outlined.woff2 +0 -0
  878. package/app/src/mitm/server.js +1 -1
  879. package/package.json +1 -1
  880. package/app/.next-cli-build/server/chunks/2708.js +0 -1
  881. package/app/.next-cli-build/server/chunks/3726.js +0 -1
  882. package/app/.next-cli-build/server/chunks/8251.js +0 -1
  883. package/app/.next-cli-build/server/chunks/8402.js +0 -1
  884. package/app/.next-cli-build/static/-A8yVxeQUhunMwVeISlwZ/_buildManifest.js +0 -1
  885. package/app/.next-cli-build/static/chunks/5497-bdb464e8bf997966.js +0 -7
  886. package/app/.next-cli-build/static/chunks/8105-5dd3fc022d984a17.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-06427d5637ff9cb2.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/_global-error/page-7d5b3595c7187b08.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/addons/list/route-7d5b3595c7187b08.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/addons/update/route-7d5b3595c7187b08.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7d5b3595c7187b08.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7d5b3595c7187b08.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7d5b3595c7187b08.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7d5b3595c7187b08.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7d5b3595c7187b08.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7d5b3595c7187b08.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7d5b3595c7187b08.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7d5b3595c7187b08.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7d5b3595c7187b08.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7d5b3595c7187b08.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7d5b3595c7187b08.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7d5b3595c7187b08.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7d5b3595c7187b08.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7d5b3595c7187b08.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7d5b3595c7187b08.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7d5b3595c7187b08.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-7d5b3595c7187b08.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7d5b3595c7187b08.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7d5b3595c7187b08.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7d5b3595c7187b08.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7d5b3595c7187b08.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7d5b3595c7187b08.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7d5b3595c7187b08.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-7d5b3595c7187b08.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7d5b3595c7187b08.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7d5b3595c7187b08.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7d5b3595c7187b08.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-7d5b3595c7187b08.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7d5b3595c7187b08.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-7d5b3595c7187b08.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7d5b3595c7187b08.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7d5b3595c7187b08.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7d5b3595c7187b08.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-7d5b3595c7187b08.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7d5b3595c7187b08.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7d5b3595c7187b08.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-7d5b3595c7187b08.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-7d5b3595c7187b08.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7d5b3595c7187b08.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-7d5b3595c7187b08.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/combos/route-7d5b3595c7187b08.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7d5b3595c7187b08.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7d5b3595c7187b08.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7d5b3595c7187b08.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7d5b3595c7187b08.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7d5b3595c7187b08.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7d5b3595c7187b08.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/health/route-7d5b3595c7187b08.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/init/route-7d5b3595c7187b08.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7d5b3595c7187b08.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/keys/route-7d5b3595c7187b08.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/locale/route-7d5b3595c7187b08.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7d5b3595c7187b08.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7d5b3595c7187b08.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7d5b3595c7187b08.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7d5b3595c7187b08.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7d5b3595c7187b08.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7d5b3595c7187b08.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7d5b3595c7187b08.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7d5b3595c7187b08.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7d5b3595c7187b08.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-7d5b3595c7187b08.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7d5b3595c7187b08.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7d5b3595c7187b08.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/models/route-7d5b3595c7187b08.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/models/test/route-7d5b3595c7187b08.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7d5b3595c7187b08.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7d5b3595c7187b08.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7d5b3595c7187b08.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7d5b3595c7187b08.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7d5b3595c7187b08.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7d5b3595c7187b08.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-7d5b3595c7187b08.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7d5b3595c7187b08.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7d5b3595c7187b08.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7d5b3595c7187b08.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7d5b3595c7187b08.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7d5b3595c7187b08.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7d5b3595c7187b08.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7d5b3595c7187b08.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7d5b3595c7187b08.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7d5b3595c7187b08.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/pricing/route-7d5b3595c7187b08.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7d5b3595c7187b08.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7d5b3595c7187b08.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7d5b3595c7187b08.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7d5b3595c7187b08.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-7d5b3595c7187b08.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7d5b3595c7187b08.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7d5b3595c7187b08.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7d5b3595c7187b08.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/providers/bulk-proxy/route-7d5b3595c7187b08.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7d5b3595c7187b08.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7d5b3595c7187b08.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/providers/route-7d5b3595c7187b08.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7d5b3595c7187b08.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7d5b3595c7187b08.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7d5b3595c7187b08.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7d5b3595c7187b08.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7d5b3595c7187b08.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7d5b3595c7187b08.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7d5b3595c7187b08.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-7d5b3595c7187b08.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7d5b3595c7187b08.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7d5b3595c7187b08.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7d5b3595c7187b08.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7d5b3595c7187b08.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7d5b3595c7187b08.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7d5b3595c7187b08.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7d5b3595c7187b08.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7d5b3595c7187b08.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7d5b3595c7187b08.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7d5b3595c7187b08.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7d5b3595c7187b08.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7d5b3595c7187b08.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7d5b3595c7187b08.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/settings/route-7d5b3595c7187b08.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7d5b3595c7187b08.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/system/status/route-7d5b3595c7187b08.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/tags/route-7d5b3595c7187b08.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7d5b3595c7187b08.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7d5b3595c7187b08.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7d5b3595c7187b08.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7d5b3595c7187b08.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7d5b3595c7187b08.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7d5b3595c7187b08.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7d5b3595c7187b08.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7d5b3595c7187b08.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7d5b3595c7187b08.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7d5b3595c7187b08.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7d5b3595c7187b08.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7d5b3595c7187b08.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7d5b3595c7187b08.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7d5b3595c7187b08.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7d5b3595c7187b08.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7d5b3595c7187b08.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7d5b3595c7187b08.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-7d5b3595c7187b08.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7d5b3595c7187b08.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7d5b3595c7187b08.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7d5b3595c7187b08.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7d5b3595c7187b08.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7d5b3595c7187b08.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7d5b3595c7187b08.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7d5b3595c7187b08.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7d5b3595c7187b08.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7d5b3595c7187b08.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7d5b3595c7187b08.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7d5b3595c7187b08.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7d5b3595c7187b08.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7d5b3595c7187b08.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7d5b3595c7187b08.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7d5b3595c7187b08.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7d5b3595c7187b08.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-7d5b3595c7187b08.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7d5b3595c7187b08.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7d5b3595c7187b08.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7d5b3595c7187b08.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7d5b3595c7187b08.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/v1/route-7d5b3595c7187b08.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7d5b3595c7187b08.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7d5b3595c7187b08.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7d5b3595c7187b08.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7d5b3595c7187b08.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7d5b3595c7187b08.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7d5b3595c7187b08.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7d5b3595c7187b08.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7d5b3595c7187b08.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7d5b3595c7187b08.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/version/route-7d5b3595c7187b08.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7d5b3595c7187b08.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/version/update/route-7d5b3595c7187b08.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7d5b3595c7187b08.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/page-7d5b3595c7187b08.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7d5b3595c7187b08.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7d5b3595c7187b08.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7d5b3595c7187b08.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7d5b3595c7187b08.js +0 -1
  1069. package/app/.next-cli-build/static/css/a97374177c39fad4.css +0 -1
  1070. /package/app/.next-cli-build/static/{-A8yVxeQUhunMwVeISlwZ → yJ-97dxfKFiJYqLiUc_hR}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=7211,exports.ids=[7211],exports.modules={6551:(a,b,c)=>{c.d(b,{RO:()=>m,Tl:()=>k,Yt:()=>l});var d=c(39609),e=c(24295);let f={usageUrl:(0,e.U)("codex").url,resetCreditsUrl:(0,e.U)("codex").resetCreditsUrl,resetCreditsConsumeUrl:(0,e.U)("codex").resetCreditsConsumeUrl};function g(a){if(!a)return null;let b=a instanceof Date?a:new Date("number"==typeof a&&a<1e12?1e3*a:a);return Number.isFinite(b.getTime())?b.toISOString():null}function h(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function i(a){let b=Math.max(0,Math.min(100,(0,e.IQ)(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:(0,e.eZ)(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function j(a,b,c){let d=h(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=i(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=i(f),g=!0),g}async function k(a,b=null){try{let c=await (0,d.proxyAwareFetch)(f.usageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let g=await c.json(),i=g.rate_limit||g.rate_limits||g.rate_limits_by_limit_id?.codex||{},k=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(g),l=function(a){if(a.spark_rate_limit||a.gpt_5_3_codex_spark_rate_limit)return a.spark_rate_limit||a.gpt_5_3_codex_spark_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b["gpt-5.3-codex-spark"]||b.gpt_5_3_codex_spark||b.spark||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return b.includes("spark")||b.includes("5.3-codex-spark")})||null}(g),m=Math.max(0,(0,e.IQ)(g.rate_limit_reset_credits?.available_count,0)),n={};return j(n,"",i),j(n,"review",k),j(n,"spark",l),{plan:g.plan_type||g.summary?.plan||"unknown",limitReached:h(i)?.limit_reached||!1,reviewLimitReached:h(k)?.limit_reached||!1,sparkLimitReached:h(l)?.limit_reached||!1,resetCredits:{availableCount:m},quotas:n}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function l(a,b=null,c=null){var h,i;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");let j=c?.workspaceId||c?.accountId||c?.chatgptAccountId||null,k={Authorization:`Bearer ${a}`,Accept:"application/json","OpenAI-Beta":"codex-1",originator:"codex_cli_rs"};j&&(k["ChatGPT-Account-ID"]=j);let m=await (0,d.proxyAwareFetch)(f.resetCreditsUrl,{method:"GET",headers:k},b),n=null;try{n=await m.json()}catch{n=null}if(!m.ok)throw Error((h=n?.message||n?.error||n?.detail,i=`Codex reset credits API unavailable (${m.status}).`,h?"string"==typeof h?h:"string"==typeof h.message?h.message:JSON.stringify(h):i));let o=Array.isArray(n?.credits)?n.credits:[];return{availableCount:Math.max(0,(0,e.IQ)(n?.available_count??n?.availableCount,0)),credits:o.map(a=>({status:String(a?.status||"unknown"),grantedAt:g(a?.granted_at??a?.grantedAt),expiresAt:g(a?.expires_at??a?.expiresAt)}))}}async function m(a,b,c=null){let g;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");if(!b||"string"!=typeof b)throw Error("A redeem request id is required to consume a Codex reset credit.");let h=null;try{g=await (0,d.proxyAwareFetch)(f.resetCreditsConsumeUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({redeem_request_id:b})},c);let e=await g.text();h=e?JSON.parse(e):null}catch(a){throw Error(`Failed to consume Codex reset credit: ${a.message}`)}let i=h?.code||null,j=(0,e.IQ)(h?.windows_reset,0);return{ok:g.ok&&("reset"===i||j>0),noCredit:g.ok&&"no_credit"===i,status:g.status,code:i,windowsReset:j,message:h?.message||null,raw:h}}},18271:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>n,refreshAndUpdateCredentials:()=>m});var e=c(48895),f=c(89718),g=c(78463),h=c(8521),i=c(55330),j=c(39326),k=c(40615),l=a([e,i]);[e,i]=l.then?(await l)():l;let o=["expired","authentication","unauthorized","401","re-authorize"];async function m(a,b=!1,c=null){let d=a.id?await (0,f.Mc)(a.id):null;d&&(a=d);let e=(0,i.SB)(a.provider),g={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||e.needsRefresh(g)))return{connection:a,refreshed:!1};let j=await e.refreshCredentials(g,console,c);if(j&&(0,h.jT)(j))throw Error("Refresh token invalid or reused. Please re-authorize the connection.");if(!j){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let k={updatedAt:new Date().toISOString()};j.accessToken&&(k.accessToken=j.accessToken),j.refreshToken&&(k.refreshToken=j.refreshToken),j.idToken&&(k.idToken=j.idToken),j.lastRefreshAt&&(k.lastRefreshAt=j.lastRefreshAt),j.expiresIn?(k.expiresAt=new Date(Date.now()+1e3*j.expiresIn).toISOString(),k.expiresIn=j.expiresIn):j.expiresAt&&(k.expiresAt=j.expiresAt);let l={...j.providerSpecificData||{},...j.copilotToken?{copilotToken:j.copilotToken}:{},...j.copilotTokenExpiresAt?{copilotTokenExpiresAt:j.copilotTokenExpiresAt}:{}};return Object.keys(l).length>0&&(k.providerSpecificData={...a.providerSpecificData||{},...l}),await (0,f.updateProviderConnection)(a.id,k),{connection:{...a,...k,providerSpecificData:k.providerSpecificData||a.providerSpecificData},refreshed:!0}}async function n(a,{params:b}){let c;try{let{connectionId:d}=await b,e="1"===new URL(a.url).searchParams.get("force");if(!(c=await (0,f.Mc)(d)))return Response.json({error:"Connection not found"},{status:404});let h="oauth"===c.authType,i=("apikey"===c.authType||"api_key"===c.authType)&&k.jO.includes(c.provider);if(!h&&!i)return Response.json({message:"Usage not available for this connection"});let l=await (0,j.B)(c.providerSpecificData),n={connectionProxyEnabled:!0===l.connectionProxyEnabled,connectionProxyUrl:l.connectionProxyUrl||"",connectionNoProxy:l.connectionNoProxy||"",vercelRelayUrl:l.vercelRelayUrl||"",relayType:l.relayType||"",strictProxy:!1};if(h)try{c=(await m(c,!1,n)).connection}catch(a){return console.error("[Usage API] Credential refresh failed:",a),Response.json({error:`Credential refresh failed: ${a.message}`},{status:401})}let p=await (0,g.my)(c,n,{force:e});if(h&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return o.some(a=>b.includes(a))}(p)&&c.refreshToken)try{c=(await m(c,!0,n)).connection,p=await (0,g.my)(c,n,{force:e})}catch(a){console.warn(`[Usage] ${c.provider}: force refresh failed: ${a.message}`)}return Response.json(p)}catch(b){let a=c?.provider??"unknown";return console.warn(`[Usage] ${a}: ${b.message}`),Response.json({error:b.message},{status:500})}}d()}catch(a){d(a)}})},69788:(a,b,c)=>{c.d(b,{Ut:()=>l,gl:()=>j});var d=c(39609),e=c(74129),f=c(24295);let g={oauthUsageUrl:(0,f.U)("claude").oauthUrl,usageUrl:(0,f.U)("claude").orgUrl,settingsUrl:(0,f.U)("claude").settingsUrl,profileUrl:(0,f.U)("claude").profileUrl,resetUrl:(0,f.U)("claude").resetUrl,apiVersion:e.b8,userAgent:`claude-cli/${e.t4} (external, cli)`},h=new Map,i=new Map;async function j(a,b=null,c={}){let d=c?.force===!0;if(!d&&a){let b=i.get(a);if(b?.promise)return b.promise;if(b&&b.expiresAt>Date.now())return b.result}let e=!d&&a&&i.get(a)?.result||null,f=(async()=>{let c=await k(a,b);return a&&c?.quotas?(i.set(a,{result:c,expiresAt:Date.now()+3e5}),c):e||c})();return a&&i.set(a,{promise:f}),f}async function k(a,b=null){try{let c=h.get(a);if(c&&Date.now()<c)return await m(a,b);let e=await (0,d.proxyAwareFetch)(`${g.oauthUsageUrl}?cedar_ember=1`,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion,"User-Agent":g.userAgent}},b);if(e.ok){let a=await e.json(),b={},c=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,d=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:(0,f.eZ)(a.resets_at),unlimited:!1}};for(let[e,f]of(c(a.five_hour)&&(b["session (5h)"]=d(a.five_hour)),c(a.seven_day)&&(b["weekly (7d)"]=d(a.seven_day)),Object.entries(a)))if(e.startsWith("seven_day_")&&"seven_day"!==e&&c(f)){let a=e.replace("seven_day_","");b[`weekly ${a} (7d)`]=d(f)}if(Array.isArray(a.limits))for(let c of a.limits){if(c?.kind!=="weekly_scoped")continue;let a=String(c?.scope?.model?.display_name||"").trim().toLowerCase();a&&"number"==typeof c.percent&&(b[`weekly ${a} (7d)`]=d({utilization:Math.max(0,Math.min(100,c.percent)),resets_at:c.resets_at}))}return{plan:"Claude Code",extraUsage:a.extra_usage??null,resetCredits:function(a){if(!a?.eligible||!Array.isArray(a.grants))return null;let b=a.grants.filter(a=>a?.id&&!a.paused&&Number(a.resets_left)>0),c=b.find(b=>b.id===a.next_grant_id)||b[0]||null;return{availableCount:b.reduce((a,b)=>a+Number(b.resets_left),0),nextGrantId:c?.id||null,expiresAt:c?.ends_at||null,clears:c?.clears||[],cooldownUntil:a.cooldown_until||null,weeklyResetsAt:a.weekly_resets_at||null,grants:a.grants.filter(a=>a?.id).map(a=>({id:a.id,label:a.label||"",resetsLeft:Number(a.resets_left)||0,resetsTotal:Number(a.resets_total)||0,startsAt:a.starts_at||null,endsAt:a.ends_at||null,clears:Array.isArray(a.clears)?a.clears:[],paused:!0===a.paused,usableNow:!0===a.usable_now,useRequiresLimit:!1!==a.use_requires_limit}))}}(a.cedar_ember),quotas:b}}return 429===e.status&&h.set(a,Date.now()+18e4),console.warn(`[Claude Usage] OAuth endpoint returned ${e.status}, falling back to legacy`),await m(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function l(a,b,c=null){if(!a)throw Error("No Claude access token available. Please re-authorize the connection.");if(!/^[a-z0-9_-]{1,40}$/.test(b||""))throw Error("Invalid reset grant id.");let e={Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion,"User-Agent":g.userAgent,"Content-Type":"application/json"},f=await (0,d.proxyAwareFetch)(g.profileUrl,{method:"GET",headers:e},c),h=await f.json().catch(()=>null),j=h?.organization?.uuid;if(!f.ok||!j)throw Error(`Cannot resolve Claude organization (${f.status}).`);let k=await (0,d.proxyAwareFetch)(g.resetUrl.replace("{org_id}",j),{method:"POST",headers:e,body:JSON.stringify({program:"cedar_ember",grant_id:b,request_id:crypto.randomUUID()})},c),m=await k.json().catch(()=>null);return i.delete(a),{ok:k.ok&&m?.result==="reset",status:k.status,result:m?.result||null,reason:m?.reason||null,resetsLeft:m?.resets_left??null,message:m?.error?.message||null}}async function m(a,b=null){try{let c=await (0,d.proxyAwareFetch)(g.settingsUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let e=await c.json();if(e.organization_id){let c=await (0,d.proxyAwareFetch)(g.usageUrl.replace("{org_id}",e.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let a=await c.json();return{plan:e.plan||"Unknown",organization:e.organization_name,quotas:a}}}return{plan:e.plan||"Unknown",organization:e.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}},78463:(a,b,c)=>{c.d(b,{Ut:()=>k.Ut,RO:()=>l.RO,Yt:()=>l.Yt,my:()=>aV});var d=c(39609),e=c(6118),f=c(24295);let g={apiVersion:e.sr.github?.apiVersion,userAgent:e.sr.github?.userAgent};async function h(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,d.proxyAwareFetch)((0,f.U)("github").url,{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":g.apiVersion,"User-Agent":g.userAgent,"Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let e=await b.json();if(e.quota_snapshots){let a=e.quota_snapshots,b=(0,f.eZ)(e.quota_reset_date);return{plan:e.copilot_plan,resetDate:e.quota_reset_date,quotas:{chat:{...i(a.chat),resetAt:b},completions:{...i(a.completions),resetAt:b},premium_interactions:{...i(a.premium_interactions),resetAt:b}}}}if(e.monthly_quotas||e.limited_user_quotas){let a=e.monthly_quotas||{},b=e.limited_user_quotas||{},c=(0,f.eZ)(e.limited_user_reset_date);return{plan:e.copilot_plan||e.access_type_sku,resetDate:e.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function i(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}var j=c(87283),k=c(69788),l=c(6551),m=c(6382);async function n(a,b,c=null){let e=b?.authMethod||"builder-id",g="api_key"===e,h=g?{tokentype:"API_KEY"}:{},i="external_idp"===e?{TokenType:"EXTERNAL_IDP"}:{},j=g?b?.profileArn||"":b?.profileArn||(0,m.We)(e),k=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),l=!1,o=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").cwHost}${(0,f.U)("kiro").limitsPath}?${k.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE",...h,...i}},c)},{name:"codewhisperer-post",run:async()=>(0,d.proxyAwareFetch)((0,f.U)("kiro").cwHost,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json",...h,...i},body:JSON.stringify({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"});return(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").qHost}${(0,f.U)("kiro").limitsPath}?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json",...h,...i}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(l=!0),o.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=(0,f.eZ)(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,g=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:g,remaining:g-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,g=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:g,remaining:g-e,resetAt:(0,f.eZ)(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){o.push(`${b.name}:${a.message}`)}return l&&"idc"===e?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:l&&("google"===e||"github"===e)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:l?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:o.length>0?`Unable to fetch Kiro usage right now. (${o[o.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}let o={minimax:(0,f.U)("minimax").urls,"minimax-cn":(0,f.U)("minimax-cn").urls};function p(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function q(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function r(a){return Math.max(0,Number(p(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function s(a){return Math.max(0,Number(p(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function t(a){return!!(r(a)>0||s(a)>0)||null!==q(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==q(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function u(a,b,c,d,e,g,h,i,j,k){let l=d(c),m=q(c,h,i);if(l<=0&&null===m)return;let n=Math.max(0,Number(p(c,e,g))||0),o=l,r=n;l<=0&&(o=100,r=k?Math.round(m/100*o):Math.round(o*(1-m/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,r,function(a,b,c,d,e,g){let h=Number(p(a,c,d))||0;return h>0?new Date(b+h).toISOString():(0,f.eZ)(p(a,e,g))}(c,...j),k,m)}async function v(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let e=o[b]||[],f="";for(let b=0;b<e.length;b+=1){let g=e[b],h=b<e.length-1;try{let b=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),e=await b.text(),i={};if(e)try{i=JSON.parse(e)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${e}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,q=(Array.isArray(o)?o:[]).filter(t);if(0===q.length)return{message:"MiniMax connected. No quota data was returned."};let v=Date.now(),w=g.includes("/coding_plan/remains"),x={};for(let a of q){let b=function(a){let b=String(p(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);u(x,`${b} (5h)`,a,r,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[v,"remains_time","remainsTime","end_time","endTime"],w),u(x,`${b} (7d)`,a,s,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[v,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],w)}if(0===Object.keys(x).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:x}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}var w=c(77598);let x="I*7Cf%WZ#S&%1RlZJ&C2",y={"minimax-code":{agent:"https://agent.minimaxi.com",platform:"https://www.minimaxi.com",lang:"zh"},"minimax-code-global":{agent:"https://agent.minimax.io",platform:"https://platform.minimax.io",lang:"en"}},z=a=>(0,w.createHash)("md5").update(a).digest("hex"),A=a=>a&&"object"==typeof a&&!Array.isArray(a)?a:void 0,B=a=>"number"==typeof a&&Number.isFinite(a)?a:void 0,C=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0;class D extends Error{}async function E(a,b,c,d){let e,{url:f,init:g}=function(a,b,{access:c,userID:d,body:e,now:f=Date.now(),tzOffsetSec:g=-60*new Date().getTimezoneOffset()}={}){let h=new URL(b,a.agent);h.search=new URLSearchParams({device_platform:"mcode",biz_id:"3",app_id:"3001",version_code:"22201",unix:String(f),timezone_offset:String(g),sys_language:a.lang,lang:a.lang,device_id:"0",os_name:process.platform,browser_name:"mcode",user_id:String(d??"").trim()||"0",client:"mcode"}).toString();let i=h.pathname+h.search,j=Math.floor(f/1e3),k=void 0===e?void 0:JSON.stringify(e),l={Accept:"application/json","Content-Type":"application/json","User-Agent":"MiniMaxCode",Authorization:`Bearer ${c}`,yy:void 0===k?z(`${encodeURIComponent(i)}_{}${z(String(f))}ooui`):z(`${encodeURIComponent(i)}_${k}${z(String(f))}ooui`),"x-timestamp":String(j),"x-signature":void 0===k?z(`${j}${x}`):z(`${j}${x}${k}`)};return{url:h.toString(),init:{method:void 0===k?"GET":"POST",headers:l,...void 0===k?{}:{body:k}}}}(a,b,c),h=await fetch(f,{...g,signal:AbortSignal.timeout(15e3)});if(401===h.status||403===h.status)throw new D(`${d}: the sign-in was refused (HTTP ${h.status})`);if(!h.ok)throw Error(`${d}: HTTP ${h.status}`);try{e=A(JSON.parse(await h.text()))}catch{}if(!e)throw Error(`${d}: not JSON`);var i=e;let j=A(i?.statusInfo);if("number"==typeof j?.code&&0!==j.code){if(1000048===j.code)throw new D(`${d}: the sign-in was refused`);throw Error(`${d}: ${C(j,"message")??C(j,"msg")??"status "+j.code}`)}let k=A(i?.base_resp);if("number"==typeof k?.status_code&&0!==k.status_code)throw Error(`${d}: ${C(k,"status_msg")??"status "+k.status_code}`);return i}async function F(a,b){let c=await E(a,"/v1/api/user/info",{access:b},"account"),d=A(c.data),e=A(d?.userInfo)??A(d?.user_info)??A(c.userInfo)??A(c.user_info),f=C(e,"realUserID")??C(e,"real_user_id");if(!f)throw Error("account: no user id in the reply");let g=(...a)=>a.map(a=>C(e,a)).find(Boolean);return{realUserID:f,email:g("userEmail","email","userMail","user_email"),name:g("name","userName","user_name")}}function G(a){let b,c=A(a?.data),d=b=>a?.[b]??c?.[b],e=a=>"string"==typeof d(a)&&d(a).trim()?d(a).trim():void 0,f="boolean"==typeof d("has_token_plan")?d("has_token_plan"):void 0,g=B(d("token_plan_expires_at")),h=C(A(a?.op_credit_summary)??A(c?.op_credit_summary),"total_remaining_amount")??("string"==typeof(b=d("opcredit_balance"))&&b.trim()?b.trim():"number"==typeof b&&Number.isFinite(b)?String(b):void 0);return{...void 0!==f?{hasTokenPlan:f}:{},...e("op_group_id")?{opGroupId:e("op_group_id")}:{},...e("token_plan_tier")?{tier:e("token_plan_tier")}:{},...g>0?{expiresAt:g}:{},...void 0!==h?{balance:h}:{}}}async function H(a,b,c){let d;try{let e=await E(a,"/matrix/api/v1/user/get_user_extra_info",{access:b,userID:c,body:{}},"workspace");for(let a of Array.isArray(e.workspaces)?e.workspaces:Array.isArray(e.data?.workspaces)?e.data.workspaces:[]){if(0!==B(a?.workspace_type))continue;let b="number"==typeof a.workspace_id&&a.workspace_id>=0?a.workspace_id:C(a,"workspace_id");if(void 0!==b){d={id:b,m:G(a)};break}}}catch(d){if(d instanceof D)throw d;return G(await E(a,"/matrix/api/v1/commerce/get_membership_info",{access:b,userID:c,body:{}},"membership"))}if(!d)return{};try{let e=G(await E(a,"/matrix/api/v1/commerce/get_membership_info",{access:b,userID:c,body:{workspace_id:d.id}},"membership")),f=!0===d.m.hasTokenPlan||!0===e.hasTokenPlan||!1!==d.m.hasTokenPlan&&!1!==e.hasTokenPlan&&void 0;return{...d.m,...e,...void 0!==f?{hasTokenPlan:f}:{},...d.m.opGroupId||e.opGroupId?{opGroupId:d.m.opGroupId??e.opGroupId}:{}}}catch(a){if(a instanceof D)throw a;return d.m}}async function I(a,b,c){let d=await fetch(`${a.platform}/v1/api/openplatform/coding_plan/remains`,{headers:{Accept:"application/json",Authorization:`Bearer ${b}`,...c?{"X-Group-Id":c}:{}},signal:AbortSignal.timeout(15e3)});if(!d.ok)throw Error(`M Plan: HTTP ${d.status}`);return function(a){let b=A(a?.base_resp);if(b&&"number"==typeof b.status_code&&0!==b.status_code)throw Error(C(b,"status_msg")??`MiniMax said ${b.status_code}`);if(!b&&!Array.isArray(a?.model_remains))throw Error("no plan in the reply");let c=a=>a<1e12?1e3*a:a,d=a=>0===B(a),e=[];for(let b of Array.isArray(a.model_remains)?a.model_remains:[]){let a=String(b?.model_name??"").trim();if(!a||3===B(b.current_interval_status)&&3===B(b.current_weekly_status)&&d(b.current_interval_total_count)&&d(b.current_weekly_total_count))continue;let f="general"===a.toLowerCase();for(let d of[{left:B(b.current_interval_remaining_percent),status:B(b.current_interval_status)??0,start:B(b.start_time)??0,end:B(b.end_time)??0,week:!1},{left:B(b.current_weekly_remaining_percent),status:B(b.current_weekly_status)??0,start:B(b.weekly_start_time)??0,end:B(b.weekly_end_time)??0,week:!0}]){if(3===d.status||void 0===d.left&&2!==d.status)continue;let b=2===d.status?0:Math.max(0,Math.min(100,d.left)),g=0;d.start>0&&d.end>d.start?g=c(d.end)-c(d.start):d.week&&(g=6048e5);let h=d.week?"7 days":g>864e5&&g%864e5==0?`${g/864e5} days`:g>=36e5&&g%36e5==0?`${g/36e5} hours`:g>0?`${Math.floor(g/6e4)} minutes`:"Allowance",i=f?h:`${a[0].toUpperCase()+a.slice(1)} \xb7 ${h}`;e.push({name:i,used:100-b,total:100,remaining:b,remainingPercentage:b,resetAt:d.end>0?new Date(c(d.end)).toISOString():null})}}return e}(await d.json().catch(()=>null))}async function J(a){let b=y[a.provider],c=a.accessToken;if(!b||!c)return{message:`Usage API not implemented for ${a.provider}`};try{let d=C(a.providerSpecificData||{},"realUserID"),e=null;d||(d=(e=await F(b,c)).realUserID);let f=await H(b,c,d),g={};if(void 0!==f.balance){let a=Number(f.balance);g.Credits={used:0,total:Number.isFinite(a)?a:0,isCreditBalance:!0,currency:"credits"}}if(f.hasTokenPlan&&f.opGroupId)try{for(let a of(await I(b,c,f.opGroupId)))g[a.name]=a}catch(a){g["M Plan windows"]={name:"M Plan windows",used:0,total:0,resetAt:null,message:a?.message??String(a)}}return 0===Object.keys(g).length&&(g.Plan={name:"Plan",used:0,total:0,resetAt:null,message:!1===f.hasTokenPlan?"Free account (no M Plan)":"No usage data returned"}),{quotas:g,plan:f.hasTokenPlan?f.tier?`M Plan ${f.tier}`:"M Plan":"Free",...f.expiresAt>0?{planExpiresAt:new Date(f.expiresAt<1e12?1e3*f.expiresAt:f.expiresAt).toISOString()}:{},user:e?.email||e?.name||C(a.providerSpecificData||{},"realUserID")||d||null}}catch(a){if(a instanceof D)return{message:`MiniMax Code sign-in expired — unauthorized, please re-authorize (${a.message})`};return{message:a?.message??String(a)}}}function K(a,b){let c=Number(a??b);return Number.isFinite(c)?c:0}async function L(a,b,c,g,h=null){let i=b||c;if(!i)return{message:`CodeBuddy (${a}) credential not available.`};try{let b=await (0,d.proxyAwareFetch)((0,f.U)(a).url,{method:"POST",headers:{...e.xq[a]?.headers||{},Authorization:`Bearer ${i}`,"Content-Type":"application/json",Accept:"application/json"},body:"{}"},h);if(401===b.status||403===b.status)return{message:"CodeBuddy CN credential invalid or expired."};if(!b.ok)return{message:`CodeBuddy CN quota API error (${b.status}).`};let c=await b.json();if(c?.code!==0)return{message:`CodeBuddy CN quota error: ${c?.msg||"unknown"}`};let g=c?.data?.Response?.Data||{},j=Array.isArray(g.Accounts)?g.Accounts:[];if(0===j.length)return{message:"CodeBuddy CN connected. No credit package found."};let k=a=>{let b=(0,f.eZ)(a.CycleEndTime);return b?new Date(b).getTime():1/0},l=a=>{let b=k(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},m=(a,b)=>k(a)-k(b),n=j.filter(l).sort(m),o=j.filter(a=>!l(a)).sort(m),p={},q={};n.forEach(a=>{let b=function(a){let b=(0,f.eZ)(a.CycleStartTime),c=(0,f.eZ)(a.CycleEndTime);if(b&&c){let a=(new Date(c).getTime()-new Date(b).getTime())/864e5;if(a<=1.5)return"Daily";if(a<=10)return"Weekly"}return"Monthly"}(a);q[b]=(q[b]||0)+1,p[q[b]>1?`${b} ${q[b]}`:b]={used:K(a.CycleCapacityUsedPrecise,a.CycleCapacityUsed),total:K(a.CycleCapacitySizePrecise,a.CycleCapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!0}}),o.forEach((a,b)=>{p[`Bonus Pack ${b+1}`]={used:K(a.CapacityUsedPrecise,a.CapacityUsed),total:K(a.CapacitySizePrecise,a.CapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!1}});let r=n[0]||j[0]||{};return{plan:r.PackageName||r.SubProductName||"CodeBuddy",quotas:p}}catch(b){return{message:`CodeBuddy (${a}) error: ${b.message}`}}}async function M(a,b,c,d=null){return L("codebuddy-cn",a,b,c,d)}async function N(a,b,c,d=null){return L("codebuddy-intl",a,b,c,d)}var O=c(90737);function P(a,b=0){if(!Buffer.isBuffer(a)||b<0||a.length-b<5)return null;let c=a[b];if(0!==c&&1!==c&&128!==c&&129!==c)return null;let d=b+5,e=a.readUInt32BE(b+1);return e>a.length-d?null:{flag:c,payloadStart:d,payloadLength:e}}function Q(a,b){let c=0n,d=0n,e=b;for(;;){if(e>=a.length)return null;let b=a[e];if(c|=BigInt(127&b)<<d,e+=1,(128&b)==0)break;if((d+=7n)>70n)return null}return{value:Number(c),next:e}}function R(a,b,c,d){return b+c>a.length?null:{field:{wireType:d,bytes:a.subarray(b,b+c)},next:b+c}}function S(a){let b=new Map,c=0;for(;c<a.length;){let d=function(a,b){let c=Q(a,b);if(!c)return null;let d=c.value>>>3,e=7&c.value;if(0===d)return null;if(0===e){let b=Q(a,c.next);return b?{fieldNumber:d,field:{wireType:0,value:b.value},next:b.next}:null}if(2===e){let b=function(a,b){let c=Q(a,b);if(!c)return null;let{value:d,next:e}=c;return d<0||e+d>a.length?null:{field:{wireType:2,bytes:a.subarray(e,e+d)},next:e+d}}(a,c.next);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(1===e){let b=R(a,c.next,8,1);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(5===e){let b=R(a,c.next,4,5);return b?{fieldNumber:d,field:b.field,next:b.next}:null}return null}(a,c);if(!d)return null;b.set(d.fieldNumber,d.field),c=d.next}return b}let T=(0,f.U)("grok-cli"),U=T.url||"https://cli-chat-proxy.grok.com/v1/billing?format=credits",V=T.userUrl||"https://cli-chat-proxy.grok.com/v1/user?include=subscription",W=Buffer.from([0,0,0,0,0]);function X(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?(0,f.IQ)(a.val,b):(0,f.IQ)(a,b)}function Y(a,b){let c=a?.subscriptionTier??a?.subscription_tier??a?.subscription?.tier??b?.subscriptionTier??b?.subscription_tier;return"string"==typeof c?c.trim():""}function Z({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,(0,f.IQ)(b,0)),g=Math.max(0,(0,f.IQ)(a,0));if(d||0===e)return{used:g,total:0,remainingPercentage:100*!!d,resetAt:c||null,unlimited:!0};let h=Math.max(0,e-g);return{used:g,total:e,remainingPercentage:h/e*100,resetAt:c||null,unlimited:!1}}async function $(a,b=null){if(!a)return null;try{let c=await (0,d.proxyAwareFetch)("https://grok.com/grok_api_v2.GrokBuildBilling/GetGrokCreditsConfig",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/grpc-web+proto","X-Grpc-Web":"1",Accept:"application/grpc-web+proto"},body:W},b);if(!c?.ok)return null;let e=await c.arrayBuffer().catch(()=>null);if(!e)return null;return function(a){if(!a||!Buffer.isBuffer(a)||0===a.length)return null;try{var b,c;let d=null!==P(a,0)?function(a){let b=0;for(;b<a.length;){let c=P(a,b);if(!c)break;let d=c.payloadStart+c.payloadLength;if((128&c.flag)==0)return a.subarray(c.payloadStart,d);b=d}return null}(a):a;if(!d)return null;let e=S(d);if(!e)return null;let f=(b=e.get(1))&&2===b.wireType?S(b.bytes):null;if(!f)return null;let g=(c=f.get(1))?5===c.wireType?c.bytes.readFloatLE(0):1===c.wireType?c.bytes.readDoubleLE(0):null:0;if(null===g||!Number.isFinite(g)||g<0)return null;return{percentUsed:Math.min(100,100*g),resetAt:function(a){if(!a||2!==a.wireType)return null;let b=S(a.bytes);if(!b)return null;let c=b.get(1),d=b.get(2),e=new Date(1e3*(c?.wireType===0?c.value:0)+Math.round((d?.wireType===0?d.value:0)/1e6));return Number.isNaN(e.getTime())?null:e.toISOString()}(f.get(5))}}catch{return null}}(Buffer.from(e))}catch{return null}}async function _(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let e=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":O.fZ,"x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":O.rK,"x-grok-client-version":O.uG,"x-grok-client-mode":"headless"},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[b,h]=await Promise.all([(0,d.proxyAwareFetch)(U,{method:"GET",headers:e},c),(0,d.proxyAwareFetch)(V,{method:"GET",headers:e},c).catch(()=>null)]);if(401===b.status||403===b.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!b.ok){let a=await b.text().catch(()=>""),c=a?`: ${a.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${b.status})${c}`}}let i=await b.json().catch(()=>null);if(!i||"object"!=typeof i)return{message:"Grok CLI billing response was not JSON."};let j=null;h?.ok&&(j=await h.json().catch(()=>null));let k=function(a,b=null){let c,d=a&&"object"==typeof a?a:{},e=d.config&&"object"==typeof d.config&&!Array.isArray(d.config)?d.config:d,g=(0,f.eZ)(e.billingPeriodEnd)||(0,f.eZ)(e.billing_period_end)||(0,f.eZ)(e.currentPeriod?.end)||(0,f.eZ)(e.resetAt||e.resetsAt||e.periodEnd)||(0,f.eZ)(d.billingPeriodEnd)||(0,f.eZ)(d.billing_period_end)||(0,f.eZ)(d.resetAt||d.resetsAt||d.periodEnd)||null,h={},i=Y(b,e),j=!!i&&!/^(free|none|null)$/i.test(i),k=X(e.monthlyLimit??e.monthly_limit??d.monthlyLimit??d.monthly_limit,0/0),l=X(e.includedUsed??e.included_used??d.includedUsed??d.included_used,0/0),m=X(e.totalUsed??e.total_used??d.totalUsed??d.total_used,0/0);Number.isFinite(k)&&k>0&&(h["Monthly included"]=Z({used:Number.isFinite(l)?l:Number.isFinite(m)?m:0,total:k,resetAt:g}));let n=X(e.onDemandCap??d.onDemandCap,0/0),o=X(e.onDemandUsed??d.onDemandUsed,0/0);if(Number.isFinite(n)&&n>0){let a=Number.isFinite(o)?Math.max(0,o):0;h["On-demand"]=Z({used:a,total:n,resetAt:g})}else!j&&Number.isFinite(n)&&0===n&&Number.isFinite(o)&&(h["On-demand"]={used:1,total:1,remainingPercentage:0,resetAt:g,unlimited:!1});let p=X(e.prepaidBalance??d.prepaidBalance,0/0);Number.isFinite(p)&&p>0&&(h.Prepaid={used:0,total:p,remainingPercentage:100,resetAt:null,unlimited:!1});let q=X(e.creditUsagePercent??e.credit_usage_percent??d.creditUsagePercent,0/0);for(let a of(Number.isFinite(q)&&q>=0&&(h["Weekly SuperGrok"]=Z({used:Math.max(0,Math.min(100,q)),total:100,resetAt:g})),[d.credits,d.creditBalance,d.usage,e.credits,e.includedCredits,e.subscriptionCredits].filter(a=>a&&"object"==typeof a&&!Array.isArray(a)))){let b=X(a.total??a.limit??a.cap??a.allocation??a.amount,0/0),c=X(a.used??a.spent??a.consumed,0/0),d=X(a.remaining??a.balance??a.left,0/0);if(Number.isFinite(b)&&b>0){let e=Number.isFinite(c)?c:Number.isFinite(d)?Math.max(0,b-d):0;h.Credits||(h.Credits=Z({used:e,total:b,resetAt:(0,f.eZ)(a.resetAt||a.resetsAt||a.end)||g}))}else Number.isFinite(d)&&d>=0&&!h.Credits&&(h.Credits={used:0,total:d>0?d:1,remainingPercentage:100*(d>0),resetAt:g,unlimited:!1})}let r=Object.keys(h).length>0&&Object.values(h).every(a=>!0!==a.unlimited&&(a.remainingPercentage??100)<=0);return{plan:(c=Y(b,e))?c.replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()):b?.hasGrokCodeAccess===!0?"Grok Code":(e?.isUnifiedBillingUser,"Grok Build"),hasAuthoritativePlan:!!Y(b,e),quotas:h,periodEnd:g,exhausted:r,subscriptionAccess:j,rawConfig:e}}(i,j);if(k.plan=k.hasAuthoritativePlan?k.plan:function(a){try{return({0:"Free",1:"SuperGrok",2:"X Basic",3:"X Premium",4:"X Premium Plus",5:"SuperGrok Heavy",6:"SuperGrok Lite"})[JSON.parse(Buffer.from(a.split(".")[1],"base64url")).tier]||""}catch{return""}}(a)||k.plan,!k.quotas||0===Object.keys(k.quotas).length){var g;let b=(g=await $(a,c))&&Number.isFinite(g.percentUsed)?{"Weekly SuperGrok":Z({used:Math.round(Math.max(0,Math.min(100,g.percentUsed))),total:100,resetAt:g.resetAt||null})}:null;if(b)return{plan:k.plan,quotas:b};return{plan:k.plan,message:k.subscriptionAccess?"Subscription access is active; Grok does not expose a numeric included quota.":"Grok Build connected, but no credit allotment was returned. Free promo may be exhausted.",quotas:{}}}return{plan:k.plan,quotas:k.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}var aa=c(75924);let ab={LEVEL_BASIC:"Moderato",LEVEL_INTERMEDIATE:"Allegretto",LEVEL_ADVANCED:"Allegro",LEVEL_STANDARD:"Vivace"};function ac({used:a,total:b,remaining:c,resetAt:d}){let e,g=Math.max(0,(0,f.IQ)(b,0)),h=Math.max(0,(0,f.IQ)(a,0));return e=g>0&&null!=c&&Number.isFinite(Number(c))?Math.max(0,Number(c))/g*100:g>0?Math.max(0,g-h)/g*100:0,{used:h,total:g,remainingPercentage:e,resetAt:d||null,unlimited:!1}}async function ad(a=null,b=null,c=null,e=null){let g="string"==typeof b&&b.length>0,h=!g&&"string"==typeof a&&a.length>0;if(!g&&!h)return{message:"Kimi access token or API key not available."};let i=g?{"x-api-key":b}:{Authorization:`Bearer ${a}`,...(0,aa.buildKimiHeaders)(e?.deviceId)};try{let a,b=await (0,d.proxyAwareFetch)("https://api.kimi.com/coding/v1/usages",{method:"GET",headers:{...i,"Content-Type":"application/json",Accept:"application/json"}},c),e=await b.text().catch(()=>"");if(!b.ok)return{plan:"Kimi Coding",message:function(a,b){let c=null;try{c=JSON.parse(b||"")}catch{}let d=Array.isArray(c?.details)?c.details[0]:null,e=d?.debug||c?.debug||null,f=e?.reason||c?.reason||"",g=e?.localizedMessage?.message||d?.localizedMessage?.message||c?.message||"";if(401===a)return"Kimi authentication expired. Please re-authorize.";if(403===a&&("REASON_FEATURE_NO_PERMISSION"===f||/permission_denied|do not have permission|subscribe/i.test(`${c?.code||""} ${g} ${b||""}`)))return g||"Kimi connected, but this account has no permission to view usage. Subscribe to Kimi Code to access quota.";let h=(g||b||"").slice(0,100);return h?`Kimi Coding connected. API Error ${a}: ${h}`:`Kimi Coding connected. API Error ${a}`}(b.status,e)};try{a=JSON.parse(e||"{}")}catch{return{plan:"Kimi Coding",message:"Kimi Coding connected. Invalid JSON response from API."}}let g={},h=a?.usage&&"object"==typeof a.usage?a.usage:{},j=(0,f.IQ)(h.limit??h.Limit,0),k=(0,f.IQ)(h.used??h.Used,0),l=h.remaining??h.Remaining,m=null!=l&&""!==l?(0,f.IQ)(l,0/0):0/0,n=h.resetTime||h.ResetTime||h.reset_at||h.resetAt;for(let b of(j>0&&(g.Weekly=ac({used:k,total:j,remaining:Number.isFinite(m)?m:null,resetAt:(0,f.eZ)(n)})),Array.isArray(a?.limits)?a.limits:[])){if(!b||"object"!=typeof b)continue;let a=b.detail&&"object"==typeof b.detail?b.detail:{},c=(0,f.IQ)(a.limit??a.Limit,0),d=(0,f.IQ)(a.remaining??a.Remaining,0/0),e=a.resetTime||a.reset_at||a.resetAt;if(c>0){let a=Number.isFinite(d)?d:Math.max(0,c);g.Ratelimit=ac({used:Math.max(0,c-a),total:c,remaining:a,resetAt:(0,f.eZ)(e)})}}let o=a?.user?.membership?.level,p=function(a){if(!a)return"";let b=String(a);return ab[b]?ab[b]:b.replace(/^LEVEL_/,"").toLowerCase()}(o)||"Kimi Coding";if(Object.keys(g).length>0)return{plan:p,quotas:g};return{plan:p,message:"Kimi Coding connected. Usage tracked per request."}}catch(a){return{message:`Kimi Coding connected. Unable to fetch usage: ${a.message}`}}}async function ae(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"DeepSeek API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)("https://api.deepseek.com/user/balance",{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,"Content-Type":"application/json",Accept:"application/json"}},b);if(401===c.status||403===c.status)return{plan:"DeepSeek",message:"DeepSeek authentication failed. Check the API key."};if(!c.ok){let a=await c.text().catch(()=>"");return{plan:"DeepSeek",message:`DeepSeek balance API error (${c.status})${a?`: ${a.slice(0,120)}`:""}`}}let e=await c.json().catch(()=>null);if(!e||"object"!=typeof e)return{message:"DeepSeek balance response was not JSON."};let g=function(a){let b=Array.isArray(a?.balance_infos)?a.balance_infos:[],c=[];for(let a of b){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.currency?a.currency.toUpperCase():"";if(!b)continue;let d=(0,f.IQ)(a.total_balance??a.totalBalance,0);c.push({currency:b,totalBalance:d,grantedBalance:(0,f.IQ)(a.granted_balance??a.grantedBalance,0),toppedUpBalance:(0,f.IQ)(a.topped_up_balance??a.toppedUpBalance,0)})}return c}(e);if(0===g.length)return{plan:"DeepSeek",message:"DeepSeek connected. No balance data returned."};let h=!0===e.is_available||!0===e.isAvailable,i={};for(let a of g){let b=Math.max(0,a.totalBalance);i[`Balance (${a.currency})`]={used:0,total:b,remainingPercentage:100*(b>0),resetAt:null,unlimited:!1,isCreditBalance:!0,currency:a.currency}}return{plan:h?"DeepSeek":"DeepSeek (Insufficient Balance)",quotas:i}}catch(a){return{message:`DeepSeek error: ${a.message}`}}}let af=(0,f.U)("opencode-go").url,ag={rolling:"Rolling",weekly:"Weekly",monthly:"Monthly"};async function ah(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"OpenCode Go API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)(af,{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,Accept:"application/json"}},b);if(401===c.status)return{plan:"OpenCode Go",message:"OpenCode Go authentication failed. Check the API key."};if(403===c.status){let a=await c.json().catch(()=>null),b=a?.error?.type==="EntitlementError";return{plan:"OpenCode Go",message:b?"OpenCode Go subscription required for this API key.":"OpenCode Go access forbidden for this API key."}}if(!c.ok)return{plan:"OpenCode Go",message:`OpenCode Go usage API error (${c.status}).`};let e=await c.json().catch(()=>null);if(!e?.usage||"object"!=typeof e.usage)return{plan:"OpenCode Go",message:"OpenCode Go usage response did not contain quota data."};let g={};for(let[a,b]of Object.entries(ag)){let c=e.usage[a];if(!c||"object"!=typeof c)continue;let d=function(a){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return null}(c.percent);if(null===d)continue;let h=Math.max(0,Math.min(100,(0,f.IQ)(d,0)));g[b]={used:h,total:100,remaining:100-h,remainingPercentage:100-h,resetAt:(0,f.eZ)(c.resetsAt),unlimited:!1}}if(0===Object.keys(g).length)return{plan:"OpenCode Go",message:"OpenCode Go usage response did not contain valid quota data."};return{plan:"OpenCode Go",quotas:g}}catch(a){return{message:`OpenCode Go error: ${a.message}`}}}let ai=(0,f.U)("groq"),aj=ai.url,ak=ai.modelsUrl,al=new Map,am=new Map,an=/whisper|tts|orpheus|prompt-guard|safeguard/i;function ao(a,b,c,d){let e,f=a.get(b),g=a.get(c);if(null===f||null===g)return null;let h=Number(f),i=Number(g);return Number.isFinite(h)&&Number.isFinite(i)?{used:Math.max(0,h-i),total:h,resetAt:null===(e=function(a){let b;if("string"!=typeof a||!a.trim())return null;let c=/(\d+(?:\.\d+)?)(ms|s|m|h)/g,d=0,e=!1;for(;b=c.exec(a);){e=!0;let a=Number(b[1]),c=b[2];d+=a*("h"===c?36e5:"m"===c?6e4:"ms"===c?1:1e3)}return e?d:null}(a.get(d)))?null:new Date(Date.now()+e).toISOString(),unlimited:!1}:null}async function ap(a,b){let c=am.get(a);if(c&&Date.now()-c.at<9e5)return c.model;let e=await (0,d.proxyAwareFetch)(ak,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!e.ok)return null;let f=await e.json().catch(()=>null),g=(Array.isArray(f?.data)?f.data.map(a=>a?.id).filter(Boolean):[]).find(a=>!an.test(a));return g?(am.set(a,{model:g,at:Date.now()}),g):null}async function aq(a,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Groq API key not available. Add a key to view usage."};let c=a.trim(),e=al.get(c);if(e&&Date.now()-e.at<9e5)return{plan:"Groq",quotas:e.quotas};try{let a=await ap(c,b);if(!a){if(e)return{plan:"Groq",quotas:e.quotas};return{plan:"Groq",message:"Groq connected. No chat-capable model available to read rate limits."}}let f=await (0,d.proxyAwareFetch)(aj,{method:"POST",headers:{Authorization:`Bearer ${c}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({model:a,messages:[{role:"user",content:"hi"}],max_tokens:1,stream:!1})},b);if(401===f.status||403===f.status)return{plan:"Groq",message:"Groq authentication failed. Check the API key."};if(!f.ok){let a=await f.text().catch(()=>"");if(e)return{plan:"Groq",quotas:e.quotas};return{plan:"Groq",message:`Groq usage API error (${f.status})${a?`: ${a.slice(0,120)}`:""}`}}await f.text().catch(()=>{});let g=function(a){let b=ao(a,"x-ratelimit-limit-requests","x-ratelimit-remaining-requests","x-ratelimit-reset-requests"),c=ao(a,"x-ratelimit-limit-tokens","x-ratelimit-remaining-tokens","x-ratelimit-reset-tokens");if(!b&&!c)return null;let d={};return b&&(d.Requests=b),c&&(d.Tokens=c),d}(f.headers);if(!g){if(e)return{plan:"Groq",quotas:e.quotas};return{plan:"Groq",message:"Groq connected. No rate-limit data reported for this key yet.",quotas:{}}}return al.set(c,{quotas:g,at:Date.now(),model:a}),{plan:"Groq",quotas:g}}catch(a){if(e)return{plan:"Groq",quotas:e.quotas};return{message:`Groq error: ${a.message}`}}}var ar=c(49804);function as(a){if(null==a)return{unlimited:!1,total:0};if("unlimited"===a||a?.unlimited===!0)return{unlimited:!0,total:0};if("number"==typeof a&&Number.isFinite(a))return{unlimited:!1,total:Math.max(0,a)};if("string"==typeof a){let b=a.trim();if("unlimited"===b)return{unlimited:!0,total:0};let c=Number(b);if(Number.isFinite(c))return{unlimited:!1,total:Math.max(0,c)}}let b=a.limited??a.Limited;return"number"==typeof b&&Number.isFinite(b)?{unlimited:!1,total:Math.max(0,b)}:{unlimited:!1,total:0}}function at(a,b,c,d=null){let e=Math.max(0,(0,f.IQ)(b,0)),g=as(c);if(g.unlimited)return{used:e,total:0,remainingPercentage:100,resetAt:d||null,unlimited:!0};let h=g.total;if(h<=0)return{used:e,total:0,remainingPercentage:0,resetAt:d||null,unlimited:!1};let i=Math.min(e,h),j=Math.max(0,h-i);return{used:i,total:h,remainingPercentage:j/h*100,resetAt:d||null,unlimited:!1}}function au(a){return a&&"object"==typeof a?null!=a.limit?a.limit:a:null}async function av(a=null,b={},c=null){let d=b||{},e=d.userId;if(!a||"string"!=typeof a||!a.trim())return{message:"Zed access token not available. Re-connect Zed to view quota."};if(!e)return{message:"Zed credential is missing user id. Re-connect Zed to view quota."};let g={accessToken:a.trim(),providerSpecificData:d};try{let a=await (0,ar.qJ)(g,{proxyOptions:c});return function(a){let b,c=a?.plan||{},d=c.plan_v3||c.plan_v2||c.plan||a?.plan_v3||null,e=(0,f.eZ)(c.subscription_period?.ended_at)||(0,f.eZ)(c.subscriptionPeriod?.endedAt)||null,g={},h=c.usage||{},i=h.edit_predictions||h.editPredictions;i&&(g["Edit Predictions"]=at("Edit Predictions",i.used,i.limit,e));let j=h.model_requests||h.modelRequests;if(j){let a=null!=j.limit?j.limit:au(j)?.limit,b=as(a);(b.unlimited||b.total>0)&&(g["Hosted Model Requests"]=at("Hosted Model Requests",j.used,a,e))}let k=j&&!(b=as(j.limit??au(j)?.limit)).unlimited&&0===b.total?"Hosted AI models are billed per token (not request count). Edit Predictions are tracked below. Token spend is on dashboard.zed.dev.":null,l=function(a){let b=String(a||"").trim();if(!b)return"Zed";switch(b.toLowerCase()){case"zed_free":return"Zed Free";case"zed_pro":return"Zed Pro";case"zed_pro_trial":return"Zed Pro Trial";case"zed_student":return"Zed Student";case"zed_business":return"Zed Business";default:return b.replace(/_/g," ").split(/\s+/).map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join(" ")}}(d);(c.trial_started_at||c.trialStartedAt)&&!/trial/i.test(l)&&(l=`${l} (Trial active)`);let m=k;return(c.has_overdue_invoices||c.hasOverdueInvoices)&&(m="This Zed account has overdue invoices. Usage may be blocked until billing is resolved."),{plan:l,quotas:g,message:m,hasOverdueInvoices:!!(c.has_overdue_invoices||c.hasOverdueInvoices),trialStarted:!!(c.trial_started_at||c.trialStartedAt),planId:d||null,resetAt:e}}(a)}catch(b){let a=b?.status;if(401===a||403===a)return{message:"Zed authentication failed. Sign in again from the dashboard or Zed editor."};return{message:`Zed error: ${b.message||"Failed to fetch quota"}`}}}async function aw(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"APInex API key not available. Add a key to view usage."};let c={Authorization:`Bearer ${a.trim()}`,Accept:"application/json"};try{let[a,e]=await Promise.all([(0,d.proxyAwareFetch)("https://api.apinex.bond/v1/balance",{method:"GET",headers:c},b),(0,d.proxyAwareFetch)("https://api.apinex.bond/v1/subscription",{method:"GET",headers:c},b)]);if(401===a.status||403===a.status)return{plan:"APInex",message:"APInex authentication failed. Check the API key."};let g=a.ok?function(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.balance_usd??a.balanceUsd,0),c=(0,f.IQ)(a.reserved_usd??a.reservedUsd,0),d=a.api_key&&"object"==typeof a.api_key?a.api_key:null;return{balanceUsd:b,reservedUsd:c,key:d?{spentUsd:(0,f.IQ)(d.spent_usd??d.spentUsd,0),limitUsd:d.spend_limit_usd??d.spendLimitUsd??null,remainingUsd:d.remaining_usd??d.remainingUsd??null,limitReached:!0===d.limit_reached||!0===d.limitReached}:null}}(await a.json().catch(()=>null)):null,h=e.ok?function(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.token_limit??a.tokenLimit,0),c=(0,f.IQ)(a.tokens_used??a.tokensUsed,0),d=a.tokens_remaining??a.tokensRemaining??null;return{mode:"subscription"===a.mode?"subscription":"free",plan:a.plan||null,planLabel:a.plan_label||a.planLabel||"FREE",tokenLimit:b,tokensUsed:c,tokensRemaining:null==d?Math.max(0,b-c):(0,f.IQ)(d,0),unlimited:!0===a.unlimited,allowed:!1!==a.allowed,resetsAt:a.resets_at_utc||a.resetsAtUtc||null}}(await e.json().catch(()=>null)):null;if(!g&&!h)return{plan:"APInex",message:"APInex connected. No usage data returned."};let i={};if(g){let a=Math.max(0,g.balanceUsd);if(i["Wallet (USD)"]={used:0,total:a,remainingPercentage:100*(a>0),resetAt:null,unlimited:a>0},g.reservedUsd>0&&(i["Reserved (USD)"]={used:g.reservedUsd,total:0,remaining:0,remainingPercentage:100,unlimited:!0}),g.key?.limitUsd!==null&&g.key?.limitUsd!==void 0){let a=Math.max(0,g.key.limitUsd),b=Math.max(0,g.key.spentUsd);i["Key spend (USD)"]={used:b,total:a,remaining:Math.max(0,a-b),remainingPercentage:a>0?Math.min(100,(a-b)/a*100):0,resetAt:null,unlimited:!1}}}return h&&h.tokenLimit>0&&(i["subscription"===h.mode?"Plan tokens":"Daily tokens"]={used:h.tokensUsed,total:h.tokenLimit,remaining:h.tokensRemaining,remainingPercentage:h.unlimited?100:Math.min(100,Math.max(0,h.tokensRemaining/h.tokenLimit*100)),resetAt:h.resetsAt||null,unlimited:h.unlimited}),{plan:h?h.planLabel||("subscription"===h.mode?"Subscription":"FREE"):"APInex",quotas:i,...h&&!h.allowed?{message:"APInex quota exhausted (allowed=false)."}:{}}}catch(a){return{message:`APInex error: ${a.message}`}}}let ax="https://www.getunikey.ai/v1/dashboard/billing",ay=`${ax}/usage`,az=`${ax}/subscription`,aA="UniKey",aB=[/remaining quota:\s*Credits?\s*([0-9]+(?:\.[0-9]+)?)/i,/用户剩余额度:\s*Credits?\s*([0-9]+(?:\.[0-9]+)?)/];async function aC(a,b){try{let e=await (0,d.proxyAwareFetch)("https://www.getunikey.ai/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({model:"gpt-6-astra",max_tokens:1e5,messages:[{role:"user",content:"hi"}]})},b),g=await e.text().catch(()=>""),h=g;try{h=JSON.parse(g)?.error?.message||g}catch{}var c=h;if(!c||"string"!=typeof c)return null;for(let a of aB){let b=c.match(a);if(b){let a=(0,f.IQ)(b[1],0/0);if(!Number.isNaN(a))return a}}return null}catch{return null}}async function aD(a=null,b=null,c=null){if(!a||"string"!=typeof a||!a.trim())return{message:`${aA} API key not available. Add a key to view usage.`};let e=a.trim(),g={Authorization:`Bearer ${e}`,Accept:"application/json"};try{var h;let[a,i]=await Promise.all([(0,d.proxyAwareFetch)(ay,{method:"GET",headers:g},c),(0,d.proxyAwareFetch)(az,{method:"GET",headers:g},c)]);if(401===a.status||403===a.status)return{plan:aA,message:`${aA} authentication failed. Check the API key.`};let j=a.ok?function(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.total_usage??a.totalUsage,0/0);return Number.isNaN(b)?null:{spentUsd:Math.max(0,b),spentCredits:100*Math.max(0,b)}}(await a.json().catch(()=>null)):null,k=i.ok?(h=await i.json().catch(()=>null))&&"object"==typeof h?{limitUsd:[(0,f.IQ)(h.hard_limit_usd??h.hardLimitUsd,0/0),(0,f.IQ)(h.soft_limit_usd??h.softLimitUsd,0/0),(0,f.IQ)(h.system_hard_limit_usd??h.systemHardLimitUsd,0/0)].find(a=>!Number.isNaN(a)&&a>0)??null,hasPaymentMethod:!0===h.has_payment_method||!0===h.hasPaymentMethod}:null:null;if(!j&&!k)return{plan:aA,message:`${aA} connected. No usage data returned.`};let l=function(a){if(!a||"object"!=typeof a)return 5e3;let b=a.unikeyTotalCredits;if(null==b||""===b)return 5e3;let c=(0,f.IQ)(b,0/0);return Number.isNaN(c)||c<=0?5e3:c}(b),m=k?.hasPaymentMethod?`${aA} (paid)`:aA,n={};if(j){let a=j.spentCredits,d=Math.max(0,l-a);if(b?.unikeyProbeBalance===!0){let a=await aC(e,c);null!==a&&(d=a)}n.Credits={used:a,total:l,remaining:d,remainingPercentage:Math.min(100,Math.max(0,d/l*100)),resetAt:null,unlimited:!1}}return{plan:m,quotas:n}}catch(a){return{message:`${aA} error: ${a.message}`}}}var aE=c(53225);let aF={international:(0,f.U)("glm").url,china:(0,f.U)("glm-cn").url};async function aG(a,b,c=null){if(!a)return{message:"GLM API key not available."};let e=aF["glm-cn"===b?"china":"international"];try{let b=await (0,d.proxyAwareFetch)(e,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),{plan:g,quotas:h}=function(a){let b=a?.data&&"object"==typeof a.data?a.data:{},c=Array.isArray(b.limits)?b.limits:[],d={};for(let a of c){if(!a||"TOKENS_LIMIT"!==a.type&&"CREDIT_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,e=Math.max(0,100-b);d[3===a.unit?`Session (${a.number}h)`:6===a.unit?"Weekly (7d)":"TOKENS_LIMIT"===a.type?"Tokens":`Limit (${a.number})`]={used:b,total:100,remaining:e,remainingPercentage:e,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let e="string"==typeof b.level?b.level:"";return{plan:e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"Unknown",quotas:d}}(f);return{plan:g,quotas:h}}catch(a){return{message:`GLM error: ${a.message}`}}}let aH=(process.env.COMMAND_CODE_API_BASE_URL||"https://api.commandcode.ai").replace(/\/$/,""),aI={"individual-go":"Go","individual-goat":"GOAT","individual-pro":"Pro","individual-pro-v1":"Pro","individual-provider":"Provider","individual-max":"Max","individual-ultra":"Ultra","teams-pro":"Teams Pro"},aJ={"individual-go":10,"individual-goat":70,"individual-pro":30,"individual-pro-v1":80,"individual-provider":15,"individual-max":150,"individual-ultra":300,"teams-pro":40};function aK(a,b){let c=new URLSearchParams(Object.entries(b||{}).filter(([,a])=>null!=a)).toString();return c?`${a}?${c}`:a}function aL(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.used,0),c=(0,f.IQ)(a.cap,0);return c<=0&&b<=0?null:{used:b,total:c,remaining:Math.max(0,c-b),unlimited:!1,resetAt:(0,f.eZ)(a.resetAt)}}async function aM(a,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Command Code API key not available. Add a key to view usage."};let c={Authorization:`Bearer ${a.trim()}`,Accept:"application/json"},e=async a=>await (0,d.proxyAwareFetch)(aH+a,{method:"GET",headers:c},b);try{let a=await e(aK("/alpha/whoami",{limits:"1"}));if(401===a.status||403===a.status)return{plan:"Command Code",message:"Command Code authentication failed. Check the API key."};if(!a.ok)return{plan:"Command Code",message:`Command Code usage API error (${a.status})`};let b=await a.json().catch(()=>({})),c=b?.org?.id??null,[d,g]=await Promise.all([e(aK("/alpha/billing/credits",{orgId:c})),e(aK("/alpha/billing/subscriptions",{orgId:c}))]);if(401===d.status||403===d.status||401===g.status||403===g.status)return{plan:"Command Code",message:"Command Code authentication failed. Check the API key."};if(!d.ok)return{plan:"Command Code",message:`Command Code credits API error (${d.status})`};if(!g.ok)return{plan:"Command Code",message:`Command Code subscriptions API error (${g.status})`};let h=await d.json().catch(()=>({})),i=await g.json().catch(()=>({})),j=i?.data?.planId??null,k=j&&aI[j]||j||"Command Code",l=j&&aJ[j]||0,m=h?.credits||{},n=(0,f.IQ)(m.monthlyCredits,0)+(0,f.IQ)(m.purchasedCredits,0)+(0,f.IQ)(m.freeCredits,0),o=l>0?Math.max(0,l-n):0,p={};p.Credits={used:o,total:l>0?l:n,remaining:n,unlimited:l<=0,resetAt:(0,f.eZ)(i?.data?.currentPeriodEnd)};let q=aL(h?.windowLimits?.fiveHour);q&&(p["Session (5h)"]=q);let r=aL(h?.windowLimits?.weekly);return r&&(p.Weekly=r),{plan:k,quotas:p}}catch(a){return{message:`Command Code error: ${a.message}`}}}let aN=(0,f.U)("vercel-ai-gateway").url;async function aO(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}let aP={session:"Session (5h)",weekly:"Weekly (7d)",monthly:"Monthly"};async function aQ(a,b,c=null){if(!a)return{message:"Ollama Cloud API key not available."};try{let b,e=await (0,d.proxyAwareFetch)("https://ollama.com/api/usage",{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(401===e.status||403===e.status)return{message:"Ollama Cloud API key invalid or expired."};if(!e.ok)return{message:`Ollama Cloud usage API error (${e.status}).`};try{b=await e.json()}catch{return{message:"Ollama Cloud usage response was not JSON."}}let f=await (0,d.proxyAwareFetch)("https://ollama.com/api/me",{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Length":"0"}},c).then(a=>a.ok?a.json():null).catch(()=>null),g="string"==typeof f?.Plan?f.Plan:"",h=g?g.charAt(0).toUpperCase()+g.slice(1).toLowerCase():"Ollama Cloud",i=b?.limits&&"object"==typeof b.limits?b.limits:{},j="free"===g.toLowerCase()&&f?.CreatedAt?function(a,b=new Date){let c=new Date(a);if(Number.isNaN(c.getTime()))return null;let d=(b.getUTCFullYear()-c.getUTCFullYear())*12+(b.getUTCMonth()-c.getUTCMonth());for(let a=Math.max(0,d);a<=d+1;a++){let d=function(a,b){let c=a.getUTCMonth()+b,d=a.getUTCFullYear()+Math.floor(c/12),e=(c%12+12)%12,f=new Date(Date.UTC(d,e+1,0)).getUTCDate();return new Date(Date.UTC(d,e,Math.min(a.getUTCDate(),f),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()))}(c,a);if(d>b)return d.toISOString()}return null}(f.CreatedAt):null,k={};for(let[a,b]of Object.entries(aP)){let c=i[a]?.usage;if(null==c)continue;let d=Number(c);Number.isNaN(d)||(k[b]=function(a,b=null){let c=Math.round(100*Math.max(0,Math.min(1,Number(a)||0)));return{used:c,total:100,remainingPercentage:100-c,resetAt:b,unlimited:!1}}(d,"monthly"===a?j:null))}if(0===Object.keys(k).length)return{plan:h,message:"Ollama Cloud connected. No usage limits reported.",quotas:{}};return{plan:h,quotas:k}}catch(a){return{message:`Ollama Cloud error: ${a.message}`}}}async function aR(a,b=null){if(!a)return{message:"Vercel AI Gateway API key not available."};try{let c=await (0,d.proxyAwareFetch)(aN,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{message:"Vercel AI Gateway API key invalid or expired."};if(!c.ok){let a=await c.text().catch(()=>""),b=a?`: ${a.slice(0,200)}`:"";return{message:`Vercel AI Gateway credits API error (${c.status})${b}`}}let e=await c.json(),f=Number(e?.balance)||0,g=Number(e?.total_used)||0;if(f<=0&&g<=0)return{plan:"Pay-as-you-go",message:"Vercel AI Gateway connected. No credit allocation found (BYOK or unfunded account).",quotas:{}};return{plan:"Pay-as-you-go",quotas:{"Used (USD)":{used:g,total:0,remaining:0,remainingPercentage:100,unlimited:!0},"Remaining (USD)":{used:f,total:5,remaining:f,remainingPercentage:f/5*100,unlimited:!1}}}}catch(a){return{message:`Vercel AI Gateway error: ${a.message}`}}}async function aS(a,b=null,c="qoder"){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let e=await (0,d.proxyAwareFetch)((0,f.U)(c).url,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!e.ok)return{message:`Qoder connected. Usage fetch returned ${e.status}.`};let g=await e.json().catch(()=>null);if(!g)return{message:"Qoder connected. Usage response was not JSON."};let h=g.userQuota||{},i=g.orgResourcePackage||{},j=Number.isFinite(Number(g.expiresAt))&&Number(g.expiresAt)>0?Number(g.expiresAt):null,k=j?new Date(j).toISOString():null;return{quotas:{user:{total:Number(h.total)||0,used:Number(h.used)||0,remaining:Number(h.remaining)||0,unit:h.unit||"credits",resetAt:k},organization:{total:Number(i.total)||0,used:Number(i.used)||0,remaining:Number(i.remaining)||0,unit:i.unit||"credits",resetAt:k}},totalUsagePercentage:Number(g.totalUsagePercentage)||0,isQuotaExceeded:!!g.isQuotaExceeded,expiresAt:j}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}let aT={github:a=>h(a.accessToken,a.providerSpecificData,a.proxyOptions),"gemini-cli":a=>(0,j.N)(a.accessToken,a.providerDataWithProjectId,a.proxyOptions),antigravity:a=>(0,j.c)(a.accessToken,a.providerSpecificData,a.proxyOptions,{force:a.force}),claude:a=>(0,k.gl)(a.accessToken,a.proxyOptions,{force:a.force}),codex:a=>(0,l.Tl)(a.accessToken,a.proxyOptions),kiro:a=>n(a.accessToken,a.providerSpecificData,a.proxyOptions),qoder:a=>aU(a),"qoder-cn":a=>aU(a),iflow:a=>aO(a.accessToken),ollama:a=>aQ(a.apiKey,a.providerSpecificData,a.proxyOptions),glm:a=>aG(a.apiKey||a.accessToken,a.provider,a.proxyOptions),"glm-cn":a=>aG(a.apiKey||a.accessToken,a.provider,a.proxyOptions),minimax:a=>v(a.apiKey,a.provider,a.proxyOptions),"minimax-cn":a=>v(a.apiKey,a.provider,a.proxyOptions),"minimax-code":a=>J(a),"minimax-code-global":a=>J(a),"vercel-ai-gateway":a=>aR(a.apiKey,a.proxyOptions),"codebuddy-cn":a=>M(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"codebuddy-intl":a=>N(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"grok-cli":a=>_(a.accessToken,a.providerSpecificData,a.proxyOptions),kimi:a=>ad(a.accessToken,a.apiKey,a.proxyOptions,a.providerSpecificData),"opencode-go":a=>ah(a.apiKey,a.proxyOptions),deepseek:a=>ae(a.apiKey,a.proxyOptions),groq:a=>aq(a.apiKey,a.proxyOptions),zed:a=>av(a.accessToken,a.providerSpecificData,a.proxyOptions),apinex:a=>aw(a.apiKey,a.proxyOptions),unikey:a=>aD(a.apiKey,a.providerSpecificData,a.proxyOptions),commandcode:a=>aM(a.apiKey,a.proxyOptions)};async function aU(a){let b=await (0,aE._M)(a,a.proxyOptions).catch(()=>null);return aS(b?.accessToken||a.accessToken,a.proxyOptions,a.provider||"qoder")}async function aV(a,b=null,c={}){let{provider:d,accessToken:e,apiKey:f,providerSpecificData:g,projectId:h}=a,i={...g||{},...h?{projectId:h}:{}},j=aT[d];return j?await j({provider:d,accessToken:e,apiKey:f,providerSpecificData:g,providerDataWithProjectId:i,proxyOptions:b,force:!0===c.force}):{message:`Usage API not implemented for ${d}`}}},85081:(a,b,c)=>{c.d(b,{Ay:()=>j});var d=c(77598);let e=function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),(0,d.createHash)("sha1").update(a).digest()},f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,g=function(a){let b;if(!("string"==typeof a&&f.test(a)))throw TypeError("Invalid UUID");return Uint8Array.of((b=parseInt(a.slice(0,8),16))>>>24,b>>>16&255,b>>>8&255,255&b,(b=parseInt(a.slice(9,13),16))>>>8,255&b,(b=parseInt(a.slice(14,18),16))>>>8,255&b,(b=parseInt(a.slice(19,23),16))>>>8,255&b,(b=parseInt(a.slice(24,36),16))/0x10000000000&255,b/0x100000000&255,b>>>24&255,b>>>16&255,b>>>8&255,255&b)};var h=c(50122);function i(a,b,c,d){var f=b,i=d;let j="string"==typeof a?function(a){let b=new Uint8Array((a=unescape(encodeURIComponent(a))).length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}(a):a,k="string"==typeof f?g(f):f;if("string"==typeof f&&(f=g(f)),f?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+j.length);if(l.set(k),l.set(j,k.length),(l=e(l))[6]=15&l[6]|80,l[8]=63&l[8]|128,c){if((i=i||0)<0||i+16>c.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)c[i+a]=l[a];return c}return(0,h.k)(l)}i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";let j=i}};
1
+ "use strict";exports.id=7211,exports.ids=[7211],exports.modules={6551:(a,b,c)=>{c.d(b,{RO:()=>m,Tl:()=>k,Yt:()=>l});var d=c(39609),e=c(24295);let f={usageUrl:(0,e.U)("codex").url,resetCreditsUrl:(0,e.U)("codex").resetCreditsUrl,resetCreditsConsumeUrl:(0,e.U)("codex").resetCreditsConsumeUrl};function g(a){if(!a)return null;let b=a instanceof Date?a:new Date("number"==typeof a&&a<1e12?1e3*a:a);return Number.isFinite(b.getTime())?b.toISOString():null}function h(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function i(a){let b=Math.max(0,Math.min(100,(0,e.IQ)(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:(0,e.eZ)(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function j(a,b,c){let d=h(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=i(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=i(f),g=!0),g}async function k(a,b=null){try{let c=await (0,d.proxyAwareFetch)(f.usageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let g=await c.json(),i=g.rate_limit||g.rate_limits||g.rate_limits_by_limit_id?.codex||{},k=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(g),l=function(a){if(a.spark_rate_limit||a.gpt_5_3_codex_spark_rate_limit)return a.spark_rate_limit||a.gpt_5_3_codex_spark_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b["gpt-5.3-codex-spark"]||b.gpt_5_3_codex_spark||b.spark||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return b.includes("spark")||b.includes("5.3-codex-spark")})||null}(g),m=Math.max(0,(0,e.IQ)(g.rate_limit_reset_credits?.available_count,0)),n={};return j(n,"",i),j(n,"review",k),j(n,"spark",l),{plan:g.plan_type||g.summary?.plan||"unknown",limitReached:h(i)?.limit_reached||!1,reviewLimitReached:h(k)?.limit_reached||!1,sparkLimitReached:h(l)?.limit_reached||!1,resetCredits:{availableCount:m},quotas:n}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function l(a,b=null,c=null){var h,i;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");let j=c?.workspaceId||c?.accountId||c?.chatgptAccountId||null,k={Authorization:`Bearer ${a}`,Accept:"application/json","OpenAI-Beta":"codex-1",originator:"codex_cli_rs"};j&&(k["ChatGPT-Account-ID"]=j);let m=await (0,d.proxyAwareFetch)(f.resetCreditsUrl,{method:"GET",headers:k},b),n=null;try{n=await m.json()}catch{n=null}if(!m.ok)throw Error((h=n?.message||n?.error||n?.detail,i=`Codex reset credits API unavailable (${m.status}).`,h?"string"==typeof h?h:"string"==typeof h.message?h.message:JSON.stringify(h):i));let o=Array.isArray(n?.credits)?n.credits:[];return{availableCount:Math.max(0,(0,e.IQ)(n?.available_count??n?.availableCount,0)),credits:o.map(a=>({status:String(a?.status||"unknown"),grantedAt:g(a?.granted_at??a?.grantedAt),expiresAt:g(a?.expires_at??a?.expiresAt)}))}}async function m(a,b,c=null){let g;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");if(!b||"string"!=typeof b)throw Error("A redeem request id is required to consume a Codex reset credit.");let h=null;try{g=await (0,d.proxyAwareFetch)(f.resetCreditsConsumeUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({redeem_request_id:b})},c);let e=await g.text();h=e?JSON.parse(e):null}catch(a){throw Error(`Failed to consume Codex reset credit: ${a.message}`)}let i=h?.code||null,j=(0,e.IQ)(h?.windows_reset,0);return{ok:g.ok&&("reset"===i||j>0),noCredit:g.ok&&"no_credit"===i,status:g.status,code:i,windowsReset:j,message:h?.message||null,raw:h}}},18271:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>n,refreshAndUpdateCredentials:()=>m});var e=c(48895),f=c(89718),g=c(77376),h=c(8521),i=c(55330),j=c(39326),k=c(40615),l=a([e,i]);[e,i]=l.then?(await l)():l;let o=["expired","authentication","unauthorized","401","re-authorize"];async function m(a,b=!1,c=null){let d=a.id?await (0,f.Mc)(a.id):null;d&&(a=d);let e=(0,i.SB)(a.provider),g={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||e.needsRefresh(g)))return{connection:a,refreshed:!1};let j=await e.refreshCredentials(g,console,c);if(j&&(0,h.jT)(j))throw Error("Refresh token invalid or reused. Please re-authorize the connection.");if(!j){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let k={updatedAt:new Date().toISOString()};j.accessToken&&(k.accessToken=j.accessToken),j.refreshToken&&(k.refreshToken=j.refreshToken),j.idToken&&(k.idToken=j.idToken),j.lastRefreshAt&&(k.lastRefreshAt=j.lastRefreshAt),j.expiresIn?(k.expiresAt=new Date(Date.now()+1e3*j.expiresIn).toISOString(),k.expiresIn=j.expiresIn):j.expiresAt&&(k.expiresAt=j.expiresAt);let l={...j.providerSpecificData||{},...j.copilotToken?{copilotToken:j.copilotToken}:{},...j.copilotTokenExpiresAt?{copilotTokenExpiresAt:j.copilotTokenExpiresAt}:{}};return Object.keys(l).length>0&&(k.providerSpecificData={...a.providerSpecificData||{},...l}),await (0,f.updateProviderConnection)(a.id,k),{connection:{...a,...k,providerSpecificData:k.providerSpecificData||a.providerSpecificData},refreshed:!0}}async function n(a,{params:b}){let c;try{let{connectionId:d}=await b,e="1"===new URL(a.url).searchParams.get("force");if(!(c=await (0,f.Mc)(d)))return Response.json({error:"Connection not found"},{status:404});let h="oauth"===c.authType,i=("apikey"===c.authType||"api_key"===c.authType)&&k.jO.includes(c.provider);if(!h&&!i)return Response.json({message:"Usage not available for this connection"});let l=await (0,j.B)(c.providerSpecificData),n={connectionProxyEnabled:!0===l.connectionProxyEnabled,connectionProxyUrl:l.connectionProxyUrl||"",connectionNoProxy:l.connectionNoProxy||"",vercelRelayUrl:l.vercelRelayUrl||"",relayType:l.relayType||"",strictProxy:!1};if(h)try{c=(await m(c,!1,n)).connection}catch(a){return console.error("[Usage API] Credential refresh failed:",a),Response.json({error:`Credential refresh failed: ${a.message}`},{status:401})}let p=await (0,g.my)(c,n,{force:e});if(h&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return o.some(a=>b.includes(a))}(p)&&c.refreshToken)try{c=(await m(c,!0,n)).connection,p=await (0,g.my)(c,n,{force:e})}catch(a){console.warn(`[Usage] ${c.provider}: force refresh failed: ${a.message}`)}return Response.json(p)}catch(b){let a=c?.provider??"unknown";return console.warn(`[Usage] ${a}: ${b.message}`),Response.json({error:b.message},{status:500})}}d()}catch(a){d(a)}})},69788:(a,b,c)=>{c.d(b,{Ut:()=>l,gl:()=>j});var d=c(39609),e=c(74129),f=c(24295);let g={oauthUsageUrl:(0,f.U)("claude").oauthUrl,usageUrl:(0,f.U)("claude").orgUrl,settingsUrl:(0,f.U)("claude").settingsUrl,profileUrl:(0,f.U)("claude").profileUrl,resetUrl:(0,f.U)("claude").resetUrl,apiVersion:e.b8,userAgent:`claude-cli/${e.t4} (external, cli)`},h=new Map,i=new Map;async function j(a,b=null,c={}){let d=c?.force===!0;if(!d&&a){let b=i.get(a);if(b?.promise)return b.promise;if(b&&b.expiresAt>Date.now())return b.result}let e=!d&&a&&i.get(a)?.result||null,f=(async()=>{let c=await k(a,b);return a&&c?.quotas?(i.set(a,{result:c,expiresAt:Date.now()+3e5}),c):e||c})();return a&&i.set(a,{promise:f}),f}async function k(a,b=null){try{let c=h.get(a);if(c&&Date.now()<c)return await m(a,b);let e=await (0,d.proxyAwareFetch)(`${g.oauthUsageUrl}?cedar_ember=1`,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion,"User-Agent":g.userAgent}},b);if(e.ok){let a=await e.json(),b={},c=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,d=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:(0,f.eZ)(a.resets_at),unlimited:!1}};for(let[e,f]of(c(a.five_hour)&&(b["session (5h)"]=d(a.five_hour)),c(a.seven_day)&&(b["weekly (7d)"]=d(a.seven_day)),Object.entries(a)))if(e.startsWith("seven_day_")&&"seven_day"!==e&&c(f)){let a=e.replace("seven_day_","");b[`weekly ${a} (7d)`]=d(f)}if(Array.isArray(a.limits))for(let c of a.limits){if(c?.kind!=="weekly_scoped")continue;let a=String(c?.scope?.model?.display_name||"").trim().toLowerCase();a&&"number"==typeof c.percent&&(b[`weekly ${a} (7d)`]=d({utilization:Math.max(0,Math.min(100,c.percent)),resets_at:c.resets_at}))}return{plan:"Claude Code",extraUsage:a.extra_usage??null,resetCredits:function(a){if(!a?.eligible||!Array.isArray(a.grants))return null;let b=a.grants.filter(a=>a?.id&&!a.paused&&Number(a.resets_left)>0),c=b.find(b=>b.id===a.next_grant_id)||b[0]||null;return{availableCount:b.reduce((a,b)=>a+Number(b.resets_left),0),nextGrantId:c?.id||null,expiresAt:c?.ends_at||null,clears:c?.clears||[],cooldownUntil:a.cooldown_until||null,weeklyResetsAt:a.weekly_resets_at||null,grants:a.grants.filter(a=>a?.id).map(a=>({id:a.id,label:a.label||"",resetsLeft:Number(a.resets_left)||0,resetsTotal:Number(a.resets_total)||0,startsAt:a.starts_at||null,endsAt:a.ends_at||null,clears:Array.isArray(a.clears)?a.clears:[],paused:!0===a.paused,usableNow:!0===a.usable_now,useRequiresLimit:!1!==a.use_requires_limit}))}}(a.cedar_ember),quotas:b}}return 429===e.status&&h.set(a,Date.now()+18e4),console.warn(`[Claude Usage] OAuth endpoint returned ${e.status}, falling back to legacy`),await m(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function l(a,b,c=null){if(!a)throw Error("No Claude access token available. Please re-authorize the connection.");if(!/^[a-z0-9_-]{1,40}$/.test(b||""))throw Error("Invalid reset grant id.");let e={Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion,"User-Agent":g.userAgent,"Content-Type":"application/json"},f=await (0,d.proxyAwareFetch)(g.profileUrl,{method:"GET",headers:e},c),h=await f.json().catch(()=>null),j=h?.organization?.uuid;if(!f.ok||!j)throw Error(`Cannot resolve Claude organization (${f.status}).`);let k=await (0,d.proxyAwareFetch)(g.resetUrl.replace("{org_id}",j),{method:"POST",headers:e,body:JSON.stringify({program:"cedar_ember",grant_id:b,request_id:crypto.randomUUID()})},c),m=await k.json().catch(()=>null);return i.delete(a),{ok:k.ok&&m?.result==="reset",status:k.status,result:m?.result||null,reason:m?.reason||null,resetsLeft:m?.resets_left??null,message:m?.error?.message||null}}async function m(a,b=null){try{let c=await (0,d.proxyAwareFetch)(g.settingsUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let e=await c.json();if(e.organization_id){let c=await (0,d.proxyAwareFetch)(g.usageUrl.replace("{org_id}",e.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let a=await c.json();return{plan:e.plan||"Unknown",organization:e.organization_name,quotas:a}}}return{plan:e.plan||"Unknown",organization:e.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}},77376:(a,b,c)=>{c.d(b,{Ut:()=>k.Ut,RO:()=>l.RO,Yt:()=>l.Yt,my:()=>a0});var d=c(39609),e=c(6118),f=c(24295);let g={apiVersion:e.sr.github?.apiVersion,userAgent:e.sr.github?.userAgent};async function h(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,d.proxyAwareFetch)((0,f.U)("github").url,{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":g.apiVersion,"User-Agent":g.userAgent,"Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let e=await b.json();if(e.quota_snapshots){let a=e.quota_snapshots,b=(0,f.eZ)(e.quota_reset_date);return{plan:e.copilot_plan,resetDate:e.quota_reset_date,quotas:{chat:{...i(a.chat),resetAt:b},completions:{...i(a.completions),resetAt:b},premium_interactions:{...i(a.premium_interactions),resetAt:b}}}}if(e.monthly_quotas||e.limited_user_quotas){let a=e.monthly_quotas||{},b=e.limited_user_quotas||{},c=(0,f.eZ)(e.limited_user_reset_date);return{plan:e.copilot_plan||e.access_type_sku,resetDate:e.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function i(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}var j=c(87283),k=c(69788),l=c(6551),m=c(6382);async function n(a,b,c=null){let e=b?.authMethod||"builder-id",g="api_key"===e,h=g?{tokentype:"API_KEY"}:{},i="external_idp"===e?{TokenType:"EXTERNAL_IDP"}:{},j=g?b?.profileArn||"":b?.profileArn||(0,m.We)(e),k=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),l=!1,o=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").cwHost}${(0,f.U)("kiro").limitsPath}?${k.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE",...h,...i}},c)},{name:"codewhisperer-post",run:async()=>(0,d.proxyAwareFetch)((0,f.U)("kiro").cwHost,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json",...h,...i},body:JSON.stringify({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",...j?{profileArn:j}:{},resourceType:"AGENTIC_REQUEST"});return(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").qHost}${(0,f.U)("kiro").limitsPath}?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json",...h,...i}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(l=!0),o.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=(0,f.eZ)(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,g=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:g,remaining:g-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,g=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:g,remaining:g-e,resetAt:(0,f.eZ)(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){o.push(`${b.name}:${a.message}`)}return l&&"idc"===e?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:l&&("google"===e||"github"===e)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:l?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:o.length>0?`Unable to fetch Kiro usage right now. (${o[o.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}let o={minimax:(0,f.U)("minimax").urls,"minimax-cn":(0,f.U)("minimax-cn").urls};function p(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function q(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function r(a){return Math.max(0,Number(p(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function s(a){return Math.max(0,Number(p(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function t(a){return!!(r(a)>0||s(a)>0)||null!==q(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==q(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function u(a,b,c,d,e,g,h,i,j,k){let l=d(c),m=q(c,h,i);if(l<=0&&null===m)return;let n=Math.max(0,Number(p(c,e,g))||0),o=l,r=n;l<=0&&(o=100,r=k?Math.round(m/100*o):Math.round(o*(1-m/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,r,function(a,b,c,d,e,g){let h=Number(p(a,c,d))||0;return h>0?new Date(b+h).toISOString():(0,f.eZ)(p(a,e,g))}(c,...j),k,m)}async function v(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let e=o[b]||[],f="";for(let b=0;b<e.length;b+=1){let g=e[b],h=b<e.length-1;try{let b=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),e=await b.text(),i={};if(e)try{i=JSON.parse(e)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${e}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,q=(Array.isArray(o)?o:[]).filter(t);if(0===q.length)return{message:"MiniMax connected. No quota data was returned."};let v=Date.now(),w=g.includes("/coding_plan/remains"),x={};for(let a of q){let b=function(a){let b=String(p(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);u(x,`${b} (5h)`,a,r,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[v,"remains_time","remainsTime","end_time","endTime"],w),u(x,`${b} (7d)`,a,s,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[v,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],w)}if(0===Object.keys(x).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:x}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}var w=c(77598);let x="I*7Cf%WZ#S&%1RlZJ&C2",y={"minimax-code":{agent:"https://agent.minimaxi.com",platform:"https://www.minimaxi.com",lang:"zh"},"minimax-code-global":{agent:"https://agent.minimax.io",platform:"https://platform.minimax.io",lang:"en"}},z=a=>(0,w.createHash)("md5").update(a).digest("hex"),A=a=>a&&"object"==typeof a&&!Array.isArray(a)?a:void 0,B=a=>"number"==typeof a&&Number.isFinite(a)?a:void 0,C=(a,b)=>"string"==typeof a?.[b]&&a[b].trim()?a[b].trim():void 0;class D extends Error{}async function E(a,b,c,d){let e,{url:f,init:g}=function(a,b,{access:c,userID:d,body:e,now:f=Date.now(),tzOffsetSec:g=-60*new Date().getTimezoneOffset()}={}){let h=new URL(b,a.agent);h.search=new URLSearchParams({device_platform:"mcode",biz_id:"3",app_id:"3001",version_code:"22201",unix:String(f),timezone_offset:String(g),sys_language:a.lang,lang:a.lang,device_id:"0",os_name:process.platform,browser_name:"mcode",user_id:String(d??"").trim()||"0",client:"mcode"}).toString();let i=h.pathname+h.search,j=Math.floor(f/1e3),k=void 0===e?void 0:JSON.stringify(e),l={Accept:"application/json","Content-Type":"application/json","User-Agent":"MiniMaxCode",Authorization:`Bearer ${c}`,yy:void 0===k?z(`${encodeURIComponent(i)}_{}${z(String(f))}ooui`):z(`${encodeURIComponent(i)}_${k}${z(String(f))}ooui`),"x-timestamp":String(j),"x-signature":void 0===k?z(`${j}${x}`):z(`${j}${x}${k}`)};return{url:h.toString(),init:{method:void 0===k?"GET":"POST",headers:l,...void 0===k?{}:{body:k}}}}(a,b,c),h=await fetch(f,{...g,signal:AbortSignal.timeout(15e3)});if(401===h.status||403===h.status)throw new D(`${d}: the sign-in was refused (HTTP ${h.status})`);if(!h.ok)throw Error(`${d}: HTTP ${h.status}`);try{e=A(JSON.parse(await h.text()))}catch{}if(!e)throw Error(`${d}: not JSON`);var i=e;let j=A(i?.statusInfo);if("number"==typeof j?.code&&0!==j.code){if(1000048===j.code)throw new D(`${d}: the sign-in was refused`);throw Error(`${d}: ${C(j,"message")??C(j,"msg")??"status "+j.code}`)}let k=A(i?.base_resp);if("number"==typeof k?.status_code&&0!==k.status_code)throw Error(`${d}: ${C(k,"status_msg")??"status "+k.status_code}`);return i}async function F(a,b){let c=await E(a,"/v1/api/user/info",{access:b},"account"),d=A(c.data),e=A(d?.userInfo)??A(d?.user_info)??A(c.userInfo)??A(c.user_info),f=C(e,"realUserID")??C(e,"real_user_id");if(!f)throw Error("account: no user id in the reply");let g=(...a)=>a.map(a=>C(e,a)).find(Boolean);return{realUserID:f,email:g("userEmail","email","userMail","user_email"),name:g("name","userName","user_name")}}function G(a){let b,c=A(a?.data),d=b=>a?.[b]??c?.[b],e=a=>"string"==typeof d(a)&&d(a).trim()?d(a).trim():void 0,f="boolean"==typeof d("has_token_plan")?d("has_token_plan"):void 0,g=B(d("token_plan_expires_at")),h=C(A(a?.op_credit_summary)??A(c?.op_credit_summary),"total_remaining_amount")??("string"==typeof(b=d("opcredit_balance"))&&b.trim()?b.trim():"number"==typeof b&&Number.isFinite(b)?String(b):void 0);return{...void 0!==f?{hasTokenPlan:f}:{},...e("op_group_id")?{opGroupId:e("op_group_id")}:{},...e("token_plan_tier")?{tier:e("token_plan_tier")}:{},...g>0?{expiresAt:g}:{},...void 0!==h?{balance:h}:{}}}async function H(a,b,c){let d;try{let e=await E(a,"/matrix/api/v1/user/get_user_extra_info",{access:b,userID:c,body:{}},"workspace");for(let a of Array.isArray(e.workspaces)?e.workspaces:Array.isArray(e.data?.workspaces)?e.data.workspaces:[]){if(0!==B(a?.workspace_type))continue;let b="number"==typeof a.workspace_id&&a.workspace_id>=0?a.workspace_id:C(a,"workspace_id");if(void 0!==b){d={id:b,m:G(a)};break}}}catch(d){if(d instanceof D)throw d;return G(await E(a,"/matrix/api/v1/commerce/get_membership_info",{access:b,userID:c,body:{}},"membership"))}if(!d)return{};try{let e=G(await E(a,"/matrix/api/v1/commerce/get_membership_info",{access:b,userID:c,body:{workspace_id:d.id}},"membership")),f=!0===d.m.hasTokenPlan||!0===e.hasTokenPlan||!1!==d.m.hasTokenPlan&&!1!==e.hasTokenPlan&&void 0;return{...d.m,...e,...void 0!==f?{hasTokenPlan:f}:{},...d.m.opGroupId||e.opGroupId?{opGroupId:d.m.opGroupId??e.opGroupId}:{}}}catch(a){if(a instanceof D)throw a;return d.m}}async function I(a,b,c){let d=await fetch(`${a.platform}/v1/api/openplatform/coding_plan/remains`,{headers:{Accept:"application/json",Authorization:`Bearer ${b}`,...c?{"X-Group-Id":c}:{}},signal:AbortSignal.timeout(15e3)});if(!d.ok)throw Error(`M Plan: HTTP ${d.status}`);return function(a){let b=A(a?.base_resp);if(b&&"number"==typeof b.status_code&&0!==b.status_code)throw Error(C(b,"status_msg")??`MiniMax said ${b.status_code}`);if(!b&&!Array.isArray(a?.model_remains))throw Error("no plan in the reply");let c=a=>a<1e12?1e3*a:a,d=a=>0===B(a),e=[];for(let b of Array.isArray(a.model_remains)?a.model_remains:[]){let a=String(b?.model_name??"").trim();if(!a||3===B(b.current_interval_status)&&3===B(b.current_weekly_status)&&d(b.current_interval_total_count)&&d(b.current_weekly_total_count))continue;let f="general"===a.toLowerCase();for(let d of[{left:B(b.current_interval_remaining_percent),status:B(b.current_interval_status)??0,start:B(b.start_time)??0,end:B(b.end_time)??0,week:!1},{left:B(b.current_weekly_remaining_percent),status:B(b.current_weekly_status)??0,start:B(b.weekly_start_time)??0,end:B(b.weekly_end_time)??0,week:!0}]){if(3===d.status||void 0===d.left&&2!==d.status)continue;let b=2===d.status?0:Math.max(0,Math.min(100,d.left)),g=0;d.start>0&&d.end>d.start?g=c(d.end)-c(d.start):d.week&&(g=6048e5);let h=d.week?"7 days":g>864e5&&g%864e5==0?`${g/864e5} days`:g>=36e5&&g%36e5==0?`${g/36e5} hours`:g>0?`${Math.floor(g/6e4)} minutes`:"Allowance",i=f?h:`${a[0].toUpperCase()+a.slice(1)} \xb7 ${h}`;e.push({name:i,used:100-b,total:100,remaining:b,remainingPercentage:b,resetAt:d.end>0?new Date(c(d.end)).toISOString():null})}}return e}(await d.json().catch(()=>null))}async function J(a){let b=y[a.provider],c=a.accessToken;if(!b||!c)return{message:`Usage API not implemented for ${a.provider}`};try{let d=C(a.providerSpecificData||{},"realUserID"),e=null;d||(d=(e=await F(b,c)).realUserID);let f=await H(b,c,d),g={};if(void 0!==f.balance){let a=Number(f.balance);g.Credits={used:0,total:Number.isFinite(a)?a:0,isCreditBalance:!0,currency:"credits"}}if(f.hasTokenPlan&&f.opGroupId)try{for(let a of(await I(b,c,f.opGroupId)))g[a.name]=a}catch(a){g["M Plan windows"]={name:"M Plan windows",used:0,total:0,resetAt:null,message:a?.message??String(a)}}return 0===Object.keys(g).length&&(g.Plan={name:"Plan",used:0,total:0,resetAt:null,message:!1===f.hasTokenPlan?"Free account (no M Plan)":"No usage data returned"}),{quotas:g,plan:f.hasTokenPlan?f.tier?`M Plan ${f.tier}`:"M Plan":"Free",...f.expiresAt>0?{planExpiresAt:new Date(f.expiresAt<1e12?1e3*f.expiresAt:f.expiresAt).toISOString()}:{},user:e?.email||e?.name||C(a.providerSpecificData||{},"realUserID")||d||null}}catch(a){if(a instanceof D)return{message:`MiniMax Code sign-in expired — unauthorized, please re-authorize (${a.message})`};return{message:a?.message??String(a)}}}function K(a,b){let c=Number(a??b);return Number.isFinite(c)?c:0}async function L(a,b,c,g,h=null){let i=b||c;if(!i)return{message:`CodeBuddy (${a}) credential not available.`};try{let b=await (0,d.proxyAwareFetch)((0,f.U)(a).url,{method:"POST",headers:{...e.xq[a]?.headers||{},Authorization:`Bearer ${i}`,"Content-Type":"application/json",Accept:"application/json"},body:"{}"},h);if(401===b.status||403===b.status)return{message:"CodeBuddy CN credential invalid or expired."};if(!b.ok)return{message:`CodeBuddy CN quota API error (${b.status}).`};let c=await b.json();if(c?.code!==0)return{message:`CodeBuddy CN quota error: ${c?.msg||"unknown"}`};let g=c?.data?.Response?.Data||{},j=Array.isArray(g.Accounts)?g.Accounts:[];if(0===j.length)return{message:"CodeBuddy CN connected. No credit package found."};let k=a=>{let b=(0,f.eZ)(a.CycleEndTime);return b?new Date(b).getTime():1/0},l=a=>{let b=k(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},m=(a,b)=>k(a)-k(b),n=j.filter(l).sort(m),o=j.filter(a=>!l(a)).sort(m),p={},q={};n.forEach(a=>{let b=function(a){let b=(0,f.eZ)(a.CycleStartTime),c=(0,f.eZ)(a.CycleEndTime);if(b&&c){let a=(new Date(c).getTime()-new Date(b).getTime())/864e5;if(a<=1.5)return"Daily";if(a<=10)return"Weekly"}return"Monthly"}(a);q[b]=(q[b]||0)+1,p[q[b]>1?`${b} ${q[b]}`:b]={used:K(a.CycleCapacityUsedPrecise,a.CycleCapacityUsed),total:K(a.CycleCapacitySizePrecise,a.CycleCapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!0}}),o.forEach((a,b)=>{p[`Bonus Pack ${b+1}`]={used:K(a.CapacityUsedPrecise,a.CapacityUsed),total:K(a.CapacitySizePrecise,a.CapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!1}});let r=n[0]||j[0]||{};return{plan:r.PackageName||r.SubProductName||"CodeBuddy",quotas:p}}catch(b){return{message:`CodeBuddy (${a}) error: ${b.message}`}}}async function M(a,b,c,d=null){return L("codebuddy-cn",a,b,c,d)}async function N(a,b,c,d=null){return L("codebuddy-intl",a,b,c,d)}var O=c(90737);function P(a,b=0){if(!Buffer.isBuffer(a)||b<0||a.length-b<5)return null;let c=a[b];if(0!==c&&1!==c&&128!==c&&129!==c)return null;let d=b+5,e=a.readUInt32BE(b+1);return e>a.length-d?null:{flag:c,payloadStart:d,payloadLength:e}}function Q(a,b){let c=0n,d=0n,e=b;for(;;){if(e>=a.length)return null;let b=a[e];if(c|=BigInt(127&b)<<d,e+=1,(128&b)==0)break;if((d+=7n)>70n)return null}return{value:Number(c),next:e}}function R(a,b,c,d){return b+c>a.length?null:{field:{wireType:d,bytes:a.subarray(b,b+c)},next:b+c}}function S(a){let b=new Map,c=0;for(;c<a.length;){let d=function(a,b){let c=Q(a,b);if(!c)return null;let d=c.value>>>3,e=7&c.value;if(0===d)return null;if(0===e){let b=Q(a,c.next);return b?{fieldNumber:d,field:{wireType:0,value:b.value},next:b.next}:null}if(2===e){let b=function(a,b){let c=Q(a,b);if(!c)return null;let{value:d,next:e}=c;return d<0||e+d>a.length?null:{field:{wireType:2,bytes:a.subarray(e,e+d)},next:e+d}}(a,c.next);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(1===e){let b=R(a,c.next,8,1);return b?{fieldNumber:d,field:b.field,next:b.next}:null}if(5===e){let b=R(a,c.next,4,5);return b?{fieldNumber:d,field:b.field,next:b.next}:null}return null}(a,c);if(!d)return null;b.set(d.fieldNumber,d.field),c=d.next}return b}let T=(0,f.U)("grok-cli"),U=T.url||"https://cli-chat-proxy.grok.com/v1/billing?format=credits",V=T.userUrl||"https://cli-chat-proxy.grok.com/v1/user?include=subscription",W=Buffer.from([0,0,0,0,0]);function X(a,b=0){return null==a?b:"object"==typeof a&&!Array.isArray(a)&&"val"in a?(0,f.IQ)(a.val,b):(0,f.IQ)(a,b)}function Y(a,b){let c=a?.subscriptionTier??a?.subscription_tier??a?.subscription?.tier??b?.subscriptionTier??b?.subscription_tier;return"string"==typeof c?c.trim():""}function Z({used:a,total:b,resetAt:c,unlimited:d=!1}){let e=Math.max(0,(0,f.IQ)(b,0)),g=Math.max(0,(0,f.IQ)(a,0));if(d||0===e)return{used:g,total:0,remainingPercentage:100*!!d,resetAt:c||null,unlimited:!0};let h=Math.max(0,e-g);return{used:g,total:e,remainingPercentage:h/e*100,resetAt:c||null,unlimited:!1}}async function $(a,b=null){if(!a)return null;try{let c=await (0,d.proxyAwareFetch)("https://grok.com/grok_api_v2.GrokBuildBilling/GetGrokCreditsConfig",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/grpc-web+proto","X-Grpc-Web":"1",Accept:"application/grpc-web+proto"},body:W},b);if(!c?.ok)return null;let e=await c.arrayBuffer().catch(()=>null);if(!e)return null;return function(a){if(!a||!Buffer.isBuffer(a)||0===a.length)return null;try{var b,c;let d=null!==P(a,0)?function(a){let b=0;for(;b<a.length;){let c=P(a,b);if(!c)break;let d=c.payloadStart+c.payloadLength;if((128&c.flag)==0)return a.subarray(c.payloadStart,d);b=d}return null}(a):a;if(!d)return null;let e=S(d);if(!e)return null;let f=(b=e.get(1))&&2===b.wireType?S(b.bytes):null;if(!f)return null;let g=(c=f.get(1))?5===c.wireType?c.bytes.readFloatLE(0):1===c.wireType?c.bytes.readDoubleLE(0):null:0;if(null===g||!Number.isFinite(g)||g<0)return null;return{percentUsed:Math.min(100,100*g),resetAt:function(a){if(!a||2!==a.wireType)return null;let b=S(a.bytes);if(!b)return null;let c=b.get(1),d=b.get(2),e=new Date(1e3*(c?.wireType===0?c.value:0)+Math.round((d?.wireType===0?d.value:0)/1e6));return Number.isNaN(e.getTime())?null:e.toISOString()}(f.get(5))}}catch{return null}}(Buffer.from(e))}catch{return null}}async function _(a,b=null,c=null){if(!a)return{message:"Grok CLI access token not available."};let e=function(a,b={}){let c=b||{},d={Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":O.fZ,"x-xai-token-auth":"xai-grok-cli","x-grok-client-identifier":O.rK,"x-grok-client-version":O.uG,"x-grok-client-mode":"headless"},e=c.email,f=c.userId||c.principalId;return e&&(d["x-email"]=e),f&&(d["x-userid"]=f),d}(a,b);try{let[b,h]=await Promise.all([(0,d.proxyAwareFetch)(U,{method:"GET",headers:e},c),(0,d.proxyAwareFetch)(V,{method:"GET",headers:e},c).catch(()=>null)]);if(401===b.status||403===b.status)return{message:"Grok CLI authentication expired. Please re-authorize."};if(!b.ok){let a=await b.text().catch(()=>""),c=a?`: ${a.slice(0,200)}`:"";return{message:`Grok CLI billing API error (${b.status})${c}`}}let i=await b.json().catch(()=>null);if(!i||"object"!=typeof i)return{message:"Grok CLI billing response was not JSON."};let j=null;h?.ok&&(j=await h.json().catch(()=>null));let k=function(a,b=null){let c,d=a&&"object"==typeof a?a:{},e=d.config&&"object"==typeof d.config&&!Array.isArray(d.config)?d.config:d,g=(0,f.eZ)(e.billingPeriodEnd)||(0,f.eZ)(e.billing_period_end)||(0,f.eZ)(e.currentPeriod?.end)||(0,f.eZ)(e.resetAt||e.resetsAt||e.periodEnd)||(0,f.eZ)(d.billingPeriodEnd)||(0,f.eZ)(d.billing_period_end)||(0,f.eZ)(d.resetAt||d.resetsAt||d.periodEnd)||null,h={},i=Y(b,e),j=!!i&&!/^(free|none|null)$/i.test(i),k=X(e.monthlyLimit??e.monthly_limit??d.monthlyLimit??d.monthly_limit,0/0),l=X(e.includedUsed??e.included_used??d.includedUsed??d.included_used,0/0),m=X(e.totalUsed??e.total_used??d.totalUsed??d.total_used,0/0);Number.isFinite(k)&&k>0&&(h["Monthly included"]=Z({used:Number.isFinite(l)?l:Number.isFinite(m)?m:0,total:k,resetAt:g}));let n=X(e.onDemandCap??d.onDemandCap,0/0),o=X(e.onDemandUsed??d.onDemandUsed,0/0);if(Number.isFinite(n)&&n>0){let a=Number.isFinite(o)?Math.max(0,o):0;h["On-demand"]=Z({used:a,total:n,resetAt:g})}else!j&&Number.isFinite(n)&&0===n&&Number.isFinite(o)&&(h["On-demand"]={used:1,total:1,remainingPercentage:0,resetAt:g,unlimited:!1});let p=X(e.prepaidBalance??d.prepaidBalance,0/0);Number.isFinite(p)&&p>0&&(h.Prepaid={used:0,total:p,remainingPercentage:100,resetAt:null,unlimited:!1});let q=X(e.creditUsagePercent??e.credit_usage_percent??d.creditUsagePercent,0/0);for(let a of(Number.isFinite(q)&&q>=0&&(h["Weekly SuperGrok"]=Z({used:Math.max(0,Math.min(100,q)),total:100,resetAt:g})),[d.credits,d.creditBalance,d.usage,e.credits,e.includedCredits,e.subscriptionCredits].filter(a=>a&&"object"==typeof a&&!Array.isArray(a)))){let b=X(a.total??a.limit??a.cap??a.allocation??a.amount,0/0),c=X(a.used??a.spent??a.consumed,0/0),d=X(a.remaining??a.balance??a.left,0/0);if(Number.isFinite(b)&&b>0){let e=Number.isFinite(c)?c:Number.isFinite(d)?Math.max(0,b-d):0;h.Credits||(h.Credits=Z({used:e,total:b,resetAt:(0,f.eZ)(a.resetAt||a.resetsAt||a.end)||g}))}else Number.isFinite(d)&&d>=0&&!h.Credits&&(h.Credits={used:0,total:d>0?d:1,remainingPercentage:100*(d>0),resetAt:g,unlimited:!1})}let r=Object.keys(h).length>0&&Object.values(h).every(a=>!0!==a.unlimited&&(a.remainingPercentage??100)<=0);return{plan:(c=Y(b,e))?c.replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()):b?.hasGrokCodeAccess===!0?"Grok Code":(e?.isUnifiedBillingUser,"Grok Build"),hasAuthoritativePlan:!!Y(b,e),quotas:h,periodEnd:g,exhausted:r,subscriptionAccess:j,rawConfig:e}}(i,j);if(k.plan=k.hasAuthoritativePlan?k.plan:function(a){try{return({0:"Free",1:"SuperGrok",2:"X Basic",3:"X Premium",4:"X Premium Plus",5:"SuperGrok Heavy",6:"SuperGrok Lite"})[JSON.parse(Buffer.from(a.split(".")[1],"base64url")).tier]||""}catch{return""}}(a)||k.plan,!k.quotas||0===Object.keys(k.quotas).length){var g;let b=(g=await $(a,c))&&Number.isFinite(g.percentUsed)?{"Weekly SuperGrok":Z({used:Math.round(Math.max(0,Math.min(100,g.percentUsed))),total:100,resetAt:g.resetAt||null})}:null;if(b)return{plan:k.plan,quotas:b};return{plan:k.plan,message:k.subscriptionAccess?"Subscription access is active; Grok does not expose a numeric included quota.":"Grok Build connected, but no credit allotment was returned. Free promo may be exhausted.",quotas:{}}}return{plan:k.plan,quotas:k.quotas}}catch(a){return{message:`Grok CLI usage error: ${a.message}`}}}var aa=c(75924);let ab={LEVEL_BASIC:"Moderato",LEVEL_INTERMEDIATE:"Allegretto",LEVEL_ADVANCED:"Allegro",LEVEL_STANDARD:"Vivace"};function ac({used:a,total:b,remaining:c,resetAt:d}){let e,g=Math.max(0,(0,f.IQ)(b,0)),h=Math.max(0,(0,f.IQ)(a,0));return e=g>0&&null!=c&&Number.isFinite(Number(c))?Math.max(0,Number(c))/g*100:g>0?Math.max(0,g-h)/g*100:0,{used:h,total:g,remainingPercentage:e,resetAt:d||null,unlimited:!1}}async function ad(a=null,b=null,c=null,e=null){let g="string"==typeof b&&b.length>0,h=!g&&"string"==typeof a&&a.length>0;if(!g&&!h)return{message:"Kimi access token or API key not available."};let i=g?{"x-api-key":b}:{Authorization:`Bearer ${a}`,...(0,aa.buildKimiHeaders)(e?.deviceId)};try{let a,b=await (0,d.proxyAwareFetch)("https://api.kimi.com/coding/v1/usages",{method:"GET",headers:{...i,"Content-Type":"application/json",Accept:"application/json"}},c),e=await b.text().catch(()=>"");if(!b.ok)return{plan:"Kimi Coding",message:function(a,b){let c=null;try{c=JSON.parse(b||"")}catch{}let d=Array.isArray(c?.details)?c.details[0]:null,e=d?.debug||c?.debug||null,f=e?.reason||c?.reason||"",g=e?.localizedMessage?.message||d?.localizedMessage?.message||c?.message||"";if(401===a)return"Kimi authentication expired. Please re-authorize.";if(403===a&&("REASON_FEATURE_NO_PERMISSION"===f||/permission_denied|do not have permission|subscribe/i.test(`${c?.code||""} ${g} ${b||""}`)))return g||"Kimi connected, but this account has no permission to view usage. Subscribe to Kimi Code to access quota.";let h=(g||b||"").slice(0,100);return h?`Kimi Coding connected. API Error ${a}: ${h}`:`Kimi Coding connected. API Error ${a}`}(b.status,e)};try{a=JSON.parse(e||"{}")}catch{return{plan:"Kimi Coding",message:"Kimi Coding connected. Invalid JSON response from API."}}let g={},h=a?.usage&&"object"==typeof a.usage?a.usage:{},j=(0,f.IQ)(h.limit??h.Limit,0),k=(0,f.IQ)(h.used??h.Used,0),l=h.remaining??h.Remaining,m=null!=l&&""!==l?(0,f.IQ)(l,0/0):0/0,n=h.resetTime||h.ResetTime||h.reset_at||h.resetAt;for(let b of(j>0&&(g.Weekly=ac({used:k,total:j,remaining:Number.isFinite(m)?m:null,resetAt:(0,f.eZ)(n)})),Array.isArray(a?.limits)?a.limits:[])){if(!b||"object"!=typeof b)continue;let a=b.detail&&"object"==typeof b.detail?b.detail:{},c=(0,f.IQ)(a.limit??a.Limit,0),d=(0,f.IQ)(a.remaining??a.Remaining,0/0),e=a.resetTime||a.reset_at||a.resetAt;if(c>0){let a=Number.isFinite(d)?d:Math.max(0,c);g.Ratelimit=ac({used:Math.max(0,c-a),total:c,remaining:a,resetAt:(0,f.eZ)(e)})}}let o=a?.user?.membership?.level,p=function(a){if(!a)return"";let b=String(a);return ab[b]?ab[b]:b.replace(/^LEVEL_/,"").toLowerCase()}(o)||"Kimi Coding";if(Object.keys(g).length>0)return{plan:p,quotas:g};return{plan:p,message:"Kimi Coding connected. Usage tracked per request."}}catch(a){return{message:`Kimi Coding connected. Unable to fetch usage: ${a.message}`}}}async function ae(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"DeepSeek API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)("https://api.deepseek.com/user/balance",{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,"Content-Type":"application/json",Accept:"application/json"}},b);if(401===c.status||403===c.status)return{plan:"DeepSeek",message:"DeepSeek authentication failed. Check the API key."};if(!c.ok){let a=await c.text().catch(()=>"");return{plan:"DeepSeek",message:`DeepSeek balance API error (${c.status})${a?`: ${a.slice(0,120)}`:""}`}}let e=await c.json().catch(()=>null);if(!e||"object"!=typeof e)return{message:"DeepSeek balance response was not JSON."};let g=function(a){let b=Array.isArray(a?.balance_infos)?a.balance_infos:[],c=[];for(let a of b){if(!a||"object"!=typeof a)continue;let b="string"==typeof a.currency?a.currency.toUpperCase():"";if(!b)continue;let d=(0,f.IQ)(a.total_balance??a.totalBalance,0);c.push({currency:b,totalBalance:d,grantedBalance:(0,f.IQ)(a.granted_balance??a.grantedBalance,0),toppedUpBalance:(0,f.IQ)(a.topped_up_balance??a.toppedUpBalance,0)})}return c}(e);if(0===g.length)return{plan:"DeepSeek",message:"DeepSeek connected. No balance data returned."};let h=!0===e.is_available||!0===e.isAvailable,i={};for(let a of g){let b=Math.max(0,a.totalBalance);i[`Balance (${a.currency})`]={used:0,total:b,remainingPercentage:100*(b>0),resetAt:null,unlimited:!1,isCreditBalance:!0,currency:a.currency}}return{plan:h?"DeepSeek":"DeepSeek (Insufficient Balance)",quotas:i}}catch(a){return{message:`DeepSeek error: ${a.message}`}}}let af=(0,f.U)("opencode-go").url,ag={rolling:"Rolling",weekly:"Weekly",monthly:"Monthly"};async function ah(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"OpenCode Go API key not available. Add a key to view usage."};try{let c=await (0,d.proxyAwareFetch)(af,{method:"GET",headers:{Authorization:`Bearer ${a.trim()}`,Accept:"application/json"}},b);if(401===c.status)return{plan:"OpenCode Go",message:"OpenCode Go authentication failed. Check the API key."};if(403===c.status){let a=await c.json().catch(()=>null),b=a?.error?.type==="EntitlementError";return{plan:"OpenCode Go",message:b?"OpenCode Go subscription required for this API key.":"OpenCode Go access forbidden for this API key."}}if(!c.ok)return{plan:"OpenCode Go",message:`OpenCode Go usage API error (${c.status}).`};let e=await c.json().catch(()=>null);if(!e?.usage||"object"!=typeof e.usage)return{plan:"OpenCode Go",message:"OpenCode Go usage response did not contain quota data."};let g={};for(let[a,b]of Object.entries(ag)){let c=e.usage[a];if(!c||"object"!=typeof c)continue;let d=function(a){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return null}(c.percent);if(null===d)continue;let h=Math.max(0,Math.min(100,(0,f.IQ)(d,0)));g[b]={used:h,total:100,remaining:100-h,remainingPercentage:100-h,resetAt:(0,f.eZ)(c.resetsAt),unlimited:!1}}if(0===Object.keys(g).length)return{plan:"OpenCode Go",message:"OpenCode Go usage response did not contain valid quota data."};return{plan:"OpenCode Go",quotas:g}}catch(a){return{message:`OpenCode Go error: ${a.message}`}}}let ai=(0,f.U)("groq"),aj=ai.url,ak=ai.modelsUrl,al=new Map,am=new Map,an=/whisper|tts|orpheus|prompt-guard|safeguard/i;function ao(a,b,c,d){let e,f=a.get(b),g=a.get(c);if(null===f||null===g)return null;let h=Number(f),i=Number(g);return Number.isFinite(h)&&Number.isFinite(i)?{used:Math.max(0,h-i),total:h,resetAt:null===(e=function(a){let b;if("string"!=typeof a||!a.trim())return null;let c=/(\d+(?:\.\d+)?)(ms|s|m|h)/g,d=0,e=!1;for(;b=c.exec(a);){e=!0;let a=Number(b[1]),c=b[2];d+=a*("h"===c?36e5:"m"===c?6e4:"ms"===c?1:1e3)}return e?d:null}(a.get(d)))?null:new Date(Date.now()+e).toISOString(),unlimited:!1}:null}async function ap(a,b){let c=am.get(a);if(c&&Date.now()-c.at<9e5)return c.model;let e=await (0,d.proxyAwareFetch)(ak,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!e.ok)return null;let f=await e.json().catch(()=>null),g=(Array.isArray(f?.data)?f.data.map(a=>a?.id).filter(Boolean):[]).find(a=>!an.test(a));return g?(am.set(a,{model:g,at:Date.now()}),g):null}async function aq(a,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Groq API key not available. Add a key to view usage."};let c=a.trim(),e=al.get(c);if(e&&Date.now()-e.at<9e5)return{plan:"Groq",quotas:e.quotas};try{let a=await ap(c,b);if(!a){if(e)return{plan:"Groq",quotas:e.quotas};return{plan:"Groq",message:"Groq connected. No chat-capable model available to read rate limits."}}let f=await (0,d.proxyAwareFetch)(aj,{method:"POST",headers:{Authorization:`Bearer ${c}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({model:a,messages:[{role:"user",content:"hi"}],max_tokens:1,stream:!1})},b);if(401===f.status||403===f.status)return{plan:"Groq",message:"Groq authentication failed. Check the API key."};if(!f.ok){let a=await f.text().catch(()=>"");if(e)return{plan:"Groq",quotas:e.quotas};return{plan:"Groq",message:`Groq usage API error (${f.status})${a?`: ${a.slice(0,120)}`:""}`}}await f.text().catch(()=>{});let g=function(a){let b=ao(a,"x-ratelimit-limit-requests","x-ratelimit-remaining-requests","x-ratelimit-reset-requests"),c=ao(a,"x-ratelimit-limit-tokens","x-ratelimit-remaining-tokens","x-ratelimit-reset-tokens");if(!b&&!c)return null;let d={};return b&&(d.Requests=b),c&&(d.Tokens=c),d}(f.headers);if(!g){if(e)return{plan:"Groq",quotas:e.quotas};return{plan:"Groq",message:"Groq connected. No rate-limit data reported for this key yet.",quotas:{}}}return al.set(c,{quotas:g,at:Date.now(),model:a}),{plan:"Groq",quotas:g}}catch(a){if(e)return{plan:"Groq",quotas:e.quotas};return{message:`Groq error: ${a.message}`}}}var ar=c(49804);function as(a){if(null==a)return{unlimited:!1,total:0};if("unlimited"===a||a?.unlimited===!0)return{unlimited:!0,total:0};if("number"==typeof a&&Number.isFinite(a))return{unlimited:!1,total:Math.max(0,a)};if("string"==typeof a){let b=a.trim();if("unlimited"===b)return{unlimited:!0,total:0};let c=Number(b);if(Number.isFinite(c))return{unlimited:!1,total:Math.max(0,c)}}let b=a.limited??a.Limited;return"number"==typeof b&&Number.isFinite(b)?{unlimited:!1,total:Math.max(0,b)}:{unlimited:!1,total:0}}function at(a,b,c,d=null){let e=Math.max(0,(0,f.IQ)(b,0)),g=as(c);if(g.unlimited)return{used:e,total:0,remainingPercentage:100,resetAt:d||null,unlimited:!0};let h=g.total;if(h<=0)return{used:e,total:0,remainingPercentage:0,resetAt:d||null,unlimited:!1};let i=Math.min(e,h),j=Math.max(0,h-i);return{used:i,total:h,remainingPercentage:j/h*100,resetAt:d||null,unlimited:!1}}function au(a){return a&&"object"==typeof a?null!=a.limit?a.limit:a:null}async function av(a=null,b={},c=null){let d=b||{},e=d.userId;if(!a||"string"!=typeof a||!a.trim())return{message:"Zed access token not available. Re-connect Zed to view quota."};if(!e)return{message:"Zed credential is missing user id. Re-connect Zed to view quota."};let g={accessToken:a.trim(),providerSpecificData:d};try{let a=await (0,ar.qJ)(g,{proxyOptions:c});return function(a){let b,c=a?.plan||{},d=c.plan_v3||c.plan_v2||c.plan||a?.plan_v3||null,e=(0,f.eZ)(c.subscription_period?.ended_at)||(0,f.eZ)(c.subscriptionPeriod?.endedAt)||null,g={},h=c.usage||{},i=h.edit_predictions||h.editPredictions;i&&(g["Edit Predictions"]=at("Edit Predictions",i.used,i.limit,e));let j=h.model_requests||h.modelRequests;if(j){let a=null!=j.limit?j.limit:au(j)?.limit,b=as(a);(b.unlimited||b.total>0)&&(g["Hosted Model Requests"]=at("Hosted Model Requests",j.used,a,e))}let k=j&&!(b=as(j.limit??au(j)?.limit)).unlimited&&0===b.total?"Hosted AI models are billed per token (not request count). Edit Predictions are tracked below. Token spend is on dashboard.zed.dev.":null,l=function(a){let b=String(a||"").trim();if(!b)return"Zed";switch(b.toLowerCase()){case"zed_free":return"Zed Free";case"zed_pro":return"Zed Pro";case"zed_pro_trial":return"Zed Pro Trial";case"zed_student":return"Zed Student";case"zed_business":return"Zed Business";default:return b.replace(/_/g," ").split(/\s+/).map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join(" ")}}(d);(c.trial_started_at||c.trialStartedAt)&&!/trial/i.test(l)&&(l=`${l} (Trial active)`);let m=k;return(c.has_overdue_invoices||c.hasOverdueInvoices)&&(m="This Zed account has overdue invoices. Usage may be blocked until billing is resolved."),{plan:l,quotas:g,message:m,hasOverdueInvoices:!!(c.has_overdue_invoices||c.hasOverdueInvoices),trialStarted:!!(c.trial_started_at||c.trialStartedAt),planId:d||null,resetAt:e}}(a)}catch(b){let a=b?.status;if(401===a||403===a)return{message:"Zed authentication failed. Sign in again from the dashboard or Zed editor."};return{message:`Zed error: ${b.message||"Failed to fetch quota"}`}}}async function aw(a=null,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"APInex API key not available. Add a key to view usage."};let c={Authorization:`Bearer ${a.trim()}`,Accept:"application/json"};try{let[a,e]=await Promise.all([(0,d.proxyAwareFetch)("https://api.apinex.bond/v1/balance",{method:"GET",headers:c},b),(0,d.proxyAwareFetch)("https://api.apinex.bond/v1/subscription",{method:"GET",headers:c},b)]);if(401===a.status||403===a.status)return{plan:"APInex",message:"APInex authentication failed. Check the API key."};let g=a.ok?function(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.balance_usd??a.balanceUsd,0),c=(0,f.IQ)(a.reserved_usd??a.reservedUsd,0),d=a.api_key&&"object"==typeof a.api_key?a.api_key:null;return{balanceUsd:b,reservedUsd:c,key:d?{spentUsd:(0,f.IQ)(d.spent_usd??d.spentUsd,0),limitUsd:d.spend_limit_usd??d.spendLimitUsd??null,remainingUsd:d.remaining_usd??d.remainingUsd??null,limitReached:!0===d.limit_reached||!0===d.limitReached}:null}}(await a.json().catch(()=>null)):null,h=e.ok?function(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.token_limit??a.tokenLimit,0),c=(0,f.IQ)(a.tokens_used??a.tokensUsed,0),d=a.tokens_remaining??a.tokensRemaining??null;return{mode:"subscription"===a.mode?"subscription":"free",plan:a.plan||null,planLabel:a.plan_label||a.planLabel||"FREE",tokenLimit:b,tokensUsed:c,tokensRemaining:null==d?Math.max(0,b-c):(0,f.IQ)(d,0),unlimited:!0===a.unlimited,allowed:!1!==a.allowed,resetsAt:a.resets_at_utc||a.resetsAtUtc||null}}(await e.json().catch(()=>null)):null;if(!g&&!h)return{plan:"APInex",message:"APInex connected. No usage data returned."};let i={};if(g){let a=Math.max(0,g.balanceUsd);if(i["Wallet (USD)"]={used:0,total:a,remainingPercentage:100*(a>0),resetAt:null,unlimited:a>0},g.reservedUsd>0&&(i["Reserved (USD)"]={used:g.reservedUsd,total:0,remaining:0,remainingPercentage:100,unlimited:!0}),g.key?.limitUsd!==null&&g.key?.limitUsd!==void 0){let a=Math.max(0,g.key.limitUsd),b=Math.max(0,g.key.spentUsd);i["Key spend (USD)"]={used:b,total:a,remaining:Math.max(0,a-b),remainingPercentage:a>0?Math.min(100,(a-b)/a*100):0,resetAt:null,unlimited:!1}}}return h&&h.tokenLimit>0&&(i["subscription"===h.mode?"Plan tokens":"Daily tokens"]={used:h.tokensUsed,total:h.tokenLimit,remaining:h.tokensRemaining,remainingPercentage:h.unlimited?100:Math.min(100,Math.max(0,h.tokensRemaining/h.tokenLimit*100)),resetAt:h.resetsAt||null,unlimited:h.unlimited}),{plan:h?h.planLabel||("subscription"===h.mode?"Subscription":"FREE"):"APInex",quotas:i,...h&&!h.allowed?{message:"APInex quota exhausted (allowed=false)."}:{}}}catch(a){return{message:`APInex error: ${a.message}`}}}let ax="https://www.getunikey.ai/v1/dashboard/billing",ay=`${ax}/usage`,az=`${ax}/subscription`,aA="UniKey",aB=[/remaining quota:\s*Credits?\s*([0-9]+(?:\.[0-9]+)?)/i,/用户剩余额度:\s*Credits?\s*([0-9]+(?:\.[0-9]+)?)/];async function aC(a,b){try{let e=await (0,d.proxyAwareFetch)("https://www.getunikey.ai/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({model:"gpt-6-astra",max_tokens:1e5,messages:[{role:"user",content:"hi"}]})},b),g=await e.text().catch(()=>""),h=g;try{h=JSON.parse(g)?.error?.message||g}catch{}var c=h;if(!c||"string"!=typeof c)return null;for(let a of aB){let b=c.match(a);if(b){let a=(0,f.IQ)(b[1],0/0);if(!Number.isNaN(a))return a}}return null}catch{return null}}async function aD(a=null,b=null,c=null){if(!a||"string"!=typeof a||!a.trim())return{message:`${aA} API key not available. Add a key to view usage.`};let e=a.trim(),g={Authorization:`Bearer ${e}`,Accept:"application/json"};try{var h;let[a,i]=await Promise.all([(0,d.proxyAwareFetch)(ay,{method:"GET",headers:g},c),(0,d.proxyAwareFetch)(az,{method:"GET",headers:g},c)]);if(401===a.status||403===a.status)return{plan:aA,message:`${aA} authentication failed. Check the API key.`};let j=a.ok?function(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.total_usage??a.totalUsage,0/0);return Number.isNaN(b)?null:{spentUsd:Math.max(0,b),spentCredits:100*Math.max(0,b)}}(await a.json().catch(()=>null)):null,k=i.ok?(h=await i.json().catch(()=>null))&&"object"==typeof h?{limitUsd:[(0,f.IQ)(h.hard_limit_usd??h.hardLimitUsd,0/0),(0,f.IQ)(h.soft_limit_usd??h.softLimitUsd,0/0),(0,f.IQ)(h.system_hard_limit_usd??h.systemHardLimitUsd,0/0)].find(a=>!Number.isNaN(a)&&a>0)??null,hasPaymentMethod:!0===h.has_payment_method||!0===h.hasPaymentMethod}:null:null;if(!j&&!k)return{plan:aA,message:`${aA} connected. No usage data returned.`};let l=function(a){if(!a||"object"!=typeof a)return 5e3;let b=a.unikeyTotalCredits;if(null==b||""===b)return 5e3;let c=(0,f.IQ)(b,0/0);return Number.isNaN(c)||c<=0?5e3:c}(b),m=k?.hasPaymentMethod?`${aA} (paid)`:aA,n={};if(j){let a=j.spentCredits,d=Math.max(0,l-a);if(b?.unikeyProbeBalance===!0){let a=await aC(e,c);null!==a&&(d=a)}n.Credits={used:a,total:l,remaining:d,remainingPercentage:Math.min(100,Math.max(0,d/l*100)),resetAt:null,unlimited:!1}}return{plan:m,quotas:n}}catch(a){return{message:`${aA} error: ${a.message}`}}}var aE=c(81756);let aF=(0,f.U)("cursor");function aG(a){return Number(((0,f.IQ)(a,0)/100).toFixed(2))}function aH(a){return Math.max(0,100-Math.max(0,Math.min(100,(0,f.IQ)(a,0))))}async function aI(a,b,c,e){return(0,d.proxyAwareFetch)(a,{method:"POST",headers:{...(0,aE.JA)(b,c||null,!0),"content-type":"application/json",accept:"application/json"},body:"{}"},e)}async function aJ(a){try{return await a.json()}catch{return null}}async function aK(a,b={},c=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Cursor access token not available. Reconnect Cursor to view quota."};let e=a.trim(),g=b?.machineId||null,h=aF.url,i=aF.planInfoUrl,j=aF.authUsageUrl;if(!h)return{message:"Cursor usage endpoint is not configured."};try{let a=await aI(h,e,g,c);if(401===a.status||403===a.status)return{plan:"Cursor",message:"Cursor authentication failed. Reconnect the Cursor provider."};let b={},k=null;if(a.ok&&(k=await aJ(a),!function(a,b){let c=b?.planUsage;if(!c||"object"!=typeof c)return;let d=(0,f.IQ)(c.limit,0),e=(0,f.IQ)(c.includedSpend??c.totalSpend,0),g=(0,f.IQ)(c.remaining,Math.max(0,d-e)),h=(0,f.eZ)(b.billingCycleEnd);if(d>0){let b=aG(d),f=aG(e),i=aG(g);a["Plan (USD)"]={used:f,total:b,remainingPercentage:null!=c.totalPercentUsed?aH(c.totalPercentUsed):b>0?i/b*100:0,resetAt:h}}else if(null!=c.totalPercentUsed){let b=(0,f.IQ)(c.totalPercentUsed,0);a["Included usage"]={used:b,total:100,remainingPercentage:aH(b),resetAt:h}}if(null!=c.autoPercentUsed){let b=(0,f.IQ)(c.autoPercentUsed,0);a["Auto models (%)"]={used:b,total:100,remainingPercentage:aH(b),resetAt:h}}if(null!=c.apiPercentUsed){let b=(0,f.IQ)(c.apiPercentUsed,0);a["Named models (%)"]={used:b,total:100,remainingPercentage:aH(b),resetAt:h}}Object.keys(a).length}(b,k),!function(a,b){let c=b?.spendLimitUsage;if(!c||"object"!=typeof c)return;let d=(0,f.IQ)(c.individualLimit,0),e=(0,f.IQ)(c.pooledLimit,0),g=(0,f.eZ)(b.billingCycleEnd);if(d>0){let b=aG(c.individualUsed),e=aG(d),h=aG(c.individualRemaining??Math.max(0,d-(0,f.IQ)(c.individualUsed,0)));a["On-demand (USD)"]={used:b,total:e,remainingPercentage:e>0?h/e*100:0,resetAt:g};return}if(e>0){let b=aG(c.pooledUsed),d=aG(e),h=aG(c.pooledRemaining??Math.max(0,e-(0,f.IQ)(c.pooledUsed,0)));a["Team on-demand (USD)"]={used:b,total:d,remainingPercentage:d>0?h/d*100:0,resetAt:g}}}(b,k)),0===Object.keys(b).length&&j){let g=await (0,d.proxyAwareFetch)(j,{method:"GET",headers:{Authorization:`Bearer ${e.includes("::")?e.split("::")[1]:e}`,Accept:"application/json"}},c);if(g.ok)!function(a,b){if(!b||"object"!=typeof b)return;let c=(0,f.eZ)(b.startOfMonth);for(let[d,e]of Object.entries(b)){if(!e||"object"!=typeof e||Array.isArray(e))continue;let b=(0,f.IQ)(e.maxRequestUsage,0);if(b<=0)continue;let g=(0,f.IQ)(e.numRequests,0);a[`${d} requests`]={used:g,total:b,remainingPercentage:b>0?Math.max(0,(b-g)/b*100):0,resetAt:c}}}(b,await aJ(g));else if(!a.ok){let b=await a.text().catch(()=>"");return{plan:"Cursor",message:`Cursor usage API error (${a.status})${b?`: ${b.slice(0,120)}`:""}`}}}if(0===Object.keys(b).length)return{plan:"Cursor",message:k?.displayMessage||"Cursor connected. No quota data returned for this plan."};let l="Cursor";if(i){let a=await aI(i,e,g,c).catch(()=>null);if(a?.ok){let b=await aJ(a),c=b?.planInfo?.planName;"string"==typeof c&&c.trim()&&(l=`Cursor ${c.trim()}`)}}return{plan:l,quotas:b}}catch(a){return{message:`Cursor error: ${a.message}`}}}var aL=c(53225);let aM={international:(0,f.U)("glm").url,china:(0,f.U)("glm-cn").url};async function aN(a,b,c=null){if(!a)return{message:"GLM API key not available."};let e=aM["glm-cn"===b?"china":"international"];try{let b=await (0,d.proxyAwareFetch)(e,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),{plan:g,quotas:h}=function(a){let b=a?.data&&"object"==typeof a.data?a.data:{},c=Array.isArray(b.limits)?b.limits:[],d={};for(let a of c){if(!a||"TOKENS_LIMIT"!==a.type&&"CREDIT_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,e=Math.max(0,100-b);d[3===a.unit?`Session (${a.number}h)`:6===a.unit?"Weekly (7d)":"TOKENS_LIMIT"===a.type?"Tokens":`Limit (${a.number})`]={used:b,total:100,remaining:e,remainingPercentage:e,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let e="string"==typeof b.level?b.level:"";return{plan:e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"Unknown",quotas:d}}(f);return{plan:g,quotas:h}}catch(a){return{message:`GLM error: ${a.message}`}}}let aO=(process.env.COMMAND_CODE_API_BASE_URL||"https://api.commandcode.ai").replace(/\/$/,""),aP={"individual-go":"Go","individual-goat":"GOAT","individual-pro":"Pro","individual-pro-v1":"Pro","individual-provider":"Provider","individual-max":"Max","individual-ultra":"Ultra","teams-pro":"Teams Pro"},aQ={"individual-go":10,"individual-goat":70,"individual-pro":30,"individual-pro-v1":80,"individual-provider":15,"individual-max":150,"individual-ultra":300,"teams-pro":40};function aR(a,b){let c=new URLSearchParams(Object.entries(b||{}).filter(([,a])=>null!=a)).toString();return c?`${a}?${c}`:a}function aS(a){if(!a||"object"!=typeof a)return null;let b=(0,f.IQ)(a.used,0),c=(0,f.IQ)(a.cap,0);return c<=0&&b<=0?null:{used:b,total:c,remaining:Math.max(0,c-b),unlimited:!1,resetAt:(0,f.eZ)(a.resetAt)}}async function aT(a,b=null){if(!a||"string"!=typeof a||!a.trim())return{message:"Command Code API key not available. Add a key to view usage."};let c={Authorization:`Bearer ${a.trim()}`,Accept:"application/json"},e=async a=>await (0,d.proxyAwareFetch)(aO+a,{method:"GET",headers:c},b);try{let a=await e(aR("/alpha/whoami",{limits:"1"}));if(401===a.status||403===a.status)return{plan:"Command Code",message:"Command Code authentication failed. Check the API key."};if(!a.ok)return{plan:"Command Code",message:`Command Code usage API error (${a.status})`};let b=await a.json().catch(()=>({})),c=b?.org?.id??null,[d,g]=await Promise.all([e(aR("/alpha/billing/credits",{orgId:c})),e(aR("/alpha/billing/subscriptions",{orgId:c}))]);if(401===d.status||403===d.status||401===g.status||403===g.status)return{plan:"Command Code",message:"Command Code authentication failed. Check the API key."};if(!d.ok)return{plan:"Command Code",message:`Command Code credits API error (${d.status})`};if(!g.ok)return{plan:"Command Code",message:`Command Code subscriptions API error (${g.status})`};let h=await d.json().catch(()=>({})),i=await g.json().catch(()=>({})),j=i?.data?.planId??null,k=j&&aP[j]||j||"Command Code",l=j&&aQ[j]||0,m=h?.credits||{},n=(0,f.IQ)(m.monthlyCredits,0)+(0,f.IQ)(m.purchasedCredits,0)+(0,f.IQ)(m.freeCredits,0),o=l>0?Math.max(0,l-n):0,p={};p.Credits={used:o,total:l>0?l:n,remaining:n,unlimited:l<=0,resetAt:(0,f.eZ)(i?.data?.currentPeriodEnd)};let q=aS(h?.windowLimits?.fiveHour);q&&(p["Session (5h)"]=q);let r=aS(h?.windowLimits?.weekly);return r&&(p.Weekly=r),{plan:k,quotas:p}}catch(a){return{message:`Command Code error: ${a.message}`}}}let aU=(0,f.U)("vercel-ai-gateway").url;async function aV(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}let aW={session:"Session (5h)",weekly:"Weekly (7d)",monthly:"Monthly"};async function aX(a,b,c=null){if(!a)return{message:"Ollama Cloud API key not available."};try{let b,e=await (0,d.proxyAwareFetch)("https://ollama.com/api/usage",{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(401===e.status||403===e.status)return{message:"Ollama Cloud API key invalid or expired."};if(!e.ok)return{message:`Ollama Cloud usage API error (${e.status}).`};try{b=await e.json()}catch{return{message:"Ollama Cloud usage response was not JSON."}}let f=await (0,d.proxyAwareFetch)("https://ollama.com/api/me",{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Length":"0"}},c).then(a=>a.ok?a.json():null).catch(()=>null),g="string"==typeof f?.Plan?f.Plan:"",h=g?g.charAt(0).toUpperCase()+g.slice(1).toLowerCase():"Ollama Cloud",i=b?.limits&&"object"==typeof b.limits?b.limits:{},j="free"===g.toLowerCase()&&f?.CreatedAt?function(a,b=new Date){let c=new Date(a);if(Number.isNaN(c.getTime()))return null;let d=(b.getUTCFullYear()-c.getUTCFullYear())*12+(b.getUTCMonth()-c.getUTCMonth());for(let a=Math.max(0,d);a<=d+1;a++){let d=function(a,b){let c=a.getUTCMonth()+b,d=a.getUTCFullYear()+Math.floor(c/12),e=(c%12+12)%12,f=new Date(Date.UTC(d,e+1,0)).getUTCDate();return new Date(Date.UTC(d,e,Math.min(a.getUTCDate(),f),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()))}(c,a);if(d>b)return d.toISOString()}return null}(f.CreatedAt):null,k={};for(let[a,b]of Object.entries(aW)){let c=i[a]?.usage;if(null==c)continue;let d=Number(c);Number.isNaN(d)||(k[b]=function(a,b=null){let c=Math.round(100*Math.max(0,Math.min(1,Number(a)||0)));return{used:c,total:100,remainingPercentage:100-c,resetAt:b,unlimited:!1}}(d,"monthly"===a?j:null))}if(0===Object.keys(k).length)return{plan:h,message:"Ollama Cloud connected. No usage limits reported.",quotas:{}};return{plan:h,quotas:k}}catch(a){return{message:`Ollama Cloud error: ${a.message}`}}}async function aY(a,b=null){if(!a)return{message:"Vercel AI Gateway API key not available."};try{let c=await (0,d.proxyAwareFetch)(aU,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{message:"Vercel AI Gateway API key invalid or expired."};if(!c.ok){let a=await c.text().catch(()=>""),b=a?`: ${a.slice(0,200)}`:"";return{message:`Vercel AI Gateway credits API error (${c.status})${b}`}}let e=await c.json(),f=Number(e?.balance)||0,g=Number(e?.total_used)||0;if(f<=0&&g<=0)return{plan:"Pay-as-you-go",message:"Vercel AI Gateway connected. No credit allocation found (BYOK or unfunded account).",quotas:{}};return{plan:"Pay-as-you-go",quotas:{"Used (USD)":{used:g,total:0,remaining:0,remainingPercentage:100,unlimited:!0},"Remaining (USD)":{used:f,total:5,remaining:f,remainingPercentage:f/5*100,unlimited:!1}}}}catch(a){return{message:`Vercel AI Gateway error: ${a.message}`}}}async function aZ(a,b=null,c="qoder"){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let e=await (0,d.proxyAwareFetch)((0,f.U)(c).url,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!e.ok)return{message:`Qoder connected. Usage fetch returned ${e.status}.`};let g=await e.json().catch(()=>null);if(!g)return{message:"Qoder connected. Usage response was not JSON."};let h=g.userQuota||{},i=g.orgResourcePackage||{},j=g.addOnQuota||{},k=Number(j.total)||0,l=Number.isFinite(Number(g.expiresAt))&&Number(g.expiresAt)>0?Number(g.expiresAt):null,m=2534022144e5===l,n=l&&!m?new Date(l).toISOString():null,o={user:{total:Number(h.total)||0,used:Number(h.used)||0,remaining:Number(h.remaining)||0,unit:h.unit||"credits",resetAt:n,neverExpires:m},organization:{total:Number(i.total)||0,used:Number(i.used)||0,remaining:Number(i.remaining)||0,unit:i.unit||"credits",resetAt:n,neverExpires:m}};return k>0&&(o.addOn={total:k,used:Number(j.used)||0,remaining:Number(j.remaining)||0,unit:j.unit||"credits",resetAt:null,neverExpires:!1,detailUrl:j.detailUrl||null}),{quotas:o,totalUsagePercentage:Number(g.totalUsagePercentage)||0,isQuotaExceeded:!!g.isQuotaExceeded,expiresAt:l}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}let a$={github:a=>h(a.accessToken,a.providerSpecificData,a.proxyOptions),"gemini-cli":a=>(0,j.N)(a.accessToken,a.providerDataWithProjectId,a.proxyOptions),antigravity:a=>(0,j.c)(a.accessToken,a.providerSpecificData,a.proxyOptions,{force:a.force}),claude:a=>(0,k.gl)(a.accessToken,a.proxyOptions,{force:a.force}),codex:a=>(0,l.Tl)(a.accessToken,a.proxyOptions),kiro:a=>n(a.accessToken,a.providerSpecificData,a.proxyOptions),qoder:a=>a_(a),"qoder-cn":a=>a_(a),iflow:a=>aV(a.accessToken),ollama:a=>aX(a.apiKey,a.providerSpecificData,a.proxyOptions),glm:a=>aN(a.apiKey||a.accessToken,a.provider,a.proxyOptions),"glm-cn":a=>aN(a.apiKey||a.accessToken,a.provider,a.proxyOptions),minimax:a=>v(a.apiKey,a.provider,a.proxyOptions),"minimax-cn":a=>v(a.apiKey,a.provider,a.proxyOptions),"minimax-code":a=>J(a),"minimax-code-global":a=>J(a),"vercel-ai-gateway":a=>aY(a.apiKey,a.proxyOptions),"codebuddy-cn":a=>M(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"codebuddy-intl":a=>N(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),"grok-cli":a=>_(a.accessToken,a.providerSpecificData,a.proxyOptions),kimi:a=>ad(a.accessToken,a.apiKey,a.proxyOptions,a.providerSpecificData),"opencode-go":a=>ah(a.apiKey,a.proxyOptions),deepseek:a=>ae(a.apiKey,a.proxyOptions),groq:a=>aq(a.apiKey,a.proxyOptions),zed:a=>av(a.accessToken,a.providerSpecificData,a.proxyOptions),apinex:a=>aw(a.apiKey,a.proxyOptions),unikey:a=>aD(a.apiKey,a.providerSpecificData,a.proxyOptions),commandcode:a=>aT(a.apiKey,a.proxyOptions),cursor:a=>aK(a.accessToken,a.providerSpecificData,a.proxyOptions)};async function a_(a){let b=await (0,aL._M)(a,a.proxyOptions).catch(()=>null);return aZ(b?.accessToken||a.accessToken,a.proxyOptions,a.provider||"qoder")}async function a0(a,b=null,c={}){let{provider:d,accessToken:e,apiKey:f,providerSpecificData:g,projectId:h}=a,i={...g||{},...h?{projectId:h}:{}},j=a$[d];return j?await j({provider:d,accessToken:e,apiKey:f,providerSpecificData:g,providerDataWithProjectId:i,proxyOptions:b,force:!0===c.force}):{message:`Usage API not implemented for ${d}`}}},85081:(a,b,c)=>{c.d(b,{Ay:()=>j});var d=c(77598);let e=function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),(0,d.createHash)("sha1").update(a).digest()},f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,g=function(a){let b;if(!("string"==typeof a&&f.test(a)))throw TypeError("Invalid UUID");return Uint8Array.of((b=parseInt(a.slice(0,8),16))>>>24,b>>>16&255,b>>>8&255,255&b,(b=parseInt(a.slice(9,13),16))>>>8,255&b,(b=parseInt(a.slice(14,18),16))>>>8,255&b,(b=parseInt(a.slice(19,23),16))>>>8,255&b,(b=parseInt(a.slice(24,36),16))/0x10000000000&255,b/0x100000000&255,b>>>24&255,b>>>16&255,b>>>8&255,255&b)};var h=c(50122);function i(a,b,c,d){var f=b,i=d;let j="string"==typeof a?function(a){let b=new Uint8Array((a=unescape(encodeURIComponent(a))).length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}(a):a,k="string"==typeof f?g(f):f;if("string"==typeof f&&(f=g(f)),f?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+j.length);if(l.set(k),l.set(j,k.length),(l=e(l))[6]=15&l[6]|80,l[8]=63&l[8]|128,c){if((i=i||0)<0||i+16>c.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)c[i+a]=l[a];return c}return(0,h.k)(l)}i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";let j=i}};
@@ -1 +1 @@
1
- "use strict";exports.id=7247,exports.ids=[7247],exports.modules={57247:(a,b,c)=>{c.d(b,{KC:()=>s,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,Xg:()=>r,cY:()=>t,ez:()=>o,fZ:()=>k,kt:()=>q,ux:()=>n});var d=c(85390),e=c(6118),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",f=d?b.slice(0,c.index).trim():b,h=m(e.vq[a],f,a),i=h?.upstreamModelId||h?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof f&&f.endsWith(g.d5)?f.slice(0,-g.d5.length)+d:f+d}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let r=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function s(a){let b=r[a]||a;return e.vq[b]||[]}function t(a,b){return(0,f.g5)(m(e.vq[a],b,a))}}};
1
+ "use strict";exports.id=7247,exports.ids=[7247],exports.modules={57247:(a,b,c)=>{c.d(b,{KC:()=>t,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,V2:()=>q,Xg:()=>s,cY:()=>u,ez:()=>o,fZ:()=>k,kt:()=>r,ux:()=>n});var d=c(85390),e=c(6118),f=c(99511),g=c(59096),h=c(14170);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){return m(e.vq[a],b,a)||null}function r(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",f=d?b.slice(0,c.index).trim():b,h=m(e.vq[a],f,a),i=h?.upstreamModelId||h?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof f&&f.endsWith(g.d5)?f.slice(0,-g.d5.length)+d:f+d}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let s=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function t(a){let b=s[a]||a;return e.vq[b]||[]}function u(a,b){return(0,f.g5)(m(e.vq[a],b,a))}}};
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=7373,exports.ids=[7373],exports.modules={17373:(a,b,c)=>{c.d(b,{f6:()=>p,mO:()=>u});var d=c(77598),e=c.n(d),f=c(96179),g=c(80662),h=c(59096),i=c(37981),j=c(41004),k=c(23153);let l="x-opencode-session",m="_opencodeZenSession",n=j.w5,o=/^ses_[0-9a-f]{12}[0-9A-Za-z]{14}$/;function p(a=Date.now()){let b=~(4096n*BigInt(a)+1n),c=Array.from({length:6},(a,c)=>Number(b>>BigInt(40-8*c)&255n).toString(16).padStart(2,"0")).join("");return`ses_${c}${function(){let a=e().randomBytes(14),b="";for(let c=0;c<14;c++)b+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[a[c]%62];return b}()}`}let q=new Map,r=setInterval(()=>{let a=Date.now();for(let[b,c]of q)a-c.lastUsed>j.v1.sessionTtlMs&&q.delete(b)},j.v1.sessionCleanupIntervalMs);function s(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function t(a){return(0,h.nh)(String(a||"").replace(/\([^()]+\)\s*$/,"").trim())}r.unref&&r.unref();class u extends f.L{constructor(){super("opencode-zen")}buildUrl(a,b,c=0,d=null){return t(a)?"https://opencode.ai/zen/v1/responses":super.buildUrl(a,b,c,d)}prepareRequestCredentials({body:a,credentials:b,providerSessionId:c,clientTool:d}={}){let e=b||{},f=function(a){if(!a||"object"!=typeof a)return null;for(let[b,c]of Object.entries(a))if(b.toLowerCase()===l){let a=s(c);if(a&&o.test(a))return a}return null}(e.rawHeaders),h=s(c)||(0,g.oV)({headers:e.rawHeaders,body:a,connectionId:e.connectionId,scope:"opencode-zen"});return{...e,[m]:f||function(a,b=""){if("string"==typeof a&&o.test(a.trim()))return a.trim();let c=`opencode-zen:ses:${b||"generic"}:${a||""}`,d=q.get(c);if(d)return d.lastUsed=Date.now(),q.delete(c),q.set(c,d),d.sessionId;let e=p();return q.size>=1e3&&q.delete(q.keys().next().value),q.set(c,{sessionId:e,lastUsed:Date.now()}),e}(h,d)}}async execute(a){let b=this.prepareRequestCredentials(a);return super.execute({...a,credentials:b})}buildHeaders(a,b=!0,c,d){let e=super.buildHeaders(a||{},b,c,d),f=a?.rawHeaders||{},g={};for(let[a,b]of Object.entries(f))g[a.toLowerCase()]=b;let h=g["user-agent"]||"";e["User-Agent"]=(0,k.t8)(h)?h:n,e["x-opencode-client"]=g["x-opencode-client"]||"desktop";let i=a?.[m]||this.prepareRequestCredentials({credentials:a})[m];return e[l]=i,e["x-opencode-session-id"]=i,e}transformRequest(a,b,c,d){let e=super.transformRequest(a,b);if(e&&"object"==typeof e&&(e.stream=!0),!t(a||b?.model))return(0,k.iB)(e,"chat"),e;let f=(0,i.me)(e.input);return f&&(e.input=f),Array.isArray(e.input)&&0!==e.input.length||(e.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),void 0===e.max_output_tokens&&(void 0!==e.max_completion_tokens?e.max_output_tokens=e.max_completion_tokens:void 0!==e.max_tokens&&(e.max_output_tokens=e.max_tokens)),delete e.max_tokens,delete e.max_completion_tokens,void 0!==e.reasoning_effort&&void 0===e.reasoning&&(e.reasoning={effort:e.reasoning_effort,summary:"auto"}),!e.reasoning||"object"!=typeof e.reasoning||Array.isArray(e.reasoning)||e.reasoning.summary||(e.reasoning.summary="auto"),delete e.reasoning_effort,e.stream=!0,e.store=!1,!function(a){if(!Array.isArray(a.tools))return;let b=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let c=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,d=("string"==typeof a.name?a.name:"string"==typeof c?.name?c.name:"").trim();if(!d)return!1;let e="string"==typeof a.description?a.description:"string"==typeof c?.description?c.description:"",f=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:c?.parameters&&"object"==typeof c.parameters&&!Array.isArray(c.parameters)?c.parameters:{type:"object",properties:{}};for(let b of("object"!==f.type||f.properties||(f={...f,properties:{}}),Object.keys(a)))delete a[b];return a.type="function",a.name=d.slice(0,128),e&&(a.description=e),a.parameters=f,b.add(a.name),!0}),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(e),Array.isArray(e.input)&&(e.input=e.input.filter(a=>!!(!a||"object"!=typeof a||Array.isArray(a))||"reasoning"!==a.type&&((delete a.encrypted_content,delete a.reasoning_encrypted_content,"function_call"===a.type)?!!a.name&&"string"==typeof a.name&&""!==a.name.trim()&&(a.name=a.name.trim().slice(0,128),a.call_id=(0,i.N8)(a.call_id),a.arguments=(0,i.We)(a.arguments),!0):("function_call_output"===a.type&&(a.call_id=(0,i.N8)(a.call_id),a.output=(0,i.DP)(a.output)),!0)))),(0,k.iB)(e,"responses"),e}}},23153:(a,b,c)=>{c.d(b,{iB:()=>h,t8:()=>i});let d=[{type:"function",function:{name:"bash",description:'Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBe aware: OS: linux, Shell: bash\n\nAll commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.\n\nUse `/home/ubuntu/.hermes/cache/scratch/opencode` for temporary work outside the workspace. This directory has already been created, already exists, and is pre-approved for external directory access.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running "mkdir foo/bar", first use `ls foo` to check that "foo" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., rm "path with spaces/file.txt")\n - Examples of proper quoting:\n - mkdir "/Users/name/My Documents" (correct)\n - mkdir /Users/name/My Documents (incorrect - will fail)\n - python "/path/with spaces/script.py" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms.\n - If the output exceeds 2000 lines or 51200 bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use `head`, `tail`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.\n\n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple bash tool calls in a single message. For example, if you need to run "git status" and "git diff", send a single message with two bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with \'&&\' to chain them together (e.g., `git add . && git commit -m "message" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use \';\' only when you need to run commands sequentially but don\'t care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.\n <good-example>\n Use workdir="/foo/bar" with command: pytest tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Git and GitHub\n- Only commit, amend, push, or create PRs when explicitly requested.\n- Before committing, inspect `git status`, `git diff`, and `git log --oneline -10`; stage only intended files and never commit secrets.\n- Write a concise commit message that matches the repo style.\n- Do not update git config, skip hooks, use interactive `-i`, force-push, or create empty commits unless explicitly requested.\n- If a commit fails or hooks reject it, fix the issue and create a new commit; do not amend the failed commit.\n- Before creating a PR, inspect status, diff, remote tracking, recent commits, and the diff from the base branch.\n- Review all commits included in the PR, not just the latest commit.\n- Use `gh` for GitHub tasks, including PRs, issues, checks, and releases; return the PR URL when done.\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{command:{type:"string",description:"The command to execute"},timeout:{minimum:-0x1fffffffffffff,exclusiveMinimum:0,type:"integer",maximum:0x1fffffffffffff,description:"Optional timeout in milliseconds"},workdir:{type:"string",description:"The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands."}},required:["command"]}}},{type:"function",function:{name:"glob",description:'- Fast file pattern matching tool that works with any codebase size\n- Supports glob patterns like "**/*.js" or "src/**/*.ts"\n- Returns matching file paths\n- Use this tool when you need to find files by name patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{pattern:{type:"string",description:"The glob pattern to match files against"},path:{type:"string",description:'The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.'}},required:["pattern"]}}},{type:"function",function:{name:"grep",description:'- Fast content search tool that works with any codebase size\n- Searches file contents using regular expressions\n- Supports full regex syntax (eg. "log.*Error", "function\\s+\\w+", etc.)\n- Filter files by pattern with the include parameter (eg. "*.js", "*.{ts,tsx}")\n- Returns file paths and line numbers with matching lines\n- Use this tool when you need to find files containing specific patterns\n- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{pattern:{type:"string",description:"The regex pattern to search for in file contents"},path:{type:"string",description:"The directory to search in. Defaults to the current working directory."},include:{type:"string",description:'File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")'}},required:["pattern"]}}},{type:"function",function:{name:"read",description:'Read a file or directory from the local filesystem. If the path does not exist, an error is returned.\n\nUsage:\n- The filePath parameter should be an absolute path.\n- By default, this tool returns up to 2000 lines from the start of the file.\n- The offset parameter is the line number to start from (1-indexed).\n- To read later sections, call this tool again with a larger offset.\n- Use the grep tool to find specific content in large files or files with long lines.\n- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.\n- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\\n", you will receive "1: foo\\n". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.\n- Any line longer than 2000 characters is truncated.\n- Call this tool in parallel when you know there are multiple files you want to read.\n- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.\n- This tool can read image files and PDFs and return them as file attachments.\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{filePath:{type:"string",description:"The absolute path to the file or directory to read"},offset:{minimum:0,type:"integer",maximum:0x1fffffffffffff,description:"The line number to start reading from (1-indexed)"},limit:{minimum:0,type:"integer",maximum:0x1fffffffffffff,description:"The maximum number of lines to read (defaults to 2000)"}},required:["filePath"]}}}];d.map(a=>a.function.name);let e=[{type:"function",name:"bash",description:'Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBe aware: OS: linux, Shell: bash\n\nAll commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.\n\nUse `/home/ubuntu/.hermes/cache/scratch/opencode` for temporary work outside the workspace. This directory has already been created, already exists, and is pre-approved for external directory access.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running "mkdir foo/bar", first use `ls foo` to check that "foo" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., rm "path with spaces/file.txt")\n - Examples of proper quoting:\n - mkdir "/Users/name/My Documents" (correct)\n - mkdir /Users/name/My Documents (incorrect - will fail)\n - python "/path/with spaces/script.py" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms.\n - If the output exceeds 2000 lines or 51200 bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use `head`, `tail`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.\n\n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple bash tool calls in a single message. For example, if you need to run "git status" and "git diff", send a single message with two bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with \'&&\' to chain them together (e.g., `git add . && git commit -m "message" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use \';\' only when you need to run commands sequentially but don\'t care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.\n <good-example>\n Use workdir="/foo/bar" with command: pytest tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Git and GitHub\n- Only commit, amend, push, or create PRs when explicitly requested.\n- Before committing, inspect `git status`, `git diff`, and `git log --oneline -10`; stage only intended files and never commit secrets.\n- Write a concise commit message that matches the repo style.\n- Do not update git config, skip hooks, use interactive `-i`, force-push, or create empty commits unless explicitly requested.\n- If a commit fails or hooks reject it, fix the issue and create a new commit; do not amend the failed commit.\n- Before creating a PR, inspect status, diff, remote tracking, recent commits, and the diff from the base branch.\n- Review all commits included in the PR, not just the latest commit.\n- Use `gh` for GitHub tasks, including PRs, issues, checks, and releases; return the PR URL when done.\n',parameters:{properties:{command:{description:"The command to execute",type:"string"},timeout:{description:"Optional timeout in milliseconds",type:"integer"},workdir:{description:"The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.",type:"string"}},required:["command"],type:"object"},strict:!1},{type:"function",name:"glob",description:'- Fast file pattern matching tool that works with any codebase size\n- Supports glob patterns like "**/*.js" or "src/**/*.ts"\n- Returns matching file paths\n- Use this tool when you need to find files by name patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n',parameters:{properties:{pattern:{description:"The glob pattern to match files against",type:"string"},path:{description:'The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.',type:"string"}},required:["pattern"],type:"object"},strict:!1},{type:"function",name:"grep",description:'- Fast content search tool that works with any codebase size\n- Searches file contents using regular expressions\n- Supports full regex syntax (eg. "log.*Error", "function\\s+\\w+", etc.)\n- Filter files by pattern with the include parameter (eg. "*.js", "*.{ts,tsx}")\n- Returns file paths and line numbers with matching lines\n- Use this tool when you need to find files containing specific patterns\n- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n',parameters:{properties:{pattern:{description:"The regex pattern to search for in file contents",type:"string"},path:{description:"The directory to search in. Defaults to the current working directory.",type:"string"},include:{description:'File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")',type:"string"}},required:["pattern"],type:"object"},strict:!1},{type:"function",name:"read",description:'Read a file or directory from the local filesystem. If the path does not exist, an error is returned.\n\nUsage:\n- The filePath parameter should be an absolute path.\n- By default, this tool returns up to 2000 lines from the start of the file.\n- The offset parameter is the line number to start from (1-indexed).\n- To read later sections, call this tool again with a larger offset.\n- Use the grep tool to find specific content in large files or files with long lines.\n- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.\n- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\\n", you will receive "1: foo\\n". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.\n- Any line longer than 2000 characters is truncated.\n- Call this tool in parallel when you know there are multiple files you want to read.\n- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.\n- This tool can read image files and PDFs and return them as file attachments.\n',parameters:{properties:{filePath:{description:"The absolute path to the file or directory to read",type:"string"},offset:{description:"The line number to start reading from (1-indexed)",type:"integer"},limit:{description:"The maximum number of lines to read (defaults to 2000)",type:"integer"}},required:["filePath"],type:"object"},strict:!1}];e.map(a=>a.name);let f="chat",g="responses";function h(a,b=f){if(!a||"object"!=typeof a||Array.isArray(a))return a;let c=b===g?e:d,i=new Set(function(a=f){return(a===g?e:d).map(b=>a===g?b.name:b.function.name)}(b)),j=(Array.isArray(a.tools)?a.tools:[]).filter(a=>{let c=function(a,b){if(!a||"object"!=typeof a||Array.isArray(a))return"";let c=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null;return(b===g?"string"==typeof a.name?a.name:"string"==typeof c?.name?c.name:"":"string"==typeof c?.name?c.name:"string"==typeof a.name?a.name:"").trim()}(a,b);return!c||!i.has(c)});return a.tools=[...j,...c.map(a=>b===g?{...a,parameters:{...a.parameters}}:{...a,function:{...a.function,parameters:{...a.function.parameters}}})],a.tool_choice||(a.tool_choice="auto"),a}function i(a){let b=String(a||"").match(/opencode\/(\d+)\.(\d+)\.\d+\s+\S/i);if(!b)return!1;let c=parseInt(b[1],10),d=parseInt(b[2],10);return c>1||1===c&&d>=18}},74379:(a,b,c)=>{c.d(b,{c:()=>g});var d=c(24);let e=[{match:/claude/i,drop:["temperature"]},{provider:"github",match:/gpt-5\.4/i,drop:["temperature"]},{provider:"github",match:a=>/claude/i.test(a)&&!/claude.*(opus|sonnet).*4\.6/i.test(a),drop:["thinking","reasoning_effort"]},{provider:"cloudflare-ai",flattenContent:!0},{provider:"volcengine-ark",match:/glm-5/i,clampToModelMaxOutput:!0},{provider:"volcengine-ark",match:/kimi/i,maxOutputCap:32768,clampToModelMaxOutput:!0},{provider:"groq",dropMessageFields:["reasoning_content","reasoning","reasoning_details"]},{provider:"mistral",dropMessageFields:["reasoning_content","reasoning","reasoning_details"]},{provider:"cerebras",dropMessageFields:["reasoning_content","reasoning","reasoning_details"]}];function f(a,b,c){"number"==typeof a[b]&&Number.isFinite(a[b])&&a[b]>c&&(a[b]=c)}function g(a,b,c){if(!b||!c||"object"!=typeof c)return c;for(let g of e)if((!g.provider||g.provider===a)&&(!g.match||("function"==typeof g.match?g.match(b):g.match.test(b)))){for(let a of g.drop||[])void 0!==c[a]&&delete c[a];if(Array.isArray(g.dropMessageFields)&&Array.isArray(c.messages)){for(let a of c.messages)if(a&&"assistant"===a.role)for(let b of g.dropMessageFields)void 0!==a[b]&&delete a[b]}if(g.flattenContent&&Array.isArray(c.messages))for(let a of c.messages)a&&Array.isArray(a.content)&&(a.content=a.content.map(a=>a?.type==="text"&&"string"==typeof a.text?a.text:"").join(""));if(g.clampToModelMaxOutput||Number.isFinite(g.maxOutputCap)){let e=(0,d.getCapabilitiesForModel)(a,b).maxOutput,h=[];if(g.clampToModelMaxOutput&&Number.isFinite(e)&&e>0&&h.push(e),Number.isFinite(g.maxOutputCap)&&g.maxOutputCap>0&&h.push(g.maxOutputCap),h.length>0){let a=Math.min(...h);f(c,"max_tokens",a),f(c,"max_completion_tokens",a),f(c,"max_output_tokens",a)}}}return c}},86724:(a,b,c)=>{c.d(b,{Z:()=>h});var d=c(35024);let e=[{match:a=>/^kimi-/i.test(a||""),scope:"toolCalls"},{match:a=>/deepseek/i.test(a||""),scope:"all"}],f="deepseek-v4-pro",g={[`${f}-max`]:{thinkingType:"enabled",reasoningEffort:"max"},[`${f}-none`]:{thinkingType:"disabled",reasoningEffort:null}};function h({provider:a,model:b,body:c}){let i=d.xq[a]?.reasoningInject,j=e.find(a=>a.match(b));var k=function({provider:a,model:b,body:c}){let d=g[b];if("deepseek"!==a||!d||!c)return c;let e={...c,model:f,extra_body:{...c.extra_body||{},thinking:{...c.extra_body?.thinking||{},type:d.thinkingType}}};return d.reasoningEffort?e.reasoning_effort=d.reasoningEffort:delete e.reasoning_effort,e}({provider:a,model:b,body:c}),l=i||j;if(!l||!k?.messages)return k;let m=k.messages.map(a=>!function(a,b){if(a?.role!=="assistant")return!1;let c=a.reasoning_content;return("string"!=typeof c||!(c.length>0))&&("toolCalls"!==b||Array.isArray(a.tool_calls)&&a.tool_calls.length>0)}(a,l.scope)?a:{...a,reasoning_content:" "});return{...k,messages:m}}},96179:(a,b,c)=>{c.d(b,{L:()=>u});var d=c(74957),e=c(77598),f=c(35024),g=c(74129),h=c(57647),i=c(75924),j=c(52284),k=c(39609),l=c(86724),m=c(74379),n=c(55399);let o={combined:!0,header:"Authorization",scheme:"bearer"},p={combined:!0,header:"x-api-key",scheme:"raw"},q=Object.fromEntries(Object.entries(f.xq).filter(([,a])=>a.auth).map(([a,b])=>[a,b.auth]));function r(a,b,c){a[b.header]="bearer"===b.scheme?`Bearer ${c}`:c}let s={kimiHeaders:(a,b)=>Object.assign(a,(0,i.buildKimiHeaders)(b?.providerSpecificData?.deviceId)),minimaxHeaders:a=>{a["x-api-key"]="sk-xxx",a["X-Mavis-Timezone-Offset"]=String(-60*new Date().getTimezoneOffset()),a["X-Mavis-Session-Id"]||(a["X-Mavis-Session-Id"]=(0,e.randomUUID)())},museHeaders:(a,b)=>{b?.accessToken&&!b?.apiKey&&(a["x-api-version"]="1.0.0")},clineHeaders:(a,b)=>Object.assign(a,(0,j.w$)(b.apiKey||b.accessToken,{},{shape:b?.clineAuthShape})),kilocodeOrg:(a,b)=>{b.providerSpecificData?.orgId&&(a["X-Kilocode-OrganizationID"]=b.providerSpecificData.orgId)}},t=Object.fromEntries(Object.entries(f.sr).filter(([,a])=>a.refresh).map(([a,b])=>{let c=b.tokenUrl,d=b.refresh.encoding,e=b.refresh.scope?{scope:b.refresh.scope}:{};return[a,{encoding:d,url:()=>c,params:c=>"gemini"===a?{client_id:c.config.clientId,client_secret:c.config.clientSecret,...e}:{client_id:b.clientId,...e}}]}));class u extends d.H{constructor(a){super(a,f.xq[a]||f.xq.openai)}transformRequest(a,b){let c=this.applyJsonSchemaFallback(b);return c&&"object"==typeof c&&(this.config.quirks?.dropClientMetadata&&delete c.client_metadata,(0,m.c)(this.provider,a,c)),(0,l.Z)({provider:this.provider,model:a,body:c})}applyJsonSchemaFallback(a){if(!this.provider?.startsWith?.("openai-compatible-"))return a;let b=a?.response_format;if(b?.type!=="json_schema"||!b.json_schema?.schema)return a;let c=JSON.stringify(b.json_schema.schema,null,2),d=`You must respond with valid JSON that strictly follows this JSON schema:
1
+ "use strict";exports.id=7373,exports.ids=[7373],exports.modules={17373:(a,b,c)=>{c.d(b,{f6:()=>p,mO:()=>u});var d=c(77598),e=c.n(d),f=c(96179),g=c(80662),h=c(59096),i=c(37981),j=c(41004),k=c(23153);let l="x-opencode-session",m="_opencodeZenSession",n=j.w5,o=/^ses_[0-9a-f]{12}[0-9A-Za-z]{14}$/;function p(a=Date.now()){let b=~(4096n*BigInt(a)+1n),c=Array.from({length:6},(a,c)=>Number(b>>BigInt(40-8*c)&255n).toString(16).padStart(2,"0")).join("");return`ses_${c}${function(){let a=e().randomBytes(14),b="";for(let c=0;c<14;c++)b+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[a[c]%62];return b}()}`}let q=new Map,r=setInterval(()=>{let a=Date.now();for(let[b,c]of q)a-c.lastUsed>j.v1.sessionTtlMs&&q.delete(b)},j.v1.sessionCleanupIntervalMs);function s(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function t(a){return(0,h.nh)(String(a||"").replace(/\([^()]+\)\s*$/,"").trim())}r.unref&&r.unref();class u extends f.L{constructor(){super("opencode-zen")}buildUrl(a,b,c=0,d=null){return t(a)?"https://opencode.ai/zen/v1/responses":super.buildUrl(a,b,c,d)}prepareRequestCredentials({body:a,credentials:b,providerSessionId:c,clientTool:d}={}){let e=b||{},f=function(a){if(!a||"object"!=typeof a)return null;for(let[b,c]of Object.entries(a))if(b.toLowerCase()===l){let a=s(c);if(a&&o.test(a))return a}return null}(e.rawHeaders),h=s(c)||(0,g.oV)({headers:e.rawHeaders,body:a,connectionId:e.connectionId,scope:"opencode-zen"});return{...e,[m]:f||function(a,b=""){if("string"==typeof a&&o.test(a.trim()))return a.trim();let c=`opencode-zen:ses:${b||"generic"}:${a||""}`,d=q.get(c);if(d)return d.lastUsed=Date.now(),q.delete(c),q.set(c,d),d.sessionId;let e=p();return q.size>=1e3&&q.delete(q.keys().next().value),q.set(c,{sessionId:e,lastUsed:Date.now()}),e}(h,d)}}async execute(a){let b=this.prepareRequestCredentials(a);return super.execute({...a,credentials:b})}buildHeaders(a,b=!0,c,d){let e=super.buildHeaders(a||{},b,c,d),f=a?.rawHeaders||{},g={};for(let[a,b]of Object.entries(f))g[a.toLowerCase()]=b;let h=g["user-agent"]||"";e["User-Agent"]=(0,k.t8)(h)?h:n,e["x-opencode-client"]=g["x-opencode-client"]||"desktop",e["x-opencode-project"]=g["x-opencode-project"]||"global";let i=a?.[m]||this.prepareRequestCredentials({credentials:a})[m];return e[l]=i,e["x-opencode-session-id"]=i,e}transformRequest(a,b,c,d){let e=super.transformRequest(a,b);if(e&&"object"==typeof e&&(e.stream=!0),!t(a||b?.model))return(0,k.iB)(e,"chat"),e;let f=(0,i.me)(e.input);return f&&(e.input=f),Array.isArray(e.input)&&0!==e.input.length||(e.input=[{type:"message",role:"user",content:[{type:"input_text",text:"..."}]}]),void 0===e.max_output_tokens&&(void 0!==e.max_completion_tokens?e.max_output_tokens=e.max_completion_tokens:void 0!==e.max_tokens&&(e.max_output_tokens=e.max_tokens)),delete e.max_tokens,delete e.max_completion_tokens,void 0!==e.reasoning_effort&&void 0===e.reasoning&&(e.reasoning={effort:e.reasoning_effort,summary:"auto"}),!e.reasoning||"object"!=typeof e.reasoning||Array.isArray(e.reasoning)||e.reasoning.summary||(e.reasoning.summary="auto"),delete e.reasoning_effort,e.stream=!0,e.store=!1,!function(a){if(!Array.isArray(a.tools))return;let b=new Set;if(a.tools=a.tools.filter(a=>{if(!a||"object"!=typeof a||Array.isArray(a))return!1;let c=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null,d=("string"==typeof a.name?a.name:"string"==typeof c?.name?c.name:"").trim();if(!d)return!1;let e="string"==typeof a.description?a.description:"string"==typeof c?.description?c.description:"",f=a.parameters&&"object"==typeof a.parameters&&!Array.isArray(a.parameters)?a.parameters:c?.parameters&&"object"==typeof c.parameters&&!Array.isArray(c.parameters)?c.parameters:{type:"object",properties:{}};for(let b of("object"!==f.type||f.properties||(f={...f,properties:{}}),Object.keys(a)))delete a[b];return a.type="function",a.name=d.slice(0,128),e&&(a.description=e),a.parameters=f,b.add(a.name),!0}),a.tool_choice&&"object"==typeof a.tool_choice&&!Array.isArray(a.tool_choice)&&"function"===a.tool_choice.type){let c="string"==typeof a.tool_choice.name?a.tool_choice.name.trim():"";c&&b.has(c)||delete a.tool_choice}}(e),Array.isArray(e.input)&&(e.input=e.input.filter(a=>!!(!a||"object"!=typeof a||Array.isArray(a))||"reasoning"!==a.type&&((delete a.encrypted_content,delete a.reasoning_encrypted_content,"function_call"===a.type)?!!a.name&&"string"==typeof a.name&&""!==a.name.trim()&&(a.name=a.name.trim().slice(0,128),a.call_id=(0,i.N8)(a.call_id),a.arguments=(0,i.We)(a.arguments),!0):("function_call_output"===a.type&&(a.call_id=(0,i.N8)(a.call_id),a.output=(0,i.DP)(a.output)),!0)))),(0,k.iB)(e,"responses"),e}}},23153:(a,b,c)=>{c.d(b,{iB:()=>h,t8:()=>i});let d=[{type:"function",function:{name:"bash",description:'Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBe aware: OS: linux, Shell: bash\n\nAll commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.\n\nUse `/home/ubuntu/.hermes/cache/scratch/opencode` for temporary work outside the workspace. This directory has already been created, already exists, and is pre-approved for external directory access.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running "mkdir foo/bar", first use `ls foo` to check that "foo" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., rm "path with spaces/file.txt")\n - Examples of proper quoting:\n - mkdir "/Users/name/My Documents" (correct)\n - mkdir /Users/name/My Documents (incorrect - will fail)\n - python "/path/with spaces/script.py" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms.\n - If the output exceeds 2000 lines or 51200 bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use `head`, `tail`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.\n\n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple bash tool calls in a single message. For example, if you need to run "git status" and "git diff", send a single message with two bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with \'&&\' to chain them together (e.g., `git add . && git commit -m "message" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use \';\' only when you need to run commands sequentially but don\'t care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.\n <good-example>\n Use workdir="/foo/bar" with command: pytest tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Git and GitHub\n- Only commit, amend, push, or create PRs when explicitly requested.\n- Before committing, inspect `git status`, `git diff`, and `git log --oneline -10`; stage only intended files and never commit secrets.\n- Write a concise commit message that matches the repo style.\n- Do not update git config, skip hooks, use interactive `-i`, force-push, or create empty commits unless explicitly requested.\n- If a commit fails or hooks reject it, fix the issue and create a new commit; do not amend the failed commit.\n- Before creating a PR, inspect status, diff, remote tracking, recent commits, and the diff from the base branch.\n- Review all commits included in the PR, not just the latest commit.\n- Use `gh` for GitHub tasks, including PRs, issues, checks, and releases; return the PR URL when done.\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{command:{type:"string",description:"The command to execute"},timeout:{minimum:-0x1fffffffffffff,exclusiveMinimum:0,type:"integer",maximum:0x1fffffffffffff,description:"Optional timeout in milliseconds"},workdir:{type:"string",description:"The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands."}},required:["command"]}}},{type:"function",function:{name:"glob",description:'- Fast file pattern matching tool that works with any codebase size\n- Supports glob patterns like "**/*.js" or "src/**/*.ts"\n- Returns matching file paths\n- Use this tool when you need to find files by name patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{pattern:{type:"string",description:"The glob pattern to match files against"},path:{type:"string",description:'The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.'}},required:["pattern"]}}},{type:"function",function:{name:"grep",description:'- Fast content search tool that works with any codebase size\n- Searches file contents using regular expressions\n- Supports full regex syntax (eg. "log.*Error", "function\\s+\\w+", etc.)\n- Filter files by pattern with the include parameter (eg. "*.js", "*.{ts,tsx}")\n- Returns file paths and line numbers with matching lines\n- Use this tool when you need to find files containing specific patterns\n- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{pattern:{type:"string",description:"The regex pattern to search for in file contents"},path:{type:"string",description:"The directory to search in. Defaults to the current working directory."},include:{type:"string",description:'File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")'}},required:["pattern"]}}},{type:"function",function:{name:"read",description:'Read a file or directory from the local filesystem. If the path does not exist, an error is returned.\n\nUsage:\n- The filePath parameter should be an absolute path.\n- By default, this tool returns up to 2000 lines from the start of the file.\n- The offset parameter is the line number to start from (1-indexed).\n- To read later sections, call this tool again with a larger offset.\n- Use the grep tool to find specific content in large files or files with long lines.\n- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.\n- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\\n", you will receive "1: foo\\n". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.\n- Any line longer than 2000 characters is truncated.\n- Call this tool in parallel when you know there are multiple files you want to read.\n- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.\n- This tool can read image files and PDFs and return them as file attachments.\n',parameters:{$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{filePath:{type:"string",description:"The absolute path to the file or directory to read"},offset:{minimum:0,type:"integer",maximum:0x1fffffffffffff,description:"The line number to start reading from (1-indexed)"},limit:{minimum:0,type:"integer",maximum:0x1fffffffffffff,description:"The maximum number of lines to read (defaults to 2000)"}},required:["filePath"]}}}];d.map(a=>a.function.name);let e=[{type:"function",name:"bash",description:'Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nBe aware: OS: linux, Shell: bash\n\nAll commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.\n\nUse `/home/ubuntu/.hermes/cache/scratch/opencode` for temporary work outside the workspace. This directory has already been created, already exists, and is pre-approved for external directory access.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n - For example, before running "mkdir foo/bar", first use `ls foo` to check that "foo" exists and is the intended parent directory\n\n2. Command Execution:\n - Always quote file paths that contain spaces with double quotes (e.g., rm "path with spaces/file.txt")\n - Examples of proper quoting:\n - mkdir "/Users/name/My Documents" (correct)\n - mkdir /Users/name/My Documents (incorrect - will fail)\n - python "/path/with spaces/script.py" (correct)\n - python /path/with spaces/script.py (incorrect - will fail)\n - After ensuring proper quoting, execute the command.\n - Capture the output of the command.\n\nUsage notes:\n - The command argument is required.\n - You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms.\n - If the output exceeds 2000 lines or 51200 bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use `head`, `tail`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.\n\n - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n - File search: Use Glob (NOT find or ls)\n - Content search: Use Grep (NOT grep or rg)\n - Read files: Use Read (NOT cat/head/tail)\n - Edit files: Use Edit (NOT sed/awk)\n - Write files: Use Write (NOT echo >/cat <<EOF)\n - Communication: Output text directly (NOT echo/printf)\n - When issuing multiple commands:\n - If the commands are independent and can run in parallel, make multiple bash tool calls in a single message. For example, if you need to run "git status" and "git diff", send a single message with two bash tool calls in parallel.\n - If the commands depend on each other and must run sequentially, use a single Bash call with \'&&\' to chain them together (e.g., `git add . && git commit -m "message" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n - Use \';\' only when you need to run commands sequentially but don\'t care if earlier commands fail\n - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n - AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.\n <good-example>\n Use workdir="/foo/bar" with command: pytest tests\n </good-example>\n <bad-example>\n cd /foo/bar && pytest tests\n </bad-example>\n\n# Git and GitHub\n- Only commit, amend, push, or create PRs when explicitly requested.\n- Before committing, inspect `git status`, `git diff`, and `git log --oneline -10`; stage only intended files and never commit secrets.\n- Write a concise commit message that matches the repo style.\n- Do not update git config, skip hooks, use interactive `-i`, force-push, or create empty commits unless explicitly requested.\n- If a commit fails or hooks reject it, fix the issue and create a new commit; do not amend the failed commit.\n- Before creating a PR, inspect status, diff, remote tracking, recent commits, and the diff from the base branch.\n- Review all commits included in the PR, not just the latest commit.\n- Use `gh` for GitHub tasks, including PRs, issues, checks, and releases; return the PR URL when done.\n',parameters:{properties:{command:{description:"The command to execute",type:"string"},timeout:{description:"Optional timeout in milliseconds",type:"integer"},workdir:{description:"The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.",type:"string"}},required:["command"],type:"object"},strict:!1},{type:"function",name:"glob",description:'- Fast file pattern matching tool that works with any codebase size\n- Supports glob patterns like "**/*.js" or "src/**/*.ts"\n- Returns matching file paths\n- Use this tool when you need to find files by name patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n',parameters:{properties:{pattern:{description:"The glob pattern to match files against",type:"string"},path:{description:'The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.',type:"string"}},required:["pattern"],type:"object"},strict:!1},{type:"function",name:"grep",description:'- Fast content search tool that works with any codebase size\n- Searches file contents using regular expressions\n- Supports full regex syntax (eg. "log.*Error", "function\\s+\\w+", etc.)\n- Filter files by pattern with the include parameter (eg. "*.js", "*.{ts,tsx}")\n- Returns file paths and line numbers with matching lines\n- Use this tool when you need to find files containing specific patterns\n- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n',parameters:{properties:{pattern:{description:"The regex pattern to search for in file contents",type:"string"},path:{description:"The directory to search in. Defaults to the current working directory.",type:"string"},include:{description:'File pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")',type:"string"}},required:["pattern"],type:"object"},strict:!1},{type:"function",name:"read",description:'Read a file or directory from the local filesystem. If the path does not exist, an error is returned.\n\nUsage:\n- The filePath parameter should be an absolute path.\n- By default, this tool returns up to 2000 lines from the start of the file.\n- The offset parameter is the line number to start from (1-indexed).\n- To read later sections, call this tool again with a larger offset.\n- Use the grep tool to find specific content in large files or files with long lines.\n- If you are unsure of the correct file path, use the glob tool to look up filenames by glob pattern.\n- Contents are returned with each line prefixed by its line number as `<line>: <content>`. For example, if a file has contents "foo\\n", you will receive "1: foo\\n". For directories, entries are returned one per line (without line numbers) with a trailing `/` for subdirectories.\n- Any line longer than 2000 characters is truncated.\n- Call this tool in parallel when you know there are multiple files you want to read.\n- Avoid tiny repeated slices (30 line chunks). If you need more context, read a larger window.\n- This tool can read image files and PDFs and return them as file attachments.\n',parameters:{properties:{filePath:{description:"The absolute path to the file or directory to read",type:"string"},offset:{description:"The line number to start reading from (1-indexed)",type:"integer"},limit:{description:"The maximum number of lines to read (defaults to 2000)",type:"integer"}},required:["filePath"],type:"object"},strict:!1}];e.map(a=>a.name);let f="chat",g="responses";function h(a,b=f){if(!a||"object"!=typeof a||Array.isArray(a))return a;let c=b===g?e:d,i=new Set(function(a=f){return(a===g?e:d).map(b=>a===g?b.name:b.function.name)}(b)),j=(Array.isArray(a.tools)?a.tools:[]).filter(a=>{let c=function(a,b){if(!a||"object"!=typeof a||Array.isArray(a))return"";let c=a.function&&"object"==typeof a.function&&!Array.isArray(a.function)?a.function:null;return(b===g?"string"==typeof a.name?a.name:"string"==typeof c?.name?c.name:"":"string"==typeof c?.name?c.name:"string"==typeof a.name?a.name:"").trim()}(a,b);return!c||!i.has(c)});return a.tools=[...j,...c.map(a=>b===g?{...a,parameters:{...a.parameters}}:{...a,function:{...a.function,parameters:{...a.function.parameters}}})],a.tool_choice||(a.tool_choice="auto"),a}function i(a){let b=String(a||"").match(/opencode\/(\d+)\.(\d+)\.\d+\s+\S/i);if(!b)return!1;let c=parseInt(b[1],10),d=parseInt(b[2],10);return c>1||1===c&&d>=18}},74379:(a,b,c)=>{c.d(b,{c:()=>g});var d=c(24);let e=[{match:/claude/i,drop:["temperature"]},{provider:"github",match:/gpt-5\.4/i,drop:["temperature"]},{provider:"github",match:a=>/claude/i.test(a)&&!/claude.*(opus|sonnet).*4\.6/i.test(a),drop:["thinking","reasoning_effort"]},{provider:"cloudflare-ai",flattenContent:!0},{provider:"volcengine-ark",match:/glm-5/i,clampToModelMaxOutput:!0},{provider:"volcengine-ark",match:/kimi/i,maxOutputCap:32768,clampToModelMaxOutput:!0},{provider:"groq",dropMessageFields:["reasoning_content","reasoning","reasoning_details"]},{provider:"mistral",dropMessageFields:["reasoning_content","reasoning","reasoning_details"]},{provider:"cerebras",dropMessageFields:["reasoning_content","reasoning","reasoning_details"]},{provider:"opencode-go",match:/^deepseek/i,drop:["response_format"]}];function f(a,b,c){"number"==typeof a[b]&&Number.isFinite(a[b])&&a[b]>c&&(a[b]=c)}function g(a,b,c){if(!b||!c||"object"!=typeof c)return c;for(let g of e)if((!g.provider||g.provider===a)&&(!g.match||("function"==typeof g.match?g.match(b):g.match.test(b)))){for(let a of g.drop||[])void 0!==c[a]&&delete c[a];if(Array.isArray(g.dropMessageFields)&&Array.isArray(c.messages)){for(let a of c.messages)if(a&&"assistant"===a.role)for(let b of g.dropMessageFields)void 0!==a[b]&&delete a[b]}if(g.flattenContent&&Array.isArray(c.messages))for(let a of c.messages)a&&Array.isArray(a.content)&&(a.content=a.content.map(a=>a?.type==="text"&&"string"==typeof a.text?a.text:"").join(""));if(g.clampToModelMaxOutput||Number.isFinite(g.maxOutputCap)){let e=(0,d.getCapabilitiesForModel)(a,b).maxOutput,h=[];if(g.clampToModelMaxOutput&&Number.isFinite(e)&&e>0&&h.push(e),Number.isFinite(g.maxOutputCap)&&g.maxOutputCap>0&&h.push(g.maxOutputCap),h.length>0){let a=Math.min(...h);f(c,"max_tokens",a),f(c,"max_completion_tokens",a),f(c,"max_output_tokens",a)}}}return c}},86724:(a,b,c)=>{c.d(b,{Z:()=>h});var d=c(35024);let e=[{match:a=>/^kimi-/i.test(a||""),scope:"toolCalls"},{match:a=>/deepseek/i.test(a||""),scope:"all"}],f="deepseek-v4-pro",g={[`${f}-max`]:{thinkingType:"enabled",reasoningEffort:"max"},[`${f}-none`]:{thinkingType:"disabled",reasoningEffort:null}};function h({provider:a,model:b,body:c}){let i=d.xq[a]?.reasoningInject,j=e.find(a=>a.match(b));var k=function({provider:a,model:b,body:c}){let d=g[b];if("deepseek"!==a||!d||!c)return c;let e={...c,model:f,extra_body:{...c.extra_body||{},thinking:{...c.extra_body?.thinking||{},type:d.thinkingType}}};return d.reasoningEffort?e.reasoning_effort=d.reasoningEffort:delete e.reasoning_effort,e}({provider:a,model:b,body:c}),l=i||j;if(!l||!k?.messages)return k;let m=k.messages.map(a=>!function(a,b){if(a?.role!=="assistant")return!1;let c=a.reasoning_content;return("string"!=typeof c||!(c.length>0))&&("toolCalls"!==b||Array.isArray(a.tool_calls)&&a.tool_calls.length>0)}(a,l.scope)?a:{...a,reasoning_content:" "});return{...k,messages:m}}},96179:(a,b,c)=>{c.d(b,{L:()=>v});var d=c(74957),e=c(77598),f=c(35024),g=c(74129),h=c(57647),i=c(75924),j=c(52284),k=c(39609),l=c(86724),m=c(74379),n=c(55399);let o={combined:!0,header:"Authorization",scheme:"bearer"},p={combined:!0,header:"x-api-key",scheme:"raw"},q=Object.fromEntries(Object.entries(f.xq).filter(([,a])=>a.auth).map(([a,b])=>[a,b.auth])),r=new Set(["nous"]);function s(a,b,c){a[b.header]="bearer"===b.scheme?`Bearer ${c}`:c}let t={kimiHeaders:(a,b)=>Object.assign(a,(0,i.buildKimiHeaders)(b?.providerSpecificData?.deviceId)),minimaxHeaders:a=>{a["x-api-key"]="sk-xxx",a["X-Mavis-Timezone-Offset"]=String(-60*new Date().getTimezoneOffset()),a["X-Mavis-Session-Id"]||(a["X-Mavis-Session-Id"]=(0,e.randomUUID)())},museHeaders:(a,b)=>{b?.accessToken&&!b?.apiKey&&(a["x-api-version"]="1.0.0")},clineHeaders:(a,b)=>Object.assign(a,(0,j.w$)(b.apiKey||b.accessToken,{},{shape:b?.clineAuthShape})),kilocodeOrg:(a,b)=>{b.providerSpecificData?.orgId&&(a["X-Kilocode-OrganizationID"]=b.providerSpecificData.orgId)}},u=Object.fromEntries(Object.entries(f.sr).filter(([,a])=>a.refresh).map(([a,b])=>{let c=b.tokenUrl,d=b.refresh.encoding,e=b.refresh.scope?{scope:b.refresh.scope}:{};return[a,{encoding:d,url:()=>c,params:c=>"gemini"===a?{client_id:c.config.clientId,client_secret:c.config.clientSecret,...e}:{client_id:b.clientId,...e}}]}));class v extends d.H{constructor(a){super(a,f.xq[a]||f.xq.openai)}transformRequest(a,b,c,d){let e=this.applyJsonSchemaFallback(this.applyNousAttribution(a,b,c,d));return e&&"object"==typeof e&&(this.config.quirks?.dropClientMetadata&&delete e.client_metadata,(0,m.c)(this.provider,a,e)),(0,l.Z)({provider:this.provider,model:a,body:e})}applyNousAttribution(a,b,c,d){if(!b||"object"!=typeof b||Array.isArray(b)||!r.has(this.provider)&&(!this.provider?.startsWith?.("openai-compatible-")||!d?.apiKey||null!=b.tags&&!Array.isArray(b.tags)))return b;try{let e=new URL(this.buildUrl(a,c,0,d));if("https:"!==e.protocol||e.hostname!==i.Ok.hostname||e.pathname!==i.Ok.chatCompletionsPath)return b}catch{return b}let e=Array.isArray(b.tags)?[...b.tags]:[];for(let a of i.Ok.tags){let b=a.slice(0,a.indexOf("=")+1);(e=e.filter(a=>"string"!=typeof a||!a.startsWith(b)||a.slice(b.length).trim())).some(a=>"string"==typeof a&&a.startsWith(b))||e.push(a)}return{...b,tags:[...new Set(e)]}}applyJsonSchemaFallback(a){if(!this.provider?.startsWith?.("openai-compatible-"))return a;let b=a?.response_format;if(b?.type!=="json_schema"||!b.json_schema?.schema)return a;let c=JSON.stringify(b.json_schema.schema,null,2),d=`You must respond with valid JSON that strictly follows this JSON schema:
2
2
  \`\`\`json
3
3
  ${c}
4
4
  \`\`\`
@@ -6,4 +6,4 @@ Respond ONLY with the JSON object, no other text.`,e=Array.isArray(a.messages)?a
6
6
 
7
7
  ${d}`:Array.isArray(f.content)&&f.content.push({type:"text",text:`
8
8
 
9
- ${d}`}):e.unshift({role:"system",content:d}),{...a,messages:e,response_format:{type:"json_object"}}}parseError(a,b){if(429===a.status&&b){let a=/\d{4}-\d{2}-\d{2}T[\d:]+(?:\.\d+)?(?:[+-]\d{2}:\d{2}|Z)/i,c=b.match(RegExp(`(?:next|new)\\s+(?:rolling\\s+)?\\d+-day\\s+period\\s+starts\\s+at\\s+(${a.source})`,"i"))||b.match(RegExp(`(?:resets?|next)\\s+(?:at|on)\\s+(${a.source})`,"i"));if(c){let a=Date.parse(c[1]);if(Number.isFinite(a)&&a>Date.now())return{status:429,message:b,resetsAtMs:a}}let d=b.match(/try\s+again\s+in\s+(\d+h(?:\s*\d+m)?(?:\s*\d+s)?|\d+m(?:\s*\d+s)?|\d+s)/i);if(d){let a=d[1].toLowerCase().match(/\d+[hms]/g),c=0;if(a)for(let b of a){let a=Number(b.slice(0,-1));b.endsWith("h")?c+=3600*a:b.endsWith("m")?c+=60*a:c+=a}if(c>0)return{status:429,message:b,resetsAtMs:Date.now()+1e3*c}}}return super.parseError(a,b)}buildUrl(a,b,c=0,d=null){let e=d?.runtimeTransport;if(e?.baseUrl)return e.urlSuffix?`${e.baseUrl}${e.urlSuffix}`:e.baseUrl;if(this.provider?.startsWith?.("openai-compatible-")){let a=(d?.providerSpecificData?.baseUrl||g.Es).replace(/\/$/,""),b="responses"===(0,h.jD)(this.provider,d)?"/responses":"/chat/completions";return`${a}${b}`}if(this.provider?.startsWith?.("anthropic-compatible-")){let a=(d?.providerSpecificData?.baseUrl||g.ky).replace(/\/$/,"");return`${a}/messages`}if("gemini"===this.config.format)return`${this.config.baseUrl}/${a}:${b?"streamGenerateContent?alt=sse":"generateContent"}`;if(this.config.urlSuffix)return`${this.config.baseUrl}${this.config.urlSuffix}`;let f=this.config.baseUrl;if(f?.includes("{accountId}")){let a=d?.providerSpecificData?.accountId;if(!a)throw Error(`${this.provider} requires accountId in providerSpecificData`);return f.replace("{accountId}",a)}return f}resolveAuthDescriptor(){return this.provider?.startsWith?.("anthropic-compatible-")?{apiKey:{header:"x-api-key",scheme:"raw"},oauth:{header:"Authorization",scheme:"bearer"},anthropicVersion:!0}:this.config?.format==="claude"?{...p,anthropicVersion:!0}:o}buildHeaders(a,b=!0,c,d,e=null){let f=a?.runtimeTransport,h={"Content-Type":"application/json",...f?f.headers:this.config.headers},i=(a?.id==="noauth"||a?.connectionId==="noauth")&&!a?.apiKey&&(!a?.accessToken||"public"===a.accessToken);if(a?.authType==="none"&&i)return b&&(h.Accept="text/event-stream"),h;let j=f?.auth||q[this.provider]||this.resolveAuthDescriptor();for(let b of(!function(a,b,c){if(b.combined){r(a,b,c.apiKey||c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=g.b8);return}c.apiKey?r(a,b.apiKey,c.apiKey):c.accessToken&&r(a,b.oauth,c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=g.b8)}(h,j,a),j.hooks||[]))s[b]?.(h,a);let k="string"==typeof d&&/^claude-/.test(d),l=a?.rawHeaders?.["anthropic-beta"];if(d&&("claude"===this.provider||this.provider?.startsWith?.("anthropic-compatible-")&&k)?h["Anthropic-Beta"]=(0,g.Xy)((0,g.d)(d,e),l):"anthropic"===this.provider&&l&&(h["Anthropic-Beta"]=(0,g.Xy)(h["Anthropic-Beta"],l)),"claude"===this.provider&&!h["x-claude-code-session-id"]&&(a?.accessToken||a?.apiKey||"").includes("sk-ant-oat")){let a=(0,n.tV)(e?.metadata?.user_id);a&&(h["x-claude-code-session-id"]=a)}if(this.provider?.startsWith?.("anthropic-compatible-")){let b=a?.providerSpecificData?.baseUrl||"";if(!(""===b||b.includes("api.anthropic.com"))){for(let b of(a.apiKey&&!h.Authorization&&(h.Authorization=`Bearer ${a.apiKey}`),delete h["anthropic-dangerous-direct-browser-access"],delete h["Anthropic-Dangerous-Direct-Browser-Access"],delete h["x-app"],delete h["X-App"],["anthropic-beta","Anthropic-Beta"]))if(h[b]){let a=h[b].split(",").map(a=>a.trim()).filter(a=>a&&"claude-code-20250219"!==a).join(",");a?h[b]=a:delete h[b]}}}return b&&(h.Accept="text/event-stream"),h}async retryAlternativeAuth(a,b){if("cline"!==this.provider&&"clinepass"!==this.provider)return!1;let c=a?.apiKey||a?.accessToken;if(!c||a.clineAuthShape)return!1;let d=(0,j.lZ)(c);if(!d)return!1;let e=(0,j.yN)(d);return a.clineAuthShape=e,a.accessToken=d,a.apiKey&&(a.apiKey=d),b?.debug?.("AUTH",`CLINE | 401 on ${(0,j.yN)(c)} token, retrying as ${e}`),!0}refreshFromGrant(a,b){let c=t[this.provider],d={grant_type:"refresh_token",refresh_token:a.refreshToken,...c.params(this)};return"json"===c.encoding?this.refreshWithJSON(c.url(),d,b):this.refreshWithForm(c.url(),d,b)}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;let d={claude:()=>this.refreshFromGrant(a,c),codex:()=>this.refreshFromGrant(a,c),iflow:()=>this.refreshIflow(a.refreshToken,c),gemini:()=>this.refreshFromGrant(a,c),kiro:()=>this.refreshKiro(a.refreshToken,c),cline:()=>this.refreshCline(a.refreshToken,c),clinepass:()=>this.refreshCline(a.refreshToken,c),kimi:()=>this.refreshKimi(a,c),"kimi-coding":()=>this.refreshKimi(a,c),kilocode:()=>this.refreshKilocode(a.refreshToken,c),nous:()=>this.refreshNousPortal(a,c)}[this.provider];if(!d)return null;try{let a=await d();return a&&b?.info?.("TOKEN",`${this.provider} refreshed`),a}catch(a){return b?.error?.("TOKEN",`${this.provider} refresh error: ${a.message}`),null}}async refreshWithJSON(a,b,c=null){let d=await (0,k.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshWithForm(a,b,c=null){let d=await (0,k.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshIflow(a,b=null){let c=btoa(`${f.xq.iflow.clientId}:${f.xq.iflow.clientSecret}`),d=await (0,k.proxyAwareFetch)(i.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:f.xq.iflow.clientId,client_secret:f.xq.iflow.clientSecret})},b);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||a,expiresIn:e.expires_in}}async refreshKiro(a,b=null){let c=await (0,k.proxyAwareFetch)(f.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},b);if(!c.ok)return null;let d=await c.json();return{accessToken:d.accessToken,refreshToken:d.refreshToken||a,expiresIn:d.expiresIn}}async refreshCline(a,b=null){let c=await (0,k.proxyAwareFetch)(f.xq.cline.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})},b);if(!c.ok)return null;let d=await c.json(),e=d?.data||d,g=e?.expiresAt,h=g?Math.max(1,Math.floor((new Date(g).getTime()-Date.now())/1e3)):void 0,i=e?.accessToken;return i&&!i.startsWith("workos:")&&(i=`workos:${i}`),{accessToken:i,refreshToken:e?.refreshToken||a,expiresIn:h}}async refreshNousPortal(a,b=null){let c=a.refreshToken,d=f.sr.nous;if(!d?.refreshUrl&&!d?.tokenUrl)return null;let e=await (0,k.proxyAwareFetch)(d.refreshUrl||d.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","X-Nous-Refresh-Token":c},body:new URLSearchParams({grant_type:"refresh_token",client_id:d.clientId})},b);if(!e.ok)return null;let g=await e.json();return{accessToken:g.access_token,refreshToken:g.refresh_token||c,expiresIn:g.expires_in}}async refreshKimi(a,b=null){let c=a.refreshToken,d=f.xq.kimi||f.xq["kimi-coding"];if(!d?.refreshUrl||!d?.clientId)return null;let e=(0,i.buildKimiHeaders)(a?.providerSpecificData?.deviceId),g=await (0,k.proxyAwareFetch)(d.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...e},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:d.clientId})},b);if(!g.ok)return null;let h=await g.json();return{accessToken:h.access_token,refreshToken:h.refresh_token||c,expiresIn:h.expires_in}}async refreshKilocode(a,b=null){return null}}}};
9
+ ${d}`}):e.unshift({role:"system",content:d}),{...a,messages:e,response_format:{type:"json_object"}}}parseError(a,b){if(429===a.status&&b){let a=/\d{4}-\d{2}-\d{2}T[\d:]+(?:\.\d+)?(?:[+-]\d{2}:\d{2}|Z)/i,c=b.match(RegExp(`(?:next|new)\\s+(?:rolling\\s+)?\\d+-day\\s+period\\s+starts\\s+at\\s+(${a.source})`,"i"))||b.match(RegExp(`(?:resets?|next)\\s+(?:at|on)\\s+(${a.source})`,"i"));if(c){let a=Date.parse(c[1]);if(Number.isFinite(a)&&a>Date.now())return{status:429,message:b,resetsAtMs:a}}let d=b.match(/try\s+again\s+in\s+(\d+h(?:\s*\d+m)?(?:\s*\d+s)?|\d+m(?:\s*\d+s)?|\d+s)/i);if(d){let a=d[1].toLowerCase().match(/\d+[hms]/g),c=0;if(a)for(let b of a){let a=Number(b.slice(0,-1));b.endsWith("h")?c+=3600*a:b.endsWith("m")?c+=60*a:c+=a}if(c>0)return{status:429,message:b,resetsAtMs:Date.now()+1e3*c}}}return super.parseError(a,b)}buildUrl(a,b,c=0,d=null){let e=d?.runtimeTransport;if(e?.baseUrl)return e.urlSuffix?`${e.baseUrl}${e.urlSuffix}`:e.baseUrl;if(this.provider?.startsWith?.("openai-compatible-")){let a=(d?.providerSpecificData?.baseUrl||g.Es).replace(/\/$/,""),b="responses"===(0,h.jD)(this.provider,d)?"/responses":"/chat/completions";return`${a}${b}`}if(this.provider?.startsWith?.("anthropic-compatible-")){let a=(d?.providerSpecificData?.baseUrl||g.ky).replace(/\/$/,"");return`${a}/messages`}if("gemini"===this.config.format)return`${this.config.baseUrl}/${a}:${b?"streamGenerateContent?alt=sse":"generateContent"}`;if(this.config.urlSuffix)return`${this.config.baseUrl}${this.config.urlSuffix}`;let f=this.config.baseUrl;if(f?.includes("{accountId}")){let a=d?.providerSpecificData?.accountId;if(!a)throw Error(`${this.provider} requires accountId in providerSpecificData`);return f.replace("{accountId}",a)}return f}resolveAuthDescriptor(){return this.provider?.startsWith?.("anthropic-compatible-")?{apiKey:{header:"x-api-key",scheme:"raw"},oauth:{header:"Authorization",scheme:"bearer"},anthropicVersion:!0}:this.config?.format==="claude"?{...p,anthropicVersion:!0}:o}buildHeaders(a,b=!0,c,d,e=null){let f=a?.runtimeTransport,h={"Content-Type":"application/json",...f?f.headers:this.config.headers},i=(a?.id==="noauth"||a?.connectionId==="noauth")&&!a?.apiKey&&(!a?.accessToken||"public"===a.accessToken);if(a?.authType==="none"&&i)return b&&(h.Accept="text/event-stream"),h;let j=f?.auth||q[this.provider]||this.resolveAuthDescriptor();for(let b of(!function(a,b,c){if(b.combined){s(a,b,c.apiKey||c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=g.b8);return}c.apiKey?s(a,b.apiKey,c.apiKey):c.accessToken&&s(a,b.oauth,c.accessToken),b.anthropicVersion&&!a["anthropic-version"]&&(a["anthropic-version"]=g.b8)}(h,j,a),j.hooks||[]))t[b]?.(h,a);let k="string"==typeof d&&/^claude-/.test(d),l=a?.rawHeaders?.["anthropic-beta"];if(d&&("claude"===this.provider||this.provider?.startsWith?.("anthropic-compatible-")&&k)?h["Anthropic-Beta"]=(0,g.Xy)((0,g.d)(d,e),l):"anthropic"===this.provider&&l&&(h["Anthropic-Beta"]=(0,g.Xy)(h["Anthropic-Beta"],l)),"claude"===this.provider&&!h["x-claude-code-session-id"]&&(a?.accessToken||a?.apiKey||"").includes("sk-ant-oat")){let a=(0,n.tV)(e?.metadata?.user_id);a&&(h["x-claude-code-session-id"]=a)}if(this.provider?.startsWith?.("anthropic-compatible-")){let b=a?.providerSpecificData?.baseUrl||"";if(!(""===b||b.includes("api.anthropic.com"))){for(let b of(a.apiKey&&!h.Authorization&&(h.Authorization=`Bearer ${a.apiKey}`),delete h["anthropic-dangerous-direct-browser-access"],delete h["Anthropic-Dangerous-Direct-Browser-Access"],delete h["x-app"],delete h["X-App"],["anthropic-beta","Anthropic-Beta"]))if(h[b]){let a=h[b].split(",").map(a=>a.trim()).filter(a=>a&&"claude-code-20250219"!==a).join(",");a?h[b]=a:delete h[b]}}}return b&&(h.Accept="text/event-stream"),h}async retryAlternativeAuth(a,b){if("cline"!==this.provider&&"clinepass"!==this.provider)return!1;let c=a?.apiKey||a?.accessToken;if(!c||a.clineAuthShape)return!1;let d=(0,j.lZ)(c);if(!d)return!1;let e=(0,j.yN)(d);return a.clineAuthShape=e,a.accessToken=d,a.apiKey&&(a.apiKey=d),b?.debug?.("AUTH",`CLINE | 401 on ${(0,j.yN)(c)} token, retrying as ${e}`),!0}refreshFromGrant(a,b){let c=u[this.provider],d={grant_type:"refresh_token",refresh_token:a.refreshToken,...c.params(this)};return"json"===c.encoding?this.refreshWithJSON(c.url(),d,b):this.refreshWithForm(c.url(),d,b)}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;let d={claude:()=>this.refreshFromGrant(a,c),codex:()=>this.refreshFromGrant(a,c),iflow:()=>this.refreshIflow(a.refreshToken,c),gemini:()=>this.refreshFromGrant(a,c),kiro:()=>this.refreshKiro(a.refreshToken,c),cline:()=>this.refreshCline(a.refreshToken,c),clinepass:()=>this.refreshCline(a.refreshToken,c),kimi:()=>this.refreshKimi(a,c),"kimi-coding":()=>this.refreshKimi(a,c),kilocode:()=>this.refreshKilocode(a.refreshToken,c),nous:()=>this.refreshNousPortal(a,c)}[this.provider];if(!d)return null;try{let a=await d();return a&&b?.info?.("TOKEN",`${this.provider} refreshed`),a}catch(a){return b?.error?.("TOKEN",`${this.provider} refresh error: ${a.message}`),null}}async refreshWithJSON(a,b,c=null){let d=await (0,k.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshWithForm(a,b,c=null){let d=await (0,k.proxyAwareFetch)(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(b)},c);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||b.refresh_token,expiresIn:e.expires_in}}async refreshIflow(a,b=null){let c=btoa(`${f.xq.iflow.clientId}:${f.xq.iflow.clientSecret}`),d=await (0,k.proxyAwareFetch)(i.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:f.xq.iflow.clientId,client_secret:f.xq.iflow.clientSecret})},b);if(!d.ok)return null;let e=await d.json();return{accessToken:e.access_token,refreshToken:e.refresh_token||a,expiresIn:e.expires_in}}async refreshKiro(a,b=null){let c=await (0,k.proxyAwareFetch)(f.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},b);if(!c.ok)return null;let d=await c.json();return{accessToken:d.accessToken,refreshToken:d.refreshToken||a,expiresIn:d.expiresIn}}async refreshCline(a,b=null){let c=await (0,k.proxyAwareFetch)(f.xq.cline.refreshUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refreshToken:a,grantType:"refresh_token",clientType:"extension"})},b);if(!c.ok)return null;let d=await c.json(),e=d?.data||d,g=e?.expiresAt,h=g?Math.max(1,Math.floor((new Date(g).getTime()-Date.now())/1e3)):void 0,i=e?.accessToken;return i&&!i.startsWith("workos:")&&(i=`workos:${i}`),{accessToken:i,refreshToken:e?.refreshToken||a,expiresIn:h}}async refreshNousPortal(a,b=null){let c=a.refreshToken,d=f.sr.nous;if(!d?.refreshUrl&&!d?.tokenUrl)return null;let e=await (0,k.proxyAwareFetch)(d.refreshUrl||d.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","X-Nous-Refresh-Token":c},body:new URLSearchParams({grant_type:"refresh_token",client_id:d.clientId})},b);if(!e.ok)return null;let g=await e.json();return{accessToken:g.access_token,refreshToken:g.refresh_token||c,expiresIn:g.expires_in}}async refreshKimi(a,b=null){let c=a.refreshToken,d=f.xq.kimi||f.xq["kimi-coding"];if(!d?.refreshUrl||!d?.clientId)return null;let e=(0,i.buildKimiHeaders)(a?.providerSpecificData?.deviceId),g=await (0,k.proxyAwareFetch)(d.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...e},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:c,client_id:d.clientId})},b);if(!g.ok)return null;let h=await g.json();return{accessToken:h.access_token,refreshToken:h.refresh_token||c,expiresIn:h.expires_in}}async refreshKilocode(a,b=null){return null}}}};