@37chengshan/ompweb 0.3.6 → 4.0.1

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 (273) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +4 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/react-loadable-manifest.json +5 -5
  5. package/.next/required-server-files.js +4 -3
  6. package/.next/required-server-files.json +4 -3
  7. package/.next/routes-manifest.json +24 -0
  8. package/.next/server/app/_global-error/page.js +1 -1
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +2 -2
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page.js +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +3 -3
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  20. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  21. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  22. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  23. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  24. package/.next/server/app/api/agent/[id]/route.js +1 -1
  25. package/.next/server/app/api/agent/new/route.js +1 -1
  26. package/.next/server/app/api/agent/running/events/route.js +2 -2
  27. package/.next/server/app/api/agents/route.js +1 -1
  28. package/.next/server/app/api/app-update/route.js +1 -1
  29. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  30. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  31. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  32. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  33. package/.next/server/app/api/auth/providers/route.js +1 -1
  34. package/.next/server/app/api/cwd/browse/route.js +1 -1
  35. package/.next/server/app/api/cwd/validate/route.js +1 -1
  36. package/.next/server/app/api/default-cwd/route.js +1 -1
  37. package/.next/server/app/api/file-index/route.js +1 -1
  38. package/.next/server/app/api/files/[...path]/route.js +2 -2
  39. package/.next/server/app/api/git/diff/route.js +2 -2
  40. package/.next/server/app/api/git/status/route.js +2 -2
  41. package/.next/server/app/api/github/status/route.js +1 -0
  42. package/.next/server/app/api/github/status/route.js.nft.json +1 -0
  43. package/.next/server/app/api/github/status/route_client-reference-manifest.js +1 -0
  44. package/.next/server/app/api/home/route.js +1 -1
  45. package/.next/server/app/api/mcp/route.js +2 -2
  46. package/.next/server/app/api/model-roles/route.js +1 -1
  47. package/.next/server/app/api/models/fetch/route.js +1 -1
  48. package/.next/server/app/api/models/route.js +1 -1
  49. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  50. package/.next/server/app/api/models-config/route.js +1 -1
  51. package/.next/server/app/api/models-config/test/route.js +1 -1
  52. package/.next/server/app/api/omp-settings/route.js +1 -1
  53. package/.next/server/app/api/omp-update/route.js +2 -2
  54. package/.next/server/app/api/omp-version/route.js +1 -1
  55. package/.next/server/app/api/plugins/route.js +1 -1
  56. package/.next/server/app/api/projects/route.js +2 -2
  57. package/.next/server/app/api/providers/enable/route.js +1 -1
  58. package/.next/server/app/api/reveal/route.js +1 -1
  59. package/.next/server/app/api/scripts/route.js +1 -0
  60. package/.next/server/app/api/scripts/route.js.nft.json +1 -0
  61. package/.next/server/app/api/scripts/route_client-reference-manifest.js +1 -0
  62. package/.next/server/app/api/scripts/run/route.js +1 -0
  63. package/.next/server/app/api/scripts/run/route.js.nft.json +1 -0
  64. package/.next/server/app/api/scripts/run/route_client-reference-manifest.js +1 -0
  65. package/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
  66. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  67. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  68. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  69. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  70. package/.next/server/app/api/sessions/[id]/plan/route.js +1 -1
  71. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  72. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  73. package/.next/server/app/api/sessions/[id]/subagents/[subagentId]/route.js +1 -1
  74. package/.next/server/app/api/sessions/[id]/subagents/route.js +1 -1
  75. package/.next/server/app/api/sessions/archive/route.js +1 -1
  76. package/.next/server/app/api/sessions/import/route.js +1 -1
  77. package/.next/server/app/api/sessions/route.js +1 -1
  78. package/.next/server/app/api/skills/check/route.js +1 -1
  79. package/.next/server/app/api/skills/install/route.js +1 -1
  80. package/.next/server/app/api/skills/route.js +2 -2
  81. package/.next/server/app/api/skills/search/route.js +1 -1
  82. package/.next/server/app/api/skills/update/route.js +1 -1
  83. package/.next/server/app/api/terminal/input/route.js +4 -6
  84. package/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
  85. package/.next/server/app/api/terminal/open/route.js +1 -1
  86. package/.next/server/app/api/terminal/resize/route.js +6 -0
  87. package/.next/server/app/api/terminal/resize/route.js.nft.json +1 -0
  88. package/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -0
  89. package/.next/server/app/api/terminal/session/route.js +4 -6
  90. package/.next/server/app/api/terminal/session/route.js.nft.json +1 -1
  91. package/.next/server/app/api/terminal/stream/route.js +7 -9
  92. package/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
  93. package/.next/server/app/api/web-auth/session/route.js +1 -1
  94. package/.next/server/app/api/worktrees/route.js +1 -1
  95. package/.next/server/app/favicon.ico/route.js +1 -1
  96. package/.next/server/app/index.html +1 -1
  97. package/.next/server/app/index.rsc +4 -4
  98. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  99. package/.next/server/app/index.segments/_full.segment.rsc +4 -4
  100. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  101. package/.next/server/app/login/page.js +1 -1
  102. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  103. package/.next/server/app/login.html +1 -1
  104. package/.next/server/app/login.rsc +3 -3
  105. package/.next/server/app/login.segments/_full.segment.rsc +3 -3
  106. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  107. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
  108. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  109. package/.next/server/app/page.js +1 -1
  110. package/.next/server/app/page_client-reference-manifest.js +1 -1
  111. package/.next/server/app-paths-manifest.json +4 -0
  112. package/.next/server/chunks/4509.js +1 -1
  113. package/.next/server/chunks/5309.js +1 -1
  114. package/.next/server/middleware-build-manifest.js +1 -1
  115. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  116. package/.next/server/pages/404.html +1 -1
  117. package/.next/server/pages/500.html +1 -1
  118. package/.next/static/KmgSpHtt3ScXfRBhfF13-/_buildManifest.js +1 -0
  119. package/.next/static/chunks/2584-f6cc0dc1511c8e00.js +1 -0
  120. package/.next/static/chunks/303.9661abdb4e0093ec.js +126 -0
  121. package/.next/static/chunks/3550.d3f97c806e3623e2.js +1 -0
  122. package/.next/static/chunks/5658.aab0a7c617597ba5.js +1 -0
  123. package/.next/static/chunks/app/_global-error/page-b0b6e7e566c944c1.js +1 -0
  124. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-b0b6e7e566c944c1.js +1 -0
  125. package/.next/static/chunks/app/api/agent/[id]/events/route-b0b6e7e566c944c1.js +1 -0
  126. package/.next/static/chunks/app/api/agent/[id]/route-b0b6e7e566c944c1.js +1 -0
  127. package/.next/static/chunks/app/api/agent/new/route-b0b6e7e566c944c1.js +1 -0
  128. package/.next/static/chunks/app/api/agent/running/events/route-b0b6e7e566c944c1.js +1 -0
  129. package/.next/static/chunks/app/api/agents/route-b0b6e7e566c944c1.js +1 -0
  130. package/.next/static/chunks/app/api/app-update/route-b0b6e7e566c944c1.js +1 -0
  131. package/.next/static/chunks/app/api/auth/all-providers/route-b0b6e7e566c944c1.js +1 -0
  132. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-b0b6e7e566c944c1.js +1 -0
  133. package/.next/static/chunks/app/api/auth/login/[provider]/route-b0b6e7e566c944c1.js +1 -0
  134. package/.next/static/chunks/app/api/auth/logout/[provider]/route-b0b6e7e566c944c1.js +1 -0
  135. package/.next/static/chunks/app/api/auth/providers/route-b0b6e7e566c944c1.js +1 -0
  136. package/.next/static/chunks/app/api/cwd/browse/route-b0b6e7e566c944c1.js +1 -0
  137. package/.next/static/chunks/app/api/cwd/validate/route-b0b6e7e566c944c1.js +1 -0
  138. package/.next/static/chunks/app/api/default-cwd/route-b0b6e7e566c944c1.js +1 -0
  139. package/.next/static/chunks/app/api/file-index/route-b0b6e7e566c944c1.js +1 -0
  140. package/.next/static/chunks/app/api/files/[...path]/route-b0b6e7e566c944c1.js +1 -0
  141. package/.next/static/chunks/app/api/git/diff/route-b0b6e7e566c944c1.js +1 -0
  142. package/.next/static/chunks/app/api/git/status/route-b0b6e7e566c944c1.js +1 -0
  143. package/.next/static/chunks/app/api/github/status/route-b0b6e7e566c944c1.js +1 -0
  144. package/.next/static/chunks/app/api/home/route-b0b6e7e566c944c1.js +1 -0
  145. package/.next/static/chunks/app/api/mcp/route-b0b6e7e566c944c1.js +1 -0
  146. package/.next/static/chunks/app/api/model-roles/route-b0b6e7e566c944c1.js +1 -0
  147. package/.next/static/chunks/app/api/models/fetch/route-b0b6e7e566c944c1.js +1 -0
  148. package/.next/static/chunks/app/api/models/route-b0b6e7e566c944c1.js +1 -0
  149. package/.next/static/chunks/app/api/models-config/catalog/route-b0b6e7e566c944c1.js +1 -0
  150. package/.next/static/chunks/app/api/models-config/route-b0b6e7e566c944c1.js +1 -0
  151. package/.next/static/chunks/app/api/models-config/test/route-b0b6e7e566c944c1.js +1 -0
  152. package/.next/static/chunks/app/api/omp-settings/route-b0b6e7e566c944c1.js +1 -0
  153. package/.next/static/chunks/app/api/omp-update/route-b0b6e7e566c944c1.js +1 -0
  154. package/.next/static/chunks/app/api/omp-version/route-b0b6e7e566c944c1.js +1 -0
  155. package/.next/static/chunks/app/api/plugins/route-b0b6e7e566c944c1.js +1 -0
  156. package/.next/static/chunks/app/api/projects/route-b0b6e7e566c944c1.js +1 -0
  157. package/.next/static/chunks/app/api/providers/enable/route-b0b6e7e566c944c1.js +1 -0
  158. package/.next/static/chunks/app/api/reveal/route-b0b6e7e566c944c1.js +1 -0
  159. package/.next/static/chunks/app/api/scripts/route-b0b6e7e566c944c1.js +1 -0
  160. package/.next/static/chunks/app/api/scripts/run/route-b0b6e7e566c944c1.js +1 -0
  161. package/.next/static/chunks/app/api/sessions/[id]/archive/route-b0b6e7e566c944c1.js +1 -0
  162. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-b0b6e7e566c944c1.js +1 -0
  163. package/.next/static/chunks/app/api/sessions/[id]/context/route-b0b6e7e566c944c1.js +1 -0
  164. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-b0b6e7e566c944c1.js +1 -0
  165. package/.next/static/chunks/app/api/sessions/[id]/export/route-b0b6e7e566c944c1.js +1 -0
  166. package/.next/static/chunks/app/api/sessions/[id]/plan/route-b0b6e7e566c944c1.js +1 -0
  167. package/.next/static/chunks/app/api/sessions/[id]/route-b0b6e7e566c944c1.js +1 -0
  168. package/.next/static/chunks/app/api/sessions/[id]/state/route-b0b6e7e566c944c1.js +1 -0
  169. package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-b0b6e7e566c944c1.js +1 -0
  170. package/.next/static/chunks/app/api/sessions/[id]/subagents/route-b0b6e7e566c944c1.js +1 -0
  171. package/.next/static/chunks/app/api/sessions/archive/route-b0b6e7e566c944c1.js +1 -0
  172. package/.next/static/chunks/app/api/sessions/import/route-b0b6e7e566c944c1.js +1 -0
  173. package/.next/static/chunks/app/api/sessions/route-b0b6e7e566c944c1.js +1 -0
  174. package/.next/static/chunks/app/api/skills/check/route-b0b6e7e566c944c1.js +1 -0
  175. package/.next/static/chunks/app/api/skills/install/route-b0b6e7e566c944c1.js +1 -0
  176. package/.next/static/chunks/app/api/skills/route-b0b6e7e566c944c1.js +1 -0
  177. package/.next/static/chunks/app/api/skills/search/route-b0b6e7e566c944c1.js +1 -0
  178. package/.next/static/chunks/app/api/skills/update/route-b0b6e7e566c944c1.js +1 -0
  179. package/.next/static/chunks/app/api/terminal/input/route-b0b6e7e566c944c1.js +1 -0
  180. package/.next/static/chunks/app/api/terminal/open/route-b0b6e7e566c944c1.js +1 -0
  181. package/.next/static/chunks/app/api/terminal/resize/route-b0b6e7e566c944c1.js +1 -0
  182. package/.next/static/chunks/app/api/terminal/session/route-b0b6e7e566c944c1.js +1 -0
  183. package/.next/static/chunks/app/api/terminal/stream/route-b0b6e7e566c944c1.js +1 -0
  184. package/.next/static/chunks/app/api/web-auth/session/route-b0b6e7e566c944c1.js +1 -0
  185. package/.next/static/chunks/app/api/worktrees/route-b0b6e7e566c944c1.js +1 -0
  186. package/.next/static/chunks/app/manifest.webmanifest/route-b0b6e7e566c944c1.js +1 -0
  187. package/.next/static/chunks/app/{page-833698058d71b603.js → page-122708b0165e41be.js} +1 -1
  188. package/.next/static/chunks/next/dist/client/components/builtin/app-error-b0b6e7e566c944c1.js +1 -0
  189. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b0b6e7e566c944c1.js +1 -0
  190. package/.next/static/chunks/next/dist/client/components/builtin/not-found-b0b6e7e566c944c1.js +1 -0
  191. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b0b6e7e566c944c1.js +1 -0
  192. package/.next/static/chunks/webpack-63dfdf9f94b72b35.js +1 -0
  193. package/.next/static/css/7bbf54d710e156ee.css +1 -0
  194. package/bin/omp-web-desktop.js +159 -0
  195. package/next.config.ts +3 -1
  196. package/package.json +6 -4
  197. package/templates/desktop/OmpWeb.app/Contents/Info.plist +26 -0
  198. package/templates/desktop/OmpWeb.app/Contents/MacOS/ompweb-launcher +7 -0
  199. package/templates/desktop/OmpWeb.app/Contents/Resources/OmpWeb.icns +0 -0
  200. package/templates/desktop/mac-start.command +16 -0
  201. package/templates/desktop/win-start.vbs +9 -0
  202. package/.next/static/RW6Yu4DRfKI1mQ_EqoVNo/_buildManifest.js +0 -1
  203. package/.next/static/chunks/202.10de6e38a49a6c80.js +0 -131
  204. package/.next/static/chunks/2584-20a03146e1e2db70.js +0 -1
  205. package/.next/static/chunks/5658.600b820420422057.js +0 -1
  206. package/.next/static/chunks/8673.8f38e67890334c5a.js +0 -1
  207. package/.next/static/chunks/app/_global-error/page-48788bcdc79e1c9e.js +0 -1
  208. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-48788bcdc79e1c9e.js +0 -1
  209. package/.next/static/chunks/app/api/agent/[id]/events/route-48788bcdc79e1c9e.js +0 -1
  210. package/.next/static/chunks/app/api/agent/[id]/route-48788bcdc79e1c9e.js +0 -1
  211. package/.next/static/chunks/app/api/agent/new/route-48788bcdc79e1c9e.js +0 -1
  212. package/.next/static/chunks/app/api/agent/running/events/route-48788bcdc79e1c9e.js +0 -1
  213. package/.next/static/chunks/app/api/agents/route-48788bcdc79e1c9e.js +0 -1
  214. package/.next/static/chunks/app/api/app-update/route-48788bcdc79e1c9e.js +0 -1
  215. package/.next/static/chunks/app/api/auth/all-providers/route-48788bcdc79e1c9e.js +0 -1
  216. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-48788bcdc79e1c9e.js +0 -1
  217. package/.next/static/chunks/app/api/auth/login/[provider]/route-48788bcdc79e1c9e.js +0 -1
  218. package/.next/static/chunks/app/api/auth/logout/[provider]/route-48788bcdc79e1c9e.js +0 -1
  219. package/.next/static/chunks/app/api/auth/providers/route-48788bcdc79e1c9e.js +0 -1
  220. package/.next/static/chunks/app/api/cwd/browse/route-48788bcdc79e1c9e.js +0 -1
  221. package/.next/static/chunks/app/api/cwd/validate/route-48788bcdc79e1c9e.js +0 -1
  222. package/.next/static/chunks/app/api/default-cwd/route-48788bcdc79e1c9e.js +0 -1
  223. package/.next/static/chunks/app/api/file-index/route-48788bcdc79e1c9e.js +0 -1
  224. package/.next/static/chunks/app/api/files/[...path]/route-48788bcdc79e1c9e.js +0 -1
  225. package/.next/static/chunks/app/api/git/diff/route-48788bcdc79e1c9e.js +0 -1
  226. package/.next/static/chunks/app/api/git/status/route-48788bcdc79e1c9e.js +0 -1
  227. package/.next/static/chunks/app/api/home/route-48788bcdc79e1c9e.js +0 -1
  228. package/.next/static/chunks/app/api/mcp/route-48788bcdc79e1c9e.js +0 -1
  229. package/.next/static/chunks/app/api/model-roles/route-48788bcdc79e1c9e.js +0 -1
  230. package/.next/static/chunks/app/api/models/fetch/route-48788bcdc79e1c9e.js +0 -1
  231. package/.next/static/chunks/app/api/models/route-48788bcdc79e1c9e.js +0 -1
  232. package/.next/static/chunks/app/api/models-config/catalog/route-48788bcdc79e1c9e.js +0 -1
  233. package/.next/static/chunks/app/api/models-config/route-48788bcdc79e1c9e.js +0 -1
  234. package/.next/static/chunks/app/api/models-config/test/route-48788bcdc79e1c9e.js +0 -1
  235. package/.next/static/chunks/app/api/omp-settings/route-48788bcdc79e1c9e.js +0 -1
  236. package/.next/static/chunks/app/api/omp-update/route-48788bcdc79e1c9e.js +0 -1
  237. package/.next/static/chunks/app/api/omp-version/route-48788bcdc79e1c9e.js +0 -1
  238. package/.next/static/chunks/app/api/plugins/route-48788bcdc79e1c9e.js +0 -1
  239. package/.next/static/chunks/app/api/projects/route-48788bcdc79e1c9e.js +0 -1
  240. package/.next/static/chunks/app/api/providers/enable/route-48788bcdc79e1c9e.js +0 -1
  241. package/.next/static/chunks/app/api/reveal/route-48788bcdc79e1c9e.js +0 -1
  242. package/.next/static/chunks/app/api/sessions/[id]/archive/route-48788bcdc79e1c9e.js +0 -1
  243. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-48788bcdc79e1c9e.js +0 -1
  244. package/.next/static/chunks/app/api/sessions/[id]/context/route-48788bcdc79e1c9e.js +0 -1
  245. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-48788bcdc79e1c9e.js +0 -1
  246. package/.next/static/chunks/app/api/sessions/[id]/export/route-48788bcdc79e1c9e.js +0 -1
  247. package/.next/static/chunks/app/api/sessions/[id]/plan/route-48788bcdc79e1c9e.js +0 -1
  248. package/.next/static/chunks/app/api/sessions/[id]/route-48788bcdc79e1c9e.js +0 -1
  249. package/.next/static/chunks/app/api/sessions/[id]/state/route-48788bcdc79e1c9e.js +0 -1
  250. package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-48788bcdc79e1c9e.js +0 -1
  251. package/.next/static/chunks/app/api/sessions/[id]/subagents/route-48788bcdc79e1c9e.js +0 -1
  252. package/.next/static/chunks/app/api/sessions/archive/route-48788bcdc79e1c9e.js +0 -1
  253. package/.next/static/chunks/app/api/sessions/import/route-48788bcdc79e1c9e.js +0 -1
  254. package/.next/static/chunks/app/api/sessions/route-48788bcdc79e1c9e.js +0 -1
  255. package/.next/static/chunks/app/api/skills/check/route-48788bcdc79e1c9e.js +0 -1
  256. package/.next/static/chunks/app/api/skills/install/route-48788bcdc79e1c9e.js +0 -1
  257. package/.next/static/chunks/app/api/skills/route-48788bcdc79e1c9e.js +0 -1
  258. package/.next/static/chunks/app/api/skills/search/route-48788bcdc79e1c9e.js +0 -1
  259. package/.next/static/chunks/app/api/skills/update/route-48788bcdc79e1c9e.js +0 -1
  260. package/.next/static/chunks/app/api/terminal/input/route-48788bcdc79e1c9e.js +0 -1
  261. package/.next/static/chunks/app/api/terminal/open/route-48788bcdc79e1c9e.js +0 -1
  262. package/.next/static/chunks/app/api/terminal/session/route-48788bcdc79e1c9e.js +0 -1
  263. package/.next/static/chunks/app/api/terminal/stream/route-48788bcdc79e1c9e.js +0 -1
  264. package/.next/static/chunks/app/api/web-auth/session/route-48788bcdc79e1c9e.js +0 -1
  265. package/.next/static/chunks/app/api/worktrees/route-48788bcdc79e1c9e.js +0 -1
  266. package/.next/static/chunks/app/manifest.webmanifest/route-48788bcdc79e1c9e.js +0 -1
  267. package/.next/static/chunks/next/dist/client/components/builtin/app-error-48788bcdc79e1c9e.js +0 -1
  268. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-48788bcdc79e1c9e.js +0 -1
  269. package/.next/static/chunks/next/dist/client/components/builtin/not-found-48788bcdc79e1c9e.js +0 -1
  270. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-48788bcdc79e1c9e.js +0 -1
  271. package/.next/static/chunks/webpack-32eae552598b6ade.js +0 -1
  272. package/.next/static/css/dda9acc8fa0835d6.css +0 -1
  273. /package/.next/static/{RW6Yu4DRfKI1mQ_EqoVNo → KmgSpHtt3ScXfRBhfF13-}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},4984:a=>{"use strict";a.exports=require("readline")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},20565:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(a){return"string"==typeof a?a:void 0}function f(a){return"number"==typeof a&&Number.isFinite(a)?a:void 0}c.d(b,{i:()=>f,oJ:()=>e,u4:()=>d})},21820:a=>{"use strict";a.exports=require("os")},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")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69226:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>f,dynamic:()=>e});var d=c(73209);let e="force-dynamic";async function f(){try{let a=await (0,d.T4)({type:"get_login_providers"},3e4),b=(Array.isArray(a.providers)?a.providers.filter(a=>"object"==typeof a&&null!==a&&"string"==typeof a.id&&"string"==typeof a.name&&"boolean"==typeof a.authenticated):[]).filter(a=>!1!==a.available).map(a=>({id:a.id,name:a.name,usesCallbackServer:!1,loggedIn:a.authenticated}));return Response.json({providers:b})}catch(b){let a=b instanceof Error?b.message:String(b);return Response.json({providers:[],error:a},{status:500})}}},73209:(a,b,c)=>{"use strict";c.d(b,{T4:()=>i,_6:()=>j,jd:()=>g});var d=c(21820),e=c(13798);let f=["--no-session","--no-skills","--no-lsp"];function g(){let a=globalThis.__ompUtilityRpcState;if(!a)return;a.idleTimer&&(clearTimeout(a.idleTimer),a.idleTimer=null);let b=a.proc;a.proc=null,b&&b.dispose()}async function h(a){let b=new e.X({cwd:(0,d.homedir)(),extraArgs:f,onExit:()=>{a.proc===b&&(a.proc=null)}});try{let a=await b.waitReady(6e4);await b.negotiateProtocol(a)}catch(a){throw b.dispose(),a}return b}function i(a,b=6e4){let c=function(){if(!globalThis.__ompUtilityRpcState){globalThis.__ompUtilityRpcState={proc:null,idleTimer:null,queue:Promise.resolve()};let a=()=>g();process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__ompUtilityRpcState}(),d=c.queue.then(async()=>{c.idleTimer&&(clearTimeout(c.idleTimer),c.idleTimer=null);try{return c.proc&&c.proc.isAlive||(c.proc=await h(c)),await c.proc.sendCommand(a,b)}finally{c.idleTimer&&clearTimeout(c.idleTimer),c.idleTimer=setTimeout(()=>{c.idleTimer=null;let a=c.proc;c.proc=null,a&&a.dispose()},3e5),c.idleTimer.unref?.()}});return c.queue=d.then(()=>void 0,()=>void 0),d}async function j(a,b={}){let c=new e.X({cwd:b.cwd??(0,d.homedir)(),extraArgs:f,env:b.env});try{let d=await c.waitReady(6e4);return await c.negotiateProtocol(d),await c.sendCommand(a,b.timeoutMs??6e4)}finally{await c.dispose()}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},80159:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/providers/route",pathname:"/api/auth/providers",filename:"route",bundlePath:"app/api/auth/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/auth/providers/route.ts",nextConfigOutput:"",userland:()=>c(69226),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,3798],()=>b(b.s=80159));module.exports=c})();
