clawcrib 0.1.2 → 0.1.4

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 (143) hide show
  1. package/README.md +50 -12
  2. package/bin/clawcrib.mjs +10 -10
  3. package/dist/.next/BUILD_ID +1 -1
  4. package/dist/.next/build-manifest.json +2 -2
  5. package/dist/.next/server/app/_global-error.html +2 -2
  6. package/dist/.next/server/app/_global-error.rsc +1 -1
  7. package/dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/dist/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/dist/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/dist/.next/server/app/_not-found.html +2 -2
  14. package/dist/.next/server/app/_not-found.rsc +8 -8
  15. package/dist/.next/server/app/_not-found.segments/_full.segment.rsc +8 -8
  16. package/dist/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  17. package/dist/.next/server/app/_not-found.segments/_index.segment.rsc +7 -7
  18. package/dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  19. package/dist/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  20. package/dist/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/dist/.next/server/app/agent/[name]/page_client-reference-manifest.js +1 -1
  22. package/dist/.next/server/app/browse/page_client-reference-manifest.js +1 -1
  23. package/dist/.next/server/app/browse.html +2 -2
  24. package/dist/.next/server/app/browse.rsc +9 -9
  25. package/dist/.next/server/app/browse.segments/_full.segment.rsc +9 -9
  26. package/dist/.next/server/app/browse.segments/_head.segment.rsc +1 -1
  27. package/dist/.next/server/app/browse.segments/_index.segment.rsc +7 -7
  28. package/dist/.next/server/app/browse.segments/_tree.segment.rsc +2 -2
  29. package/dist/.next/server/app/browse.segments/browse/__PAGE__.segment.rsc +2 -2
  30. package/dist/.next/server/app/browse.segments/browse.segment.rsc +1 -1
  31. package/dist/.next/server/app/builder/page_client-reference-manifest.js +1 -1
  32. package/dist/.next/server/app/builder.html +2 -2
  33. package/dist/.next/server/app/builder.rsc +9 -9
  34. package/dist/.next/server/app/builder.segments/_full.segment.rsc +9 -9
  35. package/dist/.next/server/app/builder.segments/_head.segment.rsc +1 -1
  36. package/dist/.next/server/app/builder.segments/_index.segment.rsc +7 -7
  37. package/dist/.next/server/app/builder.segments/_tree.segment.rsc +2 -2
  38. package/dist/.next/server/app/builder.segments/builder/__PAGE__.segment.rsc +2 -2
  39. package/dist/.next/server/app/builder.segments/builder.segment.rsc +1 -1
  40. package/dist/.next/server/app/crib/[slug]/page_client-reference-manifest.js +1 -1
  41. package/dist/.next/server/app/crib/page/react-loadable-manifest.json +1 -1
  42. package/dist/.next/server/app/crib/page_client-reference-manifest.js +1 -1
  43. package/dist/.next/server/app/crib.html +1 -1
  44. package/dist/.next/server/app/crib.rsc +9 -9
  45. package/dist/.next/server/app/crib.segments/_full.segment.rsc +9 -9
  46. package/dist/.next/server/app/crib.segments/_head.segment.rsc +1 -1
  47. package/dist/.next/server/app/crib.segments/_index.segment.rsc +7 -7
  48. package/dist/.next/server/app/crib.segments/_tree.segment.rsc +2 -2
  49. package/dist/.next/server/app/crib.segments/crib/__PAGE__.segment.rsc +2 -2
  50. package/dist/.next/server/app/crib.segments/crib.segment.rsc +1 -1
  51. package/dist/.next/server/app/demo/page/react-loadable-manifest.json +1 -1
  52. package/dist/.next/server/app/demo/page_client-reference-manifest.js +1 -1
  53. package/dist/.next/server/app/demo.html +1 -1
  54. package/dist/.next/server/app/demo.rsc +9 -9
  55. package/dist/.next/server/app/demo.segments/_full.segment.rsc +9 -9
  56. package/dist/.next/server/app/demo.segments/_head.segment.rsc +1 -1
  57. package/dist/.next/server/app/demo.segments/_index.segment.rsc +7 -7
  58. package/dist/.next/server/app/demo.segments/_tree.segment.rsc +2 -2
  59. package/dist/.next/server/app/demo.segments/demo/__PAGE__.segment.rsc +2 -2
  60. package/dist/.next/server/app/demo.segments/demo.segment.rsc +1 -1
  61. package/dist/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
  62. package/dist/.next/server/app/feedback.html +2 -2
  63. package/dist/.next/server/app/feedback.rsc +9 -9
  64. package/dist/.next/server/app/feedback.segments/_full.segment.rsc +9 -9
  65. package/dist/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
  66. package/dist/.next/server/app/feedback.segments/_index.segment.rsc +7 -7
  67. package/dist/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
  68. package/dist/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +2 -2
  69. package/dist/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
  70. package/dist/.next/server/app/gltest/page_client-reference-manifest.js +1 -1
  71. package/dist/.next/server/app/gltest.html +1 -1
  72. package/dist/.next/server/app/gltest.rsc +9 -9
  73. package/dist/.next/server/app/gltest.segments/_full.segment.rsc +9 -9
  74. package/dist/.next/server/app/gltest.segments/_head.segment.rsc +1 -1
  75. package/dist/.next/server/app/gltest.segments/_index.segment.rsc +7 -7
  76. package/dist/.next/server/app/gltest.segments/_tree.segment.rsc +2 -2
  77. package/dist/.next/server/app/gltest.segments/gltest/__PAGE__.segment.rsc +2 -2
  78. package/dist/.next/server/app/gltest.segments/gltest.segment.rsc +1 -1
  79. package/dist/.next/server/app/help/page_client-reference-manifest.js +1 -1
  80. package/dist/.next/server/app/help.html +2 -2
  81. package/dist/.next/server/app/help.rsc +9 -9
  82. package/dist/.next/server/app/help.segments/_full.segment.rsc +9 -9
  83. package/dist/.next/server/app/help.segments/_head.segment.rsc +1 -1
  84. package/dist/.next/server/app/help.segments/_index.segment.rsc +7 -7
  85. package/dist/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  86. package/dist/.next/server/app/help.segments/help/__PAGE__.segment.rsc +2 -2
  87. package/dist/.next/server/app/help.segments/help.segment.rsc +1 -1
  88. package/dist/.next/server/app/index.html +1 -1
  89. package/dist/.next/server/app/index.rsc +9 -9
  90. package/dist/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  91. package/dist/.next/server/app/index.segments/_full.segment.rsc +9 -9
  92. package/dist/.next/server/app/index.segments/_head.segment.rsc +1 -1
  93. package/dist/.next/server/app/index.segments/_index.segment.rsc +7 -7
  94. package/dist/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  95. package/dist/.next/server/app/learn/page_client-reference-manifest.js +1 -1
  96. package/dist/.next/server/app/learn.html +2 -2
  97. package/dist/.next/server/app/learn.rsc +9 -9
  98. package/dist/.next/server/app/learn.segments/_full.segment.rsc +9 -9
  99. package/dist/.next/server/app/learn.segments/_head.segment.rsc +1 -1
  100. package/dist/.next/server/app/learn.segments/_index.segment.rsc +7 -7
  101. package/dist/.next/server/app/learn.segments/_tree.segment.rsc +2 -2
  102. package/dist/.next/server/app/learn.segments/learn/__PAGE__.segment.rsc +2 -2
  103. package/dist/.next/server/app/learn.segments/learn.segment.rsc +1 -1
  104. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  105. package/dist/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  106. package/dist/.next/server/app/privacy.html +2 -2
  107. package/dist/.next/server/app/privacy.rsc +8 -8
  108. package/dist/.next/server/app/privacy.segments/_full.segment.rsc +8 -8
  109. package/dist/.next/server/app/privacy.segments/_head.segment.rsc +1 -1
  110. package/dist/.next/server/app/privacy.segments/_index.segment.rsc +7 -7
  111. package/dist/.next/server/app/privacy.segments/_tree.segment.rsc +2 -2
  112. package/dist/.next/server/app/privacy.segments/privacy/__PAGE__.segment.rsc +2 -2
  113. package/dist/.next/server/app/privacy.segments/privacy.segment.rsc +1 -1
  114. package/dist/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  115. package/dist/.next/server/app/terms.html +2 -2
  116. package/dist/.next/server/app/terms.rsc +8 -8
  117. package/dist/.next/server/app/terms.segments/_full.segment.rsc +8 -8
  118. package/dist/.next/server/app/terms.segments/_head.segment.rsc +1 -1
  119. package/dist/.next/server/app/terms.segments/_index.segment.rsc +7 -7
  120. package/dist/.next/server/app/terms.segments/_tree.segment.rsc +2 -2
  121. package/dist/.next/server/app/terms.segments/terms/__PAGE__.segment.rsc +2 -2
  122. package/dist/.next/server/app/terms.segments/terms.segment.rsc +1 -1
  123. package/dist/.next/server/chunks/ssr/[root-of-the-server]__2734027d._.js +1 -1
  124. package/dist/.next/server/chunks/ssr/[root-of-the-server]__76b71b25._.js +1 -1
  125. package/dist/.next/server/chunks/ssr/[root-of-the-server]__b704ba4a._.js +1 -1
  126. package/dist/.next/server/chunks/ssr/_3449c279._.js +1 -1
  127. package/dist/.next/server/chunks/ssr/_a46dee72._.js +1 -1
  128. package/dist/.next/server/chunks/ssr/_e01a61c0._.js +1 -1
  129. package/dist/.next/server/middleware-manifest.json +1 -1
  130. package/dist/.next/server/pages/404.html +2 -2
  131. package/dist/.next/server/pages/500.html +2 -2
  132. package/dist/.next/static/chunks/{eb5f77ae3460c46e.js → 147eaa3f28375e0e.js} +1 -1
  133. package/dist/.next/static/chunks/{123ff9bd00156eb9.css → 3edb9f1efb76cb66.css} +1 -1
  134. package/dist/.next/static/chunks/7d0bdbbba0dcee37.js +1 -0
  135. package/dist/.next/static/chunks/{3cb5ccf4d1eaa633.js → d9f8785065e078fc.js} +1 -1
  136. package/dist/.next/static/chunks/{edfa7bbc21dc3450.js → fa8b0f4dcb290dc4.js} +1 -1
  137. package/dist/.next/static/chunks/fc6da6eec8b84aac.js +1 -0
  138. package/package.json +2 -2
  139. package/dist/.next/static/chunks/6b3aa1f3b4ac9239.js +0 -1
  140. package/dist/.next/static/chunks/d6211ae3ff8400ff.js +0 -1
  141. /package/dist/.next/static/{zYUlp2fcVlJKBhUQk1Pns → a1_F2n_Sn-m0Apxh748yG}/_buildManifest.js +0 -0
  142. /package/dist/.next/static/{zYUlp2fcVlJKBhUQk1Pns → a1_F2n_Sn-m0Apxh748yG}/_clientMiddlewareManifest.json +0 -0
  143. /package/dist/.next/static/{zYUlp2fcVlJKBhUQk1Pns → a1_F2n_Sn-m0Apxh748yG}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[32860,a=>{"use strict";let b=(0,a.i(60137).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);a.s(["ArrowRight",()=>b],32860)},71727,a=>{"use strict";let b=(0,a.i(60137).default)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);a.s(["Radio",()=>b],71727)},33441,a=>{"use strict";let b=(0,a.i(60137).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",()=>b],33441)},5151,a=>{"use strict";let b=(0,a.i(60137).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",()=>b],5151)},52495,a=>{"use strict";let b=(0,a.i(60137).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",()=>b],52495)},40777,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(32860),f=a.i(33441),g=a.i(5151),h=a.i(52495),i=a.i(60137);let j=(0,i.default)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var k=a.i(71727);let l=(0,i.default)("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);function m({compact:a=!1}){let[d,e]=(0,c.useState)(!1);return(0,b.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText("npx clawcrib").then(()=>{e(!0),setTimeout(()=>e(!1),1600)})},className:`group inline-flex items-center gap-3 rounded-xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/90 font-[family-name:var(--font-heading)] text-[var(--cc-text)] backdrop-blur-sm transition-all hover:border-[#E63946]/50 hover:shadow-[0_0_30px_rgba(230,57,70,0.15)] ${a?"px-5 py-3 text-sm":"px-6 py-3.5 text-base sm:text-lg"}`,"aria-label":"Copy npx clawcrib to clipboard",children:[(0,b.jsx)("span",{className:"select-none text-[var(--cc-muted)]",children:"$"}),(0,b.jsxs)("span",{className:"font-semibold",children:["npx ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"clawcrib"})]}),d?(0,b.jsx)(f.Check,{className:"h-4 w-4 text-[#4CAF50]"}):(0,b.jsx)(g.Copy,{className:"h-4 w-4 text-[var(--cc-muted)] transition-colors group-hover:text-[var(--cc-text)]"})]})}let n=[{id:"npm",label:"npm",cmd:"npx clawcrib"},{id:"pnpm",label:"pnpm",cmd:"pnpm dlx clawcrib"},{id:"bun",label:"bun",cmd:"bunx clawcrib"}];function o(){let[a,d]=(0,c.useState)("npm"),[e,h]=(0,c.useState)(!1),i=n.find(b=>b.id===a)??n[0];return(0,b.jsxs)("div",{className:"mx-auto w-full max-w-2xl rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/70 p-5 backdrop-blur-sm sm:p-6",children:[(0,b.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-1.5",children:n.map(c=>(0,b.jsx)("button",{onClick:()=>{d(c.id),h(!1)},"aria-pressed":c.id===a,className:`rounded-lg px-3.5 py-1.5 font-[family-name:var(--font-heading)] text-xs font-semibold transition-colors ${c.id===a?"bg-[#E63946]/12 text-[#E63946] ring-1 ring-inset ring-[#E63946]/30":"text-[var(--cc-muted)] hover:bg-[var(--cc-surface-raised)] hover:text-[var(--cc-text)]"}`,children:c.label},c.id))}),(0,b.jsxs)("div",{className:"mt-4 flex items-center gap-3 rounded-xl border border-[var(--cc-border)] bg-[var(--cc-void)] px-4 py-3.5",children:[(0,b.jsx)("span",{className:"select-none font-[family-name:var(--font-heading)] text-[var(--cc-muted)]",children:"$"}),(0,b.jsxs)("code",{className:"flex-1 overflow-x-auto whitespace-nowrap text-left font-[family-name:var(--font-heading)] text-sm font-semibold text-[var(--cc-text)] sm:text-base",children:[i.cmd.split(" clawcrib")[0]," ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"clawcrib"})]}),(0,b.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(i.cmd).then(()=>{h(!0),setTimeout(()=>h(!1),1600)})},className:"shrink-0 rounded-lg border border-[var(--cc-border)] p-2 transition-colors hover:border-[#E63946]/50 hover:bg-[var(--cc-surface-raised)]","aria-label":`Copy ${i.cmd} to clipboard`,children:e?(0,b.jsx)(f.Check,{className:"h-4 w-4 text-[#4CAF50]"}):(0,b.jsx)(g.Copy,{className:"h-4 w-4 text-[var(--cc-muted)]"})})]}),(0,b.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-x-5 gap-y-2 text-xs text-[var(--cc-muted)]",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(f.Check,{className:"h-3.5 w-3.5 text-[#4CAF50]"}),"Node 20.9+"]}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(f.Check,{className:"h-3.5 w-3.5 text-[#4CAF50]"}),"macOS, Linux, Windows"]}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(f.Check,{className:"h-3.5 w-3.5 text-[#4CAF50]"}),"No account, no cloud"]})]})]})}let p=[{icon:k.Radio,title:"Live, not a replay",body:"Streams straight from your OpenClaw gateway. Agents sit at desks, walk to the workboard, spawn sub-agents, fire crons — every movement is driven by real work happening right now."},{icon:j,title:"The whole team at a glance",body:"A giant workboard shows queued, running, done, and failed tasks while the activity feed narrates every tool call. One look at the floor tells you what your fleet is doing."},{icon:l,title:"Self-hosted in one command",body:"Install it on the machine your agents run on and it finds the gateway itself — no URL, no token, no config file. No account, no cloud, nothing leaves your network. No gateway there? It runs a simulated team so the floor is never empty."}],q=[{n:"01",title:"Install it where your agents run",code:"npm i -g clawcrib && clawcrib start",body:"Runs in the background, so closing the terminal — or your SSH session — doesn't stop it."},{n:"02",title:"It connects itself",code:"(nothing to type)",body:"ClawCrib finds the OpenClaw gateway on that machine and connects. No URL to copy, no token to paste. Over SSH it also binds your LAN and prints the address to open."},{n:"03",title:"Build your floor",code:"Plan tab → Build",body:"Rooms, desks, doors, teams. Saved locally and survives restarts — and clawcrib install-service brings the whole thing back on boot."}];function r(){return(0,b.jsxs)("div",{className:"bg-grid min-h-screen overflow-hidden",children:[(0,b.jsxs)("section",{className:"relative",children:[(0,b.jsxs)("div",{className:"absolute inset-0 z-0",children:[(0,b.jsx)("div",{className:"absolute left-1/2 top-24 h-[560px] w-[560px] -translate-x-1/2 rounded-full bg-[#E63946]/[0.08] blur-[130px]"}),(0,b.jsx)("div",{className:"absolute bottom-0 right-1/4 h-[360px] w-[360px] rounded-full bg-[#4CAF50]/[0.05] blur-[100px]"})]}),(0,b.jsxs)("div",{className:"relative z-10 mx-auto flex max-w-5xl flex-col items-center px-4 pb-10 pt-20 text-center sm:px-6 sm:pt-24 lg:px-8",children:[(0,b.jsxs)("div",{className:"mb-8 flex items-center gap-3 rounded-full border border-[var(--cc-border)] bg-[var(--cc-surface)]/80 px-4 py-2 backdrop-blur-sm",children:[(0,b.jsx)("img",{src:"/logo-bracket-claw.svg",alt:"ClawCrib",className:"h-8 w-auto"}),(0,b.jsxs)("span",{className:"font-[family-name:var(--font-heading)] text-base font-bold tracking-tight text-[var(--cc-text)]",children:[(0,b.jsx)("span",{className:"text-[#E63946]",children:"Claw"}),"Crib"]}),(0,b.jsx)("span",{className:"rounded border border-[#E63946]/20 bg-[#E63946]/10 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider text-[#E63946]",children:"beta"})]}),(0,b.jsxs)("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-black leading-[1.05] text-[var(--cc-text)] sm:text-6xl lg:text-7xl",children:["Your agents got",(0,b.jsx)("br",{}),"an ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"office"}),"."]}),(0,b.jsxs)("p",{className:"mx-auto mt-7 max-w-2xl text-base leading-relaxed text-[var(--cc-text-secondary)] sm:text-lg",children:["ClawCrib is a live 3D office for your"," ",(0,b.jsx)("a",{href:"https://openclaw.ai",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-[var(--cc-border)] underline-offset-4 transition-colors hover:text-[var(--cc-text)]",children:"OpenClaw"})," ","agents. Desks, a workboard, sub-agents, crons — your whole fleet working in real time, self-hosted on your machine."]}),(0,b.jsxs)("div",{className:"mt-10 flex flex-col items-center gap-4",children:[(0,b.jsx)(m,{}),(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3 sm:flex-row",children:[(0,b.jsxs)("a",{href:"https://www.npmjs.com/package/clawcrib",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-xl border border-[var(--cc-border)] px-7 py-3.5 text-sm font-semibold text-[var(--cc-text)] transition-all hover:border-[var(--cc-text-secondary)] hover:bg-[var(--cc-surface-raised)]",children:["clawcrib on npm",(0,b.jsx)(h.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,b.jsxs)(d.default,{href:"/demo",className:"group inline-flex items-center gap-2 rounded-xl bg-[#E63946] px-7 py-3.5 text-sm font-semibold text-white shadow-[0_0_30px_rgba(230,57,70,0.35)] transition-all hover:bg-[#C1121F] hover:shadow-[0_0_50px_rgba(230,57,70,0.5)]",children:["See a live crib",(0,b.jsx)(e.ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})]})]})]}),(0,b.jsx)("div",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-20 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)] shadow-[0_20px_80px_rgba(0,0,0,0.5),0_0_60px_rgba(230,57,70,0.08)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-[var(--cc-border)] bg-[var(--cc-surface-raised)] px-4 py-2.5",children:[(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#E63946]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#f4a261]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#4CAF50]/70"}),(0,b.jsx)("span",{className:"ml-3 font-[family-name:var(--font-heading)] text-xs text-[var(--cc-muted)]",children:"localhost:18787"})]}),(0,b.jsx)("img",{src:"/landing-crib-3d.jpg",alt:"ClawCrib 3D office — agents at desks, a live workboard, and an activity feed",className:"w-full"})]})})]}),(0,b.jsx)("section",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-20 sm:px-6 lg:px-8",children:(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-3",children:p.map(({icon:a,title:c,body:d})=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/60 p-6 backdrop-blur-sm transition-colors hover:border-[var(--cc-text-secondary)]/40",children:[(0,b.jsx)("div",{className:"mb-4 inline-flex rounded-lg border border-[#E63946]/20 bg-[#E63946]/10 p-2.5",children:(0,b.jsx)(a,{className:"h-5 w-5 text-[#E63946]"})}),(0,b.jsx)("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold text-[var(--cc-text)]",children:c}),(0,b.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-[var(--cc-text-secondary)]",children:d})]},c))})}),(0,b.jsxs)("section",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-20 sm:px-6 lg:px-8",children:[(0,b.jsxs)("div",{className:"mx-auto mb-8 max-w-2xl text-center",children:[(0,b.jsxs)("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-black text-[var(--cc-text)] sm:text-3xl",children:["Your floor, ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"your way"})]}),(0,b.jsx)("p",{className:"mt-3 text-base leading-relaxed text-[var(--cc-text-secondary)]",children:"Flip to the Plan view for a live blueprint of the building. Draw rooms, size them, place doors, and group agents into teams — the 3D office rebuilds itself to match."})]}),(0,b.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)] shadow-[0_20px_80px_rgba(0,0,0,0.5),0_0_60px_rgba(230,57,70,0.08)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-[var(--cc-border)] bg-[var(--cc-surface-raised)] px-4 py-2.5",children:[(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#E63946]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#f4a261]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#4CAF50]/70"}),(0,b.jsx)("span",{className:"ml-3 font-[family-name:var(--font-heading)] text-xs text-[var(--cc-muted)]",children:"localhost:18787 — Plan"})]}),(0,b.jsx)("img",{src:"/landing-blueprint.jpg",alt:"ClawCrib blueprint view — a live floor plan with rooms, desks and doors",className:"w-full"})]})]}),(0,b.jsxs)("section",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-24 sm:px-6 lg:px-8",children:[(0,b.jsxs)("h2",{className:"mb-8 text-center font-[family-name:var(--font-heading)] text-2xl font-black text-[var(--cc-text)] sm:text-3xl",children:["Up and running in ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"a minute"})]}),(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-3",children:q.map(a=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/60 p-6",children:[(0,b.jsx)("div",{className:"font-[family-name:var(--font-heading)] text-xs font-bold tracking-widest text-[#E63946]",children:a.n}),(0,b.jsx)("h3",{className:"mt-2 font-[family-name:var(--font-heading)] text-base font-bold text-[var(--cc-text)]",children:a.title}),(0,b.jsx)("code",{className:"mt-3 block break-words rounded-lg border border-[var(--cc-border)] bg-[var(--cc-void)] px-3 py-2 font-[family-name:var(--font-heading)] text-xs leading-relaxed text-[var(--cc-text-secondary)]",children:a.code}),(0,b.jsx)("p",{className:"mt-3 text-sm leading-relaxed text-[var(--cc-text-secondary)]",children:a.body})]},a.n))})]}),(0,b.jsx)("section",{className:"relative z-10 border-t border-[var(--cc-border)]",children:(0,b.jsxs)("div",{className:"mx-auto flex max-w-4xl flex-col items-center px-4 py-20 text-center sm:px-6 lg:px-8",children:[(0,b.jsx)("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-black text-[var(--cc-text)] sm:text-4xl",children:"Open the crib."}),(0,b.jsx)("p",{className:"mt-4 max-w-xl text-base text-[var(--cc-text-secondary)]",children:"Free and yours to host. Works with any OpenClaw gateway — or watch the simulated team first."}),(0,b.jsx)("div",{className:"mt-8 w-full",children:(0,b.jsx)(o,{})}),(0,b.jsxs)("a",{href:"https://www.npmjs.com/package/clawcrib",target:"_blank",rel:"noopener noreferrer",className:"mt-4 inline-flex items-center gap-2 rounded-xl border border-[var(--cc-border)] px-5 py-3 text-sm font-semibold text-[var(--cc-text)] transition-all hover:border-[var(--cc-text-secondary)] hover:bg-[var(--cc-surface-raised)]",children:["clawcrib on npm",(0,b.jsx)(h.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,b.jsxs)(d.default,{href:"/demo",className:"group mt-3 inline-flex items-center gap-2 rounded-xl bg-[#E63946] px-6 py-3 text-sm font-semibold text-white shadow-[0_0_30px_rgba(230,57,70,0.35)] transition-all hover:bg-[#C1121F] hover:shadow-[0_0_50px_rgba(230,57,70,0.5)]",children:["See a live crib",(0,b.jsx)(e.ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})]})})]})}a.s(["default",()=>r],40777)}];
1
+ module.exports=[32860,a=>{"use strict";let b=(0,a.i(60137).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);a.s(["ArrowRight",()=>b],32860)},71727,a=>{"use strict";let b=(0,a.i(60137).default)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);a.s(["Radio",()=>b],71727)},33441,a=>{"use strict";let b=(0,a.i(60137).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",()=>b],33441)},5151,a=>{"use strict";let b=(0,a.i(60137).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",()=>b],5151)},52495,a=>{"use strict";let b=(0,a.i(60137).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",()=>b],52495)},40777,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(32860),f=a.i(33441),g=a.i(5151),h=a.i(52495),i=a.i(60137);let j=(0,i.default)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var k=a.i(71727);let l=(0,i.default)("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]),m="npm i -g clawcrib && clawcrib start";function n({compact:a=!1}){let[d,e]=(0,c.useState)(!1);return(0,b.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(m).then(()=>{e(!0),setTimeout(()=>e(!1),1600)})},className:`group inline-flex items-center gap-3 rounded-xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/90 font-[family-name:var(--font-heading)] text-[var(--cc-text)] backdrop-blur-sm transition-all hover:border-[#E63946]/50 hover:shadow-[0_0_30px_rgba(230,57,70,0.15)] ${a?"px-5 py-3 text-sm":"px-6 py-3.5 text-base sm:text-lg"}`,"aria-label":`Copy "${m}" to clipboard`,children:[(0,b.jsx)("span",{className:"select-none text-[var(--cc-muted)]",children:"$"}),(0,b.jsxs)("span",{className:"whitespace-nowrap font-semibold",children:["npm i -g ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"clawcrib"}),(0,b.jsx)("span",{className:"text-[var(--cc-muted)]",children:" && "}),(0,b.jsx)("span",{className:"text-[#E63946]",children:"clawcrib"})," start"]}),d?(0,b.jsx)(f.Check,{className:"h-4 w-4 text-[#4CAF50]"}):(0,b.jsx)(g.Copy,{className:"h-4 w-4 text-[var(--cc-muted)] transition-colors group-hover:text-[var(--cc-text)]"})]})}let o=[{id:"npm",label:"npm",cmd:"npm i -g clawcrib && clawcrib start"},{id:"pnpm",label:"pnpm",cmd:"pnpm add -g clawcrib && clawcrib start"},{id:"bun",label:"bun",cmd:"bun add -g clawcrib && clawcrib start"}];function p(){let[a,d]=(0,c.useState)("npm"),[e,h]=(0,c.useState)(!1),i=o.find(b=>b.id===a)??o[0];return(0,b.jsxs)("div",{className:"mx-auto w-full max-w-2xl rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/70 p-5 backdrop-blur-sm sm:p-6",children:[(0,b.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-1.5",children:o.map(c=>(0,b.jsx)("button",{onClick:()=>{d(c.id),h(!1)},"aria-pressed":c.id===a,className:`rounded-lg px-3.5 py-1.5 font-[family-name:var(--font-heading)] text-xs font-semibold transition-colors ${c.id===a?"bg-[#E63946]/12 text-[#E63946] ring-1 ring-inset ring-[#E63946]/30":"text-[var(--cc-muted)] hover:bg-[var(--cc-surface-raised)] hover:text-[var(--cc-text)]"}`,children:c.label},c.id))}),(0,b.jsxs)("div",{className:"mt-4 flex items-center gap-3 rounded-xl border border-[var(--cc-border)] bg-[var(--cc-void)] px-4 py-3.5",children:[(0,b.jsx)("span",{className:"select-none font-[family-name:var(--font-heading)] text-[var(--cc-muted)]",children:"$"}),(0,b.jsx)("code",{className:"flex-1 overflow-x-auto whitespace-nowrap text-left font-[family-name:var(--font-heading)] text-sm font-semibold text-[var(--cc-text)] sm:text-base",children:i.cmd.split("clawcrib").map((a,c,d)=>(0,b.jsxs)("span",{children:[a,c<d.length-1?(0,b.jsx)("span",{className:"text-[#E63946]",children:"clawcrib"}):null]},c))}),(0,b.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(i.cmd).then(()=>{h(!0),setTimeout(()=>h(!1),1600)})},className:"shrink-0 rounded-lg border border-[var(--cc-border)] p-2 transition-colors hover:border-[#E63946]/50 hover:bg-[var(--cc-surface-raised)]","aria-label":`Copy ${i.cmd} to clipboard`,children:e?(0,b.jsx)(f.Check,{className:"h-4 w-4 text-[#4CAF50]"}):(0,b.jsx)(g.Copy,{className:"h-4 w-4 text-[var(--cc-muted)]"})})]}),(0,b.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-x-5 gap-y-2 text-xs text-[var(--cc-muted)]",children:[(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(f.Check,{className:"h-3.5 w-3.5 text-[#4CAF50]"}),"Node 20.9+"]}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(f.Check,{className:"h-3.5 w-3.5 text-[#4CAF50]"}),"macOS, Linux, Windows"]}),(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,b.jsx)(f.Check,{className:"h-3.5 w-3.5 text-[#4CAF50]"}),"No account, no cloud"]})]})]})}let q=[{icon:k.Radio,title:"Live, not a replay",body:"Streams straight from your OpenClaw gateway. Agents sit at desks, walk to the workboard, spawn sub-agents, fire crons. Every movement is driven by real work happening right now."},{icon:j,title:"The whole team at a glance",body:"A giant workboard shows queued, running, done, and failed tasks while the activity feed narrates every tool call. One look at the floor tells you what your fleet is doing."},{icon:l,title:"Self-hosted in one command",body:"Install it on the machine your agents run on and it finds the gateway itself. No URL, no token, no config file. No account, no cloud, nothing leaves your network. No gateway there? It runs a simulated team so the floor is never empty."}],r=[{n:"01",title:"Install it where your agents run",code:"npm i -g clawcrib && clawcrib start",body:"Runs in the background, so closing the terminal, or your SSH session, doesn't stop it."},{n:"02",title:"It connects itself",code:"(nothing to type)",body:"ClawCrib finds the OpenClaw gateway on that machine and connects. No URL to copy, no token to paste. Over SSH it also binds your LAN and prints the address to open."},{n:"03",title:"Build your floor",code:"Plan tab → Build",body:"Rooms, desks, doors, teams. Saved locally and survives restarts, and clawcrib install-service brings the whole thing back on boot."}];function s(){return(0,b.jsxs)("div",{className:"bg-grid min-h-screen overflow-hidden",children:[(0,b.jsxs)("section",{className:"relative",children:[(0,b.jsxs)("div",{className:"absolute inset-0 z-0",children:[(0,b.jsx)("div",{className:"absolute left-1/2 top-24 h-[560px] w-[560px] -translate-x-1/2 rounded-full bg-[#E63946]/[0.08] blur-[130px]"}),(0,b.jsx)("div",{className:"absolute bottom-0 right-1/4 h-[360px] w-[360px] rounded-full bg-[#4CAF50]/[0.05] blur-[100px]"})]}),(0,b.jsxs)("div",{className:"relative z-10 mx-auto flex max-w-5xl flex-col items-center px-4 pb-10 pt-20 text-center sm:px-6 sm:pt-24 lg:px-8",children:[(0,b.jsxs)("div",{className:"mb-8 flex items-center gap-3 rounded-full border border-[var(--cc-border)] bg-[var(--cc-surface)]/80 px-4 py-2 backdrop-blur-sm",children:[(0,b.jsx)("img",{src:"/logo-bracket-claw.svg",alt:"ClawCrib",className:"h-8 w-auto"}),(0,b.jsxs)("span",{className:"font-[family-name:var(--font-heading)] text-base font-bold tracking-tight text-[var(--cc-text)]",children:[(0,b.jsx)("span",{className:"text-[#E63946]",children:"Claw"}),"Crib"]}),(0,b.jsx)("span",{className:"rounded border border-[#E63946]/20 bg-[#E63946]/10 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider text-[#E63946]",children:"beta"})]}),(0,b.jsxs)("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-black leading-[1.05] text-[var(--cc-text)] sm:text-6xl lg:text-7xl",children:["Your agents got",(0,b.jsx)("br",{}),"an ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"office"}),"."]}),(0,b.jsxs)("p",{className:"mx-auto mt-7 max-w-2xl text-base leading-relaxed text-[var(--cc-text-secondary)] sm:text-lg",children:["ClawCrib is a live 3D office for your"," ",(0,b.jsx)("a",{href:"https://openclaw.ai",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-[#E63946] underline decoration-[#E63946]/40 underline-offset-4 transition-all hover:decoration-[#E63946] hover:[text-shadow:0_0_18px_rgba(230,57,70,0.55)]",children:"OpenClaw"})," ","agents. Desks, a workboard, sub-agents, crons. Your whole fleet working in real time, self-hosted on your machine."]}),(0,b.jsxs)("div",{className:"mt-10 flex flex-col items-center gap-4",children:[(0,b.jsx)(n,{}),(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3 sm:flex-row",children:[(0,b.jsxs)("a",{href:"https://www.npmjs.com/package/clawcrib",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-xl border border-[var(--cc-border)] px-7 py-3.5 text-sm font-semibold text-[var(--cc-text)] transition-all hover:border-[var(--cc-text-secondary)] hover:bg-[var(--cc-surface-raised)]",children:["clawcrib on npm",(0,b.jsx)(h.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,b.jsxs)(d.default,{href:"/demo",className:"group inline-flex items-center gap-2 rounded-xl bg-[#E63946] px-7 py-3.5 text-sm font-semibold text-white shadow-[0_0_30px_rgba(230,57,70,0.35)] transition-all hover:bg-[#C1121F] hover:shadow-[0_0_50px_rgba(230,57,70,0.5)]",children:["See a live crib",(0,b.jsx)(e.ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})]})]})]}),(0,b.jsx)("div",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-20 sm:px-6 lg:px-8",children:(0,b.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)] shadow-[0_20px_80px_rgba(0,0,0,0.5),0_0_60px_rgba(230,57,70,0.08)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-[var(--cc-border)] bg-[var(--cc-surface-raised)] px-4 py-2.5",children:[(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#E63946]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#f4a261]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#4CAF50]/70"}),(0,b.jsx)("span",{className:"ml-3 font-[family-name:var(--font-heading)] text-xs text-[var(--cc-muted)]",children:"localhost:18787"})]}),(0,b.jsx)("img",{src:"/landing-crib-3d.jpg",alt:"ClawCrib 3D office: agents at desks, a live workboard, and an activity feed",className:"w-full"})]})})]}),(0,b.jsx)("section",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-20 sm:px-6 lg:px-8",children:(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-3",children:q.map(({icon:a,title:c,body:d})=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/60 p-6 backdrop-blur-sm transition-colors hover:border-[var(--cc-text-secondary)]/40",children:[(0,b.jsx)("div",{className:"mb-4 inline-flex rounded-lg border border-[#E63946]/20 bg-[#E63946]/10 p-2.5",children:(0,b.jsx)(a,{className:"h-5 w-5 text-[#E63946]"})}),(0,b.jsx)("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold text-[var(--cc-text)]",children:c}),(0,b.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-[var(--cc-text-secondary)]",children:d})]},c))})}),(0,b.jsxs)("section",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-20 sm:px-6 lg:px-8",children:[(0,b.jsxs)("div",{className:"mx-auto mb-8 max-w-2xl text-center",children:[(0,b.jsxs)("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-black text-[var(--cc-text)] sm:text-3xl",children:["Your floor, ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"your way"})]}),(0,b.jsx)("p",{className:"mt-3 text-base leading-relaxed text-[var(--cc-text-secondary)]",children:"Flip to the Plan view for a live blueprint of the building. Draw rooms, size them, place doors, and group agents into teams. The 3D office rebuilds itself to match."})]}),(0,b.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)] shadow-[0_20px_80px_rgba(0,0,0,0.5),0_0_60px_rgba(230,57,70,0.08)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-[var(--cc-border)] bg-[var(--cc-surface-raised)] px-4 py-2.5",children:[(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#E63946]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#f4a261]/70"}),(0,b.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-[#4CAF50]/70"}),(0,b.jsx)("span",{className:"ml-3 font-[family-name:var(--font-heading)] text-xs text-[var(--cc-muted)]",children:"localhost:18787 · Plan"})]}),(0,b.jsx)("img",{src:"/landing-blueprint.jpg",alt:"ClawCrib blueprint view: a live floor plan with rooms, desks and doors",className:"w-full"})]})]}),(0,b.jsxs)("section",{className:"relative z-10 mx-auto max-w-6xl px-4 pb-24 sm:px-6 lg:px-8",children:[(0,b.jsxs)("h2",{className:"mb-8 text-center font-[family-name:var(--font-heading)] text-2xl font-black text-[var(--cc-text)] sm:text-3xl",children:["Up and running in ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"a minute"})]}),(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-3",children:r.map(a=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--cc-border)] bg-[var(--cc-surface)]/60 p-6",children:[(0,b.jsx)("div",{className:"font-[family-name:var(--font-heading)] text-xs font-bold tracking-widest text-[#E63946]",children:a.n}),(0,b.jsx)("h3",{className:"mt-2 font-[family-name:var(--font-heading)] text-base font-bold text-[var(--cc-text)]",children:a.title}),(0,b.jsx)("code",{className:"mt-3 block break-words rounded-lg border border-[var(--cc-border)] bg-[var(--cc-void)] px-3 py-2 font-[family-name:var(--font-heading)] text-xs leading-relaxed text-[var(--cc-text-secondary)]",children:a.code}),(0,b.jsx)("p",{className:"mt-3 text-sm leading-relaxed text-[var(--cc-text-secondary)]",children:a.body})]},a.n))})]}),(0,b.jsx)("section",{className:"relative z-10 border-t border-[var(--cc-border)]",children:(0,b.jsxs)("div",{className:"mx-auto flex max-w-4xl flex-col items-center px-4 py-20 text-center sm:px-6 lg:px-8",children:[(0,b.jsx)("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-black text-[var(--cc-text)] sm:text-4xl",children:"Open the crib."}),(0,b.jsx)("p",{className:"mt-4 max-w-xl text-base text-[var(--cc-text-secondary)]",children:"Free and yours to host. Works with any OpenClaw gateway, or watch the simulated team first."}),(0,b.jsx)("div",{className:"mt-8 w-full",children:(0,b.jsx)(p,{})}),(0,b.jsxs)("a",{href:"https://www.npmjs.com/package/clawcrib",target:"_blank",rel:"noopener noreferrer",className:"mt-4 inline-flex items-center gap-2 rounded-xl border border-[var(--cc-border)] px-5 py-3 text-sm font-semibold text-[var(--cc-text)] transition-all hover:border-[var(--cc-text-secondary)] hover:bg-[var(--cc-surface-raised)]",children:["clawcrib on npm",(0,b.jsx)(h.ExternalLink,{className:"h-3.5 w-3.5"})]}),(0,b.jsxs)(d.default,{href:"/demo",className:"group mt-3 inline-flex items-center gap-2 rounded-xl bg-[#E63946] px-6 py-3 text-sm font-semibold text-white shadow-[0_0_30px_rgba(230,57,70,0.35)] transition-all hover:bg-[#C1121F] hover:shadow-[0_0_50px_rgba(230,57,70,0.5)]",children:["See a live crib",(0,b.jsx)(e.ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})]})})]})}a.s(["default",()=>s],40777)}];
2
2
 
3
3
  //# sourceMappingURL=_a46dee72._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[32245,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"BailoutToCSR",{enumerable:!0,get:function(){return e}});let d=a.r(41997);function e({reason:a,children:b}){throw Object.defineProperty(new d.BailoutToCSRError(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},7773,(a,b,c)=>{"use strict";function d(a){return a.split("/").map(a=>encodeURIComponent(a)).join("/")}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"encodeURIPath",{enumerable:!0,get:function(){return d}})},97458,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"PreloadChunks",{enumerable:!0,get:function(){return i}});let d=a.r(87924),e=a.r(35112),f=a.r(56704),g=a.r(7773),h=a.r(68063);function i({moduleIds:a}){let b=f.workAsyncStorage.getStore();if(void 0===b)return null;let c=[];if(b.reactLoadableManifest&&a){let d=b.reactLoadableManifest;for(let b of a){if(!d[b])continue;let a=d[b].files;c.push(...a)}}if(0===c.length)return null;let i=(0,h.getDeploymentIdQueryOrEmptyString)();return(0,d.jsx)(d.Fragment,{children:c.map(a=>{let c=`${b.assetPrefix}/_next/${(0,g.encodeURIPath)(a)}${i}`;return a.endsWith(".css")?(0,d.jsx)("link",{precedence:"dynamic",href:c,rel:"stylesheet",as:"style",nonce:b.nonce},a):((0,e.preload)(c,{as:"script",fetchPriority:"low",nonce:b.nonce}),null)})})}},69853,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return j}});let d=a.r(87924),e=a.r(72131),f=a.r(32245),g=a.r(97458);function h(a){return{default:a&&"default"in a?a.default:a}}let i={loader:()=>Promise.resolve(h(()=>null)),loading:null,ssr:!0},j=function(a){let b={...i,...a},c=(0,e.lazy)(()=>b.loader().then(h)),j=b.loading;function k(a){let h=j?(0,d.jsx)(j,{isLoading:!0,pastDelay:!0,error:null}):null,i=!b.ssr||!!b.loading,k=i?e.Suspense:e.Fragment,l=b.ssr?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.PreloadChunks,{moduleIds:b.modules}),(0,d.jsx)(c,{...a})]}):(0,d.jsx)(f.BailoutToCSR,{reason:"next/dynamic",children:(0,d.jsx)(c,{...a})});return(0,d.jsx)(k,{...i?{fallback:h}:{},children:l})}return k.displayName="LoadableComponent",k}},19721,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return e}});let d=a.r(33354)._(a.r(69853));function e(a,b){let c={};"function"==typeof a&&(c.loader=a);let e={...c,...b};return(0,d.default)({...e,modules:e.loadableGenerated?.modules})}("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)},90660,a=>{"use strict";var b=a.i(87924),c=a.i(19721),d=a.i(50944),e=a.i(72131),f=a.i(82434),g=a.i(60137);let h=(0,g.default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var i=a.i(57064),j=a.i(70880);let k=(0,g.default)("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]),l=(0,g.default)("pencil-ruler",[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),m=(0,g.default)("rotate-3d",[["path",{d:"M16.466 7.5C15.643 4.237 13.952 2 12 2 9.239 2 7 6.477 7 12s2.239 10 5 10c.342 0 .677-.069 1-.2",key:"10n0gc"}],["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M19 15.57c-1.804.885-4.274 1.43-7 1.43-5.523 0-10-2.239-10-5s4.477-5 10-5c4.838 0 8.873 1.718 9.8 4",key:"1lxi77"}]]);var n=a.i(87654);let o=(0,g.default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var p=a.i(65341),q=a.i(33508);let r=(0,g.default)("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var s=a.i(5784);let t=(0,g.default)("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]),u=(0,g.default)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]),v=(0,g.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),w=(0,g.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);var x=a.i(74831);let y=["#7c5cff","#28d6a8","#ff9f43","#4ea8ff","#ff6b9d","#ffd166","#9b8cff","#5ad1c0"];function z(a){if(a.color)return a.color;let b=0;for(let c=0;c<a.id.length;c++)b=31*b+a.id.charCodeAt(c)>>>0;return y[b%y.length]}function A(a,b){switch(a){case"tool":return b?`running ${b}`:"started working";case"thinking":return b?`thinking — ${b}`:"is thinking";case"cron":return b?`cron job firing — ${b}`:"cron job firing";case"error":return"ran into an error";case"idle":return"finished — back to idle";case"offline":return"went offline";default:return`is ${a}`}}let B={name:"dark",pageBg:"#05060b",caption:"rgba(255,255,255,0.3)",legendOnLight:!1,blueprint:{bgFrom:"#0d2748",bgTo:"#0a1f3d",line:"rgba(205,228,255,0.85)",lineDim:"rgba(205,228,255,0.4)",lineFaint:"rgba(205,228,255,0.16)",fillWall:"rgba(190,215,245,0.22)",text:"rgba(220,235,255,0.9)",textDim:"rgba(220,235,255,0.5)"},three:{bgCss:"linear-gradient(180deg,#12141d 0%,#0b0d16 55%,#07080e 100%)",fog:"#0b0d16",fogNear:30,fogFar:80,ambient:.22,hemi:.26,hemiGround:"#0c0e16",dir:.55,dirColor:"#ffd9a8",dirWest:0,dirWestColor:"#9db7e0",envCeiling:.35,envWindow:.7,envWarm:1.5,envBg:"#0a0c12",floorRough:.7,baseColor:"#2e261c",wallBack:"#6e5640",wallLeft:"#634d39",contactOpacity:.5,exposure:1.15,ao:2.6,bloom:.55,vignette:.5,lampGlow:2.4,lampLight:6.5,trim:"#3a3226",brick:"#5e3c2d",mortar:"#463129",steel:"#23262c",rugLounge:"#3c4356",rugLoungeFleck:"rgba(120,140,190,ALPHA)",rugBullpen:"#4a4438",rugBullpenFleck:"rgba(190,170,130,ALPHA)",sofa:"#4a5168",glassOpacity:.14}},C={name:"light",pageBg:"#eef0f4",caption:"rgba(30,34,44,0.55)",legendOnLight:!0,blueprint:{bgFrom:"#f5f8fc",bgTo:"#e6edf6",line:"rgba(40,72,120,0.85)",lineDim:"rgba(40,72,120,0.45)",lineFaint:"rgba(40,72,120,0.16)",fillWall:"rgba(70,100,150,0.18)",text:"rgba(30,50,85,0.92)",textDim:"rgba(30,50,85,0.55)"},three:{bgCss:"linear-gradient(180deg,#eef0f4 0%,#d8dce3 55%,#c6ccd6 100%)",fog:"#dadee5",fogNear:34,fogFar:85,ambient:.55,hemi:.5,hemiGround:"#b8bcc4",dir:1.15,dirColor:"#ffffff",dirWest:1.7,dirWestColor:"#ffe6c4",envCeiling:1.6,envWindow:3.2,envWarm:1.4,envBg:"#34373f",floorRough:.65,baseColor:"#9aa1ad",wallBack:"#f2f3f5",wallLeft:"#eceef1",contactOpacity:.3,exposure:1.05,ao:2,bloom:.28,vignette:.32,lampGlow:.5,lampLight:0,trim:"#c6cad2",brick:"#c4a18c",mortar:"#ded3c8",steel:"#7d838e",rugLounge:"#aeb8cc",rugLoungeFleck:"rgba(90,110,160,ALPHA)",rugBullpen:"#c4bba9",rugBullpenFleck:"rgba(150,130,95,ALPHA)",sofa:"#9fa8c0",glassOpacity:.1}};function D(a){return"light"===a?C:B}function E({state:a,theme:c}){let{events:d,clear:f}=function(a){let b=(0,e.useRef)(null),c=(0,e.useRef)(0),[d,f]=(0,e.useState)([]);return(0,e.useEffect)(()=>{if(!a||0===a.updatedAt)return;let d=b.current;if(b.current=a,!d)return;let e=function(a,b,c){let d=[],e=b.updatedAt||a.updatedAt||0,f=new Map(a.agents.map(a=>[a.id,a]));for(let a of b.agents){let b=f.get(a.id);if(!b)continue;let g=z(a),h={agentId:a.id,agentName:a.name,color:g},i=a.activity?.title,j=!!i&&i!==b.activity?.title,k=b.status!==a.status,l="tool"===a.status||"thinking"===a.status;j&&l?d.push({id:c(),ts:e,...h,tone:a.status,text:A(a.status,i)}):k&&d.push({id:c(),ts:e,...h,tone:a.status,text:A(a.status,i)});let m=new Set(b.subAgents.map(a=>a.id)),n=new Set(a.subAgents.map(a=>a.id));for(let b of a.subAgents)m.has(b.id)||d.push({id:c(),ts:e,...h,tone:"subagent",text:`spawned sub-agent “${b.label}”${b.task?` — ${b.task}`:""}`});for(let a of b.subAgents)n.has(a.id)||d.push({id:c(),ts:e,...h,tone:"subagent",text:`sub-agent “${a.label}” wrapped up`})}let g=new Map(a.tasks.map(a=>[a.id,a])),h=new Map(b.agents.map(a=>[a.id,a.name]));for(let a of b.tasks){let b=g.get(a.id);if(b&&b.status===a.status)continue;let f=a.agentId&&h.get(a.agentId)||"Team",i=a.agentId?z({id:a.agentId}):"#8a93a6",j={agentId:a.agentId??"",agentName:f,color:i},k="running"===a.status&&(!b||"queued"===b.status),l="completed"===a.status||"failed"===a.status||"cancelled"===a.status||"timed_out"===a.status;if(k)d.push({id:c(),ts:e,...j,tone:"task",text:`task started — ${a.label}`});else if(l&&b){let b="completed"!==a.status;d.push({id:c(),ts:e,...j,tone:b?"error":"task",text:`task ${a.status.replace("_"," ")} — ${a.label}`})}}return d}(d,a,()=>`ev-${c.current+=1}`);e.length&&f(a=>{let b=a.concat(e);return b.length>300?b.slice(b.length-300):b})},[a]),{events:d,clear:()=>f([])}}(a),[g,h]=(0,e.useState)(!0),[i,j]=(0,e.useState)(!1),k=(0,e.useRef)(null),l=(0,e.useRef)(!0),m=D(c).legendOnLight;(0,e.useEffect)(()=>{let a=k.current;a&&g&&l.current&&(a.scrollTop=a.scrollHeight)},[d,g,i]);let n=m?"border-black/10 bg-white/80":"border-white/10 bg-[#0b0d14]/90",o=m?"text-[#5a6172]":"text-white/45",p=m?"text-[#2a313e]":"text-white/80",q=m?"text-[#9098a8]":"text-white/30",r=`rounded-md p-1 ${m?"text-[#5a6172] hover:bg-black/5 hover:text-[#1e2430]":"text-white/45 hover:bg-white/10 hover:text-white"}`,x=d[d.length-1];return g?(0,b.jsxs)("div",{className:`absolute bottom-4 right-4 z-20 flex w-[360px] flex-col rounded-2xl border backdrop-blur-md ${n}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)",maxHeight:i?"min(70dvh, 640px)":"320px"},children:[(0,b.jsxs)("div",{className:`flex items-center gap-2 border-b px-3 py-2.5 ${m?"border-black/10":"border-white/10"}`,children:[(0,b.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,b.jsx)("span",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400 opacity-60",style:{animationDuration:"2s"}}),(0,b.jsx)("span",{className:"relative h-2 w-2 rounded-full bg-emerald-400"})]}),(0,b.jsxs)("span",{className:`flex items-center gap-1.5 text-[13px] font-semibold ${m?"text-[#1e2430]":"text-white"}`,children:[(0,b.jsx)(u,{size:14})," Activity"]}),(0,b.jsx)("span",{className:`text-[11px] tabular-nums ${o}`,children:d.length}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-0.5",children:[(0,b.jsx)("button",{onClick:f,className:r,title:"Clear log","aria-label":"Clear log",children:(0,b.jsx)(t,{size:14})}),(0,b.jsx)("button",{onClick:()=>j(a=>!a),className:r,title:i?"Shrink":"Expand full log","aria-label":i?"Shrink":"Expand",children:i?(0,b.jsx)(w,{size:14}):(0,b.jsx)(v,{size:14})}),(0,b.jsx)("button",{onClick:()=>h(!1),className:r,title:"Minimize","aria-label":"Minimize",children:(0,b.jsx)(s.ChevronDown,{size:15})})]})]}),(0,b.jsx)("div",{ref:k,onScroll:()=>{let a=k.current;a&&(l.current=a.scrollHeight-a.scrollTop-a.clientHeight<24)},className:"flex flex-1 flex-col gap-1.5 overflow-y-auto px-3 py-2.5",children:0===d.length?(0,b.jsx)("p",{className:`px-1 py-6 text-center text-[12px] leading-relaxed ${o}`,children:"Watching the floor — activity will stream here as your agents pick up work."}):d.map(a=>(0,b.jsx)(F,{e:a,rowText:p,timeText:q},a.id))})]}):(0,b.jsxs)("button",{onClick:()=>h(!0),className:`absolute bottom-4 right-4 z-20 flex max-w-[340px] items-center gap-2 rounded-full border px-3 py-2 backdrop-blur-md ${n}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"Open activity feed",children:[(0,b.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,b.jsx)("span",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400 opacity-60",style:{animationDuration:"2s"}}),(0,b.jsx)("span",{className:"relative h-2 w-2 rounded-full bg-emerald-400"})]}),(0,b.jsx)(u,{size:14,className:o}),(0,b.jsx)("span",{className:`truncate text-[12px] ${p}`,children:x?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-semibold",style:{color:x.color},children:x.agentName})," ",x.text]}):"Activity feed"}),d.length>0?(0,b.jsx)("span",{className:`shrink-0 text-[11px] tabular-nums ${q}`,children:d.length}):null]})}function F({e:a,rowText:c,timeText:d}){var e;return(0,b.jsxs)("div",{className:"flex items-start gap-2 text-[12px] leading-snug",children:[(0,b.jsx)("span",{className:"mt-[5px] h-1.5 w-1.5 shrink-0 rounded-full",style:{background:"subagent"===(e=a.tone)?"#9b8cff":"task"===e?"#4ea8ff":x.STATUS_META[e]?.color??"#8a93a6"}}),(0,b.jsxs)("span",{className:`min-w-0 flex-1 ${c}`,children:[(0,b.jsx)("span",{className:"font-semibold",style:{color:a.color},children:a.agentName})," ",a.text]}),(0,b.jsx)("span",{className:`shrink-0 pt-px text-[10px] tabular-nums ${d}`,children:function(a){if(!a)return"";let b=new Date(a),c=a=>String(a).padStart(2,"0");return`${c(b.getHours())}:${c(b.getMinutes())}:${c(b.getSeconds())}`}(a.ts)})]})}var G=a.i(90669),H=a.i(94392),I=a.i(71727),J=a.i(60246),K=a.i(6807);function L({state:a}){let c=a.agents.filter(a=>"tool"===a.status||"thinking"===a.status||"cron"===a.status).length,d=a.agents.reduce((a,b)=>a+b.subAgents.length,0),e=a.tasks.filter(a=>"running"===a.status).length,f=a.tasks.filter(a=>"queued"===a.status).length;return(0,b.jsxs)("div",{className:"pointer-events-none absolute left-4 top-4 z-10 flex flex-col gap-3",children:[(0,b.jsxs)("div",{className:"pointer-events-auto flex items-center gap-2.5 rounded-2xl border border-white/10 bg-black/40 px-3.5 py-2.5 backdrop-blur-md",children:[(0,b.jsx)(N,{connection:a.connection}),(0,b.jsxs)("div",{className:"leading-tight",children:[(0,b.jsx)("div",{className:"text-[13px] font-semibold tracking-tight text-white",children:"ClawCrib"}),(0,b.jsx)("div",{className:"text-[11px] text-white/45",children:"gateway"===a.source?`gateway \xb7 ${a.serverVersion??"?"}`:"simulated feed"})]})]}),(0,b.jsxs)("div",{className:"pointer-events-auto flex flex-col gap-1.5 rounded-2xl border border-white/10 bg-black/35 px-3.5 py-3 backdrop-blur-md",children:[(0,b.jsx)(M,{icon:(0,b.jsx)(J.Users,{size:14}),label:"Agents",value:`${a.agents.length}`}),(0,b.jsx)(M,{icon:(0,b.jsx)(G.Activity,{size:14}),label:"Active",value:`${c}`,accent:c>0}),(0,b.jsx)(M,{icon:(0,b.jsx)(K.Workflow,{size:14}),label:"Sub-agents",value:`${d}`}),(0,b.jsx)(M,{icon:(0,b.jsx)(H.Cpu,{size:14}),label:"Tasks",value:`${e} run \xb7 ${f} queued`})]}),a.note?(0,b.jsx)("div",{className:"pointer-events-auto max-w-[260px] rounded-xl border border-amber-400/20 bg-amber-400/[0.06] px-3 py-2 text-[11px] leading-snug text-amber-200/80 backdrop-blur-md",children:a.note}):null,(0,b.jsx)("div",{className:"pointer-events-auto flex flex-wrap gap-x-3 gap-y-1 rounded-xl border border-white/10 bg-black/30 px-3 py-2 backdrop-blur-md",children:["tool","thinking","cron","idle","error"].map(a=>(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-[10.5px] text-white/55",children:[(0,b.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:x.STATUS_META[a].color}}),x.STATUS_META[a].label]},a))})]})}function M({icon:a,label:c,value:d,accent:e}){return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-6",children:[(0,b.jsxs)("span",{className:"flex items-center gap-2 text-[12px] text-white/45",children:[(0,b.jsx)("span",{className:"text-white/35",children:a}),c]}),(0,b.jsx)("span",{className:`text-[12px] font-medium tabular-nums ${e?"text-emerald-300":"text-white/85"}`,children:d})]})}function N({connection:a}){let{c,pulse:d}={live:{c:"#28d6a8",pulse:!0,label:"live"},mock:{c:"#7c5cff",pulse:!0,label:"mock"},connecting:{c:"#ffb547",pulse:!0,label:"connecting"},pairing:{c:"#ffb547",pulse:!0,label:"pairing"},error:{c:"#ff5d6c",pulse:!1,label:"error"}}[a];return(0,b.jsxs)("span",{className:"relative flex h-7 w-7 items-center justify-center",children:[(0,b.jsx)(I.Radio,{size:16,style:{color:c}}),d?(0,b.jsx)("span",{className:"absolute inset-0 animate-ping rounded-full opacity-30",style:{background:c,animationDuration:"2.4s"}}):null]})}var O=a.i(210),P=a.i(32860),Q=a.i(33441),R=a.i(5151),S=a.i(44494),T=a.i(43694);let U=(0,g.default)("sun-moon",[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",key:"xlf6rm"}],["path",{d:"M16 12a4 4 0 0 0-4-4",key:"6vsxu"}],["path",{d:"m19 5-1.256 1.256",key:"1yg6a6"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]),V="clawcrib:onboarded";function W({command:a}){let[c,d]=(0,e.useState)(!1);return(0,b.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(a).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})},className:"group flex w-full items-center gap-2 rounded-lg border border-white/12 bg-black/50 px-3 py-2 text-left transition-colors hover:border-white/25","aria-label":`Copy: ${a}`,children:[(0,b.jsx)("code",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap font-mono text-[11px] leading-relaxed text-white/80 [scrollbar-width:none]",children:a}),c?(0,b.jsx)(Q.Check,{size:13,className:"shrink-0 text-[#4CAF50]"}):(0,b.jsx)(R.Copy,{size:13,className:"shrink-0 text-white/35 transition-colors group-hover:text-white/70"})]})}function X({icon:a,title:c,body:d}){return(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-white/10 bg-white/[0.06] text-white/75",children:a}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("div",{className:"text-[12.5px] font-semibold text-white",children:c}),(0,b.jsx)("div",{className:"text-[11.5px] leading-relaxed text-white/55",children:d})]})]})}function Y({state:a,onClose:c}){let[d,g]=(0,e.useState)(0),h="gateway"===a.source&&"live"===a.connection,j=()=>{try{window.localStorage.setItem(V,"1")}catch{}c()};(0,e.useEffect)(()=>{let a=a=>{"Escape"===a.key&&j(),"ArrowRight"===a.key&&d<2&&g(d+1),"ArrowLeft"===a.key&&d>0&&g(d-1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]);let n=[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,b.jsx)("img",{src:"/logo-bracket-claw.svg",alt:"",className:"h-7 w-auto"}),(0,b.jsxs)("h2",{className:"text-lg font-bold text-white",children:["Welcome to your ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"crib"})]})]}),(0,b.jsx)("p",{className:"text-[13px] leading-relaxed text-white/65",children:"This is a live 3D office for your OpenClaw agents. Every desk, walk, and workboard card is driven by real agent activity — nothing here is decorative."}),(0,b.jsx)("div",{className:"mt-4 rounded-xl border border-white/10 bg-white/[0.04] p-3",children:h?(0,b.jsxs)("p",{className:"flex items-start gap-2 text-[12px] leading-relaxed text-white/70",children:[(0,b.jsx)(I.Radio,{size:14,className:"mt-0.5 shrink-0 text-[#4CAF50]"}),"You're connected to your gateway — the agents on the floor are your real team, live."]}):(0,b.jsxs)("p",{className:"flex items-start gap-2 text-[12px] leading-relaxed text-white/70",children:[(0,b.jsx)(I.Radio,{size:14,className:"mt-0.5 shrink-0 text-[#39e6e0]"}),"Right now you're watching a simulated team, so you can explore freely. The next step connects your real agents."]})})]},"welcome"),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"mb-1 text-lg font-bold text-white",children:"Connect your OpenClaw gateway"}),h?(0,b.jsx)(b.Fragment,{children:(0,b.jsx)("p",{className:"text-[13px] leading-relaxed text-white/65",children:"Already done — this crib is streaming live from your gateway. For reference, here's how to point ClawCrib at a gateway from any machine:"})}):(0,b.jsxs)("p",{className:"text-[13px] leading-relaxed text-white/65",children:["Your gateway speaks WebSocket on port ",(0,b.jsx)("code",{className:"font-mono text-white/80",children:"18789"})," by default. Pass it to ClawCrib when you launch:"]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-white/45",children:[(0,b.jsx)(T.MonitorSmartphone,{size:12})," Same machine"]}),(0,b.jsx)(W,{command:"npx clawcrib --gateway ws://127.0.0.1:18789 --token <your-token>"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-white/45",children:[(0,b.jsx)(S.Globe,{size:12})," Over Tailscale"]}),(0,b.jsx)(W,{command:"npx clawcrib --gateway ws://<machine>.<tailnet>.ts.net:18789 --token <your-token>"}),(0,b.jsxs)("p",{className:"mt-1.5 text-[11px] leading-relaxed text-white/45",children:["Works from any device on your tailnet. The first connect from a new machine may need a one-time approval on the gateway host: ",(0,b.jsx)("code",{className:"font-mono",children:"openclaw devices approve <requestId>"}),"."]})]}),(0,b.jsxs)("p",{className:"text-[11px] leading-relaxed text-white/45",children:["Use the token your gateway is configured with. ",(0,b.jsx)("code",{className:"font-mono",children:"OPENCLAW_GATEWAY_URL"})," and"," ",(0,b.jsx)("code",{className:"font-mono",children:"OPENCLAW_GATEWAY_TOKEN"})," environment variables work too."]})]})]},"connect"),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"mb-1 text-lg font-bold text-white",children:"Find your way around"}),(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,b.jsx)(X,{icon:(0,b.jsx)(m,{size:14}),title:"Plan / 3D toggle",body:"Top right. Plan is the blueprint view for laying out the floor; 3D is the live office. Drag orbits, scroll zooms, right-drag pans."}),(0,b.jsx)(X,{icon:(0,b.jsx)(l,{size:14}),title:"Build (Plan view)",body:"Add rooms and place them: Custom pins an exact spot and size, Auto packs the east wall. Drag left/right on any number field to scrub it. Lock the building size under Building."}),(0,b.jsx)(X,{icon:(0,b.jsx)(i.LayoutGrid,{size:14}),title:"Organize",body:"Buildings (profiles), departments, and which agents sit in which room. Room colors become department colors on the floor."}),(0,b.jsx)(X,{icon:(0,b.jsx)(U,{size:14}),title:"Theme",body:"One switch flips Plan and 3D between night and day."}),(0,b.jsx)(X,{icon:(0,b.jsx)(f.Bot,{size:14}),title:"Robot style",body:"3D view only — recolor your bots' body, visor, and eyes."}),(0,b.jsx)(X,{icon:(0,b.jsx)(k,{size:14}),title:"Activity feed",body:"Bottom right — a running narration of every tool call, task, and cron across the team."})]})]},"ui")];return(0,b.jsx)("div",{className:"absolute inset-0 z-40 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[3px]",role:"dialog","aria-modal":"true","aria-label":"ClawCrib tour",onClick:j,children:(0,b.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-white/12 bg-[#0c0e16]/95 p-5 shadow-2xl",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"mb-3 flex items-start justify-between",children:[(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:[0,1,2].map(a=>(0,b.jsx)("button",{onClick:()=>g(a),className:`h-1.5 rounded-full transition-all ${a===d?"w-6 bg-[#E63946]":"w-1.5 bg-white/20 hover:bg-white/40"}`,"aria-label":`Step ${a+1}`},a))}),(0,b.jsx)("button",{onClick:j,className:"rounded-full p-1 text-white/45 transition-colors hover:text-white","aria-label":"Close tour",children:(0,b.jsx)(q.X,{size:15})})]}),n[d],(0,b.jsxs)("div",{className:"mt-5 flex items-center justify-between",children:[d>0?(0,b.jsxs)("button",{onClick:()=>g(d-1),className:"inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-[12px] font-medium text-white/55 transition-colors hover:text-white",children:[(0,b.jsx)(O.ArrowLeft,{size:13})," Back"]}):(0,b.jsx)("button",{onClick:j,className:"rounded-lg px-2.5 py-1.5 text-[12px] font-medium text-white/40 transition-colors hover:text-white",children:"Skip tour"}),d<n.length-1?(0,b.jsxs)("button",{onClick:()=>g(d+1),className:"inline-flex items-center gap-1.5 rounded-lg bg-[#E63946] px-4 py-1.5 text-[12px] font-semibold text-white transition-colors hover:bg-[#C1121F]",children:["Next ",(0,b.jsx)(P.ArrowRight,{size:13})]}):(0,b.jsx)("button",{onClick:j,className:"inline-flex items-center gap-1.5 rounded-lg bg-[#E63946] px-4 py-1.5 text-[12px] font-semibold text-white transition-colors hover:bg-[#C1121F]",children:"Open the crib"})]})]})})}var Z=a.i(67900);let $=(0,g.default)("door-open",[["path",{d:"M11 20H2",key:"nlcfvz"}],["path",{d:"M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z",key:"au4z13"}],["path",{d:"M11 4H8a2 2 0 0 0-2 2v14",key:"74r1mk"}],["path",{d:"M14 12h.01",key:"1jfl7z"}],["path",{d:"M22 20h-3",key:"vhrsz"}]]);var _=a.i(15618),aa=a.i(81560);function ab(a){let b=a%4*.9;return{x:-3+b,z:-2+b,w:5,d:4}}let ac=["#7c5cff","#28d6a8","#ff9f43","#4ea8ff","#ff6b9d","#ffd166","#9b8cff","#5ad1c0"];function ad(){return{version:1,buildingName:"ClawCrib",rooms:[],assignments:{}}}function ae(a){return a.rooms.length>0}let af=0;function ag(){return af+=1,`room-${af}-${0x9e3779b1*af%1e5}`}let ah="clawcrib:profiles",ai="/api/crib/profiles";function aj(a,b){let c=b??ad();return{id:function(a){try{if("u">typeof crypto&&crypto.randomUUID)return`bld-${crypto.randomUUID().slice(0,8)}`}catch{}return`bld-${Math.random().toString(36).slice(2,10)}`}(0),name:a,config:{...c,buildingName:a},updatedAt:Date.now()}}function ak(a){let b=Array.isArray(a?.profiles)?a.profiles:[];return{version:1,activeId:b.some(b=>b.id===a?.activeId)?a.activeId:b[0]?.id??null,profiles:b}}var al=a.i(45741);let am=4/3,an={dx:-1,dz:0},ao={dx:0,dz:1},ap=["N","S","W","E"],aq=a=>Math.round(2*a)/2;function ar({state:a,config:c,update:d,onClose:f}){let g=[...c.rooms].sort((a,b)=>a.order-b.order),h=(a,b)=>d(c=>({...c,rooms:c.rooms.map(c=>c.id===a?{...c,...b}:c)})),i=(a,b,c)=>d(d=>({...d,rooms:d.rooms.map(e=>{if(e.id!==a)return e;let f={...e.rect??ab(d.rooms.indexOf(e)),[b]:aq(c)};return("w"===b||"d"===b)&&(f[b]=Math.max(2.5,f[b])),{...e,rect:f}})})),j=(0,e.useMemo)(()=>{let b=function(a,b){let c=[...a].sort((a,b)=>a.id.localeCompare(b.id)),d=[],e=[],f=[];if(b&&ae(b)){let a=new Map;for(let d of c){let c=b.assignments[d.id];if(c&&b.rooms.some(a=>a.id===c)){let b=a.get(c)??[];b.push(d),a.set(c,b)}else f.push(d)}for(let c of[...b.rooms].sort((a,b)=>a.order-b.order)){let b=a.get(c.id)??[];c.rect?e.push({def:c,agents:b}):d.push(function(a,b,c,d){var e;let f,{cols:g,rows:h}={cols:f=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(Math.max(e=d.length,1))))),rows:Math.ceil(Math.max(e,1)/f)};return{id:a,name:b,color:c,agents:d,cols:g,rows:h,w:2.55*h+1.6+.55,d:2.3*g+1.6}}(c.id,c.name,c.color,b))}}else f=c;let g=c.flatMap(a=>a.subAgents.map(b=>({s:b,parent:a}))),h=new Map;if(b&&ae(b)){let a=new Map(b.rooms.map(a=>[a.id,a.color]));for(let[c,d]of Object.entries(b.assignments)){let b=a.get(d);b&&h.set(c,b)}}let i=(a,b)=>h.get(a)??b??"#8a93b0",j=Math.max(...d.map(a=>a.w),4.8),k=0,l=0;for(let a of e){let b=a.def.rect;k=Math.max(k,Math.abs(b.x)+b.w/2),l=Math.max(l,Math.abs(b.z)+b.d/2)}let m=b?.building,n=Math.max(18,10.5+j+.22,2*(k+.22),m?.w??0),o=n/2,p=o-.22,q=p-j,r=-o+2.4+.8,s=q-1.3-r,t=Math.max(4.6,Math.min(.5*n,.4*n)),u=5.12+Math.max(d.reduce((a,b,c)=>a+b.d+1.2*!!c,0),9.4)+.22,v=Math.max(1,Math.floor(s/2.3)),w=Math.min(5,Math.max(1,Math.ceil((f.length+g.length)/v))),x=e.map(({def:a})=>a.rect.z-a.rect.d/2),y=x.length?2*(5.12+2.55*w+2.3+.3+-Math.min(...x)):0,z=m?Math.max(u,2*(l+.22),m.d):Math.max(18,u,n*am,2*(l+.22),y),A=z/2,B=-A,C=B+.22+3.6+1.3,D=A-.22,E=new Map;for(let{def:a}of e){let b={...a.rect};.55>Math.abs(b.x+b.w/2-(o-.22))?b.x=o-.22-b.w/2:.55>Math.abs(b.x-b.w/2-(-o+.22))&&(b.x=-o+.22+b.w/2),.55>Math.abs(b.z+b.d/2-(A-.22))?b.z=A-.22-b.d/2:.55>Math.abs(b.z-b.d/2-(B+.22))&&(b.z=B+.22+b.d/2),E.set(a.id,b)}let F=new Map,G=new Map,H=[],I=(a,b,c,d,e,f,g,h)=>{let i=Math.atan2(h.dx,h.dz),j={x:f-.42*h.dx,z:g-.42*h.dz};return{key:a,agentId:b,isSub:c,seat:j,desk:{x:f+.34*h.dx,z:g+.34*h.dz},deskYaw:i+Math.PI,faceYaw:i,color:d,status:e,out:{x:j.x-.62*h.dx,z:j.z-.62*h.dz}}},J=p-t/2,K=B+.22+1.8;H.push({id:"__conference__",name:"Conference",color:"#ffb547",walled:!0,placeholder:!0,x:J,z:K,w:t,d:3.6,desks:[],door:{side:"S",x:J,z:K+1.8,w:1.9}});let L=(a,b,c,d,e)=>{let f=2.3*a.cols,g=2.55*a.rows,h=c-f/2+1.15,j=b-g/2+1.275,k=d+.45,l=2.3*a.cols/2,m=[];return a.agents.forEach((b,c)=>{let f=c%a.cols,g=Math.floor(c/a.cols),n=h+2.3*f,o=i(b.id,b.color),p=I(b.id,b.id,!1,o,b.status,j+2.55*g,n,an);p.inRoom=!0,p.roomDoor={x:d,z:e};let q=n<=e?-1:1,r=e+q*(l+.4);p.exit=[{x:p.seat.x,z:r},{x:k,z:r},{x:k,z:e}],m.push(p),F.set(b.id,p),G.set(b.id,{key:b.id,name:b.name,label:b.name,color:o,status:b.status,activity:b.activity,isDefault:b.isDefault,isSub:!1,scale:1})}),m},M=D;for(let a of d){let b=p-j/2,c=M-a.d/2,d={side:"W",x:q,z:c,w:1.9};H.push({id:a.id,name:a.name,color:a.color,walled:!0,x:b,z:c,w:j,d:a.d,desks:L(a,b,c,q,c),door:d}),M-=a.d+1.2}let N=a=>"W"===a?{dx:-1,dz:0}:"E"===a?{dx:1,dz:0}:"N"===a?{dx:0,dz:-1}:{dx:0,dz:1},O=a=>"S"===a.side?{x:a.x,z:a.z-.5}:"N"===a.side?{x:a.x,z:a.z+.5}:"W"===a.side?{x:a.x+.5,z:a.z}:{x:a.x-.5,z:a.z};for(let{def:a,agents:b}of e){let c=E.get(a.id)??a.rect,d=a.doorSide??"S",e="S"===d?{side:d,x:c.x,z:c.z+c.d/2,w:1.9}:"N"===d?{side:d,x:c.x,z:c.z-c.d/2,w:1.9}:"W"===d?{side:d,x:c.x-c.w/2,z:c.z,w:1.9}:{side:d,x:c.x+c.w/2,z:c.z,w:1.9},g=O(e),h=N(d),j=Math.max(2.3,c.w-1.6),k=Math.max(1,Math.min(Math.max(1,b.length),Math.floor(j/2.3)||1)),l=Math.max(1,Math.floor((c.d-1.6-.55)/2.55)),m=b.slice(0,k*l);f.push(...b.slice(k*l));let n=c.x-2.3*k/2+1.15,o=c.z-c.d/2+.8+.55+1.275,p=[];m.forEach((a,b)=>{let d=n+b%k*2.3,e=o+2.55*Math.floor(b/k),f=i(a.id,a.color),j=I(a.id,a.id,!1,f,a.status,d,e,h);j.inRoom=!0,j.roomDoor={x:g.x,z:g.z},j.exit=[{x:g.x,z:g.z}],j.out={x:Math.max(c.x-c.w/2+.5,Math.min(c.x+c.w/2-.5,j.out.x)),z:Math.max(c.z-c.d/2+.5,Math.min(c.z+c.d/2-.5,j.out.z))},p.push(j),F.set(a.id,j),G.set(a.id,{key:a.id,name:a.name,label:a.name,color:f,status:a.status,activity:a.activity,isDefault:a.isDefault,isSub:!1,scale:1})}),H.push({id:a.id,name:a.name,color:a.color,walled:!0,x:c.x,z:c.z,w:c.w,d:c.d,desks:p,door:e})}let P=Math.max(1,Math.floor(s/2.3)),Q=Math.max(1,Math.min(4,P)),R=Math.min(s,2.3*Q+.9),S=r+R/2,T=D-2.4;for(let a of H){if(!a.walled)continue;let b=a.z-a.d/2;!(b<=C)&&a.x+a.w/2+2.3>S-R/2&&a.x-a.w/2-2.3<S+R/2&&(T=Math.min(T,b-2.3))}let U=(T=Math.max(T,C+2.55))-C,V=Math.max(1,Math.min(16,Math.floor(U/2.55+1e-6))),W=Q,X=f.length+g.length;for(;W<P&&W*V<X;)W++;W*V<X&&(V=Math.max(1,Math.min(16,Math.floor((U=(T=D-2.4)-C)/2.55))));let Y=W*V,Z=Math.min(s,2.3*W+.9),$=r+Z/2,_=$-2.3*W/2+1.15,aa=C+1.275+Math.max(0,(U-2.55*V)/2),ab=[...f.map(a=>({id:a.id,name:a.name,color:i(a.id,a.color),status:a.status,activity:a.activity,isDefault:a.isDefault,isSub:!1})),...g.map(({s:a})=>({id:a.id,name:a.label,color:i(a.agentId),status:a.status,isSub:!0}))],ac=(a,b)=>{for(let c of H)if(c.walled&&Math.abs(a-c.x)<c.w/2+2.3&&Math.abs(b-c.z)<c.d/2+2.3)return!1;return!0},ad=[],af=[],ag=[],ah=(a,b,c)=>{let d=I(a.id,a.id,a.isSub,a.color,a.status,b,c,ao);ad.push(d),F.set(a.id,d),G.set(a.id,{key:a.id,name:a.name,label:a.name,color:a.color,status:a.status,activity:a.activity,isDefault:a.isDefault,isSub:a.isSub,scale:a.isSub?.78:1}),a.isSub&&ag.push({key:a.id,agentId:a.id})},ai=a=>[_+a%W*2.3,aa+2.55*Math.floor(a/W)],aj=[],ak=0;for(let a=0;a<Y;a++){let[b,c]=ai(a);if(!ac(b,c)){aj.push(a);continue}ak<ab.length?ah(ab[ak++],b,c):af.push({x:b,z:c-.42,deskX:b,deskZ:c+.34,deskYaw:Math.PI})}let ap=(a,b)=>H.some(c=>c.walled&&Math.abs(a-c.x)<c.w/2&&Math.abs(b-c.z)<c.d/2);for(let a of aj){if(ak>=ab.length)break;let[b,c]=ai(a);ap(b,c)||ah(ab[ak++],b,c)}for(let a=0;ak<ab.length;a++){let[b,c]=ai(a%W);ah(ab[ak++],b,c)}let aq=-o+.22,ar=J-t/2-.35,as=Math.max(1.9,ar-aq),at=(aq+ar)/2,au=Math.max(1,Math.min(10,Math.floor(as/1.9))),av=Math.max(1,Math.floor(1.1578947368421053)+1),aw=at-1.9*au/2+.95,ax=B+.22+.7+.95,ay=[];for(let a=0;a<au*av;a++){let b=a%au,c=ax+1.9*Math.floor(a/au);c>B+.22+3.6-.4||ay.push({x:aw+1.9*b,z:c,yaw:0})}let az=2.3*W/2,aA=$-az-.95,aB=Math.min($+az+.95,q-.5),aC=C-.65,aD=Math.min(D-1.2,T+.95),aE=[{x:-o+.95,z:A-1.2,s:1.05},{x:-o+.95,z:B+1.3,s:1}],aF=[];for(let a of F.values())aF.push({x:(a.desk.x+a.seat.x)/2,z:(a.desk.z+a.seat.z)/2,hx:.78,hz:.62,key:a.key});for(let a of af)aF.push({x:(a.deskX+a.x)/2,z:(a.deskZ+a.z)/2,hx:.78,hz:.62});for(let a of ay)aF.push({x:a.x,z:a.z,hx:.72,hz:.5});for(let a of aE)aF.push({x:a.x,z:a.z,hx:.42*a.s,hz:.42*a.s});let aG=[];for(let a of H){if(!a.walled)continue;let b=a.w/2,c=a.d/2,d=a.door?.side??"S",e="N"===d||"S"===d?a.w:a.d,f=Math.min(a.door?.w??1.9,.6*e),g=(e-f)/2,h=f/2+g/2,i=(c,d)=>{d&&g>.05?(aG.push({x:a.x-h,z:c,hx:g/2,hz:.09}),aG.push({x:a.x+h,z:c,hx:g/2,hz:.09})):d||aG.push({x:a.x,z:c,hx:b,hz:.09})},j=(b,d)=>{d&&g>.05?(aG.push({x:b,z:a.z-h,hx:.09,hz:g/2}),aG.push({x:b,z:a.z+h,hx:.09,hz:g/2})):d||aG.push({x:b,z:a.z,hx:.09,hz:c})};i(a.z-c,"N"===d),i(a.z+c,"S"===d),j(a.x-b,"W"===d),j(a.x+b,"E"===d)}let aH=-o+1.35,aI=ay.length?Math.max(...ay.map(a=>a.z))+.75:aC,aJ=[{x0:aA,z0:aC,x1:aA,z1:aD},{x0:aB,z0:aC,x1:aB,z1:aD},{x0:aH,z0:aC,x1:aB,z1:aC},{x0:aH,z0:aD,x1:aB,z1:aD},{x0:aH,z0:aC,x1:aH,z1:aD},{x0:at,z0:aI,x1:at,z1:aC}];for(let a of H){let b=a.door;if(!b)continue;let c="W"===b.side?{dx:-1,dz:0}:"E"===b.side?{dx:1,dz:0}:"N"===b.side?{dx:0,dz:-1}:{dx:0,dz:1},d=1.2;if(0!==c.dx){let a=[aA,aB].filter(a=>(a-b.x)*c.dx>0);a.length&&(d=Math.min(...a.map(a=>Math.abs(a-b.x))))}else{let a=[aC,aD].filter(a=>(a-b.z)*c.dz>0);a.length&&(d=Math.min(...a.map(a=>Math.abs(a-b.z))))}aJ.push({x0:b.x,z0:b.z,x1:b.x+c.dx*d,z1:b.z+c.dz*d})}return{W:n,halfW:o,D:z,halfD:A,backZ:B,rooms:H,bullpen:{x:$,z:(C+T)/2,w:Z,d:U,agentDesks:ad,spots:af},lounge:{x:at,z:B+.22+1.8,w:as,d:3.6,seats:ay},subagents:ag,nav:{leftX:aA,rightX:aB,topZ:aC,botZ:aD},obstacles:aF,walls:aG,grid:(0,al.buildNavGrid)({halfW:o,halfD:A,backZ:B,obstacles:aF,rooms:H,lanes:aJ}),deskByKey:F,entityByKey:G,board:{z:0,w:z-2,h:2.76,yCenter:2.05,standX:aH},plants:aE,entrance:{x:Math.max(r+.4,aA-1.1),z:aD}}}(a.agents,{...c,building:void 0});return{w:b.W,d:b.D}},[a.agents,c]),k=(a,b)=>d(c=>{let d=c.building??j;return{...c,building:{...d,[a]:Math.max(10,aq(b))}}});return(0,b.jsxs)("div",{className:"absolute right-4 top-16 z-30 flex max-h-[calc(100dvh-6rem)] w-[360px] flex-col rounded-2xl border border-white/12 bg-[#0c0e16]/95 shadow-2xl backdrop-blur-md",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-semibold text-white",children:[(0,b.jsx)(l,{size:14})," Floor-plan builder"]}),(0,b.jsx)("div",{className:"text-[11px] text-white/45",children:"Place + size rooms — the plan updates live"})]}),(0,b.jsx)("button",{onClick:f,className:"rounded-md p-1 text-white/55 hover:bg-white/10 hover:text-white","aria-label":"Close",children:(0,b.jsx)(q.X,{size:16})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 text-[11px] font-medium uppercase tracking-wide text-white/40",children:[(0,b.jsx)(Z.Building2,{size:12})," Building"]}),(0,b.jsxs)("div",{className:"mb-4 rounded-xl border border-white/10 bg-white/[0.03] px-2.5 py-2",children:[(0,b.jsx)(as,{custom:!!c.building,onSelect:a=>d(b=>{if(!a){let a={...b};return delete a.building,a}return{...b,building:b.building??{w:aq(j.w),d:aq(j.d)}}}),customLabel:"Custom",autoLabel:"Auto"}),c.building?(0,b.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-x-3 gap-y-1.5",children:[(0,b.jsx)(au,{label:"Width",value:c.building.w,step:.5,min:10,onChange:a=>k("w",a)}),(0,b.jsx)(au,{label:"Depth",value:c.building.d,step:.5,min:10,onChange:a=>k("d",a)})]}):(0,b.jsxs)("p",{className:"mt-1.5 text-[11px] leading-relaxed text-white/40",children:["Sized to fit contents — currently ",Math.round(10*j.w)/10," × ",Math.round(10*j.d)/10," m. Switch to Custom to lock the floor size."]}),c.building?(0,b.jsx)("p",{className:"mt-1.5 text-[11px] leading-relaxed text-white/35",children:"The floor keeps this size; it only grows if rooms need more space."}):null]}),(0,b.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Rooms"}),(0,b.jsxs)("button",{onClick:()=>d(a=>{let b=ac[a.rooms.length%ac.length];return{...a,rooms:[...a.rooms,{id:ag(),name:`Office ${a.rooms.length+1}`,color:b,order:a.rooms.length,rect:ab(a.rooms.length),doorSide:"S"}]}}),className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] font-medium text-[#7c5cff] hover:bg-white/5",children:[(0,b.jsx)(_.Plus,{size:13})," Add office"]})]}),0===g.length?(0,b.jsx)("p",{className:"rounded-lg border border-dashed border-white/12 px-3 py-2.5 text-[12px] leading-relaxed text-white/45",children:"No rooms yet. Add an office, then drag its size + position with the controls. Assign agents to rooms in “Organize”."}):(0,b.jsx)("div",{className:"flex flex-col gap-2.5",children:g.map(a=>{let e=!!a.rect,f=Object.values(c.assignments).filter(b=>b===a.id).length,j=a.rect??ab(g.indexOf(a));return(0,b.jsxs)("div",{className:"rounded-xl border border-white/10 bg-white/[0.03] px-2.5 py-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("label",{className:"relative h-5 w-5 shrink-0 cursor-pointer rounded-full",style:{background:a.color},children:(0,b.jsx)("input",{type:"color",value:a.color,onChange:b=>h(a.id,{color:b.target.value}),className:"absolute inset-0 cursor-pointer opacity-0","aria-label":`${a.name} color`})}),(0,b.jsx)("input",{value:a.name,onChange:b=>h(a.id,{name:b.target.value}),className:"min-w-0 flex-1 bg-transparent text-sm text-white outline-none"}),(0,b.jsx)("span",{className:"shrink-0 text-[11px] tabular-nums text-white/35",title:"agents assigned",children:f}),(0,b.jsx)("button",{onClick:()=>{let b;return b=a.id,d(a=>{let c={...a.assignments};for(let a of Object.keys(c))c[a]===b&&delete c[a];return{...a,rooms:a.rooms.filter(a=>a.id!==b),assignments:c}})},className:"shrink-0 rounded p-1 text-white/40 hover:bg-white/10 hover:text-[#ff6b9d]","aria-label":`Delete ${a.name}`,children:(0,b.jsx)(aa.Trash2,{size:13})})]}),(0,b.jsx)("div",{className:"mt-2",children:(0,b.jsx)(as,{custom:e,onSelect:b=>{let c;return c=a.id,d(a=>({...a,rooms:a.rooms.map(d=>{if(d.id!==c)return d;if(b)return{...d,rect:d.rect??ab(a.rooms.indexOf(d)),doorSide:d.doorSide??"S"};let e={...d};return delete e.rect,delete e.doorSide,e})}))},customLabel:"Custom",autoLabel:"Auto (east wall)"})}),e?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-x-3 gap-y-1.5",children:[(0,b.jsx)(au,{label:"X",value:j.x,step:.5,onChange:b=>i(a.id,"x",b)}),(0,b.jsx)(au,{label:"Z",value:j.z,step:.5,onChange:b=>i(a.id,"z",b)}),(0,b.jsx)(au,{label:"Width",value:j.w,step:.5,min:2.5,onChange:b=>i(a.id,"w",b)}),(0,b.jsx)(au,{label:"Depth",value:j.d,step:.5,min:2.5,onChange:b=>i(a.id,"d",b)})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1 text-[11px] text-white/40",children:[(0,b.jsx)($,{size:12})," Door"]}),(0,b.jsx)("div",{className:"flex gap-1",children:ap.map(c=>(0,b.jsx)("button",{onClick:()=>h(a.id,{doorSide:c}),className:`h-6 w-6 rounded-md border text-[11px] font-semibold transition-colors ${(a.doorSide??"S")===c?"border-[#7c5cff]/60 bg-[#7c5cff]/20 text-white":"border-white/12 text-white/50 hover:text-white"}`,title:`Door on ${c} wall`,children:c},c))})]})]}):null]},a.id)})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between border-t border-white/10 px-4 py-2.5",children:[(0,b.jsxs)("span",{className:"text-[11px] text-white/35",children:[a.agents.length," agents · units in meters"]}),(0,b.jsx)("span",{className:"text-[11px] text-white/30",children:"Saved automatically"})]})]})}function as({custom:a,onSelect:c,customLabel:d,autoLabel:e}){let f=a=>`rounded-full border px-2.5 py-1 text-[11px] font-medium transition-colors ${a?"border-[#7c5cff]/60 bg-[#7c5cff]/20 text-white":"border-white/12 text-white/50 hover:text-white"}`;return(0,b.jsxs)("div",{className:"flex items-center gap-1.5",role:"radiogroup",children:[(0,b.jsx)("button",{onClick:()=>c(!0),className:f(a),role:"radio","aria-checked":a,children:d}),(0,b.jsx)("button",{onClick:()=>c(!1),className:f(!a),role:"radio","aria-checked":!a,children:e})]})}let at=a=>String(Math.round(100*a)/100);function au({label:a,value:c,onChange:d,step:f=1,min:g}){let[h,i]=(0,e.useState)(null),j=(0,e.useRef)(null),k=a=>null!=g?Math.max(g,a):a;return(0,b.jsxs)("label",{className:"flex select-none items-center justify-between gap-2 text-[11px] text-white/45",style:{cursor:"ew-resize",touchAction:"none"},onPointerDown:a=>{0===a.button&&(j.current={x:a.clientX,v:c,scrubbing:!1})},onPointerMove:a=>{let b=j.current;if(!b)return;let c=a.clientX-b.x;if(!b.scrubbing){if(3>Math.abs(c))return;b.scrubbing=!0,i(null),a.currentTarget.setPointerCapture(a.pointerId),document.activeElement?.blur?.()}d(k(Math.round((b.v+c/4*f)/f)*f)),a.preventDefault()},onPointerUp:()=>{j.current=null},onPointerCancel:()=>{j.current=null},children:[(0,b.jsx)("span",{className:"w-10 shrink-0 uppercase tracking-wide",children:a}),(0,b.jsx)("input",{type:"number",value:h??at(Number.isFinite(c)?c:0),step:f,min:g,onFocus:()=>i(at(c)),onBlur:()=>i(null),onChange:a=>{i(a.target.value);let b=parseFloat(a.target.value);Number.isFinite(b)&&d(k(b))},className:"min-w-0 flex-1 cursor-text rounded-md border border-white/12 bg-[#11131c] px-2 py-1 text-right text-[12px] tabular-nums text-white outline-none focus:border-white/30"})]})}function av({state:a,config:c,update:d,profiles:e,activeId:f,selectProfile:g,createProfile:h,deleteProfile:i,canAddProfile:j,onClose:k}){let l=[...a.agents].sort((a,b)=>a.id.localeCompare(b.id));return(0,b.jsxs)("div",{className:"absolute right-4 top-16 z-30 flex max-h-[calc(100dvh-6rem)] w-[340px] flex-col rounded-2xl border border-white/12 bg-[#0c0e16]/95 shadow-2xl backdrop-blur-md",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-semibold text-white",children:"Organize building"}),(0,b.jsx)("div",{className:"text-[11px] text-white/45",children:"Group agents into rooms — views update live"})]}),(0,b.jsx)("button",{onClick:k,className:"rounded-md p-1 text-white/55 hover:bg-white/10 hover:text-white","aria-label":"Close",children:(0,b.jsx)(q.X,{size:16})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] font-medium uppercase tracking-wide text-white/40",children:[(0,b.jsx)(Z.Building2,{size:12})," Saved buildings"]}),(0,b.jsxs)("button",{onClick:h,disabled:!j,className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] font-medium text-[#7c5cff] enabled:hover:bg-white/5 disabled:cursor-not-allowed disabled:text-white/25",title:j?"New building":"Profile limit reached",children:[(0,b.jsx)(_.Plus,{size:13})," New"]})]}),(0,b.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,b.jsx)("select",{value:f??"",onChange:a=>g(a.target.value),className:"min-w-0 flex-1 rounded-lg border border-white/12 bg-[#11131c] px-2.5 py-1.5 text-sm text-white outline-none focus:border-white/30",children:e.map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))}),(0,b.jsx)("button",{onClick:()=>f&&i(f),disabled:e.length<=1,className:"shrink-0 rounded-lg border border-white/10 p-2 text-white/45 enabled:hover:bg-white/10 enabled:hover:text-[#ff6b9d] disabled:cursor-not-allowed disabled:opacity-40",title:e.length<=1?"Keep at least one building":"Delete this building","aria-label":"Delete building",children:(0,b.jsx)(aa.Trash2,{size:14})})]}),(0,b.jsx)("label",{className:"mb-1 block text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Building name"}),(0,b.jsx)("input",{value:c.buildingName,onChange:a=>d(b=>({...b,buildingName:a.target.value})),className:"mb-4 w-full rounded-lg border border-white/12 bg-white/[0.04] px-2.5 py-1.5 text-sm text-white outline-none focus:border-white/30"}),(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Rooms"}),(0,b.jsxs)("button",{onClick:()=>d(a=>{let b=ac[a.rooms.length%ac.length];return{...a,rooms:[...a.rooms,{id:ag(),name:`Room ${a.rooms.length+1}`,color:b,order:a.rooms.length}]}}),className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] font-medium text-[#7c5cff] hover:bg-white/5",children:[(0,b.jsx)(_.Plus,{size:13})," Add"]})]}),0===c.rooms.length?(0,b.jsx)("p",{className:"mb-4 rounded-lg border border-dashed border-white/12 px-3 py-2.5 text-[12px] leading-relaxed text-white/45",children:"No rooms yet — everyone shares the open floor. Add a room, then assign agents below."}):(0,b.jsx)("div",{className:"mb-4 flex flex-col gap-1.5",children:[...c.rooms].sort((a,b)=>a.order-b.order).map(a=>{let e=Object.values(c.assignments).filter(b=>b===a.id).length;return(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.03] px-2 py-1.5",children:[(0,b.jsx)("label",{className:"relative h-5 w-5 shrink-0 cursor-pointer rounded-full",style:{background:a.color},children:(0,b.jsx)("input",{type:"color",value:a.color,onChange:b=>{let c,e;return c=a.id,e=b.target.value,d(a=>({...a,rooms:a.rooms.map(a=>a.id===c?{...a,color:e}:a)}))},className:"absolute inset-0 cursor-pointer opacity-0","aria-label":`${a.name} color`})}),(0,b.jsx)("input",{value:a.name,onChange:b=>{let c,e;return c=a.id,e=b.target.value,d(a=>({...a,rooms:a.rooms.map(a=>a.id===c?{...a,name:e}:a)}))},className:"min-w-0 flex-1 bg-transparent text-sm text-white outline-none"}),(0,b.jsx)("span",{className:"shrink-0 text-[11px] tabular-nums text-white/35",children:e}),(0,b.jsx)("button",{onClick:()=>{let b;return b=a.id,d(a=>{let c={...a.assignments};for(let a of Object.keys(c))c[a]===b&&delete c[a];return{...a,rooms:a.rooms.filter(a=>a.id!==b),assignments:c}})},className:"shrink-0 rounded p-1 text-white/40 hover:bg-white/10 hover:text-[#ff6b9d]","aria-label":`Delete ${a.name}`,children:(0,b.jsx)(aa.Trash2,{size:13})})]},a.id)})}),(0,b.jsx)("div",{className:"mb-1 text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Agents"}),(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[l.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-lg px-1 py-1",children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-white/85",title:a.id,children:a.name}),(0,b.jsxs)("select",{value:c.assignments[a.id]??"",onChange:b=>{let c,e;return c=a.id,e=b.target.value,d(a=>{let b={...a.assignments};return e?b[c]=e:delete b[c],{...a,assignments:b}})},className:"shrink-0 rounded-md border border-white/12 bg-[#11131c] px-2 py-1 text-[12px] text-white outline-none focus:border-white/30",children:[(0,b.jsx)("option",{value:"",children:"Open floor"}),[...c.rooms].sort((a,b)=>a.order-b.order).map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))]})]},a.id)),0===l.length?(0,b.jsx)("p",{className:"px-1 py-2 text-[12px] text-white/40",children:"Waiting for the gateway roster…"}):null]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between border-t border-white/10 px-4 py-2.5",children:[(0,b.jsxs)("button",{onClick:()=>d(a=>({version:1,buildingName:a.buildingName,rooms:[],assignments:{}})),className:"flex items-center gap-1.5 text-[12px] text-white/45 hover:text-white/80",children:[(0,b.jsx)(n.RotateCcw,{size:13})," Reset to open floor"]}),(0,b.jsx)("span",{className:"text-[11px] text-white/30",children:"Saved automatically"})]})]})}var aw=a.i(80032);let ax=(0,g.default)("drafting-compass",[["path",{d:"m12.99 6.74 1.93 3.44",key:"iwagvd"}],["path",{d:"M19.136 12a10 10 0 0 1-14.271 0",key:"ppmlo4"}],["path",{d:"m21 21-2.16-3.84",key:"vylbct"}],["path",{d:"m3 21 8.02-14.26",key:"1ssaw4"}],["circle",{cx:"12",cy:"5",r:"2",key:"f1ur92"}]]),ay=["plan","3d"];function az({value:a,onChange:c}){let d=ay.indexOf(a);return(0,b.jsxs)("div",{role:"tablist","aria-label":"View mode",className:"relative flex select-none items-center gap-1 rounded-full border border-white/10 bg-black/40 p-1 backdrop-blur-md",style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},children:[(0,b.jsx)("span",{"aria-hidden":!0,className:"absolute top-1 bottom-1 rounded-full bg-white/10 transition-transform duration-300 ease-out",style:{width:"calc(50% - 4px)",left:4,transform:`translateX(${100*d}%)`,background:"linear-gradient(180deg, rgba(124,92,255,0.35), rgba(40,214,168,0.22))",border:"1px solid rgba(255,255,255,0.14)"}}),(0,b.jsx)(aA,{active:"plan"===a,onClick:()=>c("plan"),icon:(0,b.jsx)(ax,{size:15,strokeWidth:2.2}),label:"Plan"}),(0,b.jsx)(aA,{active:"3d"===a,onClick:()=>c("3d"),icon:(0,b.jsx)(aw.Box,{size:15,strokeWidth:2.2}),label:"3D"})]})}function aA({active:a,onClick:c,icon:d,label:e}){return(0,b.jsxs)("button",{role:"tab","aria-selected":a,onClick:c,className:"relative z-10 flex w-[64px] items-center justify-center gap-1.5 rounded-full px-3 py-1.5 text-[13px] font-medium transition-colors",style:{color:a?"#fff":"rgba(255,255,255,0.5)"},children:[d,e]})}let aB={body:"#eef1f7",visor:"#12161f",eyes:"#39e6e0"},aC={body:["#eef1f7","#2a2e3a","#f6d7b0","#b8e6d2","#f2b8c6","#9fb4d8"],visor:["#12161f","#1d2735","#3a2233","#0f2420","#2b2118","#26262e"],eyes:["#39e6e0","#7c5cff","#ffd166","#ff6b81","#4cff9f","#ffffff"]},aD=[{id:"atlas",name:"Atlas",role:"Orchestrator",model:"claude-opus-4-8",color:"#7c5cff",cronEveryMs:47e3,cronCount:3},{id:"sage",name:"Sage",role:"Docs & memory",model:"claude-sonnet-4-6",color:"#ffb547",cronEveryMs:73e3,cronCount:1},{id:"forge",name:"Forge",role:"Build & deploy",model:"claude-opus-4-8",color:"#ff7a59",cronEveryMs:53e3,cronCount:2},{id:"bolt",name:"Bolt",role:"CI & test runs",model:"claude-haiku-4-5",color:"#ffd166",cronEveryMs:29e3,cronCount:5},{id:"patch",name:"Patch",role:"Bug triage",model:"claude-sonnet-4-6",color:"#8ce99a",cronEveryMs:61e3,cronCount:2},{id:"vera",name:"Vera",role:"QA & verification",model:"claude-sonnet-4-6",color:"#63e6be",cronEveryMs:41e3,cronCount:3},{id:"nova",name:"Nova",role:"Research & web",model:"claude-sonnet-4-6",color:"#28d6a8",cronEveryMs:31e3,cronCount:2},{id:"scout",name:"Scout",role:"Crawl & index",model:"claude-haiku-4-5",color:"#4dd4ac",cronEveryMs:17e3,cronCount:6},{id:"pixel",name:"Pixel",role:"Design & assets",model:"claude-sonnet-4-6",color:"#ff5d9e",cronEveryMs:89e3,cronCount:1},{id:"muse",name:"Muse",role:"Copy & content",model:"claude-sonnet-4-6",color:"#e599f7",cronEveryMs:67e3,cronCount:1},{id:"echo",name:"Echo",role:"Comms / channels",model:"claude-haiku-4-5",color:"#4ea1ff",cronEveryMs:19e3,cronCount:4},{id:"warden",name:"Warden",role:"Security watch",model:"claude-sonnet-4-6",color:"#46d3ff",cronEveryMs:23e3,cronCount:3},{id:"ledger",name:"Ledger",role:"Metrics & cost",model:"claude-haiku-4-5",color:"#a5d8ff",cronEveryMs:37e3,cronCount:4}],aE=[{title:"bash: pytest -q",kind:"command"},{title:"web.search",kind:"search"},{title:"fs.read AGENTS.md",kind:"tool"},{title:"git.commit",kind:"command"},{title:"http.fetch docs",kind:"tool"},{title:"fs.patch route.ts",kind:"patch"},{title:"analysis: diff review",kind:"analysis"},{title:"bash: npm run build",kind:"command"},{title:"memory.write daily",kind:"tool"},{title:"channel.send Slack",kind:"tool"}],aF=["summarize PR #214","scrape changelog","lint workspace","draft release notes","verify cron output","index new docs"],aG=[["Read context","Run tests","Patch failure","Re-run"],["Fetch sources","Rank by relevance","Summarize"],["Pull diff","Review","Comment","Approve"]];function aH(a){return a[Math.floor(Math.random()*a.length)]}function aI(a,b,c){let d=a.map(a=>({id:a.id,name:a.name,role:a.role,model:a.model,color:a.color,status:a.status,activity:a.activity,plan:a.plan,subAgents:a.subAgents,tasks:{queued:a.queued,running:a.running},cron:{count:a.cronCount,nextRunAtMs:a.cronNextAt,running:"cron"===a.status},lastActiveMs:a.lastActiveMs,isDefault:"atlas"===a.id,totalTokens:a.totalTokens})),e=a.flatMap(a=>Array.from({length:a.cronCount},(b,c)=>({id:`${a.id}-cron-${c}`,name:0===c?"heartbeat":`job-${c}`,agentId:a.id,enabled:!0,nextRunAtMs:a.cronNextAt+5e3*c,runningAtMs:"cron"===a.status&&0===c?Date.now():void 0,lastRunStatus:"ok"}))),f=a.flatMap(a=>{let b=[];for(let c=0;c<a.running;c++)b.push({id:`${a.id}-run-${c}`,agentId:a.id,label:a.activity?.title??"running",status:"running",startedAt:a.lastActiveMs});for(let c=0;c<a.queued;c++)b.push({id:`${a.id}-q-${c}`,agentId:a.id,label:"queued task",status:"queued"});return b});return f.push(...b),{agents:d,crons:e,tasks:f,connection:"mock",source:"mock",serverVersion:"mock",note:c,updatedAt:Date.now()}}let aJ=(0,c.default)(async()=>{},{loadableGenerated:{modules:[15697]},ssr:!1}),aK=(0,c.default)(async()=>{},{loadableGenerated:{modules:[52149]},ssr:!1}),aL={plan:"ClawCrib · building plan","3d":"ClawCrib · live agent building"};function aM(){let a="/demo"===(0,d.usePathname)(),c=function(){let[a,b]=(0,e.useState)(x.emptyTeamState);return(0,e.useEffect)(()=>{let a=null,c=null,d=!1,e=()=>{c?.stop(),c=null},f=a=>{c||(c=function(a,b={}){let c=Date.now(),d=aD.map((a,b)=>({...a,status:b%3==0?"tool":"idle",cronNextAt:c+4e3+Math.floor(Math.random()*a.cronEveryMs),subAgents:[],queued:Math.floor(3*Math.random()),running:+(b%3==0),lastActiveMs:c,totalTokens:1e3+Math.floor(9e4*Math.random())})),e=b.tickMs??1100,f=null,g=[];function h(a){g.push(a),g.length>8&&g.shift()}return a(aI(d,g,b.note)),f=setInterval(function(){let c=Date.now();for(let a of d){if(c>=a.cronNextAt){a.status="cron",a.cronNextAt=c+a.cronEveryMs,a.lastActiveMs=c,a.activity={title:"cron: heartbeat",kind:"command",since:c,status:"running"};continue}let b=Math.random();switch(a.status){case"idle":b<.28?(a.status="thinking",a.plan=aH(aG),a.lastActiveMs=c):b<.33&&(a.status="tool",a.activity={...aH(aE),since:c,status:"running"},a.running=Math.max(1,a.running),a.lastActiveMs=c);break;case"thinking":b<.55?(a.status="tool",a.activity={...aH(aE),since:c,status:"running"},a.running=Math.max(1,a.running)):b<.7&&(a.status="idle",a.plan=void 0),a.lastActiveMs=c,a.totalTokens+=200+Math.floor(600*Math.random());break;case"tool":a.totalTokens+=150+Math.floor(900*Math.random()),a.lastActiveMs=c,b<.18?a.subAgents.length<1&&(a.subAgents.push({id:`${a.id}-sub-${Math.floor(1e5*Math.random())}`,agentId:a.id,parentId:a.id,label:aH(aF),task:aH(aF),status:"tool",startedAt:c}),a.running+=1):b<.42?(a.status="thinking",a.activity=void 0):b<.5?(h({id:`${a.id}-done-${c}`,agentId:a.id,label:a.activity?.title??"task",status:"completed",startedAt:c}),a.status="idle",a.activity=void 0,a.plan=void 0,a.running=Math.max(0,a.running-1),a.queued=Math.max(0,a.queued-(.5>Math.random()))):b<.53&&(h({id:`${a.id}-fail-${c}`,agentId:a.id,label:a.activity?.title??"task",status:"failed",startedAt:c}),a.status="error",a.activity={title:"tool failed",kind:"tool",since:c,status:"failed"});break;case"cron":b<.6&&(a.status="idle",a.activity=void 0);break;case"error":b<.5&&(a.status="thinking",a.activity=void 0);break;default:a.status="idle"}a.subAgents.length&&.22>Math.random()&&(a.subAgents.shift(),a.running=Math.max(0,a.running-1)),.15>Math.random()&&(a.queued=Math.min(6,a.queued+1))}a(aI(d,g,b.note))},e),{stop:()=>{f&&clearInterval(f),f=null}}}(c=>b({...c,note:a}),{note:a}))};try{(a=new EventSource("/api/crib/stream")).onmessage=a=>{d=!0,e();try{b(JSON.parse(a.data))}catch{}},a.onerror=()=>{d||f("Live stream unavailable — local simulation")}}catch{f("Live stream unavailable — local simulation")}let g=setTimeout(()=>{d||f("Connecting…")},4e3);return()=>{clearTimeout(g),a?.close(),e()}},[]),a}(),{config:g,update:o,profiles:q,activeId:s,selectProfile:t,createProfile:u,deleteProfile:v,canAddProfile:w}=function(){let[a,b]=(0,e.useState)(()=>({version:1,activeId:null,profiles:[]})),[c,d]=(0,e.useState)(!1);(0,e.useEffect)(()=>{let a=!0;return(async()=>{let c=null;try{let a=await fetch(ai,{cache:"no-store"});a.ok&&(c=ak(await a.json()))}catch{}if(!c||0===c.profiles.length)try{let a=window.localStorage.getItem(ah);a&&(c=ak(JSON.parse(a)))}catch{}if(!c||0===c.profiles.length){let a=ad(),b=aj(a.buildingName||"ClawCrib",a);f(c={version:1,activeId:b.id,profiles:[b]})}a&&(b(c),d(!0))})(),()=>{a=!1}},[]);let f=(0,e.useCallback)(a=>{try{window.localStorage.setItem(ah,JSON.stringify(a))}catch{}fetch(ai,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).catch(()=>{})},[]),g=(0,e.useCallback)(a=>{b(a),f(a)},[f]),h=a.activeId,i=a.profiles.find(a=>a.id===h)??a.profiles[0],j=i?.config??ad(),k=(0,e.useCallback)(a=>{b(b=>{let c=b.profiles.find(a=>a.id===b.activeId)??b.profiles[0];if(!c)return b;let d="function"==typeof a?a(c.config):a,e=d.buildingName||c.name,g={...c,name:e,config:d,updatedAt:Date.now()},h={...b,profiles:b.profiles.map(a=>a.id===c.id?g:a)};return f(h),h})},[f]),l=(0,e.useCallback)(b=>g({...a,activeId:b}),[g,a]),m=(0,e.useCallback)(()=>{if(a.profiles.length>=3)return;let b=aj(`Building ${a.profiles.length+1}`);g({...a,activeId:b.id,profiles:[...a.profiles,b]})},[g,a]),n=(0,e.useCallback)(b=>{if(a.profiles.length<=1)return;let c=a.profiles.filter(a=>a.id!==b);g({version:1,activeId:a.activeId===b?c[0]?.id??null:a.activeId,profiles:c})},[g,a]);return{loaded:c,profiles:a.profiles,activeId:i?.id??null,config:j,update:k,selectProfile:l,createProfile:m,deleteProfile:n,canAddProfile:a.profiles.length<3}}(),[y,z]=(0,e.useState)("3d"),[A,B]=(0,e.useState)("dark"),[C,F]=(0,e.useState)(aB),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[K,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(!1),P=D(A),Q=!ae(g)&&"gateway"!==c.source,R=(0,e.useMemo)(()=>Q?{version:1,buildingName:"ClawCrib",rooms:[{id:"eng",name:"ENGINEERING",color:ac[0],order:0,rect:{x:-5,z:3.4,w:8.8,d:4.6},doorSide:"N"},{id:"research",name:"RESEARCH",color:ac[1],order:1,rect:{x:5,z:3.4,w:8.8,d:4.6},doorSide:"N"},{id:"studio",name:"STUDIO",color:ac[4],order:2,rect:{x:-5,z:9.3,w:8.8,d:4.6},doorSide:"N"},{id:"ops",name:"OPS",color:ac[3],order:3,rect:{x:5,z:9.3,w:8.8,d:4.6},doorSide:"N"}],assignments:{forge:"eng",bolt:"eng",patch:"eng",nova:"research",scout:"research",pixel:"studio",muse:"studio",echo:"ops",warden:"ops",vera:"ops"}}:g,[Q,g]);(0,e.useEffect)(()=>{let b=requestAnimationFrame(()=>{let b=window.localStorage.getItem("clawcrib:view");"plan"===b||"3d"===b?z(b):"2d"===b&&z("3d");let c=window.localStorage.getItem("clawcrib:theme");("light"===c||"dark"===c)&&B(c),F(function(a){if(!a)return aB;try{let b=JSON.parse(a);return{body:"string"==typeof b.body?b.body:aB.body,visor:"string"==typeof b.visor?b.visor:aB.visor,eyes:"string"==typeof b.eyes?b.eyes:aB.eyes}}catch{return aB}}(window.localStorage.getItem("clawcrib:botstyle"))),!a&&function(){try{return!window.localStorage.getItem(V)}catch{return!1}}()&&O(!0)});return()=>cancelAnimationFrame(b)},[a]);let S=a=>{F(b=>{let c={...b,...a};return window.localStorage.setItem("clawcrib:botstyle",JSON.stringify(c)),c})};return(0,b.jsxs)("div",{className:"relative h-[100dvh] w-full overflow-hidden",style:{background:P.pageBg},children:[(0,b.jsx)("div",{className:"absolute inset-0",children:"plan"===y?(0,b.jsx)(aJ,{state:c,config:R,theme:A}):(0,b.jsx)(aK,{state:c,config:R,theme:A,botStyle:C})}),(0,b.jsx)(L,{state:c}),(0,b.jsxs)("div",{className:"absolute right-4 top-4 z-20 flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:()=>O(!0),className:"flex items-center gap-1.5 rounded-full border border-white/10 bg-black/40 px-2.5 py-1.5 text-[13px] font-medium text-white/70 backdrop-blur-md transition-colors hover:text-white",style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"Open the tour",title:"Tour & setup",children:(0,b.jsx)(h,{size:15,strokeWidth:2.2})}),(0,b.jsx)("button",{onClick:()=>{B(a=>{let b="dark"===a?"light":"dark";return window.localStorage.setItem("clawcrib:theme",b),b})},className:"flex items-center gap-1.5 rounded-full border border-white/10 bg-black/40 px-2.5 py-1.5 text-[13px] font-medium text-white/70 backdrop-blur-md transition-colors hover:text-white",style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"dark"===A?"Switch to light mode":"Switch to dark mode",title:"dark"===A?"Light mode":"Dark mode",children:"dark"===A?(0,b.jsx)(p.Sun,{size:15,strokeWidth:2.2}):(0,b.jsx)(j.Moon,{size:15,strokeWidth:2.2})}),"3d"===y?(0,b.jsx)("button",{onClick:()=>{M(a=>!a),H(!1),J(!1)},className:`flex items-center gap-1.5 rounded-full border px-2.5 py-1.5 text-[13px] font-medium backdrop-blur-md transition-colors ${K?"border-white/20 bg-white/15 text-white":"border-white/10 bg-black/40 text-white/70 hover:text-white"}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"Customize robot style",title:"Robot style","aria-pressed":K,children:(0,b.jsx)(f.Bot,{size:15,strokeWidth:2.2})}):null,"plan"===y?(0,b.jsxs)("button",{onClick:()=>{J(a=>!a),H(!1),M(!1)},className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-[13px] font-medium backdrop-blur-md transition-colors ${I?"border-white/20 bg-white/15 text-white":"border-white/10 bg-black/40 text-white/70 hover:text-white"}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-pressed":I,children:[(0,b.jsx)(l,{size:15,strokeWidth:2.2}),"Build"]}):null,(0,b.jsxs)("button",{onClick:()=>{H(a=>!a),J(!1),M(!1)},className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-[13px] font-medium backdrop-blur-md transition-colors ${G?"border-white/20 bg-white/15 text-white":"border-white/10 bg-black/40 text-white/70 hover:text-white"}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-pressed":G,children:[(0,b.jsx)(i.LayoutGrid,{size:15,strokeWidth:2.2}),"Organize"]}),(0,b.jsx)(az,{value:y,onChange:a=>{z(a),window.localStorage.setItem("clawcrib:view",a)}})]}),N?(0,b.jsx)(Y,{state:c,onClose:()=>O(!1)}):null,K&&"3d"===y?(0,b.jsx)(aO,{value:C,onChange:S,onReset:()=>S(aB),onClose:()=>M(!1)}):null,I&&"plan"===y?(0,b.jsx)(ar,{state:c,config:R,update:o,onClose:()=>J(!1)}):null,G?(0,b.jsx)(av,{state:c,config:R,update:o,profiles:q,activeId:s,selectProfile:t,createProfile:u,deleteProfile:v,canAddProfile:w,onClose:()=>H(!1)}):null,(0,b.jsx)(E,{state:c,theme:A}),(0,b.jsx)("div",{className:`pointer-events-none absolute bottom-4 left-4 z-10 flex flex-col gap-1.5 rounded-xl border px-3 py-2.5 backdrop-blur-md ${P.legendOnLight?"border-black/10 bg-white/70":"border-white/10 bg-black/45"}`,children:"3d"===y?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(m,{size:13}),action:"Drag",effect:"orbit camera"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(r,{size:13}),action:"Scroll",effect:"zoom in / out"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(k,{size:13}),action:"Right-drag",effect:"pan across the floor"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(k,{size:13}),action:"Drag",effect:"pan the floor plan"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(r,{size:13}),action:"Scroll",effect:"zoom in / out"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(n.RotateCcw,{size:13}),action:"Double-click",effect:"reset view"})]})}),(0,b.jsx)("div",{className:"pointer-events-none absolute bottom-3 left-1/2 z-10 -translate-x-1/2 text-[11px] tracking-wide",style:{color:P.caption,textShadow:P.legendOnLight?"0 1px 2px rgba(255,255,255,0.5)":"none"},children:aL[y]})]})}let aN=[{key:"body",label:"Body"},{key:"visor",label:"Visor"},{key:"eyes",label:"Eyes"}];function aO({value:a,onChange:c,onReset:d,onClose:e}){return(0,b.jsxs)("div",{className:"absolute right-4 top-16 z-30 w-64 rounded-2xl border border-white/10 bg-black/60 p-4 backdrop-blur-xl",style:{boxShadow:"0 12px 40px rgba(0,0,0,0.5)"},children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-semibold text-white",children:[(0,b.jsx)(f.Bot,{size:15,strokeWidth:2.2}),"Robot style"]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("button",{onClick:d,className:"rounded-full p-1.5 text-white/50 transition-colors hover:text-white","aria-label":"Reset to default colors",title:"Reset",children:(0,b.jsx)(o,{size:13,strokeWidth:2.2})}),(0,b.jsx)("button",{onClick:e,className:"rounded-full p-1.5 text-white/50 transition-colors hover:text-white","aria-label":"Close",children:(0,b.jsx)(q.X,{size:14,strokeWidth:2.2})})]})]}),(0,b.jsx)("div",{className:"flex flex-col gap-3",children:aN.map(({key:d,label:e})=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wider text-white/40",children:e}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[aC[d].map(f=>(0,b.jsx)("button",{onClick:()=>c({[d]:f}),className:`h-6 w-6 rounded-full border transition-transform hover:scale-110 ${a[d].toLowerCase()===f.toLowerCase()?"border-white":"border-white/15"}`,style:{background:f},"aria-label":`${e} color ${f}`},f)),(0,b.jsx)("label",{className:"relative h-6 w-6 shrink-0 cursor-pointer overflow-hidden rounded-full border border-dashed border-white/30",title:"Custom color",style:{background:"conic-gradient(#ff6b81, #ffd166, #4cff9f, #39e6e0, #7c5cff, #ff6b81)"},children:(0,b.jsx)("input",{type:"color",value:a[d],onChange:a=>c({[d]:a.target.value}),className:"absolute inset-0 h-full w-full cursor-pointer opacity-0","aria-label":`Custom ${e.toLowerCase()} color`})})]})]},d))}),(0,b.jsx)("div",{className:"mt-3 text-[10px] leading-relaxed text-white/35",children:"Eye color shows while idle — active agents glow with their status color."})]})}function aP({icon:a,action:c,effect:d,dark:e}){return(0,b.jsxs)("div",{className:"flex items-center gap-2 text-[11px] leading-none",children:[(0,b.jsx)("span",{className:e?"text-white/55":"text-[#3c4250]",children:a}),(0,b.jsx)("span",{className:e?"font-semibold text-white/90":"font-semibold text-[#262b36]",children:c}),(0,b.jsx)("span",{className:e?"text-white/55":"text-[#5a6172]",children:d})]})}a.s(["default",()=>aM],90660)}];
1
+ module.exports=[32245,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"BailoutToCSR",{enumerable:!0,get:function(){return e}});let d=a.r(41997);function e({reason:a,children:b}){throw Object.defineProperty(new d.BailoutToCSRError(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},7773,(a,b,c)=>{"use strict";function d(a){return a.split("/").map(a=>encodeURIComponent(a)).join("/")}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"encodeURIPath",{enumerable:!0,get:function(){return d}})},97458,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"PreloadChunks",{enumerable:!0,get:function(){return i}});let d=a.r(87924),e=a.r(35112),f=a.r(56704),g=a.r(7773),h=a.r(68063);function i({moduleIds:a}){let b=f.workAsyncStorage.getStore();if(void 0===b)return null;let c=[];if(b.reactLoadableManifest&&a){let d=b.reactLoadableManifest;for(let b of a){if(!d[b])continue;let a=d[b].files;c.push(...a)}}if(0===c.length)return null;let i=(0,h.getDeploymentIdQueryOrEmptyString)();return(0,d.jsx)(d.Fragment,{children:c.map(a=>{let c=`${b.assetPrefix}/_next/${(0,g.encodeURIPath)(a)}${i}`;return a.endsWith(".css")?(0,d.jsx)("link",{precedence:"dynamic",href:c,rel:"stylesheet",as:"style",nonce:b.nonce},a):((0,e.preload)(c,{as:"script",fetchPriority:"low",nonce:b.nonce}),null)})})}},69853,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return j}});let d=a.r(87924),e=a.r(72131),f=a.r(32245),g=a.r(97458);function h(a){return{default:a&&"default"in a?a.default:a}}let i={loader:()=>Promise.resolve(h(()=>null)),loading:null,ssr:!0},j=function(a){let b={...i,...a},c=(0,e.lazy)(()=>b.loader().then(h)),j=b.loading;function k(a){let h=j?(0,d.jsx)(j,{isLoading:!0,pastDelay:!0,error:null}):null,i=!b.ssr||!!b.loading,k=i?e.Suspense:e.Fragment,l=b.ssr?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.PreloadChunks,{moduleIds:b.modules}),(0,d.jsx)(c,{...a})]}):(0,d.jsx)(f.BailoutToCSR,{reason:"next/dynamic",children:(0,d.jsx)(c,{...a})});return(0,d.jsx)(k,{...i?{fallback:h}:{},children:l})}return k.displayName="LoadableComponent",k}},19721,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return e}});let d=a.r(33354)._(a.r(69853));function e(a,b){let c={};"function"==typeof a&&(c.loader=a);let e={...c,...b};return(0,d.default)({...e,modules:e.loadableGenerated?.modules})}("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)},90660,a=>{"use strict";var b=a.i(87924),c=a.i(19721),d=a.i(50944),e=a.i(72131),f=a.i(82434),g=a.i(60137);let h=(0,g.default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var i=a.i(57064),j=a.i(70880);let k=(0,g.default)("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]),l=(0,g.default)("pencil-ruler",[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),m=(0,g.default)("rotate-3d",[["path",{d:"M16.466 7.5C15.643 4.237 13.952 2 12 2 9.239 2 7 6.477 7 12s2.239 10 5 10c.342 0 .677-.069 1-.2",key:"10n0gc"}],["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M19 15.57c-1.804.885-4.274 1.43-7 1.43-5.523 0-10-2.239-10-5s4.477-5 10-5c4.838 0 8.873 1.718 9.8 4",key:"1lxi77"}]]);var n=a.i(87654);let o=(0,g.default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var p=a.i(65341),q=a.i(33508);let r=(0,g.default)("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);var s=a.i(5784);let t=(0,g.default)("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]),u=(0,g.default)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]),v=(0,g.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),w=(0,g.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);var x=a.i(74831);let y=["#7c5cff","#28d6a8","#ff9f43","#4ea8ff","#ff6b9d","#ffd166","#9b8cff","#5ad1c0"];function z(a){if(a.color)return a.color;let b=0;for(let c=0;c<a.id.length;c++)b=31*b+a.id.charCodeAt(c)>>>0;return y[b%y.length]}function A(a,b){switch(a){case"tool":return b?`running ${b}`:"started working";case"thinking":return b?`thinking — ${b}`:"is thinking";case"cron":return b?`cron job firing — ${b}`:"cron job firing";case"error":return"ran into an error";case"idle":return"finished — back to idle";case"offline":return"went offline";default:return`is ${a}`}}let B={name:"dark",pageBg:"#05060b",caption:"rgba(255,255,255,0.3)",legendOnLight:!1,blueprint:{bgFrom:"#0d2748",bgTo:"#0a1f3d",line:"rgba(205,228,255,0.85)",lineDim:"rgba(205,228,255,0.4)",lineFaint:"rgba(205,228,255,0.16)",fillWall:"rgba(190,215,245,0.22)",text:"rgba(220,235,255,0.9)",textDim:"rgba(220,235,255,0.5)"},three:{bgCss:"linear-gradient(180deg,#12141d 0%,#0b0d16 55%,#07080e 100%)",fog:"#0b0d16",fogNear:30,fogFar:80,ambient:.22,hemi:.26,hemiGround:"#0c0e16",dir:.55,dirColor:"#ffd9a8",dirWest:0,dirWestColor:"#9db7e0",envCeiling:.35,envWindow:.7,envWarm:1.5,envBg:"#0a0c12",floorRough:.7,baseColor:"#2e261c",wallBack:"#6e5640",wallLeft:"#634d39",contactOpacity:.5,exposure:1.15,ao:2.6,bloom:.55,vignette:.5,lampGlow:2.4,lampLight:6.5,trim:"#3a3226",brick:"#5e3c2d",mortar:"#463129",steel:"#23262c",rugLounge:"#3c4356",rugLoungeFleck:"rgba(120,140,190,ALPHA)",rugBullpen:"#4a4438",rugBullpenFleck:"rgba(190,170,130,ALPHA)",sofa:"#4a5168",glassOpacity:.14}},C={name:"light",pageBg:"#eef0f4",caption:"rgba(30,34,44,0.55)",legendOnLight:!0,blueprint:{bgFrom:"#f5f8fc",bgTo:"#e6edf6",line:"rgba(40,72,120,0.85)",lineDim:"rgba(40,72,120,0.45)",lineFaint:"rgba(40,72,120,0.16)",fillWall:"rgba(70,100,150,0.18)",text:"rgba(30,50,85,0.92)",textDim:"rgba(30,50,85,0.55)"},three:{bgCss:"linear-gradient(180deg,#eef0f4 0%,#d8dce3 55%,#c6ccd6 100%)",fog:"#dadee5",fogNear:34,fogFar:85,ambient:.55,hemi:.5,hemiGround:"#b8bcc4",dir:1.15,dirColor:"#ffffff",dirWest:1.7,dirWestColor:"#ffe6c4",envCeiling:1.6,envWindow:3.2,envWarm:1.4,envBg:"#34373f",floorRough:.65,baseColor:"#9aa1ad",wallBack:"#f2f3f5",wallLeft:"#eceef1",contactOpacity:.3,exposure:1.05,ao:2,bloom:.28,vignette:.32,lampGlow:.5,lampLight:0,trim:"#c6cad2",brick:"#c4a18c",mortar:"#ded3c8",steel:"#7d838e",rugLounge:"#aeb8cc",rugLoungeFleck:"rgba(90,110,160,ALPHA)",rugBullpen:"#c4bba9",rugBullpenFleck:"rgba(150,130,95,ALPHA)",sofa:"#9fa8c0",glassOpacity:.1}};function D(a){return"light"===a?C:B}function E({state:a,theme:c}){let{events:d,clear:f}=function(a){let b=(0,e.useRef)(null),c=(0,e.useRef)(0),[d,f]=(0,e.useState)([]);return(0,e.useEffect)(()=>{if(!a||0===a.updatedAt)return;let d=b.current;if(b.current=a,!d)return;let e=function(a,b,c){let d=[],e=b.updatedAt||a.updatedAt||0,f=new Map(a.agents.map(a=>[a.id,a]));for(let a of b.agents){let b=f.get(a.id);if(!b)continue;let g=z(a),h={agentId:a.id,agentName:a.name,color:g},i=a.activity?.title,j=!!i&&i!==b.activity?.title,k=b.status!==a.status,l="tool"===a.status||"thinking"===a.status;j&&l?d.push({id:c(),ts:e,...h,tone:a.status,text:A(a.status,i)}):k&&d.push({id:c(),ts:e,...h,tone:a.status,text:A(a.status,i)});let m=new Set(b.subAgents.map(a=>a.id)),n=new Set(a.subAgents.map(a=>a.id));for(let b of a.subAgents)m.has(b.id)||d.push({id:c(),ts:e,...h,tone:"subagent",text:`spawned sub-agent “${b.label}”${b.task?` — ${b.task}`:""}`});for(let a of b.subAgents)n.has(a.id)||d.push({id:c(),ts:e,...h,tone:"subagent",text:`sub-agent “${a.label}” wrapped up`})}let g=new Map(a.tasks.map(a=>[a.id,a])),h=new Map(b.agents.map(a=>[a.id,a.name]));for(let a of b.tasks){let b=g.get(a.id);if(b&&b.status===a.status)continue;let f=a.agentId&&h.get(a.agentId)||"Team",i=a.agentId?z({id:a.agentId}):"#8a93a6",j={agentId:a.agentId??"",agentName:f,color:i},k="running"===a.status&&(!b||"queued"===b.status),l="completed"===a.status||"failed"===a.status||"cancelled"===a.status||"timed_out"===a.status;if(k)d.push({id:c(),ts:e,...j,tone:"task",text:`task started — ${a.label}`});else if(l&&b){let b="completed"!==a.status;d.push({id:c(),ts:e,...j,tone:b?"error":"task",text:`task ${a.status.replace("_"," ")} — ${a.label}`})}}return d}(d,a,()=>`ev-${c.current+=1}`);e.length&&f(a=>{let b=a.concat(e);return b.length>300?b.slice(b.length-300):b})},[a]),{events:d,clear:()=>f([])}}(a),[g,h]=(0,e.useState)(!0),[i,j]=(0,e.useState)(!1),k=(0,e.useRef)(null),l=(0,e.useRef)(!0),m=D(c).legendOnLight;(0,e.useEffect)(()=>{let a=k.current;a&&g&&l.current&&(a.scrollTop=a.scrollHeight)},[d,g,i]);let n=m?"border-black/10 bg-white/80":"border-white/10 bg-[#0b0d14]/90",o=m?"text-[#5a6172]":"text-white/45",p=m?"text-[#2a313e]":"text-white/80",q=m?"text-[#9098a8]":"text-white/30",r=`rounded-md p-1 ${m?"text-[#5a6172] hover:bg-black/5 hover:text-[#1e2430]":"text-white/45 hover:bg-white/10 hover:text-white"}`,x=d[d.length-1];return g?(0,b.jsxs)("div",{className:`absolute bottom-4 right-4 z-20 flex w-[360px] flex-col rounded-2xl border backdrop-blur-md ${n}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)",maxHeight:i?"min(70dvh, 640px)":"320px"},children:[(0,b.jsxs)("div",{className:`flex items-center gap-2 border-b px-3 py-2.5 ${m?"border-black/10":"border-white/10"}`,children:[(0,b.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,b.jsx)("span",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400 opacity-60",style:{animationDuration:"2s"}}),(0,b.jsx)("span",{className:"relative h-2 w-2 rounded-full bg-emerald-400"})]}),(0,b.jsxs)("span",{className:`flex items-center gap-1.5 text-[13px] font-semibold ${m?"text-[#1e2430]":"text-white"}`,children:[(0,b.jsx)(u,{size:14})," Activity"]}),(0,b.jsx)("span",{className:`text-[11px] tabular-nums ${o}`,children:d.length}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-0.5",children:[(0,b.jsx)("button",{onClick:f,className:r,title:"Clear log","aria-label":"Clear log",children:(0,b.jsx)(t,{size:14})}),(0,b.jsx)("button",{onClick:()=>j(a=>!a),className:r,title:i?"Shrink":"Expand full log","aria-label":i?"Shrink":"Expand",children:i?(0,b.jsx)(w,{size:14}):(0,b.jsx)(v,{size:14})}),(0,b.jsx)("button",{onClick:()=>h(!1),className:r,title:"Minimize","aria-label":"Minimize",children:(0,b.jsx)(s.ChevronDown,{size:15})})]})]}),(0,b.jsx)("div",{ref:k,onScroll:()=>{let a=k.current;a&&(l.current=a.scrollHeight-a.scrollTop-a.clientHeight<24)},className:"flex flex-1 flex-col gap-1.5 overflow-y-auto px-3 py-2.5",children:0===d.length?(0,b.jsx)("p",{className:`px-1 py-6 text-center text-[12px] leading-relaxed ${o}`,children:"Watching the floor. Activity will stream here as your agents pick up work."}):d.map(a=>(0,b.jsx)(F,{e:a,rowText:p,timeText:q},a.id))})]}):(0,b.jsxs)("button",{onClick:()=>h(!0),className:`absolute bottom-4 right-4 z-20 flex max-w-[340px] items-center gap-2 rounded-full border px-3 py-2 backdrop-blur-md ${n}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"Open activity feed",children:[(0,b.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,b.jsx)("span",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400 opacity-60",style:{animationDuration:"2s"}}),(0,b.jsx)("span",{className:"relative h-2 w-2 rounded-full bg-emerald-400"})]}),(0,b.jsx)(u,{size:14,className:o}),(0,b.jsx)("span",{className:`truncate text-[12px] ${p}`,children:x?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-semibold",style:{color:x.color},children:x.agentName})," ",x.text]}):"Activity feed"}),d.length>0?(0,b.jsx)("span",{className:`shrink-0 text-[11px] tabular-nums ${q}`,children:d.length}):null]})}function F({e:a,rowText:c,timeText:d}){var e;return(0,b.jsxs)("div",{className:"flex items-start gap-2 text-[12px] leading-snug",children:[(0,b.jsx)("span",{className:"mt-[5px] h-1.5 w-1.5 shrink-0 rounded-full",style:{background:"subagent"===(e=a.tone)?"#9b8cff":"task"===e?"#4ea8ff":x.STATUS_META[e]?.color??"#8a93a6"}}),(0,b.jsxs)("span",{className:`min-w-0 flex-1 ${c}`,children:[(0,b.jsx)("span",{className:"font-semibold",style:{color:a.color},children:a.agentName})," ",a.text]}),(0,b.jsx)("span",{className:`shrink-0 pt-px text-[10px] tabular-nums ${d}`,children:function(a){if(!a)return"";let b=new Date(a),c=a=>String(a).padStart(2,"0");return`${c(b.getHours())}:${c(b.getMinutes())}:${c(b.getSeconds())}`}(a.ts)})]})}var G=a.i(90669),H=a.i(94392),I=a.i(71727),J=a.i(60246),K=a.i(6807);function L({state:a}){let c=a.agents.filter(a=>"tool"===a.status||"thinking"===a.status||"cron"===a.status).length,d=a.agents.reduce((a,b)=>a+b.subAgents.length,0),e=a.tasks.filter(a=>"running"===a.status).length,f=a.tasks.filter(a=>"queued"===a.status).length;return(0,b.jsxs)("div",{className:"pointer-events-none absolute left-4 top-4 z-10 flex flex-col gap-3",children:[(0,b.jsxs)("div",{className:"pointer-events-auto flex items-center gap-2.5 rounded-2xl border border-white/10 bg-black/40 px-3.5 py-2.5 backdrop-blur-md",children:[(0,b.jsx)(N,{connection:a.connection}),(0,b.jsxs)("div",{className:"leading-tight",children:[(0,b.jsx)("div",{className:"text-[13px] font-semibold tracking-tight text-white",children:"ClawCrib"}),(0,b.jsx)("div",{className:"text-[11px] text-white/45",children:"gateway"===a.source?`gateway \xb7 ${a.serverVersion??"?"}`:"simulated feed"})]})]}),(0,b.jsxs)("div",{className:"pointer-events-auto flex flex-col gap-1.5 rounded-2xl border border-white/10 bg-black/35 px-3.5 py-3 backdrop-blur-md",children:[(0,b.jsx)(M,{icon:(0,b.jsx)(J.Users,{size:14}),label:"Agents",value:`${a.agents.length}`}),(0,b.jsx)(M,{icon:(0,b.jsx)(G.Activity,{size:14}),label:"Active",value:`${c}`,accent:c>0}),(0,b.jsx)(M,{icon:(0,b.jsx)(K.Workflow,{size:14}),label:"Sub-agents",value:`${d}`}),(0,b.jsx)(M,{icon:(0,b.jsx)(H.Cpu,{size:14}),label:"Tasks",value:`${e} run \xb7 ${f} queued`})]}),a.note?(0,b.jsx)("div",{className:"pointer-events-auto max-w-[260px] rounded-xl border border-amber-400/20 bg-amber-400/[0.06] px-3 py-2 text-[11px] leading-snug text-amber-200/80 backdrop-blur-md",children:a.note}):null,(0,b.jsx)("div",{className:"pointer-events-auto flex flex-wrap gap-x-3 gap-y-1 rounded-xl border border-white/10 bg-black/30 px-3 py-2 backdrop-blur-md",children:["tool","thinking","cron","idle","error"].map(a=>(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-[10.5px] text-white/55",children:[(0,b.jsx)("span",{className:"h-2 w-2 rounded-full",style:{background:x.STATUS_META[a].color}}),x.STATUS_META[a].label]},a))})]})}function M({icon:a,label:c,value:d,accent:e}){return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-6",children:[(0,b.jsxs)("span",{className:"flex items-center gap-2 text-[12px] text-white/45",children:[(0,b.jsx)("span",{className:"text-white/35",children:a}),c]}),(0,b.jsx)("span",{className:`text-[12px] font-medium tabular-nums ${e?"text-emerald-300":"text-white/85"}`,children:d})]})}function N({connection:a}){let{c,pulse:d}={live:{c:"#28d6a8",pulse:!0,label:"live"},mock:{c:"#7c5cff",pulse:!0,label:"mock"},connecting:{c:"#ffb547",pulse:!0,label:"connecting"},pairing:{c:"#ffb547",pulse:!0,label:"pairing"},error:{c:"#ff5d6c",pulse:!1,label:"error"}}[a];return(0,b.jsxs)("span",{className:"relative flex h-7 w-7 items-center justify-center",children:[(0,b.jsx)(I.Radio,{size:16,style:{color:c}}),d?(0,b.jsx)("span",{className:"absolute inset-0 animate-ping rounded-full opacity-30",style:{background:c,animationDuration:"2.4s"}}):null]})}var O=a.i(210),P=a.i(32860),Q=a.i(33441),R=a.i(5151),S=a.i(44494),T=a.i(43694);let U=(0,g.default)("sun-moon",[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",key:"xlf6rm"}],["path",{d:"M16 12a4 4 0 0 0-4-4",key:"6vsxu"}],["path",{d:"m19 5-1.256 1.256",key:"1yg6a6"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]),V="clawcrib:onboarded";function W({command:a}){let[c,d]=(0,e.useState)(!1);return(0,b.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(a).then(()=>{d(!0),setTimeout(()=>d(!1),1500)})},className:"group flex w-full items-center gap-2 rounded-lg border border-white/12 bg-black/50 px-3 py-2 text-left transition-colors hover:border-white/25","aria-label":`Copy: ${a}`,children:[(0,b.jsx)("code",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap font-mono text-[11px] leading-relaxed text-white/80 [scrollbar-width:none]",children:a}),c?(0,b.jsx)(Q.Check,{size:13,className:"shrink-0 text-[#4CAF50]"}):(0,b.jsx)(R.Copy,{size:13,className:"shrink-0 text-white/35 transition-colors group-hover:text-white/70"})]})}function X({icon:a,title:c,body:d}){return(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-white/10 bg-white/[0.06] text-white/75",children:a}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("div",{className:"text-[12.5px] font-semibold text-white",children:c}),(0,b.jsx)("div",{className:"text-[11.5px] leading-relaxed text-white/55",children:d})]})]})}function Y({state:a,onClose:c}){let[d,g]=(0,e.useState)(0),h="gateway"===a.source&&"live"===a.connection,j=()=>{try{window.localStorage.setItem(V,"1")}catch{}c()};(0,e.useEffect)(()=>{let a=a=>{"Escape"===a.key&&j(),"ArrowRight"===a.key&&d<2&&g(d+1),"ArrowLeft"===a.key&&d>0&&g(d-1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]);let n=[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,b.jsx)("img",{src:"/logo-bracket-claw.svg",alt:"",className:"h-7 w-auto"}),(0,b.jsxs)("h2",{className:"text-lg font-bold text-white",children:["Welcome to your ",(0,b.jsx)("span",{className:"text-[#E63946]",children:"crib"})]})]}),(0,b.jsx)("p",{className:"text-[13px] leading-relaxed text-white/65",children:"This is a live 3D office for your OpenClaw agents. Every desk, walk, and workboard card is driven by real agent activity. Nothing here is decorative."}),(0,b.jsx)("div",{className:"mt-4 rounded-xl border border-white/10 bg-white/[0.04] p-3",children:h?(0,b.jsxs)("p",{className:"flex items-start gap-2 text-[12px] leading-relaxed text-white/70",children:[(0,b.jsx)(I.Radio,{size:14,className:"mt-0.5 shrink-0 text-[#4CAF50]"}),"You're connected to your gateway, so the agents on the floor are your real team, live."]}):(0,b.jsxs)("p",{className:"flex items-start gap-2 text-[12px] leading-relaxed text-white/70",children:[(0,b.jsx)(I.Radio,{size:14,className:"mt-0.5 shrink-0 text-[#39e6e0]"}),"Right now you're watching a simulated team, so you can explore freely. The next step connects your real agents."]})})]},"welcome"),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"mb-1 text-lg font-bold text-white",children:h?"You're connected":"Connect your OpenClaw gateway"}),h?(0,b.jsx)("p",{className:"text-[13px] leading-relaxed text-white/65",children:"Nothing to do. This crib is streaming live from your gateway. Everyone on the floor is one of your real agents."}):(0,b.jsx)("p",{className:"text-[13px] leading-relaxed text-white/65",children:"You're watching a simulated team because no gateway was found on this machine. Install ClawCrib where your agents run and it connects on its own:"}),h?null:(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-white/45",children:[(0,b.jsx)(T.MonitorSmartphone,{size:12})," On the machine your agents run on"]}),(0,b.jsx)(W,{command:"npm i -g clawcrib && clawcrib start"}),(0,b.jsxs)("p",{className:"mt-1.5 text-[11px] leading-relaxed text-white/45",children:["Finds the gateway on ",(0,b.jsx)("code",{className:"font-mono",children:"127.0.0.1:18789"})," and connects. No URL or token to paste."]})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-white/45",children:[(0,b.jsx)(S.Globe,{size:12})," Gateway on another host"]}),(0,b.jsx)(W,{command:"clawcrib start --gateway ws://<machine>.<tailnet>.ts.net:18789"}),(0,b.jsxs)("p",{className:"mt-1.5 text-[11px] leading-relaxed text-white/45",children:["Only needed when the gateway is somewhere else. A first connect from a new machine may need a one-time approval on the gateway host:"," ",(0,b.jsx)("code",{className:"font-mono",children:"openclaw devices approve <requestId>"}),"."]})]})]})]},"connect"),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"mb-1 text-lg font-bold text-white",children:"Find your way around"}),(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,b.jsx)(X,{icon:(0,b.jsx)(m,{size:14}),title:"Plan / 3D toggle",body:"Top right. Plan is the blueprint view for laying out the floor; 3D is the live office. Drag orbits, scroll zooms, right-drag pans."}),(0,b.jsx)(X,{icon:(0,b.jsx)(l,{size:14}),title:"Build (Plan view)",body:"Add rooms and place them: Custom pins an exact spot and size, Auto packs the east wall. Drag left/right on any number field to scrub it. Lock the building size under Building."}),(0,b.jsx)(X,{icon:(0,b.jsx)(i.LayoutGrid,{size:14}),title:"Organize",body:"Buildings (profiles), departments, and which agents sit in which room. Room colors become department colors on the floor."}),(0,b.jsx)(X,{icon:(0,b.jsx)(U,{size:14}),title:"Theme",body:"One switch flips Plan and 3D between night and day."}),(0,b.jsx)(X,{icon:(0,b.jsx)(f.Bot,{size:14}),title:"Robot style",body:"3D view only. Recolor your bots' body, visor, and eyes."}),(0,b.jsx)(X,{icon:(0,b.jsx)(k,{size:14}),title:"Activity feed",body:"Bottom right: a running narration of every tool call, task, and cron across the team."})]})]},"ui")];return(0,b.jsx)("div",{className:"absolute inset-0 z-40 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[3px]",role:"dialog","aria-modal":"true","aria-label":"ClawCrib tour",onClick:j,children:(0,b.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-white/12 bg-[#0c0e16]/95 p-5 shadow-2xl",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"mb-3 flex items-start justify-between",children:[(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:[0,1,2].map(a=>(0,b.jsx)("button",{onClick:()=>g(a),className:`h-1.5 rounded-full transition-all ${a===d?"w-6 bg-[#E63946]":"w-1.5 bg-white/20 hover:bg-white/40"}`,"aria-label":`Step ${a+1}`},a))}),(0,b.jsx)("button",{onClick:j,className:"rounded-full p-1 text-white/45 transition-colors hover:text-white","aria-label":"Close tour",children:(0,b.jsx)(q.X,{size:15})})]}),n[d],(0,b.jsxs)("div",{className:"mt-5 flex items-center justify-between",children:[d>0?(0,b.jsxs)("button",{onClick:()=>g(d-1),className:"inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-[12px] font-medium text-white/55 transition-colors hover:text-white",children:[(0,b.jsx)(O.ArrowLeft,{size:13})," Back"]}):(0,b.jsx)("button",{onClick:j,className:"rounded-lg px-2.5 py-1.5 text-[12px] font-medium text-white/40 transition-colors hover:text-white",children:"Skip tour"}),d<n.length-1?(0,b.jsxs)("button",{onClick:()=>g(d+1),className:"inline-flex items-center gap-1.5 rounded-lg bg-[#E63946] px-4 py-1.5 text-[12px] font-semibold text-white transition-colors hover:bg-[#C1121F]",children:["Next ",(0,b.jsx)(P.ArrowRight,{size:13})]}):(0,b.jsx)("button",{onClick:j,className:"inline-flex items-center gap-1.5 rounded-lg bg-[#E63946] px-4 py-1.5 text-[12px] font-semibold text-white transition-colors hover:bg-[#C1121F]",children:"Open the crib"})]})]})})}var Z=a.i(67900);let $=(0,g.default)("door-open",[["path",{d:"M11 20H2",key:"nlcfvz"}],["path",{d:"M11 4.562v16.157a1 1 0 0 0 1.242.97L19 20V5.562a2 2 0 0 0-1.515-1.94l-4-1A2 2 0 0 0 11 4.561z",key:"au4z13"}],["path",{d:"M11 4H8a2 2 0 0 0-2 2v14",key:"74r1mk"}],["path",{d:"M14 12h.01",key:"1jfl7z"}],["path",{d:"M22 20h-3",key:"vhrsz"}]]);var _=a.i(15618),aa=a.i(81560);function ab(a){let b=a%4*.9;return{x:-3+b,z:-2+b,w:5,d:4}}let ac=["#7c5cff","#28d6a8","#ff9f43","#4ea8ff","#ff6b9d","#ffd166","#9b8cff","#5ad1c0"];function ad(){return{version:1,buildingName:"ClawCrib",rooms:[],assignments:{}}}function ae(a){return a.rooms.length>0}let af=0;function ag(){return af+=1,`room-${af}-${0x9e3779b1*af%1e5}`}let ah="clawcrib:profiles",ai="/api/crib/profiles";function aj(a,b){let c=b??ad();return{id:function(a){try{if("u">typeof crypto&&crypto.randomUUID)return`bld-${crypto.randomUUID().slice(0,8)}`}catch{}return`bld-${Math.random().toString(36).slice(2,10)}`}(0),name:a,config:{...c,buildingName:a},updatedAt:Date.now()}}function ak(a){let b=Array.isArray(a?.profiles)?a.profiles:[];return{version:1,activeId:b.some(b=>b.id===a?.activeId)?a.activeId:b[0]?.id??null,profiles:b}}var al=a.i(45741);let am=4/3,an={dx:-1,dz:0},ao={dx:0,dz:1},ap=["N","S","W","E"],aq=a=>Math.round(2*a)/2;function ar({state:a,config:c,update:d,onClose:f}){let g=[...c.rooms].sort((a,b)=>a.order-b.order),h=(a,b)=>d(c=>({...c,rooms:c.rooms.map(c=>c.id===a?{...c,...b}:c)})),i=(a,b,c)=>d(d=>({...d,rooms:d.rooms.map(e=>{if(e.id!==a)return e;let f={...e.rect??ab(d.rooms.indexOf(e)),[b]:aq(c)};return("w"===b||"d"===b)&&(f[b]=Math.max(2.5,f[b])),{...e,rect:f}})})),j=(0,e.useMemo)(()=>{let b=function(a,b){let c=[...a].sort((a,b)=>a.id.localeCompare(b.id)),d=[],e=[],f=[];if(b&&ae(b)){let a=new Map;for(let d of c){let c=b.assignments[d.id];if(c&&b.rooms.some(a=>a.id===c)){let b=a.get(c)??[];b.push(d),a.set(c,b)}else f.push(d)}for(let c of[...b.rooms].sort((a,b)=>a.order-b.order)){let b=a.get(c.id)??[];c.rect?e.push({def:c,agents:b}):d.push(function(a,b,c,d){var e;let f,{cols:g,rows:h}={cols:f=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(Math.max(e=d.length,1))))),rows:Math.ceil(Math.max(e,1)/f)};return{id:a,name:b,color:c,agents:d,cols:g,rows:h,w:2.55*h+1.6+.55,d:2.3*g+1.6}}(c.id,c.name,c.color,b))}}else f=c;let g=c.flatMap(a=>a.subAgents.map(b=>({s:b,parent:a}))),h=new Map;if(b&&ae(b)){let a=new Map(b.rooms.map(a=>[a.id,a.color]));for(let[c,d]of Object.entries(b.assignments)){let b=a.get(d);b&&h.set(c,b)}}let i=(a,b)=>h.get(a)??b??"#8a93b0",j=Math.max(...d.map(a=>a.w),4.8),k=0,l=0;for(let a of e){let b=a.def.rect;k=Math.max(k,Math.abs(b.x)+b.w/2),l=Math.max(l,Math.abs(b.z)+b.d/2)}let m=b?.building,n=Math.max(18,10.5+j+.22,2*(k+.22),m?.w??0),o=n/2,p=o-.22,q=p-j,r=-o+2.4+.8,s=q-1.3-r,t=Math.max(4.6,Math.min(.5*n,.4*n)),u=5.12+Math.max(d.reduce((a,b,c)=>a+b.d+1.2*!!c,0),9.4)+.22,v=Math.max(1,Math.floor(s/2.3)),w=Math.min(5,Math.max(1,Math.ceil((f.length+g.length)/v))),x=e.map(({def:a})=>a.rect.z-a.rect.d/2),y=x.length?2*(5.12+2.55*w+2.3+.3+-Math.min(...x)):0,z=m?Math.max(u,2*(l+.22),m.d):Math.max(18,u,n*am,2*(l+.22),y),A=z/2,B=-A,C=B+.22+3.6+1.3,D=A-.22,E=new Map;for(let{def:a}of e){let b={...a.rect};.55>Math.abs(b.x+b.w/2-(o-.22))?b.x=o-.22-b.w/2:.55>Math.abs(b.x-b.w/2-(-o+.22))&&(b.x=-o+.22+b.w/2),.55>Math.abs(b.z+b.d/2-(A-.22))?b.z=A-.22-b.d/2:.55>Math.abs(b.z-b.d/2-(B+.22))&&(b.z=B+.22+b.d/2),E.set(a.id,b)}let F=new Map,G=new Map,H=[],I=(a,b,c,d,e,f,g,h)=>{let i=Math.atan2(h.dx,h.dz),j={x:f-.42*h.dx,z:g-.42*h.dz};return{key:a,agentId:b,isSub:c,seat:j,desk:{x:f+.34*h.dx,z:g+.34*h.dz},deskYaw:i+Math.PI,faceYaw:i,color:d,status:e,out:{x:j.x-.62*h.dx,z:j.z-.62*h.dz}}},J=p-t/2,K=B+.22+1.8;H.push({id:"__conference__",name:"Conference",color:"#ffb547",walled:!0,placeholder:!0,x:J,z:K,w:t,d:3.6,desks:[],door:{side:"S",x:J,z:K+1.8,w:1.9}});let L=(a,b,c,d,e)=>{let f=2.3*a.cols,g=2.55*a.rows,h=c-f/2+1.15,j=b-g/2+1.275,k=d+.45,l=2.3*a.cols/2,m=[];return a.agents.forEach((b,c)=>{let f=c%a.cols,g=Math.floor(c/a.cols),n=h+2.3*f,o=i(b.id,b.color),p=I(b.id,b.id,!1,o,b.status,j+2.55*g,n,an);p.inRoom=!0,p.roomDoor={x:d,z:e};let q=n<=e?-1:1,r=e+q*(l+.4);p.exit=[{x:p.seat.x,z:r},{x:k,z:r},{x:k,z:e}],m.push(p),F.set(b.id,p),G.set(b.id,{key:b.id,name:b.name,label:b.name,color:o,status:b.status,activity:b.activity,isDefault:b.isDefault,isSub:!1,scale:1})}),m},M=D;for(let a of d){let b=p-j/2,c=M-a.d/2,d={side:"W",x:q,z:c,w:1.9};H.push({id:a.id,name:a.name,color:a.color,walled:!0,x:b,z:c,w:j,d:a.d,desks:L(a,b,c,q,c),door:d}),M-=a.d+1.2}let N=a=>"W"===a?{dx:-1,dz:0}:"E"===a?{dx:1,dz:0}:"N"===a?{dx:0,dz:-1}:{dx:0,dz:1},O=a=>"S"===a.side?{x:a.x,z:a.z-.5}:"N"===a.side?{x:a.x,z:a.z+.5}:"W"===a.side?{x:a.x+.5,z:a.z}:{x:a.x-.5,z:a.z};for(let{def:a,agents:b}of e){let c=E.get(a.id)??a.rect,d=a.doorSide??"S",e="S"===d?{side:d,x:c.x,z:c.z+c.d/2,w:1.9}:"N"===d?{side:d,x:c.x,z:c.z-c.d/2,w:1.9}:"W"===d?{side:d,x:c.x-c.w/2,z:c.z,w:1.9}:{side:d,x:c.x+c.w/2,z:c.z,w:1.9},g=O(e),h=N(d),j=Math.max(2.3,c.w-1.6),k=Math.max(1,Math.min(Math.max(1,b.length),Math.floor(j/2.3)||1)),l=Math.max(1,Math.floor((c.d-1.6-.55)/2.55)),m=b.slice(0,k*l);f.push(...b.slice(k*l));let n=c.x-2.3*k/2+1.15,o=c.z-c.d/2+.8+.55+1.275,p=[];m.forEach((a,b)=>{let d=n+b%k*2.3,e=o+2.55*Math.floor(b/k),f=i(a.id,a.color),j=I(a.id,a.id,!1,f,a.status,d,e,h);j.inRoom=!0,j.roomDoor={x:g.x,z:g.z},j.exit=[{x:g.x,z:g.z}],j.out={x:Math.max(c.x-c.w/2+.5,Math.min(c.x+c.w/2-.5,j.out.x)),z:Math.max(c.z-c.d/2+.5,Math.min(c.z+c.d/2-.5,j.out.z))},p.push(j),F.set(a.id,j),G.set(a.id,{key:a.id,name:a.name,label:a.name,color:f,status:a.status,activity:a.activity,isDefault:a.isDefault,isSub:!1,scale:1})}),H.push({id:a.id,name:a.name,color:a.color,walled:!0,x:c.x,z:c.z,w:c.w,d:c.d,desks:p,door:e})}let P=Math.max(1,Math.floor(s/2.3)),Q=Math.max(1,Math.min(4,P)),R=Math.min(s,2.3*Q+.9),S=r+R/2,T=D-2.4;for(let a of H){if(!a.walled)continue;let b=a.z-a.d/2;!(b<=C)&&a.x+a.w/2+2.3>S-R/2&&a.x-a.w/2-2.3<S+R/2&&(T=Math.min(T,b-2.3))}let U=(T=Math.max(T,C+2.55))-C,V=Math.max(1,Math.min(16,Math.floor(U/2.55+1e-6))),W=Q,X=f.length+g.length;for(;W<P&&W*V<X;)W++;W*V<X&&(V=Math.max(1,Math.min(16,Math.floor((U=(T=D-2.4)-C)/2.55))));let Y=W*V,Z=Math.min(s,2.3*W+.9),$=r+Z/2,_=$-2.3*W/2+1.15,aa=C+1.275+Math.max(0,(U-2.55*V)/2),ab=[...f.map(a=>({id:a.id,name:a.name,color:i(a.id,a.color),status:a.status,activity:a.activity,isDefault:a.isDefault,isSub:!1})),...g.map(({s:a})=>({id:a.id,name:a.label,color:i(a.agentId),status:a.status,isSub:!0}))],ac=(a,b)=>{for(let c of H)if(c.walled&&Math.abs(a-c.x)<c.w/2+2.3&&Math.abs(b-c.z)<c.d/2+2.3)return!1;return!0},ad=[],af=[],ag=[],ah=(a,b,c)=>{let d=I(a.id,a.id,a.isSub,a.color,a.status,b,c,ao);ad.push(d),F.set(a.id,d),G.set(a.id,{key:a.id,name:a.name,label:a.name,color:a.color,status:a.status,activity:a.activity,isDefault:a.isDefault,isSub:a.isSub,scale:a.isSub?.78:1}),a.isSub&&ag.push({key:a.id,agentId:a.id})},ai=a=>[_+a%W*2.3,aa+2.55*Math.floor(a/W)],aj=[],ak=0;for(let a=0;a<Y;a++){let[b,c]=ai(a);if(!ac(b,c)){aj.push(a);continue}ak<ab.length?ah(ab[ak++],b,c):af.push({x:b,z:c-.42,deskX:b,deskZ:c+.34,deskYaw:Math.PI})}let ap=(a,b)=>H.some(c=>c.walled&&Math.abs(a-c.x)<c.w/2&&Math.abs(b-c.z)<c.d/2);for(let a of aj){if(ak>=ab.length)break;let[b,c]=ai(a);ap(b,c)||ah(ab[ak++],b,c)}for(let a=0;ak<ab.length;a++){let[b,c]=ai(a%W);ah(ab[ak++],b,c)}let aq=-o+.22,ar=J-t/2-.35,as=Math.max(1.9,ar-aq),at=(aq+ar)/2,au=Math.max(1,Math.min(10,Math.floor(as/1.9))),av=Math.max(1,Math.floor(1.1578947368421053)+1),aw=at-1.9*au/2+.95,ax=B+.22+.7+.95,ay=[];for(let a=0;a<au*av;a++){let b=a%au,c=ax+1.9*Math.floor(a/au);c>B+.22+3.6-.4||ay.push({x:aw+1.9*b,z:c,yaw:0})}let az=2.3*W/2,aA=$-az-.95,aB=Math.min($+az+.95,q-.5),aC=C-.65,aD=Math.min(D-1.2,T+.95),aE=[{x:-o+.95,z:A-1.2,s:1.05},{x:-o+.95,z:B+1.3,s:1}],aF=[];for(let a of F.values())aF.push({x:(a.desk.x+a.seat.x)/2,z:(a.desk.z+a.seat.z)/2,hx:.78,hz:.62,key:a.key});for(let a of af)aF.push({x:(a.deskX+a.x)/2,z:(a.deskZ+a.z)/2,hx:.78,hz:.62});for(let a of ay)aF.push({x:a.x,z:a.z,hx:.72,hz:.5});for(let a of aE)aF.push({x:a.x,z:a.z,hx:.42*a.s,hz:.42*a.s});let aG=[];for(let a of H){if(!a.walled)continue;let b=a.w/2,c=a.d/2,d=a.door?.side??"S",e="N"===d||"S"===d?a.w:a.d,f=Math.min(a.door?.w??1.9,.6*e),g=(e-f)/2,h=f/2+g/2,i=(c,d)=>{d&&g>.05?(aG.push({x:a.x-h,z:c,hx:g/2,hz:.09}),aG.push({x:a.x+h,z:c,hx:g/2,hz:.09})):d||aG.push({x:a.x,z:c,hx:b,hz:.09})},j=(b,d)=>{d&&g>.05?(aG.push({x:b,z:a.z-h,hx:.09,hz:g/2}),aG.push({x:b,z:a.z+h,hx:.09,hz:g/2})):d||aG.push({x:b,z:a.z,hx:.09,hz:c})};i(a.z-c,"N"===d),i(a.z+c,"S"===d),j(a.x-b,"W"===d),j(a.x+b,"E"===d)}let aH=-o+1.35,aI=ay.length?Math.max(...ay.map(a=>a.z))+.75:aC,aJ=[{x0:aA,z0:aC,x1:aA,z1:aD},{x0:aB,z0:aC,x1:aB,z1:aD},{x0:aH,z0:aC,x1:aB,z1:aC},{x0:aH,z0:aD,x1:aB,z1:aD},{x0:aH,z0:aC,x1:aH,z1:aD},{x0:at,z0:aI,x1:at,z1:aC}];for(let a of H){let b=a.door;if(!b)continue;let c="W"===b.side?{dx:-1,dz:0}:"E"===b.side?{dx:1,dz:0}:"N"===b.side?{dx:0,dz:-1}:{dx:0,dz:1},d=1.2;if(0!==c.dx){let a=[aA,aB].filter(a=>(a-b.x)*c.dx>0);a.length&&(d=Math.min(...a.map(a=>Math.abs(a-b.x))))}else{let a=[aC,aD].filter(a=>(a-b.z)*c.dz>0);a.length&&(d=Math.min(...a.map(a=>Math.abs(a-b.z))))}aJ.push({x0:b.x,z0:b.z,x1:b.x+c.dx*d,z1:b.z+c.dz*d})}return{W:n,halfW:o,D:z,halfD:A,backZ:B,rooms:H,bullpen:{x:$,z:(C+T)/2,w:Z,d:U,agentDesks:ad,spots:af},lounge:{x:at,z:B+.22+1.8,w:as,d:3.6,seats:ay},subagents:ag,nav:{leftX:aA,rightX:aB,topZ:aC,botZ:aD},obstacles:aF,walls:aG,grid:(0,al.buildNavGrid)({halfW:o,halfD:A,backZ:B,obstacles:aF,rooms:H,lanes:aJ}),deskByKey:F,entityByKey:G,board:{z:0,w:z-2,h:2.76,yCenter:2.05,standX:aH},plants:aE,entrance:{x:Math.max(r+.4,aA-1.1),z:aD}}}(a.agents,{...c,building:void 0});return{w:b.W,d:b.D}},[a.agents,c]),k=(a,b)=>d(c=>{let d=c.building??j;return{...c,building:{...d,[a]:Math.max(10,aq(b))}}});return(0,b.jsxs)("div",{className:"absolute right-4 top-16 z-30 flex max-h-[calc(100dvh-6rem)] w-[360px] flex-col rounded-2xl border border-white/12 bg-[#0c0e16]/95 shadow-2xl backdrop-blur-md",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-semibold text-white",children:[(0,b.jsx)(l,{size:14})," Floor-plan builder"]}),(0,b.jsx)("div",{className:"text-[11px] text-white/45",children:"Place and size rooms. The plan updates live"})]}),(0,b.jsx)("button",{onClick:f,className:"rounded-md p-1 text-white/55 hover:bg-white/10 hover:text-white","aria-label":"Close",children:(0,b.jsx)(q.X,{size:16})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 text-[11px] font-medium uppercase tracking-wide text-white/40",children:[(0,b.jsx)(Z.Building2,{size:12})," Building"]}),(0,b.jsxs)("div",{className:"mb-4 rounded-xl border border-white/10 bg-white/[0.03] px-2.5 py-2",children:[(0,b.jsx)(as,{custom:!!c.building,onSelect:a=>d(b=>{if(!a){let a={...b};return delete a.building,a}return{...b,building:b.building??{w:aq(j.w),d:aq(j.d)}}}),customLabel:"Custom",autoLabel:"Auto"}),c.building?(0,b.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-x-3 gap-y-1.5",children:[(0,b.jsx)(au,{label:"Width",value:c.building.w,step:.5,min:10,onChange:a=>k("w",a)}),(0,b.jsx)(au,{label:"Depth",value:c.building.d,step:.5,min:10,onChange:a=>k("d",a)})]}):(0,b.jsxs)("p",{className:"mt-1.5 text-[11px] leading-relaxed text-white/40",children:["Sized to fit contents, currently ",Math.round(10*j.w)/10," × ",Math.round(10*j.d)/10," m. Switch to Custom to lock the floor size."]}),c.building?(0,b.jsx)("p",{className:"mt-1.5 text-[11px] leading-relaxed text-white/35",children:"The floor keeps this size; it only grows if rooms need more space."}):null]}),(0,b.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Rooms"}),(0,b.jsxs)("button",{onClick:()=>d(a=>{let b=ac[a.rooms.length%ac.length];return{...a,rooms:[...a.rooms,{id:ag(),name:`Office ${a.rooms.length+1}`,color:b,order:a.rooms.length,rect:ab(a.rooms.length),doorSide:"S"}]}}),className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] font-medium text-[#7c5cff] hover:bg-white/5",children:[(0,b.jsx)(_.Plus,{size:13})," Add office"]})]}),0===g.length?(0,b.jsx)("p",{className:"rounded-lg border border-dashed border-white/12 px-3 py-2.5 text-[12px] leading-relaxed text-white/45",children:"No rooms yet. Add an office, then drag its size + position with the controls. Assign agents to rooms in “Organize”."}):(0,b.jsx)("div",{className:"flex flex-col gap-2.5",children:g.map(a=>{let e=!!a.rect,f=Object.values(c.assignments).filter(b=>b===a.id).length,j=a.rect??ab(g.indexOf(a));return(0,b.jsxs)("div",{className:"rounded-xl border border-white/10 bg-white/[0.03] px-2.5 py-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("label",{className:"relative h-5 w-5 shrink-0 cursor-pointer rounded-full",style:{background:a.color},children:(0,b.jsx)("input",{type:"color",value:a.color,onChange:b=>h(a.id,{color:b.target.value}),className:"absolute inset-0 cursor-pointer opacity-0","aria-label":`${a.name} color`})}),(0,b.jsx)("input",{value:a.name,onChange:b=>h(a.id,{name:b.target.value}),className:"min-w-0 flex-1 bg-transparent text-sm text-white outline-none"}),(0,b.jsx)("span",{className:"shrink-0 text-[11px] tabular-nums text-white/35",title:"agents assigned",children:f}),(0,b.jsx)("button",{onClick:()=>{let b;return b=a.id,d(a=>{let c={...a.assignments};for(let a of Object.keys(c))c[a]===b&&delete c[a];return{...a,rooms:a.rooms.filter(a=>a.id!==b),assignments:c}})},className:"shrink-0 rounded p-1 text-white/40 hover:bg-white/10 hover:text-[#ff6b9d]","aria-label":`Delete ${a.name}`,children:(0,b.jsx)(aa.Trash2,{size:13})})]}),(0,b.jsx)("div",{className:"mt-2",children:(0,b.jsx)(as,{custom:e,onSelect:b=>{let c;return c=a.id,d(a=>({...a,rooms:a.rooms.map(d=>{if(d.id!==c)return d;if(b)return{...d,rect:d.rect??ab(a.rooms.indexOf(d)),doorSide:d.doorSide??"S"};let e={...d};return delete e.rect,delete e.doorSide,e})}))},customLabel:"Custom",autoLabel:"Auto (east wall)"})}),e?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-x-3 gap-y-1.5",children:[(0,b.jsx)(au,{label:"X",value:j.x,step:.5,onChange:b=>i(a.id,"x",b)}),(0,b.jsx)(au,{label:"Z",value:j.z,step:.5,onChange:b=>i(a.id,"z",b)}),(0,b.jsx)(au,{label:"Width",value:j.w,step:.5,min:2.5,onChange:b=>i(a.id,"w",b)}),(0,b.jsx)(au,{label:"Depth",value:j.d,step:.5,min:2.5,onChange:b=>i(a.id,"d",b)})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-1.5",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1 text-[11px] text-white/40",children:[(0,b.jsx)($,{size:12})," Door"]}),(0,b.jsx)("div",{className:"flex gap-1",children:ap.map(c=>(0,b.jsx)("button",{onClick:()=>h(a.id,{doorSide:c}),className:`h-6 w-6 rounded-md border text-[11px] font-semibold transition-colors ${(a.doorSide??"S")===c?"border-[#7c5cff]/60 bg-[#7c5cff]/20 text-white":"border-white/12 text-white/50 hover:text-white"}`,title:`Door on ${c} wall`,children:c},c))})]})]}):null]},a.id)})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between border-t border-white/10 px-4 py-2.5",children:[(0,b.jsxs)("span",{className:"text-[11px] text-white/35",children:[a.agents.length," agents · units in meters"]}),(0,b.jsx)("span",{className:"text-[11px] text-white/30",children:"Saved automatically"})]})]})}function as({custom:a,onSelect:c,customLabel:d,autoLabel:e}){let f=a=>`rounded-full border px-2.5 py-1 text-[11px] font-medium transition-colors ${a?"border-[#7c5cff]/60 bg-[#7c5cff]/20 text-white":"border-white/12 text-white/50 hover:text-white"}`;return(0,b.jsxs)("div",{className:"flex items-center gap-1.5",role:"radiogroup",children:[(0,b.jsx)("button",{onClick:()=>c(!0),className:f(a),role:"radio","aria-checked":a,children:d}),(0,b.jsx)("button",{onClick:()=>c(!1),className:f(!a),role:"radio","aria-checked":!a,children:e})]})}let at=a=>String(Math.round(100*a)/100);function au({label:a,value:c,onChange:d,step:f=1,min:g}){let[h,i]=(0,e.useState)(null),j=(0,e.useRef)(null),k=a=>null!=g?Math.max(g,a):a;return(0,b.jsxs)("label",{className:"flex select-none items-center justify-between gap-2 text-[11px] text-white/45",style:{cursor:"ew-resize",touchAction:"none"},onPointerDown:a=>{0===a.button&&(j.current={x:a.clientX,v:c,scrubbing:!1})},onPointerMove:a=>{let b=j.current;if(!b)return;let c=a.clientX-b.x;if(!b.scrubbing){if(3>Math.abs(c))return;b.scrubbing=!0,i(null),a.currentTarget.setPointerCapture(a.pointerId),document.activeElement?.blur?.()}d(k(Math.round((b.v+c/4*f)/f)*f)),a.preventDefault()},onPointerUp:()=>{j.current=null},onPointerCancel:()=>{j.current=null},children:[(0,b.jsx)("span",{className:"w-10 shrink-0 uppercase tracking-wide",children:a}),(0,b.jsx)("input",{type:"number",value:h??at(Number.isFinite(c)?c:0),step:f,min:g,onFocus:()=>i(at(c)),onBlur:()=>i(null),onChange:a=>{i(a.target.value);let b=parseFloat(a.target.value);Number.isFinite(b)&&d(k(b))},className:"min-w-0 flex-1 cursor-text rounded-md border border-white/12 bg-[#11131c] px-2 py-1 text-right text-[12px] tabular-nums text-white outline-none focus:border-white/30"})]})}function av({state:a,config:c,update:d,profiles:e,activeId:f,selectProfile:g,createProfile:h,deleteProfile:i,canAddProfile:j,onClose:k}){let l=[...a.agents].sort((a,b)=>a.id.localeCompare(b.id));return(0,b.jsxs)("div",{className:"absolute right-4 top-16 z-30 flex max-h-[calc(100dvh-6rem)] w-[340px] flex-col rounded-2xl border border-white/12 bg-[#0c0e16]/95 shadow-2xl backdrop-blur-md",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-semibold text-white",children:"Organize building"}),(0,b.jsx)("div",{className:"text-[11px] text-white/45",children:"Group agents into rooms. Views update live"})]}),(0,b.jsx)("button",{onClick:k,className:"rounded-md p-1 text-white/55 hover:bg-white/10 hover:text-white","aria-label":"Close",children:(0,b.jsx)(q.X,{size:16})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:[(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] font-medium uppercase tracking-wide text-white/40",children:[(0,b.jsx)(Z.Building2,{size:12})," Saved buildings"]}),(0,b.jsxs)("button",{onClick:h,disabled:!j,className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] font-medium text-[#7c5cff] enabled:hover:bg-white/5 disabled:cursor-not-allowed disabled:text-white/25",title:j?"New building":"Profile limit reached",children:[(0,b.jsx)(_.Plus,{size:13})," New"]})]}),(0,b.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,b.jsx)("select",{value:f??"",onChange:a=>g(a.target.value),className:"min-w-0 flex-1 rounded-lg border border-white/12 bg-[#11131c] px-2.5 py-1.5 text-sm text-white outline-none focus:border-white/30",children:e.map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))}),(0,b.jsx)("button",{onClick:()=>f&&i(f),disabled:e.length<=1,className:"shrink-0 rounded-lg border border-white/10 p-2 text-white/45 enabled:hover:bg-white/10 enabled:hover:text-[#ff6b9d] disabled:cursor-not-allowed disabled:opacity-40",title:e.length<=1?"Keep at least one building":"Delete this building","aria-label":"Delete building",children:(0,b.jsx)(aa.Trash2,{size:14})})]}),(0,b.jsx)("label",{className:"mb-1 block text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Building name"}),(0,b.jsx)("input",{value:c.buildingName,onChange:a=>d(b=>({...b,buildingName:a.target.value})),className:"mb-4 w-full rounded-lg border border-white/12 bg-white/[0.04] px-2.5 py-1.5 text-sm text-white outline-none focus:border-white/30"}),(0,b.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Rooms"}),(0,b.jsxs)("button",{onClick:()=>d(a=>{let b=ac[a.rooms.length%ac.length];return{...a,rooms:[...a.rooms,{id:ag(),name:`Room ${a.rooms.length+1}`,color:b,order:a.rooms.length}]}}),className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] font-medium text-[#7c5cff] hover:bg-white/5",children:[(0,b.jsx)(_.Plus,{size:13})," Add"]})]}),0===c.rooms.length?(0,b.jsx)("p",{className:"mb-4 rounded-lg border border-dashed border-white/12 px-3 py-2.5 text-[12px] leading-relaxed text-white/45",children:"No rooms yet, so everyone shares the open floor. Add a room, then assign agents below."}):(0,b.jsx)("div",{className:"mb-4 flex flex-col gap-1.5",children:[...c.rooms].sort((a,b)=>a.order-b.order).map(a=>{let e=Object.values(c.assignments).filter(b=>b===a.id).length;return(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.03] px-2 py-1.5",children:[(0,b.jsx)("label",{className:"relative h-5 w-5 shrink-0 cursor-pointer rounded-full",style:{background:a.color},children:(0,b.jsx)("input",{type:"color",value:a.color,onChange:b=>{let c,e;return c=a.id,e=b.target.value,d(a=>({...a,rooms:a.rooms.map(a=>a.id===c?{...a,color:e}:a)}))},className:"absolute inset-0 cursor-pointer opacity-0","aria-label":`${a.name} color`})}),(0,b.jsx)("input",{value:a.name,onChange:b=>{let c,e;return c=a.id,e=b.target.value,d(a=>({...a,rooms:a.rooms.map(a=>a.id===c?{...a,name:e}:a)}))},className:"min-w-0 flex-1 bg-transparent text-sm text-white outline-none"}),(0,b.jsx)("span",{className:"shrink-0 text-[11px] tabular-nums text-white/35",children:e}),(0,b.jsx)("button",{onClick:()=>{let b;return b=a.id,d(a=>{let c={...a.assignments};for(let a of Object.keys(c))c[a]===b&&delete c[a];return{...a,rooms:a.rooms.filter(a=>a.id!==b),assignments:c}})},className:"shrink-0 rounded p-1 text-white/40 hover:bg-white/10 hover:text-[#ff6b9d]","aria-label":`Delete ${a.name}`,children:(0,b.jsx)(aa.Trash2,{size:13})})]},a.id)})}),(0,b.jsx)("div",{className:"mb-1 text-[11px] font-medium uppercase tracking-wide text-white/40",children:"Agents"}),(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[l.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-lg px-1 py-1",children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-white/85",title:a.id,children:a.name}),(0,b.jsxs)("select",{value:c.assignments[a.id]??"",onChange:b=>{let c,e;return c=a.id,e=b.target.value,d(a=>{let b={...a.assignments};return e?b[c]=e:delete b[c],{...a,assignments:b}})},className:"shrink-0 rounded-md border border-white/12 bg-[#11131c] px-2 py-1 text-[12px] text-white outline-none focus:border-white/30",children:[(0,b.jsx)("option",{value:"",children:"Open floor"}),[...c.rooms].sort((a,b)=>a.order-b.order).map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))]})]},a.id)),0===l.length?(0,b.jsx)("p",{className:"px-1 py-2 text-[12px] text-white/40",children:"Waiting for the gateway roster…"}):null]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between border-t border-white/10 px-4 py-2.5",children:[(0,b.jsxs)("button",{onClick:()=>d(a=>({version:1,buildingName:a.buildingName,rooms:[],assignments:{}})),className:"flex items-center gap-1.5 text-[12px] text-white/45 hover:text-white/80",children:[(0,b.jsx)(n.RotateCcw,{size:13})," Reset to open floor"]}),(0,b.jsx)("span",{className:"text-[11px] text-white/30",children:"Saved automatically"})]})]})}var aw=a.i(80032);let ax=(0,g.default)("drafting-compass",[["path",{d:"m12.99 6.74 1.93 3.44",key:"iwagvd"}],["path",{d:"M19.136 12a10 10 0 0 1-14.271 0",key:"ppmlo4"}],["path",{d:"m21 21-2.16-3.84",key:"vylbct"}],["path",{d:"m3 21 8.02-14.26",key:"1ssaw4"}],["circle",{cx:"12",cy:"5",r:"2",key:"f1ur92"}]]),ay=["plan","3d"];function az({value:a,onChange:c}){let d=ay.indexOf(a);return(0,b.jsxs)("div",{role:"tablist","aria-label":"View mode",className:"relative flex select-none items-center gap-1 rounded-full border border-white/10 bg-black/40 p-1 backdrop-blur-md",style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},children:[(0,b.jsx)("span",{"aria-hidden":!0,className:"absolute top-1 bottom-1 rounded-full bg-white/10 transition-transform duration-300 ease-out",style:{width:"calc(50% - 4px)",left:4,transform:`translateX(${100*d}%)`,background:"linear-gradient(180deg, rgba(124,92,255,0.35), rgba(40,214,168,0.22))",border:"1px solid rgba(255,255,255,0.14)"}}),(0,b.jsx)(aA,{active:"plan"===a,onClick:()=>c("plan"),icon:(0,b.jsx)(ax,{size:15,strokeWidth:2.2}),label:"Plan"}),(0,b.jsx)(aA,{active:"3d"===a,onClick:()=>c("3d"),icon:(0,b.jsx)(aw.Box,{size:15,strokeWidth:2.2}),label:"3D"})]})}function aA({active:a,onClick:c,icon:d,label:e}){return(0,b.jsxs)("button",{role:"tab","aria-selected":a,onClick:c,className:"relative z-10 flex w-[64px] items-center justify-center gap-1.5 rounded-full px-3 py-1.5 text-[13px] font-medium transition-colors",style:{color:a?"#fff":"rgba(255,255,255,0.5)"},children:[d,e]})}let aB={body:"#eef1f7",visor:"#12161f",eyes:"#39e6e0"},aC={body:["#eef1f7","#2a2e3a","#f6d7b0","#b8e6d2","#f2b8c6","#9fb4d8"],visor:["#12161f","#1d2735","#3a2233","#0f2420","#2b2118","#26262e"],eyes:["#39e6e0","#7c5cff","#ffd166","#ff6b81","#4cff9f","#ffffff"]},aD=[{id:"atlas",name:"Atlas",role:"Orchestrator",model:"claude-opus-4-8",color:"#7c5cff",cronEveryMs:47e3,cronCount:3},{id:"sage",name:"Sage",role:"Docs & memory",model:"claude-sonnet-4-6",color:"#ffb547",cronEveryMs:73e3,cronCount:1},{id:"forge",name:"Forge",role:"Build & deploy",model:"claude-opus-4-8",color:"#ff7a59",cronEveryMs:53e3,cronCount:2},{id:"bolt",name:"Bolt",role:"CI & test runs",model:"claude-haiku-4-5",color:"#ffd166",cronEveryMs:29e3,cronCount:5},{id:"patch",name:"Patch",role:"Bug triage",model:"claude-sonnet-4-6",color:"#8ce99a",cronEveryMs:61e3,cronCount:2},{id:"vera",name:"Vera",role:"QA & verification",model:"claude-sonnet-4-6",color:"#63e6be",cronEveryMs:41e3,cronCount:3},{id:"nova",name:"Nova",role:"Research & web",model:"claude-sonnet-4-6",color:"#28d6a8",cronEveryMs:31e3,cronCount:2},{id:"scout",name:"Scout",role:"Crawl & index",model:"claude-haiku-4-5",color:"#4dd4ac",cronEveryMs:17e3,cronCount:6},{id:"pixel",name:"Pixel",role:"Design & assets",model:"claude-sonnet-4-6",color:"#ff5d9e",cronEveryMs:89e3,cronCount:1},{id:"muse",name:"Muse",role:"Copy & content",model:"claude-sonnet-4-6",color:"#e599f7",cronEveryMs:67e3,cronCount:1},{id:"echo",name:"Echo",role:"Comms / channels",model:"claude-haiku-4-5",color:"#4ea1ff",cronEveryMs:19e3,cronCount:4},{id:"warden",name:"Warden",role:"Security watch",model:"claude-sonnet-4-6",color:"#46d3ff",cronEveryMs:23e3,cronCount:3},{id:"ledger",name:"Ledger",role:"Metrics & cost",model:"claude-haiku-4-5",color:"#a5d8ff",cronEveryMs:37e3,cronCount:4}],aE=[{title:"bash: pytest -q",kind:"command"},{title:"web.search",kind:"search"},{title:"fs.read AGENTS.md",kind:"tool"},{title:"git.commit",kind:"command"},{title:"http.fetch docs",kind:"tool"},{title:"fs.patch route.ts",kind:"patch"},{title:"analysis: diff review",kind:"analysis"},{title:"bash: npm run build",kind:"command"},{title:"memory.write daily",kind:"tool"},{title:"channel.send Slack",kind:"tool"}],aF=["summarize PR #214","scrape changelog","lint workspace","draft release notes","verify cron output","index new docs"],aG=[["Read context","Run tests","Patch failure","Re-run"],["Fetch sources","Rank by relevance","Summarize"],["Pull diff","Review","Comment","Approve"]];function aH(a){return a[Math.floor(Math.random()*a.length)]}function aI(a,b,c){let d=a.map(a=>({id:a.id,name:a.name,role:a.role,model:a.model,color:a.color,status:a.status,activity:a.activity,plan:a.plan,subAgents:a.subAgents,tasks:{queued:a.queued,running:a.running},cron:{count:a.cronCount,nextRunAtMs:a.cronNextAt,running:"cron"===a.status},lastActiveMs:a.lastActiveMs,isDefault:"atlas"===a.id,totalTokens:a.totalTokens})),e=a.flatMap(a=>Array.from({length:a.cronCount},(b,c)=>({id:`${a.id}-cron-${c}`,name:0===c?"heartbeat":`job-${c}`,agentId:a.id,enabled:!0,nextRunAtMs:a.cronNextAt+5e3*c,runningAtMs:"cron"===a.status&&0===c?Date.now():void 0,lastRunStatus:"ok"}))),f=a.flatMap(a=>{let b=[];for(let c=0;c<a.running;c++)b.push({id:`${a.id}-run-${c}`,agentId:a.id,label:a.activity?.title??"running",status:"running",startedAt:a.lastActiveMs});for(let c=0;c<a.queued;c++)b.push({id:`${a.id}-q-${c}`,agentId:a.id,label:"queued task",status:"queued"});return b});return f.push(...b),{agents:d,crons:e,tasks:f,connection:"mock",source:"mock",serverVersion:"mock",note:c,updatedAt:Date.now()}}let aJ=(0,c.default)(async()=>{},{loadableGenerated:{modules:[15697]},ssr:!1}),aK=(0,c.default)(async()=>{},{loadableGenerated:{modules:[52149]},ssr:!1}),aL={plan:"ClawCrib · building plan","3d":"ClawCrib · live agent building"};function aM(){let a="/demo"===(0,d.usePathname)(),c=function(){let[a,b]=(0,e.useState)(x.emptyTeamState);return(0,e.useEffect)(()=>{let a=null,c=null,d=!1,e=()=>{c?.stop(),c=null},f=a=>{c||(c=function(a,b={}){let c=Date.now(),d=aD.map((a,b)=>({...a,status:b%3==0?"tool":"idle",cronNextAt:c+4e3+Math.floor(Math.random()*a.cronEveryMs),subAgents:[],queued:Math.floor(3*Math.random()),running:+(b%3==0),lastActiveMs:c,totalTokens:1e3+Math.floor(9e4*Math.random())})),e=b.tickMs??1100,f=null,g=[];function h(a){g.push(a),g.length>8&&g.shift()}return a(aI(d,g,b.note)),f=setInterval(function(){let c=Date.now();for(let a of d){if(c>=a.cronNextAt){a.status="cron",a.cronNextAt=c+a.cronEveryMs,a.lastActiveMs=c,a.activity={title:"cron: heartbeat",kind:"command",since:c,status:"running"};continue}let b=Math.random();switch(a.status){case"idle":b<.28?(a.status="thinking",a.plan=aH(aG),a.lastActiveMs=c):b<.33&&(a.status="tool",a.activity={...aH(aE),since:c,status:"running"},a.running=Math.max(1,a.running),a.lastActiveMs=c);break;case"thinking":b<.55?(a.status="tool",a.activity={...aH(aE),since:c,status:"running"},a.running=Math.max(1,a.running)):b<.7&&(a.status="idle",a.plan=void 0),a.lastActiveMs=c,a.totalTokens+=200+Math.floor(600*Math.random());break;case"tool":a.totalTokens+=150+Math.floor(900*Math.random()),a.lastActiveMs=c,b<.18?a.subAgents.length<1&&(a.subAgents.push({id:`${a.id}-sub-${Math.floor(1e5*Math.random())}`,agentId:a.id,parentId:a.id,label:aH(aF),task:aH(aF),status:"tool",startedAt:c}),a.running+=1):b<.42?(a.status="thinking",a.activity=void 0):b<.5?(h({id:`${a.id}-done-${c}`,agentId:a.id,label:a.activity?.title??"task",status:"completed",startedAt:c}),a.status="idle",a.activity=void 0,a.plan=void 0,a.running=Math.max(0,a.running-1),a.queued=Math.max(0,a.queued-(.5>Math.random()))):b<.53&&(h({id:`${a.id}-fail-${c}`,agentId:a.id,label:a.activity?.title??"task",status:"failed",startedAt:c}),a.status="error",a.activity={title:"tool failed",kind:"tool",since:c,status:"failed"});break;case"cron":b<.6&&(a.status="idle",a.activity=void 0);break;case"error":b<.5&&(a.status="thinking",a.activity=void 0);break;default:a.status="idle"}a.subAgents.length&&.22>Math.random()&&(a.subAgents.shift(),a.running=Math.max(0,a.running-1)),.15>Math.random()&&(a.queued=Math.min(6,a.queued+1))}a(aI(d,g,b.note))},e),{stop:()=>{f&&clearInterval(f),f=null}}}(c=>b({...c,note:a}),{note:a}))};try{(a=new EventSource("/api/crib/stream")).onmessage=a=>{d=!0,e();try{b(JSON.parse(a.data))}catch{}},a.onerror=()=>{d||f("Live stream unavailable — local simulation")}}catch{f("Live stream unavailable — local simulation")}let g=setTimeout(()=>{d||f("Connecting…")},4e3);return()=>{clearTimeout(g),a?.close(),e()}},[]),a}(),{config:g,update:o,profiles:q,activeId:s,selectProfile:t,createProfile:u,deleteProfile:v,canAddProfile:w}=function(){let[a,b]=(0,e.useState)(()=>({version:1,activeId:null,profiles:[]})),[c,d]=(0,e.useState)(!1);(0,e.useEffect)(()=>{let a=!0;return(async()=>{let c=null;try{let a=await fetch(ai,{cache:"no-store"});a.ok&&(c=ak(await a.json()))}catch{}if(!c||0===c.profiles.length)try{let a=window.localStorage.getItem(ah);a&&(c=ak(JSON.parse(a)))}catch{}if(!c||0===c.profiles.length){let a=ad(),b=aj(a.buildingName||"ClawCrib",a);f(c={version:1,activeId:b.id,profiles:[b]})}a&&(b(c),d(!0))})(),()=>{a=!1}},[]);let f=(0,e.useCallback)(a=>{try{window.localStorage.setItem(ah,JSON.stringify(a))}catch{}fetch(ai,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).catch(()=>{})},[]),g=(0,e.useCallback)(a=>{b(a),f(a)},[f]),h=a.activeId,i=a.profiles.find(a=>a.id===h)??a.profiles[0],j=i?.config??ad(),k=(0,e.useCallback)(a=>{b(b=>{let c=b.profiles.find(a=>a.id===b.activeId)??b.profiles[0];if(!c)return b;let d="function"==typeof a?a(c.config):a,e=d.buildingName||c.name,g={...c,name:e,config:d,updatedAt:Date.now()},h={...b,profiles:b.profiles.map(a=>a.id===c.id?g:a)};return f(h),h})},[f]),l=(0,e.useCallback)(b=>g({...a,activeId:b}),[g,a]),m=(0,e.useCallback)(()=>{if(a.profiles.length>=3)return;let b=aj(`Building ${a.profiles.length+1}`);g({...a,activeId:b.id,profiles:[...a.profiles,b]})},[g,a]),n=(0,e.useCallback)(b=>{if(a.profiles.length<=1)return;let c=a.profiles.filter(a=>a.id!==b);g({version:1,activeId:a.activeId===b?c[0]?.id??null:a.activeId,profiles:c})},[g,a]);return{loaded:c,profiles:a.profiles,activeId:i?.id??null,config:j,update:k,selectProfile:l,createProfile:m,deleteProfile:n,canAddProfile:a.profiles.length<3}}(),[y,z]=(0,e.useState)("3d"),[A,B]=(0,e.useState)("dark"),[C,F]=(0,e.useState)(aB),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[K,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(!1),P=D(A),Q=!ae(g)&&"gateway"!==c.source,R=(0,e.useMemo)(()=>Q?{version:1,buildingName:"ClawCrib",rooms:[{id:"eng",name:"ENGINEERING",color:ac[0],order:0,rect:{x:-5,z:3.4,w:8.8,d:4.6},doorSide:"N"},{id:"research",name:"RESEARCH",color:ac[1],order:1,rect:{x:5,z:3.4,w:8.8,d:4.6},doorSide:"N"},{id:"studio",name:"STUDIO",color:ac[4],order:2,rect:{x:-5,z:9.3,w:8.8,d:4.6},doorSide:"N"},{id:"ops",name:"OPS",color:ac[3],order:3,rect:{x:5,z:9.3,w:8.8,d:4.6},doorSide:"N"}],assignments:{forge:"eng",bolt:"eng",patch:"eng",nova:"research",scout:"research",pixel:"studio",muse:"studio",echo:"ops",warden:"ops",vera:"ops"}}:g,[Q,g]);(0,e.useEffect)(()=>{let b=requestAnimationFrame(()=>{let b=window.localStorage.getItem("clawcrib:view");"plan"===b||"3d"===b?z(b):"2d"===b&&z("3d");let c=window.localStorage.getItem("clawcrib:theme");("light"===c||"dark"===c)&&B(c),F(function(a){if(!a)return aB;try{let b=JSON.parse(a);return{body:"string"==typeof b.body?b.body:aB.body,visor:"string"==typeof b.visor?b.visor:aB.visor,eyes:"string"==typeof b.eyes?b.eyes:aB.eyes}}catch{return aB}}(window.localStorage.getItem("clawcrib:botstyle"))),!a&&function(){try{return!window.localStorage.getItem(V)}catch{return!1}}()&&O(!0)});return()=>cancelAnimationFrame(b)},[a]);let S=a=>{F(b=>{let c={...b,...a};return window.localStorage.setItem("clawcrib:botstyle",JSON.stringify(c)),c})};return(0,b.jsxs)("div",{className:"relative h-[100dvh] w-full overflow-hidden",style:{background:P.pageBg},children:[(0,b.jsx)("div",{className:"absolute inset-0",children:"plan"===y?(0,b.jsx)(aJ,{state:c,config:R,theme:A}):(0,b.jsx)(aK,{state:c,config:R,theme:A,botStyle:C})}),(0,b.jsx)(L,{state:c}),(0,b.jsxs)("div",{className:"absolute right-4 top-4 z-20 flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:()=>O(!0),className:"flex items-center gap-1.5 rounded-full border border-white/10 bg-black/40 px-2.5 py-1.5 text-[13px] font-medium text-white/70 backdrop-blur-md transition-colors hover:text-white",style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"Open the tour",title:"Tour & setup",children:(0,b.jsx)(h,{size:15,strokeWidth:2.2})}),(0,b.jsx)("button",{onClick:()=>{B(a=>{let b="dark"===a?"light":"dark";return window.localStorage.setItem("clawcrib:theme",b),b})},className:"flex items-center gap-1.5 rounded-full border border-white/10 bg-black/40 px-2.5 py-1.5 text-[13px] font-medium text-white/70 backdrop-blur-md transition-colors hover:text-white",style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"dark"===A?"Switch to light mode":"Switch to dark mode",title:"dark"===A?"Light mode":"Dark mode",children:"dark"===A?(0,b.jsx)(p.Sun,{size:15,strokeWidth:2.2}):(0,b.jsx)(j.Moon,{size:15,strokeWidth:2.2})}),"3d"===y?(0,b.jsx)("button",{onClick:()=>{M(a=>!a),H(!1),J(!1)},className:`flex items-center gap-1.5 rounded-full border px-2.5 py-1.5 text-[13px] font-medium backdrop-blur-md transition-colors ${K?"border-white/20 bg-white/15 text-white":"border-white/10 bg-black/40 text-white/70 hover:text-white"}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-label":"Customize robot style",title:"Robot style","aria-pressed":K,children:(0,b.jsx)(f.Bot,{size:15,strokeWidth:2.2})}):null,"plan"===y?(0,b.jsxs)("button",{onClick:()=>{J(a=>!a),H(!1),M(!1)},className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-[13px] font-medium backdrop-blur-md transition-colors ${I?"border-white/20 bg-white/15 text-white":"border-white/10 bg-black/40 text-white/70 hover:text-white"}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-pressed":I,children:[(0,b.jsx)(l,{size:15,strokeWidth:2.2}),"Build"]}):null,(0,b.jsxs)("button",{onClick:()=>{H(a=>!a),J(!1),M(!1)},className:`flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-[13px] font-medium backdrop-blur-md transition-colors ${G?"border-white/20 bg-white/15 text-white":"border-white/10 bg-black/40 text-white/70 hover:text-white"}`,style:{boxShadow:"0 8px 30px rgba(0,0,0,0.45)"},"aria-pressed":G,children:[(0,b.jsx)(i.LayoutGrid,{size:15,strokeWidth:2.2}),"Organize"]}),(0,b.jsx)(az,{value:y,onChange:a=>{z(a),window.localStorage.setItem("clawcrib:view",a)}})]}),N?(0,b.jsx)(Y,{state:c,onClose:()=>O(!1)}):null,K&&"3d"===y?(0,b.jsx)(aO,{value:C,onChange:S,onReset:()=>S(aB),onClose:()=>M(!1)}):null,I&&"plan"===y?(0,b.jsx)(ar,{state:c,config:R,update:o,onClose:()=>J(!1)}):null,G?(0,b.jsx)(av,{state:c,config:R,update:o,profiles:q,activeId:s,selectProfile:t,createProfile:u,deleteProfile:v,canAddProfile:w,onClose:()=>H(!1)}):null,(0,b.jsx)(E,{state:c,theme:A}),(0,b.jsx)("div",{className:`pointer-events-none absolute bottom-4 left-4 z-10 flex flex-col gap-1.5 rounded-xl border px-3 py-2.5 backdrop-blur-md ${P.legendOnLight?"border-black/10 bg-white/70":"border-white/10 bg-black/45"}`,children:"3d"===y?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(m,{size:13}),action:"Drag",effect:"orbit camera"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(r,{size:13}),action:"Scroll",effect:"zoom in / out"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(k,{size:13}),action:"Right-drag",effect:"pan across the floor"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(k,{size:13}),action:"Drag",effect:"pan the floor plan"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(r,{size:13}),action:"Scroll",effect:"zoom in / out"}),(0,b.jsx)(aP,{dark:!P.legendOnLight,icon:(0,b.jsx)(n.RotateCcw,{size:13}),action:"Double-click",effect:"reset view"})]})}),(0,b.jsx)("div",{className:"pointer-events-none absolute bottom-3 left-1/2 z-10 -translate-x-1/2 text-[11px] tracking-wide",style:{color:P.caption,textShadow:P.legendOnLight?"0 1px 2px rgba(255,255,255,0.5)":"none"},children:aL[y]})]})}let aN=[{key:"body",label:"Body"},{key:"visor",label:"Visor"},{key:"eyes",label:"Eyes"}];function aO({value:a,onChange:c,onReset:d,onClose:e}){return(0,b.jsxs)("div",{className:"absolute right-4 top-16 z-30 w-64 rounded-2xl border border-white/10 bg-black/60 p-4 backdrop-blur-xl",style:{boxShadow:"0 12px 40px rgba(0,0,0,0.5)"},children:[(0,b.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-semibold text-white",children:[(0,b.jsx)(f.Bot,{size:15,strokeWidth:2.2}),"Robot style"]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("button",{onClick:d,className:"rounded-full p-1.5 text-white/50 transition-colors hover:text-white","aria-label":"Reset to default colors",title:"Reset",children:(0,b.jsx)(o,{size:13,strokeWidth:2.2})}),(0,b.jsx)("button",{onClick:e,className:"rounded-full p-1.5 text-white/50 transition-colors hover:text-white","aria-label":"Close",children:(0,b.jsx)(q.X,{size:14,strokeWidth:2.2})})]})]}),(0,b.jsx)("div",{className:"flex flex-col gap-3",children:aN.map(({key:d,label:e})=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wider text-white/40",children:e}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[aC[d].map(f=>(0,b.jsx)("button",{onClick:()=>c({[d]:f}),className:`h-6 w-6 rounded-full border transition-transform hover:scale-110 ${a[d].toLowerCase()===f.toLowerCase()?"border-white":"border-white/15"}`,style:{background:f},"aria-label":`${e} color ${f}`},f)),(0,b.jsx)("label",{className:"relative h-6 w-6 shrink-0 cursor-pointer overflow-hidden rounded-full border border-dashed border-white/30",title:"Custom color",style:{background:"conic-gradient(#ff6b81, #ffd166, #4cff9f, #39e6e0, #7c5cff, #ff6b81)"},children:(0,b.jsx)("input",{type:"color",value:a[d],onChange:a=>c({[d]:a.target.value}),className:"absolute inset-0 h-full w-full cursor-pointer opacity-0","aria-label":`Custom ${e.toLowerCase()} color`})})]})]},d))}),(0,b.jsx)("div",{className:"mt-3 text-[10px] leading-relaxed text-white/35",children:"Eye color shows while idle. Active agents glow with their status color."})]})}function aP({icon:a,action:c,effect:d,dark:e}){return(0,b.jsxs)("div",{className:"flex items-center gap-2 text-[11px] leading-none",children:[(0,b.jsx)("span",{className:e?"text-white/55":"text-[#3c4250]",children:a}),(0,b.jsx)("span",{className:e?"font-semibold text-white/90":"font-semibold text-[#262b36]",children:c}),(0,b.jsx)("span",{className:e?"text-white/55":"text-[#5a6172]",children:d})]})}a.s(["default",()=>aM],90660)}];
2
2
 
3
3
  //# sourceMappingURL=_e01a61c0._.js.map
@@ -18,7 +18,7 @@
18
18
  "wasm": [],
19
19
  "assets": [],
20
20
  "env": {
21
- "__NEXT_BUILD_ID": "zYUlp2fcVlJKBhUQk1Pns",
21
+ "__NEXT_BUILD_ID": "a1_F2n_Sn-m0Apxh748yG",
22
22
  "NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "8ZrXEelloqZZ7nTtdWJ+teLkDSpARmMiNV8aLazgn14=",
23
23
  "__NEXT_PREVIEW_MODE_ID": "02509e865579ab39129cd9b4d17782aa",
24
24
  "__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "9f2c79a3bbcf54098b396d2ec971eb25c92d3cac8200b07d3a8b19546c4c38e3",