polyrouter 1.0.4 → 1.0.6

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 (680) hide show
  1. package/README.md +67 -85
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +12 -12
  4. package/app/.next-cli-build/build-manifest.json +2 -2
  5. package/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +4 -4
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  89. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.rsc +8 -8
  93. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +8 -8
  94. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +8 -8
  96. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  99. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +9 -9
  113. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  115. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  133. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +5 -5
  137. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  139. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  167. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  169. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/realtime/authorize/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/realtime/authorize/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  318. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  320. package/app/.next-cli-build/server/app/callback.html +1 -1
  321. package/app/.next-cli-build/server/app/callback.rsc +8 -8
  322. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +8 -8
  323. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  324. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +8 -8
  325. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  326. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  327. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  329. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +10 -10
  330. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  331. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  332. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  333. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  334. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +10 -10
  335. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  336. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +8 -8
  337. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  338. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +10 -10
  340. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  341. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  343. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  344. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +10 -10
  345. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +8 -8
  347. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  348. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/combos.rsc +10 -10
  350. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  351. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  353. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +10 -10
  355. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  356. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +8 -8
  357. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  358. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +10 -10
  360. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  361. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  364. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +10 -10
  365. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +8 -8
  367. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  368. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +10 -10
  370. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  371. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  374. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  375. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +10 -10
  376. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +8 -8
  378. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  379. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +10 -10
  381. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  382. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  385. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +10 -10
  386. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +8 -8
  388. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  389. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/profile.rsc +10 -10
  391. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  392. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  395. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +10 -10
  396. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +8 -8
  398. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  399. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +10 -10
  401. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  402. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  406. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +10 -10
  407. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +8 -8
  409. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  410. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/providers.rsc +10 -10
  412. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  413. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  416. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +10 -10
  417. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +8 -8
  419. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  420. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  421. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +10 -10
  422. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  423. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +10 -10
  427. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +8 -8
  429. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
  430. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +10 -10
  432. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  433. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +10 -10
  437. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +8 -8
  439. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +3 -3
  440. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/quota.rsc +11 -11
  442. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  443. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +11 -11
  447. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +8 -8
  449. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  450. package/app/.next-cli-build/server/app/dashboard/realtime.html +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/realtime.rsc +10 -10
  452. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard/realtime/__PAGE__.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard/realtime.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_full.segment.rsc +10 -10
  457. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_head.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_index.segment.rsc +8 -8
  459. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_tree.segment.rsc +3 -3
  460. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -8
  465. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -8
  466. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +8 -8
  468. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  469. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/skills.rsc +10 -10
  475. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +10 -10
  480. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +8 -8
  482. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  483. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +10 -10
  485. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +10 -10
  490. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +8 -8
  492. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
  493. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/translator.rsc +10 -10
  495. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +10 -10
  500. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +8 -8
  502. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  503. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/usage.rsc +10 -10
  505. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +10 -10
  510. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  513. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard.rsc +10 -10
  515. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +10 -10
  519. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +8 -8
  521. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  522. package/app/.next-cli-build/server/app/index.html +1 -1
  523. package/app/.next-cli-build/server/app/index.rsc +8 -8
  524. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +8 -8
  526. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +8 -8
  528. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  529. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  530. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  532. package/app/.next-cli-build/server/app/landing.html +1 -1
  533. package/app/.next-cli-build/server/app/landing.rsc +9 -9
  534. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +9 -9
  535. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +8 -8
  537. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  538. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/login/page.js +1 -1
  541. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  542. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  543. package/app/.next-cli-build/server/app/login.html +1 -1
  544. package/app/.next-cli-build/server/app/login.rsc +9 -9
  545. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +9 -9
  546. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +8 -8
  548. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  549. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  552. package/app/.next-cli-build/server/app/page.js +1 -1
  553. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  554. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  555. package/app/.next-cli-build/server/app-paths-manifest.json +12 -12
  556. package/app/.next-cli-build/server/chunks/1220.js +1 -1
  557. package/app/.next-cli-build/server/chunks/1455.js +1 -0
  558. package/app/.next-cli-build/server/chunks/1605.js +1 -0
  559. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  560. package/app/.next-cli-build/server/chunks/2194.js +1 -1
  561. package/app/.next-cli-build/server/chunks/238.js +1 -1
  562. package/app/.next-cli-build/server/chunks/318.js +2 -2
  563. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  564. package/app/.next-cli-build/server/chunks/3726.js +1 -1
  565. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  566. package/app/.next-cli-build/server/chunks/412.js +1 -1
  567. package/app/.next-cli-build/server/chunks/4123.js +3 -3
  568. package/app/.next-cli-build/server/chunks/4293.js +1 -0
  569. package/app/.next-cli-build/server/chunks/4433.js +1 -0
  570. package/app/.next-cli-build/server/chunks/4884.js +1 -1
  571. package/app/.next-cli-build/server/chunks/4930.js +1 -0
  572. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  573. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  574. package/app/.next-cli-build/server/chunks/6805.js +3 -3
  575. package/app/.next-cli-build/server/chunks/6922.js +1 -0
  576. package/app/.next-cli-build/server/chunks/7807.js +1 -1
  577. package/app/.next-cli-build/server/chunks/{3850.js → 8008.js} +1 -1
  578. package/app/.next-cli-build/server/chunks/8038.js +19 -19
  579. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  580. package/app/.next-cli-build/server/chunks/8185.js +1 -0
  581. package/app/.next-cli-build/server/chunks/8251.js +2 -2
  582. package/app/.next-cli-build/server/chunks/827.js +1 -1
  583. package/app/.next-cli-build/server/chunks/8363.js +1 -0
  584. package/app/.next-cli-build/server/chunks/869.js +1 -1
  585. package/app/.next-cli-build/server/chunks/8910.js +1 -1
  586. package/app/.next-cli-build/server/chunks/915.js +6 -6
  587. package/app/.next-cli-build/server/chunks/9660.js +1 -1
  588. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  589. package/app/.next-cli-build/server/middleware.js +3 -3
  590. package/app/.next-cli-build/server/pages/404.html +1 -1
  591. package/app/.next-cli-build/server/pages/500.html +1 -1
  592. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  593. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  594. package/app/.next-cli-build/static/chunks/{1321-5363e10d6bc83255.js → 1321-e91fcc77031966c2.js} +1 -1
  595. package/app/.next-cli-build/static/chunks/5116-57607d97ad30f27c.js +70 -0
  596. package/app/.next-cli-build/static/chunks/{533-74450af7ce8a32b6.js → 533-34fc7f5a3c79da82.js} +1 -1
  597. package/app/.next-cli-build/static/chunks/{5497-78a8a8716352195f.js → 5497-84dfd144b30eda56.js} +1 -1
  598. package/app/.next-cli-build/static/chunks/9da6db1e-d4cbd87a5f1d0209.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-3b24dec9f1a5c678.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-63a707f86838189f.js → page-c737bc25a827d251.js} +1 -1
  601. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-26f454785dc626b1.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/realtime/{page-81a6d2a3fffb86dc.js → page-f4b382f06f0f8eb6.js} +1 -1
  603. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-07a0044d9e135cb8.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-ec365dbdc0860d04.js → page-d488121dc0c130ad.js} +1 -1
  605. package/app/.next-cli-build/static/chunks/app/landing/page-1f76869d947f63aa.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/layout-2654a5701747e5bc.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/login/{page-744fd018e592b5f6.js → page-e0dc71d92b91cd3f.js} +1 -1
  608. package/app/.next-cli-build/static/css/ada9b169590290e6.css +1 -0
  609. package/app/.next-cli-build/static/css/b71ca13188930393.css +1 -0
  610. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  611. package/app/node_modules/baseline-browser-mapping/package.json +1 -1
  612. package/app/package.json +11 -9
  613. package/app/public/i18n/literals/ar.json +4 -4
  614. package/app/public/i18n/literals/bn.json +4 -4
  615. package/app/public/i18n/literals/cs.json +4 -4
  616. package/app/public/i18n/literals/da.json +4 -4
  617. package/app/public/i18n/literals/de.json +4 -4
  618. package/app/public/i18n/literals/el.json +4 -4
  619. package/app/public/i18n/literals/es.json +4 -4
  620. package/app/public/i18n/literals/fa.json +33 -33
  621. package/app/public/i18n/literals/fi.json +4 -4
  622. package/app/public/i18n/literals/fr.json +4 -4
  623. package/app/public/i18n/literals/he.json +4 -4
  624. package/app/public/i18n/literals/hi.json +4 -4
  625. package/app/public/i18n/literals/hu.json +4 -4
  626. package/app/public/i18n/literals/id.json +4 -4
  627. package/app/public/i18n/literals/it.json +4 -4
  628. package/app/public/i18n/literals/ja.json +4 -4
  629. package/app/public/i18n/literals/km.json +33 -33
  630. package/app/public/i18n/literals/ko.json +4 -4
  631. package/app/public/i18n/literals/nl.json +4 -4
  632. package/app/public/i18n/literals/no.json +4 -4
  633. package/app/public/i18n/literals/pl.json +4 -4
  634. package/app/public/i18n/literals/pt-BR.json +4 -4
  635. package/app/public/i18n/literals/pt-PT.json +4 -4
  636. package/app/public/i18n/literals/ro.json +4 -4
  637. package/app/public/i18n/literals/ru.json +4 -4
  638. package/app/public/i18n/literals/sv.json +4 -4
  639. package/app/public/i18n/literals/th.json +33 -33
  640. package/app/public/i18n/literals/tl.json +4 -4
  641. package/app/public/i18n/literals/tr.json +4 -4
  642. package/app/public/i18n/literals/uk.json +4 -4
  643. package/app/public/i18n/literals/ur.json +4 -4
  644. package/app/public/i18n/literals/vi.json +4 -4
  645. package/app/public/i18n/literals/zh-CN.json +33 -33
  646. package/app/public/i18n/literals/zh-TW.json +4 -4
  647. package/app/src/lib/updater/updater.js +3 -3
  648. package/app/src/mitm/server.js +3 -3
  649. package/app/src/realtime/protocol.js +1 -1
  650. package/app/src/realtime/runtime.js +6 -4
  651. package/cli.js +16 -16
  652. package/hooks/postinstall.js +5 -5
  653. package/hooks/sqliteRuntime.js +4 -4
  654. package/hooks/trayRuntime.js +6 -6
  655. package/package.json +14 -8
  656. package/src/cli/api/client.js +2 -2
  657. package/src/cli/commands/xaiVideo.js +7 -7
  658. package/src/cli/menus/cliTools.js +16 -16
  659. package/src/cli/terminalUI.js +2 -2
  660. package/src/cli/tray/autostart.js +9 -9
  661. package/src/cli/tray/tray.js +5 -5
  662. package/src/cli/tray/tray.ps1 +1 -1
  663. package/app/.next-cli-build/server/chunks/3350.js +0 -1
  664. package/app/.next-cli-build/server/chunks/4223.js +0 -11
  665. package/app/.next-cli-build/server/chunks/4306.js +0 -1
  666. package/app/.next-cli-build/server/chunks/6832.js +0 -1
  667. package/app/.next-cli-build/server/chunks/6935.js +0 -1
  668. package/app/.next-cli-build/server/chunks/8658.js +0 -1
  669. package/app/.next-cli-build/server/chunks/8971.js +0 -1
  670. package/app/.next-cli-build/static/chunks/3122-7d92444836703c7a.js +0 -11
  671. package/app/.next-cli-build/static/chunks/5116-8422f68a0c01ef77.js +0 -70
  672. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-4c5a22762fe663b8.js +0 -1
  673. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-f8b4e4dc27c90c0c.js +0 -1
  674. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-d73bd129f40d6396.js +0 -1
  675. package/app/.next-cli-build/static/chunks/app/landing/page-d0dc2acaf2a1c239.js +0 -1
  676. package/app/.next-cli-build/static/chunks/app/layout-1c95599c7054cadc.js +0 -1
  677. package/app/.next-cli-build/static/css/f21ca4a324c22a6c.css +0 -1
  678. package/app/.next-cli-build/static/css/fa9e956ea578b5b8.css +0 -1
  679. /package/app/.next-cli-build/static/{P86gd5BC-j6FbnOx3-K8q → Fq1kR9_FoWmz8b123uFBu}/_buildManifest.js +0 -0
  680. /package/app/.next-cli-build/static/{P86gd5BC-j6FbnOx3-K8q → Fq1kR9_FoWmz8b123uFBu}/_ssgManifest.js +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "polyrouter",
3
- "version": "1.0.4",
4
- "description": "PolyRouter CLI - Start and manage PolyRouter server",
3
+ "version": "1.0.6",
4
+ "description": "Local AI gateway and OpenAI-compatible API router for AI coding tools and 40+ providers",
5
5
  "bin": {
6
6
  "polyrouter": "./cli.js"
7
7
  },
@@ -28,17 +28,23 @@
28
28
  "react": "19.2.1",
29
29
  "react-dom": "19.2.1"
30
30
  },
31
- "comment_sqlite": "sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.9router/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.",
32
- "comment_systray": "systray2 is NOT bundled here. It is lazy-installed into ~/.9router/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails on modern macOS dyld.",
31
+ "comment_sqlite": "sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.polyrouter/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.",
32
+ "comment_systray": "systray2 is NOT bundled here. It is lazy-installed into ~/.polyrouter/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails on modern macOS dyld.",
33
33
  "engines": {
34
34
  "node": ">=18.0.0"
35
35
  },
36
36
  "keywords": [
37
37
  "polyrouter",
38
- "cli",
39
- "proxy",
40
- "ai",
41
- "api"
38
+ "ai gateway",
39
+ "ai router",
40
+ "openai compatible",
41
+ "openai api",
42
+ "ai coding tools",
43
+ "llm gateway",
44
+ "llm router",
45
+ "multi provider",
46
+ "oauth",
47
+ "cli"
42
48
  ],
43
49
  "license": "UNLICENSED",