1
+ (()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},4984:a=>{"use strict";a.exports=require("readline")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},20565:(a,b,c)=>{"use strict";function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(a){return"string"==typeof a?a:void 0}function f(a){return"number"==typeof a&&Number.isFinite(a)?a:void 0}c.d(b,{i:()=>f,oJ:()=>e,u4:()=>d})},21342:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/providers/route",pathname:"/api/auth/providers",filename:"route",bundlePath:"app/api/auth/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/auth/providers/route.ts",nextConfigOutput:"",userland:()=>c(69226),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},21820:a=>{"use strict";a.exports=require("os")},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")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69226:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>f,dynamic:()=>e});var d=c(73209);let e="force-dynamic";async function f(){try{let a=await (0,d.T4)({type:"get_login_providers"},3e4),b=(Array.isArray(a.providers)?a.providers.filter(a=>"object"==typeof a&&null!==a&&"string"==typeof a.id&&"string"==typeof a.name&&"boolean"==typeof a.authenticated):[]).filter(a=>!1!==a.available).map(a=>({id:a.id,name:a.name,usesCallbackServer:!1,loggedIn:a.authenticated}));return Response.json({providers:b})}catch(b){let a=b instanceof Error?b.message:String(b);return Response.json({providers:[],error:a},{status:500})}}},73209:(a,b,c)=>{"use strict";c.d(b,{T4:()=>i,_6:()=>j,jd:()=>g});var d=c(21820),e=c(13798);let f=["--no-session","--no-skills","--no-lsp"];function g(){let a=globalThis.__ompUtilityRpcState;if(!a)return;a.idleTimer&&(clearTimeout(a.idleTimer),a.idleTimer=null);let b=a.proc;a.proc=null,b&&b.dispose()}async function h(a){let b=new e.X({cwd:(0,d.homedir)(),extraArgs:f,onExit:()=>{a.proc===b&&(a.proc=null)}});try{let a=await b.waitReady(6e4);await b.negotiateProtocol(a)}catch(a){throw b.dispose(),a}return b}function i(a,b=6e4){let c=function(){if(!globalThis.__ompUtilityRpcState){globalThis.__ompUtilityRpcState={proc:null,idleTimer:null,queue:Promise.resolve()};let a=()=>g();process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__ompUtilityRpcState}(),d=c.queue.then(async()=>{c.idleTimer&&(clearTimeout(c.idleTimer),c.idleTimer=null);try{return c.proc&&c.proc.isAlive||(c.proc=await h(c)),await c.proc.sendCommand(a,b)}finally{c.idleTimer&&clearTimeout(c.idleTimer),c.idleTimer=setTimeout(()=>{c.idleTimer=null;let a=c.proc;c.proc=null,a&&a.dispose()},3e5),c.idleTimer.unref?.()}});return c.queue=d.then(()=>void 0,()=>void 0),d}async function j(a,b={}){let c=new e.X({cwd:b.cwd??(0,d.homedir)(),extraArgs:f,env:b.env});try{let d=await c.waitReady(6e4);return await c.negotiateProtocol(d),await c.sendCommand(a,b.timeoutMs??6e4)}finally{await c.dispose()}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,3798],()=>b(b.s=21342));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=7769,a.ids=[7769],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1180:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>m});var d=c(23211),e=c(65644),f=c(79748),g=c(21820),h=c(33873),i=c.n(h);async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await f.stat(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}async function k(a){return f.realpath("~"===a?(0,g.homedir)():a.startsWith("~/")?i().resolve((0,g.homedir)(),a.slice(2)):i().resolve(a))}async function l(a){let b=Reflect.get(f,"readdir"),c=await b(a,{withFileTypes:!0});return(await Promise.all(c.map(async b=>{if(b.isDirectory())return{name:b.name,path:i().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=i().join(a,b.name),d=await f.realpath(c);if(!(await f.stat(d)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}async function m(a){try{var b;let c,e,h,m,n=a.nextUrl.searchParams.get("path")?.trim();if(function(a,b=process.platform){return"win32"===b&&!a}(n))return d.NextResponse.json({path:"",parentPath:null,drives:await j(),directories:[]});let o=n||(0,g.homedir)();try{c=await k(o)}catch{return d.NextResponse.json({error:"Directory does not exist",code:"directory_not_found"},{status:404})}if(!(await (0,f.stat)(c)).isDirectory())return d.NextResponse.json({error:"Path is not a directory",code:"not_a_directory"},{status:400});let p=await l(c);return d.NextResponse.json({path:c,parentPath:(b=c,h=(e=/^[a-zA-Z]:[\\/]/.test(b)||b.startsWith("\\\\")?i().win32:b.startsWith("/")?i().posix:i()).normalize(b),(m=e.dirname(h))===h?null:m),directories:p})}catch(a){return(0,e.Q)(a)}}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},26867:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/browse/route",pathname:"/api/cwd/browse",filename:"route",bundlePath:"app/api/cwd/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/cwd/browse/route.ts",nextConfigOutput:"",userland:()=>c(1180),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=26867));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=7769,a.ids=[7769],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1180:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>m});var d=c(23211),e=c(65644),f=c(79748),g=c(21820),h=c(33873),i=c.n(h);async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await f.stat(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}async function k(a){return f.realpath("~"===a?(0,g.homedir)():a.startsWith("~/")?i().resolve((0,g.homedir)(),a.slice(2)):i().resolve(a))}async function l(a){let b=Reflect.get(f,"readdir"),c=await b(a,{withFileTypes:!0});return(await Promise.all(c.map(async b=>{if(b.isDirectory())return{name:b.name,path:i().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=i().join(a,b.name),d=await f.realpath(c);if(!(await f.stat(d)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}async function m(a){try{var b;let c,e,h,m,n=a.nextUrl.searchParams.get("path")?.trim();if(function(a,b=process.platform){return"win32"===b&&!a}(n))return d.NextResponse.json({path:"",parentPath:null,drives:await j(),directories:[]});let o=n||(0,g.homedir)();try{c=await k(o)}catch{return d.NextResponse.json({error:"Directory does not exist",code:"directory_not_found"},{status:404})}if(!(await (0,f.stat)(c)).isDirectory())return d.NextResponse.json({error:"Path is not a directory",code:"not_a_directory"},{status:400});let p=await l(c);return d.NextResponse.json({path:c,parentPath:(b=c,h=(e=/^[a-zA-Z]:[\\/]/.test(b)||b.startsWith("\\\\")?i().win32:b.startsWith("/")?i().posix:i()).normalize(b),(m=e.dirname(h))===h?null:m),directories:p})}catch(a){return(0,e.Q)(a)}}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29738:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/browse/route",pathname:"/api/cwd/browse",filename:"route",bundlePath:"app/api/cwd/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/cwd/browse/route.ts",nextConfigOutput:"",userland:()=>c(1180),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=29738));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=2837,a.ids=[2837],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20816:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>l});var d=c(23211),e=c(65644),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(58864),k=c(24923);async function l(a){try{let b,c=await a.json(),e="string"==typeof c.cwd?c.cwd.trim():"";if(!e)return d.NextResponse.json({error:"Path is required",code:"path_required"},{status:400});let l="~"===e?(0,g.homedir)():e.startsWith("~/")?(0,h.resolve)((0,g.homedir)(),e.slice(2)):(0,h.isAbsolute)(e)?e:(0,h.resolve)(e);try{b=(0,f.statSync)(l)}catch{return d.NextResponse.json({error:`Directory does not exist: ${e}`,code:"directory_not_found"},{status:400})}if(!b.isDirectory())return d.NextResponse.json({error:`Path is not a directory: ${e}`,code:"not_a_directory"},{status:400});(0,i.wz)(l);let m=await (0,k.KI)(l);return d.NextResponse.json({success:!0,cwd:l,projectRoot:m.projectRoot,projectKey:(0,j.z8)(m.projectRoot)})}catch(a){return(0,e.Q)(a)}}},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},50355:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/validate/route",pathname:"/api/cwd/validate",filename:"route",bundlePath:"app/api/cwd/validate/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/cwd/validate/route.ts",nextConfigOutput:"",userland:()=>c(20816),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=50355));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=2837,a.ids=[2837],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20816:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>l});var d=c(23211),e=c(65644),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(58864),k=c(24923);async function l(a){try{let b,c=await a.json(),e="string"==typeof c.cwd?c.cwd.trim():"";if(!e)return d.NextResponse.json({error:"Path is required",code:"path_required"},{status:400});let l="~"===e?(0,g.homedir)():e.startsWith("~/")?(0,h.resolve)((0,g.homedir)(),e.slice(2)):(0,h.isAbsolute)(e)?e:(0,h.resolve)(e);try{b=(0,f.statSync)(l)}catch{return d.NextResponse.json({error:`Directory does not exist: ${e}`,code:"directory_not_found"},{status:400})}if(!b.isDirectory())return d.NextResponse.json({error:`Path is not a directory: ${e}`,code:"not_a_directory"},{status:400});(0,i.wz)(l);let m=await (0,k.KI)(l);return d.NextResponse.json({success:!0,cwd:l,projectRoot:m.projectRoot,projectKey:(0,j.z8)(m.projectRoot)})}catch(a){return(0,e.Q)(a)}}},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},36394:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/validate/route",pathname:"/api/cwd/validate",filename:"route",bundlePath:"app/api/cwd/validate/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/cwd/validate/route.ts",nextConfigOutput:"",userland:()=>c(20816),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=36394));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=976,a.ids=[976],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65551:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>j});var d=c(23211),e=c(65644),f=c(29021),g=c(21820),h=c(33873),i=c(80547);async function j(){try{let a=new Date().toISOString().slice(0,10).replace(/-/g,""),b=(0,h.join)((0,g.homedir)(),`omp-cwd-${a}`);return(0,f.mkdirSync)(b,{recursive:!0}),(0,i.wz)(b),d.NextResponse.json({cwd:b})}catch(a){return(0,e.Q)(a)}}},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87053:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/default-cwd/route",pathname:"/api/default-cwd",filename:"route",bundlePath:"app/api/default-cwd/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/default-cwd/route.ts",nextConfigOutput:"",userland:()=>c(65551),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/default-cwd/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=87053));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=976,a.ids=[976],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65336:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/default-cwd/route",pathname:"/api/default-cwd",filename:"route",bundlePath:"app/api/default-cwd/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/default-cwd/route.ts",nextConfigOutput:"",userland:()=>c(65551),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/default-cwd/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},65551:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>j});var d=c(23211),e=c(65644),f=c(29021),g=c(21820),h=c(33873),i=c(80547);async function j(){try{let a=new Date().toISOString().slice(0,10).replace(/-/g,""),b=(0,h.join)((0,g.homedir)(),`omp-cwd-${a}`);return(0,f.mkdirSync)(b,{recursive:!0}),(0,i.wz)(b),d.NextResponse.json({cwd:b})}catch(a){return(0,e.Q)(a)}}},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=65336));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=7067,a.ids=[7067],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},25553:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>s});var d=c(23211),e=c(65644),f=c(79646),g=c(28354),h=c(29021),i=c.n(h),j=c(33873),k=c.n(j),l=c(80547);function m(a){let b=0;for(let c=0;c<a.length;c++)"/"===a[c]&&b++;return b}function n(a,b){if(!a)return!0;let c=0;for(let d=0;d<b.length&&c<a.length;d++)b[d]===a[c]&&c++;return c===a.length}let o=(0,g.promisify)(f.execFile),p=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store"]),q=[".pyc"];async function r(a){try{let{stdout:b}=await o("git",["-C",a,"ls-files","--cached","--others","--exclude-standard","-z"],{timeout:1e4,maxBuffer:0x4000000,env:{...process.env,LC_ALL:"C"}}),c=b.split("\0").filter(Boolean);if(c.length>2e5)return{files:c.slice(0,2e5),hardTruncated:!0};return{files:c,hardTruncated:!1}}catch{return null}}async function s(a){try{let b,c=a.nextUrl.searchParams.get("cwd")?.trim()??"";if(!c||!c.startsWith("/")&&!(0,l.uK)(c))return d.NextResponse.json({error:"cwd must be an absolute path",code:"cwd_must_be_absolute"},{status:400});let e=a.nextUrl.searchParams.get("q")?.slice(0,500)??"",f=await (0,l.mc)();if(!(0,l.A$)(c,f))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});try{b=i().statSync(c)}catch{return d.NextResponse.json({error:"Directory not found",code:"directory_not_found"},{status:404})}if(!b.isDirectory())return d.NextResponse.json({error:"Not a directory",code:"not_a_directory"},{status:400});if(!(0,l.B7)(c,f))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});let g=(globalThis.__piFileIndexCache||(globalThis.__piFileIndexCache=new Map),globalThis.__piFileIndexCache),h=Date.now(),j=g.get(c);if(!j||j.expiresAt<=h){let a=await r(c)??function(a){let b=[],c=[{abs:a,rel:"",depth:0}];for(;c.length>0;){let a,{abs:d,rel:e,depth:f}=c.shift();try{a=Reflect.get(i(),"readdirSync")(d,{withFileTypes:!0})}catch{continue}for(let g of a){if(p.has(g.name)||q.some(a=>g.name.endsWith(a)))continue;let a=e?`${e}/${g.name}`:g.name;if(g.isDirectory())f+1<=8&&c.push({abs:k().join(d,g.name),rel:a,depth:f+1});else if(g.isFile()){if(b.length>=5e4)return{files:b,hardTruncated:!0};b.push(a)}}}return{files:b,hardTruncated:!1}}(c);for(let[a,b]of g)b.expiresAt<=h&&g.delete(a);g.size>=20&&g.clear(),j={listing:a,expiresAt:h+1e4},g.set(c,j)}if(e)return j.entries??=function(a){let b=new Set;for(let c of a){let a=c.indexOf("/");for(;-1!==a;)b.add(c.slice(0,a)),a=c.indexOf("/",a+1)}let c=[];for(let a of b)c.push({path:a,isDir:!0});for(let b of a)b&&c.push({path:b,isDir:!1});return c.sort((a,b)=>m(a.path)-m(b.path)||a.path.localeCompare(b.path)),c}(j.listing.files),d.NextResponse.json({matches:function(a,b,c=20){let d=b.toLowerCase();if(!d)return a.slice(0,c);let e=[];for(let b of a){let a=function(a,b){let c=a.path.toLowerCase(),d=0;if(b.includes("/"))c===b?d=100:c.startsWith(b)?d=80:c.includes(b)?d=50:n(b,c)&&(d=10);else{let a=c.lastIndexOf("/"),e=-1===a?c:c.slice(a+1);e===b?d=100:e.startsWith(b)?d=80:e.includes(b)?d=50:c.includes(b)?d=30:n(b,c)&&(d=10)}return a.isDir&&d>0&&(d+=10),d}(b,d);a>0&&e.push({entry:b,score:a})}return e.sort((a,b)=>b.score-a.score||m(a.entry.path)-m(b.entry.path)||a.entry.path.localeCompare(b.entry.path)),e.slice(0,c).map(a=>a.entry)}(j.entries,e)});let{files:o,hardTruncated:s}=j.listing;return d.NextResponse.json({files:o.slice(0,5e3),truncated:s||o.length>5e3})}catch(a){return(0,e.Q)(a)}}},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44699:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/file-index/route",pathname:"/api/file-index",filename:"route",bundlePath:"app/api/file-index/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/file-index/route.ts",nextConfigOutput:"",userland:()=>c(25553),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-index/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=44699));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=7067,a.ids=[7067],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},25553:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>s});var d=c(23211),e=c(65644),f=c(79646),g=c(28354),h=c(29021),i=c.n(h),j=c(33873),k=c.n(j),l=c(80547);function m(a){let b=0;for(let c=0;c<a.length;c++)"/"===a[c]&&b++;return b}function n(a,b){if(!a)return!0;let c=0;for(let d=0;d<b.length&&c<a.length;d++)b[d]===a[c]&&c++;return c===a.length}let o=(0,g.promisify)(f.execFile),p=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store"]),q=[".pyc"];async function r(a){try{let{stdout:b}=await o("git",["-C",a,"ls-files","--cached","--others","--exclude-standard","-z"],{timeout:1e4,maxBuffer:0x4000000,env:{...process.env,LC_ALL:"C"}}),c=b.split("\0").filter(Boolean);if(c.length>2e5)return{files:c.slice(0,2e5),hardTruncated:!0};return{files:c,hardTruncated:!1}}catch{return null}}async function s(a){try{let b,c=a.nextUrl.searchParams.get("cwd")?.trim()??"";if(!c||!c.startsWith("/")&&!(0,l.uK)(c))return d.NextResponse.json({error:"cwd must be an absolute path",code:"cwd_must_be_absolute"},{status:400});let e=a.nextUrl.searchParams.get("q")?.slice(0,500)??"",f=await (0,l.mc)();if(!(0,l.A$)(c,f))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});try{b=i().statSync(c)}catch{return d.NextResponse.json({error:"Directory not found",code:"directory_not_found"},{status:404})}if(!b.isDirectory())return d.NextResponse.json({error:"Not a directory",code:"not_a_directory"},{status:400});if(!(0,l.B7)(c,f))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});let g=(globalThis.__piFileIndexCache||(globalThis.__piFileIndexCache=new Map),globalThis.__piFileIndexCache),h=Date.now(),j=g.get(c);if(!j||j.expiresAt<=h){let a=await r(c)??function(a){let b=[],c=[{abs:a,rel:"",depth:0}];for(;c.length>0;){let a,{abs:d,rel:e,depth:f}=c.shift();try{a=Reflect.get(i(),"readdirSync")(d,{withFileTypes:!0})}catch{continue}for(let g of a){if(p.has(g.name)||q.some(a=>g.name.endsWith(a)))continue;let a=e?`${e}/${g.name}`:g.name;if(g.isDirectory())f+1<=8&&c.push({abs:k().join(d,g.name),rel:a,depth:f+1});else if(g.isFile()){if(b.length>=5e4)return{files:b,hardTruncated:!0};b.push(a)}}}return{files:b,hardTruncated:!1}}(c);for(let[a,b]of g)b.expiresAt<=h&&g.delete(a);g.size>=20&&g.clear(),j={listing:a,expiresAt:h+1e4},g.set(c,j)}if(e)return j.entries??=function(a){let b=new Set;for(let c of a){let a=c.indexOf("/");for(;-1!==a;)b.add(c.slice(0,a)),a=c.indexOf("/",a+1)}let c=[];for(let a of b)c.push({path:a,isDir:!0});for(let b of a)b&&c.push({path:b,isDir:!1});return c.sort((a,b)=>m(a.path)-m(b.path)||a.path.localeCompare(b.path)),c}(j.listing.files),d.NextResponse.json({matches:function(a,b,c=20){let d=b.toLowerCase();if(!d)return a.slice(0,c);let e=[];for(let b of a){let a=function(a,b){let c=a.path.toLowerCase(),d=0;if(b.includes("/"))c===b?d=100:c.startsWith(b)?d=80:c.includes(b)?d=50:n(b,c)&&(d=10);else{let a=c.lastIndexOf("/"),e=-1===a?c:c.slice(a+1);e===b?d=100:e.startsWith(b)?d=80:e.includes(b)?d=50:c.includes(b)?d=30:n(b,c)&&(d=10)}return a.isDir&&d>0&&(d+=10),d}(b,d);a>0&&e.push({entry:b,score:a})}return e.sort((a,b)=>b.score-a.score||m(a.entry.path)-m(b.entry.path)||a.entry.path.localeCompare(b.entry.path)),e.slice(0,c).map(a=>a.entry)}(j.entries,e)});let{files:o,hardTruncated:s}=j.listing;return d.NextResponse.json({files:o.slice(0,5e3),truncated:s||o.length>5e3})}catch(a){return(0,e.Q)(a)}}},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46082:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/file-index/route",pathname:"/api/file-index",filename:"route",bundlePath:"app/api/file-index/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/file-index/route.ts",nextConfigOutput:"",userland:()=>c(25553),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-index/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=46082));module.exports=c})();
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var a={};a.id=4037,a.ids=[4037],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>n,GO:()=>j,X:()=>l,_4:()=>d,cV:()=>k,jL:()=>f,kv:()=>e,oC:()=>m});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm",webm:"audio/webm"},i={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function j(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function k(a){return g[j(a)]??null}function l(a){return h[j(a)]??null}function m(a){return i[j(a)]??null}function n(a){let b=j(a);return"pdf"===b||"docx"===b?b:null}},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},8571:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/files/[...path]/route",pathname:"/api/files/[...path]",filename:"route",bundlePath:"app/api/files/[...path]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/files/[...path]/route.ts",nextConfigOutput:"",userland:()=>c(86597),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/[...path]/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29359:(a,b,c)=>{c.d(b,{jV:()=>l,Iq:()=>k});var d=c(78573);let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}async function j(a,b,c){if(!(b&&e.test(b)))return!1;try{let e=await (0,d.os)(b);if(!e)return!1;return c(a,(0,d.DK)(e))}catch{return!1}}function k(a,b){return j(a,b,h)}function l(a,b){return j(a,b,i)}},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},66829:(a,b,c)=>{c.d(b,{H8:()=>d,sj:()=>g,sp:()=>f});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}function e(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}async function f(a,b){let c=e(a);if(null!==c&&c>b)throw new d;let f=a.body?.getReader();if(!f){let c=await a.text();if(Buffer.byteLength(c,"utf8")>b)throw new d;return JSON.parse(c)}let g=[],h=0;try{for(;;){let{done:a,value:c}=await f.read();if(a)break;if(h+c.byteLength>b)throw await f.cancel().catch(()=>{}),new d;h+=c.byteLength;let e=new Uint8Array(c.byteLength);e.set(c),g.push(e)}}finally{f.releaseLock()}let i=new Uint8Array(h),j=0;for(let a of g)i.set(a,j),j+=a.byteLength;return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(i))}async function g(a,b){let c=e(a);if(null!==c&&c>b)throw new d;let f=a.body?.getReader();if(!f)return a.formData();let g=[],h=0;try{for(;;){let{done:a,value:c}=await f.read();if(a)break;if(h+c.byteLength>b)throw await f.cancel().catch(()=>{}),new d;h+=c.byteLength;let e=new Uint8Array(c.byteLength);e.set(c),g.push(e)}}finally{f.releaseLock()}let i=a.headers.get("content-type");return new Response(new Blob(g),{headers:i?{"content-type":i}:void 0}).formData()}},74075:a=>{a.exports=require("zlib")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86597:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>A,POST:()=>x});var d=c(23211),e=c(65644),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(80547),k=c(1060),l=c(29359);let m=new Set(["error","overwrite","skip"]);function n(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||i().basename(c)!==c)return`File names must not contain a path: ${c}`;let a="win32"===process.platform?c.toLocaleLowerCase():c;if(b.has(a))return`Duplicate file name in upload: ${c}`;b.add(a)}return null}function o(a,b){let c=[],d=[];for(let e of b){let b,f=i().join(a,e);try{b=g().lstatSync(f)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(e),(!b.isFile()||b.isSymbolicLink())&&d.push(e)}return{conflicts:c,nonReplaceable:d}}var p=c(66829);let q=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store",".git"]),r=[".pyc"],s=new Set(["list","read","download","meta","preview","watch"]),t={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",html:"html",htm:"html",css:"css",scss:"css",less:"css",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",toml:"toml",xml:"xml",md:"markdown",mdx:"markdown",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",tf:"hcl",hcl:"hcl",env:"bash",gitignore:"bash",txt:"text",pdf:"pdf",docx:"word"};function u(a){let b=i().basename(a).toLowerCase();return"dockerfile"===b||b.startsWith("dockerfile.")?"dockerfile":".env"===b||b.startsWith(".env.")?"bash":"makefile"===b||"gnumakefile"===b?"makefile":t[b.split(".").pop()??""]??"text"}function v(a){let b=a.join("/"),c=(0,j.Nw)(b);return(0,j.uK)(c)?c:"/"+b.replace(/^\/+/,"")}async function w(a){let b,c=v(a),e=await (0,j.mc)();if(!(0,j.A$)(c,e))return{response:d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403})};try{b=g().statSync(c)}catch{return{response:d.NextResponse.json({error:"Upload directory not found",code:"upload_directory_not_found"},{status:404})}}if(!b.isDirectory())return{response:d.NextResponse.json({error:"Upload target is not a directory",code:"upload_target_not_directory"},{status:400})};let f=g().realpathSync(c),h=new Set;for(let a of e)try{h.add(g().realpathSync(a))}catch{}return(0,j.A$)(f,h)?{directory:f}:{response:d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403})}}async function x(a,{params:b}){try{let e,f,{path:h}=await b,j=await w(h);if("response"in j)return j.response;let{directory:k}=j,l=a.nextUrl.searchParams.get("type")??"upload";if("upload-check"===l){var c;let b;try{b=await (0,p.sp)(a,1048576)}catch(a){if(a instanceof p.H8)return d.NextResponse.json({error:"Upload check request is too large",code:"upload_check_too_large"},{status:413});b=null}let e=(c=b?.fileNames,Array.isArray(c)&&c.every(a=>"string"==typeof a)?c:null);if(!e)return d.NextResponse.json({error:"fileNames must be an array of strings",code:"invalid_file_names"},{status:400});let f=n(e);if(f)return d.NextResponse.json({error:f},{status:400});return d.NextResponse.json(o(k,e))}if("upload"!==l)return d.NextResponse.json({error:"Invalid upload request type",code:"invalid_upload_type"},{status:400});let q=(f=a.nextUrl.searchParams.get("conflict")??"error",m.has(f)?f:null);if(!q)return d.NextResponse.json({error:"Invalid conflict strategy",code:"invalid_conflict_strategy"},{status:400});try{e=await (0,p.sj)(a,0x6500000)}catch(a){if(a instanceof p.H8)return d.NextResponse.json({error:"Uploads must total 100MB or less",code:"upload_total_too_large"},{status:413});throw a}let r=e.getAll("files").filter(a=>"string"!=typeof a);if(r.some(a=>a.size>0x1900000))return d.NextResponse.json({error:"Each upload must be 25MB or smaller",code:"upload_file_too_large"},{status:413});if(r.reduce((a,b)=>a+b.size,0)>0x6400000)return d.NextResponse.json({error:"Uploads must total 100MB or less",code:"upload_total_too_large"},{status:413});let s=r.map(a=>a.name),t=n(s);if(t)return d.NextResponse.json({error:t},{status:400});let u=o(k,s);if("error"===q&&u.conflicts.length>0)return d.NextResponse.json({error:"One or more files already exist",code:"upload_conflict",conflicts:u.conflicts,nonReplaceable:u.nonReplaceable},{status:409});let v=new Set(u.conflicts),x=new Set(u.nonReplaceable),y=[],z=[],A=[],B=(a,b)=>{A.push({name:a.name,error:b instanceof Error?b.message:String(b)})};for(let a of r){let b,c=i().join(k,a.name);if(v.has(a.name)&&"skip"===q){z.push(a.name);continue}if(v.has(a.name)&&x.has(a.name)){A.push({name:a.name,error:"Cannot replace a directory or symbolic link"});continue}try{b=Buffer.from(await a.arrayBuffer())}catch(b){B(a,b);continue}if(v.has(a.name))try{g().unlinkSync(c)}catch(b){B(a,b);continue}try{g().writeFileSync(c,b,{flag:"wx"}),y.push(a.name)}catch(b){B(a,b)}}return d.NextResponse.json({uploaded:y,skipped:z,errors:A},{status:A.length>0?207:200})}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}function y(a,b){let c=g().createReadStream(a,b),d=!1;return new ReadableStream({start(a){c.on("data",b=>{if(!d)try{a.enqueue(new Uint8Array(b))}catch{d=!0,c.destroy()}}),c.once("end",()=>{if(!d){d=!0;try{a.close()}catch{}}}),c.once("error",b=>{if(!d){d=!0;try{a.error(b)}catch{}}})},cancel(){d=!0,c.destroy()}})}function z(a,b,c,d,e=!1){let f={"Content-Type":c,"Cache-Control":"no-cache","Accept-Ranges":"bytes","Content-Disposition":function(a,b=!1){let c=i().basename(a),d=c.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"download";return`${b?"attachment":"inline"}; filename="${d}"; filename*=UTF-8''${encodeURIComponent(c).replace(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`)}`}(a,e)};if(!d)return new Response(y(a),{headers:{...f,"Content-Length":String(b.size)}});let g=/^bytes=(\d*)-(\d*)$/.exec(d);if(!g)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let h=g[1]?Number(g[1]):0,j=g[2]?Number(g[2]):b.size-1;if(!g[1]&&g[2]){let a=Number(g[2]);h=Math.max(b.size-a,0),j=b.size-1}if(!Number.isFinite(h)||!Number.isFinite(j)||h<0||j<h||h>=b.size)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let k=(j=Math.min(j,b.size-1))-h+1;return new Response(y(a,{start:h,end:j}),{status:206,headers:{...f,"Content-Length":String(k),"Content-Range":`bytes ${h}-${j}/${b.size}`}})}async function A(a,{params:b}){try{var f,h,m;let e,{path:n}=await b,o=v(n),p=(f=a.nextUrl.searchParams.get("type")??"list",s.has(f)?f:null);if(!p)return d.NextResponse.json({error:"Invalid file request type",code:"invalid_request_type"},{status:400});let t=a.nextUrl.searchParams.get("sessionId"),w=await (0,j.mc)(),x=(0,j.A$)(o,w),y=!x&&"list"!==p&&await (0,l.Iq)(o,t);if(!x&&!y)return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});try{e=g().statSync(o)}catch{return d.NextResponse.json({error:"Not found",code:"file_not_found"},{status:404})}if(!y&&!(0,j.B7)(o,w))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});if("read"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});let b=(0,k.cV)(o);if(b){if(e.size>k.kv)return d.NextResponse.json({error:"Image too large (>10MB)",code:"image_too_large"},{status:413});return z(o,e,b,a.headers.get("range"))}let c=(0,k.X)(o);if(c)return z(o,e,c,a.headers.get("range"));let f=(0,k.oC)(o);if(f)return z(o,e,f,a.headers.get("range"));if(e.size>k._4)return d.NextResponse.json({error:"File too large for preview (>256KB)",code:"file_too_large_preview"},{status:413});let h=g().readFileSync(o,"utf-8"),i=u(o);return d.NextResponse.json({content:h,language:i,size:e.size})}if("download"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});let b=(0,k.cV)(o)||(0,k.X)(o)||(0,k.oC)(o)||"application/octet-stream";return z(o,e,b,a.headers.get("range"),!0)}if("meta"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});let a=(0,k.cV)(o),b=(0,k.X)(o),c=(0,k.oC)(o);return d.NextResponse.json({size:e.size,language:u(o),mime:a||b||c||"text/plain",previewKind:(0,k.Ac)(o)})}if("preview"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});if("docx"!==(0,k.GO)(o))return d.NextResponse.json({error:"Preview not available for this file type",code:"preview_unavailable"},{status:400});if(e.size>k.jL)return d.NextResponse.json({error:"DOCX too large for preview (>10MB)",code:"docx_too_large"},{status:413});let a=await c.e(3379).then(c.t.bind(c,53379,19)),b=(h=(await a.convertToHtml({path:o},{externalFileAccess:!1,convertImage:a.images.dataUri})).value,m=i().basename(o),`<!doctype html>
1
+ "use strict";(()=>{var a={};a.id=4037,a.ids=[4037],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>p,GO:()=>k,X:()=>m,_4:()=>d,cV:()=>l,jL:()=>f,k2:()=>n,kv:()=>e,oC:()=>o});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm",webm:"audio/webm"},i={mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",mov:"video/quicktime",ogv:"video/ogg",mkv:"video/x-matroska"},j={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function k(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function l(a){return g[k(a)]??null}function m(a){return h[k(a)]??null}function n(a){return i[k(a)]??null}function o(a){return j[k(a)]??null}function p(a){let b=k(a);return"pdf"===b||"docx"===b?b:null}},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29359:(a,b,c)=>{c.d(b,{jV:()=>l,Iq:()=>k});var d=c(78573);let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}async function j(a,b,c){if(!(b&&e.test(b)))return!1;try{let e=await (0,d.os)(b);if(!e)return!1;return c(a,(0,d.DK)(e))}catch{return!1}}function k(a,b){return j(a,b,h)}function l(a,b){return j(a,b,i)}},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65644:(a,b,c)=>{c.d(b,{Q:()=>h,r:()=>g});var d=c(23211),e=c(78573);let f={error:"Session not found",code:"session_not_found"};async function g(a){let b=await (0,e.os)(a);return b?{filePath:b}:{response:d.NextResponse.json(f,{status:404})}}function h(a,b=500){return d.NextResponse.json({error:String(a)},{status:b})}},66829:(a,b,c)=>{c.d(b,{H8:()=>d,sj:()=>g,sp:()=>f});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}function e(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}async function f(a,b){let c=e(a);if(null!==c&&c>b)throw new d;let f=a.body?.getReader();if(!f){let c=await a.text();if(Buffer.byteLength(c,"utf8")>b)throw new d;return JSON.parse(c)}let g=[],h=0;try{for(;;){let{done:a,value:c}=await f.read();if(a)break;if(h+c.byteLength>b)throw await f.cancel().catch(()=>{}),new d;h+=c.byteLength;let e=new Uint8Array(c.byteLength);e.set(c),g.push(e)}}finally{f.releaseLock()}let i=new Uint8Array(h),j=0;for(let a of g)i.set(a,j),j+=a.byteLength;return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(i))}async function g(a,b){let c=e(a);if(null!==c&&c>b)throw new d;let f=a.body?.getReader();if(!f)return a.formData();let g=[],h=0;try{for(;;){let{done:a,value:c}=await f.read();if(a)break;if(h+c.byteLength>b)throw await f.cancel().catch(()=>{}),new d;h+=c.byteLength;let e=new Uint8Array(c.byteLength);e.set(c),g.push(e)}}finally{f.releaseLock()}let i=a.headers.get("content-type");return new Response(new Blob(g),{headers:i?{"content-type":i}:void 0}).formData()}},70146:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/files/[...path]/route",pathname:"/api/files/[...path]",filename:"route",bundlePath:"app/api/files/[...path]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/files/[...path]/route.ts",nextConfigOutput:"",userland:()=>c(86597),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/[...path]/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},74075:a=>{a.exports=require("zlib")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},86597:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>A,POST:()=>x});var d=c(23211),e=c(65644),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(80547),k=c(1060),l=c(29359);let m=new Set(["error","overwrite","skip"]);function n(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||i().basename(c)!==c)return`File names must not contain a path: ${c}`;let a="win32"===process.platform?c.toLocaleLowerCase():c;if(b.has(a))return`Duplicate file name in upload: ${c}`;b.add(a)}return null}function o(a,b){let c=[],d=[];for(let e of b){let b,f=i().join(a,e);try{b=g().lstatSync(f)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(e),(!b.isFile()||b.isSymbolicLink())&&d.push(e)}return{conflicts:c,nonReplaceable:d}}var p=c(66829);let q=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store",".git"]),r=[".pyc"],s=new Set(["list","read","download","meta","preview","watch"]),t={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",html:"html",htm:"html",css:"css",scss:"css",less:"css",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",toml:"toml",xml:"xml",md:"markdown",mdx:"markdown",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",tf:"hcl",hcl:"hcl",env:"bash",gitignore:"bash",txt:"text",pdf:"pdf",docx:"word"};function u(a){let b=i().basename(a).toLowerCase();return"dockerfile"===b||b.startsWith("dockerfile.")?"dockerfile":".env"===b||b.startsWith(".env.")?"bash":"makefile"===b||"gnumakefile"===b?"makefile":t[b.split(".").pop()??""]??"text"}function v(a){let b=a.join("/"),c=(0,j.Nw)(b);return(0,j.uK)(c)?c:"/"+b.replace(/^\/+/,"")}async function w(a){let b,c=v(a),e=await (0,j.mc)();if(!(0,j.A$)(c,e))return{response:d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403})};try{b=g().statSync(c)}catch{return{response:d.NextResponse.json({error:"Upload directory not found",code:"upload_directory_not_found"},{status:404})}}if(!b.isDirectory())return{response:d.NextResponse.json({error:"Upload target is not a directory",code:"upload_target_not_directory"},{status:400})};let f=g().realpathSync(c),h=new Set;for(let a of e)try{h.add(g().realpathSync(a))}catch{}return(0,j.A$)(f,h)?{directory:f}:{response:d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403})}}async function x(a,{params:b}){try{let e,f,{path:h}=await b,j=await w(h);if("response"in j)return j.response;let{directory:k}=j,l=a.nextUrl.searchParams.get("type")??"upload";if("upload-check"===l){var c;let b;try{b=await (0,p.sp)(a,1048576)}catch(a){if(a instanceof p.H8)return d.NextResponse.json({error:"Upload check request is too large",code:"upload_check_too_large"},{status:413});b=null}let e=(c=b?.fileNames,Array.isArray(c)&&c.every(a=>"string"==typeof a)?c:null);if(!e)return d.NextResponse.json({error:"fileNames must be an array of strings",code:"invalid_file_names"},{status:400});let f=n(e);if(f)return d.NextResponse.json({error:f},{status:400});return d.NextResponse.json(o(k,e))}if("upload"!==l)return d.NextResponse.json({error:"Invalid upload request type",code:"invalid_upload_type"},{status:400});let q=(f=a.nextUrl.searchParams.get("conflict")??"error",m.has(f)?f:null);if(!q)return d.NextResponse.json({error:"Invalid conflict strategy",code:"invalid_conflict_strategy"},{status:400});try{e=await (0,p.sj)(a,0x6500000)}catch(a){if(a instanceof p.H8)return d.NextResponse.json({error:"Uploads must total 100MB or less",code:"upload_total_too_large"},{status:413});throw a}let r=e.getAll("files").filter(a=>"string"!=typeof a);if(r.some(a=>a.size>0x1900000))return d.NextResponse.json({error:"Each upload must be 25MB or smaller",code:"upload_file_too_large"},{status:413});if(r.reduce((a,b)=>a+b.size,0)>0x6400000)return d.NextResponse.json({error:"Uploads must total 100MB or less",code:"upload_total_too_large"},{status:413});let s=r.map(a=>a.name),t=n(s);if(t)return d.NextResponse.json({error:t},{status:400});let u=o(k,s);if("error"===q&&u.conflicts.length>0)return d.NextResponse.json({error:"One or more files already exist",code:"upload_conflict",conflicts:u.conflicts,nonReplaceable:u.nonReplaceable},{status:409});let v=new Set(u.conflicts),x=new Set(u.nonReplaceable),y=[],z=[],A=[],B=(a,b)=>{A.push({name:a.name,error:b instanceof Error?b.message:String(b)})};for(let a of r){let b,c=i().join(k,a.name);if(v.has(a.name)&&"skip"===q){z.push(a.name);continue}if(v.has(a.name)&&x.has(a.name)){A.push({name:a.name,error:"Cannot replace a directory or symbolic link"});continue}try{b=Buffer.from(await a.arrayBuffer())}catch(b){B(a,b);continue}if(v.has(a.name))try{g().unlinkSync(c)}catch(b){B(a,b);continue}try{g().writeFileSync(c,b,{flag:"wx"}),y.push(a.name)}catch(b){B(a,b)}}return d.NextResponse.json({uploaded:y,skipped:z,errors:A},{status:A.length>0?207:200})}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}function y(a,b){let c=g().createReadStream(a,b),d=!1;return new ReadableStream({start(a){c.on("data",b=>{if(!d)try{a.enqueue(new Uint8Array(b))}catch{d=!0,c.destroy()}}),c.once("end",()=>{if(!d){d=!0;try{a.close()}catch{}}}),c.once("error",b=>{if(!d){d=!0;try{a.error(b)}catch{}}})},cancel(){d=!0,c.destroy()}})}function z(a,b,c,d,e=!1){let f={"Content-Type":c,"Cache-Control":"no-cache","Accept-Ranges":"bytes","Content-Disposition":function(a,b=!1){let c=i().basename(a),d=c.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"download";return`${b?"attachment":"inline"}; filename="${d}"; filename*=UTF-8''${encodeURIComponent(c).replace(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`)}`}(a,e)};if(!d)return new Response(y(a),{headers:{...f,"Content-Length":String(b.size)}});let g=/^bytes=(\d*)-(\d*)$/.exec(d);if(!g)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let h=g[1]?Number(g[1]):0,j=g[2]?Number(g[2]):b.size-1;if(!g[1]&&g[2]){let a=Number(g[2]);h=Math.max(b.size-a,0),j=b.size-1}if(!Number.isFinite(h)||!Number.isFinite(j)||h<0||j<h||h>=b.size)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let k=(j=Math.min(j,b.size-1))-h+1;return new Response(y(a,{start:h,end:j}),{status:206,headers:{...f,"Content-Length":String(k),"Content-Range":`bytes ${h}-${j}/${b.size}`}})}async function A(a,{params:b}){try{var f,h,m;let e,{path:n}=await b,o=v(n),p=(f=a.nextUrl.searchParams.get("type")??"list",s.has(f)?f:null);if(!p)return d.NextResponse.json({error:"Invalid file request type",code:"invalid_request_type"},{status:400});let t=a.nextUrl.searchParams.get("sessionId"),w=await (0,j.mc)(),x=(0,j.A$)(o,w),y="read"===p&&(0,j.id)(o),A=!x&&!y&&"list"!==p&&await (0,l.Iq)(o,t);if(!x&&!y&&!A)return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});try{e=g().statSync(o)}catch{return d.NextResponse.json({error:"Not found",code:"file_not_found"},{status:404})}if(!A&&!y&&!(0,j.B7)(o,w))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});if("read"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});let b=(0,k.cV)(o);if(b){if(e.size>k.kv)return d.NextResponse.json({error:"Image too large (>10MB)",code:"image_too_large"},{status:413});return z(o,e,b,a.headers.get("range"))}let c=(0,k.X)(o);if(c)return z(o,e,c,a.headers.get("range"));let f=(0,k.k2)(o);if(f)return z(o,e,f,a.headers.get("range"));let h=(0,k.oC)(o);if(h)return z(o,e,h,a.headers.get("range"));if(e.size>k._4)return d.NextResponse.json({error:"File too large for preview (>256KB)",code:"file_too_large_preview"},{status:413});let i=g().readFileSync(o,"utf-8"),j=u(o);return d.NextResponse.json({content:i,language:j,size:e.size})}if("download"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});let b=(0,k.cV)(o)||(0,k.X)(o)||(0,k.k2)(o)||(0,k.oC)(o)||"application/octet-stream";return z(o,e,b,a.headers.get("range"),!0)}if("meta"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});let a=(0,k.cV)(o),b=(0,k.X)(o),c=(0,k.k2)(o),f=(0,k.oC)(o);return d.NextResponse.json({size:e.size,language:u(o),mime:a||b||c||f||"text/plain",previewKind:(0,k.Ac)(o)})}if("preview"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});if("docx"!==(0,k.GO)(o))return d.NextResponse.json({error:"Preview not available for this file type",code:"preview_unavailable"},{status:400});if(e.size>k.jL)return d.NextResponse.json({error:"DOCX too large for preview (>10MB)",code:"docx_too_large"},{status:413});let a=await c.e(3379).then(c.t.bind(c,53379,19)),b=(h=(await a.convertToHtml({path:o},{externalFileAccess:!1,convertImage:a.images.dataUri})).value,m=i().basename(o),`<!doctype html>
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
@@ -46,4 +46,4 @@ ${h}
46
46
  </html>`);return new Response(b,{headers:{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-cache","Content-Security-Policy":"default-src 'none'; img-src data:; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'","Referrer-Policy":"no-referrer","X-Content-Type-Options":"nosniff"}})}if("watch"===p){if(!e.isFile())return d.NextResponse.json({error:"Not a file",code:"not_a_file"},{status:400});let a=null,b=e.mtimeMs,c=e.size,f=new ReadableStream({start(d){let e=(a,b)=>{let c=`event: ${a}
47
47
  data: ${JSON.stringify(b)}
48
48
 
49
- `;try{d.enqueue(new TextEncoder().encode(c))}catch{}};e("connected",{filePath:o});try{(a=g().watch(o,()=>{try{let a=g().statSync(o);if(a.mtimeMs===b&&a.size===c)return;b=a.mtimeMs,c=a.size,e("change",{mtime:a.mtime.toISOString(),size:a.size})}catch{e("change",{mtime:new Date().toISOString(),size:0})}})).on("error",()=>{try{d.close()}catch{}})}catch{e("error",{message:"Failed to watch file"}),d.close()}},cancel(){try{a?.close()}catch{}}});return new Response(f,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}if(!e.isDirectory())return d.NextResponse.json({error:"Not a directory",code:"not_a_directory"},{status:400});let A=Reflect.get(g(),"readdirSync")(o,{withFileTypes:!0}).filter(a=>!q.has(a.name)&&!r.some(b=>a.name.endsWith(b))).flatMap(a=>{let b=function(a,b){if(a.isDirectory())return!0;if(a.isFile())return!1;try{return g().statSync(b).isDirectory()}catch{return null}}(a,i().join(o,a.name));return null===b?[]:[{name:a.name,isDir:b,size:0,modified:""}]}).sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name));return d.NextResponse.json({entries:A,path:o})}catch(a){return(0,e.Q)(a)}}},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=8571));module.exports=c})();
49
+ `;try{d.enqueue(new TextEncoder().encode(c))}catch{}};e("connected",{filePath:o});try{(a=g().watch(o,()=>{try{let a=g().statSync(o);if(a.mtimeMs===b&&a.size===c)return;b=a.mtimeMs,c=a.size,e("change",{mtime:a.mtime.toISOString(),size:a.size})}catch{e("change",{mtime:new Date().toISOString(),size:0})}})).on("error",()=>{try{d.close()}catch{}})}catch{e("error",{message:"Failed to watch file"}),d.close()}},cancel(){try{a?.close()}catch{}}});return new Response(f,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}if(!e.isDirectory())return d.NextResponse.json({error:"Not a directory",code:"not_a_directory"},{status:400});let B=Reflect.get(g(),"readdirSync")(o,{withFileTypes:!0}).filter(a=>!q.has(a.name)&&!r.some(b=>a.name.endsWith(b))).flatMap(a=>{let b=function(a,b){if(a.isDirectory())return!0;if(a.isFile())return!1;try{return g().statSync(b).isDirectory()}catch{return null}}(a,i().join(o,a.name));return null===b?[]:[{name:a.name,isDir:b,size:0,modified:""}]}).sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name));return d.NextResponse.json({entries:B,path:o})}catch(a){return(0,e.Q)(a)}}},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=70146));module.exports=c})();
@@ -1,6 +1,6 @@
1
- "use strict";(()=>{var a={};a.id=2504,a.ids=[2504],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>n,GO:()=>j,X:()=>l,_4:()=>d,cV:()=>k,jL:()=>f,kv:()=>e,oC:()=>m});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm",webm:"audio/webm"},i={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function j(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function k(a){return g[j(a)]??null}function l(a){return h[j(a)]??null}function m(a){return i[j(a)]??null}function n(a){let b=j(a);return"pdf"===b||"docx"===b?b:null}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33012:(a,b,c)=>{c.d(b,{S:()=>u,$:()=>r});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}let m=(0,i.promisify)(d.execFile);async function n(a,b,c=8388608){let{stdout:d}=await m("git",["-C",a,...b],{timeout:1e4,maxBuffer:c,env:{...process.env,LC_ALL:"C"}});return d}async function o(a){try{return(await n(a,["rev-parse","--show-toplevel"])).trim()||null}catch{return null}}function p(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}async function q(a){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await n(a,["status","--porcelain=v1","-z","--untracked-files=all"]))}async function r(a){let b=await o(a);if(!b)return{isGitRepository:!1,repositoryRoot:null,files:[]};let c=(await q(b)).flatMap(c=>{let d=h().resolve(b,c.path);return p(a,d)?[{filePath:d,...l(c),indexStatus:c.indexStatus,worktreeStatus:c.worktreeStatus}]:[]});return{isGitRepository:!0,repositoryRoot:b,files:c}}function s(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
1
+ "use strict";(()=>{var a={};a.id=2504,a.ids=[2504],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>p,GO:()=>k,X:()=>m,_4:()=>d,cV:()=>l,jL:()=>f,k2:()=>n,kv:()=>e,oC:()=>o});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm",webm:"audio/webm"},i={mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",mov:"video/quicktime",ogv:"video/ogg",mkv:"video/x-matroska"},j={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function k(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function l(a){return g[k(a)]??null}function m(a){return h[k(a)]??null}function n(a){return i[k(a)]??null}function o(a){return j[k(a)]??null}function p(a){let b=k(a);return"pdf"===b||"docx"===b?b:null}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33012:(a,b,c)=>{c.d(b,{S:()=>u,$:()=>r});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}let m=(0,i.promisify)(d.execFile);async function n(a,b,c=8388608){let{stdout:d}=await m("git",["-C",a,...b],{timeout:1e4,maxBuffer:c,env:{...process.env,LC_ALL:"C"}});return d}async function o(a){try{return(await n(a,["rev-parse","--show-toplevel"])).trim()||null}catch{return null}}function p(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}async function q(a){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await n(a,["status","--porcelain=v1","-z","--untracked-files=all"]))}async function r(a){let b=await o(a);if(!b)return{isGitRepository:!1,repositoryRoot:null,files:[]};let c=(await q(b)).flatMap(c=>{let d=h().resolve(b,c.path);return p(a,d)?[{filePath:d,...l(c),indexStatus:c.indexStatus,worktreeStatus:c.worktreeStatus}]:[]});return{isGitRepository:!0,repositoryRoot:b,files:c}}function s(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
2
2
  new file mode 100644
3
3
  --- /dev/null
4
4
  +++ b/${a}
5
5
  @@ -0,0 +1,${d.length} @@
6
- ${e}${f}`}async function t(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function u(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b);try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let i=h().relative(e,g).split(h().sep).join("/"),k=(await q(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m)return{supported:!1};let n=f().readFileSync(g);if(n.includes(0))return{supported:!1};let r=n.toString("utf8");if("untracked"===m)d=s(i,r);else{let a=await t(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=s(i,r)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94551:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>g});var d=c(23211),e=c(80547),f=c(33012);async function g(a){try{let b=a.nextUrl.searchParams.get("cwd")?.trim()??"",c=a.nextUrl.searchParams.get("path")?.trim()??"";if(!b||!b.startsWith("/")&&!(0,e.uK)(b))return d.NextResponse.json({error:"cwd must be an absolute path",code:"cwd_must_be_absolute"},{status:400});if(!c||!c.startsWith("/")&&!(0,e.uK)(c))return d.NextResponse.json({error:"path must be an absolute path",code:"path_must_be_absolute"},{status:400});let g=await (0,e.mc)();if(!(0,e.A$)(b,g)||!(0,e.A$)(c,g)||!(0,e.B7)(b,g)||!(0,e.B7)(c,g))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});return d.NextResponse.json(await (0,f.S)(b,c))}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}},98769:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/git/diff/route",pathname:"/api/git/diff",filename:"route",bundlePath:"app/api/git/diff/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/git/diff/route.ts",nextConfigOutput:"",userland:()=>c(94551),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/git/diff/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=98769));module.exports=c})();
6
+ ${e}${f}`}async function t(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function u(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b);try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let i=h().relative(e,g).split(h().sep).join("/"),k=(await q(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m)return{supported:!1};let n=f().readFileSync(g);if(n.includes(0))return{supported:!1};let r=n.toString("utf8");if("untracked"===m)d=s(i,r);else{let a=await t(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=s(i,r)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},43684:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/git/diff/route",pathname:"/api/git/diff",filename:"route",bundlePath:"app/api/git/diff/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/git/diff/route.ts",nextConfigOutput:"",userland:()=>c(94551),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/git/diff/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94551:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>g});var d=c(23211),e=c(80547),f=c(33012);async function g(a){try{let b=a.nextUrl.searchParams.get("cwd")?.trim()??"",c=a.nextUrl.searchParams.get("path")?.trim()??"";if(!b||!b.startsWith("/")&&!(0,e.uK)(b))return d.NextResponse.json({error:"cwd must be an absolute path",code:"cwd_must_be_absolute"},{status:400});if(!c||!c.startsWith("/")&&!(0,e.uK)(c))return d.NextResponse.json({error:"path must be an absolute path",code:"path_must_be_absolute"},{status:400});let g=await (0,e.mc)();if(!(0,e.A$)(b,g)||!(0,e.A$)(c,g)||!(0,e.B7)(b,g)||!(0,e.B7)(c,g))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});return d.NextResponse.json(await (0,f.S)(b,c))}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=43684));module.exports=c})();
@@ -1,6 +1,6 @@
1
- "use strict";(()=>{var a={};a.id=3507,a.ids=[3507],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>n,GO:()=>j,X:()=>l,_4:()=>d,cV:()=>k,jL:()=>f,kv:()=>e,oC:()=>m});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm",webm:"audio/webm"},i={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function j(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function k(a){return g[j(a)]??null}function l(a){return h[j(a)]??null}function m(a){return i[j(a)]??null}function n(a){let b=j(a);return"pdf"===b||"docx"===b?b:null}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33012:(a,b,c)=>{c.d(b,{S:()=>u,$:()=>r});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}let m=(0,i.promisify)(d.execFile);async function n(a,b,c=8388608){let{stdout:d}=await m("git",["-C",a,...b],{timeout:1e4,maxBuffer:c,env:{...process.env,LC_ALL:"C"}});return d}async function o(a){try{return(await n(a,["rev-parse","--show-toplevel"])).trim()||null}catch{return null}}function p(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}async function q(a){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await n(a,["status","--porcelain=v1","-z","--untracked-files=all"]))}async function r(a){let b=await o(a);if(!b)return{isGitRepository:!1,repositoryRoot:null,files:[]};let c=(await q(b)).flatMap(c=>{let d=h().resolve(b,c.path);return p(a,d)?[{filePath:d,...l(c),indexStatus:c.indexStatus,worktreeStatus:c.worktreeStatus}]:[]});return{isGitRepository:!0,repositoryRoot:b,files:c}}function s(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
1
+ "use strict";(()=>{var a={};a.id=3507,a.ids=[3507],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1060:(a,b,c)=>{c.d(b,{Ac:()=>p,GO:()=>k,X:()=>m,_4:()=>d,cV:()=>l,jL:()=>f,k2:()=>n,kv:()=>e,oC:()=>o});let d=262144,e=0xa00000,f=0xa00000,g={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif"},h={mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/ogg",m4a:"audio/mp4",aac:"audio/aac",flac:"audio/flac",weba:"audio/webm",webm:"audio/webm"},i={mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",mov:"video/quicktime",ogv:"video/ogg",mkv:"video/x-matroska"},j={pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};function k(a){return(a.replace(/\\/g,"/").split("/").pop()??"").toLowerCase().split(".").pop()??""}function l(a){return g[k(a)]??null}function m(a){return h[k(a)]??null}function n(a){return i[k(a)]??null}function o(a){return j[k(a)]??null}function p(a){let b=k(a);return"pdf"===b||"docx"===b?b:null}},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33012:(a,b,c)=>{c.d(b,{S:()=>u,$:()=>r});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}let m=(0,i.promisify)(d.execFile);async function n(a,b,c=8388608){let{stdout:d}=await m("git",["-C",a,...b],{timeout:1e4,maxBuffer:c,env:{...process.env,LC_ALL:"C"}});return d}async function o(a){try{return(await n(a,["rev-parse","--show-toplevel"])).trim()||null}catch{return null}}function p(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}async function q(a){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await n(a,["status","--porcelain=v1","-z","--untracked-files=all"]))}async function r(a){let b=await o(a);if(!b)return{isGitRepository:!1,repositoryRoot:null,files:[]};let c=(await q(b)).flatMap(c=>{let d=h().resolve(b,c.path);return p(a,d)?[{filePath:d,...l(c),indexStatus:c.indexStatus,worktreeStatus:c.worktreeStatus}]:[]});return{isGitRepository:!0,repositoryRoot:b,files:c}}function s(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
2
2
  new file mode 100644
3
3
  --- /dev/null
4
4
  +++ b/${a}
5
5
  @@ -0,0 +1,${d.length} @@
6
- ${e}${f}`}async function t(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function u(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b);try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let i=h().relative(e,g).split(h().sep).join("/"),k=(await q(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m)return{supported:!1};let n=f().readFileSync(g);if(n.includes(0))return{supported:!1};let r=n.toString("utf8");if("untracked"===m)d=s(i,r);else{let a=await t(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=s(i,r)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46239:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/git/status/route",pathname:"/api/git/status",filename:"route",bundlePath:"app/api/git/status/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/git/status/route.ts",nextConfigOutput:"",userland:()=>c(83518),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/git/status/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},83518:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>i});var d=c(29021),e=c.n(d),f=c(23211),g=c(80547),h=c(33012);async function i(a){try{let b,c=a.nextUrl.searchParams.get("cwd")?.trim()??"";if(!c||!c.startsWith("/")&&!(0,g.uK)(c))return f.NextResponse.json({error:"cwd must be an absolute path",code:"cwd_must_be_absolute"},{status:400});let d=await (0,g.mc)();if(!(0,g.A$)(c,d))return f.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});try{b=e().statSync(c)}catch{return f.NextResponse.json({error:"Directory not found",code:"directory_not_found"},{status:404})}if(!b.isDirectory())return f.NextResponse.json({error:"Not a directory",code:"not_a_directory"},{status:400});if(!(0,g.B7)(c,d))return f.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});return f.NextResponse.json(await (0,h.$)(c))}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=46239));module.exports=c})();
6
+ ${e}${f}`}async function t(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function u(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b);try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let i=h().relative(e,g).split(h().sep).join("/"),k=(await q(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m)return{supported:!1};let n=f().readFileSync(g);if(n.includes(0))return{supported:!1};let r=n.toString("utf8");if("untracked"===m)d=s(i,r);else{let a=await t(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=s(i,r)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},35806:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/git/status/route",pathname:"/api/git/status",filename:"route",bundlePath:"app/api/git/status/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/git/status/route.ts",nextConfigOutput:"",userland:()=>c(83518),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/git/status/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},83518:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>i});var d=c(29021),e=c.n(d),f=c(23211),g=c(80547),h=c(33012);async function i(a){try{let b,c=a.nextUrl.searchParams.get("cwd")?.trim()??"";if(!c||!c.startsWith("/")&&!(0,g.uK)(c))return f.NextResponse.json({error:"cwd must be an absolute path",code:"cwd_must_be_absolute"},{status:400});let d=await (0,g.mc)();if(!(0,g.A$)(c,d))return f.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});try{b=e().statSync(c)}catch{return f.NextResponse.json({error:"Directory not found",code:"directory_not_found"},{status:404})}if(!b.isDirectory())return f.NextResponse.json({error:"Not a directory",code:"not_a_directory"},{status:400});if(!(0,g.B7)(c,d))return f.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});return f.NextResponse.json(await (0,h.$)(c))}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=35806));module.exports=c})();