@jiggai/kitchen 0.3.9 → 0.3.11

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 (200) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +2 -2
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +3 -3
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  15. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  22. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  23. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  24. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
  26. package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
  27. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  28. package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
  29. package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
  30. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
  31. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
  32. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
  33. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
  34. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
  35. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
  36. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  37. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
  38. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
  39. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  40. package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
  41. package/.next/server/app/channels.html +2 -2
  42. package/.next/server/app/channels.rsc +4 -4
  43. package/.next/server/app/channels.segments/_full.segment.rsc +4 -4
  44. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  45. package/.next/server/app/channels.segments/_index.segment.rsc +3 -3
  46. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  47. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +2 -2
  48. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  49. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  51. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/goals/new.html +2 -2
  53. package/.next/server/app/goals/new.rsc +4 -4
  54. package/.next/server/app/goals/new.segments/_full.segment.rsc +4 -4
  55. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  56. package/.next/server/app/goals/new.segments/_index.segment.rsc +3 -3
  57. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  58. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +2 -2
  59. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  60. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  61. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  62. package/.next/server/app/goals.html +1 -1
  63. package/.next/server/app/goals.rsc +4 -4
  64. package/.next/server/app/goals.segments/_full.segment.rsc +4 -4
  65. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  66. package/.next/server/app/goals.segments/_index.segment.rsc +3 -3
  67. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  68. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +2 -2
  69. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  70. package/.next/server/app/page.js +2 -2
  71. package/.next/server/app/page.js.nft.json +1 -1
  72. package/.next/server/app/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/recipes/[id]/page.js +3 -3
  74. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  75. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/recipes/page.js +2 -2
  77. package/.next/server/app/recipes/page.js.nft.json +1 -1
  78. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  79. package/.next/server/app/runs/page.js +3 -3
  80. package/.next/server/app/runs/page.js.nft.json +1 -1
  81. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/settings.html +1 -1
  84. package/.next/server/app/settings.rsc +4 -4
  85. package/.next/server/app/settings.segments/_full.segment.rsc +4 -4
  86. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  87. package/.next/server/app/settings.segments/_index.segment.rsc +3 -3
  88. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  89. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  90. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  91. package/.next/server/app/teams/[teamId]/page.js +3 -3
  92. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  93. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +2 -2
  95. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
  96. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
  97. package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
  98. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
  99. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
  101. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
  102. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +3 -3
  103. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  104. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  105. package/.next/server/app/teams/[teamId]/workflows/page.js +3 -3
  106. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  107. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
  108. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  109. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/tickets/page.js.nft.json +1 -1
  111. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  112. package/.next/server/chunks/[root-of-the-server]__ff69832c._.js.map +1 -1
  113. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +1 -1
  114. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -1
  115. package/.next/server/chunks/ssr/[root-of-the-server]__24c20736._.js +3 -0
  116. package/.next/server/chunks/ssr/[root-of-the-server]__24c20736._.js.map +1 -0
  117. package/.next/server/chunks/ssr/[root-of-the-server]__30619465._.js +3 -0
  118. package/.next/server/chunks/ssr/[root-of-the-server]__30619465._.js.map +1 -0
  119. package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js +1 -1
  120. package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js.map +1 -1
  121. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js +1 -1
  122. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js.map +1 -1
  123. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js +3 -0
  124. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js.map +1 -0
  125. package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js +3 -0
  126. package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js.map +1 -0
  127. package/.next/server/chunks/ssr/[root-of-the-server]__7fcc6175._.js +3 -0
  128. package/.next/server/chunks/ssr/[root-of-the-server]__7fcc6175._.js.map +1 -0
  129. package/.next/server/chunks/ssr/[root-of-the-server]__8e001110._.js +3 -0
  130. package/.next/server/chunks/ssr/[root-of-the-server]__8e001110._.js.map +1 -0
  131. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js +1 -1
  132. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js.map +1 -1
  133. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js +3 -0
  134. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js.map +1 -0
  135. package/.next/server/chunks/ssr/[root-of-the-server]__bd20cf10._.js +3 -0
  136. package/.next/server/chunks/ssr/[root-of-the-server]__bd20cf10._.js.map +1 -0
  137. package/.next/server/chunks/ssr/[root-of-the-server]__cefae8c8._.js +3 -0
  138. package/.next/server/chunks/ssr/[root-of-the-server]__cefae8c8._.js.map +1 -0
  139. package/.next/server/chunks/ssr/{node_modules_next_10fb6ad9._.js → _7f9e89d2._.js} +2 -2
  140. package/.next/server/chunks/ssr/_7f9e89d2._.js.map +1 -0
  141. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -1
  142. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
  143. package/.next/server/chunks/ssr/src_59477309._.js +1 -1
  144. package/.next/server/chunks/ssr/src_59477309._.js.map +1 -1
  145. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js +1 -1
  146. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js.map +1 -1
  147. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js +3 -0
  148. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js.map +1 -0
  149. package/.next/server/chunks/ssr/src_lib_errors_ts_f440efeb._.js +3 -0
  150. package/.next/server/chunks/ssr/src_lib_errors_ts_f440efeb._.js.map +1 -0
  151. package/.next/server/pages/404.html +1 -1
  152. package/.next/server/pages/500.html +2 -2
  153. package/.next/server/server-reference-manifest.js +1 -1
  154. package/.next/server/server-reference-manifest.json +1 -1
  155. package/.next/static/chunks/3e0d3a43014c0ad2.css +3 -0
  156. package/.next/static/chunks/43d0024279c6160e.js +1 -0
  157. package/.next/static/chunks/4f5e02a609758a0b.js +1 -0
  158. package/.next/static/chunks/5e3b1d0f61a651bf.js +1 -0
  159. package/.next/static/chunks/5f77499ca309ab9d.js +10 -0
  160. package/.next/static/chunks/be12a66bd736fad8.js +1 -0
  161. package/.next/static/chunks/{b28737d6a10af30d.js → ecdc9465f0e4d954.js} +1 -1
  162. package/README.md +6 -5
  163. package/openclaw.plugin.json +1 -1
  164. package/package.json +1 -1
  165. package/public/images/clawkitchen/home.png +0 -0
  166. package/public/images/clawkitchen/recipes.png +0 -0
  167. package/public/images/clawkitchen/runs.png +0 -0
  168. package/public/images/clawkitchen/team.png +0 -0
  169. package/public/images/clawkitchen/tickets.png +0 -0
  170. package/public/images/clawkitchen/workflows.png +0 -0
  171. package/.next/server/chunks/ssr/[root-of-the-server]__1d65fddf._.js +0 -3
  172. package/.next/server/chunks/ssr/[root-of-the-server]__1d65fddf._.js.map +0 -1
  173. package/.next/server/chunks/ssr/[root-of-the-server]__450d6006._.js +0 -3
  174. package/.next/server/chunks/ssr/[root-of-the-server]__450d6006._.js.map +0 -1
  175. package/.next/server/chunks/ssr/[root-of-the-server]__76f9757d._.js +0 -3
  176. package/.next/server/chunks/ssr/[root-of-the-server]__76f9757d._.js.map +0 -1
  177. package/.next/server/chunks/ssr/[root-of-the-server]__9ffebe91._.js +0 -3
  178. package/.next/server/chunks/ssr/[root-of-the-server]__9ffebe91._.js.map +0 -1
  179. package/.next/server/chunks/ssr/[root-of-the-server]__a26db919._.js +0 -3
  180. package/.next/server/chunks/ssr/[root-of-the-server]__a26db919._.js.map +0 -1
  181. package/.next/server/chunks/ssr/[root-of-the-server]__afaa71fe._.js +0 -3
  182. package/.next/server/chunks/ssr/[root-of-the-server]__afaa71fe._.js.map +0 -1
  183. package/.next/server/chunks/ssr/[root-of-the-server]__b577b475._.js +0 -3
  184. package/.next/server/chunks/ssr/[root-of-the-server]__b577b475._.js.map +0 -1
  185. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js +0 -3
  186. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js.map +0 -1
  187. package/.next/server/chunks/ssr/[root-of-the-server]__fb6781d4._.js +0 -3
  188. package/.next/server/chunks/ssr/[root-of-the-server]__fb6781d4._.js.map +0 -1
  189. package/.next/server/chunks/ssr/node_modules_next_10fb6ad9._.js.map +0 -1
  190. package/.next/server/chunks/ssr/src_e54f24fb._.js +0 -3
  191. package/.next/server/chunks/ssr/src_e54f24fb._.js.map +0 -1
  192. package/.next/static/chunks/42b3230688d0834c.js +0 -1
  193. package/.next/static/chunks/635adeaf329f2446.js +0 -1
  194. package/.next/static/chunks/6427cd3eaffdd572.js +0 -10
  195. package/.next/static/chunks/be874907adf946fd.js +0 -1
  196. package/.next/static/chunks/cfe32a0bce2eab2b.css +0 -3
  197. package/.next/static/chunks/e397a21bf5f13650.js +0 -1
  198. /package/.next/static/{AKnetF2w3rOYqZBVpzsLP → pW5SAQ1dzPcsq_66yy5po}/_buildManifest.js +0 -0
  199. /package/.next/static/{AKnetF2w3rOYqZBVpzsLP → pW5SAQ1dzPcsq_66yy5po}/_clientMiddlewareManifest.json +0 -0
  200. /package/.next/static/{AKnetF2w3rOYqZBVpzsLP → pW5SAQ1dzPcsq_66yy5po}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/next/dist/client/app-dir/link.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/app-dir/link.tsx","../../../../node_modules/next/src/client/app-dir/link.react-server.tsx","../../../../src/lib/plugins.ts","../../../../src/app/teams/%5BteamId%5D/workflows/workflows-client.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/teams/%5BteamId%5D/workflows/page.tsx"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/app-dir/link.js\"));\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(as)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","import type { ComponentProps } from 'react'\nimport ClientLinkComponent, { type LinkProps, useLinkStatus } from './link'\n\nexport default function LinkComponent(\n props: ComponentProps<typeof ClientLinkComponent>\n) {\n const isLegacyBehavior = props.legacyBehavior\n const childIsHostComponent =\n typeof props.children === 'string' ||\n typeof props.children === 'number' ||\n typeof (props.children as any)?.type === 'string'\n const childIsClientComponent =\n (props.children as any)?.type?.$$typeof ===\n Symbol.for('react.client.reference')\n\n if (isLegacyBehavior && !childIsHostComponent && !childIsClientComponent) {\n if ((props.children as any)?.type?.$$typeof === Symbol.for('react.lazy')) {\n console.error(\n `Using a Lazy Component as a direct child of \\`<Link legacyBehavior>\\` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n } else {\n console.error(\n `Using a Server Component as a direct child of \\`<Link legacyBehavior>\\` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n }\n\n return <ClientLinkComponent {...props} />\n}\n\nexport { type LinkProps, useLinkStatus }\n","import { runOpenClaw } from \"@/lib/openclaw\";\n\nexport type PluginListEntry = {\n id?: unknown;\n enabled?: unknown;\n};\n\nfunction extractPluginEntries(raw: unknown): PluginListEntry[] {\n if (Array.isArray(raw)) return raw as PluginListEntry[];\n if (raw && typeof raw === \"object\" && Array.isArray((raw as { plugins?: unknown }).plugins)) {\n return (raw as { plugins: PluginListEntry[] }).plugins;\n }\n return [];\n}\n\nexport function parseEnabledPluginIds(stdout: string): string[] {\n const parsed = JSON.parse(stdout) as unknown;\n const items = extractPluginEntries(parsed);\n return items\n .filter((p) => Boolean(p) && typeof p === \"object\" && (p as { enabled?: unknown }).enabled === true)\n .map((p) => String(p.id ?? \"\"))\n .filter(Boolean);\n}\n\nexport async function getEnabledPluginIds(): Promise<{ ok: true; ids: string[] } | { ok: false; error: string }> {\n const res = await runOpenClaw([\"plugins\", \"list\", \"--json\", \"--verbose\"]);\n if (!res.ok) {\n const err = res.stderr.trim() || `openclaw plugins list failed (exit=${res.exitCode})`;\n return { ok: false, error: err };\n }\n\n try {\n return { ok: true, ids: parseEnabledPluginIds(res.stdout) };\n } catch {\n return { ok: false, error: \"Failed to parse openclaw plugins list output\" };\n }\n}\n\nexport async function isPluginEnabled(pluginId: string): Promise<boolean> {\n const res = await getEnabledPluginIds();\n if (!res.ok) return false;\n return res.ids.includes(pluginId);\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/teams/[teamId]/workflows/workflows-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/teams/[teamId]/workflows/workflows-client.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport { getTeamDisplayName } from \"@/lib/recipes\";\nimport { isPluginEnabled } from \"@/lib/plugins\";\nimport WorkflowsClient from \"./workflows-client\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nexport default async function WorkflowsPage({\n params,\n}: {\n params: Promise<{ teamId: string }>;\n}) {\n noStore();\n\n const { teamId } = await params;\n const name = await getTeamDisplayName(teamId);\n\n return (\n <div className=\"space-y-4 p-6\">\n <div className=\"flex flex-wrap items-start justify-between gap-4\">\n <div>\n <Link\n href={`/teams/${encodeURIComponent(teamId)}`}\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline\"\n >\n ← {name || teamId}\n </Link>\n <h1 className=\"mt-2 text-2xl font-semibold tracking-tight\">Workflows</h1>\n <p className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n Create and edit workflow definitions for this team.\n </p>\n </div>\n </div>\n\n <WorkflowsClient teamId={teamId} llmTaskEnabled={await isPluginEnabled(\"llm-task\")} />\n </div>\n );\n}\n"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","as","linkInstanceRef","replace","scroll","onNavigate","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","locale","warnOnce","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","useMemo","resolvedHref","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","undefined","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext","__NEXT_CACHE_COMPONENTS","Full","isLegacyBehavior","childIsHostComponent","child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BACb,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,4DACb,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,WACC,CAAA,EAAA,EAAA,IAAA,EAAC,EAAA,OAAI,CAAA,CACH,KAAM,CAAC,OAAO,EAAE,mBAAmB,GAAA,CAAS,CAC5C,UAAU,sFACX,KACI,GAAQ,KAEb,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,sDAA6C,cAC3D,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,8DAAqD,6DAMtE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAe,CAAA,CAAC,OAAQ,EAAQ,eAAgB,MAAM,CAAA,EAAA,EAAA,eAAA,AAAe,EAAC,gBAG7E,kCAjCuB,+BACG","ignoreList":[0,2,4]}
