9router-imagefix 0.5.76 → 0.5.78

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 (688) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +6 -5
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/routes-manifest.json +6 -0
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  52. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  54. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  55. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  56. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  57. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  58. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  59. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  61. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  62. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  63. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  64. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  65. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  66. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  67. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  68. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  69. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  70. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  71. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  72. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  73. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  74. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  75. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  76. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  77. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  78. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  79. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  80. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  81. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  82. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  83. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  84. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  85. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  86. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  87. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  88. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  89. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +3 -3
  90. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  94. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  95. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  161. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  163. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  172. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/usage/backup/route.js +1 -0
  186. package/app/.next-cli-build/server/app/api/usage/backup/route.js.nft.json +1 -0
  187. package/app/.next-cli-build/server/app/api/usage/backup/route_client-reference-manifest.js +1 -0
  188. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  222. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  223. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  224. package/app/.next-cli-build/server/app/callback.html +1 -1
  225. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  226. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  227. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  228. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  229. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  230. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  231. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  232. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  233. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  234. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  235. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  236. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  237. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  238. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  239. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  240. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  241. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  242. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  243. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  244. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  245. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  246. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  247. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  248. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  249. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  250. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  251. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  252. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  253. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  254. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  255. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  256. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  257. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  258. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  259. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  260. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  261. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  262. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  263. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  264. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  265. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  266. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  267. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  268. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  269. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  270. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  271. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  272. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  273. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  274. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  275. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  276. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  277. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  278. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  279. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  280. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  281. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
  282. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  283. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  284. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  285. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  286. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  287. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  288. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  289. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  290. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  291. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  292. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  293. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  294. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  295. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  296. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  297. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  298. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  299. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  300. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  301. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  302. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  303. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  304. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  305. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  306. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  307. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  308. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  309. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  310. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  311. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  312. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  313. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  314. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  315. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  316. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  317. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  318. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  319. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  320. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  321. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  322. package/app/.next-cli-build/server/app/index.html +1 -1
  323. package/app/.next-cli-build/server/app/index.rsc +5 -5
  324. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  325. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  326. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  327. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  328. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  329. package/app/.next-cli-build/server/app/landing.html +1 -1
  330. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  331. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  332. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  333. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  334. package/app/.next-cli-build/server/app/login/page.js +1 -1
  335. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  336. package/app/.next-cli-build/server/app/login.html +1 -1
  337. package/app/.next-cli-build/server/app/login.rsc +6 -6
  338. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  339. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  340. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  341. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  342. package/app/.next-cli-build/server/app/page.js +1 -1
  343. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  344. package/app/.next-cli-build/server/app-paths-manifest.json +6 -5
  345. package/app/.next-cli-build/server/chunks/4037.js +1 -1
  346. package/app/.next-cli-build/server/chunks/436.js +1 -1
  347. package/app/.next-cli-build/server/chunks/4572.js +1 -1
  348. package/app/.next-cli-build/server/chunks/4884.js +8 -2
  349. package/app/.next-cli-build/server/chunks/5081.js +3 -3
  350. package/app/.next-cli-build/server/chunks/7774.js +3 -3
  351. package/app/.next-cli-build/server/chunks/827.js +1 -1
  352. package/app/.next-cli-build/server/chunks/869.js +1 -1
  353. package/app/.next-cli-build/server/chunks/8847.js +1 -1
  354. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  355. package/app/.next-cli-build/server/chunks/929.js +1 -1
  356. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  357. package/app/.next-cli-build/server/pages/404.html +1 -1
  358. package/app/.next-cli-build/server/pages/500.html +1 -1
  359. package/app/.next-cli-build/static/cD3pFdT6n4G5mYZR7aUfv/_buildManifest.js +1 -0
  360. package/app/.next-cli-build/static/chunks/{1321-d0af01c8bba9082f.js → 1321-5d17d8d43b4df31b.js} +1 -1
  361. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-0319f017545b934c.js → page-6a13560e1eea7384.js} +1 -1
  362. package/app/.next-cli-build/static/chunks/app/_global-error/{page-256447868dbe97af.js → page-ca86ec079e205789.js} +1 -1
  363. package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-256447868dbe97af.js → route-ca86ec079e205789.js} +1 -1
  364. package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-256447868dbe97af.js → route-ca86ec079e205789.js} +1 -1
  365. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-256447868dbe97af.js → route-ca86ec079e205789.js} +1 -1
  366. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ca86ec079e205789.js +1 -0
  367. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ca86ec079e205789.js +1 -0
  368. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-ca86ec079e205789.js +1 -0
  369. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-ca86ec079e205789.js +1 -0
  370. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-ca86ec079e205789.js +1 -0
  371. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-ca86ec079e205789.js +1 -0
  372. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-ca86ec079e205789.js +1 -0
  373. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ca86ec079e205789.js +1 -0
  374. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ca86ec079e205789.js +1 -0
  375. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ca86ec079e205789.js +1 -0
  376. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ca86ec079e205789.js +1 -0
  377. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ca86ec079e205789.js +1 -0
  378. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ca86ec079e205789.js +1 -0
  379. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ca86ec079e205789.js +1 -0
  380. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ca86ec079e205789.js +1 -0
  381. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ca86ec079e205789.js +1 -0
  382. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ca86ec079e205789.js +1 -0
  383. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ca86ec079e205789.js +1 -0
  384. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ca86ec079e205789.js +1 -0
  385. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-ca86ec079e205789.js +1 -0
  386. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ca86ec079e205789.js +1 -0
  387. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-ca86ec079e205789.js +1 -0
  388. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ca86ec079e205789.js +1 -0
  389. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ca86ec079e205789.js +1 -0
  390. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ca86ec079e205789.js +1 -0
  391. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ca86ec079e205789.js +1 -0
  392. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ca86ec079e205789.js +1 -0
  393. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ca86ec079e205789.js +1 -0
  394. package/app/.next-cli-build/static/chunks/app/api/combos/route-ca86ec079e205789.js +1 -0
  395. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-ca86ec079e205789.js +1 -0
  396. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-ca86ec079e205789.js +1 -0
  397. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-ca86ec079e205789.js +1 -0
  398. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-ca86ec079e205789.js +1 -0
  399. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-ca86ec079e205789.js +1 -0
  400. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-ca86ec079e205789.js +1 -0
  401. package/app/.next-cli-build/static/chunks/app/api/health/route-ca86ec079e205789.js +1 -0
  402. package/app/.next-cli-build/static/chunks/app/api/init/route-ca86ec079e205789.js +1 -0
  403. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ca86ec079e205789.js +1 -0
  404. package/app/.next-cli-build/static/chunks/app/api/keys/route-ca86ec079e205789.js +1 -0
  405. package/app/.next-cli-build/static/chunks/app/api/locale/route-ca86ec079e205789.js +1 -0
  406. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ca86ec079e205789.js +1 -0
  407. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ca86ec079e205789.js +1 -0
  408. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ca86ec079e205789.js +1 -0
  409. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ca86ec079e205789.js +1 -0
  410. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ca86ec079e205789.js +1 -0
  411. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ca86ec079e205789.js +1 -0
  412. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ca86ec079e205789.js +1 -0
  413. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ca86ec079e205789.js +1 -0
  414. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ca86ec079e205789.js +1 -0
  415. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-ca86ec079e205789.js +1 -0
  416. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ca86ec079e205789.js +1 -0
  417. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ca86ec079e205789.js +1 -0
  418. package/app/.next-cli-build/static/chunks/app/api/models/route-ca86ec079e205789.js +1 -0
  419. package/app/.next-cli-build/static/chunks/app/api/models/test/route-ca86ec079e205789.js +1 -0
  420. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ca86ec079e205789.js +1 -0
  421. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-ca86ec079e205789.js +1 -0
  422. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ca86ec079e205789.js +1 -0
  423. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ca86ec079e205789.js +1 -0
  424. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ca86ec079e205789.js +1 -0
  425. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ca86ec079e205789.js +1 -0
  426. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-ca86ec079e205789.js +1 -0
  427. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ca86ec079e205789.js +1 -0
  428. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-ca86ec079e205789.js +1 -0
  429. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ca86ec079e205789.js +1 -0
  430. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ca86ec079e205789.js +1 -0
  431. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-ca86ec079e205789.js +1 -0
  432. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ca86ec079e205789.js +1 -0
  433. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ca86ec079e205789.js +1 -0
  434. package/app/.next-cli-build/static/chunks/app/api/pricing/route-ca86ec079e205789.js +1 -0
  435. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ca86ec079e205789.js +1 -0
  436. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ca86ec079e205789.js +1 -0
  437. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ca86ec079e205789.js +1 -0
  438. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ca86ec079e205789.js +1 -0
  439. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ca86ec079e205789.js +1 -0
  440. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ca86ec079e205789.js +1 -0
  441. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ca86ec079e205789.js +1 -0
  442. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ca86ec079e205789.js +1 -0
  443. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ca86ec079e205789.js +1 -0
  444. package/app/.next-cli-build/static/chunks/app/api/providers/route-ca86ec079e205789.js +1 -0
  445. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ca86ec079e205789.js +1 -0
  446. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ca86ec079e205789.js +1 -0
  447. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ca86ec079e205789.js +1 -0
  448. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ca86ec079e205789.js +1 -0
  449. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ca86ec079e205789.js +1 -0
  450. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ca86ec079e205789.js +1 -0
  451. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ca86ec079e205789.js +1 -0
  452. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ca86ec079e205789.js +1 -0
  453. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ca86ec079e205789.js +1 -0
  454. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-ca86ec079e205789.js +1 -0
  455. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-ca86ec079e205789.js +1 -0
  456. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-ca86ec079e205789.js +1 -0
  457. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-ca86ec079e205789.js +1 -0
  458. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-ca86ec079e205789.js +1 -0
  459. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-ca86ec079e205789.js +1 -0
  460. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-ca86ec079e205789.js +1 -0
  461. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-ca86ec079e205789.js +1 -0
  462. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ca86ec079e205789.js +1 -0
  463. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ca86ec079e205789.js +1 -0
  464. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ca86ec079e205789.js +1 -0
  465. package/app/.next-cli-build/static/chunks/app/api/settings/route-ca86ec079e205789.js +1 -0
  466. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ca86ec079e205789.js +1 -0
  467. package/app/.next-cli-build/static/chunks/app/api/tags/route-ca86ec079e205789.js +1 -0
  468. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ca86ec079e205789.js +1 -0
  469. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ca86ec079e205789.js +1 -0
  470. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ca86ec079e205789.js +1 -0
  471. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ca86ec079e205789.js +1 -0
  472. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ca86ec079e205789.js +1 -0
  473. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ca86ec079e205789.js +1 -0
  474. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ca86ec079e205789.js +1 -0
  475. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ca86ec079e205789.js +1 -0
  476. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ca86ec079e205789.js +1 -0
  477. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ca86ec079e205789.js +1 -0
  478. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ca86ec079e205789.js +1 -0
  479. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ca86ec079e205789.js +1 -0
  480. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ca86ec079e205789.js +1 -0
  481. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-ca86ec079e205789.js +1 -0
  482. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ca86ec079e205789.js +1 -0
  483. package/app/.next-cli-build/static/chunks/app/api/usage/backup/route-ca86ec079e205789.js +1 -0
  484. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ca86ec079e205789.js +1 -0
  485. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ca86ec079e205789.js +1 -0
  486. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-ca86ec079e205789.js +1 -0
  487. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ca86ec079e205789.js +1 -0
  488. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ca86ec079e205789.js +1 -0
  489. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ca86ec079e205789.js +1 -0
  490. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ca86ec079e205789.js +1 -0
  491. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ca86ec079e205789.js +1 -0
  492. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ca86ec079e205789.js +1 -0
  493. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ca86ec079e205789.js +1 -0
  494. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ca86ec079e205789.js +1 -0
  495. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ca86ec079e205789.js +1 -0
  496. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ca86ec079e205789.js +1 -0
  497. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ca86ec079e205789.js +1 -0
  498. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ca86ec079e205789.js +1 -0
  499. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ca86ec079e205789.js +1 -0
  500. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ca86ec079e205789.js +1 -0
  501. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ca86ec079e205789.js +1 -0
  502. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ca86ec079e205789.js +1 -0
  503. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ca86ec079e205789.js +1 -0
  504. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ca86ec079e205789.js +1 -0
  505. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ca86ec079e205789.js +1 -0
  506. package/app/.next-cli-build/static/chunks/app/api/v1/route-ca86ec079e205789.js +1 -0
  507. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ca86ec079e205789.js +1 -0
  508. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-ca86ec079e205789.js +1 -0
  509. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-ca86ec079e205789.js +1 -0
  510. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-ca86ec079e205789.js +1 -0
  511. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-ca86ec079e205789.js +1 -0
  512. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ca86ec079e205789.js +1 -0
  513. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ca86ec079e205789.js +1 -0
  514. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ca86ec079e205789.js +1 -0
  515. package/app/.next-cli-build/static/chunks/app/api/version/route-ca86ec079e205789.js +1 -0
  516. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ca86ec079e205789.js +1 -0
  517. package/app/.next-cli-build/static/chunks/app/api/version/update/route-ca86ec079e205789.js +1 -0
  518. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ca86ec079e205789.js +1 -0
  519. package/app/.next-cli-build/static/chunks/app/page-ca86ec079e205789.js +1 -0
  520. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ca86ec079e205789.js +1 -0
  521. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ca86ec079e205789.js +1 -0
  522. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ca86ec079e205789.js +1 -0
  523. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ca86ec079e205789.js +1 -0
  524. package/app/.next-cli-build/static/css/96f54341495650be.css +1 -0
  525. package/app/cli/.build-home/AppData/Roaming/9router/db/data.sqlite-shm +0 -0
  526. package/app/cli/.build-home/AppData/Roaming/9router/db/data.sqlite-wal +0 -0
  527. package/app/package.json +1 -1
  528. package/package.json +1 -1
  529. package/app/.next-cli-build/static/G3egWYC3nXjvY6pge_VJ1/_buildManifest.js +0 -1
  530. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-256447868dbe97af.js +0 -1
  531. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-256447868dbe97af.js +0 -1
  532. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-256447868dbe97af.js +0 -1
  533. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-256447868dbe97af.js +0 -1
  534. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-256447868dbe97af.js +0 -1
  535. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-256447868dbe97af.js +0 -1
  536. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-256447868dbe97af.js +0 -1
  537. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-256447868dbe97af.js +0 -1
  538. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-256447868dbe97af.js +0 -1
  539. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-256447868dbe97af.js +0 -1
  540. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-256447868dbe97af.js +0 -1
  541. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-256447868dbe97af.js +0 -1
  542. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-256447868dbe97af.js +0 -1
  543. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-256447868dbe97af.js +0 -1
  544. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-256447868dbe97af.js +0 -1
  545. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-256447868dbe97af.js +0 -1
  546. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-256447868dbe97af.js +0 -1
  547. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-256447868dbe97af.js +0 -1
  548. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-256447868dbe97af.js +0 -1
  549. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-256447868dbe97af.js +0 -1
  550. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-256447868dbe97af.js +0 -1
  551. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-256447868dbe97af.js +0 -1
  552. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-256447868dbe97af.js +0 -1
  553. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-256447868dbe97af.js +0 -1
  554. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-256447868dbe97af.js +0 -1
  555. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-256447868dbe97af.js +0 -1
  556. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-256447868dbe97af.js +0 -1
  557. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-256447868dbe97af.js +0 -1
  558. package/app/.next-cli-build/static/chunks/app/api/combos/route-256447868dbe97af.js +0 -1
  559. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-256447868dbe97af.js +0 -1
  560. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-256447868dbe97af.js +0 -1
  561. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-256447868dbe97af.js +0 -1
  562. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-256447868dbe97af.js +0 -1
  563. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-256447868dbe97af.js +0 -1
  564. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-256447868dbe97af.js +0 -1
  565. package/app/.next-cli-build/static/chunks/app/api/health/route-256447868dbe97af.js +0 -1
  566. package/app/.next-cli-build/static/chunks/app/api/init/route-256447868dbe97af.js +0 -1
  567. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-256447868dbe97af.js +0 -1
  568. package/app/.next-cli-build/static/chunks/app/api/keys/route-256447868dbe97af.js +0 -1
  569. package/app/.next-cli-build/static/chunks/app/api/locale/route-256447868dbe97af.js +0 -1
  570. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-256447868dbe97af.js +0 -1
  571. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-256447868dbe97af.js +0 -1
  572. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-256447868dbe97af.js +0 -1
  573. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-256447868dbe97af.js +0 -1
  574. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-256447868dbe97af.js +0 -1
  575. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-256447868dbe97af.js +0 -1
  576. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-256447868dbe97af.js +0 -1
  577. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-256447868dbe97af.js +0 -1
  578. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-256447868dbe97af.js +0 -1
  579. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-256447868dbe97af.js +0 -1
  580. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-256447868dbe97af.js +0 -1
  581. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-256447868dbe97af.js +0 -1
  582. package/app/.next-cli-build/static/chunks/app/api/models/route-256447868dbe97af.js +0 -1
  583. package/app/.next-cli-build/static/chunks/app/api/models/test/route-256447868dbe97af.js +0 -1
  584. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-256447868dbe97af.js +0 -1
  585. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-256447868dbe97af.js +0 -1
  586. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-256447868dbe97af.js +0 -1
  587. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-256447868dbe97af.js +0 -1
  588. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-256447868dbe97af.js +0 -1
  589. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-256447868dbe97af.js +0 -1
  590. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-256447868dbe97af.js +0 -1
  591. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-256447868dbe97af.js +0 -1
  592. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-256447868dbe97af.js +0 -1
  593. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-256447868dbe97af.js +0 -1
  594. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-256447868dbe97af.js +0 -1
  595. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-256447868dbe97af.js +0 -1
  596. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-256447868dbe97af.js +0 -1
  597. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-256447868dbe97af.js +0 -1
  598. package/app/.next-cli-build/static/chunks/app/api/pricing/route-256447868dbe97af.js +0 -1
  599. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-256447868dbe97af.js +0 -1
  600. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-256447868dbe97af.js +0 -1
  601. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-256447868dbe97af.js +0 -1
  602. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-256447868dbe97af.js +0 -1
  603. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-256447868dbe97af.js +0 -1
  604. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-256447868dbe97af.js +0 -1
  605. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-256447868dbe97af.js +0 -1
  606. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-256447868dbe97af.js +0 -1
  607. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-256447868dbe97af.js +0 -1
  608. package/app/.next-cli-build/static/chunks/app/api/providers/route-256447868dbe97af.js +0 -1
  609. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-256447868dbe97af.js +0 -1
  610. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-256447868dbe97af.js +0 -1
  611. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-256447868dbe97af.js +0 -1
  612. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-256447868dbe97af.js +0 -1
  613. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-256447868dbe97af.js +0 -1
  614. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-256447868dbe97af.js +0 -1
  615. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-256447868dbe97af.js +0 -1
  616. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-256447868dbe97af.js +0 -1
  617. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-256447868dbe97af.js +0 -1
  618. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-256447868dbe97af.js +0 -1
  619. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-256447868dbe97af.js +0 -1
  620. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-256447868dbe97af.js +0 -1
  621. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-256447868dbe97af.js +0 -1
  622. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-256447868dbe97af.js +0 -1
  623. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-256447868dbe97af.js +0 -1
  624. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-256447868dbe97af.js +0 -1
  625. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-256447868dbe97af.js +0 -1
  626. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-256447868dbe97af.js +0 -1
  627. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-256447868dbe97af.js +0 -1
  628. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-256447868dbe97af.js +0 -1
  629. package/app/.next-cli-build/static/chunks/app/api/settings/route-256447868dbe97af.js +0 -1
  630. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-256447868dbe97af.js +0 -1
  631. package/app/.next-cli-build/static/chunks/app/api/tags/route-256447868dbe97af.js +0 -1
  632. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-256447868dbe97af.js +0 -1
  633. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-256447868dbe97af.js +0 -1
  634. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-256447868dbe97af.js +0 -1
  635. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-256447868dbe97af.js +0 -1
  636. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-256447868dbe97af.js +0 -1
  637. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-256447868dbe97af.js +0 -1
  638. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-256447868dbe97af.js +0 -1
  639. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-256447868dbe97af.js +0 -1
  640. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-256447868dbe97af.js +0 -1
  641. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-256447868dbe97af.js +0 -1
  642. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-256447868dbe97af.js +0 -1
  643. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-256447868dbe97af.js +0 -1
  644. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-256447868dbe97af.js +0 -1
  645. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-256447868dbe97af.js +0 -1
  646. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-256447868dbe97af.js +0 -1
  647. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-256447868dbe97af.js +0 -1
  648. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-256447868dbe97af.js +0 -1
  649. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-256447868dbe97af.js +0 -1
  650. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-256447868dbe97af.js +0 -1
  651. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-256447868dbe97af.js +0 -1
  652. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-256447868dbe97af.js +0 -1
  653. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-256447868dbe97af.js +0 -1
  654. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-256447868dbe97af.js +0 -1
  655. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-256447868dbe97af.js +0 -1
  656. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-256447868dbe97af.js +0 -1
  657. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-256447868dbe97af.js +0 -1
  658. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-256447868dbe97af.js +0 -1
  659. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-256447868dbe97af.js +0 -1
  660. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-256447868dbe97af.js +0 -1
  661. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-256447868dbe97af.js +0 -1
  662. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-256447868dbe97af.js +0 -1
  663. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-256447868dbe97af.js +0 -1
  664. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-256447868dbe97af.js +0 -1
  665. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-256447868dbe97af.js +0 -1
  666. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-256447868dbe97af.js +0 -1
  667. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-256447868dbe97af.js +0 -1
  668. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-256447868dbe97af.js +0 -1
  669. package/app/.next-cli-build/static/chunks/app/api/v1/route-256447868dbe97af.js +0 -1
  670. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-256447868dbe97af.js +0 -1
  671. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-256447868dbe97af.js +0 -1
  672. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-256447868dbe97af.js +0 -1
  673. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-256447868dbe97af.js +0 -1
  674. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-256447868dbe97af.js +0 -1
  675. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-256447868dbe97af.js +0 -1
  676. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-256447868dbe97af.js +0 -1
  677. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-256447868dbe97af.js +0 -1
  678. package/app/.next-cli-build/static/chunks/app/api/version/route-256447868dbe97af.js +0 -1
  679. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-256447868dbe97af.js +0 -1
  680. package/app/.next-cli-build/static/chunks/app/api/version/update/route-256447868dbe97af.js +0 -1
  681. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-256447868dbe97af.js +0 -1
  682. package/app/.next-cli-build/static/chunks/app/page-256447868dbe97af.js +0 -1
  683. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-256447868dbe97af.js +0 -1
  684. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-256447868dbe97af.js +0 -1
  685. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-256447868dbe97af.js +0 -1
  686. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-256447868dbe97af.js +0 -1
  687. package/app/.next-cli-build/static/css/8d6b4f6966f869e3.css +0 -1
  688. /package/app/.next-cli-build/static/{G3egWYC3nXjvY6pge_VJ1 → cD3pFdT6n4G5mYZR7aUfv}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{var a={};a.id=7758,a.ids=[7758],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7985:(a,b,c)=>{c.d(b,{Jm:()=>e,N:()=>k,eI:()=>f,eW:()=>h,mH:()=>j,uZ:()=>n,wu:()=>l,x7:()=>m});var d=c(15081);function e(a){if(!a||"string"!=typeof a)return"";let b=a.replace(/-----BEGIN CERTIFICATE-----/gi,"").replace(/-----END CERTIFICATE-----/gi,"").replace(/[^A-Za-z0-9+/=]/g,"");if(!b)return"";let c=b.match(/.{1,64}/g)||[];return`-----BEGIN CERTIFICATE-----
2
2
  ${c.join("\n")}
3
- -----END CERTIFICATE-----`}function f(a){return!!(a?.samlEntryPoint&&a?.samlCert)}function g(a){return(a||"").replace(/\/+$/,"")}function h(a,b){let c=(b?.baseUrl||"").trim()||process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(c)return g(c);if(a){let b=a?.headers?.get?.("x-forwarded-proto")||"",c=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(c){let d=(b||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${d}://${c}`.replace(/\/+$/,"")}if(a.url)return g(new URL(a.url).origin)}return"http://localhost:20128"}function i(a,b){let c=e(a?.samlCert||"")||"-----BEGIN CERTIFICATE-----\nMIIC...DUMMY...\n-----END CERTIFICATE-----",f=`${b}/api/auth/saml/acs`;return new d.Qb({entryPoint:a?.samlEntryPoint||"https://example.com/sso",issuer:a?.samlIssuer||"urn:9router:sp",idpCert:c,cert:c,callbackUrl:f,acceptedClockSkewMs:6e4,wantAssertionsSigned:!0,validateInResponseTo:"never",requestIdExpirationMs:288e5})}async function j(a,b){let c=h(a,b),d=i(b,c),e=await d.generateAuthorizeRequestAsync(!1,!1),f=e.match(/ID="([^"]+)"/),g=f?f[1]:"";return{authorizeUrl:await d._requestToUrlAsync(e,null,"authorize",{}),requestId:g}}async function k(a,b,c,d){if(!d?.samlCert)throw Error("IdP X.509 Certificate (samlCert) is missing or not configured");let e=h(a,d),f=i(d,e),g=("object"==typeof b&&null!==b?b:{SAMLResponse:b}).SAMLResponse;if(!g)throw Error("Missing SAMLResponse parameter in assertion POST body");if(c){let a=Buffer.from(g,"base64").toString("utf8").match(/InResponseTo=["']([^"']+)["']/i),b=a?a[1]:null;if(!b||b!==c)throw Error(`InResponseTo mismatch: expected ${c}, received ${b||"none"}`)}let j=await f.validatePostResponseAsync({SAMLResponse:g});return j?.profile||j}function l(a,b){return i(b,a).generateServiceProviderMetadata()}function m(a={},b={}){if(!a)return"";let c=b.samlAttributeEmail;if(c&&a[c]){let b=a[c];return Array.isArray(b)?b[0]:String(b)}let d=["email","emailAddress","mail","nameID","nameId","upn","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"];for(let b of d)if(a[b]){let c=a[b];return Array.isArray(c)?c[0]:String(c)}if(a.attributes){for(let b of d)if(a.attributes[b]){let c=a.attributes[b];return Array.isArray(c)?c[0]:String(c)}}return""}function n(a={},b={}){if(!a)return"";let c=b.samlAttributeName;if(c&&a[c]){let b=a[c];return Array.isArray(b)?b[0]:String(b)}for(let b of["displayName","name","cn","commonName","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"])if(a[b]){let c=a[b];return Array.isArray(c)?c[0]:String(c)}if(a.givenName||a.sn||a.surname){let b=a.givenName||"",c=a.sn||a.surname||"",d=`${b} ${c}`.trim();if(d)return d}return m(a,b)}c(42655)},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},8303:(a,b,c)=>{c.d(b,{B3:()=>k,T1:()=>l,im:()=>j,sv:()=>i});var d=c(48645);let e=[3e4,12e4,6e5,18e5],f=new Map;function g(){return Date.now()}function h(a){let b=f.get(a);return b?b.lastFailAt&&g()-b.lastFailAt>36e5&&(!b.lockUntil||g()>=b.lockUntil)?(f.delete(a),null):b:null}function i(a){let b=h(a);if(!b||!b.lockUntil)return{locked:!1};let c=b.lockUntil-g();return c<=0?{locked:!1}:{locked:!0,retryAfter:Math.ceil(c/1e3)}}function j(a){let b=h(a)||{fails:0,lockUntil:0,lockLevel:0,lastFailAt:0};if(b.fails+=1,b.lastFailAt=g(),b.fails>=5){let a=e[Math.min(b.lockLevel,e.length-1)];b.lockUntil=g()+a,b.lockLevel+=1,b.fails=0}return f.set(a,b),{remainingBeforeLock:Math.max(0,5-b.fails)}}function k(a){f.delete(a)}function l(a){if((0,d.M)(a)){let b=a.headers.get("x-9r-real-ip");if(b)return b}if("true"===process.env.TRUST_PROXY){let b=a.headers.get("x-forwarded-for");if(b)return b.split(",")[0].trim()}return"unknown"}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11723:a=>{a.exports=require("querystring")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28313:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/login/route",pathname:"/api/auth/login",filename:"route",bundlePath:"app/api/auth/login/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\login\\route.js",nextConfigOutput:"standalone",userland:()=>c(87644),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},48645:(a,b,c)=>{c.d(b,{M:()=>d});function d(a){let b=process.env.NINEROUTER_PEER_TOKEN;return!!b&&a.headers.get("x-9r-peer-token")===b}},54603:(a,b,c)=>{c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66136:a=>{a.exports=require("timers")},68658:(a,b,c)=>{c.d(b,{v5:()=>j}),c(23211);var d=c(89718),e=c(54603),f=c(33792),g=c(48645);let h=new Set(["localhost","127.0.0.1","::1"]);function i(a){if(!a)return!1;let b=String(a).trim().toLowerCase();if(b.startsWith("[")){let a=b.indexOf("]");if(-1===a)return!1;b=b.slice(1,a)}else -1!==b.indexOf(":")&&b.indexOf(":")===b.lastIndexOf(":")&&(b=b.slice(0,b.indexOf(":")));return b.startsWith("::ffff:")&&(b=b.slice(7)),h.has(b)}function j(a){if(a.headers.get("x-9r-via-proxy")||!((0,g.M)(a)&&i(a.headers.get("x-9r-real-ip"))))return!1;let b=a.headers.get("origin");if(b)try{if(!i(new URL(b).hostname))return!1}catch{return!1}return!0}},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},87644:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>o});var d=c(23211),e=c(89718),f=c(34013),g=c(65573),h=c(33792),i=c(30906),j=c(7985),k=c(8303),l=c(68658);let m="Forgot password? Reset to default via 9Router CLI → Settings → Reset Password to Default.",n={"Cache-Control":"no-store"};async function o(a){try{let b,c,o,p=(0,k.T1)(a),q=(0,k.sv)(p);if(q.locked)return d.NextResponse.json({error:`Too many failed attempts. Try again in ${q.retryAfter}s. ${m}`,retryAfter:q.retryAfter,resetHint:m},{status:429,headers:{"Retry-After":String(q.retryAfter)}});let{password:r}=await a.json(),s=await (0,e.mt)();if(b=(a.headers.get("host")||"").split(":")[0].toLowerCase(),c=s.tunnelUrl?new URL(s.tunnelUrl).hostname.toLowerCase():"",o=s.tailscaleUrl?new URL(s.tailscaleUrl).hostname.toLowerCase():"",(c&&b===c||o&&b===o)&&!0!==s.tunnelDashboardAccess)return d.NextResponse.json({error:"Dashboard access via tunnel is disabled"},{status:403});let t=s.password;if("sso"===s.authMode||"saml"===s.authMode||"oidc"===s.authMode){let a=s.ssoType||("saml"===s.authMode?"saml":"oidc");if("saml"===a&&(0,j.eI)(s))return d.NextResponse.json({error:"Password login is disabled. Use SAML SSO sign in."},{status:403});if("oidc"===a&&(0,i.EJ)(s))return d.NextResponse.json({error:"Password login is disabled. Use OIDC sign in."},{status:403})}let u=!1;if(t)u=await f.Ay.compare(r,t);else{let a=process.env.INITIAL_PASSWORD||"123456";u=r===a}if(u){(0,k.B3)(p);let b=!t&&!process.env.INITIAL_PASSWORD&&!(0,l.v5)(a);if(b)return d.NextResponse.json({success:!1,error:"Default password must be changed before remote access. Change it from the local machine (or set INITIAL_PASSWORD).",mustChangePassword:b},{status:403,headers:n});let c=await (0,g.UL)();return await (0,h.tm)(c,a),d.NextResponse.json({success:!0,mustChangePassword:!1},{headers:n})}let{remainingBeforeLock:v}=(0,k.im)(p),w=(0,k.sv)(p);if(w.locked)return d.NextResponse.json({error:`Too many failed attempts. Try again in ${w.retryAfter}s. ${m}`,retryAfter:w.retryAfter,resetHint:m},{status:429,headers:{"Retry-After":String(w.retryAfter)}});return d.NextResponse.json({error:`Invalid password. ${v} attempt(s) left before lockout.`,remainingBeforeLock:v},{status:401})}catch(a){return d.NextResponse.json({error:a.message},{status:500})}}},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,5081,4293,4884],()=>b(b.s=28313));module.exports=c})();
3
+ -----END CERTIFICATE-----`}function f(a){return!!(a?.samlEntryPoint&&a?.samlCert)}function g(a){return(a||"").replace(/\/+$/,"")}function h(a,b){let c=(b?.baseUrl||"").trim()||process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(c)return g(c);if(a){let b=a?.headers?.get?.("x-forwarded-proto")||"",c=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(c){let d=(b||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${d}://${c}`.replace(/\/+$/,"")}if(a.url)return g(new URL(a.url).origin)}return"http://localhost:20128"}function i(a,b){let c=e(a?.samlCert||"")||"-----BEGIN CERTIFICATE-----\nMIIC...DUMMY...\n-----END CERTIFICATE-----",f=`${b}/api/auth/saml/acs`;return new d.Qb({entryPoint:a?.samlEntryPoint||"https://example.com/sso",issuer:a?.samlIssuer||"urn:9router:sp",idpCert:c,cert:c,callbackUrl:f,acceptedClockSkewMs:6e4,wantAssertionsSigned:!0,validateInResponseTo:"never",requestIdExpirationMs:288e5})}async function j(a,b){let c=h(a,b),d=i(b,c),e=await d.generateAuthorizeRequestAsync(!1,!1),f=e.match(/ID="([^"]+)"/),g=f?f[1]:"";return{authorizeUrl:await d._requestToUrlAsync(e,null,"authorize",{}),requestId:g}}async function k(a,b,c,d){if(!d?.samlCert)throw Error("IdP X.509 Certificate (samlCert) is missing or not configured");let e=h(a,d),f=i(d,e),g=("object"==typeof b&&null!==b?b:{SAMLResponse:b}).SAMLResponse;if(!g)throw Error("Missing SAMLResponse parameter in assertion POST body");if(c){let a=Buffer.from(g,"base64").toString("utf8").match(/InResponseTo=["']([^"']+)["']/i),b=a?a[1]:null;if(!b||b!==c)throw Error(`InResponseTo mismatch: expected ${c}, received ${b||"none"}`)}let j=await f.validatePostResponseAsync({SAMLResponse:g});return j?.profile||j}function l(a,b){return i(b,a).generateServiceProviderMetadata()}function m(a={},b={}){if(!a)return"";let c=b.samlAttributeEmail;if(c&&a[c]){let b=a[c];return Array.isArray(b)?b[0]:String(b)}let d=["email","emailAddress","mail","nameID","nameId","upn","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"];for(let b of d)if(a[b]){let c=a[b];return Array.isArray(c)?c[0]:String(c)}if(a.attributes){for(let b of d)if(a.attributes[b]){let c=a.attributes[b];return Array.isArray(c)?c[0]:String(c)}}return""}function n(a={},b={}){if(!a)return"";let c=b.samlAttributeName;if(c&&a[c]){let b=a[c];return Array.isArray(b)?b[0]:String(b)}for(let b of["displayName","name","cn","commonName","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"])if(a[b]){let c=a[b];return Array.isArray(c)?c[0]:String(c)}if(a.givenName||a.sn||a.surname){let b=a.givenName||"",c=a.sn||a.surname||"",d=`${b} ${c}`.trim();if(d)return d}return m(a,b)}c(42655)},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},8303:(a,b,c)=>{c.d(b,{B3:()=>k,T1:()=>l,im:()=>j,sv:()=>i});var d=c(48645);let e=[3e4,12e4,6e5,18e5],f=new Map;function g(){return Date.now()}function h(a){let b=f.get(a);return b?b.lastFailAt&&g()-b.lastFailAt>36e5&&(!b.lockUntil||g()>=b.lockUntil)?(f.delete(a),null):b:null}function i(a){let b=h(a);if(!b||!b.lockUntil)return{locked:!1};let c=b.lockUntil-g();return c<=0?{locked:!1}:{locked:!0,retryAfter:Math.ceil(c/1e3)}}function j(a){let b=h(a)||{fails:0,lockUntil:0,lockLevel:0,lastFailAt:0};if(b.fails+=1,b.lastFailAt=g(),b.fails>=5){let a=e[Math.min(b.lockLevel,e.length-1)];b.lockUntil=g()+a,b.lockLevel+=1,b.fails=0}return f.set(a,b),{remainingBeforeLock:Math.max(0,5-b.fails)}}function k(a){f.delete(a)}function l(a){if((0,d.M)(a)){let b=a.headers.get("x-9r-real-ip");if(b)return b}if("true"===process.env.TRUST_PROXY){let b=a.headers.get("x-forwarded-for");if(b)return b.split(",")[0].trim()}return"unknown"}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11723:a=>{a.exports=require("querystring")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},48645:(a,b,c)=>{c.d(b,{M:()=>d});function d(a){let b=process.env.NINEROUTER_PEER_TOKEN;return!!b&&a.headers.get("x-9r-peer-token")===b}},54603:(a,b,c)=>{c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},55511:a=>{a.exports=require("crypto")},56941:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/login/route",pathname:"/api/auth/login",filename:"route",bundlePath:"app/api/auth/login/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\login\\route.js",nextConfigOutput:"standalone",userland:()=>c(87644),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66136:a=>{a.exports=require("timers")},68658:(a,b,c)=>{c.d(b,{v5:()=>j}),c(23211);var d=c(89718),e=c(54603),f=c(33792),g=c(48645);let h=new Set(["localhost","127.0.0.1","::1"]);function i(a){if(!a)return!1;let b=String(a).trim().toLowerCase();if(b.startsWith("[")){let a=b.indexOf("]");if(-1===a)return!1;b=b.slice(1,a)}else -1!==b.indexOf(":")&&b.indexOf(":")===b.lastIndexOf(":")&&(b=b.slice(0,b.indexOf(":")));return b.startsWith("::ffff:")&&(b=b.slice(7)),h.has(b)}function j(a){if(a.headers.get("x-9r-via-proxy")||!((0,g.M)(a)&&i(a.headers.get("x-9r-real-ip"))))return!1;let b=a.headers.get("origin");if(b)try{if(!i(new URL(b).hostname))return!1}catch{return!1}return!0}},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},87644:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>o});var d=c(23211),e=c(89718),f=c(34013),g=c(65573),h=c(33792),i=c(30906),j=c(7985),k=c(8303),l=c(68658);let m="Forgot password? Reset to default via 9Router CLI → Settings → Reset Password to Default.",n={"Cache-Control":"no-store"};async function o(a){try{let b,c,o,p=(0,k.T1)(a),q=(0,k.sv)(p);if(q.locked)return d.NextResponse.json({error:`Too many failed attempts. Try again in ${q.retryAfter}s. ${m}`,retryAfter:q.retryAfter,resetHint:m},{status:429,headers:{"Retry-After":String(q.retryAfter)}});let{password:r}=await a.json(),s=await (0,e.mt)();if(b=(a.headers.get("host")||"").split(":")[0].toLowerCase(),c=s.tunnelUrl?new URL(s.tunnelUrl).hostname.toLowerCase():"",o=s.tailscaleUrl?new URL(s.tailscaleUrl).hostname.toLowerCase():"",(c&&b===c||o&&b===o)&&!0!==s.tunnelDashboardAccess)return d.NextResponse.json({error:"Dashboard access via tunnel is disabled"},{status:403});let t=s.password;if("sso"===s.authMode||"saml"===s.authMode||"oidc"===s.authMode){let a=s.ssoType||("saml"===s.authMode?"saml":"oidc");if("saml"===a&&(0,j.eI)(s))return d.NextResponse.json({error:"Password login is disabled. Use SAML SSO sign in."},{status:403});if("oidc"===a&&(0,i.EJ)(s))return d.NextResponse.json({error:"Password login is disabled. Use OIDC sign in."},{status:403})}let u=!1;if(t)u=await f.Ay.compare(r,t);else{let a=process.env.INITIAL_PASSWORD||"123456";u=r===a}if(u){(0,k.B3)(p);let b=!t&&!process.env.INITIAL_PASSWORD&&!(0,l.v5)(a);if(b)return d.NextResponse.json({success:!1,error:"Default password must be changed before remote access. Change it from the local machine (or set INITIAL_PASSWORD).",mustChangePassword:b},{status:403,headers:n});let c=await (0,g.UL)();return await (0,h.tm)(c,a),d.NextResponse.json({success:!0,mustChangePassword:!1},{headers:n})}let{remainingBeforeLock:v}=(0,k.im)(p),w=(0,k.sv)(p);if(w.locked)return d.NextResponse.json({error:`Too many failed attempts. Try again in ${w.retryAfter}s. ${m}`,retryAfter:w.retryAfter,resetHint:m},{status:429,headers:{"Retry-After":String(w.retryAfter)}});return d.NextResponse.json({error:`Invalid password. ${v} attempt(s) left before lockout.`,remainingBeforeLock:v},{status:401})}catch(a){return d.NextResponse.json({error:a.message},{status:500})}}},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,5081,4293,4884],()=>b(b.s=56941));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=8489,a.ids=[8489],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},61843:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/logout/route",pathname:"/api/auth/logout",filename:"route",bundlePath:"app/api/auth/logout/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\logout\\route.js",nextConfigOutput:"standalone",userland:()=>c(83723),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},83723:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>g});var d=c(23211),e=c(65573),f=c(33792);async function g(){let a=await (0,e.UL)();return(0,f.OZ)(a),a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier"),d.NextResponse.json({success:!0},{headers:{"Cache-Control":"no-store"}})}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=61843));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=8489,a.ids=[8489],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14499:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/logout/route",pathname:"/api/auth/logout",filename:"route",bundlePath:"app/api/auth/logout/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\logout\\route.js",nextConfigOutput:"standalone",userland:()=>c(83723),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},83723:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>g});var d=c(23211),e=c(65573),f=c(33792);async function g(){let a=await (0,e.UL)();return(0,f.OZ)(a),a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier"),d.NextResponse.json({success:!0},{headers:{"Cache-Control":"no-store"}})}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=14499));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=4674,a.ids=[4674],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},32821:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/oidc/callback/route",pathname:"/api/auth/oidc/callback",filename:"route",bundlePath:"app/api/auth/oidc/callback/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\oidc\\callback\\route.js",nextConfigOutput:"standalone",userland:()=>c(34932),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/callback/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},34932:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>i});var d=c(23211),e=c(65573),f=c(30906),g=c(33792);function h(a){a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier")}async function i(a){let b=new URL(a.url),c=b.searchParams.get("error");if(c)return d.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(c)}`,(0,f.iw)(a)));let i=b.searchParams.get("code"),j=b.searchParams.get("state");if(!i||!j)return d.NextResponse.redirect(new URL("/login?error=oidc_missing_code",(0,f.iw)(a)));let k=await (0,e.UL)(),l=k.get("oidc_state")?.value,m=k.get("oidc_nonce")?.value,n=k.get("oidc_code_verifier")?.value;if(!l||!m||!n||l!==j)return h(k),d.NextResponse.redirect(new URL("/login?error=oidc_invalid_state",(0,f.iw)(a)));try{let b=await (0,f.Mj)();if(!b)return h(k),d.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,f.iw)(a)));let c=await (0,f.Ir)(b.issuerUrl),e=c.issuer||b.issuerUrl,j=`${(0,f.iw)(a)}/api/auth/oidc/callback`,l=await (0,f.sP)({tokenEndpoint:c.token_endpoint,clientId:b.clientId,clientSecret:b.clientSecret,code:i,redirectUri:j,codeVerifier:n});if(!l.id_token)throw Error("OIDC provider did not return an id_token");let o=await (0,f.x8)({idToken:l.id_token,issuer:e,audience:b.clientId,jwksUri:c.jwks_uri,nonce:m});return h(k),await (0,g.tm)(k,a,{oidc:!0,oidcSub:o.sub||null,oidcEmail:(0,f.Rj)(o)||null,oidcName:(0,f.Ui)(o)}),d.NextResponse.redirect(new URL("/dashboard",(0,f.iw)(a)))}catch(b){return h(k),d.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_callback_failed")}`,(0,f.iw)(a)))}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=32821));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=4674,a.ids=[4674],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5105:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/oidc/callback/route",pathname:"/api/auth/oidc/callback",filename:"route",bundlePath:"app/api/auth/oidc/callback/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\oidc\\callback\\route.js",nextConfigOutput:"standalone",userland:()=>c(34932),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/callback/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},34932:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>i});var d=c(23211),e=c(65573),f=c(30906),g=c(33792);function h(a){a.delete("oidc_state"),a.delete("oidc_nonce"),a.delete("oidc_code_verifier")}async function i(a){let b=new URL(a.url),c=b.searchParams.get("error");if(c)return d.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(c)}`,(0,f.iw)(a)));let i=b.searchParams.get("code"),j=b.searchParams.get("state");if(!i||!j)return d.NextResponse.redirect(new URL("/login?error=oidc_missing_code",(0,f.iw)(a)));let k=await (0,e.UL)(),l=k.get("oidc_state")?.value,m=k.get("oidc_nonce")?.value,n=k.get("oidc_code_verifier")?.value;if(!l||!m||!n||l!==j)return h(k),d.NextResponse.redirect(new URL("/login?error=oidc_invalid_state",(0,f.iw)(a)));try{let b=await (0,f.Mj)();if(!b)return h(k),d.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,f.iw)(a)));let c=await (0,f.Ir)(b.issuerUrl),e=c.issuer||b.issuerUrl,j=`${(0,f.iw)(a)}/api/auth/oidc/callback`,l=await (0,f.sP)({tokenEndpoint:c.token_endpoint,clientId:b.clientId,clientSecret:b.clientSecret,code:i,redirectUri:j,codeVerifier:n});if(!l.id_token)throw Error("OIDC provider did not return an id_token");let o=await (0,f.x8)({idToken:l.id_token,issuer:e,audience:b.clientId,jwksUri:c.jwks_uri,nonce:m});return h(k),await (0,g.tm)(k,a,{oidc:!0,oidcSub:o.sub||null,oidcEmail:(0,f.Rj)(o)||null,oidcName:(0,f.Ui)(o)}),d.NextResponse.redirect(new URL("/dashboard",(0,f.iw)(a)))}catch(b){return h(k),d.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_callback_failed")}`,(0,f.iw)(a)))}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=5105));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=9709,a.ids=[9709],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10631:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/oidc/start/route",pathname:"/api/auth/oidc/start",filename:"route",bundlePath:"app/api/auth/oidc/start/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\oidc\\start\\route.js",nextConfigOutput:"standalone",userland:()=>c(24503),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/start/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},24503:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>h});var d=c(23211),e=c(65573),f=c(30906),g=c(33792);async function h(a){try{let b=await (0,f.Mj)();if(!b)return d.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,f.iw)(a)));let c=await (0,f.Ir)(b.issuerUrl),h=(0,f.Pf)(),i=(0,f.hT)(),{verifier:j,challenge:k}=(0,f.GY)(),l=`${(0,f.iw)(a)}/api/auth/oidc/callback`,m=(0,f.gR)({authorizationEndpoint:c.authorization_endpoint,clientId:b.clientId,redirectUri:l,scopes:b.scopes,state:h,nonce:i,codeChallenge:k}),n=await (0,e.UL)(),o={httpOnly:!0,secure:(0,g.YK)(a),sameSite:"lax",path:"/",maxAge:600};return n.set("oidc_state",h,o),n.set("oidc_nonce",i,o),n.set("oidc_code_verifier",j,o),d.NextResponse.redirect(m)}catch(b){return d.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_start_failed")}`,(0,f.iw)(a)))}}},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=10631));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=9709,a.ids=[9709],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},24223:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/oidc/start/route",pathname:"/api/auth/oidc/start",filename:"route",bundlePath:"app/api/auth/oidc/start/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\oidc\\start\\route.js",nextConfigOutput:"standalone",userland:()=>c(24503),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/start/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},24503:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>h});var d=c(23211),e=c(65573),f=c(30906),g=c(33792);async function h(a){try{let b=await (0,f.Mj)();if(!b)return d.NextResponse.redirect(new URL("/login?error=oidc_not_configured",(0,f.iw)(a)));let c=await (0,f.Ir)(b.issuerUrl),h=(0,f.Pf)(),i=(0,f.hT)(),{verifier:j,challenge:k}=(0,f.GY)(),l=`${(0,f.iw)(a)}/api/auth/oidc/callback`,m=(0,f.gR)({authorizationEndpoint:c.authorization_endpoint,clientId:b.clientId,redirectUri:l,scopes:b.scopes,state:h,nonce:i,codeChallenge:k}),n=await (0,e.UL)(),o={httpOnly:!0,secure:(0,g.YK)(a),sameSite:"lax",path:"/",maxAge:600};return n.set("oidc_state",h,o),n.set("oidc_nonce",i,o),n.set("oidc_code_verifier",j,o),d.NextResponse.redirect(m)}catch(b){return d.NextResponse.redirect(new URL(`/login?error=${encodeURIComponent(b.message||"oidc_start_failed")}`,(0,f.iw)(a)))}}},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=24223));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=6091,a.ids=[6091],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},55807:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>j});var d=c(23211),e=c(65573),f=c(89718),g=c(30906),h=c(33792);async function i(){if(!1===(await (0,f.mt)()).requireLogin)return!0;let a=await (0,e.UL)(),b=a.get("auth_token")?.value;return await (0,h.Dc)(b)}async function j(a){try{if(!await i())return d.NextResponse.json({error:"Unauthorized"},{status:401});let b=await a.json().catch(()=>({})),c=await (0,f.mt)(),e=String(b.issuerUrl||c.oidcIssuerUrl||"").trim(),h=String(b.clientId||c.oidcClientId||"").trim(),j=String(b.scopes||c.oidcScopes||"openid profile email").trim()||"openid profile email",k=String(Object.prototype.hasOwnProperty.call(b,"clientSecret")?b.clientSecret:c.oidcClientSecret||"").trim();if(!e)return d.NextResponse.json({error:"Issuer URL is required"},{status:400});if(!h)return d.NextResponse.json({error:"Client ID is required"},{status:400});let l=await (0,g.Ir)(e),m=`${(0,g.iw)(a)}/api/auth/oidc/callback`,n=await (0,g.HO)({tokenEndpoint:l.token_endpoint,clientId:h,clientSecret:k,redirectUri:m});if(n.tested&&!1===n.valid)return d.NextResponse.json({ok:!1,discoveryOk:!0,clientSecretTested:!0,clientSecretValid:!1,issuerUrl:e,clientId:h,scopes:j,redirectUri:m,authorizationEndpoint:l.authorization_endpoint||"",tokenEndpoint:l.token_endpoint||"",jwksUri:l.jwks_uri||"",error:`Discovery loaded, but the client secret is not valid: ${n.message}`});return d.NextResponse.json({ok:!0,discoveryOk:!0,clientSecretTested:n.tested,clientSecretValid:n.valid,issuerUrl:e,clientId:h,scopes:j,redirectUri:m,authorizationEndpoint:l.authorization_endpoint||"",tokenEndpoint:l.token_endpoint||"",jwksUri:l.jwks_uri||"",message:n.message})}catch(a){return d.NextResponse.json({error:a.message||"OIDC test failed"},{status:500})}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},87825:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/oidc/test/route",pathname:"/api/auth/oidc/test",filename:"route",bundlePath:"app/api/auth/oidc/test/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\oidc\\test\\route.js",nextConfigOutput:"standalone",userland:()=>c(55807),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/test/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=87825));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=6091,a.ids=[6091],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17509:(a,b,c)=>{c.d(b,{V:()=>o});var d=c(91356),e=c(80700),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(44893),k=c(69052);async function l(a,b,c){let l,{protected:m,header:n,payload:o}=a,p={};if(m&&(p=(0,h.OX)(m,f.Ye,"JWS Protected Header is invalid")),void 0!==n){if(!(0,i.fz)(p,n))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");l={...p,...n}}else l=p;let q=(0,j.nI)(f.Ye,j.qc,b[1],p,l),r=!0;if(q.includes("b64")&&"boolean"!=typeof(r=p.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=l;if("string"!=typeof s||!s)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(s))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(r){if("string"!=typeof o)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof o&&!(o instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let t=!1;"function"==typeof c&&(c=await c(p,a),t=!0);let u=(0,e.q)(s),v=(0,g.xW)(void 0!==m?(0,g.lF)(m):new Uint8Array,(0,g.lF)("."),"string"==typeof o?r?b[2]??=(0,h.Fo)(o,"payload",f.Ye):g.Rd.encode(o):o),w=(0,h.h2)(a.signature,"signature",f.Ye),x=await (0,k.d)(u,c,"verify");if(!await (0,d.M)(u,x,w,v))throw new f.h2;return[r?(0,h.h2)(o,"payload",f.Ye):"string"==typeof o?g.Rd.encode(o):o,p,r,x,t]}async function m(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");return l({payload:e,protected:d,signature:h},b,c)}var n=c(17347);async function o(a,b,c){let d=await m(a,[c&&(0,j.Fw)("algorithms",c.algorithms),c?.crit],b);if(!d[2])throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,n.k6)(d[1],d[0],c),protectedHeader:d[1]};return"function"==typeof b?{...e,key:d[3]}:e}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30906:(a,b,c)=>{let d;c.d(b,{gR:()=>E,hT:()=>D,Pf:()=>C,GY:()=>B,sP:()=>F,Ir:()=>A,Mj:()=>z,iw:()=>x,EJ:()=>y,Ui:()=>I,Rj:()=>J,HO:()=>G,x8:()=>H});var e=c(77598),f=c.n(e),g=c(99129),h=c(88783),i=c(80700),j=c(19035);class k{#a;#b=new WeakMap;constructor(a){if(!function(a){if(!a||"object"!=typeof a)return!1;let{keys:b}=a;return Array.isArray(b)&&b.every(j.Gv)}(a))throw new g.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},e=function(a){let b="string"==typeof a?i.p[a]:void 0;if(!b||b.secret)throw new g.T0('Unsupported "alg" value for a JSON Web Key Set');return b}(c),f=this.#a.keys.filter(a=>e.kty.includes(a.kty)&&("string"!=typeof d||d===a.kid)&&("string"!=typeof a.alg&&"AKP"!==a.kty||c===a.alg)&&("string"!=typeof a.use||"sig"===a.use)&&(!Array.isArray(a.key_ops)||a.key_ops.includes("verify"))&&(!e.crv||a.crv===e.crv)),{0:h,length:j}=f;if(0===j)throw new g.BT;if(1!==j){let a=new g.$4,b=this.#b;throw a[Symbol.asyncIterator]=async function*(){for(let a of f)try{yield await l(b,a,e)}catch{}},a}return l(this.#b,h,e)}}async function l(a,b,c){let d=a.get(b)||a.set(b,{__proto__:null}).get(b);if(void 0===d[c.alg]){let a=await (0,h.x)(c,{...b,alg:c.alg,ext:!0});if("public"!==a.type)throw new g.Dm("JSON Web Key Set members must be public keys");d[c.alg]=a}return d[c.alg]}function m(a){let b=new k(a),c=async(a,c)=>b.getKey(a,c);return Object.defineProperty(c,"jwks",{value:()=>structuredClone(b.jwks())}),c}("u"<typeof navigator||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(d="jose/v6.2.8");let n=Symbol();async function o(a,b,c,d=fetch){let e=await d(a,{method:"GET",signal:c,redirect:"manual",headers:b}).catch(a=>{if("TimeoutError"===a.name)throw new g.xb;throw a});if(200!==e.status)throw new g.i4("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await e.json()}catch{throw new g.i4("Failed to parse the JSON Web Key Set HTTP response as JSON")}}let p=Symbol();class q{#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);const c=b??{};this.#d="number"==typeof c.timeoutDuration?c.timeoutDuration:5e3,this.#e="number"==typeof c.cooldownDuration?c.cooldownDuration:3e4,this.#f="number"==typeof c.cacheMaxAge?c.cacheMaxAge:6e5,this.#i=new Headers(c.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=c[n];const e=c[p];void 0!==e&&(this.#l=e,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,j.Gv)(a.jwks)&&!!Array.isArray(a.jwks.keys)&&!!Array.prototype.every.call(a.jwks.keys,j.Gv)}(e,this.#f)&&(this.#g=this.#l.uat,this.#k=m(this.#l.jwks)))}pendingFetch(){return!!this.#h}#m(a){return"number"==typeof this.#g&&Date.now()<this.#g+a}coolingDown(){return this.#m(this.#e)}fresh(){return this.#m(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 g.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||=o(this.#c.href,this.#i,AbortSignal.timeout(this.#d),this.#j).then(a=>{this.#k=m(a),this.#l&&(this.#l.uat=Date.now(),this.#l.jwks=a),this.#g=Date.now()}).finally(()=>{this.#h=void 0}),await this.#h}}var r=c(17509),s=c(89718);let t="openid profile email",u="Sign in with OIDC";function v(a){return(a||"").trim().replace(/\/+$/,"")}function w(a){return(a||t).trim()||t}function x(a){let b=process.env.BASE_URL||process.env.NEXT_PUBLIC_BASE_URL||"";if(b)return v(b);let c=a?.headers?.get?.("x-forwarded-proto")||"",d=a?.headers?.get?.("x-forwarded-host")||a?.headers?.get?.("host")||"";if(d){let b=(c||new URL(a.url).protocol||"http:").replace(/:$/,"");return`${b}://${d}`.replace(/\/+$/,"")}return v(new URL(a.url).origin)}function y(a){return!!(v(a?.oidcIssuerUrl)&&(a?.oidcClientId||"").trim()&&(a?.oidcClientSecret||"").trim())}async function z(){let a=await (0,s.mt)();return["oidc","both"].includes(a.authMode)&&y(a)?{issuerUrl:v(a.oidcIssuerUrl),clientId:a.oidcClientId.trim(),clientSecret:a.oidcClientSecret.trim(),scopes:w(a.oidcScopes),loginLabel:(a.oidcLoginLabel||u).trim()||u}:null}async function A(a){let b=`${v(a)}/.well-known/openid-configuration`,c=await fetch(b,{cache:"no-store"});if(!c.ok)throw Error(`Failed to load OIDC discovery document from ${b}`);return await c.json()}function B(){let a=f().randomBytes(32).toString("base64url"),b=f().createHash("sha256").update(a).digest("base64url");return{verifier:a,challenge:b}}function C(){return f().randomBytes(16).toString("base64url")}function D(){return f().randomBytes(16).toString("base64url")}function E({authorizationEndpoint:a,clientId:b,redirectUri:c,scopes:d=t,state:e,nonce:f,codeChallenge:g}){let h=new URL(a);return h.searchParams.set("response_type","code"),h.searchParams.set("client_id",b),h.searchParams.set("redirect_uri",c),h.searchParams.set("scope",w(d)),h.searchParams.set("state",e),h.searchParams.set("nonce",f),h.searchParams.set("code_challenge",g),h.searchParams.set("code_challenge_method","S256"),h.toString()}async function F({tokenEndpoint:a,clientId:b,clientSecret:c,code:d,redirectUri:e,codeVerifier:f}){let g=new URLSearchParams({grant_type:"authorization_code",client_id:b,code:d,redirect_uri:e,code_verifier:f});c&&g.set("client_secret",c);let h=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g}),i=await h.json().catch(()=>({}));if(!h.ok)throw Error(i?.error_description||i?.error||`OIDC token exchange failed (${h.status})`);return i}async function G({tokenEndpoint:a,clientId:b,clientSecret:c,redirectUri:d}){if(!c)return{tested:!1,valid:null,message:"No client secret was provided, so secret validation was skipped."};let e=new URLSearchParams({grant_type:"authorization_code",client_id:b,client_secret:c,code:"__oidc_test_invalid_code__",redirect_uri:d,code_verifier:"__oidc_test_invalid_verifier__"}),f=await fetch(a,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}),g=await f.json().catch(()=>({})),h=(g?.error||"").toLowerCase(),i=g?.error_description||g?.error||"";return f.ok?{tested:!0,valid:!0,message:"Client secret was accepted by the token endpoint.",raw:g}:"invalid_client"===h||"unauthorized_client"===h||/client.*(invalid|failed|mismatch)/i.test(i)?{tested:!0,valid:!1,message:i||"Client secret is not valid.",raw:g}:"invalid_grant"===h||"invalid_code"===h||/grant|code/i.test(i)?{tested:!0,valid:!0,message:"Client secret was accepted; the token exchange failed only because the test authorization code is invalid.",raw:g}:{tested:!0,valid:null,message:i||`Token endpoint responded with ${f.status}`,raw:g}}async function H({idToken:a,issuer:b,audience:c,jwksUri:d,nonce:e}){let f,g,h=(f=new q(new URL(d),void 0),Object.defineProperties(g=async(a,b)=>f.getKey(a,b),{coolingDown:{get:()=>f.coolingDown(),enumerable:!0},fresh:{get:()=>f.fresh(),enumerable:!0},reload:{value:()=>f.reload(),enumerable:!0},reloading:{get:()=>f.pendingFetch(),enumerable:!0},jwks:{value:()=>f.jwks(),enumerable:!0}}),g),{payload:i}=await (0,r.V)(a,h,{issuer:b,audience:c,nonce:e});return i}function I(a={}){return a.preferred_username||a.email||a.name||a.given_name||a.sub||"OIDC user"}function J(a={}){return a.email||""}},33792:(a,b,c)=>{c.d(b,{Dc:()=>r,OZ:()=>u,YK:()=>p,dY:()=>s,nz:()=>v,tm:()=>t});var d=c(84433),e=c(17509),f=c(34013),g=c(73024),h=c.n(g),i=c(76760),j=c.n(i),k=c(77598),l=c.n(k),m=c(49120),n=c(89718);let o=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=j().join(m.n,"jwt-secret");try{return h().readFileSync(a,"utf8").trim()}catch{}h().mkdirSync(m.n,{recursive:!0});let b=l().randomBytes(32).toString("hex");return h().writeFileSync(a,b,{mode:384}),b}());function p(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function q(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(o)}async function r(a){if(!a)return!1;try{return await (0,e.V)(a,o),!0}catch{return!1}}async function s(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,o);return b}catch{return null}}async function t(a,b,c={}){let d=await q(c);a.set("auth_token",d,{httpOnly:!0,secure:p(b),sameSite:"lax",path:"/"})}function u(a){a.delete("auth_token")}async function v(a){if("string"!=typeof a||!a)return!1;let b=await (0,n.mt)(),c=b?.password;return c?f.Ay.compare(a,c):a===(process.env.INITIAL_PASSWORD||"123456")}},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},55511:a=>{a.exports=require("crypto")},55807:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>j});var d=c(23211),e=c(65573),f=c(89718),g=c(30906),h=c(33792);async function i(){if(!1===(await (0,f.mt)()).requireLogin)return!0;let a=await (0,e.UL)(),b=a.get("auth_token")?.value;return await (0,h.Dc)(b)}async function j(a){try{if(!await i())return d.NextResponse.json({error:"Unauthorized"},{status:401});let b=await a.json().catch(()=>({})),c=await (0,f.mt)(),e=String(b.issuerUrl||c.oidcIssuerUrl||"").trim(),h=String(b.clientId||c.oidcClientId||"").trim(),j=String(b.scopes||c.oidcScopes||"openid profile email").trim()||"openid profile email",k=String(Object.prototype.hasOwnProperty.call(b,"clientSecret")?b.clientSecret:c.oidcClientSecret||"").trim();if(!e)return d.NextResponse.json({error:"Issuer URL is required"},{status:400});if(!h)return d.NextResponse.json({error:"Client ID is required"},{status:400});let l=await (0,g.Ir)(e),m=`${(0,g.iw)(a)}/api/auth/oidc/callback`,n=await (0,g.HO)({tokenEndpoint:l.token_endpoint,clientId:h,clientSecret:k,redirectUri:m});if(n.tested&&!1===n.valid)return d.NextResponse.json({ok:!1,discoveryOk:!0,clientSecretTested:!0,clientSecretValid:!1,issuerUrl:e,clientId:h,scopes:j,redirectUri:m,authorizationEndpoint:l.authorization_endpoint||"",tokenEndpoint:l.token_endpoint||"",jwksUri:l.jwks_uri||"",error:`Discovery loaded, but the client secret is not valid: ${n.message}`});return d.NextResponse.json({ok:!0,discoveryOk:!0,clientSecretTested:n.tested,clientSecretValid:n.valid,issuerUrl:e,clientId:h,scopes:j,redirectUri:m,authorizationEndpoint:l.authorization_endpoint||"",tokenEndpoint:l.token_endpoint||"",jwksUri:l.jwks_uri||"",message:n.message})}catch(a){return d.NextResponse.json({error:a.message||"OIDC test failed"},{status:500})}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(9248)},94213:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/oidc/test/route",pathname:"/api/auth/oidc/test",filename:"route",bundlePath:"app/api/auth/oidc/test/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"C:\\Users\\Developer\\9router-fix\\src\\app\\api\\auth\\oidc\\test\\route.js",nextConfigOutput:"standalone",userland:()=>c(55807),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/oidc/test/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,2391,4433,5573,4884],()=>b(b.s=94213));module.exports=c})();