@yina-npm/openrouterx 0.5.9 → 0.5.10

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 (137) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +4 -4
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/keys/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/keys/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/users/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/users/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.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_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/user/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/user/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  49. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  50. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  51. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  52. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  53. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  54. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  55. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  56. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  58. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  59. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  60. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  61. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  62. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  63. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  64. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  65. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  66. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  67. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  68. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  69. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  70. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/callback.html +1 -1
  72. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  73. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  74. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  75. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  76. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  81. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  82. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  83. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  85. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/index.html +1 -1
  91. package/app/.next-cli-build/server/app/index.rsc +4 -4
  92. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  94. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  96. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  98. package/app/.next-cli-build/server/app/landing.html +1 -1
  99. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  100. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  101. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  103. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/login.html +1 -1
  108. package/app/.next-cli-build/server/app/login.rsc +5 -5
  109. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  110. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  112. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  114. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  115. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  116. package/app/.next-cli-build/server/app-paths-manifest.json +4 -4
  117. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  118. package/app/.next-cli-build/server/chunks/3412.js +1 -1
  119. package/app/.next-cli-build/server/chunks/412.js +1 -1
  120. package/app/.next-cli-build/server/chunks/5816.js +1 -1
  121. package/app/.next-cli-build/server/chunks/6151.js +1 -1
  122. package/app/.next-cli-build/server/chunks/6688.js +1 -1
  123. package/app/.next-cli-build/server/chunks/7259.js +1 -1
  124. package/app/.next-cli-build/server/chunks/7937.js +1 -1
  125. package/app/.next-cli-build/server/chunks/801.js +1 -1
  126. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  127. package/app/.next-cli-build/server/pages/404.html +1 -1
  128. package/app/.next-cli-build/server/pages/500.html +1 -1
  129. package/app/.next-cli-build/static/chunks/{1321-dbbab49aa820c76b.js → 1321-7d926378b0f39749.js} +1 -1
  130. package/app/.next-cli-build/static/chunks/{5497-215b48f00706d2c8.js → 5497-53b71597ca1b53f8.js} +5 -5
  131. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-929ab76c6137174e.js +1 -0
  132. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-b38e9f02aacbdcc5.js → layout-8151b85461a99f83.js} +1 -1
  133. package/app/package.json +1 -1
  134. package/package.json +1 -1
  135. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-95bd9413da0d98a6.js +0 -1
  136. /package/app/.next-cli-build/static/{Z1O3mWLKLCkJm5SRaYg62 → DLZR81Hq9OqOrl2Xc2iHn}/_buildManifest.js +0 -0
  137. /package/app/.next-cli-build/static/{Z1O3mWLKLCkJm5SRaYg62 → DLZR81Hq9OqOrl2Xc2iHn}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- (()=>{var a={};a.id=3826,a.ids=[3826],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},962:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/McpMarketplaceModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/McpMarketplaceModal.js","default")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},2422:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/UsageStats.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/UsageStats.js","default")},3080:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/OAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/OAuthModal.js","default")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},4996:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/CapacityBadges.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/CapacityBadges.js","default")},5843:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/NoAuthProxyCard.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/NoAuthProxyCard.js","default")},7066:a=>{"use strict";a.exports=require("node:tty")},7290:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Card.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Card.js","default")},10079:(a,b,c)=>{"use strict";c.d(b,{ConfirmModal:()=>f,default:()=>e});var d=c(77943);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Modal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Modal.js","default"),f=(0,d.registerClientReference)(function(){throw Error("Attempted to call ConfirmModal() from the server but ConfirmModal is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Modal.js","ConfirmModal")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},14285:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroOAuthWrapper.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroOAuthWrapper.js","default")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},16736:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/app/(dashboard)/dashboard/quota/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/app/(dashboard)/dashboard/quota/page.js","default")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},18200:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomEmbeddingModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomEmbeddingModal.js","default")},18421:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Tooltip.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Tooltip.js","default")},19083:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/RequestLogger.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/RequestLogger.js","default")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20493:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ComboFormModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ComboFormModal.js","default")},21820:a=>{"use strict";a.exports=require("os")},26288:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomImageModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomImageModal.js","default")},26626:(a,b,c)=>{Promise.resolve().then(c.bind(c,18200)),Promise.resolve().then(c.bind(c,26288)),Promise.resolve().then(c.bind(c,70061)),Promise.resolve().then(c.bind(c,33893)),Promise.resolve().then(c.bind(c,45512)),Promise.resolve().then(c.bind(c,4996)),Promise.resolve().then(c.bind(c,7290)),Promise.resolve().then(c.bind(c,33811)),Promise.resolve().then(c.bind(c,20493)),Promise.resolve().then(c.bind(c,40167)),Promise.resolve().then(c.bind(c,70139)),Promise.resolve().then(c.bind(c,49123)),Promise.resolve().then(c.bind(c,64148)),Promise.resolve().then(c.bind(c,92669)),Promise.resolve().then(c.bind(c,29354)),Promise.resolve().then(c.bind(c,80342)),Promise.resolve().then(c.bind(c,71230)),Promise.resolve().then(c.bind(c,82448)),Promise.resolve().then(c.bind(c,14285)),Promise.resolve().then(c.bind(c,87228)),Promise.resolve().then(c.bind(c,45205)),Promise.resolve().then(c.bind(c,64420)),Promise.resolve().then(c.bind(c,61780)),Promise.resolve().then(c.bind(c,92082)),Promise.resolve().then(c.bind(c,70603)),Promise.resolve().then(c.bind(c,962)),Promise.resolve().then(c.bind(c,10079)),Promise.resolve().then(c.bind(c,94582)),Promise.resolve().then(c.bind(c,29674)),Promise.resolve().then(c.bind(c,5843)),Promise.resolve().then(c.bind(c,3080)),Promise.resolve().then(c.bind(c,81923)),Promise.resolve().then(c.bind(c,19083)),Promise.resolve().then(c.bind(c,54065)),Promise.resolve().then(c.bind(c,83784)),Promise.resolve().then(c.bind(c,26866)),Promise.resolve().then(c.bind(c,89886)),Promise.resolve().then(c.bind(c,40515)),Promise.resolve().then(c.bind(c,70092)),Promise.resolve().then(c.bind(c,18421)),Promise.resolve().then(c.bind(c,2422)),Promise.resolve().then(c.bind(c,76978))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},26866:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Sidebar.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Sidebar.js","default")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29354:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/HeaderMenu.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/HeaderMenu.js","default")},29674:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/NineRemoteButton.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/NineRemoteButton.js","default")},30508:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>j});var d=c(5735),e=c(65573);c(45512),c(71230),c(83784),c(7290),c(10079),c(92082),c(70061),c(33893),c(70092),c(40515),c(89886),c(26866),c(92669),c(49123),c(3080),c(94582),c(70603),c(20493),c(962),c(2422),c(45205),c(29674),c(29354),c(33811),c(19083),c(82448),c(14285),c(87228),c(40167),c(80342),c(64148),c(70139),c(18200),c(26288),c(5843),c(54065),c(18421),c(81923),c(4996);var f=c(61780);c(64420);var g=c(76978),h=c(33792);async function i(){try{let a=await (0,e.UL)(),b=a.get("auth_token")?.value;if(!b)return null;let c=await (0,h.dY)(b);if(!c)return null;return{role:c.role||null,userId:c.userId||null,displayName:c.displayName||null}}catch{return null}}async function j({children:a}){let b=await i();return(0,d.jsx)(g.UserRoleProvider,{role:b?.role,userId:b?.userId,displayName:b?.displayName,children:(0,d.jsx)(f.default,{children:a})})}},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33811:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ChangelogModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ChangelogModal.js","default")},33873:a=>{"use strict";a.exports=require("path")},33893:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Badge.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Badge.js","default")},34589:a=>{"use strict";a.exports=require("node:assert")},34631:a=>{"use strict";a.exports=require("tls")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40167:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/CursorAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/CursorAuthModal.js","default")},40515:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ThemeToggle.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ThemeToggle.js","default")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},44778:(a,b,c)=>{Promise.resolve().then(c.bind(c,67738)),Promise.resolve().then(c.bind(c,7913)),Promise.resolve().then(c.bind(c,25919)),Promise.resolve().then(c.bind(c,75171)),Promise.resolve().then(c.bind(c,99070)),Promise.resolve().then(c.bind(c,38930)),Promise.resolve().then(c.bind(c,17660)),Promise.resolve().then(c.bind(c,11229)),Promise.resolve().then(c.bind(c,62727)),Promise.resolve().then(c.bind(c,51109)),Promise.resolve().then(c.bind(c,51585)),Promise.resolve().then(c.bind(c,48781)),Promise.resolve().then(c.bind(c,43182)),Promise.resolve().then(c.bind(c,32456)),Promise.resolve().then(c.bind(c,3236)),Promise.resolve().then(c.bind(c,79488)),Promise.resolve().then(c.bind(c,83552)),Promise.resolve().then(c.bind(c,8590)),Promise.resolve().then(c.bind(c,5291)),Promise.resolve().then(c.bind(c,56110)),Promise.resolve().then(c.bind(c,267)),Promise.resolve().then(c.bind(c,53838)),Promise.resolve().then(c.bind(c,85306)),Promise.resolve().then(c.bind(c,74812)),Promise.resolve().then(c.bind(c,39645)),Promise.resolve().then(c.bind(c,20084)),Promise.resolve().then(c.bind(c,95145)),Promise.resolve().then(c.bind(c,83352)),Promise.resolve().then(c.bind(c,23048)),Promise.resolve().then(c.bind(c,50585)),Promise.resolve().then(c.bind(c,79346)),Promise.resolve().then(c.bind(c,11633)),Promise.resolve().then(c.bind(c,91809)),Promise.resolve().then(c.bind(c,91099)),Promise.resolve().then(c.bind(c,4770)),Promise.resolve().then(c.bind(c,42196)),Promise.resolve().then(c.bind(c,19308)),Promise.resolve().then(c.bind(c,53845)),Promise.resolve().then(c.bind(c,95514)),Promise.resolve().then(c.bind(c,32971)),Promise.resolve().then(c.bind(c,28403)),Promise.resolve().then(c.bind(c,37900))},45205:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/LanguageSwitcher.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/LanguageSwitcher.js","default")},45512:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Button.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Button.js","default")},46293:a=>{"use strict";a.exports=require("sql.js")},46702:(a,b,c)=>{Promise.resolve().then(c.bind(c,65732))},48161:a=>{"use strict";a.exports=require("node:os")},49123:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Footer.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Footer.js","default")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},54065:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/SegmentedControl.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/SegmentedControl.js","default")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},61780:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/DashboardLayout.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/DashboardLayout.js","default")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64148:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/GitLabAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/GitLabAuthModal.js","default")},64420:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/AuthLayout.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/AuthLayout.js","default")},65732:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>C});var d=c(48249),e=c(67484),f=c(74812),g=c(72738),h=c(77977);let i=[10,20,50,100],j=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],k=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function l(a){return a.name?.trim()||a.email?.trim()||a.displayName?.trim()||null}function m(a,b){let c=b[a.id]?.quotas?.[0];return c&&"number"==typeof c.remaining?c.remaining:1/0}function n(a,b){let c=new Set(b.map(a=>a.id));return Object.fromEntries(Object.entries(a).filter(([a])=>c.has(a)))}async function o(a,b){return await a(b)}function p(a,b){return b&&0!==b?!a||a<0?100:a>=b?0:Math.round((b-a)/b*100):0}function q({quotas:a=[],compact:b=!1,sortMode:c="default",showSortLabel:f=!1}){let[g,h]=(0,e.useState)(1),i=(0,e.useMemo)(()=>a.map((a,b)=>({...a,index:b,remaining:a?.remaining!==void 0?Math.max(0,Math.round(a.remaining)):a?.remainingPercentage!==void 0?Math.round(a.remainingPercentage):p(a?.used,a?.total)})),[a]),j=(0,e.useMemo)(()=>"remaining-asc"===c?[...i].sort((a,b)=>a.remaining-b.remaining||a.name.localeCompare(b.name)):"remaining-desc"===c?[...i].sort((a,b)=>b.remaining-a.remaining||a.name.localeCompare(b.name)):i,[i,c]),k=Math.max(1,Math.ceil(j.length/10));if(!a||0===a.length)return null;let l=j.slice((g-1)*10,10*g),m=0===j.length?0:(g-1)*10+1,n=Math.min(10*g,j.length),o=b?"py-1 px-1.5":"py-2 px-3",r=b?"text-[11px]":"text-sm",s=b?"text-[11px]":"text-sm",t=b?"text-[10px] leading-tight":"text-xs";return(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("div",{className:"text-[10px] text-text-muted",children:[j.length," quota",j.length>1?"s":""]}),f&&(0,d.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsx)("table",{className:"w-full table-fixed text-left",children:(0,d.jsx)("tbody",{children:l.map(a=>{var c;let e=(c=a.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:c>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},f=function(a){if(!a)return"-";try{let b="string"==typeof a?new Date(a):a,c=new Date,d=b-c;if(d<=0)return"-";let e=Math.ceil(d/6e4);if(e<60)return`${e}m`;let f=Math.floor(e/60),g=e%60;if(f<24)return`${f}h ${g}m`;let h=Math.floor(f/24);return`${h}d ${f%24}h ${g}m`}catch(a){return"-"}}(a.resetAt),g=function(a){if(!a)return null;try{let b=new Date(a),c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()),e=new Date(d);e.setDate(e.getDate()+1);let f="";f=b>=d&&b<e?"Today":b>=e&&b<new Date(e.getTime()+864e5)?"Tomorrow":b.toLocaleDateString("en-US",{month:"short",day:"numeric"});let g=b.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${f}, ${g}`}catch{return null}}(a.resetAt);return(0,d.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,d.jsx)("td",{className:`${o} w-[30%]`,children:(0,d.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,d.jsx)("span",{className:"text-[10px] shrink-0",children:e.emoji}),(0,d.jsx)("span",{className:`${r} font-medium text-text-primary truncate`,children:a.name})]})}),(0,d.jsx)("td",{className:`${o} w-[45%]`,children:(0,d.jsxs)("div",{className:b?"space-y-1":"space-y-1.5",children:[(0,d.jsx)("div",{className:`${b?"h-1":"h-1.5"} rounded-full overflow-hidden border ${e.bgLight} ${0===a.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,d.jsx)("div",{className:`h-full transition-all duration-300 ${e.bg}`,style:{width:`${Math.min(a.remaining,100)}%`}})}),(0,d.jsxs)("div",{className:`flex items-center justify-between ${b?"text-[10px]":"text-xs"}`,children:[(0,d.jsxs)("span",{className:"text-text-muted",children:[a.used.toLocaleString()," / ",a.total>0?a.total.toLocaleString():"∞"]}),(0,d.jsxs)("span",{className:`font-medium ${e.text}`,children:[a.remaining,"%"]})]})]})}),(0,d.jsx)("td",{className:`${o} w-[25%]`,children:"-"!==f||g?b?(0,d.jsx)("div",{className:`${s} text-text-primary font-medium truncate`,title:g||"",children:"-"!==f?`in ${f}`:g}):(0,d.jsxs)("div",{className:"space-y-0.5",children:["-"!==f&&(0,d.jsxs)("div",{className:`${s} text-text-primary font-medium`,children:["in ",f]}),g&&(0,d.jsx)("div",{className:`${t} text-text-muted`,children:g})]}):(0,d.jsx)("div",{className:`${s} text-text-muted italic`,children:"N/A"})})]},`${a.name}-${a.index}`)})})})}),k>1&&(0,d.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,d.jsxs)("span",{children:["Showing ",m,"-",n," of ",j.length]}),(0,d.jsxs)("span",{children:["Page ",g," / ",k]})]}),(0,d.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,d.jsx)("button",{type:"button",onClick:()=>h(a=>Math.max(1,a-1)),disabled:1===g,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,d.jsx)("button",{type:"button",onClick:()=>h(a=>Math.min(k,a+1)),disabled:g===k,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var r=c(95514),s=c(32971),t=c(17660),u=c(50412),v=c(92592),w=c(41371),x=c(50377);let y={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"};function z(a){return a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null}function A(a){let b=a.providerSpecificData?.region;if(b)return b;let c=a.providerSpecificData?.profileArn;return("string"==typeof c?c.split(":")[3]:"")||""}function B({readOnly:a=!1,allowCodexActivation:b=!1,gridClassName:c="grid grid-cols-1 md:grid-cols-2 gap-3",activeFirst:f=!1,maxRows:C=null,maxColumns:D=4}){let{copied:E,copy:F}=(0,x.C)(),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)({}),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(!0),[Q,R]=(0,e.useState)({}),[S,T]=(0,e.useState)(null),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(60),[$,_]=(0,e.useState)(!0),[aa,ab]=(0,e.useState)(null),[ac,ad]=(0,e.useState)(null),[ae,af]=(0,e.useState)(null),[ag,ah]=(0,e.useState)(null),[ai,aj]=(0,e.useState)(!1),[ak,al]=(0,e.useState)(null),[am,an]=(0,e.useState)([]),[ao,ap]=(0,e.useState)("all"),[aq,ar]=(0,e.useState)([]),[as,at]=(0,e.useState)("all"),[au,av]=(0,e.useState)("default"),[aw,ax]=(0,e.useState)(!1),[ay,az]=(0,e.useState)(!1),[aA,aB]=(0,e.useState)(!1),[aC,aD]=(0,e.useState)(null),[aE,aF]=(0,e.useState)(1),[aG,aH]=(0,e.useState)(20),[aI,aJ]=(0,e.useState)(String(20)),[aK,aL]=(0,e.useState)({page:1,pageSize:20,total:0,totalPages:1}),[aM,aN]=(0,e.useState)({eligibleConnections:0,providerFilteredConnections:0});(0,e.useRef)(null),(0,e.useRef)(null);let aO=(0,w.i)(),aP=!a||b,aQ=(0,e.useRef)(0),aR=(0,e.useCallback)(async(a=aE)=>{try{var b,c;let d=new URLSearchParams({page:String(a),pageSize:String(aG),accountStatus:as,sort:"priority"});"all"!==ao&&d.set("provider",ao);let e=await fetch(`/api/providers/client?${d.toString()}`);if(!e.ok)throw Error("Failed to fetch connections");let f=await e.json(),g=f.connections||[],h=(b=f.pagination,b||{page:1,pageSize:aG,total:0,totalPages:1}),i=function(a,b=0){return a||{eligibleConnections:b,providerFilteredConnections:b}}(f.totals,g.length);return H(g),ar(f.providerOptions||[]),aL(h),aN(i),aF((c=f.pagination,c?.page||a)),g}catch(a){return console.error("Error fetching connections:",a),H([]),ar([]),aL({page:1,pageSize:aG,total:0,totalPages:1}),aN({eligibleConnections:0,providerFilteredConnections:0}),[]}},[as,aw,aE,aG,ao]),aS=(0,e.useCallback)(async(a,b)=>{L(b=>({...b,[a]:!0})),N(b=>({...b,[a]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${b} (${a})`);let c=await fetch(`/api/usage/${a}`);if(!c.ok){let d=(await c.json().catch(()=>({}))).error||c.statusText;if(404===c.status)return void console.warn(`[ProviderLimits] Connection not found for ${b}, skipping`);if(401===c.status){console.warn(`[ProviderLimits] Auth error for ${b}:`,d);let c={quotas:[],message:d};J(b=>({...b,[a]:c}));return}throw Error(`HTTP ${c.status}: ${d}`)}let d=await c.json();console.log(`[ProviderLimits] Got quota for ${b}:`,d);let e={quotas:function(a,b){if(!b||"object"!=typeof b)return[];let c=[];try{switch(a.toLowerCase()){case"github":default:b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null})});break;case"antigravity":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:b.displayName||a,modelKey:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null,remainingPercentage:b.remainingPercentage})});break;case"codex":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,remaining:b.remaining,resetAt:b.resetAt||null})});break;case"kiro":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null})});break;case"qoder":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{("organization"!==a||b&&0!==(Number(b.total)||0))&&c.push({name:"user"===a?"Personal":"organization"===a?"Organization":a,used:b.used||0,total:b.total||0,unit:b.unit,resetAt:b.resetAt||null})});break;case"claude":b.message?c.push({name:"error",used:0,total:0,resetAt:null,message:b.message}):b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null})});break;case"vercel-ai-gateway":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null,remainingPercentage:b.remainingPercentage})})}}catch(b){return console.error(`Error parsing quota data for ${a}:`,b),[]}let d=(0,h.KC)(a);if(d.length>0){let a=new Map(d.map((a,b)=>[a.id,b]));c.sort((b,c)=>{let d=b.modelKey||b.name,e=c.modelKey||c.name;return(a.get(d)??999)-(a.get(e)??999)})}return c}(b,d),plan:d.plan||null,message:d.message||null,raw:d};J(b=>({...b,[a]:e}))}catch(c){console.error(`[ProviderLimits] Error fetching quota for ${b} (${a}):`,c),N(b=>({...b,[a]:c.message||"Failed to fetch quota"}))}finally{L(b=>({...b,[a]:!1}))}},[]),aT=(0,e.useCallback)(async(a,b)=>{await aS(a,b),T(new Date)},[aS]),aU=(0,e.useCallback)(async(a,b)=>{if("codex"===b&&!ae){af(a),N(b=>({...b,[a]:null}));try{let c=await fetch(`/api/usage/${a}/codex-reset-credits`,{method:"POST"}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.message||d.error||d.code||"Failed to reset Codex limit");await aS(a,b),T(new Date)}catch(b){N(c=>({...c,[a]:b.message||"Failed to reset Codex limit"}))}finally{af(null)}}},[aS,ae]),aV=(0,e.useCallback)(async a=>{if(confirm("Delete this connection?")){ab(a);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&(J(b=>{let c={...b};return delete c[a],c}),L(b=>{let c={...b};return delete c[a],c}),N(b=>{let c={...b};return delete c[a],c}),await o(aR,aE))}catch(a){console.error("Error deleting connection:",a)}finally{ab(null)}}},[aR,aE]),aW=(0,e.useCallback)(async(a,b)=>{ad(a);try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&(J(a=>({...a})),await o(aR,aE))}catch(a){console.error("Error updating connection status:",a)}finally{ad(null)}},[aR,aE]),aX=(0,e.useCallback)(async a=>{if(!ak?.id)return;let b=ak.id,c=ak.provider;try{(await fetch(`/api/providers/${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await aR(),aj(!1),al(null),v.wb.includes(c)&&await aS(b,c))}catch(a){console.error("Error saving connection:",a)}},[ak,aR,aS]),aY=(0,e.useCallback)(async a=>{if(a?.id&&!aC){aD(a.id);try{let b=await fetch("/api/cli-tools/codex-settings/activate-account",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:a.id,restartCodex:!0})}),c=await b.json().catch(()=>({}));if(!b.ok){let a=Array.isArray(c.installHints)&&c.installHints.length>0?c.installHints:c.installCommand?[c.installCommand]:[],b=a.length?`
1
+ (()=>{var a={};a.id=3826,a.ids=[3826],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},962:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/McpMarketplaceModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/McpMarketplaceModal.js","default")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},2422:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/UsageStats.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/UsageStats.js","default")},3080:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/OAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/OAuthModal.js","default")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},4996:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/CapacityBadges.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/CapacityBadges.js","default")},5843:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/NoAuthProxyCard.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/NoAuthProxyCard.js","default")},7066:a=>{"use strict";a.exports=require("node:tty")},7290:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Card.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Card.js","default")},10079:(a,b,c)=>{"use strict";c.d(b,{ConfirmModal:()=>f,default:()=>e});var d=c(77943);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Modal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Modal.js","default"),f=(0,d.registerClientReference)(function(){throw Error("Attempted to call ConfirmModal() from the server but ConfirmModal is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Modal.js","ConfirmModal")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},14285:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroOAuthWrapper.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroOAuthWrapper.js","default")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},16736:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/app/(dashboard)/dashboard/quota/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/app/(dashboard)/dashboard/quota/page.js","default")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},18200:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomEmbeddingModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomEmbeddingModal.js","default")},18421:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Tooltip.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Tooltip.js","default")},19083:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/RequestLogger.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/RequestLogger.js","default")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20493:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ComboFormModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ComboFormModal.js","default")},21820:a=>{"use strict";a.exports=require("os")},26288:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomImageModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/AddCustomImageModal.js","default")},26626:(a,b,c)=>{Promise.resolve().then(c.bind(c,18200)),Promise.resolve().then(c.bind(c,26288)),Promise.resolve().then(c.bind(c,70061)),Promise.resolve().then(c.bind(c,33893)),Promise.resolve().then(c.bind(c,45512)),Promise.resolve().then(c.bind(c,4996)),Promise.resolve().then(c.bind(c,7290)),Promise.resolve().then(c.bind(c,33811)),Promise.resolve().then(c.bind(c,20493)),Promise.resolve().then(c.bind(c,40167)),Promise.resolve().then(c.bind(c,70139)),Promise.resolve().then(c.bind(c,49123)),Promise.resolve().then(c.bind(c,64148)),Promise.resolve().then(c.bind(c,92669)),Promise.resolve().then(c.bind(c,29354)),Promise.resolve().then(c.bind(c,80342)),Promise.resolve().then(c.bind(c,71230)),Promise.resolve().then(c.bind(c,82448)),Promise.resolve().then(c.bind(c,14285)),Promise.resolve().then(c.bind(c,87228)),Promise.resolve().then(c.bind(c,45205)),Promise.resolve().then(c.bind(c,64420)),Promise.resolve().then(c.bind(c,61780)),Promise.resolve().then(c.bind(c,92082)),Promise.resolve().then(c.bind(c,70603)),Promise.resolve().then(c.bind(c,962)),Promise.resolve().then(c.bind(c,10079)),Promise.resolve().then(c.bind(c,94582)),Promise.resolve().then(c.bind(c,29674)),Promise.resolve().then(c.bind(c,5843)),Promise.resolve().then(c.bind(c,3080)),Promise.resolve().then(c.bind(c,81923)),Promise.resolve().then(c.bind(c,19083)),Promise.resolve().then(c.bind(c,54065)),Promise.resolve().then(c.bind(c,83784)),Promise.resolve().then(c.bind(c,26866)),Promise.resolve().then(c.bind(c,89886)),Promise.resolve().then(c.bind(c,40515)),Promise.resolve().then(c.bind(c,70092)),Promise.resolve().then(c.bind(c,18421)),Promise.resolve().then(c.bind(c,2422)),Promise.resolve().then(c.bind(c,76978))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},26866:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Sidebar.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Sidebar.js","default")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29354:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/HeaderMenu.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/HeaderMenu.js","default")},29674:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/NineRemoteButton.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/NineRemoteButton.js","default")},30508:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>j});var d=c(5735),e=c(65573);c(45512),c(71230),c(83784),c(7290),c(10079),c(92082),c(70061),c(33893),c(70092),c(40515),c(89886),c(26866),c(92669),c(49123),c(3080),c(94582),c(70603),c(20493),c(962),c(2422),c(45205),c(29674),c(29354),c(33811),c(19083),c(82448),c(14285),c(87228),c(40167),c(80342),c(64148),c(70139),c(18200),c(26288),c(5843),c(54065),c(18421),c(81923),c(4996);var f=c(61780);c(64420);var g=c(76978),h=c(33792);async function i(){try{let a=await (0,e.UL)(),b=a.get("auth_token")?.value;if(!b)return null;let c=await (0,h.dY)(b);if(!c)return null;return{role:c.role||null,userId:c.userId||null,displayName:c.displayName||null}}catch{return null}}async function j({children:a}){let b=await i();return(0,d.jsx)(g.UserRoleProvider,{role:b?.role,userId:b?.userId,displayName:b?.displayName,children:(0,d.jsx)(f.default,{children:a})})}},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33811:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ChangelogModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ChangelogModal.js","default")},33873:a=>{"use strict";a.exports=require("path")},33893:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Badge.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Badge.js","default")},34589:a=>{"use strict";a.exports=require("node:assert")},34631:a=>{"use strict";a.exports=require("tls")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40167:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/CursorAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/CursorAuthModal.js","default")},40515:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ThemeToggle.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ThemeToggle.js","default")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},44778:(a,b,c)=>{Promise.resolve().then(c.bind(c,67738)),Promise.resolve().then(c.bind(c,31402)),Promise.resolve().then(c.bind(c,25919)),Promise.resolve().then(c.bind(c,75171)),Promise.resolve().then(c.bind(c,99070)),Promise.resolve().then(c.bind(c,38930)),Promise.resolve().then(c.bind(c,17660)),Promise.resolve().then(c.bind(c,11229)),Promise.resolve().then(c.bind(c,62727)),Promise.resolve().then(c.bind(c,51109)),Promise.resolve().then(c.bind(c,51585)),Promise.resolve().then(c.bind(c,48781)),Promise.resolve().then(c.bind(c,43182)),Promise.resolve().then(c.bind(c,32456)),Promise.resolve().then(c.bind(c,3236)),Promise.resolve().then(c.bind(c,79488)),Promise.resolve().then(c.bind(c,83552)),Promise.resolve().then(c.bind(c,8590)),Promise.resolve().then(c.bind(c,5291)),Promise.resolve().then(c.bind(c,56110)),Promise.resolve().then(c.bind(c,267)),Promise.resolve().then(c.bind(c,53838)),Promise.resolve().then(c.bind(c,85306)),Promise.resolve().then(c.bind(c,74812)),Promise.resolve().then(c.bind(c,39645)),Promise.resolve().then(c.bind(c,20084)),Promise.resolve().then(c.bind(c,95145)),Promise.resolve().then(c.bind(c,83352)),Promise.resolve().then(c.bind(c,23048)),Promise.resolve().then(c.bind(c,50585)),Promise.resolve().then(c.bind(c,79346)),Promise.resolve().then(c.bind(c,11633)),Promise.resolve().then(c.bind(c,91809)),Promise.resolve().then(c.bind(c,91099)),Promise.resolve().then(c.bind(c,4770)),Promise.resolve().then(c.bind(c,42196)),Promise.resolve().then(c.bind(c,19308)),Promise.resolve().then(c.bind(c,53845)),Promise.resolve().then(c.bind(c,95514)),Promise.resolve().then(c.bind(c,32971)),Promise.resolve().then(c.bind(c,28403)),Promise.resolve().then(c.bind(c,37900))},45205:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/LanguageSwitcher.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/LanguageSwitcher.js","default")},45512:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Button.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Button.js","default")},46293:a=>{"use strict";a.exports=require("sql.js")},46702:(a,b,c)=>{Promise.resolve().then(c.bind(c,65732))},48161:a=>{"use strict";a.exports=require("node:os")},49123:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Footer.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Footer.js","default")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},54065:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/SegmentedControl.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/SegmentedControl.js","default")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},61780:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/DashboardLayout.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/DashboardLayout.js","default")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64148:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/GitLabAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/GitLabAuthModal.js","default")},64420:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/AuthLayout.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/layouts/AuthLayout.js","default")},65732:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>C});var d=c(48249),e=c(67484),f=c(74812),g=c(72738),h=c(77977);let i=[10,20,50,100],j=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],k=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function l(a){return a.name?.trim()||a.email?.trim()||a.displayName?.trim()||null}function m(a,b){let c=b[a.id]?.quotas?.[0];return c&&"number"==typeof c.remaining?c.remaining:1/0}function n(a,b){let c=new Set(b.map(a=>a.id));return Object.fromEntries(Object.entries(a).filter(([a])=>c.has(a)))}async function o(a,b){return await a(b)}function p(a,b){return b&&0!==b?!a||a<0?100:a>=b?0:Math.round((b-a)/b*100):0}function q({quotas:a=[],compact:b=!1,sortMode:c="default",showSortLabel:f=!1}){let[g,h]=(0,e.useState)(1),i=(0,e.useMemo)(()=>a.map((a,b)=>({...a,index:b,remaining:a?.remaining!==void 0?Math.max(0,Math.round(a.remaining)):a?.remainingPercentage!==void 0?Math.round(a.remainingPercentage):p(a?.used,a?.total)})),[a]),j=(0,e.useMemo)(()=>"remaining-asc"===c?[...i].sort((a,b)=>a.remaining-b.remaining||a.name.localeCompare(b.name)):"remaining-desc"===c?[...i].sort((a,b)=>b.remaining-a.remaining||a.name.localeCompare(b.name)):i,[i,c]),k=Math.max(1,Math.ceil(j.length/10));if(!a||0===a.length)return null;let l=j.slice((g-1)*10,10*g),m=0===j.length?0:(g-1)*10+1,n=Math.min(10*g,j.length),o=b?"py-1 px-1.5":"py-2 px-3",r=b?"text-[11px]":"text-sm",s=b?"text-[11px]":"text-sm",t=b?"text-[10px] leading-tight":"text-xs";return(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("div",{className:"text-[10px] text-text-muted",children:[j.length," quota",j.length>1?"s":""]}),f&&(0,d.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,d.jsx)("div",{className:"overflow-x-auto",children:(0,d.jsx)("table",{className:"w-full table-fixed text-left",children:(0,d.jsx)("tbody",{children:l.map(a=>{var c;let e=(c=a.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:c>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},f=function(a){if(!a)return"-";try{let b="string"==typeof a?new Date(a):a,c=new Date,d=b-c;if(d<=0)return"-";let e=Math.ceil(d/6e4);if(e<60)return`${e}m`;let f=Math.floor(e/60),g=e%60;if(f<24)return`${f}h ${g}m`;let h=Math.floor(f/24);return`${h}d ${f%24}h ${g}m`}catch(a){return"-"}}(a.resetAt),g=function(a){if(!a)return null;try{let b=new Date(a),c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()),e=new Date(d);e.setDate(e.getDate()+1);let f="";f=b>=d&&b<e?"Today":b>=e&&b<new Date(e.getTime()+864e5)?"Tomorrow":b.toLocaleDateString("en-US",{month:"short",day:"numeric"});let g=b.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${f}, ${g}`}catch{return null}}(a.resetAt);return(0,d.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,d.jsx)("td",{className:`${o} w-[30%]`,children:(0,d.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,d.jsx)("span",{className:"text-[10px] shrink-0",children:e.emoji}),(0,d.jsx)("span",{className:`${r} font-medium text-text-primary truncate`,children:a.name})]})}),(0,d.jsx)("td",{className:`${o} w-[45%]`,children:(0,d.jsxs)("div",{className:b?"space-y-1":"space-y-1.5",children:[(0,d.jsx)("div",{className:`${b?"h-1":"h-1.5"} rounded-full overflow-hidden border ${e.bgLight} ${0===a.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,d.jsx)("div",{className:`h-full transition-all duration-300 ${e.bg}`,style:{width:`${Math.min(a.remaining,100)}%`}})}),(0,d.jsxs)("div",{className:`flex items-center justify-between ${b?"text-[10px]":"text-xs"}`,children:[(0,d.jsxs)("span",{className:"text-text-muted",children:[a.used.toLocaleString()," / ",a.total>0?a.total.toLocaleString():"∞"]}),(0,d.jsxs)("span",{className:`font-medium ${e.text}`,children:[a.remaining,"%"]})]})]})}),(0,d.jsx)("td",{className:`${o} w-[25%]`,children:"-"!==f||g?b?(0,d.jsx)("div",{className:`${s} text-text-primary font-medium truncate`,title:g||"",children:"-"!==f?`in ${f}`:g}):(0,d.jsxs)("div",{className:"space-y-0.5",children:["-"!==f&&(0,d.jsxs)("div",{className:`${s} text-text-primary font-medium`,children:["in ",f]}),g&&(0,d.jsx)("div",{className:`${t} text-text-muted`,children:g})]}):(0,d.jsx)("div",{className:`${s} text-text-muted italic`,children:"N/A"})})]},`${a.name}-${a.index}`)})})})}),k>1&&(0,d.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,d.jsxs)("span",{children:["Showing ",m,"-",n," of ",j.length]}),(0,d.jsxs)("span",{children:["Page ",g," / ",k]})]}),(0,d.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,d.jsx)("button",{type:"button",onClick:()=>h(a=>Math.max(1,a-1)),disabled:1===g,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,d.jsx)("button",{type:"button",onClick:()=>h(a=>Math.min(k,a+1)),disabled:g===k,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var r=c(95514),s=c(32971),t=c(17660),u=c(50412),v=c(92592),w=c(41371),x=c(50377);let y={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"};function z(a){return a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null}function A(a){let b=a.providerSpecificData?.region;if(b)return b;let c=a.providerSpecificData?.profileArn;return("string"==typeof c?c.split(":")[3]:"")||""}function B({readOnly:a=!1,allowCodexActivation:b=!1,gridClassName:c="grid grid-cols-1 md:grid-cols-2 gap-3",activeFirst:f=!1,maxRows:C=null,maxColumns:D=4}){let{copied:E,copy:F}=(0,x.C)(),[G,H]=(0,e.useState)([]),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)({}),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(!0),[Q,R]=(0,e.useState)({}),[S,T]=(0,e.useState)(null),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(60),[$,_]=(0,e.useState)(!0),[aa,ab]=(0,e.useState)(null),[ac,ad]=(0,e.useState)(null),[ae,af]=(0,e.useState)(null),[ag,ah]=(0,e.useState)(null),[ai,aj]=(0,e.useState)(!1),[ak,al]=(0,e.useState)(null),[am,an]=(0,e.useState)([]),[ao,ap]=(0,e.useState)("all"),[aq,ar]=(0,e.useState)([]),[as,at]=(0,e.useState)("all"),[au,av]=(0,e.useState)("default"),[aw,ax]=(0,e.useState)(!1),[ay,az]=(0,e.useState)(!1),[aA,aB]=(0,e.useState)(!1),[aC,aD]=(0,e.useState)(null),[aE,aF]=(0,e.useState)(1),[aG,aH]=(0,e.useState)(20),[aI,aJ]=(0,e.useState)(String(20)),[aK,aL]=(0,e.useState)({page:1,pageSize:20,total:0,totalPages:1}),[aM,aN]=(0,e.useState)({eligibleConnections:0,providerFilteredConnections:0});(0,e.useRef)(null),(0,e.useRef)(null);let aO=(0,w.i)(),aP=!a||b,aQ=(0,e.useRef)(0),aR=(0,e.useCallback)(async(a=aE)=>{try{var b,c;let d=new URLSearchParams({page:String(a),pageSize:String(aG),accountStatus:as,sort:"priority"});"all"!==ao&&d.set("provider",ao);let e=await fetch(`/api/providers/client?${d.toString()}`);if(!e.ok)throw Error("Failed to fetch connections");let f=await e.json(),g=f.connections||[],h=(b=f.pagination,b||{page:1,pageSize:aG,total:0,totalPages:1}),i=function(a,b=0){return a||{eligibleConnections:b,providerFilteredConnections:b}}(f.totals,g.length);return H(g),ar(f.providerOptions||[]),aL(h),aN(i),aF((c=f.pagination,c?.page||a)),g}catch(a){return console.error("Error fetching connections:",a),H([]),ar([]),aL({page:1,pageSize:aG,total:0,totalPages:1}),aN({eligibleConnections:0,providerFilteredConnections:0}),[]}},[as,aw,aE,aG,ao]),aS=(0,e.useCallback)(async(a,b)=>{L(b=>({...b,[a]:!0})),N(b=>({...b,[a]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${b} (${a})`);let c=await fetch(`/api/usage/${a}`);if(!c.ok){let d=(await c.json().catch(()=>({}))).error||c.statusText;if(404===c.status)return void console.warn(`[ProviderLimits] Connection not found for ${b}, skipping`);if(401===c.status){console.warn(`[ProviderLimits] Auth error for ${b}:`,d);let c={quotas:[],message:d};J(b=>({...b,[a]:c}));return}throw Error(`HTTP ${c.status}: ${d}`)}let d=await c.json();console.log(`[ProviderLimits] Got quota for ${b}:`,d);let e={quotas:function(a,b){if(!b||"object"!=typeof b)return[];let c=[];try{switch(a.toLowerCase()){case"github":default:b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null})});break;case"antigravity":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:b.displayName||a,modelKey:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null,remainingPercentage:b.remainingPercentage})});break;case"codex":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,remaining:b.remaining,resetAt:b.resetAt||null})});break;case"kiro":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null})});break;case"qoder":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{("organization"!==a||b&&0!==(Number(b.total)||0))&&c.push({name:"user"===a?"Personal":"organization"===a?"Organization":a,used:b.used||0,total:b.total||0,unit:b.unit,resetAt:b.resetAt||null})});break;case"claude":b.message?c.push({name:"error",used:0,total:0,resetAt:null,message:b.message}):b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null})});break;case"vercel-ai-gateway":b.quotas&&Object.entries(b.quotas).forEach(([a,b])=>{c.push({name:a,used:b.used||0,total:b.total||0,resetAt:b.resetAt||null,remainingPercentage:b.remainingPercentage})})}}catch(b){return console.error(`Error parsing quota data for ${a}:`,b),[]}let d=(0,h.KC)(a);if(d.length>0){let a=new Map(d.map((a,b)=>[a.id,b]));c.sort((b,c)=>{let d=b.modelKey||b.name,e=c.modelKey||c.name;return(a.get(d)??999)-(a.get(e)??999)})}return c}(b,d),plan:d.plan||null,message:d.message||null,raw:d};J(b=>({...b,[a]:e}))}catch(c){console.error(`[ProviderLimits] Error fetching quota for ${b} (${a}):`,c),N(b=>({...b,[a]:c.message||"Failed to fetch quota"}))}finally{L(b=>({...b,[a]:!1}))}},[]),aT=(0,e.useCallback)(async(a,b)=>{await aS(a,b),T(new Date)},[aS]),aU=(0,e.useCallback)(async(a,b)=>{if("codex"===b&&!ae){af(a),N(b=>({...b,[a]:null}));try{let c=await fetch(`/api/usage/${a}/codex-reset-credits`,{method:"POST"}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.message||d.error||d.code||"Failed to reset Codex limit");await aS(a,b),T(new Date)}catch(b){N(c=>({...c,[a]:b.message||"Failed to reset Codex limit"}))}finally{af(null)}}},[aS,ae]),aV=(0,e.useCallback)(async a=>{if(confirm("Delete this connection?")){ab(a);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&(J(b=>{let c={...b};return delete c[a],c}),L(b=>{let c={...b};return delete c[a],c}),N(b=>{let c={...b};return delete c[a],c}),await o(aR,aE))}catch(a){console.error("Error deleting connection:",a)}finally{ab(null)}}},[aR,aE]),aW=(0,e.useCallback)(async(a,b)=>{ad(a);try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&(J(a=>({...a})),await o(aR,aE))}catch(a){console.error("Error updating connection status:",a)}finally{ad(null)}},[aR,aE]),aX=(0,e.useCallback)(async a=>{if(!ak?.id)return;let b=ak.id,c=ak.provider;try{(await fetch(`/api/providers/${b}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await aR(),aj(!1),al(null),v.wb.includes(c)&&await aS(b,c))}catch(a){console.error("Error saving connection:",a)}},[ak,aR,aS]),aY=(0,e.useCallback)(async a=>{if(a?.id&&!aC){aD(a.id);try{let b=await fetch("/api/cli-tools/codex-settings/activate-account",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:a.id,restartCodex:!0})}),c=await b.json().catch(()=>({}));if(!b.ok){let a=Array.isArray(c.installHints)&&c.installHints.length>0?c.installHints:c.installCommand?[c.installCommand]:[],b=a.length?`
2
2
  Install: ${a.join(" or ")}`:"";throw Error(`${c.error||"Failed to activate Codex account"}${b}`)}let d=c.restart?.success?"Codex was restarted automatically.":c.restart?.reason?`Restart Codex manually: ${c.restart.reason}`:"Restart Codex to use it.",e=c.keychain?.success?"Keychain auth was updated.":c.keychain?.reason?`Keychain auth failed: ${c.keychain.reason}`:"",f=c.tokenWarning?` ${c.tokenWarning}`:"",g=`${c.account||a.email||a.name||"Account"} is now written to local Codex auth. ${e} ${d}${f}`.trim();c.keychain?.success&&c.restart?.success?aO.success(g,"Codex account activated"):aO.error(g,"Codex activation incomplete")}catch(a){aO.error(a.message||"Failed to activate Codex account","Codex activation failed")}finally{aD(null)}}},[aC,aO]),aZ=(0,e.useCallback)(async(a=!1)=>{if(W)return;X(!0),Z(60);let b=aQ.current+=1,c=Math.round(3);try{let d,e=await aR(aE);L((d={},e.forEach(a=>{d[a.id]=!0}),d)),N(a=>n(a,e)),J(a=>n(a,e)),await Promise.all(e.filter(d=>a||"claude"!==d.provider||b%c==0).map(a=>aS(a.id,a.provider))),T(new Date)}catch(a){console.error("Error refreshing all providers:",a)}finally{X(!1)}},[W,aR,aS,aE]),a$=(0,e.useCallback)(async(a,b)=>{let c={...Q,[a]:b};R(c);try{let a=await fetch("/api/settings",{cache:"no-store"}),b={...(a.ok?await a.json():{}).claudeAutoPing||{},connections:c};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({claudeAutoPing:b})})}catch{R(Q)}},[Q]),a_=(0,e.useMemo)(()=>(function(a,b,c,d,e){if("codex"===d&&"default"!==e)return[...a].sort((a,c)=>{let d=m(a,b),f=m(c,b),g="remaining-asc"===e?d-f:f-d;return 0!==g?g:(l(a)||"").localeCompare(l(c)||"")});if(!c)return a;let f=a=>{let c=(b[a.id]?.quotas||[]).map(a=>a.resetAt?new Date(a.resetAt).getTime():1/0).filter(a=>Number.isFinite(a));return c.length>0?Math.min(...c):1/0};return[...a].sort((a,b)=>{let c=f(a)-f(b);return 0!==c?c:(a.provider||"").localeCompare(b.provider||"")||(l(a)||"").localeCompare(l(b)||"")})})(G,I,aw,ao,au),[G,I,aw,ao,au]),a0=(0,e.useMemo)(()=>{let a=f?[...a_].sort((a,b)=>(!1===a.isActive)-(!1===b.isActive)):a_,b=Number.isFinite(C)&&C>0?Math.floor(C)*Math.max(1,Math.floor(D||1)):null;return b?a.slice(0,b):a},[f,D,C,a_]),a1=a=>{let b=I[a.id]?.quotas;return!!b?.length&&b.some(a=>!!a.total&&!(a.total<=0)&&5>=p(a.used,a.total))},a2=(0,e.useCallback)(async(a,b)=>{if(a.length&&!aA){aB(!0);try{await Promise.all(a.map(a=>fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})}))),await o(aR,aE)}catch(a){console.error("Error bulk toggling connections:",a)}finally{aB(!1)}}},[aA,aR,aE]),a3="all"===ao?"All providers":ao,a4=aM.eligibleConnections>0,a5=a0.length>0,a6=aM.eligibleConnections?aM.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===ao?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===as?"turned off":"active"===as?"active":"matching"} accounts found for ${ao}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},a7=function(a){var b;let{start:c,end:d}=(b=a).total?{start:(b.page-1)*b.pageSize+1,end:Math.min(b.page*b.pageSize,b.total)}:{start:0,end:0};return`Showing ${c}-${d} of ${a.total}`}(aK),a8=!i.includes(aG);return $||a4?$||a5?(0,d.jsxs)("div",{className:"space-y-6",children:[(0,d.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>az(a=>!a),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":ay,title:"Filter quota providers",children:[(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===ao?(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,d.jsx)(g.A,{src:`/providers/${ao}.png`,alt:ao,size:18,className:"size-[18px] rounded object-contain",fallbackText:ao.slice(0,2).toUpperCase()}),(0,d.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:a3})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),ay&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>az(!1)}),(0,d.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{"all"!==ao&&aF(1),ap("all"),az(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===ao?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,d.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===ao&&(0,d.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,d.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,d.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:aq.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>{ao!==a&&aF(1),ap(a),az(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${ao===a?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,d.jsx)(g.A,{src:`/providers/${a}.png`,alt:a,size:24,className:"size-6 rounded-md object-contain",fallbackText:a.slice(0,2).toUpperCase()}),(0,d.jsx)("span",{className:"font-medium capitalize",children:a}),ao===a&&(0,d.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},a))})]})]})]}),(0,d.jsx)("select",{value:as,onChange:a=>{let b=a.target.value;as!==b&&aF(1),at(b)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:j.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))}),"codex"===ao&&(0,d.jsx)("select",{value:au,onChange:a=>av(a.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:k.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))}),(0,d.jsxs)("button",{type:"button",onClick:()=>ax(a=>!a),"aria-pressed":aw,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${aw?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),!a&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{a2(a0.filter(a=>(a.isActive??!0)&&a1(a)).map(a=>a.id),!1)},disabled:aA,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,d.jsxs)("button",{type:"button",onClick:()=>{a2(a0.filter(a=>!(a.isActive??!0)&&!a1(a)).map(a=>a.id),!0)},disabled:aA,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]})]}),(0,d.jsxs)("button",{onClick:()=>P(a=>!a),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:O?"Disable auto-refresh":"Enable auto-refresh",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[14px] ${O?"text-primary":"text-text-muted"}`,children:O?"toggle_on":"toggle_off"}),(0,d.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),O&&(0,d.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",Y,"s)"]})]}),(0,d.jsx)("button",{type:"button",onClick:()=>aZ(!0),disabled:W,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,d.jsx)("span",{className:`material-symbols-outlined text-[14px] ${W?"animate-spin":""}`,children:"refresh"})})]})}),aw&&(0,d.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,d.jsx)("div",{className:c,children:a0.map(b=>{let c,e,f,h=I[b.id],i=K[b.id],j=M[b.id],k=!1===b.isActive,m=aC===b.id,n="codex"===b.provider,o=Number.isFinite(e="number"==typeof(c=h?.raw?.resetCredits?.availableCount)?c:Number(c))?Math.max(0,e):0,p=ae===b.id,u=aa===b.id||ac===b.id||p;return(0,d.jsxs)(t.default,{padding:"none",className:`min-w-0 ${k?"opacity-60":""}`,children:[(0,d.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,d.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,d.jsx)(g.A,{src:`/providers/${b.provider}.png`,alt:b.provider,size:32,className:"object-contain",fallbackText:b.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:b.provider}),l(b)?(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:l(b)}):null,z(b)?(0,d.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:z(b)}):null,n&&(0,d.jsxs)("p",{className:"text-[11px] text-text-muted truncate",children:["Reset eligible: ",o]}),"kiro"===b.provider&&(0,d.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,d.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(f=b.providerSpecificData?.authMethod)&&y[f]?y[f]:"api_key"===b.authType?"API Key":"OAuth"}),A(b)&&(0,d.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:A(b)}),(0,d.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${k?"bg-surface-2 text-text-muted":"active"===b.testStatus||"success"===b.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===b.testStatus||"expired"===b.testStatus||"unavailable"===b.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:k?"disabled":b.testStatus||"unknown"}),b.providerSpecificData?.profileArn&&(0,d.jsxs)("button",{type:"button",onClick:()=>F(b.providerSpecificData.profileArn,b.id),title:b.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:E===b.id?"check":"content_copy"}),(0,d.jsx)("code",{className:"truncate font-mono",children:b.providerSpecificData.profileArn})]})]})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[n&&(0,d.jsx)(s.default,{text:`Codex reset credits remaining: ${o}`,children:(0,d.jsxs)("div",{className:`hidden h-8 items-center gap-1 rounded-lg border px-2 text-[11px] sm:flex ${o>0?"border-primary/30 bg-primary/5 text-primary":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"}),(0,d.jsx)("span",{className:"tabular-nums",children:o})]})}),n&&o>0&&(0,d.jsx)(s.default,{text:`Use one Codex reset credit. Available: ${o}`,children:(0,d.jsxs)("button",{type:"button",onClick:()=>ah({connection:b,resetCreditCount:o}),disabled:i||u,className:"flex h-8 items-center gap-1 rounded-lg border border-primary/30 px-2 text-[11px] text-primary transition-colors hover:bg-primary/10 disabled:opacity-50",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[15px] ${p?"animate-spin":""}`,children:p?"progress_activity":"bolt"}),(0,d.jsx)("span",{className:"hidden lg:inline",children:"Reset limit"})]})}),"claude"===b.provider&&"oauth"===b.authType&&(0,d.jsx)(s.default,{text:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",children:(0,d.jsx)("button",{type:"button",onClick:()=>a$(b.id,!0!==Q[b.id]),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${!0===Q[b.id]?"text-primary":"text-text-muted"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,d.jsx)(s.default,{text:"Refresh quota",children:(0,d.jsx)("button",{type:"button",onClick:()=>aT(b.id,b.provider),disabled:i||u,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,d.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${i?"animate-spin":""}`,children:"refresh"})})}),aP&&"codex"===b.provider&&(0,d.jsxs)("button",{type:"button",onClick:()=>aY(b),disabled:u||m,className:"h-8 inline-flex items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs font-medium text-emerald-600 hover:bg-emerald-500/10 transition-colors disabled:opacity-50 dark:text-emerald-400",title:"Activate this account in local Codex",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[18px] ${m?"animate-pulse":""}`,children:"key"}),(0,d.jsx)("span",{children:"Activate"})]}),!a&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",onClick:()=>{al(b),aj(!0)},disabled:u,"aria-label":"Edit connection",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,d.jsx)("button",{type:"button",onClick:()=>aV(b.id),disabled:u,"aria-label":"Delete connection",className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,d.jsx)("span",{className:`material-symbols-outlined text-[18px] ${aa===b.id?"animate-pulse":""}`,children:"delete"})}),(0,d.jsx)("div",{className:"inline-flex items-center pl-0.5",title:b.isActive??!0?"Disable connection":"Enable connection",children:(0,d.jsx)(r.default,{size:"sm",checked:b.isActive??!0,disabled:u,onChange:a=>aW(b.id,a)})})]})]})]})}),(0,d.jsx)("div",{className:"px-2 py-1.5",children:i?(0,d.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):j?(0,d.jsxs)("div",{className:"text-center py-5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,d.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:j})]}):h?.message?(0,d.jsx)("div",{className:"text-center py-5",children:(0,d.jsx)("p",{className:"text-xs text-text-muted",children:h.message})}):(0,d.jsx)(q,{quotas:h?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===b.provider&&"default"!==au})})]},b.id)})}),(0,d.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:a7}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsxs)("select",{value:a8?"custom":String(aG),onChange:a=>{let b=a.target.value;if("custom"===b)return;let c=Number.parseInt(b,10);Number.isFinite(c)&&(aF(1),aH(c),aJ(String(c)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[i.map(a=>(0,d.jsxs)("option",{value:String(a),children:[a," / page"]},a)),(0,d.jsx)("option",{value:"custom",children:"Custom"})]}),(0,d.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:aI,onChange:a=>aJ(a.target.value),onBlur:()=>{let a=Number.parseInt(aI,10);if(!Number.isFinite(a))return void aJ(String(aG));let b=Math.min(500,Math.max(1,a));aF(1),aH(b),aJ(String(b))},onKeyDown:a=>{if("Enter"!==a.key)return;let b=Number.parseInt(aI,10);if(!Number.isFinite(b))return void aJ(String(aG));let c=Math.min(500,Math.max(1,b));aF(1),aH(c),aJ(String(c))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",aK.page," / ",aK.totalPages]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("button",{type:"button",onClick:()=>aF(1),disabled:aK.page<=1||$||W,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,d.jsx)("button",{type:"button",onClick:()=>aF(a=>Math.max(1,a-1)),disabled:aK.page<=1||$||W,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,d.jsx)("button",{type:"button",onClick:()=>aF(a=>Math.min(aK.totalPages,a+1)),disabled:aK.page>=aK.totalPages||$||W,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,d.jsx)("button",{type:"button",onClick:()=>aF(aK.totalPages),disabled:aK.page>=aK.totalPages||$||W,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,d.jsx)(u.uo,{isOpen:!!ag,onClose:()=>{ae||ah(null)},onConfirm:async()=>{let a=ag?.connection;a&&(await aU(a.id,a.provider),ah(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${l(ag?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${ag?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!ae}),(0,d.jsx)(u.wI,{isOpen:ai,connection:ak,proxyPools:am,onSave:aX,onClose:()=>{aj(!1),al(null)}})]}):(0,d.jsx)(t.default,{padding:"lg",children:(0,d.jsxs)("div",{className:"text-center py-12",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:a6.icon}),(0,d.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:a6.title}),(0,d.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:a6.description})]})}):(0,d.jsx)(t.default,{padding:"lg",children:(0,d.jsxs)("div",{className:"text-center py-12",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,d.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,d.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}function C(){return(0,d.jsx)(e.Suspense,{fallback:(0,d.jsx)(f.CardSkeleton,{}),children:(0,d.jsx)(D,{})})}function D(){let[a,b]=(0,e.useState)({loading:!0,role:null,showQuotaTracker:!0});return a.loading?(0,d.jsx)(f.CardSkeleton,{}):(0,d.jsx)(B,{readOnly:"sub_user"===a.role,allowCodexActivation:"sub_user"===a.role})}},70061:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Avatar.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Avatar.js","default")},70092:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Toggle.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Toggle.js","default")},70139:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/EditConnectionModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/EditConnectionModal.js","default")},70603:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ManualConfigModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ManualConfigModal.js","default")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71230:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Input.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Input.js","default")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},75153:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["quota",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,16736)),"/Users/bytedance/Documents/Projects/9router/src/app/(dashboard)/dashboard/quota/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/Users/bytedance/Documents/Projects/9router/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/Users/bytedance/Documents/Projects/9router/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/quota/page",pathname:"/dashboard/quota",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/quota/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
3
3
  see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},76966:(a,b,c)=>{Promise.resolve().then(c.bind(c,16736))},76978:(a,b,c)=>{"use strict";c.d(b,{UserRoleProvider:()=>e});var d=c(77943);(0,d.registerClientReference)(function(){throw Error("Attempted to call UserRoleContext() from the server but UserRoleContext is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/UserRoleProvider.js","UserRoleContext");let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call UserRoleProvider() from the server but UserRoleProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/UserRoleProvider.js","UserRoleProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call useUserRole() from the server but useUserRole is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/UserRoleProvider.js","useUserRole"),(0,d.registerClientReference)(function(){throw Error("Attempted to call useIsSuperAdmin() from the server but useIsSuperAdmin is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/UserRoleProvider.js","useIsSuperAdmin")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79428:a=>{"use strict";a.exports=require("buffer")},79646:a=>{"use strict";a.exports=require("child_process")},80099:a=>{"use strict";a.exports=require("node:sqlite")},80342:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/IFlowCookieModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/IFlowCookieModal.js","default")},81115:a=>{"use strict";a.exports=require("constants")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},81923:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ProviderInfoCard.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ProviderInfoCard.js","default")},82448:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroAuthModal.js","default")},83784:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Select.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Select.js","default")},83997:a=>{"use strict";a.exports=require("tty")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87228:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroSocialOAuthModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/KiroSocialOAuthModal.js","default")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},92082:(a,b,c)=>{"use strict";c.d(b,{CardSkeleton:()=>h,PageLoading:()=>f,Skeleton:()=>g,Spinner:()=>e,default:()=>i});var d=c(77943);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call Spinner() from the server but Spinner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Loading.js","Spinner"),f=(0,d.registerClientReference)(function(){throw Error("Attempted to call PageLoading() from the server but PageLoading is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Loading.js","PageLoading"),g=(0,d.registerClientReference)(function(){throw Error("Attempted to call Skeleton() from the server but Skeleton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Loading.js","Skeleton"),h=(0,d.registerClientReference)(function(){throw Error("Attempted to call CardSkeleton() from the server but CardSkeleton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Loading.js","CardSkeleton"),i=(0,d.registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Loading.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Loading.js","default")},92669:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/Header.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/Header.js","default")},94582:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/bytedance/Documents/Projects/9router/src/shared/components/ModelSelectModal.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/bytedance/Documents/Projects/9router/src/shared/components/ModelSelectModal.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5592,7502,6936,4013,6001,7774,5296,5573,319,6482,3913,9718,5118,6070,8920,6306,1832,4989,1275,7937,8895,6182,6457,8271,3412,6777,412],()=>b(b.s=75153));module.exports=c})();