@@ -0,0 +1,3 @@
1
+ module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},5365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},790,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},84707,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js"))},97647,a=>{"use strict";a.i(790);var b=a.i(84707);a.n(b)},95936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(64240),g=a.r(7997),h=f._(a.r(97647));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},23279,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/team-editor/index.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/team-editor/index.tsx <module evaluation>","default")},30067,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/team-editor/index.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/team-editor/index.tsx","default")},81254,a=>{"use strict";a.i(23279);var b=a.i(30067);a.n(b)},33201,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(18558),e=a.i(15629),f=a.i(81254);async function g({params:a,searchParams:g}){(0,d.unstable_noStore)();let{teamId:h}=await a,i=(await g??{}).tab,j=Array.isArray(i)?i[0]:i,k=await (0,e.getTeamDisplayName)(h);return(0,b.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:k||h}),(0,b.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:h})]}),(0,b.jsx)("div",{className:"flex items-center gap-3",children:(0,b.jsx)(c.default,{href:`/goals?team=${encodeURIComponent(h)}`,className:"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline",children:"View goals →"})})]}),(0,b.jsx)(f.default,{teamId:h,initialTab:"string"==typeof j?j:void 0})]})}a.s(["default",()=>g,"dynamic",0,"force-dynamic","revalidate",0,0])}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__30619465._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/next/dist/client/app-dir/link.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/app-dir/link.tsx","../../../../node_modules/next/src/client/app-dir/link.react-server.tsx","../../../../src/app/teams/%5BteamId%5D/team-editor/index.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/teams/%5BteamId%5D/page.tsx"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/app-dir/link.js\"));\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(as)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","import type { ComponentProps } from 'react'\nimport ClientLinkComponent, { type LinkProps, useLinkStatus } from './link'\n\nexport default function LinkComponent(\n props: ComponentProps<typeof ClientLinkComponent>\n) {\n const isLegacyBehavior = props.legacyBehavior\n const childIsHostComponent =\n typeof props.children === 'string' ||\n typeof props.children === 'number' ||\n typeof (props.children as any)?.type === 'string'\n const childIsClientComponent =\n (props.children as any)?.type?.$$typeof ===\n Symbol.for('react.client.reference')\n\n if (isLegacyBehavior && !childIsHostComponent && !childIsClientComponent) {\n if ((props.children as any)?.type?.$$typeof === Symbol.for('react.lazy')) {\n console.error(\n `Using a Lazy Component as a direct child of \\`<Link legacyBehavior>\\` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n } else {\n console.error(\n `Using a Server Component as a direct child of \\`<Link legacyBehavior>\\` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n }\n\n return <ClientLinkComponent {...props} />\n}\n\nexport { type LinkProps, useLinkStatus }\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/teams/[teamId]/team-editor/index.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/teams/[teamId]/team-editor/index.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport { getTeamDisplayName } from \"@/lib/recipes\";\nimport TeamEditor from \"./team-editor\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nexport default async function TeamPage({\n params,\n searchParams,\n}: {\n params: Promise<{ teamId: string }>;\n searchParams?: Promise<Record<string, string | string[] | undefined>>;\n}) {\n // Team pages depend on live OpenClaw state; never serve cached HTML.\n noStore();\n\n const { teamId } = await params;\n const sp = (await searchParams) ?? {};\n const tabRaw = sp.tab;\n const tab = Array.isArray(tabRaw) ? tabRaw[0] : tabRaw;\n const name = await getTeamDisplayName(teamId);\n\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <div className=\"flex flex-wrap items-start justify-between gap-4\">\n <div>\n <div className=\"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]\">\n {name || teamId}\n </div>\n <div className=\"text-xs text-[color:var(--ck-text-tertiary)]\">{teamId}</div>\n </div>\n\n <div className=\"flex items-center gap-3\">\n <Link\n href={`/goals?team=${encodeURIComponent(teamId)}`}\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline\"\n >\n View goals →\n </Link>\n </div>\n </div>\n\n <TeamEditor teamId={teamId} initialTab={typeof tab === \"string\" ? tab : undefined} />\n </div>\n );\n}\n"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","as","linkInstanceRef","replace","scroll","onNavigate","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","locale","warnOnce","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","useMemo","resolvedHref","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","undefined","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext","__NEXT_CACHE_COMPONENTS","Full","isLegacyBehavior","childIsHostComponent","childIsClientComponent","error","ClientLinkComponent"],"mappings":"6yBACA,GAAM,yBAAE,CAAuB,CAAE,CAAA,EAAA,CAAA,CAAA,OAEjC,EAAsB,CAAC,CAAC,EAAwB,iGAFhD,GAAM,yBAAE,CAAuB,CAAE,CAAA,EAAA,CAAA,CAAA,OAEjC,EAAsB,CAAC,CAAC,EAAwB,2MEAhD,OAyBC,CAAA,kBAzBuBA,GA2BCC,aAAa,CAAA,kBAAbA,EAAAA,aAAa,2GA7B6B,CAAA,CAAA,IAAA,IAEpD,SAASD,EACtBuC,CAAiD,EAEjD,IAAMkG,EAAmBlG,EAAMmB,cAAc,CACvCgF,EACsB,UAA1B,OAAOnG,EAAMK,QAAQ,EACK,UAA1B,OAAOL,EAAMK,QAAQ,EACoB,UAAzC,OAAQL,EAAMK,QAAQ,EAAUkE,KAC5B6B,EACHpG,EAAMK,QAAQ,EAAUkE,MAAMR,WAC/BC,OAAOC,GAAG,CAAC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DAAgD,OAGjE,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,mCACb,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAI,CAAA,CACH,KAAM,CAAC,YAAY,EAAE,mBAAmB,GAAA,CAAS,CACjD,UAAU,qFACX,sBAML,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAU,CAAA,CAAC,OAAQ,EAAQ,WAA2B,AAAf,iBAAO,EAAmB,OAAM,MAG9E,kCA1CuB,+BACG","ignoreList":[0,2,3]}
@@ -1,3 +1,3 @@
1
- module.exports=[36313,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.HooksClientContext},18341,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.ServerInsertedHtml},18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},42602,(a,b,c)=>{"use strict";b.exports=a.r(18622)},87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},72131,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].React},9270,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.AppRouterContext},38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},51200,a=>{"use strict";async function b(a){return Promise.all(a.map(a=>fetch(a,{cache:"no-store"})))}async function c(a,b){let c=await fetch(a,b),d=await c.json();if(!c.ok)throw Error(d.error??"Request failed");return d}async function d(a,b){let c=await fetch(a,b),d=await c.json();return c.ok?{ok:!0,data:d}:{ok:!1,status:c.status,error:d.error??"Request failed"}}a.s(["fetchAll",()=>b,"fetchJson",()=>c,"fetchJsonWithStatus",()=>d])},61889,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,c.createContext)(null);function e({kind:a}){return"success"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-emerald-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):"error"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-red-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z",clipRule:"evenodd"})}):(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-slate-300",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z",clipRule:"evenodd"})})}function f({children:a}){let[f,g]=(0,c.useState)([]),h=(0,c.useCallback)(a=>{g(b=>b.filter(b=>b.id!==a))},[]),i=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"leave"}:b)),window.setTimeout(()=>h(a),250)},[h]),j=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"show"}:b))},[]),k=(0,c.useCallback)(a=>{let b,c=`${Date.now()}-${(b=new Uint8Array(8),crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join(""))}`,d={id:c,timeoutMs:5e3,state:"enter",...a};g(a=>[d,...a].slice(0,4)),window.setTimeout(()=>j(c),10);let e=d.timeoutMs;e&&e>0&&window.setTimeout(()=>i(c),e)},[i,j]),l=(0,c.useMemo)(()=>({push:k}),[k]);return(0,b.jsxs)(d.Provider,{value:l,children:[a,(0,b.jsx)("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6",children:(0,b.jsx)("div",{className:"flex w-full flex-col items-start space-y-4",children:f.map(a=>{var c;return(0,b.jsx)("div",{className:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] "+("enter"===(c=a.state)||"leave"===c?"translate-x-[-16px] opacity-0":"translate-x-0 opacity-100"),children:(0,b.jsx)("div",{className:"p-4",children:(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)("div",{className:"shrink-0",children:(0,b.jsx)(e,{kind:a.kind})}),(0,b.jsxs)("div",{className:"ml-3 w-0 flex-1",children:[a.title?(0,b.jsx)("p",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:a.title}):null,(0,b.jsx)("p",{className:"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]",children:a.message})]}),(0,b.jsx)("div",{className:"ml-4 flex shrink-0",children:(0,b.jsxs)("button",{type:"button",onClick:()=>i(a.id),className:"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]","aria-label":"Dismiss",title:"Dismiss",children:[(0,b.jsx)("span",{className:"sr-only",children:"Close"}),(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:(0,b.jsx)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z"})})]})})]})})},a.id)})})})]})}function g(){let a=(0,c.useContext)(d);if(!a)throw Error("useToast must be used within ToastProvider");return a}a.s(["ToastProvider",()=>f,"useToast",()=>g])},20471,a=>{"use strict";var b=a.i(72131);function c(){return""}function d(a){return()=>{}}function e(){return(0,b.useSyncExternalStore)(d,c,()=>"")}function f(){}a.s(["dispatchSelectedTeamChanged",()=>f,"useSelectedTeamId",()=>e])},15149,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(72131),f=a.i(20471),g=e;class h extends g.default.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,b){console.error("ErrorBoundary caught:",a,b)}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:(0,b.jsxs)("div",{className:"ck-glass mx-auto max-w-2xl p-6 sm:p-8",children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Something went wrong"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"An unexpected error occurred. You can try refreshing the page or go back home."}),(0,b.jsx)("pre",{className:"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]",children:this.state.error.message}),(0,b.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,b.jsx)("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90",children:"Refresh page"}),(0,b.jsx)(c.default,{href:"/",className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:"Go home"})]})]}):this.props.children}}var i=a.i(51200);function j({className:a,children:c}){return(0,b.jsx)("svg",{className:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:c})}function k({className:a}){return(0,b.jsxs)(j,{className:a,children:[(0,b.jsx)("path",{d:"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z",stroke:"currentColor",strokeWidth:"1.8"}),(0,b.jsx)("path",{d:"M12 2v2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M12 19.5V22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M2 12h2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M19.5 12H22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 4.2 6 6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 18l1.8 1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 6l1.8-1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 19.8 6 18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function l({className:a}){return(0,b.jsx)(j,{className:a,children:(0,b.jsx)("path",{d:"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})})}function m(){return"dark"}function n(){let[a,c]=(0,e.useState)(m);(0,e.useEffect)(()=>{document.documentElement.dataset.theme=a,window.localStorage.setItem("ck-theme",a)},[a]);let d="dark"===a?"Switch to light mode":"Switch to dark mode";return(0,b.jsxs)("button",{type:"button",onClick:function(){c(a=>"dark"===a?"light":"dark")},className:"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":d,title:d,children:[(0,b.jsx)("span",{className:"sr-only",suppressHydrationWarning:!0,children:d}),"dark"===a?(0,b.jsx)(l,{className:"h-4.5 w-4.5"}):(0,b.jsx)(k,{className:"h-4.5 w-4.5"})]})}var o=a.i(61889);function p({children:a}){return(0,b.jsx)("span",{className:"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]","aria-hidden":!0,children:a})}function q({href:a,label:d,icon:e,active:f,collapsed:g}){return(0,b.jsxs)(c.default,{href:a,title:d,className:(f?"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]":"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]")+(g?" justify-center px-0 py-3":" gap-4 px-4 py-3"),children:[e,g?null:(0,b.jsx)("span",{children:d})]})}function r({children:a}){let g=(0,d.usePathname)()||"/",j=(0,d.useRouter)(),k=(0,e.useMemo)(()=>{let a=g.match(/^\/teams\/([^/]+)(?:\/|$)/);return a?decodeURIComponent(a[1]):null},[g]),l=(0,e.useMemo)(()=>g.startsWith("/teams/"),[g]),[m,r]=(0,e.useState)(()=>""),s=(k||m).trim();function t(a){return s&&("/tickets"===a||"/goals"===a||"/cron-jobs"===a||"/runs"===a)?function(a,b){let[c,d]=a.split("?"),e=new URLSearchParams(d??"");return e.set("team",b),`${c}?${e.toString()}`}(a,s):a}function u(a){if(!g.startsWith("/teams/")&&("/tickets"===g||"/goals"===g||"/cron-jobs"===g||"/runs"===g))try{let b=new URL(window.location.href);if(!a){if(!b.searchParams.has("team"))return;b.searchParams.delete("team");let a=b.searchParams.toString();j.replace(b.pathname+(a?`?${a}`:""));return}if((b.searchParams.get("team")??"").trim()===a)return;b.searchParams.set("team",a),j.replace(b.pathname+"?"+b.searchParams.toString())}catch{}}(0,e.useEffect)(()=>{},[g,s]),(0,e.useEffect)(()=>{},[s]);let[v,w]=(0,e.useState)(!1);(0,e.useEffect)(()=>{try{let a=localStorage.getItem("ck-leftnav-collapsed");w("1"===a)}catch{}},[]);let[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{(async()=>{try{let a=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),b=Array.isArray(a.agents)?a.agents:[],c=new Set;for(let a of b){let b=String(a.workspace??"").split("/").filter(Boolean).find(a=>a.startsWith("workspace-"))??"";if(!b)continue;let d=b.slice(10);d&&"workspace"!==d&&c.add(d)}y(Array.from(c).sort())}catch{y([])}})()},[]);let z=[{href:"/",label:"Agents",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M3 11l9-8 9 8"}),(0,b.jsx)("path",{d:"M5 10v10h14V10"})]})})},{href:"/recipes",label:"Recipes",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M6 4h12v16H6z"}),(0,b.jsx)("path",{d:"M9 8h6"}),(0,b.jsx)("path",{d:"M9 12h6"})]})})},{href:t("/tickets"),label:"Tickets",icon:(0,b.jsx)(p,{children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{d:"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z"})})})},{href:"/channels",label:"Channels",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 6h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 18h16"}),(0,b.jsx)("path",{d:"M7 9h0"})]})})},{href:t("/goals"),label:"Goals",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5l3 3"})]})})},{href:t("/cron-jobs"),label:"Cron jobs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5"})]})})},{href:t("/runs"),label:"Runs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 19h16"}),(0,b.jsx)("path",{d:"M6 16l4-4 3 3 5-7"}),(0,b.jsx)("circle",{cx:"10",cy:"12",r:"1"}),(0,b.jsx)("circle",{cx:"13",cy:"15",r:"1"}),(0,b.jsx)("circle",{cx:"18",cy:"8",r:"1"})]})})},{href:"/settings",label:"Settings",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"}),(0,b.jsx)("path",{d:"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z"})]})})}],A=v?"w-16":"w-72";return(0,b.jsx)(o.ToastProvider,{children:(0,b.jsxs)("div",{className:"flex h-dvh w-dvw overflow-hidden",children:[(0,b.jsxs)("aside",{className:`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${A}`,children:[(0,b.jsxs)("div",{className:"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3",children:[(0,b.jsx)(c.default,{href:"/",className:"text-sm font-semibold tracking-tight",title:"Home",children:v?"CK":"Claw Kitchen"}),(0,b.jsx)("button",{onClick:function(){w(a=>{let b=!a;try{localStorage.setItem("ck-leftnav-collapsed",b?"1":"0")}catch{}return b})},className:"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:v?"Expand":"Collapse",children:v?"»":"«"})]}),(0,b.jsx)("div",{className:"border-b border-[color:var(--ck-border-subtle)] p-2",children:v?(0,b.jsx)("button",{className:"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:s?`Team: ${s}`:"Select team",onClick:()=>{let a=x[0]||"";if(a){r(a);try{localStorage.setItem("ck-selected-team",a)}catch{}u(a)}},children:"👥"}):(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("div",{className:"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Team"}),(0,b.jsxs)("select",{value:s??"",disabled:l,onChange:a=>{let b=(a.target.value||"").trim();r(b);try{b?localStorage.setItem("ck-selected-team",b):localStorage.removeItem("ck-selected-team")}catch{}(0,f.dispatchSelectedTeamChanged)(),u(b)},className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"+(l?" cursor-not-allowed opacity-60":""),children:[(0,b.jsx)("option",{value:"",children:"All teams"}),x.map(a=>(0,b.jsx)("option",{value:a,children:a},a))]}),s?(0,b.jsx)(c.default,{href:`/teams/${encodeURIComponent(s)}`,className:"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]",children:"Edit team"}):null]})}),(0,b.jsxs)("nav",{className:"min-h-0 flex-1 overflow-auto p-2",children:[(0,b.jsx)("div",{className:"mt-2 px-2 pb-2 pt-2"}),z.map(a=>{let c;return(0,b.jsx)(q,{href:a.href,label:a.label,icon:(0,b.jsx)("span",{"aria-hidden":!0,children:a.icon}),collapsed:v,active:g===(c=a.href.split("?")[0])||g.startsWith(c+"/")},a.href)})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2",children:[(0,b.jsx)("a",{href:"https://github.com/JIGGAI/ClawRecipes/tree/main/docs",target:"_blank",rel:"noreferrer",className:v?"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:"Docs",children:v?"📖":"Docs"}),v?null:(0,b.jsx)(n,{})]})]}),(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)("main",{className:"h-full overflow-auto p-4 md:p-6",children:(0,b.jsx)(h,{children:a})})})]})})}a.s(["AppShell",()=>r],15149)}];
1
+ module.exports=[36313,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.HooksClientContext},18341,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.ServerInsertedHtml},18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},42602,(a,b,c)=>{"use strict";b.exports=a.r(18622)},87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},72131,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].React},9270,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.AppRouterContext},38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},51200,a=>{"use strict";async function b(a){return Promise.all(a.map(a=>fetch(a,{cache:"no-store"})))}async function c(a,b){let c=await fetch(a,b),d=await c.json();if(!c.ok)throw Error(d.error??"Request failed");return d}async function d(a,b){let c=await fetch(a,b),d=await c.json();return c.ok?{ok:!0,data:d}:{ok:!1,status:c.status,error:d.error??"Request failed"}}a.s(["fetchAll",()=>b,"fetchJson",()=>c,"fetchJsonWithStatus",()=>d])},61889,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,c.createContext)(null);function e({kind:a}){return"success"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-emerald-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):"error"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-red-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z",clipRule:"evenodd"})}):(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-slate-300",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z",clipRule:"evenodd"})})}function f({children:a}){let[f,g]=(0,c.useState)([]),h=(0,c.useCallback)(a=>{g(b=>b.filter(b=>b.id!==a))},[]),i=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"leave"}:b)),window.setTimeout(()=>h(a),250)},[h]),j=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"show"}:b))},[]),k=(0,c.useCallback)(a=>{let b,c=`${Date.now()}-${(b=new Uint8Array(8),crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join(""))}`,d={id:c,timeoutMs:5e3,state:"enter",...a};g(a=>[d,...a].slice(0,4)),window.setTimeout(()=>j(c),10);let e=d.timeoutMs;e&&e>0&&window.setTimeout(()=>i(c),e)},[i,j]),l=(0,c.useMemo)(()=>({push:k}),[k]);return(0,b.jsxs)(d.Provider,{value:l,children:[a,(0,b.jsx)("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6",children:(0,b.jsx)("div",{className:"flex w-full flex-col items-start space-y-4",children:f.map(a=>{var c;return(0,b.jsx)("div",{className:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] "+("enter"===(c=a.state)||"leave"===c?"translate-x-[-16px] opacity-0":"translate-x-0 opacity-100"),children:(0,b.jsx)("div",{className:"p-4",children:(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)("div",{className:"shrink-0",children:(0,b.jsx)(e,{kind:a.kind})}),(0,b.jsxs)("div",{className:"ml-3 w-0 flex-1",children:[a.title?(0,b.jsx)("p",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:a.title}):null,(0,b.jsx)("p",{className:"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]",children:a.message})]}),(0,b.jsx)("div",{className:"ml-4 flex shrink-0",children:(0,b.jsxs)("button",{type:"button",onClick:()=>i(a.id),className:"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]","aria-label":"Dismiss",title:"Dismiss",children:[(0,b.jsx)("span",{className:"sr-only",children:"Close"}),(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:(0,b.jsx)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z"})})]})})]})})},a.id)})})})]})}function g(){let a=(0,c.useContext)(d);if(!a)throw Error("useToast must be used within ToastProvider");return a}a.s(["ToastProvider",()=>f,"useToast",()=>g])},20471,a=>{"use strict";var b=a.i(72131);function c(){return""}function d(a){return()=>{}}function e(){return(0,b.useSyncExternalStore)(d,c,()=>"")}function f(){}a.s(["dispatchSelectedTeamChanged",()=>f,"useSelectedTeamId",()=>e])},15149,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(72131),f=a.i(20471),g=e;class h extends g.default.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,b){console.error("ErrorBoundary caught:",a,b)}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:(0,b.jsxs)("div",{className:"ck-glass mx-auto max-w-2xl p-6 sm:p-8",children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Something went wrong"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"An unexpected error occurred. You can try refreshing the page or go back home."}),(0,b.jsx)("pre",{className:"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]",children:this.state.error.message}),(0,b.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,b.jsx)("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90",children:"Refresh page"}),(0,b.jsx)(c.default,{href:"/",className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:"Go home"})]})]}):this.props.children}}var i=a.i(51200);function j({className:a,children:c}){return(0,b.jsx)("svg",{className:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:c})}function k({className:a}){return(0,b.jsxs)(j,{className:a,children:[(0,b.jsx)("path",{d:"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z",stroke:"currentColor",strokeWidth:"1.8"}),(0,b.jsx)("path",{d:"M12 2v2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M12 19.5V22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M2 12h2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M19.5 12H22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 4.2 6 6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 18l1.8 1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 6l1.8-1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 19.8 6 18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function l({className:a}){return(0,b.jsx)(j,{className:a,children:(0,b.jsx)("path",{d:"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})})}function m(){return"dark"}function n(){let[a,c]=(0,e.useState)(m);(0,e.useEffect)(()=>{document.documentElement.dataset.theme=a,window.localStorage.setItem("ck-theme",a)},[a]);let d="dark"===a?"Switch to light mode":"Switch to dark mode";return(0,b.jsxs)("button",{type:"button",onClick:function(){c(a=>"dark"===a?"light":"dark")},className:"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":d,title:d,children:[(0,b.jsx)("span",{className:"sr-only",suppressHydrationWarning:!0,children:d}),"dark"===a?(0,b.jsx)(l,{className:"h-4.5 w-4.5"}):(0,b.jsx)(k,{className:"h-4.5 w-4.5"})]})}var o=a.i(61889);function p({children:a}){return(0,b.jsx)("span",{className:"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]","aria-hidden":!0,children:a})}function q({href:a,label:d,icon:e,active:f,collapsed:g}){return(0,b.jsxs)(c.default,{href:a,title:d,className:(f?"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]":"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]")+(g?" justify-center px-0 py-3":" gap-4 px-4 py-3"),children:[e,g?null:(0,b.jsx)("span",{children:d})]})}function r({children:a}){let g=(0,d.usePathname)()||"/",j=(0,d.useRouter)(),k=(0,e.useMemo)(()=>{let a=g.match(/^\/teams\/([^/]+)(?:\/|$)/);return a?decodeURIComponent(a[1]):null},[g]),l=(0,e.useMemo)(()=>g.startsWith("/teams/"),[g]),[m,r]=(0,e.useState)(""),s=(k||m).trim();function t(a){return s&&("/tickets"===a||"/goals"===a||"/cron-jobs"===a||"/runs"===a)?function(a,b){let[c,d]=a.split("?"),e=new URLSearchParams(d??"");return e.set("team",b),`${c}?${e.toString()}`}(a,s):a}function u(a){if(!g.startsWith("/teams/")&&("/tickets"===g||"/goals"===g||"/cron-jobs"===g||"/runs"===g))try{let b=new URL(window.location.href);if(!a){if(!b.searchParams.has("team"))return;b.searchParams.delete("team");let a=b.searchParams.toString();j.replace(b.pathname+(a?`?${a}`:""));return}if((b.searchParams.get("team")??"").trim()===a)return;b.searchParams.set("team",a),j.replace(b.pathname+"?"+b.searchParams.toString())}catch{}}(0,e.useEffect)(()=>{try{r((localStorage.getItem("ck-selected-team")||"").trim())}catch{}},[]),(0,e.useEffect)(()=>{},[g,s]),(0,e.useEffect)(()=>{},[s]);let[v,w]=(0,e.useState)(!1);(0,e.useEffect)(()=>{try{let a=localStorage.getItem("ck-leftnav-collapsed");w("1"===a)}catch{}},[]);let[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{(async()=>{try{let a=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),b=Array.isArray(a.agents)?a.agents:[],c=new Set;for(let a of b){let b=String(a.workspace??"").split("/").filter(Boolean).find(a=>a.startsWith("workspace-"))??"";if(!b)continue;let d=b.slice(10);d&&"workspace"!==d&&c.add(d)}y(Array.from(c).sort())}catch{y([])}})()},[]);let z=[{href:"/",label:"Agents",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M3 11l9-8 9 8"}),(0,b.jsx)("path",{d:"M5 10v10h14V10"})]})})},{href:"/recipes",label:"Recipes",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M6 4h12v16H6z"}),(0,b.jsx)("path",{d:"M9 8h6"}),(0,b.jsx)("path",{d:"M9 12h6"})]})})},{href:t("/tickets"),label:"Tickets",icon:(0,b.jsx)(p,{children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{d:"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z"})})})},{href:"/channels",label:"Channels",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 6h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 18h16"}),(0,b.jsx)("path",{d:"M7 9h0"})]})})},{href:t("/goals"),label:"Goals",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5l3 3"})]})})},{href:t("/cron-jobs"),label:"Cron jobs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5"})]})})},{href:t("/runs"),label:"Runs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 19h16"}),(0,b.jsx)("path",{d:"M6 16l4-4 3 3 5-7"}),(0,b.jsx)("circle",{cx:"10",cy:"12",r:"1"}),(0,b.jsx)("circle",{cx:"13",cy:"15",r:"1"}),(0,b.jsx)("circle",{cx:"18",cy:"8",r:"1"})]})})},{href:"/settings",label:"Settings",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"}),(0,b.jsx)("path",{d:"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z"})]})})}],A=v?"w-16":"w-72";return(0,b.jsx)(o.ToastProvider,{children:(0,b.jsxs)("div",{className:"flex h-dvh w-dvw overflow-hidden",children:[(0,b.jsxs)("aside",{className:`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${A}`,children:[(0,b.jsxs)("div",{className:"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3",children:[(0,b.jsx)(c.default,{href:"/",className:"text-sm font-semibold tracking-tight",title:"Home",children:v?"CK":"Claw Kitchen"}),(0,b.jsx)("button",{onClick:function(){w(a=>{let b=!a;try{localStorage.setItem("ck-leftnav-collapsed",b?"1":"0")}catch{}return b})},className:"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:v?"Expand":"Collapse",children:v?"»":"«"})]}),(0,b.jsx)("div",{className:"border-b border-[color:var(--ck-border-subtle)] p-2",children:v?(0,b.jsx)("button",{className:"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:s?`Team: ${s}`:"Select team",onClick:()=>{let a=x[0]||"";if(a){r(a);try{localStorage.setItem("ck-selected-team",a)}catch{}u(a)}},children:"👥"}):(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("div",{className:"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Team"}),(0,b.jsxs)("select",{value:s??"",disabled:l,onChange:a=>{let b=(a.target.value||"").trim();r(b);try{b?localStorage.setItem("ck-selected-team",b):localStorage.removeItem("ck-selected-team")}catch{}(0,f.dispatchSelectedTeamChanged)(),u(b)},className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"+(l?" cursor-not-allowed opacity-60":""),children:[(0,b.jsx)("option",{value:"",children:"All teams"}),x.map(a=>(0,b.jsx)("option",{value:a,children:a},a))]}),s?(0,b.jsx)(c.default,{href:`/teams/${encodeURIComponent(s)}`,className:"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]",children:"Edit team"}):null]})}),(0,b.jsxs)("nav",{className:"min-h-0 flex-1 overflow-auto p-2",children:[(0,b.jsx)("div",{className:"mt-2 px-2 pb-2 pt-2"}),z.map(a=>{let c;return(0,b.jsx)(q,{href:a.href,label:a.label,icon:(0,b.jsx)("span",{"aria-hidden":!0,children:a.icon}),collapsed:v,active:g===(c=a.href.split("?")[0])||g.startsWith(c+"/")},a.href)})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2",children:[(0,b.jsx)("a",{href:"https://github.com/JIGGAI/ClawRecipes/tree/main/docs",target:"_blank",rel:"noreferrer",className:v?"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:"Docs",children:v?"📖":"Docs"}),v?null:(0,b.jsx)(n,{})]})]}),(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)("main",{className:"h-full overflow-auto p-4 md:p-6",children:(0,b.jsx)(h,{children:a})})})]})})}a.s(["AppShell",()=>r],15149)}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__471bc2e7._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/hooks-client-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/server-inserted-html.ts","../../../../node_modules/next/src/server/route-modules/app-page/module.compiled.js","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/app-router-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../src/lib/fetch-json.ts","../../../../src/components/ToastProvider.tsx","../../../../src/lib/selected-team.ts","../../../../src/components/AppShell.tsx","../../../../src/components/ErrorBoundary.tsx","../../../../src/components/icons.tsx","../../../../src/components/ThemeToggle.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HooksClientContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].ServerInsertedHtml\n","if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxRuntime\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.React\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].AppRouterContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","/** Fetches multiple URLs in parallel with cache: \"no-store\". */\nexport async function fetchAll(urls: string[]): Promise<Response[]> {\n return Promise.all(urls.map((url) => fetch(url, { cache: \"no-store\" })));\n}\n\n/**\n * Fetches JSON and throws on !res.ok.\n * Use errorMessage(e) in catch blocks.\n */\nexport async function fetchJson<T = unknown>(url: string, opts?: RequestInit): Promise<T> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (!res.ok) throw new Error(json.error ?? \"Request failed\");\n return json as T;\n}\n\n/**\n * Fetches JSON and returns result with status. Use when you need to handle specific\n * HTTP status codes (e.g. 409) differently from generic errors.\n */\nexport async function fetchJsonWithStatus<T = unknown>(\n url: string,\n opts?: RequestInit\n): Promise<{ ok: true; data: T } | { ok: false; status: number; error: string }> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (res.ok) return { ok: true, data: json as T };\n return { ok: false, status: res.status, error: json.error ?? \"Request failed\" };\n}\n","\"use client\";\n\nimport { createContext, useCallback, useContext, useMemo, useState } from \"react\";\n\nexport type ToastKind = \"success\" | \"error\" | \"info\";\n\ntype ToastInternal = Toast & { state: \"enter\" | \"show\" | \"leave\" };\nexport type Toast = {\n id: string;\n kind: ToastKind;\n title?: string;\n message: string;\n timeoutMs?: number;\n};\n\ntype ToastContextValue = {\n push: (t: Omit<Toast, \"id\">) => void;\n};\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nfunction randomHex(bytes: number): string {\n const arr = new Uint8Array(bytes);\n crypto.getRandomValues(arr);\n return Array.from(arr, (b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\nfunction getToastMotionClass(state: \"enter\" | \"show\" | \"leave\"): string {\n if (state === \"enter\") return \"translate-x-[-16px] opacity-0\";\n if (state === \"leave\") return \"translate-x-[-16px] opacity-0\";\n return \"translate-x-0 opacity-100\";\n}\n\nfunction ToastIcon({ kind }: { kind: ToastKind }) {\n if (kind === \"success\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-emerald-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n if (kind === \"error\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-red-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-slate-300\">\n <path\n fillRule=\"evenodd\"\n d=\"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\nexport function ToastProvider({ children }: { children: React.ReactNode }) {\n const [toasts, setToasts] = useState<ToastInternal[]>([]);\n\n const removeNow = useCallback((id: string) => {\n setToasts((prev) => prev.filter((t) => t.id !== id));\n }, []);\n\n const dismiss = useCallback(\n (id: string) => {\n // Start leave animation, then remove.\n setToasts((prev) => prev.map((t) => (t.id === id ? { ...t, state: \"leave\" } : t)));\n window.setTimeout(() => removeNow(id), 250);\n },\n [removeNow],\n );\n\n const promoteToShow = useCallback((id: string) => {\n setToasts((prev) => prev.map((x) => (x.id === id ? { ...x, state: \"show\" } : x)));\n }, []);\n\n const push = useCallback(\n (t: Omit<Toast, \"id\">) => {\n const id = `${Date.now()}-${randomHex(8)}`;\n const toast: ToastInternal = { id, timeoutMs: 5000, state: \"enter\", ...t };\n setToasts((prev) => [toast, ...prev].slice(0, 4));\n\n window.setTimeout(() => promoteToShow(id), 10);\n\n const ms = toast.timeoutMs;\n if (ms && ms > 0) {\n window.setTimeout(() => dismiss(id), ms);\n }\n },\n [dismiss, promoteToShow],\n );\n\n const value = useMemo(() => ({ push }), [push]);\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n\n {/* Tailwind UI-inspired notifications */}\n <div\n aria-live=\"assertive\"\n className=\"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6\"\n >\n <div className=\"flex w-full flex-col items-start space-y-4\">\n {toasts.map((t) => (\n <div\n key={t.id}\n className={\n \"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] \" +\n getToastMotionClass(t.state)\n }\n >\n <div className=\"p-4\">\n <div className=\"flex items-start\">\n <div className=\"shrink-0\">\n <ToastIcon kind={t.kind} />\n </div>\n <div className=\"ml-3 w-0 flex-1\">\n {t.title ? (\n <p className=\"text-sm font-medium text-[color:var(--ck-text-primary)]\">{t.title}</p>\n ) : null}\n <p className=\"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]\">{t.message}</p>\n </div>\n <div className=\"ml-4 flex shrink-0\">\n <button\n type=\"button\"\n onClick={() => dismiss(t.id)}\n className=\"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]\"\n aria-label=\"Dismiss\"\n title=\"Dismiss\"\n >\n <span className=\"sr-only\">Close</span>\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5\">\n <path d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z\" />\n </svg>\n </button>\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </ToastContext.Provider>\n );\n}\n\nexport function useToast() {\n const ctx = useContext(ToastContext);\n if (!ctx) throw new Error(\"useToast must be used within ToastProvider\");\n return ctx;\n}\n","\"use client\";\n\nimport { useSyncExternalStore } from \"react\";\n\nconst EVENT_NAME = \"ck-selected-team-changed\";\n\nfunction readSelectedTeamId(): string {\n if (typeof window === \"undefined\") return \"\";\n try {\n return (localStorage.getItem(\"ck-selected-team\") || \"\").trim();\n } catch {\n return \"\";\n }\n}\n\nfunction subscribe(cb: () => void) {\n if (typeof window === \"undefined\") return () => {};\n\n const handler = () => cb();\n\n // `storage` only fires across documents; we also dispatch a same-tab custom event.\n window.addEventListener(\"storage\", handler);\n window.addEventListener(EVENT_NAME, handler);\n\n return () => {\n window.removeEventListener(\"storage\", handler);\n window.removeEventListener(EVENT_NAME, handler);\n };\n}\n\nexport function useSelectedTeamId(): string {\n return useSyncExternalStore(subscribe, readSelectedTeamId, () => \"\");\n}\n\nexport function dispatchSelectedTeamChanged() {\n if (typeof window === \"undefined\") return;\n try {\n window.dispatchEvent(new Event(EVENT_NAME));\n } catch {\n // ignore\n }\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport { usePathname, useRouter } from \"next/navigation\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { dispatchSelectedTeamChanged } from \"@/lib/selected-team\";\nimport { ErrorBoundary } from \"@/components/ErrorBoundary\";\nimport { fetchJson } from \"@/lib/fetch-json\";\nimport { ThemeToggle } from \"@/components/ThemeToggle\";\nimport { ToastProvider } from \"@/components/ToastProvider\";\n\nfunction Icon({ children }: { children: React.ReactNode }) {\n return (\n <span\n className=\"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]\"\n aria-hidden\n >\n {children}\n </span>\n );\n}\n\nfunction SideNavLink({\n href,\n label,\n icon,\n active,\n collapsed,\n}: {\n href: string;\n label: string;\n icon: React.ReactNode;\n active: boolean;\n collapsed: boolean;\n}) {\n return (\n <Link\n href={href}\n title={label}\n className={\n (\n active\n ? \"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]\"\n : \"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n ) +\n (collapsed ? \" justify-center px-0 py-3\" : \" gap-4 px-4 py-3\")\n }\n >\n {icon}\n {collapsed ? null : <span>{label}</span>}\n </Link>\n );\n}\n\nexport function AppShell({ children }: { children: React.ReactNode }) {\n const pathname = usePathname() || \"/\";\n const router = useRouter();\n const teamIdFromPath = useMemo(() => {\n const m = pathname.match(/^\\/teams\\/([^/]+)(?:\\/|$)/);\n return m ? decodeURIComponent(m[1]) : null;\n }, [pathname]);\n\n const isTeamEditorRoute = useMemo(() => pathname.startsWith(\"/teams/\"), [pathname]);\n\n const [storedTeamId, setStoredTeamId] = useState<string>(() => {\n if (typeof window === \"undefined\") return \"\";\n try {\n return (localStorage.getItem(\"ck-selected-team\") || \"\").trim();\n } catch {\n return \"\";\n }\n });\n\n const selectedTeamId = (teamIdFromPath || storedTeamId).trim();\n\n function withTeamQuery(href: string, teamId: string): string {\n const [pathPart, qs] = href.split(\"?\");\n const sp = new URLSearchParams(qs ?? \"\");\n sp.set(\"team\", teamId);\n return `${pathPart}?${sp.toString()}`;\n }\n\n function navHref(href: string): string {\n if (!selectedTeamId) return href;\n // Only carry team context for pages that currently support it.\n if (href === \"/tickets\" || href === \"/goals\" || href === \"/cron-jobs\" || href === \"/runs\") {\n return withTeamQuery(href, selectedTeamId);\n }\n return href;\n }\n\n function syncTeamToCurrentUrl(teamId: string) {\n // Team editor routes already encode team in the path.\n if (pathname.startsWith(\"/teams/\")) return;\n // Only enforce on pages that support it.\n if (pathname !== \"/tickets\" && pathname !== \"/goals\" && pathname !== \"/cron-jobs\" && pathname !== \"/runs\") return;\n\n try {\n const url = new URL(window.location.href);\n\n if (!teamId) {\n if (!url.searchParams.has(\"team\")) return;\n url.searchParams.delete(\"team\");\n const qs = url.searchParams.toString();\n router.replace(url.pathname + (qs ? `?${qs}` : \"\"));\n return;\n }\n\n if ((url.searchParams.get(\"team\") ?? \"\").trim() === teamId) return;\n url.searchParams.set(\"team\", teamId);\n router.replace(url.pathname + \"?\" + url.searchParams.toString());\n } catch {\n // ignore\n }\n }\n\n // Keep URL in sync with the selected team on pages that support team filtering.\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n syncTeamToCurrentUrl(selectedTeamId);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- sync uses window.location\n }, [pathname, selectedTeamId]);\n\n // Keep localStorage in sync with the effective selected team (when we can compute it).\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n try {\n if (selectedTeamId) localStorage.setItem(\"ck-selected-team\", selectedTeamId);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n }, [selectedTeamId]);\n\n const [collapsed, setCollapsed] = useState(false);\n\n // Avoid hydration mismatch: render un-collapsed on the server, then sync from localStorage after mount.\n useEffect(() => {\n try {\n const v = localStorage.getItem(\"ck-leftnav-collapsed\");\n \n setCollapsed(v === \"1\");\n } catch {\n // ignore\n }\n }, []);\n\n\n\n function toggleCollapsed() {\n setCollapsed((v) => {\n const next = !v;\n try {\n localStorage.setItem(\"ck-leftnav-collapsed\", next ? \"1\" : \"0\");\n } catch {\n // ignore\n }\n return next;\n });\n }\n\n // Minimal team list (for switcher). We rely on existing /api/recipes.\n const [teamIds, setTeamIds] = useState<string[]>([]);\n useEffect(() => {\n (async () => {\n try {\n const json = await fetchJson<{ agents?: Array<{ workspace?: string }> }>(\"/api/agents\", { cache: \"no-store\" });\n const agents = Array.isArray(json.agents)\n ? (json.agents as Array<{ workspace?: string }> )\n : [];\n\n const s = new Set<string>();\n for (const a of agents) {\n const ws = String(a.workspace ?? \"\");\n const parts = ws.split(\"/\").filter(Boolean);\n const wsPart = parts.find((p) => p.startsWith(\"workspace-\")) ?? \"\";\n if (!wsPart) continue;\n const teamId = wsPart.slice(\"workspace-\".length);\n if (teamId && teamId !== \"workspace\") s.add(teamId);\n }\n\n setTeamIds(Array.from(s).sort());\n } catch {\n setTeamIds([]);\n }\n })();\n }, []);\n\n const globalNav = [\n {\n href: `/`,\n label: \"Agents\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M3 11l9-8 9 8\" />\n <path d=\"M5 10v10h14V10\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/recipes`,\n label: \"Recipes\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M6 4h12v16H6z\" />\n <path d=\"M9 8h6\" />\n <path d=\"M9 12h6\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/tickets`),\n label: \"Tickets\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/channels`,\n label: \"Channels\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 6h16\" />\n <path d=\"M4 12h16\" />\n <path d=\"M4 18h16\" />\n <path d=\"M7 9h0\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/goals`),\n label: \"Goals\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 3\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/cron-jobs`),\n label: \"Cron jobs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/runs`),\n label: \"Runs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 19h16\" />\n <path d=\"M6 16l4-4 3 3 5-7\" />\n <circle cx=\"10\" cy=\"12\" r=\"1\" />\n <circle cx=\"13\" cy=\"15\" r=\"1\" />\n <circle cx=\"18\" cy=\"8\" r=\"1\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/settings`,\n label: \"Settings\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z\" />\n <path d=\"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z\" />\n </svg>\n </Icon>\n ),\n },\n ];\n\n const sideWidth = collapsed ? \"w-16\" : \"w-72\";\n\n return (\n <ToastProvider>\n <div className=\"flex h-dvh w-dvw overflow-hidden\">\n <aside className={`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${sideWidth}`}>\n <div className=\"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3\">\n <Link href=\"/\" className=\"text-sm font-semibold tracking-tight\" title=\"Home\">\n {collapsed ? \"CK\" : \"Claw Kitchen\"}\n </Link>\n <button\n onClick={toggleCollapsed}\n className=\"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n title={collapsed ? \"Expand\" : \"Collapse\"}\n >\n {collapsed ? \"»\" : \"«\"}\n </button>\n </div>\n\n <div className=\"border-b border-[color:var(--ck-border-subtle)] p-2\">\n {collapsed ? (\n <button\n className=\"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10\"\n title={selectedTeamId ? `Team: ${selectedTeamId}` : \"Select team\"}\n onClick={() => {\n const id = teamIds[0] || \"\";\n if (!id) return;\n setStoredTeamId(id);\n try {\n localStorage.setItem(\"ck-selected-team\", id);\n } catch {\n // ignore\n }\n\n syncTeamToCurrentUrl(id);\n }}\n >\n 👥\n </button>\n ) : (\n <div className=\"flex flex-col gap-1\">\n <div className=\"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">\n Team\n </div>\n <select\n value={selectedTeamId ?? \"\"}\n disabled={isTeamEditorRoute}\n onChange={(e) => {\n const id = (e.target.value || \"\").trim();\n setStoredTeamId(id);\n try {\n if (id) localStorage.setItem(\"ck-selected-team\", id);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n\n dispatchSelectedTeamChanged();\n syncTeamToCurrentUrl(id);\n }}\n className={\n \"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\" +\n (isTeamEditorRoute ? \" cursor-not-allowed opacity-60\" : \"\")\n }\n >\n <option value=\"\">All teams</option>\n {teamIds.map((id) => (\n <option key={id} value={id}>\n {id}\n </option>\n ))}\n </select>\n\n {selectedTeamId ? (\n <Link\n href={`/teams/${encodeURIComponent(selectedTeamId)}`}\n className=\"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]\"\n >\n Edit team\n </Link>\n ) : null}\n </div>\n )}\n </div>\n\n <nav className=\"min-h-0 flex-1 overflow-auto p-2\">\n <div className=\"mt-2 px-2 pb-2 pt-2\">\n {/* section label intentionally omitted */}\n </div>\n {globalNav.map((it) => (\n <SideNavLink\n key={it.href}\n href={it.href}\n label={it.label}\n icon={<span aria-hidden>{it.icon}</span>}\n collapsed={collapsed}\n active={(() => {\n const hrefPath = it.href.split(\"?\")[0];\n return pathname === hrefPath || pathname.startsWith(hrefPath + \"/\");\n })()}\n />\n ))}\n </nav>\n\n <div className=\"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2\">\n <a\n href=\"https://github.com/JIGGAI/ClawRecipes/tree/main/docs\"\n target=\"_blank\"\n rel=\"noreferrer\"\n className={\n collapsed\n ? \"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n : \"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n }\n title=\"Docs\"\n >\n {collapsed ? \"📖\" : \"Docs\"}\n </a>\n {collapsed ? null : <ThemeToggle />}\n </div>\n </aside>\n\n <div className=\"min-w-0 flex-1\">\n <main className=\"h-full overflow-auto p-4 md:p-6\">\n <ErrorBoundary>{children}</ErrorBoundary>\n </main>\n </div>\n </div>\n </ToastProvider>\n );\n}","\"use client\";\n\nimport React from \"react\";\nimport Link from \"next/link\";\n\ntype Props = {\n children: React.ReactNode;\n fallback?: React.ReactNode;\n};\n\ntype State = {\n hasError: boolean;\n error: Error | null;\n};\n\n/**\n * React Error Boundary for graceful crash handling.\n * Catches runtime errors in child components and shows a fallback UI.\n */\nexport class ErrorBoundary extends React.Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.error(\"ErrorBoundary caught:\", error, errorInfo);\n }\n\n render() {\n if (this.state.hasError && this.state.error) {\n if (this.props.fallback) {\n return this.props.fallback;\n }\n return (\n <div className=\"ck-glass mx-auto max-w-2xl p-6 sm:p-8\">\n <h1 className=\"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]\">\n Something went wrong\n </h1>\n <p className=\"mt-2 text-sm text-[color:var(--ck-text-secondary)]\">\n An unexpected error occurred. You can try refreshing the page or go back home.\n </p>\n <pre className=\"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]\">\n {this.state.error.message}\n </pre>\n <div className=\"mt-6 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90\"\n >\n Refresh page\n </button>\n <Link\n href=\"/\"\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10\"\n >\n Go home\n </Link>\n </div>\n </div>\n );\n }\n return this.props.children;\n }\n}\n","\"use client\";\n\nfunction IconSvg({ className, children }: { className?: string; children: React.ReactNode }) {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n {children}\n </svg>\n );\n}\n\nexport function SunIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n />\n <path d=\"M12 2v2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M12 19.5V22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M2 12h2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M19.5 12H22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 4.2 6 6\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 18l1.8 1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 6l1.8-1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 19.8 6 18\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n </IconSvg>\n );\n}\n\nexport function MoonIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinejoin=\"round\"\n />\n </IconSvg>\n );\n}\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { MoonIcon, SunIcon } from \"@/components/icons\";\n\nexport type Theme = \"light\" | \"dark\";\n\nconst STORAGE_KEY = \"ck-theme\";\n\nfunction readInitialTheme(): Theme {\n // Default: dark mode.\n if (typeof window === \"undefined\") return \"dark\";\n const saved = window.localStorage.getItem(STORAGE_KEY);\n return saved === \"light\" ? \"light\" : \"dark\";\n}\n\nfunction applyTheme(theme: Theme) {\n document.documentElement.dataset.theme = theme;\n}\n\nexport function ThemeToggle() {\n const [theme, setTheme] = useState<Theme>(readInitialTheme);\n\n useEffect(() => {\n applyTheme(theme);\n window.localStorage.setItem(STORAGE_KEY, theme);\n }, [theme]);\n\n function toggle() {\n setTheme((t) => (t === \"dark\" ? \"light\" : \"dark\"));\n }\n\n const label = theme === \"dark\" ? \"Switch to light mode\" : \"Switch to dark mode\";\n\n return (\n <button\n type=\"button\"\n onClick={toggle}\n className=\"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]\"\n aria-label={label}\n title={label}\n >\n <span className=\"sr-only\" suppressHydrationWarning>\n {label}\n </span>\n {theme === \"dark\" ? (\n <MoonIcon className=\"h-4.5 w-4.5\" />\n ) : (\n <SunIcon className=\"h-4.5 w-4.5\" />\n )}\n </button>\n );\n}\n"],"names":["module","exports","require","vendored","HooksClientContext","ServerInsertedHtml","process","env","NEXT_RUNTIME","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK","ReactJsxRuntime","React","AppRouterContext","ReactServerDOMTurbopackClient"],"mappings":"4CAAAA,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACC,kBAAkB,+BCFzCJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACE,kBAAkB,+sBCwBjCL,EAAOC,OAAO,CAAGC,EAAQ,CAAA,CAAA,IAAA,iCC1BjCF,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAES,eAAe,+BCFxCZ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEU,KAAK,8BCF9B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AAU,CAAC,EAAW,MAP5D,EAAG,IAAI,OAalB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,wGACb,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CACC,KAAK,uDACL,OAAO,SACP,IAAI,aACJ,UACE,EACI,2JACA,+JAEN,MAAM,gBAEL,EAAY,KAAO,SAErB,EAAY,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAA,SAIzB,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,0BACb,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,2CACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,UAAe,YAM5B","ignoreList":[0,1,2,3,4,5,6]}
1
+ {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/hooks-client-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/server-inserted-html.ts","../../../../node_modules/next/src/server/route-modules/app-page/module.compiled.js","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/app-router-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../src/lib/fetch-json.ts","../../../../src/components/ToastProvider.tsx","../../../../src/lib/selected-team.ts","../../../../src/components/AppShell.tsx","../../../../src/components/ErrorBoundary.tsx","../../../../src/components/icons.tsx","../../../../src/components/ThemeToggle.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HooksClientContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].ServerInsertedHtml\n","if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxRuntime\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.React\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].AppRouterContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","/** Fetches multiple URLs in parallel with cache: \"no-store\". */\nexport async function fetchAll(urls: string[]): Promise<Response[]> {\n return Promise.all(urls.map((url) => fetch(url, { cache: \"no-store\" })));\n}\n\n/**\n * Fetches JSON and throws on !res.ok.\n * Use errorMessage(e) in catch blocks.\n */\nexport async function fetchJson<T = unknown>(url: string, opts?: RequestInit): Promise<T> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (!res.ok) throw new Error(json.error ?? \"Request failed\");\n return json as T;\n}\n\n/**\n * Fetches JSON and returns result with status. Use when you need to handle specific\n * HTTP status codes (e.g. 409) differently from generic errors.\n */\nexport async function fetchJsonWithStatus<T = unknown>(\n url: string,\n opts?: RequestInit\n): Promise<{ ok: true; data: T } | { ok: false; status: number; error: string }> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (res.ok) return { ok: true, data: json as T };\n return { ok: false, status: res.status, error: json.error ?? \"Request failed\" };\n}\n","\"use client\";\n\nimport { createContext, useCallback, useContext, useMemo, useState } from \"react\";\n\nexport type ToastKind = \"success\" | \"error\" | \"info\";\n\ntype ToastInternal = Toast & { state: \"enter\" | \"show\" | \"leave\" };\nexport type Toast = {\n id: string;\n kind: ToastKind;\n title?: string;\n message: string;\n timeoutMs?: number;\n};\n\ntype ToastContextValue = {\n push: (t: Omit<Toast, \"id\">) => void;\n};\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nfunction randomHex(bytes: number): string {\n const arr = new Uint8Array(bytes);\n crypto.getRandomValues(arr);\n return Array.from(arr, (b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\nfunction getToastMotionClass(state: \"enter\" | \"show\" | \"leave\"): string {\n if (state === \"enter\") return \"translate-x-[-16px] opacity-0\";\n if (state === \"leave\") return \"translate-x-[-16px] opacity-0\";\n return \"translate-x-0 opacity-100\";\n}\n\nfunction ToastIcon({ kind }: { kind: ToastKind }) {\n if (kind === \"success\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-emerald-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n if (kind === \"error\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-red-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-slate-300\">\n <path\n fillRule=\"evenodd\"\n d=\"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\nexport function ToastProvider({ children }: { children: React.ReactNode }) {\n const [toasts, setToasts] = useState<ToastInternal[]>([]);\n\n const removeNow = useCallback((id: string) => {\n setToasts((prev) => prev.filter((t) => t.id !== id));\n }, []);\n\n const dismiss = useCallback(\n (id: string) => {\n // Start leave animation, then remove.\n setToasts((prev) => prev.map((t) => (t.id === id ? { ...t, state: \"leave\" } : t)));\n window.setTimeout(() => removeNow(id), 250);\n },\n [removeNow],\n );\n\n const promoteToShow = useCallback((id: string) => {\n setToasts((prev) => prev.map((x) => (x.id === id ? { ...x, state: \"show\" } : x)));\n }, []);\n\n const push = useCallback(\n (t: Omit<Toast, \"id\">) => {\n const id = `${Date.now()}-${randomHex(8)}`;\n const toast: ToastInternal = { id, timeoutMs: 5000, state: \"enter\", ...t };\n setToasts((prev) => [toast, ...prev].slice(0, 4));\n\n window.setTimeout(() => promoteToShow(id), 10);\n\n const ms = toast.timeoutMs;\n if (ms && ms > 0) {\n window.setTimeout(() => dismiss(id), ms);\n }\n },\n [dismiss, promoteToShow],\n );\n\n const value = useMemo(() => ({ push }), [push]);\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n\n {/* Tailwind UI-inspired notifications */}\n <div\n aria-live=\"assertive\"\n className=\"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6\"\n >\n <div className=\"flex w-full flex-col items-start space-y-4\">\n {toasts.map((t) => (\n <div\n key={t.id}\n className={\n \"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] \" +\n getToastMotionClass(t.state)\n }\n >\n <div className=\"p-4\">\n <div className=\"flex items-start\">\n <div className=\"shrink-0\">\n <ToastIcon kind={t.kind} />\n </div>\n <div className=\"ml-3 w-0 flex-1\">\n {t.title ? (\n <p className=\"text-sm font-medium text-[color:var(--ck-text-primary)]\">{t.title}</p>\n ) : null}\n <p className=\"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]\">{t.message}</p>\n </div>\n <div className=\"ml-4 flex shrink-0\">\n <button\n type=\"button\"\n onClick={() => dismiss(t.id)}\n className=\"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]\"\n aria-label=\"Dismiss\"\n title=\"Dismiss\"\n >\n <span className=\"sr-only\">Close</span>\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5\">\n <path d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z\" />\n </svg>\n </button>\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </ToastContext.Provider>\n );\n}\n\nexport function useToast() {\n const ctx = useContext(ToastContext);\n if (!ctx) throw new Error(\"useToast must be used within ToastProvider\");\n return ctx;\n}\n","\"use client\";\n\nimport { useSyncExternalStore } from \"react\";\n\nconst EVENT_NAME = \"ck-selected-team-changed\";\n\nfunction readSelectedTeamId(): string {\n if (typeof window === \"undefined\") return \"\";\n try {\n return (localStorage.getItem(\"ck-selected-team\") || \"\").trim();\n } catch {\n return \"\";\n }\n}\n\nfunction subscribe(cb: () => void) {\n if (typeof window === \"undefined\") return () => {};\n\n const handler = () => cb();\n\n // `storage` only fires across documents; we also dispatch a same-tab custom event.\n window.addEventListener(\"storage\", handler);\n window.addEventListener(EVENT_NAME, handler);\n\n return () => {\n window.removeEventListener(\"storage\", handler);\n window.removeEventListener(EVENT_NAME, handler);\n };\n}\n\nexport function useSelectedTeamId(): string {\n return useSyncExternalStore(subscribe, readSelectedTeamId, () => \"\");\n}\n\nexport function dispatchSelectedTeamChanged() {\n if (typeof window === \"undefined\") return;\n try {\n window.dispatchEvent(new Event(EVENT_NAME));\n } catch {\n // ignore\n }\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport { usePathname, useRouter } from \"next/navigation\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { dispatchSelectedTeamChanged } from \"@/lib/selected-team\";\nimport { ErrorBoundary } from \"@/components/ErrorBoundary\";\nimport { fetchJson } from \"@/lib/fetch-json\";\nimport { ThemeToggle } from \"@/components/ThemeToggle\";\nimport { ToastProvider } from \"@/components/ToastProvider\";\n\nfunction Icon({ children }: { children: React.ReactNode }) {\n return (\n <span\n className=\"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]\"\n aria-hidden\n >\n {children}\n </span>\n );\n}\n\nfunction SideNavLink({\n href,\n label,\n icon,\n active,\n collapsed,\n}: {\n href: string;\n label: string;\n icon: React.ReactNode;\n active: boolean;\n collapsed: boolean;\n}) {\n return (\n <Link\n href={href}\n title={label}\n className={\n (\n active\n ? \"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]\"\n : \"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n ) +\n (collapsed ? \" justify-center px-0 py-3\" : \" gap-4 px-4 py-3\")\n }\n >\n {icon}\n {collapsed ? null : <span>{label}</span>}\n </Link>\n );\n}\n\nexport function AppShell({ children }: { children: React.ReactNode }) {\n const pathname = usePathname() || \"/\";\n const router = useRouter();\n const teamIdFromPath = useMemo(() => {\n const m = pathname.match(/^\\/teams\\/([^/]+)(?:\\/|$)/);\n return m ? decodeURIComponent(m[1]) : null;\n }, [pathname]);\n\n const isTeamEditorRoute = useMemo(() => pathname.startsWith(\"/teams/\"), [pathname]);\n\n const [storedTeamId, setStoredTeamId] = useState<string>(\"\");\n\n const selectedTeamId = (teamIdFromPath || storedTeamId).trim();\n\n function withTeamQuery(href: string, teamId: string): string {\n const [pathPart, qs] = href.split(\"?\");\n const sp = new URLSearchParams(qs ?? \"\");\n sp.set(\"team\", teamId);\n return `${pathPart}?${sp.toString()}`;\n }\n\n function navHref(href: string): string {\n if (!selectedTeamId) return href;\n // Only carry team context for pages that currently support it.\n if (href === \"/tickets\" || href === \"/goals\" || href === \"/cron-jobs\" || href === \"/runs\") {\n return withTeamQuery(href, selectedTeamId);\n }\n return href;\n }\n\n function syncTeamToCurrentUrl(teamId: string) {\n // Team editor routes already encode team in the path.\n if (pathname.startsWith(\"/teams/\")) return;\n // Only enforce on pages that support it.\n if (pathname !== \"/tickets\" && pathname !== \"/goals\" && pathname !== \"/cron-jobs\" && pathname !== \"/runs\") return;\n\n try {\n const url = new URL(window.location.href);\n\n if (!teamId) {\n if (!url.searchParams.has(\"team\")) return;\n url.searchParams.delete(\"team\");\n const qs = url.searchParams.toString();\n router.replace(url.pathname + (qs ? `?${qs}` : \"\"));\n return;\n }\n\n if ((url.searchParams.get(\"team\") ?? \"\").trim() === teamId) return;\n url.searchParams.set(\"team\", teamId);\n router.replace(url.pathname + \"?\" + url.searchParams.toString());\n } catch {\n // ignore\n }\n }\n\n // Load persisted selected team after hydration to avoid SSR/client mismatch.\n useEffect(() => {\n try {\n setStoredTeamId((localStorage.getItem(\"ck-selected-team\") || \"\").trim());\n } catch {\n // ignore\n }\n }, []);\n\n // Keep URL in sync with the selected team on pages that support team filtering.\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n syncTeamToCurrentUrl(selectedTeamId);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- sync uses window.location\n }, [pathname, selectedTeamId]);\n\n // Keep localStorage in sync with the effective selected team (when we can compute it).\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n try {\n if (selectedTeamId) localStorage.setItem(\"ck-selected-team\", selectedTeamId);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n }, [selectedTeamId]);\n\n const [collapsed, setCollapsed] = useState(false);\n\n // Avoid hydration mismatch: render un-collapsed on the server, then sync from localStorage after mount.\n useEffect(() => {\n try {\n const v = localStorage.getItem(\"ck-leftnav-collapsed\");\n \n setCollapsed(v === \"1\");\n } catch {\n // ignore\n }\n }, []);\n\n\n\n function toggleCollapsed() {\n setCollapsed((v) => {\n const next = !v;\n try {\n localStorage.setItem(\"ck-leftnav-collapsed\", next ? \"1\" : \"0\");\n } catch {\n // ignore\n }\n return next;\n });\n }\n\n // Minimal team list (for switcher). We rely on existing /api/recipes.\n const [teamIds, setTeamIds] = useState<string[]>([]);\n useEffect(() => {\n (async () => {\n try {\n const json = await fetchJson<{ agents?: Array<{ workspace?: string }> }>(\"/api/agents\", { cache: \"no-store\" });\n const agents = Array.isArray(json.agents)\n ? (json.agents as Array<{ workspace?: string }> )\n : [];\n\n const s = new Set<string>();\n for (const a of agents) {\n const ws = String(a.workspace ?? \"\");\n const parts = ws.split(\"/\").filter(Boolean);\n const wsPart = parts.find((p) => p.startsWith(\"workspace-\")) ?? \"\";\n if (!wsPart) continue;\n const teamId = wsPart.slice(\"workspace-\".length);\n if (teamId && teamId !== \"workspace\") s.add(teamId);\n }\n\n setTeamIds(Array.from(s).sort());\n } catch {\n setTeamIds([]);\n }\n })();\n }, []);\n\n const globalNav = [\n {\n href: `/`,\n label: \"Agents\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M3 11l9-8 9 8\" />\n <path d=\"M5 10v10h14V10\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/recipes`,\n label: \"Recipes\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M6 4h12v16H6z\" />\n <path d=\"M9 8h6\" />\n <path d=\"M9 12h6\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/tickets`),\n label: \"Tickets\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/channels`,\n label: \"Channels\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 6h16\" />\n <path d=\"M4 12h16\" />\n <path d=\"M4 18h16\" />\n <path d=\"M7 9h0\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/goals`),\n label: \"Goals\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 3\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/cron-jobs`),\n label: \"Cron jobs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/runs`),\n label: \"Runs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 19h16\" />\n <path d=\"M6 16l4-4 3 3 5-7\" />\n <circle cx=\"10\" cy=\"12\" r=\"1\" />\n <circle cx=\"13\" cy=\"15\" r=\"1\" />\n <circle cx=\"18\" cy=\"8\" r=\"1\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/settings`,\n label: \"Settings\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z\" />\n <path d=\"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z\" />\n </svg>\n </Icon>\n ),\n },\n ];\n\n const sideWidth = collapsed ? \"w-16\" : \"w-72\";\n\n return (\n <ToastProvider>\n <div className=\"flex h-dvh w-dvw overflow-hidden\">\n <aside className={`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${sideWidth}`}>\n <div className=\"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3\">\n <Link href=\"/\" className=\"text-sm font-semibold tracking-tight\" title=\"Home\">\n {collapsed ? \"CK\" : \"Claw Kitchen\"}\n </Link>\n <button\n onClick={toggleCollapsed}\n className=\"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n title={collapsed ? \"Expand\" : \"Collapse\"}\n >\n {collapsed ? \"»\" : \"«\"}\n </button>\n </div>\n\n <div className=\"border-b border-[color:var(--ck-border-subtle)] p-2\">\n {collapsed ? (\n <button\n className=\"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10\"\n title={selectedTeamId ? `Team: ${selectedTeamId}` : \"Select team\"}\n onClick={() => {\n const id = teamIds[0] || \"\";\n if (!id) return;\n setStoredTeamId(id);\n try {\n localStorage.setItem(\"ck-selected-team\", id);\n } catch {\n // ignore\n }\n\n syncTeamToCurrentUrl(id);\n }}\n >\n 👥\n </button>\n ) : (\n <div className=\"flex flex-col gap-1\">\n <div className=\"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">\n Team\n </div>\n <select\n value={selectedTeamId ?? \"\"}\n disabled={isTeamEditorRoute}\n onChange={(e) => {\n const id = (e.target.value || \"\").trim();\n setStoredTeamId(id);\n try {\n if (id) localStorage.setItem(\"ck-selected-team\", id);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n\n dispatchSelectedTeamChanged();\n syncTeamToCurrentUrl(id);\n }}\n className={\n \"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\" +\n (isTeamEditorRoute ? \" cursor-not-allowed opacity-60\" : \"\")\n }\n >\n <option value=\"\">All teams</option>\n {teamIds.map((id) => (\n <option key={id} value={id}>\n {id}\n </option>\n ))}\n </select>\n\n {selectedTeamId ? (\n <Link\n href={`/teams/${encodeURIComponent(selectedTeamId)}`}\n className=\"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]\"\n >\n Edit team\n </Link>\n ) : null}\n </div>\n )}\n </div>\n\n <nav className=\"min-h-0 flex-1 overflow-auto p-2\">\n <div className=\"mt-2 px-2 pb-2 pt-2\">\n {/* section label intentionally omitted */}\n </div>\n {globalNav.map((it) => (\n <SideNavLink\n key={it.href}\n href={it.href}\n label={it.label}\n icon={<span aria-hidden>{it.icon}</span>}\n collapsed={collapsed}\n active={(() => {\n const hrefPath = it.href.split(\"?\")[0];\n return pathname === hrefPath || pathname.startsWith(hrefPath + \"/\");\n })()}\n />\n ))}\n </nav>\n\n <div className=\"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2\">\n <a\n href=\"https://github.com/JIGGAI/ClawRecipes/tree/main/docs\"\n target=\"_blank\"\n rel=\"noreferrer\"\n className={\n collapsed\n ? \"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n : \"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n }\n title=\"Docs\"\n >\n {collapsed ? \"📖\" : \"Docs\"}\n </a>\n {collapsed ? null : <ThemeToggle />}\n </div>\n </aside>\n\n <div className=\"min-w-0 flex-1\">\n <main className=\"h-full overflow-auto p-4 md:p-6\">\n <ErrorBoundary>{children}</ErrorBoundary>\n </main>\n </div>\n </div>\n </ToastProvider>\n );\n}","\"use client\";\n\nimport React from \"react\";\nimport Link from \"next/link\";\n\ntype Props = {\n children: React.ReactNode;\n fallback?: React.ReactNode;\n};\n\ntype State = {\n hasError: boolean;\n error: Error | null;\n};\n\n/**\n * React Error Boundary for graceful crash handling.\n * Catches runtime errors in child components and shows a fallback UI.\n */\nexport class ErrorBoundary extends React.Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.error(\"ErrorBoundary caught:\", error, errorInfo);\n }\n\n render() {\n if (this.state.hasError && this.state.error) {\n if (this.props.fallback) {\n return this.props.fallback;\n }\n return (\n <div className=\"ck-glass mx-auto max-w-2xl p-6 sm:p-8\">\n <h1 className=\"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]\">\n Something went wrong\n </h1>\n <p className=\"mt-2 text-sm text-[color:var(--ck-text-secondary)]\">\n An unexpected error occurred. You can try refreshing the page or go back home.\n </p>\n <pre className=\"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]\">\n {this.state.error.message}\n </pre>\n <div className=\"mt-6 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90\"\n >\n Refresh page\n </button>\n <Link\n href=\"/\"\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10\"\n >\n Go home\n </Link>\n </div>\n </div>\n );\n }\n return this.props.children;\n }\n}\n","\"use client\";\n\nfunction IconSvg({ className, children }: { className?: string; children: React.ReactNode }) {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n {children}\n </svg>\n );\n}\n\nexport function SunIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n />\n <path d=\"M12 2v2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M12 19.5V22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M2 12h2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M19.5 12H22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 4.2 6 6\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 18l1.8 1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 6l1.8-1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 19.8 6 18\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n </IconSvg>\n );\n}\n\nexport function MoonIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinejoin=\"round\"\n />\n </IconSvg>\n );\n}\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { MoonIcon, SunIcon } from \"@/components/icons\";\n\nexport type Theme = \"light\" | \"dark\";\n\nconst STORAGE_KEY = \"ck-theme\";\n\nfunction readInitialTheme(): Theme {\n // Default: dark mode.\n if (typeof window === \"undefined\") return \"dark\";\n const saved = window.localStorage.getItem(STORAGE_KEY);\n return saved === \"light\" ? \"light\" : \"dark\";\n}\n\nfunction applyTheme(theme: Theme) {\n document.documentElement.dataset.theme = theme;\n}\n\nexport function ThemeToggle() {\n const [theme, setTheme] = useState<Theme>(readInitialTheme);\n\n useEffect(() => {\n applyTheme(theme);\n window.localStorage.setItem(STORAGE_KEY, theme);\n }, [theme]);\n\n function toggle() {\n setTheme((t) => (t === \"dark\" ? \"light\" : \"dark\"));\n }\n\n const label = theme === \"dark\" ? \"Switch to light mode\" : \"Switch to dark mode\";\n\n return (\n <button\n type=\"button\"\n onClick={toggle}\n className=\"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]\"\n aria-label={label}\n title={label}\n >\n <span className=\"sr-only\" suppressHydrationWarning>\n {label}\n </span>\n {theme === \"dark\" ? (\n <MoonIcon className=\"h-4.5 w-4.5\" />\n ) : (\n <SunIcon className=\"h-4.5 w-4.5\" />\n )}\n </button>\n );\n}\n"],"names":["module","exports","require","vendored","HooksClientContext","ServerInsertedHtml","process","env","NEXT_RUNTIME","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK","ReactJsxRuntime","React","AppRouterContext","ReactServerDOMTurbopackClient"],"mappings":"4CAAAA,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACC,kBAAkB,+BCFzCJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACE,kBAAkB,+sBCwBjCL,EAAOC,OAAO,CAAGC,EAAQ,CAAA,CAAA,IAAA,iCC1BjCF,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAES,eAAe,+BCFxCZ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEU,KAAK,8BCF9Bb,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACW,gBAAgB,+BCFvCd,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEY,6BAA6B,yBCD/C,eAAe,EAAS,CAAc,EAC3C,OAAO,QAAQ,GAAG,CAAC,EAAK,GAAG,CAAC,AAAC,GAAQ,MAAM,EAAK,CAAE,MAAO,UAAW,IACtE,CAMO,eAAe,EAAuB,CAAW,CAAE,CAA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