44
50
  "devDependencies": {
@@ -15,7 +15,7 @@ const DEFAULT_CONFIG = {
15
15
 
16
16
  const CLI_TOKEN_HEADER = "x-9r-cli-token";
17
17
  const CLI_TOKEN_SALT = "9r-cli-auth";
18
- const APP_NAME = "9router";
18
+ const APP_NAME = "polyrouter";
19
19
 
20
20
  function getDataDir() {
21
21
  if (process.env.DATA_DIR) return process.env.DATA_DIR;
@@ -364,7 +364,7 @@ async function deleteCombo(id) {
364
364
  /**
365
365
  * Get CLI tool settings
366
366
  * @param {string} tool - Tool name: claude | codex | droid | openclaw
367
- * @returns {Promise<Object>} { success, data: { installed, has9Router, ... } }
367
+ * @returns {Promise<Object>} { success, data: { installed, hasPolyRouter, ... } }
368
368
  */
369
369
  async function getCliToolSettings(tool) {
370
370
  return makeRequest("GET", `/api/cli-tools/${tool}-settings`);
@@ -1,6 +1,6 @@
1
1
  /**
2
- * `9router xai video` — generate a Grok Imagine video through the local
3
- * 9router gateway and save the result as an MP4 file.
2
+ * `polyrouter xai video` — generate a Grok Imagine video through the local
3
+ * polyrouter gateway and save the result as an MP4 file.
4
4
  *
5
5
  * Flow: POST /v1/videos/generations → poll GET /v1/videos/{request_id}
6
6
  * until done/failed/timeout → download video.url → atomic rename.
@@ -23,9 +23,9 @@ const TERMINAL_STATUSES = new Set(["done", "failed", "completed", "error", "expi
23
23
  const FAILED_STATUSES = new Set(["failed", "error", "expired", "cancelled"]);
24
24
 
25
25
  const HELP = `
26
- Usage: 9router xai video --prompt "..." [options]
26
+ Usage: polyrouter xai video --prompt "..." [options]
27
27
 
28
- Generate a Grok Imagine video via your local 9router gateway
28
+ Generate a Grok Imagine video via your local polyrouter gateway
29
29
  (requires a connected xAI account — Grok Build OAuth or API key).
30
30
 
31
31
  Options:
@@ -39,7 +39,7 @@ Options:
39
39
  --timeout <seconds> Max wait for the job (default: ${DEFAULT_TIMEOUT_SEC})
40
40
  --port <port> Gateway port (default: ${DEFAULT_PORT})
41
41
  --host <host> Gateway host (default: ${DEFAULT_HOST})
42
- --api-key <key> 9router API key (or env NINE_ROUTER_API_KEY)
42
+ --api-key <key> polyrouter API key (or env POLY_ROUTER_API_KEY)
43
43
  -h, --help Show this help
44
44
  `;
45
45
 
@@ -54,7 +54,7 @@ function parseArgs(argv) {
54
54
  timeoutSec: DEFAULT_TIMEOUT_SEC,
55
55
  port: DEFAULT_PORT,
56
56
  host: DEFAULT_HOST,
57
- apiKey: process.env.NINE_ROUTER_API_KEY || null,
57
+ apiKey: process.env.POLY_ROUTER_API_KEY || null,
58
58
  pollIntervalMs: DEFAULT_POLL_INTERVAL_MS,
59
59
  };
60
60
  for (let i = 0; i < argv.length; i++) {
@@ -258,7 +258,7 @@ async function run(argv) {
258
258
  }
259
259
 
260
260
  const requestId = create.body.request_id;
261
- const connectionId = create.headers["x-9router-connection-id"] || null;
261
+ const connectionId = create.headers["x-polyrouter-connection-id"] || null;
262
262
  console.log(`📋 Job accepted: ${requestId}`);
263
263
 
264
264
  let lastLine = "";
@@ -179,10 +179,10 @@ async function buildCodexHeader() {
179
179
  const result = await api.getCliToolSettings("codex");
180
180
  if (!result.success) return ` ${COLORS.red}Failed to load settings${COLORS.reset}`;
181
181
 
182
- const { installed, has9Router, config } = result.data;
182
+ const { installed, hasPolyRouter, config } = result.data;
183
183
  if (!installed) return `Status: ${COLORS.red}✗ Codex CLI not installed${COLORS.reset}`;
184
184
 
185
- if (!has9Router) {
185
+ if (!hasPolyRouter) {
186
186
  return [
187
187
  `Status: ${COLORS.red}✗ Not configured${COLORS.reset}`,
188
188
  `${COLORS.dim}Run "Quick Setup" to configure${COLORS.reset}`
@@ -267,18 +267,18 @@ async function buildDroidHeader() {
267
267
  const result = await api.getCliToolSettings("droid");
268
268
  if (!result.success) return ` ${COLORS.red}Failed to load settings${COLORS.reset}`;
269
269
 
270
- const { installed, has9Router, settings } = result.data;
270
+ const { installed, hasPolyRouter, settings } = result.data;
271
271
  if (!installed) return `Status: ${COLORS.red}✗ Factory Droid not installed${COLORS.reset}`;
272
272
 
273
- if (!has9Router) {
273
+ if (!hasPolyRouter) {
274
274
  return [
275
275
  `Status: ${COLORS.red}✗ Not configured${COLORS.reset}`,
276
276
  `${COLORS.dim}Run "Quick Setup" to configure${COLORS.reset}`
277
277
  ].join("\n");
278
278
  }
279
279
 
280
- // Extract 9Router custom model config
281
- const custom = settings?.customModels?.find(m => m.id === "custom:9Router-0");
280
+ // Extract PolyRouter custom model config
281
+ const custom = settings?.customModels?.find(m => m.id === "custom:PolyRouter-0");
282
282
  const lines = [`Status: ${COLORS.green}✓ Configured${COLORS.reset}`];
283
283
  if (custom?.baseUrl) lines.push(`Endpoint: ${COLORS.cyan}${custom.baseUrl}${COLORS.reset}`);
284
284
  if (custom?.model) lines.push(`Model: ${COLORS.dim}${custom.model}${COLORS.reset}`);
@@ -350,20 +350,20 @@ async function buildOpenClawHeader() {
350
350
  const result = await api.getCliToolSettings("openclaw");
351
351
  if (!result.success) return ` ${COLORS.red}Failed to load settings${COLORS.reset}`;
352
352
 
353
- const { installed, has9Router, settings } = result.data;
353
+ const { installed, hasPolyRouter, settings } = result.data;
354
354
  if (!installed) return `Status: ${COLORS.red}✗ Open Claw not installed${COLORS.reset}`;
355
355
 
356
- if (!has9Router) {
356
+ if (!hasPolyRouter) {
357
357
  return [
358
358
  `Status: ${COLORS.red}✗ Not configured${COLORS.reset}`,
359
359
  `${COLORS.dim}Run "Quick Setup" to configure${COLORS.reset}`
360
360
  ].join("\n");
361
361
  }
362
362
 
363
- // Extract 9Router provider config
364
- const provider = settings?.models?.providers?.["9router"];
363
+ // Extract PolyRouter provider config
364
+ const provider = settings?.models?.providers?.["polyrouter"];
365
365
  const primary = settings?.agents?.defaults?.model?.primary || "";
366
- const model = primary.startsWith("9router/") ? primary.replace("9router/", "") : (provider?.models?.[0]?.id || "");
366
+ const model = primary.startsWith("polyrouter/") ? primary.replace("polyrouter/", "") : (provider?.models?.[0]?.id || "");
367
367
  const lines = [`Status: ${COLORS.green}✓ Configured${COLORS.reset}`];
368
368
  if (provider?.baseUrl) lines.push(`Endpoint: ${COLORS.cyan}${provider.baseUrl}${COLORS.reset}`);
369
369
  if (model) lines.push(`Model: ${COLORS.dim}${model}${COLORS.reset}`);
@@ -431,10 +431,10 @@ async function buildOpenCodeHeader() {
431
431
  const result = await api.getCliToolSettings("opencode");
432
432
  if (!result.success) return ` ${COLORS.red}Failed to load settings${COLORS.reset}`;
433
433
 
434
- const { installed, has9Router, opencode } = result.data;
434
+ const { installed, hasPolyRouter, opencode } = result.data;
435
435
  if (!installed) return `Status: ${COLORS.red}✗ OpenCode CLI not installed${COLORS.reset}`;
436
436
 
437
- if (!has9Router) {
437
+ if (!hasPolyRouter) {
438
438
  return [
439
439
  `Status: ${COLORS.red}✗ Not configured${COLORS.reset}`,
440
440
  `${COLORS.dim}Run "Quick Setup" to configure${COLORS.reset}`
@@ -519,10 +519,10 @@ async function buildHermesHeader() {
519
519
  const result = await api.getCliToolSettings("hermes");
520
520
  if (!result.success) return ` ${COLORS.red}Failed to load settings${COLORS.reset}`;
521
521
 
522
- const { installed, has9Router, settings } = result.data;
522
+ const { installed, hasPolyRouter, settings } = result.data;
523
523
  if (!installed) return `Status: ${COLORS.red}✗ Hermes Agent not installed${COLORS.reset}`;
524
524
 
525
- if (!has9Router) {
525
+ if (!hasPolyRouter) {
526
526
  return [
527
527
  `Status: ${COLORS.red}✗ Not configured${COLORS.reset}`,
528
528
  `${COLORS.dim}Run "Quick Setup" to configure${COLORS.reset}`
@@ -585,7 +585,7 @@ async function showCliToolsMenu(port, breadcrumb = []) {
585
585
  await showMenuWithBack({
586
586
  title: "🔧 CLI Tools",
587
587
  breadcrumb,
588
- headerContent: `Configure CLI tools to use 9Router\nEndpoint: ${endpoint}`,
588
+ headerContent: `Configure CLI tools to use PolyRouter\nEndpoint: ${endpoint}`,
589
589
  items: [
590
590
  {
591
591
  label: "Claude Code",
@@ -67,14 +67,14 @@ async function startTerminalUI(port) {
67
67
  // Configure API client
68
68
  api.configure({ port });
69
69
 
70
- const basePath = ["9Router"];
70
+ const basePath = ["PolyRouter"];
71
71
 
72
72
  // Prime header cache before first render
73
73
  await refreshHeaderBg(port);
74
74
 
75
75
  // Main menu
76
76
  await showMenuWithBack({
77
- title: "📡 9Router Terminal UI",
77
+ title: "📡 PolyRouter Terminal UI",
78
78
  breadcrumb: basePath,
79
79
  headerContent: () => getHeader(port),
80
80
  items: [
@@ -3,8 +3,8 @@ const path = require("path");
3
3
  const os = require("os");
4
4
  const { execSync } = require("child_process");
5
5
 
6
- const APP_NAME = "9router";
7
- const APP_LABEL = "com.9router.autostart";
6
+ const APP_NAME = "polyrouter";
7
+ const APP_LABEL = "com.polyrouter.autostart";
8
8
 
9
9
  /**
10
10
  * Resolve the absolute path to this package's cli.js.
@@ -12,7 +12,7 @@ const APP_LABEL = "com.9router.autostart";
12
12
  * Order of preference:
13
13
  * 1. Explicit `cliPath` argument — cleanest, used when called from running
14
14
  * cli.js with `__filename`.
15
- * 2. `process.argv[1]` if it's our cli.js — true when 9router is currently
15
+ * 2. `process.argv[1]` if it's our cli.js — true when polyrouter is currently
16
16
  * running and the tray menu fires this code path.
17
17
  * 3. Compute relative to this file's own location. autostart.js lives at
18
18
  * `<pkg>/src/cli/tray/autostart.js`, so cli.js is three levels up.
@@ -115,7 +115,7 @@ function isAutoStartEnabled() {
115
115
  * launchd is managing under our agent label.
116
116
  *
117
117
  * `launchctl unload <plist>` (and `load`) for an Aqua user-domain agent sends
118
- * SIGTERM to the running process. When the running 9router cli.js was itself
118
+ * SIGTERM to the running process. When the running polyrouter cli.js was itself
119
119
  * spawned by the autostart launchd agent (i.e. user enabled autostart at
120
120
  * some point, then rebooted, then clicked the tray icon's "Disable
121
121
  * Auto-start" menu item), an unload would kill the very process executing
@@ -182,9 +182,9 @@ function enableMacOS(cliPath) {
182
182
  <key>KeepAlive</key>
183
183
  <false/>
184
184
  <key>StandardOutPath</key>
185
- <string>/tmp/9router.log</string>
185
+ <string>/tmp/polyrouter.log</string>
186
186
  <key>StandardErrorPath</key>
187
- <string>/tmp/9router.error.log</string>
187
+ <string>/tmp/polyrouter.error.log</string>
188
188
  </dict>
189
189
  </plist>`;
190
190
 
@@ -247,7 +247,7 @@ function enableWindows(cliPath) {
247
247
  if (!routerScript) return false;
248
248
 
249
249
  // Run node + cli.js directly, hidden window. Avoids the fragile
250
- // `9router.cmd` lookup that depended on the npm prefix path.
250
+ // `polyrouter.cmd` lookup that depended on the npm prefix path.
251
251
  const vbsContent = `Set WshShell = CreateObject("WScript.Shell")
252
252
  WshShell.Run """${nodePath}"" ""${routerScript}"" --tray --skip-update", 0, False
253
253
  `;
@@ -280,8 +280,8 @@ function enableLinux(cliPath) {
280
280
 
281
281
  const desktopContent = `[Desktop Entry]
282
282
  Type=Application
283
- Name=9Router
284
- Comment=9Router API Proxy
283
+ Name=PolyRouter
284
+ Comment=PolyRouter API Proxy
285
285
  Exec=${nodePath} ${routerScript} --tray --skip-update
286
286
  Hidden=false
287
287
  NoDisplay=false
@@ -58,7 +58,7 @@ function initTray(options) {
58
58
  */
59
59
  function buildMenuItems(port, autostartEnabled) {
60
60
  return [
61
- { title: `9Router (Port ${port})`, tooltip: "Server is running", enabled: false },
61
+ { title: `PolyRouter (Port ${port})`, tooltip: "Server is running", enabled: false },
62
62
  { title: "Open Dashboard", tooltip: "Open in browser", enabled: true },
63
63
  {
64
64
  title: autostartEnabled ? "✓ Auto-start Enabled" : "Enable Auto-start",
@@ -121,7 +121,7 @@ function initWindowsTray(options) {
121
121
 
122
122
  trayInstance = initWinTray({
123
123
  iconPath,
124
- tooltip: `9Router - Port ${port}`,
124
+ tooltip: `PolyRouter - Port ${port}`,
125
125
  items,
126
126
  onClick: (index) => {
127
127
  handleClick(index, options, (newEnabled) => {
@@ -204,7 +204,7 @@ function initUnixTray(options) {
204
204
  // because template mode only uses the alpha channel.
205
205
  isTemplateIcon: false,
206
206
  title: "",
207
- tooltip: `9Router - Port ${port}`,
207
+ tooltip: `PolyRouter - Port ${port}`,
208
208
  items
209
209
  };
210
210
 
@@ -230,7 +230,7 @@ function initUnixTray(options) {
230
230
  // failures (binary crash, EACCES, etc.) so users can see why the icon
231
231
  // didn't appear instead of getting a misleading "running in tray" log.
232
232
  trayInstance.ready().catch((err) => {
233
- process.stderr.write(`[9router] tray failed to start: ${err && err.message ? err.message : err}\n`);
233
+ process.stderr.write(`[polyrouter] tray failed to start: ${err && err.message ? err.message : err}\n`);
234
234
  });
235
235
  } else {
236
236
  trayInstance.onReady(() => {});
@@ -239,7 +239,7 @@ function initUnixTray(options) {
239
239
 
240
240
  return trayInstance;
241
241
  } catch (err) {
242
- process.stderr.write(`[9router] tray init error: ${err.message}\n`);
242
+ process.stderr.write(`[polyrouter] tray init error: ${err.message}\n`);
243
243
  return null;
244
244
  }
245
245
  }
@@ -1,4 +1,4 @@
1
- # 9Router tray icon for Windows using NotifyIcon
1
+ # PolyRouter tray icon for Windows using NotifyIcon
2
2
  # IPC: stdin JSON commands, stdout JSON events
3
3
  param([string]$IconPath, [string]$Tooltip)
4
4
 
@@ -1 +0,0 @@
1
- "use strict";exports.id=3350,exports.ids=[3350],exports.modules={3662:(a,b,c)=>{c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:429,backoff:!0}]},12557:(a,b,c)=>{c.d(b,{Bl:()=>j,Qo:()=>f,S5:()=>l,hk:()=>e,kJ:()=>k});var d=c(3662);function e(a,b,c=0){let f=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";for(let b of d.t2)if(b.text&&f&&f.includes(b.text)||b.status&&b.status===a){if(b.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:b.cooldownMs}}return{shouldFallback:!0,cooldownMs:d.wf}}function f(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let g="modelLock_",h=`${g}__all`;function i(a){return a?`${g}${a}`:h}function j(a,b){let c=a[i(b)]||a[h];return!!c&&new Date(c).getTime()>Date.now()}function k(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(g)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function l(a,b){return{[i(a)]:new Date(Date.now()+b).toISOString()}}},23514:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{configureQuotaAutoPing:()=>z,runQuotaAutoPingTick:()=>w,startQuotaAutoPing:()=>x,stopQuotaAutoPing:()=>y});var e=c(48895),f=c(89718),g=c(69788),h=c(6551),i=c(55330),j=c(74129),k=c(39609),l=c(39326),m=c(18271),n=c(30869),o=a([e,i,m]);[e,i,m]=o.then?(await o)():o;let A=n.oc,B={claude:{getUsage:g.g,sendPing:s},codex:{getUsage:h.Tl,sendPing:u}},C=global.__quotaAutoPing??={interval:null,running:!1,resetCache:{},failureCache:{}};function p(a){let b=new Date(a).getTime();return Number.isFinite(b)?new Date(6e4*Math.floor(b/6e4)).toISOString():a}function q(a,b=null){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 b}function r(a){if(!a||!0===a.unlimited)return!1;let b=q(a.remaining);if(null!==b)return b<=0;let c=q(a.used),d=q(a.total);return null!==d&&d>0&&null!==c&&c>=d}async function s(a,b,c,d){return(await d.proxyAwareFetch("https://api.anthropic.com/v1/messages?beta=true",{method:"POST",headers:{...j.$B,Authorization:`Bearer ${a.accessToken}`,"content-type":"application/json"},body:JSON.stringify({model:b.pingModel,max_tokens:b.pingMaxTokens,messages:[{role:"user",content:b.pingText}]})},c)).ok}async function t(a){if("function"==typeof a?.text)return void await a.text();let b=a?.body?.getReader?.();if(b)try{for(;;){let{done:a}=await b.read();if(a)return}}finally{b.releaseLock?.()}}async function u(a,b,c,d){var e;let f=d.getExecutor("codex"),{response:g}=await f.execute({model:b.pingModel,stream:!0,credentials:{accessToken:a.accessToken,connectionId:a.id,providerSpecificData:a.providerSpecificData},proxyOptions:c,log:console,body:{model:b.pingModel,input:(e=b.pingText,[{type:"message",role:"user",content:[{type:"input_text",text:e}]}]),instructions:b.pingInstructions,reasoning:b.pingReasoningEffort?{effort:b.pingReasoningEffort,summary:"auto"}:void 0,store:!1,stream:!0}});if(!g.ok){try{await g.body?.cancel?.()}catch{}return!1}return await t(g),!0}async function v(a,b,c,d,e,f=C){var g,h,i;let j=(g=a.id,`${b}:${g}`),k=f.resetCache[j];if(!c.pingWhenResetAtSlides&&k&&Date.now()<new Date(k).getTime()-A.refreshAheadMs||function(a,b,c=Date.now()){let d=a.failureCache[b];return d&&c-d<A.failureCooldownMs}(f,j))return;let l=(h=await e.resolveConnectionProxyConfig(a.providerSpecificData),{connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1}),m=a;try{m=(await e.refreshAndUpdateCredentials(m,!1,l)).connection}catch(c){f.failureCache[j]=Date.now(),console.warn(`[AutoPing] ${b}:${a.id}: refresh failed: ${c.message}`);return}let n=await d.getUsage(m.accessToken,l),o=n?.quotas||{},q=o?.[c.quotaKey],s=q?.resetAt;if(!s||(f.resetCache[j]=s,c.skipWhenBlockingQuotaExhausted&&(i=c.quotaKey,Object.entries(o||{}).some(([a,b])=>a!==i&&!String(a).toLowerCase().includes("session")&&r(b)))||r(q)))return;let t=Date.now(),u=p(s),w=m.lastPingedResetKey||p(m.lastPingedResetAt);if(!(!function(a,b,c,d){if(a.pingWhenResetAtSlides){let d,e;return!!b&&(d=new Date(b).getTime(),e=new Date(c).getTime(),(Number.isFinite(d)&&Number.isFinite(e)?e-d:0)>=(a.resetAtDriftMs||0))}let e=new Date(c).getTime();return Number.isFinite(e)&&d>=e-A.pingLeadMs}(c,k,s,t)||function(a,b,c=Date.now()){if(!b)return!1;let d=new Date(a.lastPingAt).getTime();return Number.isFinite(d)&&c-d<b}(m,c.minPingIntervalMs,t))&&w!==u){if(!await d.sendPing(m,c,l,e)){f.failureCache[j]=Date.now(),console.warn(`[AutoPing] ${b}:${m.id}: ping failed (reset ${s})`);return}delete f.failureCache[j],await e.updateProviderConnection(m.id,{lastPingedResetAt:s,lastPingedResetKey:u,lastPingAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),console.log(`[AutoPing] ${b}:${m.id}: ping sent (reset ${s})`)}}async function w(a={getSettings:f.mt,getProviderConnections:f.getProviderConnections,updateProviderConnection:f.updateProviderConnection,resolveConnectionProxyConfig:l.B,refreshAndUpdateCredentials:m.refreshAndUpdateCredentials,proxyAwareFetch:k.proxyAwareFetch,getExecutor:i.SB},b=C){if(!b.running){b.running=!0;try{let d=await a.getSettings();for(let[e,f]of Object.entries(A.providers)){let g=B[e];if(!g)continue;let h=d?.[f.settingsKey]?.connections||{};if(0!==Object.keys(h).length)for(let d of(await a.getProviderConnections({provider:e,isActive:!0})).filter(a=>"oauth"===a.authType&&!0===h[a.id]))try{await v(d,e,f,g,a,b)}catch(a){var c;b.failureCache[c=d.id,`${e}:${c}`]=Date.now(),console.warn(`[AutoPing] ${e}:${d.id}: ${a.message}`)}}}catch(a){console.warn("[AutoPing] tick error:",a.message)}finally{b.running=!1}}}function x(){!C.interval&&(console.log("[AutoPing] scheduler started"),w().catch(()=>{}),C.interval=setInterval(()=>{w().catch(()=>{})},A.tickIntervalMs),C.interval.unref&&C.interval.unref())}function y(){C.interval&&(clearInterval(C.interval),C.interval=null,console.log("[AutoPing] scheduler stopped"))}function z(a){Object.values(A.providers).some(b=>Object.values(a?.[b.settingsKey]?.connections||{}).some(Boolean))?x():y()}d()}catch(a){d(a)}})},26922:(a,b,c)=>{c.d(b,{KZ:()=>k,S6:()=>h,Yr:()=>o,f6:()=>l,fc:()=>g,kU:()=>i,pT:()=>j,w_:()=>m});var d=c(62842),e=c(55673);let f=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","minItems","maxItems","format","default","examples","$schema","$defs","definitions","const","$ref","$comment","deprecated","readOnly","writeOnly","additionalProperties","propertyNames","patternProperties","enumDescriptions","anyOf","oneOf","allOf","not","dependencies","dependentSchemas","dependentRequired","title","optional","deprecated","if","then","else","contentMediaType","contentEncoding","cornerRadius","fillColor","fontFamily","fontSize","fontWeight","gap","padding","strokeColor","strokeThickness","textColor"],g=[{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"OFF"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"OFF"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"OFF"},{category:"HARM_CATEGORY_HARASSMENT",threshold:"OFF"},{category:"HARM_CATEGORY_CIVIC_INTEGRITY",threshold:"OFF"}];function h(a){let b=[];if("string"==typeof a)b.push({text:a});else if(Array.isArray(a)){for(let c of a)if(c.type===e.x4.TEXT)b.push({text:c.text});else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url?.startsWith("data:")){let a=c.image_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url&&(c.image_url.url.startsWith("http://")||c.image_url.url.startsWith("https://")))b.push({fileData:{fileUri:c.image_url.url,mimeType:"image/*"}});else if(c.type===e.x4.INPUT_AUDIO&&c.input_audio?.data){let a=c.input_audio.format||"wav",d="mp3"===a?"audio/mpeg":`audio/${a}`;b.push({inlineData:{mime_type:d,data:c.input_audio.data}})}else if(c.type===e.x4.AUDIO_URL&&c.audio_url?.url?.startsWith("data:")){let a=c.audio_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.FILE&&c.file?.file_data?.startsWith("data:")){let a=c.file.file_data,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d).split(";")[0],e=a.substring(d+1);b.push({inlineData:{mime_type:c,data:e}})}}}return b}function i(a,b=""){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>a.type===e.x4.TEXT).map(a=>a.text).join(b):""}function j(a){return(0,d.N)(a,null)}function k(){return`agent-${crypto.randomUUID()}`}function l(){return crypto.randomUUID()+Date.now().toString()}function m(){let a=["useful","bright","swift","calm","bold"],b=["fuze","wave","spark","flow","core"],c=a[Math.floor(Math.random()*a.length)],d=b[Math.floor(Math.random()*b.length)];return`${c}-${d}-${crypto.randomUUID().slice(0,5)}`}function n(a){let b=0,c=-1;for(let d=0;d<a.length;d++){let e=a[d],f=0,g=e.type;"object"===g||e.properties?f=3:"array"===g||e.items?f=2:g&&"null"!==g&&(f=1),f>c&&(c=f,b=d)}return b}function o(a){return a&&"object"==typeof a&&(!function a(b){if(b&&"object"==typeof b)for(let c of(void 0===b.const||b.enum||(b.enum=[b.const],delete b.const),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.enum&&Array.isArray(b.enum)&&(b.enum=b.enum.map(a=>String(a)),b.type||(b.type="string")),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b){if(b.allOf&&Array.isArray(b.allOf)){let a={};for(let c of b.allOf)if(c.properties&&(a.properties||(a.properties={}),Object.assign(a.properties,c.properties)),c.required&&Array.isArray(c.required))for(let b of(a.required||(a.required=[]),c.required))a.required.includes(b)||a.required.push(b);delete b.allOf,a.properties&&(b.properties={...b.properties,...a.properties}),a.required&&(b.required=[...b.required||[],...a.required])}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.anyOf&&Array.isArray(b.anyOf)&&b.anyOf.length>0){let a=b.anyOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=n(a),d=a[c];delete b.anyOf,Object.assign(b,d)}}if(b.oneOf&&Array.isArray(b.oneOf)&&b.oneOf.length>0){let a=b.oneOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=n(a),d=a[c];delete b.oneOf,Object.assign(b,d)}}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.type&&Array.isArray(b.type)){let a=b.type.filter(a=>"null"!==a);b.type=a.length>0?a[0]:"string"}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.properties&&!b.type&&(b.type="object"),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b,c){if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.keys(b)){if(c.includes(d)||d.startsWith("x-")){delete b[d];continue}let e=b[d];e&&"object"==typeof e&&a(e,c)}}}(a,f),!function a(b){if(b&&"object"==typeof b){if(b.required&&Array.isArray(b.required)&&b.properties){let a=b.required.filter(a=>Object.prototype.hasOwnProperty.call(b.properties,a));0===a.length?delete b.required:b.required=a}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of("object"!==b.type||b.properties&&0!==Object.keys(b.properties).length||(b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"]),Object.values(b)))c&&"object"==typeof c&&a(c)}(a)),a}},43659:(a,b,c)=>{c.d(b,{A1:()=>g,lR:()=>i,wO:()=>h,yj:()=>e,zL:()=>f});var d=c(3662);function e(a,b){let c;return new Response(JSON.stringify((c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""}),{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}})),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}async function f(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:e.status||a.status,message:b,resetsAtMs:e.resetsAtMs}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let g=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function g(a,b,c){return{success:!1,status:a,error:b,resetsAtMs:c,response:e(a,b)}}function h(a,b,c,d){let e=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{"Content-Type":"application/json","Retry-After":String(e)}})}function i(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},55673:(a,b,c)=>{c.d(b,{R4:()=>g,BY:()=>l,a_:()=>j.a_,RV:()=>e,rP:()=>k,x4:()=>f,bC:()=>j.bC,Du:()=>h,z7:()=>d,m8:()=>i});let d={USER:"user",ASSISTANT:"assistant",TOOL:"tool",SYSTEM:"system",DEVELOPER:"developer"},e={USER:"user",MODEL:"model"},f={TEXT:"text",IMAGE_URL:"image_url",IMAGE:"image",INPUT_AUDIO:"input_audio",AUDIO_URL:"audio_url",FILE:"file",FUNCTION:"function"},g={TEXT:"text",IMAGE:"image",DOCUMENT:"document",TOOL_USE:"tool_use",TOOL_RESULT:"tool_result",THINKING:"thinking",REDACTED_THINKING:"redacted_thinking"},h={MESSAGE:"message",FUNCTION_CALL:"function_call",FUNCTION_CALL_OUTPUT:"function_call_output",REASONING:"reasoning",OUTPUT_TEXT:"output_text",INPUT_TEXT:"input_text",INPUT_IMAGE:"input_image",SUMMARY_TEXT:"summary_text"},i=[f.TEXT,f.IMAGE_URL,f.IMAGE,f.INPUT_AUDIO,f.AUDIO_URL,f.FILE];f.TEXT,f.IMAGE_URL,f.IMAGE,g.TOOL_RESULT;var j=c(69320);let k="unknown",l="image/png"},62842:(a,b,c)=>{c.d(b,{N:()=>d});function d(a,b){if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}},69320:(a,b,c)=>{c.d(b,{Ut:()=>e,a_:()=>f,bC:()=>d});let d={STOP:"stop",LENGTH:"length",TOOL_CALLS:"tool_calls",CONTENT_FILTER:"content_filter"},e={END_TURN:"end_turn",MAX_TOKENS:"max_tokens",TOOL_USE:"tool_use",STOP_SEQUENCE:"stop_sequence"},f={STOP:"STOP",MAX_TOKENS:"MAX_TOKENS",SAFETY:"SAFETY",RECITATION:"RECITATION",BLOCKLIST:"BLOCKLIST",PROHIBITED_CONTENT:"PROHIBITED_CONTENT"}}};
@@ -1,11 +0,0 @@
1
- exports.id=4223,exports.ids=[4223],exports.modules={300:(a,b,c)=>{"use strict";c.d(b,{Zr:()=>e});let d=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>d(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>d(b)(a)}}},e=(a,b)=>(c,e,f)=>{let g,h={storage:function(a){let b;try{b=a()}catch(a){return}return{getItem:a=>{var c;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(c=b.getItem(a))?c:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,c)=>b.setItem(a,JSON.stringify(c,void 0)),removeItem:a=>b.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),c(...a)},e,f);let n=()=>{let a=h.partialize({...e()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=a((...a)=>(c(...a),n()),e,f);f.getInitialState=()=>p;let q=()=>{var a,b;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=e())?b:p)});let o=(null==(b=h.onRehydrateStorage)?void 0:b.call(h,null!=(a=e())?a:p))||void 0;return d(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(f!==j)return;let[d,i]=a;if(c(g=h.merge(i,null!=(b=e())?b:p),!0),d)return n()}).then(()=>{f===j&&(null==o||o(e(),void 0),g=e(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}},16764:(a,b,c)=>{let{createProxy:d}=c(78830);a.exports=d("/home/runner/work/polyrouter/polyrouter/node_modules/@next/third-parties/dist/ThirdPartyScriptEmbed.js")},19099:(a,b,c)=>{"use strict";var d=c(54839);c.o(d,"notFound")&&c.d(b,{notFound:function(){return d.notFound}}),c.o(d,"useParams")&&c.d(b,{useParams:function(){return d.useParams}}),c.o(d,"usePathname")&&c.d(b,{usePathname:function(){return d.usePathname}}),c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}}),c.o(d,"useSearchParams")&&c.d(b,{useSearchParams:function(){return d.useSearchParams}})},19148:function(a,b,c){"use strict";var d=this&&this.__rest||function(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c},e=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.GoogleAnalytics=void 0;let f=e(c(96780)),g=c(81052);b.GoogleAnalytics=a=>{var b=d(a,[]);return(0,g.formatData)(f.default,b)}},20349:(a,b,c)=>{let{createProxy:d}=c(78830);a.exports=d("/home/runner/work/polyrouter/polyrouter/node_modules/@next/third-parties/dist/google/ga.js")},28559:a=>{"use strict";a.exports=JSON.parse('{"id":"youtube-embed","description":"Embed a YouTube embed on your webpage.","website":"https://github.com/paulirish/lite-youtube-embed","html":{"element":"lite-youtube","attributes":{"videoid":null,"playlabel":null}},"stylesheets":["https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.css"],"scripts":[{"url":"https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.js","strategy":"idle","location":"head","action":"append"}]}')},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},31935:(a,b,c)=>{let{createProxy:d}=c(78830);a.exports=d("/home/runner/work/polyrouter/polyrouter/node_modules/@next/third-parties/dist/google/gtm.js")},33071:(a,b,c)=>{let{createProxy:d}=c(78830);a.exports=d("/home/runner/work/polyrouter/polyrouter/node_modules/next/dist/client/script.js")},35687:function(a,b,c){"use strict";var d=this&&this.__rest||function(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c},e=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.GoogleMapsEmbed=void 0;let f=e(c(39235)),g=c(81052);b.GoogleMapsEmbed=a=>{var b=d(a,[]);return(0,g.formatData)(f.default,b)}},36497:()=>{},39235:a=>{"use strict";a.exports=JSON.parse('{"id":"google-maps-embed","description":"Embed a Google Maps embed on your webpage","website":"https://developers.google.com/maps/documentation/embed/get-started","html":{"element":"iframe","attributes":{"loading":"lazy","src":{"url":"https://www.google.com/maps/embed/v1/place","slugParam":"mode","params":["key","q","center","zoom","maptype","language","region"]},"referrerpolicy":"no-referrer-when-downgrade","frameborder":"0","style":"border:0","allowfullscreen":true,"width":null,"height":null}}}')},40862:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={cancelIdleCallback:function(){return f},requestIdleCallback:function(){return e}};for(var d in c)Object.defineProperty(b,d,{enumerable:!0,get:c[d]});let e="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let b=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-b))}})},1)},f="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(a)};("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},43949:a=>{a.exports={style:{fontFamily:"'IBM Plex Sans', 'IBM Plex Sans Fallback'",fontStyle:"normal"},className:"__className_c8daab",variable:"__variable_c8daab"}},47300:function(a,b,c){"use strict";var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){let{apiKey:b,...c}=a,d={...c,key:b},{html:h}=(0,f.GoogleMapsEmbed)(d);return(0,e.jsx)(g.default,{height:d.height||null,width:d.width||null,html:h,dataNtpc:"GoogleMapsEmbed"})};let e=c(5735),f=c(93166),g=d(c(16764))},54718:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e.a});var d=c(90929),e=c.n(d),f={};for(let a in d)"default"!==a&&(f[a]=()=>d[a]);c.d(b,f)},55091:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}});let d=c(5735),e=c(22675);function f(){return(0,d.jsx)(e.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},59537:function(a,b,c){"use strict";var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.sendGAEvent=b.GoogleAnalytics=b.sendGTMEvent=b.GoogleTagManager=b.YouTubeEmbed=b.GoogleMapsEmbed=void 0;var e=c(47300);Object.defineProperty(b,"GoogleMapsEmbed",{enumerable:!0,get:function(){return d(e).default}});var f=c(73992);Object.defineProperty(b,"YouTubeEmbed",{enumerable:!0,get:function(){return d(f).default}});var g=c(31935);Object.defineProperty(b,"GoogleTagManager",{enumerable:!0,get:function(){return g.GoogleTagManager}}),Object.defineProperty(b,"sendGTMEvent",{enumerable:!0,get:function(){return g.sendGTMEvent}});var h=c(20349);Object.defineProperty(b,"GoogleAnalytics",{enumerable:!0,get:function(){return h.GoogleAnalytics}}),Object.defineProperty(b,"sendGAEvent",{enumerable:!0,get:function(){return h.sendGAEvent}})},60002:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"setAttributesFromProps",{enumerable:!0,get:function(){return f}});let c={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},d=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function e(a){return["async","defer","noModule"].includes(a)}function f(a,b){for(let[f,g]of Object.entries(b)){if(!b.hasOwnProperty(f)||d.includes(f)||void 0===g)continue;let h=c[f]||f.toLowerCase();"SCRIPT"===a.tagName&&e(h)?a[h]=!!g:a.setAttribute(h,String(g)),(!1===g||"SCRIPT"===a.tagName&&e(h)&&(!g||"false"===g))&&(a.setAttribute(h,""),a.removeAttribute(h))}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},63419:function(a,b,c){"use strict";var d=this&&this.__rest||function(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c},e=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.YouTubeEmbed=void 0;let f=e(c(28559)),g=c(81052);b.YouTubeEmbed=a=>{var b=d(a,[]);return(0,g.formatData)(f.default,b)}},69566:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={ESCAPE_REGEX:function(){return f},htmlEscapeAttributeString:function(){return j},htmlEscapeJsonString:function(){return i}};for(var d in c)Object.defineProperty(b,d,{enumerable:!0,get:c[d]});let e={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},f=/[&><\u2028\u2029]/g,g={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},h=/[&"'<>]/g;function i(a){return a.replace(f,a=>e[a])}function j(a){return a.replace(h,a=>g[a])}},73992:function(a,b,c){"use strict";var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(a){let{html:b,scripts:c,stylesheets:d}=(0,g.YouTubeEmbed)(a);return(0,e.jsx)(h.default,{height:a.height||null,width:a.width||null,html:b,dataNtpc:"YouTubeEmbed",children:null==c?void 0:c.map(a=>(0,e.jsx)(f.default,{src:a.url,strategy:i[a.strategy],stylesheets:d},a.url))})};let e=c(5735),f=d(c(93968)),g=c(93166),h=d(c(16764)),i={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"}},74281:(a,b,c)=>{"use strict";var d;Object.defineProperty(b,"__esModule",{value:!0}),b.sendGTMEvent=void 0,b.GoogleTagManager=function(a){let{gtmId:b,gtmScriptUrl:c,dataLayerName:d="dataLayer",auth:i,preview:j,dataLayer:k,nonce:l}=a;h=d;let m=new URL(c||"https://www.googletagmanager.com/gtm.js");return b&&m.searchParams.set("id",b),"dataLayer"!==d&&m.searchParams.set("l",d),i&&m.searchParams.set("gtm_auth",i),j&&(m.searchParams.set("gtm_preview",j),m.searchParams.set("gtm_cookies_win","x")),(0,f.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(g.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
2
- (function(w,l){
3
- w[l]=w[l]||[];
4
- w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
5
- ${k?`w[l].push(${JSON.stringify(k)})`:""}
6
- })(window,'${d}');`},nonce:l}),(0,e.jsx)(g.default,{id:"_next-gtm","data-ntpc":"GTM",src:m.href,nonce:l})]})};let e=c(48249),f=c(67484),g=(d=c(54718))&&d.__esModule?d:{default:d},h="dataLayer";b.sendGTMEvent=(a,b)=>{let c=b||h;window[c]=window[c]||[],window[c].push(a)}},78962:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function({html:a,height:b=null,width:c=null,children:f,dataNtpc:g=""}){return(0,e.useEffect)(()=>{g&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${g}`}})},[g]),(0,d.jsxs)(d.Fragment,{children:[f,a?(0,d.jsx)("div",{style:{height:null!=b?`${b}px`:"auto",width:null!=c?`${c}px`:"auto"},"data-ntpc":g,dangerouslySetInnerHTML:{__html:a}}):null]})};let d=c(48249),e=c(67484)},81052:(a,b)=>{"use strict";function c(a,b,d=!1){return b?Object.keys(a).filter(a=>d?!b.includes(a):b.includes(a)).reduce((b,c)=>(b[c]=a[c],b),{}):{}}function d(a,b,c,d){let e=d&&Object.keys(d).length>0?new URL(Object.values(d)[0],a):new URL(a);return b&&c&&b.forEach(a=>{c[a]&&e.searchParams.set(a,c[a])}),e.toString()}function e(a,b,c,e,f){var g;if(!b)return`<${a}></${a}>`;let h=(null==(g=b.src)?void 0:g.url)?Object.assign(Object.assign({},b),{src:d(b.src.url,b.src.params,e,f)}):b,i=Object.keys(Object.assign(Object.assign({},h),c)).reduce((a,b)=>{let d=null==c?void 0:c[b],e=h[b],f=null!=d?d:e,g=!0===f?b:`${b}="${f}"`;return f?a+` ${g}`:a},"");return`<${a}${i}></${a}>`}Object.defineProperty(b,"__esModule",{value:!0}),b.formatData=b.createHtml=b.formatUrl=void 0,b.formatUrl=d,b.createHtml=e,b.formatData=function(a,b){var f,g,h,i,j;let k=c(b,null==(f=a.scripts)?void 0:f.reduce((a,b)=>[...a,...Array.isArray(b.params)?b.params:[]],[])),l=c(b,null==(h=null==(g=a.html)?void 0:g.attributes.src)?void 0:h.params),m=c(b,[null==(j=null==(i=a.html)?void 0:i.attributes.src)?void 0:j.slugParam]),n=c(b,[...Object.keys(k),...Object.keys(l),...Object.keys(m)],!0);return Object.assign(Object.assign({},a),{html:a.html?e(a.html.element,a.html.attributes,n,l,m):null,scripts:a.scripts?a.scripts.map(a=>Object.assign(Object.assign({},a),{url:d(a.url,a.params,k)})):null})}},82275:(a,b,c)=>{"use strict";var d;let e;Object.defineProperty(b,"__esModule",{value:!0}),b.GoogleAnalytics=function(a){let{gaId:b,debugMode:c,dataLayerName:d="dataLayer",nonce:i}=a;return void 0===e&&(e=d),(0,g.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:`
7
- window['${d}'] = window['${d}'] || [];
8
- function gtag(){window['${d}'].push(arguments);}
9
- gtag('js', new Date());
10
-
11
- gtag('config', '${b}' ${c?",{ 'debug_mode': true }":""});`},nonce:i}),(0,f.jsx)(h.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${b}`,nonce:i})]})},b.sendGAEvent=function(){void 0===e?console.warn("@next/third-parties: GA has not been initialized"):window[e]?window[e].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${e} does not exist`)};let f=c(48249),g=c(67484),h=(d=c(54718))&&d.__esModule?d:{default:d}},89719:(a,b,c)=>{"use strict";a.exports=c(81155).vendored.contexts.HeadManagerContext},90929:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={default:function(){return u},handleClientScriptLoad:function(){return r},initScriptLoader:function(){return s}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(40399),g=c(24814),h=c(48249),i=f._(c(74429)),j=g._(c(67484)),k=c(89719),l=c(60002),m=c(40862),n=c(69566),o=new Map,p=new Set,q=a=>{let{src:b,id:c,onLoad:d=()=>{},onReady:e=null,dangerouslySetInnerHTML:f,children:g="",strategy:h="afterInteractive",onError:j,stylesheets:k}=a,m=c||b;if(m&&p.has(m))return;if(o.has(b)){p.add(m),o.get(b).then(d,j);return}let n=()=>{e&&e(),p.add(m)},q=document.createElement("script"),r=new Promise((a,b)=>{q.addEventListener("load",function(b){a(),d&&d.call(this,b),n()}),q.addEventListener("error",function(a){b(a)})}).catch(function(a){j&&j(a)});f?(q.innerHTML=f.__html||"",n()):g?(q.textContent="string"==typeof g?g:Array.isArray(g)?g.join(""):"",n()):b&&(q.src=b,o.set(b,r)),(0,l.setAttributesFromProps)(q,a),"worker"===h&&q.setAttribute("type","text/partytown"),q.setAttribute("data-nscript",h),k&&(a=>{if(i.default.preinit)return a.forEach(a=>{i.default.preinit(a,{as:"style"})})})(k),document.body.appendChild(q)};function r(a){let{strategy:b="afterInteractive"}=a;"lazyOnload"===b?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>q(a))}):q(a)}function s(a){a.forEach(r),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(a=>{let b=a.id||a.getAttribute("src");p.add(b)})}function t(a){let{id:b,src:c="",onLoad:d=()=>{},onReady:e=null,strategy:f="afterInteractive",onError:g,stylesheets:l,...o}=a,{updateScripts:r,scripts:s,getIsSsr:t,appDir:u,nonce:v}=(0,j.useContext)(k.HeadManagerContext);v=o.nonce||v;let w=(0,j.useRef)(!1);(0,j.useEffect)(()=>{let a=b||c;w.current||(e&&a&&p.has(a)&&e(),w.current=!0)},[e,b,c]);let x=(0,j.useRef)(!1);if((0,j.useEffect)(()=>{if(!x.current){if("afterInteractive"===f)q(a);else"lazyOnload"===f&&("complete"===document.readyState?(0,m.requestIdleCallback)(()=>q(a)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>q(a))}));x.current=!0}},[a,f]),("beforeInteractive"===f||"worker"===f)&&(r?(s[f]=(s[f]||[]).concat([{id:b,src:c,onLoad:d,onReady:e,onError:g,...o,nonce:v}]),r(s)):t&&t()?p.add(b||c):t&&!t()&&q({...a,nonce:v})),u){if(l&&l.forEach(a=>{i.default.preinit(a,{as:"style"})}),"beforeInteractive"===f)if(!c)return o.dangerouslySetInnerHTML&&(o.children=o.dangerouslySetInnerHTML.__html,delete o.dangerouslySetInnerHTML),(0,h.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,n.htmlEscapeJsonString)(JSON.stringify([0,{...o,id:b}]))})`}});else return i.default.preload(c,o.integrity?{as:"script",integrity:o.integrity,nonce:v,crossOrigin:o.crossOrigin}:{as:"script",nonce:v,crossOrigin:o.crossOrigin}),(0,h.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,n.htmlEscapeJsonString)(JSON.stringify([c,{...o,id:b}]))})`}});"afterInteractive"===f&&c&&i.default.preload(c,o.integrity?{as:"script",integrity:o.integrity,nonce:v,crossOrigin:o.crossOrigin}:{as:"script",nonce:v,crossOrigin:o.crossOrigin})}return null}Object.defineProperty(t,"__nextScript",{value:!0});let u=t;("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},93166:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.YouTubeEmbed=b.GoogleMapsEmbed=b.GoogleAnalytics=void 0;var d=c(19148);Object.defineProperty(b,"GoogleAnalytics",{enumerable:!0,get:function(){return d.GoogleAnalytics}});var e=c(35687);Object.defineProperty(b,"GoogleMapsEmbed",{enumerable:!0,get:function(){return e.GoogleMapsEmbed}});var f=c(63419);Object.defineProperty(b,"YouTubeEmbed",{enumerable:!0,get:function(){return f.YouTubeEmbed}})},93968:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e.a});var d=c(33071),e=c.n(d),f={};for(let a in d)"default"!==a&&(f[a]=()=>d[a]);c.d(b,f)},96780:a=>{"use strict";a.exports=JSON.parse('{"id":"google-analytics","description":"Install a Google Analytics tag on your website","website":"https://analytics.google.com/analytics/web/","scripts":[{"url":"https://www.googletagmanager.com/gtag/js","params":["id"],"strategy":"worker","location":"head","action":"append"},{"code":"window.dataLayer=window.dataLayer||[];window.gtag=function gtag(){window.dataLayer.push(arguments);};gtag(\'js\',new Date());gtag(\'config\',\'${args.id}\')","strategy":"worker","location":"head","action":"append"}]}')}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=4306,exports.ids=[4306],exports.modules={37221:(a,b,c)=>{let d;c.d(b,{RD:()=>p});var e=c(99129),f=c(89419),g=c(19035);function h(a){return(0,g.Gv)(a)}class i{#a;#b=new WeakMap;constructor(a){if(!function(a){return a&&"object"==typeof a&&Array.isArray(a.keys)&&a.keys.every(h)}(a))throw new e.Dm("JSON Web Key Set malformed");this.#a=structuredClone(a)}jwks(){return this.#a}async getKey(a,b){let{alg:c,kid:d}={...a,...b?.header},f=function(a){switch("string"==typeof a&&a.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new e.T0('Unsupported "alg" value for a JSON Web Key Set')}}(c),g=this.#a.keys.filter(a=>{let b=f===a.kty;if(b&&"string"==typeof d&&(b=d===a.kid),b&&("string"==typeof a.alg||"AKP"===f)&&(b=c===a.alg),b&&"string"==typeof a.use&&(b="sig"===a.use),b&&Array.isArray(a.key_ops)&&(b=a.key_ops.includes("verify")),b)switch(c){case"ES256":b="P-256"===a.crv;break;case"ES384":b="P-384"===a.crv;break;case"ES512":b="P-521"===a.crv;break;case"Ed25519":case"EdDSA":b="Ed25519"===a.crv}return b}),{0:h,length:i}=g;if(0===i)throw new e.BT;if(1!==i){let a=new e.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of g)try{yield await j(b,a,c)}catch{}},a}return j(this.#b,h,c)}}async function j(a,b,c){let d=a.get(b)||a.set(b,{}).get(b);if(void 0===d[c]){let a=await (0,f.Og)({...b,ext:!0},c);if(a instanceof Uint8Array||"public"!==a.type)throw new e.Dm("JSON Web Key Set members must be public keys");d[c]=a}return d[c]}function k(a){let b=new i(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperties(c,{jwks:{value:()=>structuredClone(b.jwks()),enumerable:!1,configurable:!1,writable:!1}}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.4");let l=Symbol();async function m(a,b,c,d=fetch){let f=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new e.xb;throw a});if(200!==f.status)throw new e.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await f.json()}catch{throw new e.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let n=Symbol();class o{#c;#d;#e;#f;#g;#h;#i;#j;#k;#l;constructor(a,b){if(!(a instanceof URL))throw TypeError("url must be an instance of URL");this.#c=new URL(a.href),this.#d="number"==typeof b?.timeoutDuration?b?.timeoutDuration:5e3,this.#e="number"==typeof b?.cooldownDuration?b?.cooldownDuration:3e4,this.#f="number"==typeof b?.cacheMaxAge?b?.cacheMaxAge:6e5,this.#i=new Headers(b?.headers),d&&!this.#i.has("User-Agent")&&this.#i.set("User-Agent",d),this.#i.has("accept")||(this.#i.set("accept","application/json"),this.#i.append("accept","application/jwk-set+json")),this.#j=b?.[l],b?.[n]!==void 0&&(this.#l=b?.[n],function(a,b){return!("object"!=typeof a||null===a||!("uat"in a)||"number"!=typeof a.uat||Date.now()-a.uat>=b)&&"jwks"in a&&!!(0,g.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,g.Gv)}(b?.[n],this.#f)&&(this.#g=this.#l.uat,this.#k=k(this.#l.jwks)))}pendingFetch(){return!!this.#h}coolingDown(){return"number"==typeof this.#g&&Date.now()<this.#g+this.#e}fresh(){return"number"==typeof this.#g&&Date.now()<this.#g+this.#f}jwks(){return this.#k?.jwks()}async getKey(a,b){this.#k&&this.fresh()||await this.reload();try{return await this.#k(a,b)}catch(c){if(c instanceof e.BT&&!1===this.coolingDown())return await this.reload(),this.#k(a,b);throw c}}async reload(){this.#h&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(this.#h=void 0),this.#h||=m(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=k(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now(),this.#h=void 0}).catch(a=>{throw this.#h=void 0,a}),await this.#h}}function p(a,b){let c=new o(a,b),d=async(a,b)=>c.getKey(a,b);return Object.defineProperties(d,{coolingDown:{get:()=>c.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>c.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>c.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>c.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>c.jwks(),enumerable:!0,configurable:!1,writable:!1}}),d}},69614:(a,b,c)=>{c.d(b,{V:()=>p});var d=c(88888),e=c(91356),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(24762),k=c(80308),l=c(11980);async function m(a,b,c){if(!(0,i.Gv)(a))throw new f.Ye("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.Ye('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.Ye("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.Ye("JWS Payload missing");if("string"!=typeof a.signature)throw new f.Ye("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.Gv)(a.header))throw new f.Ye("JWS Unprotected Header incorrect type");let m={};if(a.protected)try{let b=(0,d.D)(a.protected);m=JSON.parse(g.D0.decode(b))}catch{throw new f.Ye("JWS Protected Header is invalid")}if(!(0,i.fz)(m,a.header))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...m,...a.header},o=(0,k.n)(f.Ye,new Map([["b64",!0]]),c?.crit,m,n),p=!0;if(o.has("b64")&&"boolean"!=typeof(p=m.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:q}=n;if("string"!=typeof q||!q)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');let r=c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);if(b)return new Set(b)}("algorithms",c.algorithms);if(r&&!r.has(q))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(p){if("string"!=typeof a.payload)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let s=!1;"function"==typeof b&&(b=await b(m,a),s=!0),(0,j.y)(q,b,"verify");let t=(0,g.xW)(void 0!==a.protected?(0,g.lF)(a.protected):new Uint8Array,(0,g.lF)("."),"string"==typeof a.payload?p?(0,g.lF)(a.payload):g.Rd.encode(a.payload):a.payload),u=(0,h.h2)(a.signature,"signature",f.Ye),v=await (0,l.l)(b,q);if(!await (0,e.MX)(q,v,u,t))throw new f.h2;let w={payload:p?(0,h.h2)(a.payload,"payload",f.Ye):"string"==typeof a.payload?g.Rd.encode(a.payload):a.payload};return(void 0!==a.protected&&(w.protectedHeader=m),void 0!==a.header&&(w.unprotectedHeader=a.header),s)?{...w,key:v}:w}async function n(a,b,c){if(a instanceof Uint8Array&&(a=g.D0.decode(a)),"string"!=typeof a)throw new f.Ye("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:h,length:i}=a.split(".");if(3!==i)throw new f.Ye("Invalid Compact JWS");let j=await m({payload:e,protected:d,signature:h},b,c),k={payload:j.payload,protectedHeader:j.protectedHeader};return"function"==typeof b?{...k,key:j.key}:k}var o=c(17347);async function p(a,b,c){let d=await n(a,b,c);if(d.protectedHeader.crit?.includes("b64")&&!1===d.protectedHeader.b64)throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,o.k6)(d.protectedHeader,d.payload,c),protectedHeader:d.protectedHeader};return"function"==typeof b?{...e,key:d.key}:e}},89419:(a,b,c)=>{c.d(b,{Og:()=>o,Lf:()=>n});var d=c(88888),e=c(88360),f=c(99129);let g=(a,b)=>{if(a.byteLength!==b.length)return!1;for(let c=0;c<a.byteLength;c++)if(a[c]!==b[c])return!1;return!0},h=a=>{let b=a.data[a.pos++];if(128&b){let c=127&b,d=0;for(let b=0;b<c;b++)d=d<<8|a.data[a.pos++];return d}return b},i=(a,b,c)=>{if(a.data[a.pos++]!==b)throw Error(c)},j=(a,b)=>{let c=a.data.subarray(a.pos,a.pos+b);return a.pos+=b,c},k=async(a,b,c,d)=>{let e,g,h="spki"===a,i=()=>h?["verify"]:["sign"];switch(c){case"PS256":case"PS384":case"PS512":e={name:"RSA-PSS",hash:`SHA-${c.slice(-3)}`},g=i();break;case"RS256":case"RS384":case"RS512":e={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${c.slice(-3)}`},g=i();break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":e={name:"RSA-OAEP",hash:`SHA-${parseInt(c.slice(-3),10)||1}`},g=h?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":e={name:"ECDSA",namedCurve:({ES256:"P-256",ES384:"P-384",ES512:"P-521"})[c]},g=i();break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{let a=d.getNamedCurve(b);e="X25519"===a?{name:"X25519"}:{name:"ECDH",namedCurve:a}}catch(a){throw new f.T0("Invalid or unsupported key format")}g=h?[]:["deriveBits"];break;case"Ed25519":case"EdDSA":e={name:"Ed25519"},g=i();break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":e={name:c},g=i();break;default:throw new f.T0('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey(a,b,e,d?.extractable??!!h,g)};var l=c(88783),m=c(19035);async function n(a,b,c){let d,f,l;if("string"!=typeof a||0!==a.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return d=/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,f=(0,e.y)(a.replace(d,"")),l=c,b?.startsWith?.("ECDH-ES")&&((l||={}).getNamedCurve=a=>{let b,c={data:a,pos:0};return i(c,48,"Invalid PKCS#8 structure"),h(c),i(c,2,"Expected version field"),b=h(c),c.pos+=b,i(c,48,"Expected algorithm identifier"),h(c),c.pos,(a=>{let b,c=(i(a,6,"Expected algorithm OID"),b=h(a),j(a,b));if(g(c,[43,101,110]))return"X25519";if(!g(c,[42,134,72,206,61,2,1]))throw Error("Unsupported key algorithm");i(a,6,"Expected curve OID");let d=h(a),e=j(a,d);for(let{name:a,oid:b}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(g(e,b))return a;throw Error("Unsupported named curve")})(c)}),k("pkcs8",f,b,l)}async function o(a,b,c){let e;if(!(0,m.Gv)(a))throw TypeError("JWK must be an object");switch(b??=a.alg,e??=c?.extractable??a.ext,a.kty){case"oct":if("string"!=typeof a.k||!a.k)throw TypeError('missing "k" (Key Value) Parameter value');return(0,d.D)(a.k);case"RSA":if("oth"in a&&void 0!==a.oth)throw new f.T0('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return(0,l.x)({...a,alg:b,ext:e});case"AKP":if("string"!=typeof a.alg||!a.alg)throw TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==b&&b!==a.alg)throw TypeError("JWK alg and alg option value mismatch");return(0,l.x)({...a,ext:e});case"EC":case"OKP":return(0,l.x)({...a,alg:b,ext:e});default:throw new f.T0('Unsupported "kty" (Key Type) Parameter value')}}}};
@@ -1 +0,0 @@
1
- "use strict";exports.id=6832,exports.ids=[6832],exports.modules={12557:(a,b,c)=>{c.d(b,{Bl:()=>j,Qo:()=>f,S5:()=>l,hk:()=>e,kJ:()=>k});var d=c(3662);function e(a,b,c=0){let f=b?("string"==typeof b?b:JSON.stringify(b)).toLowerCase():"";for(let b of d.t2)if(b.text&&f&&f.includes(b.text)||b.status&&b.status===a){if(b.backoff){let a=Math.min(c+1,d.EQ.maxLevel);return{shouldFallback:!0,cooldownMs:function(a=0){let b=Math.max(0,a-1);return Math.min(d.EQ.base*Math.pow(2,b),d.EQ.max)}(a),newBackoffLevel:a}}return{shouldFallback:!0,cooldownMs:b.cooldownMs}}return{shouldFallback:!0,cooldownMs:d.wf}}function f(a){if(!a)return"";let b=new Date(a).getTime()-Date.now();if(b<=0)return"reset after 0s";let c=Math.ceil(b/1e3),d=Math.floor(c/3600),e=Math.floor(c%3600/60),f=c%60,g=[];return d>0&&g.push(`${d}h`),e>0&&g.push(`${e}m`),(f>0||0===g.length)&&g.push(`${f}s`),`reset after ${g.join(" ")}`}let g="modelLock_",h=`${g}__all`;function i(a){return a?`${g}${a}`:h}function j(a,b){let c=a[i(b)]||a[h];return!!c&&new Date(c).getTime()>Date.now()}function k(a){if(!a)return null;let b=null,c=Date.now();for(let[d,e]of Object.entries(a)){if(!d.startsWith(g)||!e)continue;let a=new Date(e).getTime();a<=c||(!b||a<b)&&(b=a)}return b?new Date(b).toISOString():null}function l(a,b){return{[i(a)]:new Date(Date.now()+b).toISOString()}}},26922:(a,b,c)=>{c.d(b,{KZ:()=>k,S6:()=>h,Yr:()=>o,f6:()=>l,fc:()=>g,kU:()=>i,pT:()=>j,w_:()=>m});var d=c(62842),e=c(55673);let f=["minLength","maxLength","exclusiveMinimum","exclusiveMaximum","minItems","maxItems","format","default","examples","$schema","$defs","definitions","const","$ref","$comment","deprecated","readOnly","writeOnly","additionalProperties","propertyNames","patternProperties","enumDescriptions","anyOf","oneOf","allOf","not","dependencies","dependentSchemas","dependentRequired","title","optional","deprecated","if","then","else","contentMediaType","contentEncoding","cornerRadius","fillColor","fontFamily","fontSize","fontWeight","gap","padding","strokeColor","strokeThickness","textColor"],g=[{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"OFF"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"OFF"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"OFF"},{category:"HARM_CATEGORY_HARASSMENT",threshold:"OFF"},{category:"HARM_CATEGORY_CIVIC_INTEGRITY",threshold:"OFF"}];function h(a){let b=[];if("string"==typeof a)b.push({text:a});else if(Array.isArray(a)){for(let c of a)if(c.type===e.x4.TEXT)b.push({text:c.text});else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url?.startsWith("data:")){let a=c.image_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.IMAGE_URL&&c.image_url?.url&&(c.image_url.url.startsWith("http://")||c.image_url.url.startsWith("https://")))b.push({fileData:{fileUri:c.image_url.url,mimeType:"image/*"}});else if(c.type===e.x4.INPUT_AUDIO&&c.input_audio?.data){let a=c.input_audio.format||"wav",d="mp3"===a?"audio/mpeg":`audio/${a}`;b.push({inlineData:{mime_type:d,data:c.input_audio.data}})}else if(c.type===e.x4.AUDIO_URL&&c.audio_url?.url?.startsWith("data:")){let a=c.audio_url.url,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d),e=a.substring(d+1),f=c.split(";")[0];b.push({inlineData:{mime_type:f,data:e}})}}else if(c.type===e.x4.FILE&&c.file?.file_data?.startsWith("data:")){let a=c.file.file_data,d=a.indexOf(",");if(-1!==d){let c=a.substring(5,d).split(";")[0],e=a.substring(d+1);b.push({inlineData:{mime_type:c,data:e}})}}}return b}function i(a,b=""){return"string"==typeof a?a:Array.isArray(a)?a.filter(a=>a.type===e.x4.TEXT).map(a=>a.text).join(b):""}function j(a){return(0,d.N)(a,null)}function k(){return`agent-${crypto.randomUUID()}`}function l(){return crypto.randomUUID()+Date.now().toString()}function m(){let a=["useful","bright","swift","calm","bold"],b=["fuze","wave","spark","flow","core"],c=a[Math.floor(Math.random()*a.length)],d=b[Math.floor(Math.random()*b.length)];return`${c}-${d}-${crypto.randomUUID().slice(0,5)}`}function n(a){let b=0,c=-1;for(let d=0;d<a.length;d++){let e=a[d],f=0,g=e.type;"object"===g||e.properties?f=3:"array"===g||e.items?f=2:g&&"null"!==g&&(f=1),f>c&&(c=f,b=d)}return b}function o(a){return a&&"object"==typeof a&&(!function a(b){if(b&&"object"==typeof b)for(let c of(void 0===b.const||b.enum||(b.enum=[b.const],delete b.const),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.enum&&Array.isArray(b.enum)&&(b.enum=b.enum.map(a=>String(a)),b.type||(b.type="string")),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b){if(b&&"object"==typeof b){if(b.allOf&&Array.isArray(b.allOf)){let a={};for(let c of b.allOf)if(c.properties&&(a.properties||(a.properties={}),Object.assign(a.properties,c.properties)),c.required&&Array.isArray(c.required))for(let b of(a.required||(a.required=[]),c.required))a.required.includes(b)||a.required.push(b);delete b.allOf,a.properties&&(b.properties={...b.properties,...a.properties}),a.required&&(b.required=[...b.required||[],...a.required])}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.anyOf&&Array.isArray(b.anyOf)&&b.anyOf.length>0){let a=b.anyOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=n(a),d=a[c];delete b.anyOf,Object.assign(b,d)}}if(b.oneOf&&Array.isArray(b.oneOf)&&b.oneOf.length>0){let a=b.oneOf.filter(a=>a&&"null"!==a.type);if(a.length>0){let c=n(a),d=a[c];delete b.oneOf,Object.assign(b,d)}}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b){if(b.type&&Array.isArray(b.type)){let a=b.type.filter(a=>"null"!==a);b.type=a.length>0?a[0]:"string"}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of(b.properties&&!b.type&&(b.type="object"),Object.values(b)))c&&"object"==typeof c&&a(c)}(a),!function a(b,c){if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.keys(b)){if(c.includes(d)||d.startsWith("x-")){delete b[d];continue}let e=b[d];e&&"object"==typeof e&&a(e,c)}}}(a,f),!function a(b){if(b&&"object"==typeof b){if(b.required&&Array.isArray(b.required)&&b.properties){let a=b.required.filter(a=>Object.prototype.hasOwnProperty.call(b.properties,a));0===a.length?delete b.required:b.required=a}for(let c of Object.values(b))c&&"object"==typeof c&&a(c)}}(a),!function a(b){if(b&&"object"==typeof b)for(let c of("object"!==b.type||b.properties&&0!==Object.keys(b.properties).length||(b.properties={reason:{type:"string",description:"Brief explanation of why you are calling this tool"}},b.required=["reason"]),Object.values(b)))c&&"object"==typeof c&&a(c)}(a)),a}},43659:(a,b,c)=>{c.d(b,{A1:()=>g,lR:()=>i,wO:()=>h,yj:()=>e,zL:()=>f});var d=c(3662);function e(a,b){let c;return new Response(JSON.stringify((c=d.LY[a]||(a>=500?{type:"server_error",code:"internal_server_error"}:{type:"invalid_request_error",code:""}),{error:{message:b||d.O[a]||"An error occurred",type:c.type,code:c.code}})),{status:a,headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}async function f(a,b=null){let c="";try{c=await a.text()}catch{c=""}if(b&&"function"==typeof b.parseError)try{let e=b.parseError(a,c);if(e&&"object"==typeof e){let b=e.message||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:e.status||a.status,message:b,resetsAtMs:e.resetsAtMs}}}catch{}let e="";try{let a=JSON.parse(c);e=a.error?.message||a.message||a.error||c}catch{e=c}let g=("string"==typeof e?e:JSON.stringify(e))||d.O[a.status]||`Upstream error: ${a.status}`;return{statusCode:a.status,message:g}}function g(a,b,c){return{success:!1,status:a,error:b,resetsAtMs:c,response:e(a,b)}}function h(a,b,c,d){let e=Math.max(Math.ceil((new Date(c).getTime()-Date.now())/1e3),1);return new Response(JSON.stringify({error:{message:`${b} (${d})`}}),{status:a,headers:{"Content-Type":"application/json","Retry-After":String(e)}})}function i(a,b,c,d){let e=d||a.code||"FETCH_FAILED",f=a.message||"Unknown error",g=a.cause?.code,h=a.cause?.message,i=g||h?` (cause: ${[g,h].filter(Boolean).join(": ")})`:"";return`[${e}]: ${f}${i}`}},45699:(a,b,c)=>{c.d(b,{Xg:()=>q,PROVIDER_MODELS:()=>f.vq,fZ:()=>j,cY:()=>s,ux:()=>m,OA:()=>n,kt:()=>o,KC:()=>r,SM:()=>i});var d=c(35024),e=c(39660),f=c(26070),g=c(99511);let h="-review";function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}let k=new Set(["kr","kiro"]);function l(a,b,c){if(!a)return;let d=a.find(a=>a.id===b);if(d)return d;if(!k.has(c))return;let e=(0,g.Kq)(b);if(e!==b)return a.find(a=>a.id===e)}function m(a,b){let c=f.vq[a];return c?(0,g.gr)(l(c,b,a)):null}function n(a,b){let c=f.vq[a];if(!c)return null;let d=l(c,b,a);return d?.kind||d?.type||null}function o(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=l(f.vq[a],e,a);return g?.upstreamModelId?g.upstreamModelId+d:g?.id?g.id+d:"cx"===a&&"string"==typeof e&&e.endsWith(h)?e.slice(0,-h.length)+d:e+d}let p=Object.fromEntries(e.A.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),q=Object.fromEntries(Object.keys(d.xq).map(a=>[a,p[a]||a]));function r(a){let b=q[a]||a;return f.vq[b]||[]}function s(a,b){return(0,g.g5)(l(f.vq[a],b,a))}},53129:(a,b,c)=>{function d(a,b){let c,d=String(a||"").trim();if(!d)throw Error(`xai discovery ${b} is empty`);try{c=new URL(d)}catch(a){throw Error(`xai discovery ${b} is invalid: ${a.message}`)}if("https:"!==c.protocol)throw Error(`xai discovery ${b} must use https: ${d}`);let e=c.hostname.toLowerCase().trim();if("x.ai"!==e&&!e.endsWith(".x.ai"))throw Error(`xai discovery ${b} host ${e} is not on x.ai`);return d}function e(a){if(!a||"string"!=typeof a)return;let b=a.split(".");if(3===b.length)try{let a=b[1].replace(/-/g,"+").replace(/_/g,"/"),c=(4-a.length%4)%4,d=Buffer.from(a+"=".repeat(c),"base64").toString("utf8"),e=JSON.parse(d);return e.email||e.preferred_username||e.sub||void 0}catch{return}}function f(a){try{if(!a||"string"!=typeof a)return null;let b=a.split(".");if(3!==b.length)return null;let c=b[1].replace(/-/g,"+").replace(/_/g,"/"),d=(4-c.length%4)%4,e=c+"=".repeat(d);return JSON.parse(Buffer.from(e,"base64").toString("utf8"))}catch{return null}}function g(a){let b=f(a);if(b)return b.email||b.preferred_username||b.sub||void 0}async function h(a){if(!a)return null;try{let b=await fetch("https://codewhisperer.us-east-1.amazonaws.com/ListAvailableProfiles",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify({maxResults:10})});if(!b.ok)return null;let c=await b.json();return c.profiles?.find(a=>a.arn?.trim())?.arn?.trim()||null}catch{return null}}function i(a){let b=f(a);if(!b)return{};let c=b["https://api.openai.com/auth"]||{};return{email:b.email,chatgptAccountId:c.chatgpt_account_id||b.account_id,chatgptPlanType:c.chatgpt_plan_type||b.plan_type}}c.d(b,{J_:()=>g,YR:()=>i,gR:()=>h,js:()=>d,pG:()=>e})},55673:(a,b,c)=>{c.d(b,{R4:()=>g,BY:()=>l,a_:()=>j.a_,RV:()=>e,rP:()=>k,x4:()=>f,bC:()=>j.bC,Du:()=>h,z7:()=>d,m8:()=>i});let d={USER:"user",ASSISTANT:"assistant",TOOL:"tool",SYSTEM:"system",DEVELOPER:"developer"},e={USER:"user",MODEL:"model"},f={TEXT:"text",IMAGE_URL:"image_url",IMAGE:"image",INPUT_AUDIO:"input_audio",AUDIO_URL:"audio_url",FILE:"file",FUNCTION:"function"},g={TEXT:"text",IMAGE:"image",DOCUMENT:"document",TOOL_USE:"tool_use",TOOL_RESULT:"tool_result",THINKING:"thinking",REDACTED_THINKING:"redacted_thinking"},h={MESSAGE:"message",FUNCTION_CALL:"function_call",FUNCTION_CALL_OUTPUT:"function_call_output",REASONING:"reasoning",OUTPUT_TEXT:"output_text",INPUT_TEXT:"input_text",INPUT_IMAGE:"input_image",SUMMARY_TEXT:"summary_text"},i=[f.TEXT,f.IMAGE_URL,f.IMAGE,f.INPUT_AUDIO,f.AUDIO_URL,f.FILE];f.TEXT,f.IMAGE_URL,f.IMAGE,g.TOOL_RESULT;var j=c(69320);let k="unknown",l="image/png"},62842:(a,b,c)=>{c.d(b,{N:()=>d});function d(a,b){if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}},69320:(a,b,c)=>{c.d(b,{Ut:()=>e,a_:()=>f,bC:()=>d});let d={STOP:"stop",LENGTH:"length",TOOL_CALLS:"tool_calls",CONTENT_FILTER:"content_filter"},e={END_TURN:"end_turn",MAX_TOKENS:"max_tokens",TOOL_USE:"tool_use",STOP_SEQUENCE:"stop_sequence"},f={STOP:"STOP",MAX_TOKENS:"MAX_TOKENS",SAFETY:"SAFETY",RECITATION:"RECITATION",BLOCKLIST:"BLOCKLIST",PROHIBITED_CONTENT:"PROHIBITED_CONTENT"}},74177:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{PY:()=>s,Re:()=>q,Su:()=>r,exchangeTokens:()=>p,extractCodexAccountInfo:()=>k.YR,fetchKiroProfileArn:()=>k.gR,kP:()=>o,sO:()=>n});var e=c(48895),f=c(55511),g=c.n(f),h=c(13808),i=c(92990),j=c(73159),k=c(53129),l=a([e]);e=(l.then?(await l)():l)[0];let t=null;async function m(){if(t)return t;try{let a=await fetch(j.oT.discoveryUrl,{headers:{Accept:"application/json"}});if(a.ok){let b=await a.json();return t={authorizeUrl:(0,k.js)(b.authorization_endpoint,"authorization_endpoint"),tokenUrl:(0,k.js)(b.token_endpoint,"token_endpoint")}}}catch{}return t={authorizeUrl:j.oT.authorizeUrl,tokenUrl:j.oT.tokenUrl}}let u={claude:{config:i.OV,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d)=>{let e=new URLSearchParams({code:"true",client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c});return`${a.authorizeUrl}?${e.toString()}`},exchangeToken:async(a,b,c,d,e)=>{let f=b,g="";if(f.includes("#")){let a=f.split("#");f=a[0],g=a[1]||""}let h=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({code:f,state:g||e,grant_type:"authorization_code",client_id:a.clientId,redirect_uri:c,code_verifier:d})});if(!h.ok){let a=await h.text();throw Error(`Token exchange failed: ${a}`)}return await h.json()},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope})},codex:{config:i.DI,flowType:"authorization_code_pkce",fixedPort:i.DI.fixedPort,callbackPath:i.DI.callbackPath,buildAuthUrl:(a,b,c,d)=>{let e={response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,...a.extraParams,state:c},f=Object.entries(e).filter(([a])=>"originator"!==a).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${f}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b=(0,k.YR)(a.id_token),c={accessToken:a.access_token,refreshToken:a.refresh_token,idToken:a.id_token,expiresIn:a.expires_in,lastRefreshAt:new Date().toISOString()},d=b.email||(0,k.J_)(a.access_token);return d&&(c.email=d),(b.chatgptAccountId||b.chatgptPlanType)&&(c.providerSpecificData={chatgptAccountId:b.chatgptAccountId,chatgptPlanType:b.chatgptPlanType}),c}},xai:{config:j.oT,flowType:"authorization_code_pkce",fixedPort:j.oT.loopbackPort,callbackPath:j.oT.callbackPath,pkceVerifierBytes:j.Ue,prepareConfig:async a=>{let b=await m();return{...a,authorizeUrl:b.authorizeUrl,tokenUrl:b.tokenUrl}},buildAuthUrl:(a,b,c,d)=>{let e=g().randomBytes(16).toString("hex"),f={response_type:"code",client_id:a.clientId,redirect_uri:b,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod,state:c,nonce:e,plan:"generic",referrer:"cli-proxy-api"},h=Object.entries(f).map(([a,b])=>`${a}=${encodeURIComponent(b)}`).join("&");return`${a.authorizeUrl}?${h}`},exchangeToken:async(a,b,c,d)=>{let e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,code:b,redirect_uri:c,code_verifier:d})});if(!e.ok){let a=await e.text();throw Error(`xAI token exchange failed: ${a}`)}return await e.json()},mapTokens:a=>{let b={accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope},c=(0,k.pG)(a.id_token);return c&&(b.email=c),a.id_token&&(b.providerSpecificData={idToken:a.id_token}),b}},"grok-cli":{config:i.qp,flowType:"device_code",requestDeviceCode:async a=>{let b=new URLSearchParams({client_id:a.clientId,scope:a.scope});a.referrer&&b.set("referrer",a.referrer);let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:b});if(!c.ok){let a=await c.text();throw Error(`Grok CLI device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:b,client_id:a.clientId})});try{c=await d.json()}catch{let a=await d.text();c={error:"invalid_response",error_description:a}}let e=c?.error==="authorization_pending"||c?.error==="slow_down";return{ok:d.ok||e,data:c}},postExchange:async a=>{try{let b=await fetch("https://cli-chat-proxy.grok.com/v1/user",{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","User-Agent":"grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)","x-xai-token-auth":"xai-grok-cli","x-grok-client-version":"0.2.93"}});if(b.ok)return{user:await b.json()}}catch{}return{user:null}},mapTokens:(a,b)=>{let c=(0,k.pG)(a.id_token)||(0,k.J_)(a.access_token)||b?.user?.email||null,d=b?.user?.userId||b?.user?.principalId||null,e=[b?.user?.firstName,b?.user?.lastName].filter(Boolean).join(" ").trim()||null,f=a.expires_in?new Date(Date.now()+1e3*a.expires_in).toISOString():null;return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,expiresAt:f,scope:a.scope,email:c||void 0,displayName:e||void 0,providerSpecificData:{authMethod:"device_code",idToken:a.id_token||null,email:c||null,userId:d,hasGrokCodeAccess:b?.user?.hasGrokCodeAccess??null,subscriptionTier:b?.user?.subscriptionTier??null}}}},"gemini-cli":{config:i.LT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b=await fetch(`${i.LT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`}}),c=b.ok?await b.json():{},d="";try{let b=await fetch("https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist",{method:"POST",headers:{Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:(0,i.cD)(),mode:1})});if(b.ok){let a=await b.json();d=a.cloudaicompanionProject?.id||a.cloudaicompanionProject||""}}catch(a){console.log("Failed to fetch project ID:",a)}return{userInfo:c,projectId:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},antigravity:{config:i.YT,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({client_id:a.clientId,response_type:"code",redirect_uri:b,scope:a.scopes.join(" "),state:c,access_type:"offline",prompt:"consent"});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"authorization_code",client_id:a.clientId,client_secret:a.clientSecret,code:b,redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Token exchange failed: ${a}`)}return await d.json()},postExchange:async a=>{let b={Authorization:`Bearer ${a.access_token}`,"Content-Type":"application/json","User-Agent":i.YT.loadCodeAssistUserAgent,"X-Goog-Api-Client":i.YT.loadCodeAssistApiClient,"Client-Metadata":i.YT.loadCodeAssistClientMetadata,"x-request-source":"local"},c=(0,i.cD)(),d=await fetch(`${i.YT.userInfoUrl}?alt=json`,{headers:{Authorization:`Bearer ${a.access_token}`,"x-request-source":"local"}}),e=d.ok?await d.json():{},f="",g="legacy-tier";try{let a=await fetch(i.YT.loadCodeAssistEndpoint,{method:"POST",headers:b,body:JSON.stringify({metadata:c})});if(a.ok){let b=await a.json();if(f=b.cloudaicompanionProject?.id||b.cloudaicompanionProject||"",Array.isArray(b.allowedTiers)){for(let a of b.allowedTiers)if(a.isDefault&&a.id){g=a.id.trim();break}}}}catch(a){console.log("Failed to load code assist:",a)}return f&&(async()=>{for(let a=0;a<10;a++){try{let a=await fetch(i.YT.onboardUserEndpoint,{method:"POST",headers:b,body:JSON.stringify({tierId:g,metadata:c})});if(a.ok){let b=await a.json();if(!0===b.done)break}}catch(a){break}await new Promise(a=>setTimeout(a,5e3))}})().catch(()=>{}),{userInfo:e,projectId:f}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,email:b?.userInfo?.email,projectId:b?.projectId})},iflow:{config:i.ZL,flowType:"authorization_code",buildAuthUrl:(a,b,c)=>{let d=new URLSearchParams({loginMethod:a.extraParams.loginMethod,type:a.extraParams.type,redirect:b,state:c,client_id:a.clientId});return`${a.authorizeUrl}?${d.toString()}`},exchangeToken:async(a,b,c)=>{let d=Buffer.from(`${a.clientId}:${a.clientSecret}`).toString("base64"),e=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${d}`},body:new URLSearchParams({grant_type:"authorization_code",code:b,redirect_uri:c,client_id:a.clientId,client_secret:a.clientSecret})});if(!e.ok){let a=await e.text();throw Error(`Token exchange failed: ${a}`)}return await e.json()},postExchange:async a=>{let b=await fetch(`${i.ZL.userInfoUrl}?accessToken=${encodeURIComponent(a.access_token)}`,{headers:{Accept:"application/json"}});if(!b.ok){let a=await b.text();throw Error(`Failed to fetch user info: ${a}`)}let c=await b.json();if(!c.success)throw Error(`User info request failed: ${c.message||"Unknown error"}`);let d=c.data||{};if(!d.apiKey||""===d.apiKey.trim())throw Error("Empty API key returned from iFlow");if(!(d.email?.trim()||d.phone?.trim()))throw Error("Missing account email/phone in user info");return{userInfo:d}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,apiKey:b?.userInfo?.apiKey,email:b?.userInfo?.email||b?.userInfo?.phone,displayName:b?.userInfo?.nickname||b?.userInfo?.name})},qoder:{config:i.hF,flowType:"device_code",requestDeviceCode:async a=>{let{QoderService:b}=await c.e(3546).then(c.bind(c,73546)),d=new b().initiateDeviceFlow();return{device_code:d.nonce,user_code:d.nonce.slice(0,8).toUpperCase(),verification_uri:a.loginUrl,verification_uri_complete:d.verificationUriComplete,expires_in:300,interval:2,codeVerifier:d.codeVerifier,_qoderNonce:d.nonce,_qoderMachineId:d.machineId}},pollToken:async(a,b,d,e)=>{let f,{QoderService:g}=await c.e(3546).then(c.bind(c,73546)),h=new g,i=b||e?._qoderNonce,j=d||e?._qoderVerifier;if(!i||!j)return{ok:!1,data:{error:"invalid_request",error_description:"Missing nonce/verifier"}};try{f=await h.pollDeviceToken({nonce:i,codeVerifier:j})}catch(a){return{ok:!1,data:{error:"poll_failed",error_description:a.message}}}if("pending"===f.status)return{ok:!1,data:{error:"authorization_pending"}};let k=await h.fetchUserInfo(f.accessToken),l=Math.floor((f.expireTime-Date.now())/1e3),m=Math.max(86400,l);return{ok:!0,data:{access_token:f.accessToken,refresh_token:f.refreshToken,expires_in:m,_qoderUserId:f.userId,_qoderMachineId:e?._qoderMachineId||"",_qoderName:k.name,_qoderEmail:k.email,_qoderOrganizationId:k.organizationId}}},mapTokens:a=>{let b=(a._qoderEmail||"").trim(),c=(a._qoderName||"").trim()||null,d=a._qoderUserId||"",e=b||(d?`qoder-user-${d}`:null);return{accessToken:a.access_token,refreshToken:a.refresh_token||null,expiresIn:a.expires_in,email:e,displayName:c,providerSpecificData:{authMethod:"device",userId:d,machineId:a._qoderMachineId||"",organizationId:a._qoderOrganizationId||""}}}},qwen:{config:i.Hp,flowType:"device_code",requestDeviceCode:async(a,b)=>{let c=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scope,code_challenge:b,code_challenge_method:a.codeChallengeMethod})});if(!c.ok){let a=await c.text();throw Error(`Device code request failed: ${a}`)}return await c.json()},pollToken:async(a,b,c)=>{let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b,code_verifier:c})});return{ok:d.ok,data:await d.json()}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{resourceUrl:a.resource_url}})},github:{config:i.Nu,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.deviceCodeUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,scope:a.scopes})});if(!b.ok){let a=await b.text();throw Error(`Device code request failed: ${a}`)}return await b.json()},pollToken:async(a,b)=>{let c,d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({client_id:a.clientId,device_code:b,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})});try{c=await d.json()}catch(b){let a=await d.text();c={error:"invalid_response",error_description:a}}return{ok:d.ok,data:c}},postExchange:async a=>{let b=await fetch(i.Nu.copilotTokenUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),c=b.ok?await b.json():{},d=await fetch(i.Nu.userInfoUrl,{headers:{Authorization:`Bearer ${a.access_token}`,Accept:"application/json","X-GitHub-Api-Version":i.Nu.apiVersion,"User-Agent":i.Nu.userAgent}}),e=d.ok?await d.json():{};return{copilotToken:c,userInfo:e}},mapTokens:(a,b)=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,name:b?.userInfo?.login||b?.userInfo?.name,displayName:b?.userInfo?.name||b?.userInfo?.login,email:b?.userInfo?.email||null,providerSpecificData:{copilotToken:b?.copilotToken?.token,copilotTokenExpiresAt:b?.copilotToken?.expires_at,githubUserId:b?.userInfo?.id,githubLogin:b?.userInfo?.login,githubName:b?.userInfo?.name,githubEmail:b?.userInfo?.email}})},kiro:{config:i.Tx,flowType:"device_code",requestDeviceCode:async(a,b,c={})=>{let d=("string"==typeof c.region?c.region.trim():"")||"us-east-1";(0,i.S6)(d);let e=("string"==typeof c.startUrl?c.startUrl.trim():"")||a.startUrl,f="idc"===c.authMethod?"idc":"builder-id",g=`https://oidc.${d}.amazonaws.com/client/register`,h=`https://oidc.${d}.amazonaws.com/device_authorization`,j=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientName:a.clientName,clientType:a.clientType,scopes:a.scopes,grantTypes:a.grantTypes,issuerUrl:a.issuerUrl})});if(!j.ok){let a=await j.text();throw Error(`Client registration failed: ${a}`)}let k=await j.json(),l=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:k.clientId,clientSecret:k.clientSecret,startUrl:e})});if(!l.ok){let a=await l.text();throw Error(`Device authorization failed: ${a}`)}let m=await l.json();return{device_code:m.deviceCode,user_code:m.userCode,verification_uri:m.verificationUri,verification_uri_complete:m.verificationUriComplete,expires_in:m.expiresIn,interval:m.interval||5,_clientId:k.clientId,_clientSecret:k.clientSecret,_region:d,_authMethod:f,_startUrl:e}},pollToken:async(a,b,c,d)=>{let e,f=d?._region||"us-east-1";(0,i.S6)(f);let g=`https://oidc.${f}.amazonaws.com/token`,h=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:d?._clientId,clientSecret:d?._clientSecret,deviceCode:b,grantType:"urn:ietf:params:oauth:grant-type:device_code"})});try{e=await h.json()}catch(b){let a=await h.text();e={error:"invalid_response",error_description:a}}return e.accessToken?{ok:!0,data:{access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn,profile_arn:e?.profileArn||null,_clientId:d?._clientId,_clientSecret:d?._clientSecret,_region:d?._region,_authMethod:d?._authMethod,_startUrl:d?._startUrl}}:{ok:!1,data:{error:e.error||"authorization_pending",error_description:e.error_description||e.message}}},mapTokens:a=>{let b=(0,k.J_)(a.access_token);return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,email:b,providerSpecificData:{profileArn:a?.profile_arn||null,clientId:a._clientId,clientSecret:a._clientSecret,region:a._region||"us-east-1",authMethod:a._authMethod||"builder-id",startUrl:a._startUrl||i.Tx.startUrl}}}},cursor:{config:i.WN,flowType:"import_token",mapTokens:a=>({accessToken:a.accessToken,refreshToken:null,expiresIn:a.expiresIn||86400,providerSpecificData:{machineId:a.machineId,authMethod:"imported"}})},kimi:{config:i.aV,flowType:"device_code",requestDeviceCode:async a=>{let{buildKimiHeaders:b}=await Promise.resolve().then(c.bind(c,75924)),d=g().randomUUID(),e={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...b(d)},f=await fetch(a.deviceCodeUrl,{method:"POST",headers:e,body:new URLSearchParams({client_id:a.clientId})});if(!f.ok){let a=await f.text();throw Error(`Device code request failed: ${a}`)}let h=await f.json(),i=a.authorizeDeviceUrl||"https://www.kimi.com/code/authorize_device";return{device_code:h.device_code,user_code:h.user_code,verification_uri:h.verification_uri||i,verification_uri_complete:h.verification_uri_complete||`${i}?user_code=${h.user_code}`,expires_in:h.expires_in,interval:h.interval||5,_kimiDeviceId:d}},pollToken:async(a,b,d,e)=>{let f,{buildKimiHeaders:g}=await Promise.resolve().then(c.bind(c,75924)),h=e?._kimiDeviceId,i={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",...g(h)},j=await fetch(a.tokenUrl,{method:"POST",headers:i,body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:a.clientId,device_code:b})});try{f=await j.json()}catch{f={error:"invalid_response",error_description:"non-json token response"}}return"authorization_pending"===f.error||"slow_down"===f.error?{ok:!0,data:f}:(f.access_token&&h&&(f._kimiDeviceId=h),{ok:j.ok||!!f.access_token||!!f.error,data:f})},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,providerSpecificData:{authMethod:"device_code",...a._kimiDeviceId?{deviceId:a._kimiDeviceId}:{}}})},kilocode:{config:i.MZ,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(a.initiateUrl,{method:"POST",headers:{"Content-Type":"application/json"}});if(!b.ok){if(429===b.status)throw Error("Too many pending authorization requests. Please try again later.");let a=await b.text();throw Error(`Device auth initiation failed: ${a}`)}let c=await b.json();return{device_code:c.code,user_code:c.code,verification_uri:c.verificationUrl,verification_uri_complete:c.verificationUrl,expires_in:c.expiresIn||300,interval:3}},pollToken:async(a,b)=>{let c=await fetch(`${a.pollUrlBase}/${b}`);if(202===c.status)return{ok:!1,data:{error:"authorization_pending"}};if(403===c.status)return{ok:!1,data:{error:"access_denied",error_description:"Authorization denied by user"}};if(410===c.status)return{ok:!1,data:{error:"expired_token",error_description:"Authorization code expired"}};if(!c.ok)return{ok:!1,data:{error:"poll_failed",error_description:`Poll failed: ${c.status}`}};let d=await c.json();if("approved"===d.status&&d.token){let b=null;try{let c=await fetch(`${a.apiBaseUrl}/api/profile`,{headers:{Authorization:`Bearer ${d.token}`}});if(c.ok){let a=await c.json();b=a.organizations?.[0]?.id||null}}catch{}return{ok:!0,data:{access_token:d.token,_userEmail:d.userEmail,_orgId:b}}}return{ok:!1,data:{error:"authorization_pending"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:null,expiresIn:null,email:a._userEmail,...a._orgId?{providerSpecificData:{orgId:a._orgId}}:{}})},cline:{config:i.lB,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`Cline token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},clinepass:{config:i.w1,flowType:"authorization_code",buildAuthUrl:(a,b)=>{let c=new URLSearchParams({client_type:"extension",callback_url:b,redirect_uri:b});return`${a.authorizeUrl}?${c.toString()}`},exchangeToken:async(a,b,c)=>{try{let a=b,c=4-a.length%4;4!==c&&(a+="=".repeat(c));let d=Buffer.from(a,"base64").toString("utf-8"),e=d.lastIndexOf("}");if(-1===e)throw Error("No JSON found in decoded code");let f=JSON.parse(d.substring(0,e+1));return{access_token:f.accessToken,refresh_token:f.refreshToken,email:f.email,firstName:f.firstName,lastName:f.lastName,expires_at:f.expiresAt}}catch(f){let d=await fetch(a.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"authorization_code",code:b,client_type:"extension",redirect_uri:c})});if(!d.ok){let a=await d.text();throw Error(`ClinePass token exchange failed: ${a}`)}let e=await d.json();return{access_token:e.data?.accessToken||e.accessToken,refresh_token:e.data?.refreshToken||e.refreshToken,email:e.data?.userInfo?.email||"",expires_at:e.data?.expiresAt||e.expiresAt}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_at?Math.floor((new Date(a.expires_at).getTime()-Date.now())/1e3):3600,email:a.email,providerSpecificData:{firstName:a.firstName,lastName:a.lastName}})},gitlab:{config:i.f7,flowType:"authorization_code_pkce",buildAuthUrl:(a,b,c,d,e={})=>{let f=e.baseUrl||a.defaultBaseUrl,g=e.clientId||"",h=new URLSearchParams({client_id:g,redirect_uri:b,response_type:"code",state:c,scope:a.scope,code_challenge:d,code_challenge_method:a.codeChallengeMethod});return`${f}${a.authorizeUrlPath}?${h.toString()}`},exchangeToken:async(a,b,c,d,e,f={})=>{let g=f.baseUrl||a.defaultBaseUrl,h=f.clientId||"",i=f.clientSecret||"",j=new URLSearchParams({client_id:h,grant_type:"authorization_code",code:b,redirect_uri:c,code_verifier:d});i&&j.set("client_secret",i);let k=await fetch(`${g}${a.tokenUrlPath}`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:j.toString()});if(!k.ok)throw Error(`GitLab token exchange failed: ${await k.text()}`);let l=await k.json(),m=await fetch(`${g}${a.userInfoUrlPath}`,{headers:{Authorization:`Bearer ${l.access_token}`}}),n=m.ok?await m.json():{};return{...l,_user:n,_baseUrl:g,_clientId:h}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in,scope:a.scope,providerSpecificData:{username:a._user?.username||"",email:a._user?.email||a._user?.public_email||"",name:a._user?.name||"",baseUrl:a._baseUrl,clientId:a._clientId,authKind:"oauth"}})},"codebuddy-cn":{config:i.Nl,flowType:"device_code",requestDeviceCode:async a=>{let b=await fetch(`${a.stateUrl}?platform=${a.platform}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-Product":"SaaS"},body:"{}"});if(!b.ok)throw Error(`CodeBuddy state request failed: ${await b.text()}`);let c=await b.json();if(0!==c.code||!c.data?.state||!c.data?.authUrl)throw Error(`CodeBuddy state error: ${c.msg||"missing state/authUrl"}`);return{device_code:c.data.state,verification_uri:c.data.authUrl,user_code:"",interval:a.pollInterval/1e3,_isCodeBuddy:!0}},pollToken:async(a,b)=>{let c=await fetch(`${a.tokenUrl}?state=${encodeURIComponent(b)}`,{method:"GET",headers:{Accept:"application/json","User-Agent":a.userAgent,"X-Requested-With":"XMLHttpRequest","X-Domain":"copilot.tencent.com","X-No-Authorization":"true","X-No-User-Id":"true","X-No-Enterprise-Id":"true","X-No-Department-Info":"true","X-Product":"SaaS"}});if(!c.ok)return{ok:!1,data:{error:"request_failed"}};let d=await c.json();return 0===d.code&&d.data?.accessToken?{ok:!0,data:{access_token:d.data.accessToken,refresh_token:d.data.refreshToken||"",token_type:d.data.tokenType||"Bearer",expires_in:d.data.expiresIn}}:11217===d.code?{ok:!0,data:{error:"authorization_pending"}}:{ok:!1,data:{error:d.msg||"unknown_error"}}},mapTokens:a=>({accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in||86400,providerSpecificData:{}})},kimchi:{config:i.Td,flowType:"browser_token",buildAuthUrl:(a,b,c)=>{let d=(a.webAppUrl||"https://app.kimchi.dev").replace(/\/+$/,""),e=new URLSearchParams({callback:b,state:c});return`${d}/cli-auth?${e.toString()}`},exchangeToken:async(a,b)=>{let c=String(b||"").trim();if(!c)throw Error("Missing Kimchi token");let d=a.validationUrl||"https://api.cast.ai/v1/llm/openai/supported-providers",e=await fetch(d,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});if(!e.ok)throw Error(`Kimchi token validation failed: ${e.status}`);let f={};if(a.userInfoUrl)try{let b=await fetch(a.userInfoUrl,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${c}`}});b.ok&&(f=await b.json())}catch{f={}}return{access_token:c,token_type:"Bearer",_kimchiUser:f}},mapTokens:a=>{let b=a._kimchiUser||{},c=b.id?String(b.id):"",d=b.username||"",e=b.email||(c?`kimchi-user-${c}`:null);return{accessToken:a.access_token,refreshToken:null,email:e,displayName:b.name||d||null,providerSpecificData:{authMethod:"browser_token",userId:c,username:d}}}}};function n(a){let b=u["kimi-coding"===a?"kimi":a];if(!b)throw Error(`Unknown provider: ${a}`);return b}async function o(a,b,c){let d=n(a),e=d.prepareConfig?await d.prepareConfig(d.config,c||{}):d.config,{codeVerifier:f,codeChallenge:g,state:i}=(0,h.lz)(d.pkceVerifierBytes);return{authUrl:"device_code"===d.flowType?null:"authorization_code_pkce"===d.flowType?d.buildAuthUrl(e,b,i,g,c||{}):d.buildAuthUrl(e,b,i,void 0,c||{}),state:i,codeVerifier:f,codeChallenge:g,redirectUri:b,flowType:d.flowType,fixedPort:d.fixedPort,callbackPath:d.callbackPath||"/callback"}}async function p(a,b,c,d,e,f){let g=n(a),h=g.prepareConfig?await g.prepareConfig(g.config,f||{}):g.config,i=await g.exchangeToken(h,b,c,d,e,f||{}),j=null;return g.postExchange&&(j=await g.postExchange(i)),g.mapTokens(i,j)}async function q(a,b,c){let d=n(a);if("device_code"!==d.flowType)throw Error(`Provider ${a} does not support device code flow`);return await d.requestDeviceCode(d.config,b,c||{})}async function r(a,b,c,d){let e=n(a);if("device_code"!==e.flowType)throw Error(`Provider ${a} does not support device code flow`);let f=await e.pollToken(e.config,b,c,d);if(f.ok)if(f.data.access_token){let b=null;e.postExchange&&(b=await e.postExchange(f.data));let c=e.mapTokens(f.data,b);if("kiro"===a&&!c.providerSpecificData?.profileArn){let a=await (0,k.gR)(c.accessToken);a&&(c.providerSpecificData.profileArn=a)}return{success:!0,tokens:c}}else if("authorization_pending"===f.data.error||"slow_down"===f.data.error)return{success:!1,error:f.data.error,errorDescription:f.data.error_description||f.data.message,pending:"authorization_pending"===f.data.error};else return{success:!1,error:f.data.error||"no_access_token",errorDescription:f.data.error_description||f.data.message||"No access token received"};return{success:!1,error:f.data.error,errorDescription:f.data.error_description}}let v=!1;async function s(){if(!v){v=!0;try{let{getProviderConnections:a,updateProviderConnection:b}=await Promise.resolve().then(c.bind(c,89718));for(let c of(await a()).filter(a=>{if("codex"!==a.provider||"oauth"!==a.authType||!a.idToken)return!1;let b=!!a.email,c=!!a.providerSpecificData?.chatgptAccountId;return!b||!c})){let a=(0,k.YR)(c.idToken);if(!a.email&&!a.chatgptAccountId)continue;let d={};!c.email&&a.email&&(d.email=a.email),(a.chatgptAccountId||a.chatgptPlanType)&&(d.providerSpecificData={...c.providerSpecificData||{},chatgptAccountId:a.chatgptAccountId,chatgptPlanType:a.chatgptPlanType}),Object.keys(d).length&&await b(c.id,d)}}catch(a){v=!1,console.log("backfillCodexEmails failed:",a?.message||a)}}}d()}catch(a){d(a)}})}};