openryoko 2026.7.10 → 2026.7.26

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 (105) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/cli/setup.js +1 -1
  3. package/dist/src/sessions/__tests__/engine-fallback-revert.test.d.ts +2 -0
  4. package/dist/src/sessions/__tests__/engine-fallback-revert.test.d.ts.map +1 -0
  5. package/dist/src/sessions/__tests__/engine-fallback-revert.test.js +109 -0
  6. package/dist/src/sessions/__tests__/engine-fallback-revert.test.js.map +1 -0
  7. package/dist/src/sessions/manager.d.ts +9 -1
  8. package/dist/src/sessions/manager.d.ts.map +1 -1
  9. package/dist/src/sessions/manager.js +43 -11
  10. package/dist/src/sessions/manager.js.map +1 -1
  11. package/dist/src/shared/__tests__/models.test.js +1 -0
  12. package/dist/src/shared/__tests__/models.test.js.map +1 -1
  13. package/dist/src/shared/models.js +1 -1
  14. package/dist/src/shared/models.js.map +1 -1
  15. package/dist/web/404.html +1 -1
  16. package/dist/web/__next.__PAGE__.txt +1 -1
  17. package/dist/web/__next._full.txt +1 -1
  18. package/dist/web/__next._head.txt +1 -1
  19. package/dist/web/__next._index.txt +1 -1
  20. package/dist/web/__next._tree.txt +1 -1
  21. package/dist/web/_next/static/chunks/{0y~qqhmf2o7pt.js → 0lt7kv1k1jla0.js} +1 -1
  22. package/dist/web/_next/static/chunks/0tcvgwr3rcw29.js +1 -0
  23. package/dist/web/_not-found/__next._full.txt +1 -1
  24. package/dist/web/_not-found/__next._head.txt +1 -1
  25. package/dist/web/_not-found/__next._index.txt +1 -1
  26. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
  27. package/dist/web/_not-found/__next._not-found.txt +1 -1
  28. package/dist/web/_not-found/__next._tree.txt +1 -1
  29. package/dist/web/_not-found.html +1 -1
  30. package/dist/web/_not-found.txt +1 -1
  31. package/dist/web/chat/__next._full.txt +1 -1
  32. package/dist/web/chat/__next._head.txt +1 -1
  33. package/dist/web/chat/__next._index.txt +1 -1
  34. package/dist/web/chat/__next._tree.txt +1 -1
  35. package/dist/web/chat/__next.chat.__PAGE__.txt +1 -1
  36. package/dist/web/chat/__next.chat.txt +1 -1
  37. package/dist/web/chat.html +1 -1
  38. package/dist/web/chat.txt +1 -1
  39. package/dist/web/cron/__next._full.txt +1 -1
  40. package/dist/web/cron/__next._head.txt +1 -1
  41. package/dist/web/cron/__next._index.txt +1 -1
  42. package/dist/web/cron/__next._tree.txt +1 -1
  43. package/dist/web/cron/__next.cron.__PAGE__.txt +1 -1
  44. package/dist/web/cron/__next.cron.txt +1 -1
  45. package/dist/web/cron.html +1 -1
  46. package/dist/web/cron.txt +1 -1
  47. package/dist/web/index.html +1 -1
  48. package/dist/web/index.txt +1 -1
  49. package/dist/web/kanban/__next._full.txt +1 -1
  50. package/dist/web/kanban/__next._head.txt +1 -1
  51. package/dist/web/kanban/__next._index.txt +1 -1
  52. package/dist/web/kanban/__next._tree.txt +1 -1
  53. package/dist/web/kanban/__next.kanban.__PAGE__.txt +1 -1
  54. package/dist/web/kanban/__next.kanban.txt +1 -1
  55. package/dist/web/kanban.html +1 -1
  56. package/dist/web/kanban.txt +1 -1
  57. package/dist/web/logs/__next._full.txt +1 -1
  58. package/dist/web/logs/__next._head.txt +1 -1
  59. package/dist/web/logs/__next._index.txt +1 -1
  60. package/dist/web/logs/__next._tree.txt +1 -1
  61. package/dist/web/logs/__next.logs.__PAGE__.txt +1 -1
  62. package/dist/web/logs/__next.logs.txt +1 -1
  63. package/dist/web/logs.html +1 -1
  64. package/dist/web/logs.txt +1 -1
  65. package/dist/web/org/__next._full.txt +2 -2
  66. package/dist/web/org/__next._head.txt +1 -1
  67. package/dist/web/org/__next._index.txt +1 -1
  68. package/dist/web/org/__next._tree.txt +1 -1
  69. package/dist/web/org/__next.org.__PAGE__.txt +2 -2
  70. package/dist/web/org/__next.org.txt +1 -1
  71. package/dist/web/org.html +1 -1
  72. package/dist/web/org.txt +2 -2
  73. package/dist/web/sessions/__next._full.txt +1 -1
  74. package/dist/web/sessions/__next._head.txt +1 -1
  75. package/dist/web/sessions/__next._index.txt +1 -1
  76. package/dist/web/sessions/__next._tree.txt +1 -1
  77. package/dist/web/sessions/__next.sessions.__PAGE__.txt +1 -1
  78. package/dist/web/sessions/__next.sessions.txt +1 -1
  79. package/dist/web/sessions.html +1 -1
  80. package/dist/web/sessions.txt +1 -1
  81. package/dist/web/settings/__next._full.txt +2 -2
  82. package/dist/web/settings/__next._head.txt +1 -1
  83. package/dist/web/settings/__next._index.txt +1 -1
  84. package/dist/web/settings/__next._tree.txt +1 -1
  85. package/dist/web/settings/__next.settings.__PAGE__.txt +2 -2
  86. package/dist/web/settings/__next.settings.txt +1 -1
  87. package/dist/web/settings.html +1 -1
  88. package/dist/web/settings.txt +2 -2
  89. package/dist/web/skills/__next._full.txt +1 -1
  90. package/dist/web/skills/__next._head.txt +1 -1
  91. package/dist/web/skills/__next._index.txt +1 -1
  92. package/dist/web/skills/__next._tree.txt +1 -1
  93. package/dist/web/skills/__next.skills.__PAGE__.txt +1 -1
  94. package/dist/web/skills/__next.skills.txt +1 -1
  95. package/dist/web/skills.html +1 -1
  96. package/dist/web/skills.txt +1 -1
  97. package/package.json +1 -1
  98. package/template/CLAUDE.md +1 -1
  99. package/template/config.default.yaml +4 -1
  100. package/template/migrations/2026.7.25/MIGRATION.md +69 -0
  101. package/template/migrations/2026.7.25/config-patch.json +3 -0
  102. package/dist/web/_next/static/chunks/04wkiqo1hhxd0.js +0 -1
  103. /package/dist/web/_next/static/{hhYAL7ZMLLlvTxKXXOGJ6 → UDwWEfKiZ-eIOpfOIPKQr}/_buildManifest.js +0 -0
  104. /package/dist/web/_next/static/{hhYAL7ZMLLlvTxKXXOGJ6 → UDwWEfKiZ-eIOpfOIPKQr}/_clientMiddlewareManifest.js +0 -0
  105. /package/dist/web/_next/static/{hhYAL7ZMLLlvTxKXXOGJ6 → UDwWEfKiZ-eIOpfOIPKQr}/_ssgManifest.js +0 -0
package/dist/web/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/_next/static/chunks/103zsy0q9psfj.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/17-u9c_weg12-.js"/><script src="/_next/static/chunks/10l08hq.acixl.js" async=""></script><script src="/_next/static/chunks/0ru56x83x4rkk.js" async=""></script><script src="/_next/static/chunks/turbopack-0dt987bw_1nyf.js" async=""></script><script src="/_next/static/chunks/0y3dnnq~kxyz_.js" async=""></script><script src="/_next/static/chunks/14ge_q22f0n.f.js" async=""></script><script src="/_next/static/chunks/0~6m1p5hnsx2f.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>OpenRyoko</title><meta name="description" content="OpenRyoko — Slackで空気を読んで働くAIゲートウェイ"/><link rel="icon" href="/icon.jpg?icon.0.wpl4.d-5bkf.jpg" sizes="800x800" type="image/jpeg"/><link rel="apple-touch-icon" href="/apple-icon.jpg?apple-icon.0.wpl4.d-5bkf.jpg" sizes="800x800" type="image/jpeg"/><script>(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()</script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/17-u9c_weg12-.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[3971,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"ClientProviders\"]\n3:I[87979,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"default\"]\n4:I[35855,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"default\"]\n5:I[84459,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n9:I[84459,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"ViewportBoundary\"]\nb:I[84459,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"MetadataBoundary\"]\nd:I[2565,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/103zsy0q9psfj.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/103zsy0q9psfj.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/14ge_q22f0n.f.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0~6m1p5hnsx2f.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ja\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,null]},null,false,\"$@8\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lc\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/103zsy0q9psfj.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"hhYAL7ZMLLlvTxKXXOGJ6\"}\n"])</script><script>self.__next_f.push([1,"e:[]\n8:\"$We\"\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}]]\n"])</script><script>self.__next_f.push([1,"f:I[93236,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"IconMark\"]\n7:null\nc:[[\"$\",\"title\",\"0\",{\"children\":\"OpenRyoko\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"OpenRyoko — Slackで空気を読んで働くAIゲートウェイ\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.jpg?icon.0.wpl4.d-5bkf.jpg\",\"sizes\":\"800x800\",\"type\":\"image/jpeg\"}],[\"$\",\"link\",\"3\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon.jpg?apple-icon.0.wpl4.d-5bkf.jpg\",\"sizes\":\"800x800\",\"type\":\"image/jpeg\"}],[\"$\",\"$Lf\",\"4\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/_next/static/chunks/103zsy0q9psfj.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/17-u9c_weg12-.js"/><script src="/_next/static/chunks/10l08hq.acixl.js" async=""></script><script src="/_next/static/chunks/0ru56x83x4rkk.js" async=""></script><script src="/_next/static/chunks/turbopack-0dt987bw_1nyf.js" async=""></script><script src="/_next/static/chunks/0y3dnnq~kxyz_.js" async=""></script><script src="/_next/static/chunks/14ge_q22f0n.f.js" async=""></script><script src="/_next/static/chunks/0~6m1p5hnsx2f.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>OpenRyoko</title><meta name="description" content="OpenRyoko — Slackで空気を読んで働くAIゲートウェイ"/><link rel="icon" href="/icon.jpg?icon.0.wpl4.d-5bkf.jpg" sizes="800x800" type="image/jpeg"/><link rel="apple-touch-icon" href="/apple-icon.jpg?apple-icon.0.wpl4.d-5bkf.jpg" sizes="800x800" type="image/jpeg"/><script>(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()</script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/17-u9c_weg12-.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[3971,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"ClientProviders\"]\n3:I[87979,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"default\"]\n4:I[35855,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"default\"]\n5:I[84459,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n9:I[84459,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"ViewportBoundary\"]\nb:I[84459,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"MetadataBoundary\"]\nd:I[2565,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/103zsy0q9psfj.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/103zsy0q9psfj.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/14ge_q22f0n.f.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/_next/static/chunks/0~6m1p5hnsx2f.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ja\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()\"}}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,null]},null,false,\"$@8\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lc\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/103zsy0q9psfj.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"UDwWEfKiZ-eIOpfOIPKQr\"}\n"])</script><script>self.__next_f.push([1,"e:[]\n8:\"$We\"\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}]]\n"])</script><script>self.__next_f.push([1,"f:I[93236,[\"/_next/static/chunks/0y3dnnq~kxyz_.js\",\"/_next/static/chunks/14ge_q22f0n.f.js\",\"/_next/static/chunks/0~6m1p5hnsx2f.js\"],\"IconMark\"]\n7:null\nc:[[\"$\",\"title\",\"0\",{\"children\":\"OpenRyoko\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"OpenRyoko — Slackで空気を読んで働くAIゲートウェイ\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.jpg?icon.0.wpl4.d-5bkf.jpg\",\"sizes\":\"800x800\",\"type\":\"image/jpeg\"}],[\"$\",\"link\",\"3\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon.jpg?apple-icon.0.wpl4.d-5bkf.jpg\",\"sizes\":\"800x800\",\"type\":\"image/jpeg\"}],[\"$\",\"$Lf\",\"4\",{}]]\n"])</script></body></html>
@@ -3,7 +3,7 @@
3
3
  3:I[28542,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js","/_next/static/chunks/12_uxtnrqhoo1.js","/_next/static/chunks/0jzw1gpuag8bc.js"],"default"]
4
4
  6:I[84459,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js"],"OutletBoundary"]
5
5
  7:"$Sreact.suspense"
6
- 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/12_uxtnrqhoo1.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0jzw1gpuag8bc.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"hhYAL7ZMLLlvTxKXXOGJ6"}
6
+ 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/12_uxtnrqhoo1.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0jzw1gpuag8bc.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"UDwWEfKiZ-eIOpfOIPKQr"}
7
7
  4:{}
8
8
  5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
9
9
  8:null
@@ -10,7 +10,7 @@ c:I[84459,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q2
10
10
  e:I[84459,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js"],"MetadataBoundary"]
11
11
  10:I[2565,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js"],"default",1]
12
12
  :HL["/_next/static/chunks/103zsy0q9psfj.css","style"]
13
- 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/103zsy0q9psfj.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0y3dnnq~kxyz_.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/14ge_q22f0n.f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0~6m1p5hnsx2f.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"ja","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()"}}]}],["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/12_uxtnrqhoo1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0jzw1gpuag8bc.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/103zsy0q9psfj.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"hhYAL7ZMLLlvTxKXXOGJ6"}
13
+ 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/103zsy0q9psfj.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0y3dnnq~kxyz_.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/14ge_q22f0n.f.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0~6m1p5hnsx2f.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"ja","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()"}}]}],["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/12_uxtnrqhoo1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0jzw1gpuag8bc.js","async":true,"nonce":"$undefined"}]],["$","$L9",null,{"children":["$","$a",null,{"name":"Next.MetadataOutlet","children":"$@b"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lc",null,{"children":"$Ld"}],["$","div",null,{"hidden":true,"children":["$","$Le",null,{"children":["$","$a",null,{"name":"Next.Metadata","children":"$Lf"}]}]}],null]}],false]],"m":"$undefined","G":["$10",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/103zsy0q9psfj.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"UDwWEfKiZ-eIOpfOIPKQr"}
14
14
  7:{}
15
15
  8:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
16
16
  d:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]
@@ -3,4 +3,4 @@
3
3
  3:I[84459,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js"],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[93236,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js"],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"OpenRyoko"}],["$","meta","1",{"name":"description","content":"OpenRyoko — Slackで空気を読んで働くAIゲートウェイ"}],["$","link","2",{"rel":"icon","href":"/icon.jpg?icon.0.wpl4.d-5bkf.jpg","sizes":"800x800","type":"image/jpeg"}],["$","link","3",{"rel":"apple-touch-icon","href":"/apple-icon.jpg?apple-icon.0.wpl4.d-5bkf.jpg","sizes":"800x800","type":"image/jpeg"}],["$","$L5","4",{}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"hhYAL7ZMLLlvTxKXXOGJ6"}
6
+ 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"OpenRyoko"}],["$","meta","1",{"name":"description","content":"OpenRyoko — Slackで空気を読んで働くAIゲートウェイ"}],["$","link","2",{"rel":"icon","href":"/icon.jpg?icon.0.wpl4.d-5bkf.jpg","sizes":"800x800","type":"image/jpeg"}],["$","link","3",{"rel":"apple-touch-icon","href":"/apple-icon.jpg?apple-icon.0.wpl4.d-5bkf.jpg","sizes":"800x800","type":"image/jpeg"}],["$","$L5","4",{}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"UDwWEfKiZ-eIOpfOIPKQr"}
@@ -3,4 +3,4 @@
3
3
  3:I[87979,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js"],"default"]
4
4
  4:I[35855,["/_next/static/chunks/0y3dnnq~kxyz_.js","/_next/static/chunks/14ge_q22f0n.f.js","/_next/static/chunks/0~6m1p5hnsx2f.js"],"default"]
5
5
  :HL["/_next/static/chunks/103zsy0q9psfj.css","style"]
6
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/103zsy0q9psfj.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0y3dnnq~kxyz_.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/14ge_q22f0n.f.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/0~6m1p5hnsx2f.js","async":true}]],["$","html",null,{"lang":"ja","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()"}}]}],["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"hhYAL7ZMLLlvTxKXXOGJ6"}
6
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/103zsy0q9psfj.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0y3dnnq~kxyz_.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/14ge_q22f0n.f.js","async":true}],["$","script","script-2",{"src":"/_next/static/chunks/0~6m1p5hnsx2f.js","async":true}]],["$","html",null,{"lang":"ja","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var t=localStorage.getItem('openryoko-theme')||localStorage.getItem('jinn-theme')||'ryoko';if(t==='system'){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'ryoko'}document.documentElement.setAttribute('data-theme',t)}catch(e){}})()"}}]}],["$","body",null,{"children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"UDwWEfKiZ-eIOpfOIPKQr"}
@@ -1,2 +1,2 @@
1
1
  :HL["/_next/static/chunks/103zsy0q9psfj.css","style"]
2
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"hhYAL7ZMLLlvTxKXXOGJ6"}
2
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"UDwWEfKiZ-eIOpfOIPKQr"}
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4863,e=>{"use strict";var t=e.i(98181),r=e.i(47899);e.s(["Card",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",e),...a})}])},13830,e=>{"use strict";let t=["🦊","🐼","🦉","🐙","🦈","🐺","🦁","🐯","🐸","🦋","🐝","🦜","🐬","🦩","🦚","🐻","🐨","🦇","🐳","🐧","🤖","👾","🎃","👻","🦄","🐲","🧙","🧛","🧟","🥷","🌵","🍄","🌻","🌊","⚡","🔥","❄️","🌈","💎","🪐","🍕","🌮","🍩","🧁","🍣","🥑","🍉","🫐","🥥","🍋","🎯","🎸","🎮","🏆","🚀","⚔️","🛡️","🧲","🎪","🎭","🦾","🧿","🪬","🫧","🧊","🪸","🦑","🦞","🪷","🪻"];e.s(["EMOJI_POOL",0,t,"emojiForName",0,function(e){if(!e)return t[0];let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t[Math.abs(r)%t.length]}])},81377,e=>{"use strict";var t=e.i(98181),r=e.i(36668),a=e.i(13830);e.s(["EmployeeAvatar",0,function({name:e,size:n=32,className:s,onClick:i}){let{settings:l}=(0,r.useSettings)(),o=e?l.employeeOverrides[e]:void 0,c=o?.emoji||(0,a.emojiForName)(e||""),d=Math.round(.6*n);return(0,t.jsx)("span",{className:s,onClick:i,role:i?"button":void 0,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:n,height:n,fontSize:d,lineHeight:1,borderRadius:"50%",flexShrink:0,cursor:i?"pointer":void 0,userSelect:"none"},children:c})}])},39402,55737,21583,e=>{"use strict";var t=e.i(25007),r=e.i(63949),a=e.i(80011),n=e.i(66379),s=e.i(39202),i=e.i(98181);function l(e){let r=e+"CollectionProvider",[l,o]=(0,a.createContextScope)(r),[c,d]=l(r,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:a}=e,n=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:r,itemMap:s,collectionRef:n,children:a})};u.displayName=r;let p=e+"CollectionSlot",x=(0,s.createSlot)(p),m=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,s=d(p,r),l=(0,n.useComposedRefs)(t,s.collectionRef);return(0,i.jsx)(x,{ref:l,children:a})});m.displayName=p;let v=e+"CollectionItemSlot",f="data-radix-collection-item",h=(0,s.createSlot)(v),g=t.default.forwardRef((e,r)=>{let{scope:a,children:s,...l}=e,o=t.default.useRef(null),c=(0,n.useComposedRefs)(r,o),u=d(v,a);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...l}),()=>void u.itemMap.delete(o))),(0,i.jsx)(h,{...{[f]:""},ref:c,children:s})});return g.displayName=v,[{Provider:u,Slot:m,ItemSlot:g},function(r){let a=d(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=a.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(a.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[a.collectionRef,a.itemMap])},o]}var o=new WeakMap;function c(e,t){var r,a;let n,s,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,a=t,n=r.length,(i=(s=d(a))>=0?s:n+s)<0||i>=n?-1:i);return -1===l?void 0:e[l]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let a,n=this.has(t),s=this.#e.length,i=d(e),l=i>=0?i:s+i,o=l<0||l>=s?-1:l;if(o===this.size||n&&o===this.size-1||-1===o)return this.set(t,r),this;let c=this.size+ +!n;i<0&&l++;let u=[...this.#e],p=!1;for(let e=l;e<c;e++)if(l===e){let s=u[e];u[e]===t&&(s=u[e+1]),n&&this.delete(t),a=this.get(s),this.set(t,r)}else{p||u[e-1]!==t||(p=!0);let r=u[p?e:e-1],n=a;a=this.get(r),this.delete(r),this.set(r,n)}return this}with(t,r,a){let n=new e(this);return n.insert(t,r,a),n}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=c(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=c(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return c(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let a=r+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let a=r+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return a;r++}}findIndex(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return r;r++}return -1}filter(t,r){let a=[],n=0;for(let e of this)Reflect.apply(t,r,[e,n,this])&&a.push(e),n++;return new e(a)}map(t,r){let a=[],n=0;for(let e of this)a.push([e[0],Reflect.apply(t,r,[e,n,this])]),n++;return new e(a)}reduce(...e){let[t,r]=e,a=0,n=r??this.at(0);for(let r of this)n=0===a&&1===e.length?r:Reflect.apply(t,this,[n,r,a,this]),a++;return n}reduceRight(...e){let[t,r]=e,a=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let n=this.at(r);a=r===this.size-1&&1===e.length?n:Reflect.apply(t,this,[a,n,r,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),a=this.get(r);t.set(r,a)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let a=new e,n=this.size-1;if(void 0===t)return a;t<0&&(t+=this.size),void 0!==r&&r>0&&(n=r-1);for(let e=t;e<=n;e++){let t=this.keyAt(e),r=this.get(t);a.set(t,r)}return a}every(e,t){let r=0;for(let a of this){if(!Reflect.apply(e,t,[a,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,l],55737);var u=e.i(28509),p=e.i(16393),x=e.i(94080),m=e.i(87782),v=t.createContext(void 0);function f(e){let r=t.useContext(v);return e||r||"ltr"}e.s(["useDirection",0,f],21583);var h="rovingFocusGroup.onEntryFocus",g={bubbles:!1,cancelable:!0},y="RovingFocusGroup",[b,j,w]=l(y),[N,k]=(0,a.createContextScope)(y,[w]),[C,S]=N(y),R=t.forwardRef((e,t)=>(0,i.jsx)(b.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(b.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(T,{...e,ref:t})})}));R.displayName=y;var T=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:s,orientation:l,loop:o=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:v,onEntryFocus:b,preventScrollOnEntryFocus:w=!1,...N}=e,k=t.useRef(null),S=(0,n.useComposedRefs)(a,k),R=f(c),[T,E]=(0,m.useControllableState)({prop:d,defaultProp:u??null,onChange:v,caller:y}),[A,P]=t.useState(!1),O=(0,x.useCallbackRef)(b),z=j(s),I=t.useRef(!1),[L,F]=t.useState(0);return t.useEffect(()=>{let e=k.current;if(e)return e.addEventListener(h,O),()=>e.removeEventListener(h,O)},[O]),(0,i.jsx)(C,{scope:s,orientation:l,dir:R,loop:o,currentTabStopId:T,onItemFocus:t.useCallback(e=>E(e),[E]),onItemShiftTab:t.useCallback(()=>P(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,i.jsx)(p.Primitive.div,{tabIndex:A||0===L?-1:0,"data-orientation":l,...N,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{I.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!I.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(h,g);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=z().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),w)}}I.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>P(!1))})})}),E="RovingFocusGroupItem",A=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:n,focusable:s=!0,active:l=!1,tabStopId:o,children:c,...d}=e,x=(0,u.useId)(),m=o||x,v=S(E,n),f=v.currentTabStopId===m,h=j(n),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:w}=v;return t.useEffect(()=>{if(s)return g(),()=>y()},[s,g,y]),(0,i.jsx)(b.ItemSlot,{scope:n,id:m,focusable:s,active:l,children:(0,i.jsx)(p.Primitive.span,{tabIndex:f?0:-1,"data-orientation":v.orientation,...d,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{s?v.onItemFocus(m):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(m)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var a;let n=(a=e.key,"rtl"!==r?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return P[n]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){var r,a;"prev"===t&&n.reverse();let s=n.indexOf(e.currentTarget);n=v.loop?(r=n,a=s+1,r.map((e,t)=>r[(a+t)%r.length])):n.slice(s+1)}setTimeout(()=>M(n))}}),children:"function"==typeof c?c({isCurrentTabStop:f,hasTabStop:null!=w}):c})})});A.displayName=E;var P={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function M(e,t=!1){let r=document.activeElement;for(let a of e)if(a===r||(a.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",0,A,"Root",0,R,"createRovingFocusGroupScope",0,k],39402)},57270,e=>{"use strict";var t=e.i(98181),r=e.i(9148),a=e.i(25007),n=e.i(63949),s=e.i(80011),i=e.i(39402),l=e.i(69113),o=e.i(16393),c=e.i(21583),d=e.i(87782),u=e.i(28509),p="Tabs",[x,m]=(0,s.createContextScope)(p,[i.createRovingFocusGroupScope]),v=(0,i.createRovingFocusGroupScope)(),[f,h]=x(p),g=a.forwardRef((e,r)=>{let{__scopeTabs:a,value:n,onValueChange:s,defaultValue:i,orientation:l="horizontal",dir:x,activationMode:m="automatic",...v}=e,h=(0,c.useDirection)(x),[g,y]=(0,d.useControllableState)({prop:n,onChange:s,defaultProp:i??"",caller:p});return(0,t.jsx)(f,{scope:a,baseId:(0,u.useId)(),value:g,onValueChange:y,orientation:l,dir:h,activationMode:m,children:(0,t.jsx)(o.Primitive.div,{dir:h,"data-orientation":l,...v,ref:r})})});g.displayName=p;var y="TabsList",b=a.forwardRef((e,r)=>{let{__scopeTabs:a,loop:n=!0,...s}=e,l=h(y,a),c=v(a);return(0,t.jsx)(i.Root,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:n,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...s,ref:r})})});b.displayName=y;var j="TabsTrigger",w=a.forwardRef((e,r)=>{let{__scopeTabs:a,value:s,disabled:l=!1,...c}=e,d=h(j,a),u=v(a),p=C(d.baseId,s),x=S(d.baseId,s),m=s===d.value;return(0,t.jsx)(i.Item,{asChild:!0,...u,focusable:!l,active:m,children:(0,t.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":x,"data-state":m?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:p,...c,ref:r,onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(s)}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(s)}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;m||l||!e||d.onValueChange(s)})})})});w.displayName=j;var N="TabsContent",k=a.forwardRef((e,r)=>{let{__scopeTabs:n,value:s,forceMount:i,children:c,...d}=e,u=h(N,n),p=C(u.baseId,s),x=S(u.baseId,s),m=s===u.value,v=a.useRef(m);return a.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(l.Presence,{present:i||m,children:({present:a})=>(0,t.jsx)(o.Primitive.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":p,hidden:!a,id:x,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:v.current?"0s":void 0},children:a&&c})})});function C(e,t){return`${e}-trigger-${t}`}function S(e,t){return`${e}-content-${t}`}k.displayName=N,e.s(["Content",0,k,"List",0,b,"Root",0,g,"Tabs",0,g,"TabsContent",0,k,"TabsList",0,b,"TabsTrigger",0,w,"Trigger",0,w,"createTabsScope",0,m],93200);var R=e.i(93200),R=R,T=e.i(47899);let E=(0,r.cva)("rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:r="horizontal",...a}){return(0,t.jsx)(R.Root,{"data-slot":"tabs","data-orientation":r,orientation:r,className:(0,T.cn)("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...a})},"TabsContent",0,function({className:e,...r}){return(0,t.jsx)(R.Content,{"data-slot":"tabs-content",className:(0,T.cn)("flex-1 outline-none",e),...r})},"TabsList",0,function({className:e,variant:r="default",...a}){return(0,t.jsx)(R.List,{"data-slot":"tabs-list","data-variant":r,className:(0,T.cn)(E({variant:r}),e),...a})},"TabsTrigger",0,function({className:e,...r}){return(0,t.jsx)(R.Trigger,{"data-slot":"tabs-trigger",className:(0,T.cn)("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...r})}],57270)},47352,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let a=e.r(74878);function n({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},92282,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67689,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(98181),n=e.r(39150),s=e.r(9557),i=e.r(92282),l=e.r(80746);function o({moduleIds:e}){if("u">typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,n.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},10465,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let a=e.r(98181),n=e.r(25007),s=e.r(47352),i=e.r(67689);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,n.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?n.Suspense:n.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},87751,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let a=e.r(60244)._(e.r(10465));function n(e,t){let r={};"function"==typeof e&&(r.loader=e);let n={...r,...t};return(0,a.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},25064,e=>{"use strict";var t=e.i(98181),r=e.i(25007),a=e.i(87751),n=e.i(93716),s=e.i(81377),i=e.i(36668),l=e.i(13830),o=e.i(52053);function c({rank:e}){let r={executive:{bg:"color-mix(in srgb, var(--system-purple) 15%, transparent)",text:"var(--system-purple)"},manager:{bg:"color-mix(in srgb, var(--system-blue) 15%, transparent)",text:"var(--system-blue)"},senior:{bg:"color-mix(in srgb, var(--system-green) 15%, transparent)",text:"var(--system-green)"},employee:{bg:"var(--fill-tertiary)",text:"var(--text-tertiary)"}},a=r[e]||r.employee;return(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] px-[10px] py-[2px] rounded-[10px] uppercase tracking-[0.02em]",style:{color:a.text,background:a.bg},children:e})}function d({name:e,prefetched:a}){let[u,p]=(0,r.useState)(a??null),[x,m]=(0,r.useState)([]),[v,f]=(0,r.useState)(!a),[h,g]=(0,r.useState)(null),[y,b]=(0,r.useState)(!1),[j,w]=(0,r.useState)(!1),{settings:N,setEmployeeOverride:k}=(0,i.useSettings)();if((0,r.useEffect)(()=>{if(b(!1),a){p(a),f(!0),g(null),n.api.getSessions().then(t=>{m(t.filter(t=>t.employee===e||!t.employee&&e===a.name).slice(0,10))}).catch(()=>m([])).finally(()=>f(!1));return}f(!0),g(null),Promise.all([n.api.getEmployee(e),n.api.getSessions()]).then(([t,r])=>{p(t),m(r.filter(t=>t.employee===e).slice(0,10))}).catch(e=>g(e.message)).finally(()=>f(!1))},[e,a]),v)return(0,t.jsx)("div",{className:"flex items-center justify-center h-64 text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."});if(h)return(0,t.jsxs)("div",{className:"rounded-[var(--radius-md,12px)] px-[var(--space-4)] py-[var(--space-3)] text-[length:var(--text-caption1)] text-[var(--system-red)]",style:{background:"color-mix(in srgb, var(--system-red) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--system-red) 30%, transparent)"},children:["Failed to load employee: ",h]});if(!u)return null;let C=u.rank||"employee",S=u.persona||"",R=N.employeeOverrides[u.name]?.emoji||(0,l.emojiForName)(u.name),T=S.length>200&&!y?S.slice(0,200)+"...":S;return(0,t.jsxs)("div",{className:"flex flex-col gap-[var(--space-6)]",children:[(0,t.jsxs)("div",{className:"rounded-[var(--radius-lg,16px)] border border-[var(--separator)] bg-[var(--material-regular)] p-[var(--space-6)]",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-[var(--space-4)]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-[var(--space-3)]",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(s.EmployeeAvatar,{name:u.name,size:36,onClick:()=>w(!j)}),j&&(0,t.jsx)(o.EmojiPicker,{current:R,onSelect:e=>{k(u.name,{emoji:e===(0,l.emojiForName)(u.name)?void 0:e}),w(!1)},onClose:()=>w(!1)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-[length:var(--text-title2)] font-[var(--weight-bold)] tracking-[var(--tracking-tight)] text-[var(--text-primary)] m-0",children:u.displayName||u.name}),(0,t.jsx)("p",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mt-[2px] mb-0 ml-0 mr-0 font-[family-name:var(--font-mono)]",children:u.name})]})]}),(0,t.jsx)(c,{rank:C})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-[var(--space-4)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Department"}),(0,t.jsx)("p",{className:"text-[length:var(--text-body)] text-[var(--text-primary)] m-0",children:u.department||"None"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Engine"}),(0,t.jsxs)("p",{className:"text-[length:var(--text-body)] text-[var(--text-primary)] m-0",children:[u.engine||"claude"," ",(0,t.jsxs)("span",{className:"text-[var(--text-tertiary)]",children:["/ ",u.model||"default"]})]})]})]}),(0,t.jsxs)("div",{className:"mt-[var(--space-4)] pt-[var(--space-4)] border-t border-[var(--separator)] flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Notify on completion"}),(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] m-0",children:"Notify parent session when this employee finishes"})]}),(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":!1!==u.alwaysNotify,onClick:async()=>{let e=!1===u.alwaysNotify;p({...u,alwaysNotify:e});try{await n.api.updateEmployee(u.name,{alwaysNotify:e})}catch{p({...u,alwaysNotify:!e})}},className:"relative inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer rounded-full border-none transition-colors duration-200 ease-in-out focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--accent)]",style:{background:!1!==u.alwaysNotify?"var(--accent, var(--system-green))":"var(--fill-tertiary)"},children:(0,t.jsx)("span",{className:"pointer-events-none inline-block h-[20px] w-[20px] rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",style:{transform:!1!==u.alwaysNotify?"translate(22px, 2px)":"translate(2px, 2px)"}})})]}),S&&(0,t.jsxs)("div",{className:"mt-[var(--space-4)] pt-[var(--space-4)] border-t border-[var(--separator)]",children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Persona"}),(0,t.jsx)("p",{className:"text-[length:var(--text-body)] text-[var(--text-secondary)] leading-[var(--leading-relaxed)] whitespace-pre-wrap m-0",children:T}),S.length>200&&(0,t.jsx)("button",{onClick:()=>b(!y),className:"text-[length:var(--text-caption1)] text-[var(--accent)] bg-none border-none cursor-pointer p-0 mt-[var(--space-1)]",children:y?"Show less":"Show more"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] tracking-[var(--tracking-wide)] uppercase text-[var(--text-tertiary)] mb-[var(--space-3)]",children:"Recent Sessions"}),0===x.length?(0,t.jsx)("p",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)] text-center py-[var(--space-6)] px-0",children:"No sessions found for this employee."}):(0,t.jsx)("div",{className:"rounded-[var(--radius-lg,16px)] border border-[var(--separator)] bg-[var(--material-regular)] overflow-hidden",children:x.map((e,r)=>(0,t.jsxs)("div",{className:`px-[var(--space-5)] py-[var(--space-3)] flex items-center justify-between${r>0?" border-t border-[var(--separator)]":""}`,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-body)] font-[family-name:var(--font-mono)] text-[var(--text-primary)] m-0",children:e.id.slice(0,8)}),(0,t.jsxs)("p",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-[2px]",children:[e.source||"unknown"," ",e.createdAt?new Date(e.createdAt).toLocaleDateString():""]})]}),(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] py-[2px] px-[8px] rounded-[10px]",style:"running"===e.status?{background:"color-mix(in srgb, var(--system-green) 15%, transparent)",color:"var(--system-green)"}:"error"===e.status?{background:"color-mix(in srgb, var(--system-red) 15%, transparent)",color:"var(--system-red)"}:{background:"var(--fill-tertiary)",color:"var(--text-tertiary)"},children:e.status||"idle"})]},e.id))})]})]})}var u=e.i(4863);function p({employee:e,selected:r,onSelect:a}){return(0,t.jsxs)("button",{onClick:a,className:`flex items-center gap-[var(--space-3)] px-[var(--space-4)] py-[var(--space-3)] rounded-[var(--radius-md,12px)] bg-[var(--material-regular)] cursor-pointer w-full text-left transition-all duration-150 ease-in-out ${r?"border-[1.5px] border-[var(--accent)]":"border border-[var(--separator)]"}`,style:{boxShadow:r?"0 0 0 1px var(--accent), var(--shadow-subtle)":"var(--shadow-subtle)"},children:[(0,t.jsx)(s.EmployeeAvatar,{name:e.name,size:28}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-body)] font-[var(--weight-semibold)] text-[var(--text-primary)] whitespace-nowrap overflow-hidden text-ellipsis leading-[var(--leading-tight)]",children:e.displayName||e.name}),(0,t.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)] whitespace-nowrap overflow-hidden text-ellipsis mt-px",children:e.department})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] text-[var(--accent)] bg-[var(--accent-fill)] px-[7px] py-px rounded-[10px]",children:e.engine}),(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-medium)] text-[var(--text-quaternary)] bg-[var(--fill-quaternary)] px-[7px] py-px rounded-[10px]",children:e.model})]})]})}function x({label:e,count:r,children:a}){return(0,t.jsx)(u.Card,{className:"p-0 shadow-none bg-[var(--bg-secondary)] rounded-[var(--radius-lg,16px)] border border-[var(--separator)]",children:(0,t.jsxs)(u.CardContent,{className:"p-4 flex flex-col gap-[var(--space-2)]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-[var(--space-2)] mb-[var(--space-1)]",children:[(0,t.jsx)("span",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] tracking-[var(--tracking-wide)] uppercase text-[var(--text-tertiary)]",children:e}),(0,t.jsxs)("span",{className:"text-[length:var(--text-caption2)] text-[var(--text-quaternary)] ml-auto",children:[r," employee",1!==r?"s":""]})]}),a]})})}function m({employees:e,selectedName:r,onSelect:a}){let n=new Map,i=[];for(let t of e)if(t.department){let e=n.get(t.department)||[];e.push(t),n.set(t.department,e)}else i.push(t);let l=e.find(e=>"executive"===e.rank);return(0,t.jsxs)("div",{className:"overflow-y-auto p-[var(--space-6)] h-full",children:[l&&(0,t.jsxs)("button",{onClick:()=>a(l),className:`flex items-center gap-[var(--space-5)] w-full px-[var(--space-6)] py-[var(--space-5)] rounded-[var(--radius-xl,20px)] bg-[var(--material-regular)] cursor-pointer text-left mb-[var(--space-6)] transition-all duration-150 ease-in-out ${r===l.name?"border-[1.5px] border-[var(--accent)]":"border border-[var(--separator)]"}`,style:{boxShadow:r===l.name?"0 0 0 1px var(--accent), var(--shadow-card)":"var(--shadow-card)"},children:[(0,t.jsx)(s.EmployeeAvatar,{name:l.name,size:40}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title2)] font-[var(--weight-bold)] text-[var(--text-primary)] tracking-[var(--tracking-tight)] leading-[var(--leading-tight)]",children:l.displayName||l.name}),(0,t.jsx)("div",{className:"text-[length:var(--text-subheadline)] text-[var(--text-secondary)] mt-0.5",children:l.department})]}),(0,t.jsxs)("div",{className:"flex gap-[var(--space-4)] shrink-0",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title3)] font-[var(--weight-bold)] text-[var(--text-primary)] leading-none",children:e.length}),(0,t.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-0.5",children:"employees"})]}),(0,t.jsx)("div",{className:"w-px self-stretch bg-[var(--separator)]"}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title3)] font-[var(--weight-bold)] text-[var(--text-primary)] leading-none",children:n.size}),(0,t.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-0.5",children:"depts"})]})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] gap-[var(--space-5)] items-start",children:[Array.from(n.entries()).map(([e,n])=>{let s=n.filter(e=>e.name!==l?.name);return 0===s.length?null:(0,t.jsx)(x,{label:e,count:s.length,children:s.map(e=>(0,t.jsx)(p,{employee:e,selected:r===e.name,onSelect:()=>a(e)},e.name))},e)}),i.length>0&&(0,t.jsx)(x,{label:"Unassigned",count:i.filter(e=>e.name!==l?.name).length,children:i.filter(e=>e.name!==l?.name).map(e=>(0,t.jsx)(p,{employee:e,selected:r===e.name,onSelect:()=>a(e)},e.name))})]})]})}var v=e.i(47899);let f={executive:"👑",manager:"💼",senior:"⭐",employee:"👤"};function h({rank:e}){let r={executive:{bg:"color-mix(in srgb, var(--system-purple) 15%, transparent)",text:"var(--system-purple)"},manager:{bg:"color-mix(in srgb, var(--system-blue) 15%, transparent)",text:"var(--system-blue)"},senior:{bg:"color-mix(in srgb, var(--system-green) 15%, transparent)",text:"var(--system-green)"},employee:{bg:"var(--fill-tertiary)",text:"var(--text-tertiary)"}},a=r[e]||r.employee;return(0,t.jsx)("span",{className:"rounded-[10px] px-2 py-0.5 text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[0.02em]",style:{color:a.text,background:a.bg},children:e})}function g({employees:e,selectedName:r,onSelect:a}){let n={executive:0,manager:1,senior:2,employee:3},i=[...e].sort((e,t)=>(n[e.rank]??3)-(n[t.rank]??3));return(0,t.jsxs)("div",{className:"h-full overflow-y-auto p-[var(--space-6)]",children:[(0,t.jsx)("div",{className:"mb-[var(--space-5)] flex gap-[var(--space-3)]",children:["executive","manager","senior","employee"].map(r=>{let a=e.filter(e=>e.rank===r).length;return(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-[var(--space-3)] rounded-[var(--radius-md,12px)] border border-[var(--separator)] bg-[var(--material-regular)] px-[var(--space-4)] py-[var(--space-3)]",children:[(0,t.jsx)("span",{className:"text-base",children:f[r]||"👤"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title3)] font-[var(--weight-bold)] leading-none text-[var(--text-primary)]",children:a}),(0,t.jsxs)("div",{className:"mt-0.5 text-[length:var(--text-caption2)] capitalize text-[var(--text-tertiary)]",children:[r,"s"]})]})]},r)})}),0===i.length?(0,t.jsx)("div",{className:"px-[var(--space-4)] py-[var(--space-16)] text-center text-[var(--text-tertiary)]",children:(0,t.jsx)("div",{className:"text-[length:var(--text-body)] font-[var(--weight-medium)]",children:"No employees found"})}):(0,t.jsx)("div",{className:"overflow-hidden rounded-[var(--radius-lg,16px)] border border-[var(--separator)] bg-[var(--bg-secondary)]",children:i.map((e,n)=>{let i=r===e.name;return(0,t.jsxs)("button",{onClick:()=>a(e),className:(0,v.cn)("flex w-full items-center gap-[var(--space-3)] px-[var(--space-4)] py-[var(--space-3)] text-left transition-colors",i?"bg-[var(--fill-secondary)]":"bg-transparent hover:bg-accent"),style:n>0?{borderTop:"1px solid var(--separator)"}:void 0,children:[(0,t.jsx)(s.EmployeeAvatar,{name:e.name,size:24}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-[var(--space-2)]",children:[(0,t.jsx)("span",{className:"text-[length:var(--text-body)] font-[var(--weight-semibold)] text-[var(--text-primary)]",children:e.displayName||e.name}),(0,t.jsx)("span",{className:"font-[family-name:var(--font-mono)] text-[length:var(--text-caption1)] text-[var(--text-quaternary)]",children:e.name})]}),(0,t.jsx)("div",{className:"mt-0.5 flex items-center gap-[var(--space-2)]",children:(0,t.jsx)("span",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)]",children:e.department||"No department"})})]}),(0,t.jsx)(h,{rank:e.rank})]},e.name)})})]})}let y={executive:{background:"color-mix(in srgb, var(--system-purple) 15%, transparent)",color:"var(--system-purple)"},manager:{background:"color-mix(in srgb, var(--accent) 15%, transparent)",color:"var(--accent)"},senior:{background:"color-mix(in srgb, var(--system-green) 15%, transparent)",color:"var(--system-green)"},employee:{background:"var(--fill-tertiary)",color:"var(--text-tertiary)"}},b={claude:"C",codex:"X"};function j({rank:e}){let r=y[e]||y.employee;return(0,t.jsx)("span",{className:"text-[10px] font-medium py-[2px] px-[6px] rounded-full",style:r,children:e})}function w({engine:e}){return(0,t.jsx)("span",{className:"text-[10px] font-[family-name:var(--font-mono)] bg-[var(--fill-tertiary)] text-[var(--text-tertiary)] py-[2px] px-[4px] rounded-[var(--radius-sm)]",children:b[e]||e?.charAt(0)?.toUpperCase()||"?"})}function N({employee:e,selected:r,onSelect:a}){return(0,t.jsxs)("button",{onClick:()=>a(e.name),className:"w-full text-left flex items-center gap-2 py-[6px] px-3 rounded-[var(--radius-md)] text-[length:var(--text-subheadline)] border-none cursor-pointer transition-[background,color] duration-150 ease-in-out",style:{background:r?"var(--accent-fill)":"transparent",color:r?"var(--accent)":"var(--text-secondary)"},onMouseEnter:e=>{r||(e.currentTarget.style.background="var(--fill-tertiary)")},onMouseLeave:e=>{r||(e.currentTarget.style.background="transparent")},children:[(0,t.jsx)("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:e.displayName||e.name}),e.rank&&(0,t.jsx)(j,{rank:e.rank}),e.engine&&(0,t.jsx)(w,{engine:e.engine})]})}function k({name:e,employees:a,hierarchy:n,depth:s,selectedEmployee:i,onSelectEmployee:l}){let[o,c]=(0,r.useState)(s<2),d=a.find(t=>t.name===e),u=d?.directReports??[],p=u.length>0;return d?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",style:{paddingLeft:16*s},children:[p?(0,t.jsx)("button",{onClick:()=>c(!o),className:"w-5 h-5 flex items-center justify-center text-[var(--text-quaternary)] text-xs shrink-0 bg-none border-none cursor-pointer",children:o?"▼":"▶"}):(0,t.jsx)("span",{className:"w-5 shrink-0"}),(0,t.jsxs)("button",{onClick:()=>l(d.name),className:"flex-1 text-left flex items-center gap-2 py-[6px] px-2 rounded-[var(--radius-md)] text-[length:var(--text-subheadline)] border-none cursor-pointer transition-[background,color] duration-150 ease-in-out",style:{background:i===d.name?"var(--accent-fill)":"transparent",color:i===d.name?"var(--accent)":"var(--text-secondary)"},onMouseEnter:e=>{i!==d.name&&(e.currentTarget.style.background="var(--fill-tertiary)")},onMouseLeave:e=>{i!==d.name&&(e.currentTarget.style.background="transparent")},children:[(0,t.jsx)("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:d.displayName||d.name}),p&&(0,t.jsx)("span",{className:"text-[10px] text-[var(--text-tertiary)] bg-[var(--fill-tertiary)] py-[2px] px-[6px] rounded-full",children:u.length}),d.rank&&(0,t.jsx)(j,{rank:d.rank}),d.engine&&(0,t.jsx)(w,{engine:d.engine})]})]}),o&&p&&u.map(e=>(0,t.jsx)(k,{name:e,employees:a,hierarchy:n,depth:s+1,selectedEmployee:i,onSelectEmployee:l},e))]}):null}function C({name:e,employees:a,selectedEmployee:n,onSelectEmployee:s,onSelectDepartment:i,selectedDepartment:l}){let[o,c]=(0,r.useState)(!0),d=l===e;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("button",{onClick:()=>c(!o),className:"w-5 h-5 flex items-center justify-center text-[var(--text-quaternary)] text-xs shrink-0 bg-none border-none cursor-pointer",children:o?"▼":"▶"}),(0,t.jsxs)("button",{onClick:()=>i(e),className:"flex-1 text-left py-[6px] px-2 rounded-[var(--radius-md)] text-[length:var(--text-subheadline)] font-medium border-none cursor-pointer transition-[background,color] duration-150 ease-in-out",style:{background:d?"var(--accent-fill)":"transparent",color:d?"var(--accent)":"var(--text-primary)"},onMouseEnter:e=>{d||(e.currentTarget.style.background="var(--fill-tertiary)")},onMouseLeave:e=>{d||(e.currentTarget.style.background="transparent")},children:[e,(0,t.jsxs)("span",{className:"text-[length:var(--text-caption1)] text-[var(--text-quaternary)] ml-[6px]",children:["(",a.length,")"]})]})]}),o&&(0,t.jsx)("div",{className:"ml-5 border-l border-[var(--separator)] pl-2 mt-[2px]",children:a.map(e=>(0,t.jsx)(N,{employee:e,selected:n===e.name,onSelect:s},e.name))})]})}function S({viewMode:e,setViewMode:r}){return(0,t.jsxs)("div",{className:"flex gap-1 mb-2 px-1",children:[(0,t.jsx)("button",{onClick:()=>r("hierarchy"),className:"text-[10px] py-[2px] px-[8px] rounded-full border-none cursor-pointer",style:{background:"hierarchy"===e?"var(--accent-fill)":"var(--fill-tertiary)",color:"hierarchy"===e?"var(--accent)":"var(--text-tertiary)"},children:"Hierarchy"}),(0,t.jsx)("button",{onClick:()=>r("department"),className:"text-[10px] py-[2px] px-[8px] rounded-full border-none cursor-pointer",style:{background:"department"===e?"var(--accent-fill)":"var(--fill-tertiary)",color:"department"===e?"var(--accent)":"var(--text-tertiary)"},children:"Department"})]})}function R({data:e,selectedEmployee:a,selectedDepartment:n,onSelectEmployee:s,onSelectDepartment:i}){let l=e.employees.some(e=>e.directReports&&e.directReports.length>0),[o,c]=(0,r.useState)(l?"hierarchy":"department");if("hierarchy"===o&&e.hierarchy){let r=e.employees.filter(e=>null===e.parentName||void 0===e.parentName);return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[l&&(0,t.jsx)(S,{viewMode:o,setViewMode:c}),r.map(r=>(0,t.jsx)(k,{name:r.name,employees:e.employees,hierarchy:e.hierarchy,depth:0,selectedEmployee:a,onSelectEmployee:s},r.name))]})}let d={},u=[];for(let t of e.employees)t.department?(d[t.department]||(d[t.department]=[]),d[t.department].push(t)):u.push(t);for(let t of e.departments)d[t]||(d[t]=[]);let p=e.employees.find(e=>"executive"===e.rank);return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[l&&(0,t.jsx)(S,{viewMode:o,setViewMode:c}),p&&(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)(N,{employee:p,selected:a===p.name,onSelect:s})}),Object.entries(d).sort(([e],[t])=>e.localeCompare(t)).map(([e,r])=>(0,t.jsx)(C,{name:e,employees:r.filter(e=>e.name!==p?.name),selectedEmployee:a,onSelectEmployee:s,onSelectDepartment:i,selectedDepartment:n},e)),u.filter(e=>e.name!==p?.name).map(e=>(0,t.jsx)(N,{employee:e,selected:a===e.name,onSelect:s},e.name))]})}var T=e.i(58843),E=e.i(57270),A=e.i(11322);let P=(0,a.default)(()=>e.A(93161).then(e=>({default:e.OrgMap})),{loadableGenerated:{modules:[97116]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex flex-col items-center justify-center h-full gap-[var(--space-3)] text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading map..."})});e.s(["default",0,function(){(0,A.useBreadcrumbs)([{label:"Organization"}]);let[e,a]=(0,r.useState)([]),[s,l]=(0,r.useState)(),[o,c]=(0,r.useState)(!0),[u,p]=(0,r.useState)(null),[x,v]=(0,r.useState)(null),[f,h]=(0,r.useState)("map"),y=(0,r.useRef)(null),{settings:b}=(0,i.useSettings)(),j=(0,r.useCallback)(()=>{c(!0),p(null),n.api.getOrg().then(e=>{a([{name:(b.portalName??"Ryoko").toLowerCase(),displayName:b.portalName??"Ryoko",department:"",rank:"executive",engine:"claude",model:"opus",persona:"COO and AI gateway daemon"},...e.employees]),l(e.hierarchy)}).catch(e=>p(e.message)).finally(()=>c(!1))},[b.portalName]);(0,r.useEffect)(()=>{j()},[j]),(0,r.useEffect)(()=>{x&&y.current&&y.current.focus()},[x]),(0,r.useEffect)(()=>{function e(e){"Escape"===e.key&&x&&v(null)}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x]);let w=(0,r.useCallback)(e=>{v(e)},[]);return u?(0,t.jsx)(T.PageLayout,{children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-[var(--space-4)] text-[var(--text-tertiary)]",children:[(0,t.jsxs)("div",{className:"rounded-[var(--radius-md,12px)] px-[var(--space-4)] py-[var(--space-3)] text-[length:var(--text-body)] text-[var(--system-red)]",style:{background:"color-mix(in srgb, var(--system-red) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--system-red) 30%, transparent)"},children:["Failed to load organization: ",u]}),(0,t.jsx)("button",{onClick:j,className:"px-[var(--space-4)] py-[var(--space-2)] rounded-[var(--radius-md,12px)] bg-[var(--accent)] text-[var(--accent-contrast)] border-none cursor-pointer text-[length:var(--text-body)] font-[var(--weight-semibold)]",children:"Retry"})]})}):(0,t.jsx)(T.PageLayout,{children:(0,t.jsxs)("div",{className:"flex h-full relative bg-[var(--bg)]",children:[(0,t.jsx)("div",{className:"flex-1 h-full relative",children:(0,t.jsxs)(E.Tabs,{value:f,onValueChange:h,className:"h-full flex flex-col",children:[(0,t.jsx)("div",{className:"absolute top-[var(--space-4)] left-[var(--space-4)] z-10",children:(0,t.jsxs)(E.TabsList,{children:[(0,t.jsx)(E.TabsTrigger,{value:"map",children:"マップ"}),(0,t.jsx)(E.TabsTrigger,{value:"grid",children:"グリッド"}),(0,t.jsx)(E.TabsTrigger,{value:"list",children:"リスト"}),(0,t.jsx)(E.TabsTrigger,{value:"tree",children:"ツリー"})]})}),(0,t.jsx)(E.TabsContent,{value:"map",className:"flex-1",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(P,{employees:e,hierarchy:s,selectedName:x?.name??null,onNodeClick:w})}),(0,t.jsx)(E.TabsContent,{value:"grid",className:"flex-1 overflow-hidden",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(m,{employees:e,selectedName:x?.name??null,onSelect:w})}),(0,t.jsx)(E.TabsContent,{value:"list",className:"flex-1 overflow-hidden",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(g,{employees:e,selectedName:x?.name??null,onSelect:w})}),(0,t.jsx)(E.TabsContent,{value:"tree",className:"flex-1 overflow-auto p-[var(--space-4)]",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(R,{data:{departments:[],employees:e,hierarchy:s??{root:null,sorted:[],warnings:[]}},selectedEmployee:x?.name??null,selectedDepartment:null,onSelectEmployee:t=>{let r=e.find(e=>e.name===t);r&&w(r)},onSelectDepartment:()=>{}})})]})}),x&&(0,t.jsx)("div",{className:"fixed inset-0 z-30 lg:hidden bg-black/50",onClick:()=>v(null)}),x&&(0,t.jsx)("div",{className:"absolute top-0 right-0 bottom-0 z-30",children:(0,t.jsxs)("div",{className:"w-[380px] max-w-[100vw] h-full overflow-y-auto bg-[var(--bg)] flex flex-col shadow-[var(--shadow-overlay)]",children:[(0,t.jsx)("div",{className:"sticky top-0 z-10 flex items-center justify-end px-[var(--space-4)] py-[var(--space-3)] bg-[var(--bg)]",children:(0,t.jsx)("button",{ref:y,onClick:()=>v(null),"aria-label":"Close detail panel",className:"w-[30px] h-[30px] rounded-full flex items-center justify-center bg-[var(--fill-tertiary)] text-[var(--text-secondary)] border-none cursor-pointer text-sm",children:"✕"})}),(0,t.jsx)("div",{className:"px-[var(--space-4)] pb-[var(--space-6)]",children:(0,t.jsx)(d,{name:x.name,prefetched:"executive"===x.rank?x:void 0})})]})})]})})}],25064)},93161,e=>{e.v(t=>Promise.all(["static/chunks/0e3pdjkorr5zl.js"].map(t=>e.l(t))).then(()=>t(97116)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4863,e=>{"use strict";var t=e.i(98181),r=e.i(47899);e.s(["Card",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",e),...a})}])},13830,e=>{"use strict";let t=["🦊","🐼","🦉","🐙","🦈","🐺","🦁","🐯","🐸","🦋","🐝","🦜","🐬","🦩","🦚","🐻","🐨","🦇","🐳","🐧","🤖","👾","🎃","👻","🦄","🐲","🧙","🧛","🧟","🥷","🌵","🍄","🌻","🌊","⚡","🔥","❄️","🌈","💎","🪐","🍕","🌮","🍩","🧁","🍣","🥑","🍉","🫐","🥥","🍋","🎯","🎸","🎮","🏆","🚀","⚔️","🛡️","🧲","🎪","🎭","🦾","🧿","🪬","🫧","🧊","🪸","🦑","🦞","🪷","🪻"];e.s(["EMOJI_POOL",0,t,"emojiForName",0,function(e){if(!e)return t[0];let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t[Math.abs(r)%t.length]}])},81377,e=>{"use strict";var t=e.i(98181),r=e.i(36668),a=e.i(13830);e.s(["EmployeeAvatar",0,function({name:e,size:n=32,className:s,onClick:i}){let{settings:l}=(0,r.useSettings)(),o=e?l.employeeOverrides[e]:void 0,c=o?.emoji||(0,a.emojiForName)(e||""),d=Math.round(.6*n);return(0,t.jsx)("span",{className:s,onClick:i,role:i?"button":void 0,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:n,height:n,fontSize:d,lineHeight:1,borderRadius:"50%",flexShrink:0,cursor:i?"pointer":void 0,userSelect:"none"},children:c})}])},39402,55737,21583,e=>{"use strict";var t=e.i(25007),r=e.i(63949),a=e.i(80011),n=e.i(66379),s=e.i(39202),i=e.i(98181);function l(e){let r=e+"CollectionProvider",[l,o]=(0,a.createContextScope)(r),[c,d]=l(r,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:r,children:a}=e,n=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,i.jsx)(c,{scope:r,itemMap:s,collectionRef:n,children:a})};u.displayName=r;let p=e+"CollectionSlot",x=(0,s.createSlot)(p),m=t.default.forwardRef((e,t)=>{let{scope:r,children:a}=e,s=d(p,r),l=(0,n.useComposedRefs)(t,s.collectionRef);return(0,i.jsx)(x,{ref:l,children:a})});m.displayName=p;let v=e+"CollectionItemSlot",f="data-radix-collection-item",h=(0,s.createSlot)(v),g=t.default.forwardRef((e,r)=>{let{scope:a,children:s,...l}=e,o=t.default.useRef(null),c=(0,n.useComposedRefs)(r,o),u=d(v,a);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...l}),()=>void u.itemMap.delete(o))),(0,i.jsx)(h,{...{[f]:""},ref:c,children:s})});return g.displayName=v,[{Provider:u,Slot:m,ItemSlot:g},function(r){let a=d(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=a.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(a.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[a.collectionRef,a.itemMap])},o]}var o=new WeakMap;function c(e,t){var r,a;let n,s,i;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,a=t,n=r.length,(i=(s=d(a))>=0?s:n+s)<0||i>=n?-1:i);return -1===l?void 0:e[l]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let a,n=this.has(t),s=this.#e.length,i=d(e),l=i>=0?i:s+i,o=l<0||l>=s?-1:l;if(o===this.size||n&&o===this.size-1||-1===o)return this.set(t,r),this;let c=this.size+ +!n;i<0&&l++;let u=[...this.#e],p=!1;for(let e=l;e<c;e++)if(l===e){let s=u[e];u[e]===t&&(s=u[e+1]),n&&this.delete(t),a=this.get(s),this.set(t,r)}else{p||u[e-1]!==t||(p=!0);let r=u[p?e:e-1],n=a;a=this.get(r),this.delete(r),this.set(r,n)}return this}with(t,r,a){let n=new e(this);return n.insert(t,r,a),n}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=c(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=c(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return c(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let a=r+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let a=r+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return a;r++}}findIndex(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return r;r++}return -1}filter(t,r){let a=[],n=0;for(let e of this)Reflect.apply(t,r,[e,n,this])&&a.push(e),n++;return new e(a)}map(t,r){let a=[],n=0;for(let e of this)a.push([e[0],Reflect.apply(t,r,[e,n,this])]),n++;return new e(a)}reduce(...e){let[t,r]=e,a=0,n=r??this.at(0);for(let r of this)n=0===a&&1===e.length?r:Reflect.apply(t,this,[n,r,a,this]),a++;return n}reduceRight(...e){let[t,r]=e,a=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let n=this.at(r);a=r===this.size-1&&1===e.length?n:Reflect.apply(t,this,[a,n,r,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),a=this.get(r);t.set(r,a)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let a=new e,n=this.size-1;if(void 0===t)return a;t<0&&(t+=this.size),void 0!==r&&r>0&&(n=r-1);for(let e=t;e<=n;e++){let t=this.keyAt(e),r=this.get(t);a.set(t,r)}return a}every(e,t){let r=0;for(let a of this){if(!Reflect.apply(e,t,[a,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,l],55737);var u=e.i(28509),p=e.i(16393),x=e.i(94080),m=e.i(87782),v=t.createContext(void 0);function f(e){let r=t.useContext(v);return e||r||"ltr"}e.s(["useDirection",0,f],21583);var h="rovingFocusGroup.onEntryFocus",g={bubbles:!1,cancelable:!0},y="RovingFocusGroup",[b,j,w]=l(y),[N,k]=(0,a.createContextScope)(y,[w]),[C,S]=N(y),R=t.forwardRef((e,t)=>(0,i.jsx)(b.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(b.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,i.jsx)(T,{...e,ref:t})})}));R.displayName=y;var T=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:s,orientation:l,loop:o=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:v,onEntryFocus:b,preventScrollOnEntryFocus:w=!1,...N}=e,k=t.useRef(null),S=(0,n.useComposedRefs)(a,k),R=f(c),[T,E]=(0,m.useControllableState)({prop:d,defaultProp:u??null,onChange:v,caller:y}),[A,P]=t.useState(!1),O=(0,x.useCallbackRef)(b),z=j(s),I=t.useRef(!1),[L,F]=t.useState(0);return t.useEffect(()=>{let e=k.current;if(e)return e.addEventListener(h,O),()=>e.removeEventListener(h,O)},[O]),(0,i.jsx)(C,{scope:s,orientation:l,dir:R,loop:o,currentTabStopId:T,onItemFocus:t.useCallback(e=>E(e),[E]),onItemShiftTab:t.useCallback(()=>P(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,i.jsx)(p.Primitive.div,{tabIndex:A||0===L?-1:0,"data-orientation":l,...N,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{I.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!I.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(h,g);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=z().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),w)}}I.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>P(!1))})})}),E="RovingFocusGroupItem",A=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:n,focusable:s=!0,active:l=!1,tabStopId:o,children:c,...d}=e,x=(0,u.useId)(),m=o||x,v=S(E,n),f=v.currentTabStopId===m,h=j(n),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:w}=v;return t.useEffect(()=>{if(s)return g(),()=>y()},[s,g,y]),(0,i.jsx)(b.ItemSlot,{scope:n,id:m,focusable:s,active:l,children:(0,i.jsx)(p.Primitive.span,{tabIndex:f?0:-1,"data-orientation":v.orientation,...d,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{s?v.onItemFocus(m):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(m)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var a;let n=(a=e.key,"rtl"!==r?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return P[n]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){var r,a;"prev"===t&&n.reverse();let s=n.indexOf(e.currentTarget);n=v.loop?(r=n,a=s+1,r.map((e,t)=>r[(a+t)%r.length])):n.slice(s+1)}setTimeout(()=>M(n))}}),children:"function"==typeof c?c({isCurrentTabStop:f,hasTabStop:null!=w}):c})})});A.displayName=E;var P={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function M(e,t=!1){let r=document.activeElement;for(let a of e)if(a===r||(a.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",0,A,"Root",0,R,"createRovingFocusGroupScope",0,k],39402)},57270,e=>{"use strict";var t=e.i(98181),r=e.i(9148),a=e.i(25007),n=e.i(63949),s=e.i(80011),i=e.i(39402),l=e.i(69113),o=e.i(16393),c=e.i(21583),d=e.i(87782),u=e.i(28509),p="Tabs",[x,m]=(0,s.createContextScope)(p,[i.createRovingFocusGroupScope]),v=(0,i.createRovingFocusGroupScope)(),[f,h]=x(p),g=a.forwardRef((e,r)=>{let{__scopeTabs:a,value:n,onValueChange:s,defaultValue:i,orientation:l="horizontal",dir:x,activationMode:m="automatic",...v}=e,h=(0,c.useDirection)(x),[g,y]=(0,d.useControllableState)({prop:n,onChange:s,defaultProp:i??"",caller:p});return(0,t.jsx)(f,{scope:a,baseId:(0,u.useId)(),value:g,onValueChange:y,orientation:l,dir:h,activationMode:m,children:(0,t.jsx)(o.Primitive.div,{dir:h,"data-orientation":l,...v,ref:r})})});g.displayName=p;var y="TabsList",b=a.forwardRef((e,r)=>{let{__scopeTabs:a,loop:n=!0,...s}=e,l=h(y,a),c=v(a);return(0,t.jsx)(i.Root,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:n,children:(0,t.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...s,ref:r})})});b.displayName=y;var j="TabsTrigger",w=a.forwardRef((e,r)=>{let{__scopeTabs:a,value:s,disabled:l=!1,...c}=e,d=h(j,a),u=v(a),p=C(d.baseId,s),x=S(d.baseId,s),m=s===d.value;return(0,t.jsx)(i.Item,{asChild:!0,...u,focusable:!l,active:m,children:(0,t.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":x,"data-state":m?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:p,...c,ref:r,onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(s)}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(s)}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;m||l||!e||d.onValueChange(s)})})})});w.displayName=j;var N="TabsContent",k=a.forwardRef((e,r)=>{let{__scopeTabs:n,value:s,forceMount:i,children:c,...d}=e,u=h(N,n),p=C(u.baseId,s),x=S(u.baseId,s),m=s===u.value,v=a.useRef(m);return a.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(l.Presence,{present:i||m,children:({present:a})=>(0,t.jsx)(o.Primitive.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":p,hidden:!a,id:x,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:v.current?"0s":void 0},children:a&&c})})});function C(e,t){return`${e}-trigger-${t}`}function S(e,t){return`${e}-content-${t}`}k.displayName=N,e.s(["Content",0,k,"List",0,b,"Root",0,g,"Tabs",0,g,"TabsContent",0,k,"TabsList",0,b,"TabsTrigger",0,w,"Trigger",0,w,"createTabsScope",0,m],93200);var R=e.i(93200),R=R,T=e.i(47899);let E=(0,r.cva)("rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:r="horizontal",...a}){return(0,t.jsx)(R.Root,{"data-slot":"tabs","data-orientation":r,orientation:r,className:(0,T.cn)("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...a})},"TabsContent",0,function({className:e,...r}){return(0,t.jsx)(R.Content,{"data-slot":"tabs-content",className:(0,T.cn)("flex-1 outline-none",e),...r})},"TabsList",0,function({className:e,variant:r="default",...a}){return(0,t.jsx)(R.List,{"data-slot":"tabs-list","data-variant":r,className:(0,T.cn)(E({variant:r}),e),...a})},"TabsTrigger",0,function({className:e,...r}){return(0,t.jsx)(R.Trigger,{"data-slot":"tabs-trigger",className:(0,T.cn)("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...r})}],57270)},47352,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let a=e.r(74878);function n({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},92282,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67689,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(98181),n=e.r(39150),s=e.r(9557),i=e.r(92282),l=e.r(80746);function o({moduleIds:e}){if("u">typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,n.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},10465,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let a=e.r(98181),n=e.r(25007),s=e.r(47352),i=e.r(67689);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,n.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?n.Suspense:n.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},87751,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let a=e.r(60244)._(e.r(10465));function n(e,t){let r={};"function"==typeof e&&(r.loader=e);let n={...r,...t};return(0,a.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},25064,e=>{"use strict";var t=e.i(98181),r=e.i(25007),a=e.i(87751),n=e.i(93716),s=e.i(81377),i=e.i(36668),l=e.i(13830),o=e.i(52053);function c({rank:e}){let r={executive:{bg:"color-mix(in srgb, var(--system-purple) 15%, transparent)",text:"var(--system-purple)"},manager:{bg:"color-mix(in srgb, var(--system-blue) 15%, transparent)",text:"var(--system-blue)"},senior:{bg:"color-mix(in srgb, var(--system-green) 15%, transparent)",text:"var(--system-green)"},employee:{bg:"var(--fill-tertiary)",text:"var(--text-tertiary)"}},a=r[e]||r.employee;return(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] px-[10px] py-[2px] rounded-[10px] uppercase tracking-[0.02em]",style:{color:a.text,background:a.bg},children:e})}function d({name:e,prefetched:a}){let[u,p]=(0,r.useState)(a??null),[x,m]=(0,r.useState)([]),[v,f]=(0,r.useState)(!a),[h,g]=(0,r.useState)(null),[y,b]=(0,r.useState)(!1),[j,w]=(0,r.useState)(!1),{settings:N,setEmployeeOverride:k}=(0,i.useSettings)();if((0,r.useEffect)(()=>{if(b(!1),a){p(a),f(!0),g(null),n.api.getSessions().then(t=>{m(t.filter(t=>t.employee===e||!t.employee&&e===a.name).slice(0,10))}).catch(()=>m([])).finally(()=>f(!1));return}f(!0),g(null),Promise.all([n.api.getEmployee(e),n.api.getSessions()]).then(([t,r])=>{p(t),m(r.filter(t=>t.employee===e).slice(0,10))}).catch(e=>g(e.message)).finally(()=>f(!1))},[e,a]),v)return(0,t.jsx)("div",{className:"flex items-center justify-center h-64 text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."});if(h)return(0,t.jsxs)("div",{className:"rounded-[var(--radius-md,12px)] px-[var(--space-4)] py-[var(--space-3)] text-[length:var(--text-caption1)] text-[var(--system-red)]",style:{background:"color-mix(in srgb, var(--system-red) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--system-red) 30%, transparent)"},children:["Failed to load employee: ",h]});if(!u)return null;let C=u.rank||"employee",S=u.persona||"",R=N.employeeOverrides[u.name]?.emoji||(0,l.emojiForName)(u.name),T=S.length>200&&!y?S.slice(0,200)+"...":S;return(0,t.jsxs)("div",{className:"flex flex-col gap-[var(--space-6)]",children:[(0,t.jsxs)("div",{className:"rounded-[var(--radius-lg,16px)] border border-[var(--separator)] bg-[var(--material-regular)] p-[var(--space-6)]",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-[var(--space-4)]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-[var(--space-3)]",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(s.EmployeeAvatar,{name:u.name,size:36,onClick:()=>w(!j)}),j&&(0,t.jsx)(o.EmojiPicker,{current:R,onSelect:e=>{k(u.name,{emoji:e===(0,l.emojiForName)(u.name)?void 0:e}),w(!1)},onClose:()=>w(!1)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-[length:var(--text-title2)] font-[var(--weight-bold)] tracking-[var(--tracking-tight)] text-[var(--text-primary)] m-0",children:u.displayName||u.name}),(0,t.jsx)("p",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mt-[2px] mb-0 ml-0 mr-0 font-[family-name:var(--font-mono)]",children:u.name})]})]}),(0,t.jsx)(c,{rank:C})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-[var(--space-4)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Department"}),(0,t.jsx)("p",{className:"text-[length:var(--text-body)] text-[var(--text-primary)] m-0",children:u.department||"None"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Engine"}),(0,t.jsxs)("p",{className:"text-[length:var(--text-body)] text-[var(--text-primary)] m-0",children:[u.engine||"claude"," ",(0,t.jsxs)("span",{className:"text-[var(--text-tertiary)]",children:["/ ",u.model||"default"]})]})]})]}),(0,t.jsxs)("div",{className:"mt-[var(--space-4)] pt-[var(--space-4)] border-t border-[var(--separator)] flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Notify on completion"}),(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] m-0",children:"Notify parent session when this employee finishes"})]}),(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":!1!==u.alwaysNotify,onClick:async()=>{let e=!1===u.alwaysNotify;p({...u,alwaysNotify:e});try{await n.api.updateEmployee(u.name,{alwaysNotify:e})}catch{p({...u,alwaysNotify:!e})}},className:"relative inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer rounded-full border-none transition-colors duration-200 ease-in-out focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--accent)]",style:{background:!1!==u.alwaysNotify?"var(--accent, var(--system-green))":"var(--fill-tertiary)"},children:(0,t.jsx)("span",{className:"pointer-events-none inline-block h-[20px] w-[20px] rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",style:{transform:!1!==u.alwaysNotify?"translate(22px, 2px)":"translate(2px, 2px)"}})})]}),S&&(0,t.jsxs)("div",{className:"mt-[var(--space-4)] pt-[var(--space-4)] border-t border-[var(--separator)]",children:[(0,t.jsx)("p",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[var(--tracking-wide)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Persona"}),(0,t.jsx)("p",{className:"text-[length:var(--text-body)] text-[var(--text-secondary)] leading-[var(--leading-relaxed)] whitespace-pre-wrap m-0",children:T}),S.length>200&&(0,t.jsx)("button",{onClick:()=>b(!y),className:"text-[length:var(--text-caption1)] text-[var(--accent)] bg-none border-none cursor-pointer p-0 mt-[var(--space-1)]",children:y?"Show less":"Show more"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] tracking-[var(--tracking-wide)] uppercase text-[var(--text-tertiary)] mb-[var(--space-3)]",children:"Recent Sessions"}),0===x.length?(0,t.jsx)("p",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)] text-center py-[var(--space-6)] px-0",children:"No sessions found for this employee."}):(0,t.jsx)("div",{className:"rounded-[var(--radius-lg,16px)] border border-[var(--separator)] bg-[var(--material-regular)] overflow-hidden",children:x.map((e,r)=>(0,t.jsxs)("div",{className:`px-[var(--space-5)] py-[var(--space-3)] flex items-center justify-between${r>0?" border-t border-[var(--separator)]":""}`,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[length:var(--text-body)] font-[family-name:var(--font-mono)] text-[var(--text-primary)] m-0",children:e.id.slice(0,8)}),(0,t.jsxs)("p",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-[2px]",children:[e.source||"unknown"," ",e.createdAt?new Date(e.createdAt).toLocaleDateString():""]})]}),(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] py-[2px] px-[8px] rounded-[10px]",style:"running"===e.status?{background:"color-mix(in srgb, var(--system-green) 15%, transparent)",color:"var(--system-green)"}:"error"===e.status?{background:"color-mix(in srgb, var(--system-red) 15%, transparent)",color:"var(--system-red)"}:{background:"var(--fill-tertiary)",color:"var(--text-tertiary)"},children:e.status||"idle"})]},e.id))})]})]})}var u=e.i(4863);function p({employee:e,selected:r,onSelect:a}){return(0,t.jsxs)("button",{onClick:a,className:`flex items-center gap-[var(--space-3)] px-[var(--space-4)] py-[var(--space-3)] rounded-[var(--radius-md,12px)] bg-[var(--material-regular)] cursor-pointer w-full text-left transition-all duration-150 ease-in-out ${r?"border-[1.5px] border-[var(--accent)]":"border border-[var(--separator)]"}`,style:{boxShadow:r?"0 0 0 1px var(--accent), var(--shadow-subtle)":"var(--shadow-subtle)"},children:[(0,t.jsx)(s.EmployeeAvatar,{name:e.name,size:28}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-body)] font-[var(--weight-semibold)] text-[var(--text-primary)] whitespace-nowrap overflow-hidden text-ellipsis leading-[var(--leading-tight)]",children:e.displayName||e.name}),(0,t.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)] whitespace-nowrap overflow-hidden text-ellipsis mt-px",children:e.department})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-semibold)] text-[var(--accent)] bg-[var(--accent-fill)] px-[7px] py-px rounded-[10px]",children:e.engine}),(0,t.jsx)("span",{className:"text-[length:var(--text-caption2)] font-[var(--weight-medium)] text-[var(--text-quaternary)] bg-[var(--fill-quaternary)] px-[7px] py-px rounded-[10px]",children:e.model})]})]})}function x({label:e,count:r,children:a}){return(0,t.jsx)(u.Card,{className:"p-0 shadow-none bg-[var(--bg-secondary)] rounded-[var(--radius-lg,16px)] border border-[var(--separator)]",children:(0,t.jsxs)(u.CardContent,{className:"p-4 flex flex-col gap-[var(--space-2)]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-[var(--space-2)] mb-[var(--space-1)]",children:[(0,t.jsx)("span",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] tracking-[var(--tracking-wide)] uppercase text-[var(--text-tertiary)]",children:e}),(0,t.jsxs)("span",{className:"text-[length:var(--text-caption2)] text-[var(--text-quaternary)] ml-auto",children:[r," employee",1!==r?"s":""]})]}),a]})})}function m({employees:e,selectedName:r,onSelect:a}){let n=new Map,i=[];for(let t of e)if(t.department){let e=n.get(t.department)||[];e.push(t),n.set(t.department,e)}else i.push(t);let l=e.find(e=>"executive"===e.rank);return(0,t.jsxs)("div",{className:"overflow-y-auto p-[var(--space-6)] h-full",children:[l&&(0,t.jsxs)("button",{onClick:()=>a(l),className:`flex items-center gap-[var(--space-5)] w-full px-[var(--space-6)] py-[var(--space-5)] rounded-[var(--radius-xl,20px)] bg-[var(--material-regular)] cursor-pointer text-left mb-[var(--space-6)] transition-all duration-150 ease-in-out ${r===l.name?"border-[1.5px] border-[var(--accent)]":"border border-[var(--separator)]"}`,style:{boxShadow:r===l.name?"0 0 0 1px var(--accent), var(--shadow-card)":"var(--shadow-card)"},children:[(0,t.jsx)(s.EmployeeAvatar,{name:l.name,size:40}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title2)] font-[var(--weight-bold)] text-[var(--text-primary)] tracking-[var(--tracking-tight)] leading-[var(--leading-tight)]",children:l.displayName||l.name}),(0,t.jsx)("div",{className:"text-[length:var(--text-subheadline)] text-[var(--text-secondary)] mt-0.5",children:l.department})]}),(0,t.jsxs)("div",{className:"flex gap-[var(--space-4)] shrink-0",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title3)] font-[var(--weight-bold)] text-[var(--text-primary)] leading-none",children:e.length}),(0,t.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-0.5",children:"employees"})]}),(0,t.jsx)("div",{className:"w-px self-stretch bg-[var(--separator)]"}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title3)] font-[var(--weight-bold)] text-[var(--text-primary)] leading-none",children:n.size}),(0,t.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-0.5",children:"depts"})]})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] gap-[var(--space-5)] items-start",children:[Array.from(n.entries()).map(([e,n])=>{let s=n.filter(e=>e.name!==l?.name);return 0===s.length?null:(0,t.jsx)(x,{label:e,count:s.length,children:s.map(e=>(0,t.jsx)(p,{employee:e,selected:r===e.name,onSelect:()=>a(e)},e.name))},e)}),i.length>0&&(0,t.jsx)(x,{label:"Unassigned",count:i.filter(e=>e.name!==l?.name).length,children:i.filter(e=>e.name!==l?.name).map(e=>(0,t.jsx)(p,{employee:e,selected:r===e.name,onSelect:()=>a(e)},e.name))})]})]})}var v=e.i(47899);let f={executive:"👑",manager:"💼",senior:"⭐",employee:"👤"};function h({rank:e}){let r={executive:{bg:"color-mix(in srgb, var(--system-purple) 15%, transparent)",text:"var(--system-purple)"},manager:{bg:"color-mix(in srgb, var(--system-blue) 15%, transparent)",text:"var(--system-blue)"},senior:{bg:"color-mix(in srgb, var(--system-green) 15%, transparent)",text:"var(--system-green)"},employee:{bg:"var(--fill-tertiary)",text:"var(--text-tertiary)"}},a=r[e]||r.employee;return(0,t.jsx)("span",{className:"rounded-[10px] px-2 py-0.5 text-[length:var(--text-caption2)] font-[var(--weight-semibold)] uppercase tracking-[0.02em]",style:{color:a.text,background:a.bg},children:e})}function g({employees:e,selectedName:r,onSelect:a}){let n={executive:0,manager:1,senior:2,employee:3},i=[...e].sort((e,t)=>(n[e.rank]??3)-(n[t.rank]??3));return(0,t.jsxs)("div",{className:"h-full overflow-y-auto p-[var(--space-6)]",children:[(0,t.jsx)("div",{className:"mb-[var(--space-5)] flex gap-[var(--space-3)]",children:["executive","manager","senior","employee"].map(r=>{let a=e.filter(e=>e.rank===r).length;return(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-[var(--space-3)] rounded-[var(--radius-md,12px)] border border-[var(--separator)] bg-[var(--material-regular)] px-[var(--space-4)] py-[var(--space-3)]",children:[(0,t.jsx)("span",{className:"text-base",children:f[r]||"👤"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[length:var(--text-title3)] font-[var(--weight-bold)] leading-none text-[var(--text-primary)]",children:a}),(0,t.jsxs)("div",{className:"mt-0.5 text-[length:var(--text-caption2)] capitalize text-[var(--text-tertiary)]",children:[r,"s"]})]})]},r)})}),0===i.length?(0,t.jsx)("div",{className:"px-[var(--space-4)] py-[var(--space-16)] text-center text-[var(--text-tertiary)]",children:(0,t.jsx)("div",{className:"text-[length:var(--text-body)] font-[var(--weight-medium)]",children:"No employees found"})}):(0,t.jsx)("div",{className:"overflow-hidden rounded-[var(--radius-lg,16px)] border border-[var(--separator)] bg-[var(--bg-secondary)]",children:i.map((e,n)=>{let i=r===e.name;return(0,t.jsxs)("button",{onClick:()=>a(e),className:(0,v.cn)("flex w-full items-center gap-[var(--space-3)] px-[var(--space-4)] py-[var(--space-3)] text-left transition-colors",i?"bg-[var(--fill-secondary)]":"bg-transparent hover:bg-accent"),style:n>0?{borderTop:"1px solid var(--separator)"}:void 0,children:[(0,t.jsx)(s.EmployeeAvatar,{name:e.name,size:24}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-[var(--space-2)]",children:[(0,t.jsx)("span",{className:"text-[length:var(--text-body)] font-[var(--weight-semibold)] text-[var(--text-primary)]",children:e.displayName||e.name}),(0,t.jsx)("span",{className:"font-[family-name:var(--font-mono)] text-[length:var(--text-caption1)] text-[var(--text-quaternary)]",children:e.name})]}),(0,t.jsx)("div",{className:"mt-0.5 flex items-center gap-[var(--space-2)]",children:(0,t.jsx)("span",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)]",children:e.department||"No department"})})]}),(0,t.jsx)(h,{rank:e.rank})]},e.name)})})]})}let y={executive:{background:"color-mix(in srgb, var(--system-purple) 15%, transparent)",color:"var(--system-purple)"},manager:{background:"color-mix(in srgb, var(--accent) 15%, transparent)",color:"var(--accent)"},senior:{background:"color-mix(in srgb, var(--system-green) 15%, transparent)",color:"var(--system-green)"},employee:{background:"var(--fill-tertiary)",color:"var(--text-tertiary)"}},b={claude:"C",codex:"X"};function j({rank:e}){let r=y[e]||y.employee;return(0,t.jsx)("span",{className:"text-[10px] font-medium py-[2px] px-[6px] rounded-full",style:r,children:e})}function w({engine:e}){return(0,t.jsx)("span",{className:"text-[10px] font-[family-name:var(--font-mono)] bg-[var(--fill-tertiary)] text-[var(--text-tertiary)] py-[2px] px-[4px] rounded-[var(--radius-sm)]",children:b[e]||e?.charAt(0)?.toUpperCase()||"?"})}function N({employee:e,selected:r,onSelect:a}){return(0,t.jsxs)("button",{onClick:()=>a(e.name),className:"w-full text-left flex items-center gap-2 py-[6px] px-3 rounded-[var(--radius-md)] text-[length:var(--text-subheadline)] border-none cursor-pointer transition-[background,color] duration-150 ease-in-out",style:{background:r?"var(--accent-fill)":"transparent",color:r?"var(--accent)":"var(--text-secondary)"},onMouseEnter:e=>{r||(e.currentTarget.style.background="var(--fill-tertiary)")},onMouseLeave:e=>{r||(e.currentTarget.style.background="transparent")},children:[(0,t.jsx)("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:e.displayName||e.name}),e.rank&&(0,t.jsx)(j,{rank:e.rank}),e.engine&&(0,t.jsx)(w,{engine:e.engine})]})}function k({name:e,employees:a,hierarchy:n,depth:s,selectedEmployee:i,onSelectEmployee:l}){let[o,c]=(0,r.useState)(s<2),d=a.find(t=>t.name===e),u=d?.directReports??[],p=u.length>0;return d?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",style:{paddingLeft:16*s},children:[p?(0,t.jsx)("button",{onClick:()=>c(!o),className:"w-5 h-5 flex items-center justify-center text-[var(--text-quaternary)] text-xs shrink-0 bg-none border-none cursor-pointer",children:o?"▼":"▶"}):(0,t.jsx)("span",{className:"w-5 shrink-0"}),(0,t.jsxs)("button",{onClick:()=>l(d.name),className:"flex-1 text-left flex items-center gap-2 py-[6px] px-2 rounded-[var(--radius-md)] text-[length:var(--text-subheadline)] border-none cursor-pointer transition-[background,color] duration-150 ease-in-out",style:{background:i===d.name?"var(--accent-fill)":"transparent",color:i===d.name?"var(--accent)":"var(--text-secondary)"},onMouseEnter:e=>{i!==d.name&&(e.currentTarget.style.background="var(--fill-tertiary)")},onMouseLeave:e=>{i!==d.name&&(e.currentTarget.style.background="transparent")},children:[(0,t.jsx)("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap",children:d.displayName||d.name}),p&&(0,t.jsx)("span",{className:"text-[10px] text-[var(--text-tertiary)] bg-[var(--fill-tertiary)] py-[2px] px-[6px] rounded-full",children:u.length}),d.rank&&(0,t.jsx)(j,{rank:d.rank}),d.engine&&(0,t.jsx)(w,{engine:d.engine})]})]}),o&&p&&u.map(e=>(0,t.jsx)(k,{name:e,employees:a,hierarchy:n,depth:s+1,selectedEmployee:i,onSelectEmployee:l},e))]}):null}function C({name:e,employees:a,selectedEmployee:n,onSelectEmployee:s,onSelectDepartment:i,selectedDepartment:l}){let[o,c]=(0,r.useState)(!0),d=l===e;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("button",{onClick:()=>c(!o),className:"w-5 h-5 flex items-center justify-center text-[var(--text-quaternary)] text-xs shrink-0 bg-none border-none cursor-pointer",children:o?"▼":"▶"}),(0,t.jsxs)("button",{onClick:()=>i(e),className:"flex-1 text-left py-[6px] px-2 rounded-[var(--radius-md)] text-[length:var(--text-subheadline)] font-medium border-none cursor-pointer transition-[background,color] duration-150 ease-in-out",style:{background:d?"var(--accent-fill)":"transparent",color:d?"var(--accent)":"var(--text-primary)"},onMouseEnter:e=>{d||(e.currentTarget.style.background="var(--fill-tertiary)")},onMouseLeave:e=>{d||(e.currentTarget.style.background="transparent")},children:[e,(0,t.jsxs)("span",{className:"text-[length:var(--text-caption1)] text-[var(--text-quaternary)] ml-[6px]",children:["(",a.length,")"]})]})]}),o&&(0,t.jsx)("div",{className:"ml-5 border-l border-[var(--separator)] pl-2 mt-[2px]",children:a.map(e=>(0,t.jsx)(N,{employee:e,selected:n===e.name,onSelect:s},e.name))})]})}function S({viewMode:e,setViewMode:r}){return(0,t.jsxs)("div",{className:"flex gap-1 mb-2 px-1",children:[(0,t.jsx)("button",{onClick:()=>r("hierarchy"),className:"text-[10px] py-[2px] px-[8px] rounded-full border-none cursor-pointer",style:{background:"hierarchy"===e?"var(--accent-fill)":"var(--fill-tertiary)",color:"hierarchy"===e?"var(--accent)":"var(--text-tertiary)"},children:"Hierarchy"}),(0,t.jsx)("button",{onClick:()=>r("department"),className:"text-[10px] py-[2px] px-[8px] rounded-full border-none cursor-pointer",style:{background:"department"===e?"var(--accent-fill)":"var(--fill-tertiary)",color:"department"===e?"var(--accent)":"var(--text-tertiary)"},children:"Department"})]})}function R({data:e,selectedEmployee:a,selectedDepartment:n,onSelectEmployee:s,onSelectDepartment:i}){let l=e.employees.some(e=>e.directReports&&e.directReports.length>0),[o,c]=(0,r.useState)(l?"hierarchy":"department");if("hierarchy"===o&&e.hierarchy){let r=e.employees.filter(e=>null===e.parentName||void 0===e.parentName);return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[l&&(0,t.jsx)(S,{viewMode:o,setViewMode:c}),r.map(r=>(0,t.jsx)(k,{name:r.name,employees:e.employees,hierarchy:e.hierarchy,depth:0,selectedEmployee:a,onSelectEmployee:s},r.name))]})}let d={},u=[];for(let t of e.employees)t.department?(d[t.department]||(d[t.department]=[]),d[t.department].push(t)):u.push(t);for(let t of e.departments)d[t]||(d[t]=[]);let p=e.employees.find(e=>"executive"===e.rank);return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[l&&(0,t.jsx)(S,{viewMode:o,setViewMode:c}),p&&(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)(N,{employee:p,selected:a===p.name,onSelect:s})}),Object.entries(d).sort(([e],[t])=>e.localeCompare(t)).map(([e,r])=>(0,t.jsx)(C,{name:e,employees:r.filter(e=>e.name!==p?.name),selectedEmployee:a,onSelectEmployee:s,onSelectDepartment:i,selectedDepartment:n},e)),u.filter(e=>e.name!==p?.name).map(e=>(0,t.jsx)(N,{employee:e,selected:a===e.name,onSelect:s},e.name))]})}var T=e.i(58843),E=e.i(57270),A=e.i(11322);let P=(0,a.default)(()=>e.A(93161).then(e=>({default:e.OrgMap})),{loadableGenerated:{modules:[97116]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex flex-col items-center justify-center h-full gap-[var(--space-3)] text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading map..."})});e.s(["default",0,function(){(0,A.useBreadcrumbs)([{label:"Organization"}]);let[e,a]=(0,r.useState)([]),[s,l]=(0,r.useState)(),[o,c]=(0,r.useState)(!0),[u,p]=(0,r.useState)(null),[x,v]=(0,r.useState)(null),[f,h]=(0,r.useState)("map"),y=(0,r.useRef)(null),{settings:b}=(0,i.useSettings)(),j=(0,r.useCallback)(()=>{c(!0),p(null),n.api.getOrg().then(e=>{a([{name:(b.portalName??"Ryoko").toLowerCase(),displayName:b.portalName??"Ryoko",department:"",rank:"executive",engine:"claude",model:"claude-opus-5",persona:"COO and AI gateway daemon"},...e.employees]),l(e.hierarchy)}).catch(e=>p(e.message)).finally(()=>c(!1))},[b.portalName]);(0,r.useEffect)(()=>{j()},[j]),(0,r.useEffect)(()=>{x&&y.current&&y.current.focus()},[x]),(0,r.useEffect)(()=>{function e(e){"Escape"===e.key&&x&&v(null)}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[x]);let w=(0,r.useCallback)(e=>{v(e)},[]);return u?(0,t.jsx)(T.PageLayout,{children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-[var(--space-4)] text-[var(--text-tertiary)]",children:[(0,t.jsxs)("div",{className:"rounded-[var(--radius-md,12px)] px-[var(--space-4)] py-[var(--space-3)] text-[length:var(--text-body)] text-[var(--system-red)]",style:{background:"color-mix(in srgb, var(--system-red) 10%, transparent)",border:"1px solid color-mix(in srgb, var(--system-red) 30%, transparent)"},children:["Failed to load organization: ",u]}),(0,t.jsx)("button",{onClick:j,className:"px-[var(--space-4)] py-[var(--space-2)] rounded-[var(--radius-md,12px)] bg-[var(--accent)] text-[var(--accent-contrast)] border-none cursor-pointer text-[length:var(--text-body)] font-[var(--weight-semibold)]",children:"Retry"})]})}):(0,t.jsx)(T.PageLayout,{children:(0,t.jsxs)("div",{className:"flex h-full relative bg-[var(--bg)]",children:[(0,t.jsx)("div",{className:"flex-1 h-full relative",children:(0,t.jsxs)(E.Tabs,{value:f,onValueChange:h,className:"h-full flex flex-col",children:[(0,t.jsx)("div",{className:"absolute top-[var(--space-4)] left-[var(--space-4)] z-10",children:(0,t.jsxs)(E.TabsList,{children:[(0,t.jsx)(E.TabsTrigger,{value:"map",children:"マップ"}),(0,t.jsx)(E.TabsTrigger,{value:"grid",children:"グリッド"}),(0,t.jsx)(E.TabsTrigger,{value:"list",children:"リスト"}),(0,t.jsx)(E.TabsTrigger,{value:"tree",children:"ツリー"})]})}),(0,t.jsx)(E.TabsContent,{value:"map",className:"flex-1",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(P,{employees:e,hierarchy:s,selectedName:x?.name??null,onNodeClick:w})}),(0,t.jsx)(E.TabsContent,{value:"grid",className:"flex-1 overflow-hidden",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(m,{employees:e,selectedName:x?.name??null,onSelect:w})}),(0,t.jsx)(E.TabsContent,{value:"list",className:"flex-1 overflow-hidden",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(g,{employees:e,selectedName:x?.name??null,onSelect:w})}),(0,t.jsx)(E.TabsContent,{value:"tree",className:"flex-1 overflow-auto p-[var(--space-4)]",children:o?(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-[var(--text-tertiary)] text-[length:var(--text-caption1)]",children:"Loading..."}):(0,t.jsx)(R,{data:{departments:[],employees:e,hierarchy:s??{root:null,sorted:[],warnings:[]}},selectedEmployee:x?.name??null,selectedDepartment:null,onSelectEmployee:t=>{let r=e.find(e=>e.name===t);r&&w(r)},onSelectDepartment:()=>{}})})]})}),x&&(0,t.jsx)("div",{className:"fixed inset-0 z-30 lg:hidden bg-black/50",onClick:()=>v(null)}),x&&(0,t.jsx)("div",{className:"absolute top-0 right-0 bottom-0 z-30",children:(0,t.jsxs)("div",{className:"w-[380px] max-w-[100vw] h-full overflow-y-auto bg-[var(--bg)] flex flex-col shadow-[var(--shadow-overlay)]",children:[(0,t.jsx)("div",{className:"sticky top-0 z-10 flex items-center justify-end px-[var(--space-4)] py-[var(--space-3)] bg-[var(--bg)]",children:(0,t.jsx)("button",{ref:y,onClick:()=>v(null),"aria-label":"Close detail panel",className:"w-[30px] h-[30px] rounded-full flex items-center justify-center bg-[var(--fill-tertiary)] text-[var(--text-secondary)] border-none cursor-pointer text-sm",children:"✕"})}),(0,t.jsx)("div",{className:"px-[var(--space-4)] pb-[var(--space-6)]",children:(0,t.jsx)(d,{name:x.name,prefetched:"executive"===x.rank?x:void 0})})]})})]})})}],25064)},93161,e=>{e.v(t=>Promise.all(["static/chunks/0e3pdjkorr5zl.js"].map(t=>e.l(t))).then(()=>t(97116)))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15857,e=>{"use strict";var a=e.i(98181),t=e.i(25007),r=e.i(90922);let n=(0,r.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var s=e.i(38524),l=e.i(40765);let o=(0,r.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),c=(0,r.default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var i=e.i(58843),d=e.i(36668),p=e.i(11322),x=e.i(13765),v=e.i(65390),h=e.i(93716),u=e.i(52053);let m=[{value:"claude-opus-5",label:"Opus 5 — 上(最上位 / 既定 / claude-opus-5)"},{value:"claude-opus-4-8",label:"Opus 4.8 — 旧世代(ピン留め用 / claude-opus-4-8)"},{value:"opus",label:"Opus — CLI が解決する最新 Opus に自動追従"},{value:"sonnet",label:"Sonnet 5 — 中(バランス / claude-sonnet-5)"},{value:"haiku",label:"Haiku 4.5 — 小(軽量・高速 / claude-haiku-4-5)"}],g=[{value:"gpt-5.6-sol",label:"GPT-5.6 Sol — 上(フラッグシップ / 既定)"},{value:"gpt-5.6-terra",label:"GPT-5.6 Terra — 中(バランス・低コスト)"},{value:"gpt-5.6-luna",label:"GPT-5.6 Luna — 小(最速・最安 / トリアージ向け)"},{value:"gpt-5.5",label:"GPT-5.5"},{value:"gpt-5.4",label:"GPT-5.4"},{value:"gpt-5.3-codex",label:"GPT-5.3 Codex"},{value:"gpt-5.2-codex",label:"GPT-5.2 Codex"},{value:"gpt-5.2",label:"GPT-5.2"},{value:"gpt-5.1-codex-max",label:"GPT-5.1 Codex Max"},{value:"gpt-5.1-codex-mini",label:"GPT-5.1 Codex Mini"},{value:"gpt-5-nano",label:"GPT-5 nano — 軽量(トリアージ向け)"}];function b(e){return"claude"===e?m:g}function j(e,a){return!a||e.some(e=>e.value===a)?e:[...e,{value:a,label:`${a}(現在の設定)`}]}let y=[{label:"Red",value:"#EF4444"},{label:"Orange",value:"#F97316"},{label:"Amber",value:"#F59E0B"},{label:"Yellow",value:"#EAB308"},{label:"Lime",value:"#84CC16"},{label:"Green",value:"#22C55E"},{label:"Emerald",value:"#10B981"},{label:"Cyan",value:"#06B6D4"},{label:"Blue",value:"#3B82F6"},{label:"Indigo",value:"#6366F1"},{label:"Violet",value:"#8B5CF6"},{label:"Pink",value:"#EC4899"}];function f({title:e,children:t}){return(0,a.jsxs)("section",{className:"mb-[var(--space-6)]",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] tracking-[var(--tracking-wide)] uppercase text-[var(--text-tertiary)] px-[var(--space-2)] pb-[var(--space-2)]",children:e}),(0,a.jsx)("div",{className:"bg-[var(--material-regular)] rounded-[var(--radius-md)] border border-[var(--separator)] p-[var(--space-4)]",children:t})]})}function k({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex items-center justify-between py-[var(--space-2)] gap-[var(--space-4)]",children:[(0,a.jsx)("label",{className:"text-[length:var(--text-subheadline)] text-[var(--text-secondary)] shrink-0",children:e}),(0,a.jsx)("div",{className:"w-[240px] shrink-0",children:t})]})}function w({value:e,onChange:t,type:r="text",placeholder:n}){return(0,a.jsx)("input",{type:r,value:e,onChange:e=>t(e.target.value),placeholder:n,className:"apple-input w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-[10px] py-[6px] text-[length:var(--text-footnote)] text-[var(--text-primary)]"})}function C({value:e,onChange:t,options:r}){return(0,a.jsx)("select",{value:e,onChange:e=>t(e.target.value),className:"w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-[10px] py-[6px] text-[length:var(--text-footnote)] text-[var(--text-primary)] cursor-pointer",children:r.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})}function N({checked:e,onChange:t}){return(0,a.jsx)("button",{role:"switch","aria-checked":e,onClick:()=>t(!e),className:"w-[44px] h-[24px] rounded-[12px] border-none cursor-pointer relative shrink-0 transition-[background] duration-200 ease-[var(--ease-smooth)]",style:{background:e?"var(--system-green)":"var(--fill-primary)"},children:(0,a.jsx)("span",{className:"absolute top-[2px] w-[20px] h-[20px] rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,0.2)] transition-[left] duration-200 ease-[var(--ease-spring)]",style:{left:e?22:2}})})}let S={en:"English",bg:"Bulgarian",de:"German",fr:"French",es:"Spanish",it:"Italian",pt:"Portuguese",ru:"Russian",zh:"Chinese",ja:"Japanese",ko:"Korean",ar:"Arabic",hi:"Hindi",tr:"Turkish",pl:"Polish",nl:"Dutch",sv:"Swedish",cs:"Czech",el:"Greek",ro:"Romanian",uk:"Ukrainian",he:"Hebrew",da:"Danish",fi:"Finnish",hu:"Hungarian",no:"Norwegian",sk:"Slovak",hr:"Croatian",ca:"Catalan",th:"Thai",vi:"Vietnamese",id:"Indonesian",ms:"Malay",tl:"Filipino",sr:"Serbian",lt:"Lithuanian",lv:"Latvian",sl:"Slovenian",et:"Estonian"};function T(){let[e,r]=(0,t.useState)(null),[n,s]=(0,t.useState)(!1),[l,o]=(0,t.useState)("");if((0,t.useEffect)(()=>{h.api.sttStatus().then(r).catch(()=>{})},[]),(0,t.useEffect)(()=>{if(!e?.downloading)return;let a=setInterval(()=>{h.api.sttStatus().then(r).catch(()=>{})},1500);return()=>clearInterval(a)},[e?.downloading]),!e)return null;let c=Object.entries(S).filter(([a])=>!e.languages.includes(a)).sort((e,a)=>e[1].localeCompare(a[1]));return(0,a.jsxs)(f,{title:"音声入力",children:[(0,a.jsxs)("div",{className:"flex items-center gap-[var(--space-3)] mb-[var(--space-4)]",children:[(0,a.jsx)("div",{className:"w-[8px] h-[8px] rounded-full shrink-0",style:{background:e.available?"var(--system-green)":"var(--system-red)"}}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-subheadline)] font-[var(--weight-medium)] text-[var(--text-primary)]",children:e.available?`Whisper ${(e.model||"small").charAt(0).toUpperCase()+(e.model||"small").slice(1)}`:"No model installed"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)]",children:e.available?"Offline speech recognition ready":"Download a model to enable voice input"})]})]}),!e.available&&!e.downloading&&(0,a.jsx)("button",{onClick:function(){h.api.sttDownload().then(()=>r(e=>e?{...e,downloading:!0,progress:0}:e)).catch(()=>{})},className:"w-full p-[var(--space-3)] rounded-[var(--radius-md)] bg-[var(--accent)] text-[var(--accent-contrast)] border-none cursor-pointer text-[length:var(--text-footnote)] font-[var(--weight-semibold)] mb-[var(--space-4)]",children:"Download Whisper Small (~500MB)"}),e.downloading&&(0,a.jsxs)("div",{className:"mb-[var(--space-4)]",children:[(0,a.jsxs)("div",{className:"flex justify-between mb-[var(--space-2)] text-[length:var(--text-caption1)] text-[var(--text-tertiary)]",children:[(0,a.jsx)("span",{children:"モデルをダウンロード中…"}),(0,a.jsxs)("span",{children:[e.progress,"%"]})]}),(0,a.jsx)("div",{className:"h-[6px] rounded-[3px] bg-[var(--fill-tertiary)] overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-[3px] bg-[var(--accent)] transition-[width] duration-300 ease-out",style:{width:`${e.progress}%`}})})]}),e.available&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"border-t border-[var(--separator)] mt-[var(--space-2)] pt-[var(--space-3)]",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"文字起こし言語"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mb-[var(--space-3)]",children:"最初の言語がデフォルトになります。複数追加するとチャットで言語ピッカーが表示されます。"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-[var(--space-2)] mb-[var(--space-3)]",children:e.languages.map(t=>(0,a.jsxs)("div",{className:"inline-flex items-center gap-[var(--space-1)] px-[8px] py-[3px] rounded-[var(--radius-sm)] bg-[var(--fill-secondary)] text-[length:var(--text-caption1)] font-[var(--weight-medium)] text-[var(--text-primary)]",children:[(0,a.jsx)("span",{className:"font-[family-name:var(--font-mono)] uppercase text-[length:var(--text-caption2)] font-[var(--weight-semibold)] text-[var(--accent)] mr-[2px]",children:t}),S[t]||t,e.languages.length>1&&(0,a.jsx)("button",{onClick:()=>(function(a){if(!e||e.languages.length<=1)return;let t=e.languages.filter(e=>e!==a);s(!0),h.api.sttUpdateConfig(t).then(()=>r(e=>e?{...e,languages:t}:e)).catch(()=>{}).finally(()=>s(!1))})(t),disabled:n,"aria-label":`Remove ${S[t]||t}`,className:"bg-none border-none cursor-pointer p-0 ml-[2px] text-[var(--text-quaternary)] text-[14px] leading-none flex items-center",children:"×"})]},t))}),(0,a.jsxs)("div",{className:"flex gap-[var(--space-2)]",children:[(0,a.jsxs)("select",{value:l,onChange:e=>o(e.target.value),className:"flex-1 bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-[10px] py-[6px] text-[length:var(--text-footnote)] cursor-pointer",style:{color:l?"var(--text-primary)":"var(--text-tertiary)"},children:[(0,a.jsx)("option",{value:"",children:"言語を追加…"}),c.map(([e,t])=>(0,a.jsxs)("option",{value:e,children:[e.toUpperCase()," — ",t]},e))]}),(0,a.jsx)("button",{onClick:function(){if(!l||!e||e.languages.includes(l))return;let a=[...e.languages,l];s(!0),o(""),h.api.sttUpdateConfig(a).then(()=>r(e=>e?{...e,languages:a}:e)).catch(()=>{}).finally(()=>s(!1))},disabled:!l||n,className:"px-[14px] py-[6px] rounded-[var(--radius-sm)] border-none text-[length:var(--text-footnote)] font-[var(--weight-semibold)] shrink-0",style:{background:l?"var(--accent)":"var(--fill-tertiary)",color:l?"var(--accent-contrast)":"var(--text-quaternary)",cursor:l?"pointer":"default"},children:"Add"})]})]})})]})}function E(){let e,{settings:r}=(0,d.useSettings)(),[n,s]=(0,t.useState)(!1),[l,o]=(0,t.useState)(!0),c=JSON.stringify({display_information:{name:e=(r.portalName??"").trim()||"Ryoko"},features:{app_home:{messages_tab_enabled:!0,messages_tab_read_only_enabled:!1},bot_user:{display_name:e,always_online:!0},assistant_view:{assistant_description:`${e} — your AI assistant`,suggested_prompts:[{title:"What can you do?",message:"What can you help me with?"}]}},oauth_config:{scopes:{bot:["app_mentions:read","assistant:write","canvases:read","canvases:write","channels:history","channels:read","chat:write","chat:write.customize","files:read","files:write","groups:history","groups:read","im:history","im:read","im:write","mpim:history","mpim:read","mpim:write","reactions:read","reactions:write","users:read","users:read.email"],user:["channels:history","channels:read","files:read","groups:history","groups:read","im:history","im:read","mpim:history","mpim:read","search:read","users:read","bookmarks:read"]}},settings:{event_subscriptions:{bot_events:["app_mention","assistant_thread_context_changed","assistant_thread_started","message.channels","message.groups","message.im","message.mpim","reaction_added"]},socket_mode_enabled:!0}},null,2);return(0,a.jsxs)("div",{className:"border border-[var(--separator)] rounded-[var(--radius-md)] bg-[var(--fill-quaternary)] p-[var(--space-3)] mb-[var(--space-3)]",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"flex items-center justify-between w-full text-left cursor-pointer",children:[(0,a.jsx)("span",{className:"text-[length:var(--text-body)] font-[var(--weight-semibold)] text-[var(--text-primary)]",children:"Slack App セットアップガイド"}),(0,a.jsx)("span",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)]",children:l?"閉じる":"開く"})]}),l&&(0,a.jsxs)("div",{className:"mt-[var(--space-3)]",children:[(0,a.jsxs)("ol",{className:"list-decimal pl-[20px] text-[length:var(--text-caption1)] text-[var(--label-secondary)] leading-relaxed mb-[var(--space-3)] space-y-[2px]",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("a",{href:"https://api.slack.com/apps",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--accent)] underline",children:"Slack API の Your Apps ページ"}),"を開き、「Create New App」を選択。"]}),(0,a.jsx)("li",{children:"「From a manifest」を選び、対象ワークスペースを指定。"}),(0,a.jsx)("li",{children:"下のJSONをコピーして貼り付け、「Create」で作成。"}),(0,a.jsxs)("li",{children:["「Install to Workspace」を実行し、OAuth & Permissions の「Bot User OAuth Token」(",(0,a.jsx)("code",{children:"xoxb-…"}),")を下の Bot Token に貼り付け。"]}),(0,a.jsxs)("li",{children:["「Basic Information」→「App-Level Tokens」で ",(0,a.jsx)("code",{children:"connections:write"})," ","スコープ付きトークンを発行し(",(0,a.jsx)("code",{children:"xapp-…"}),")、下の App Token に貼り付け。"]})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:function(){navigator.clipboard.writeText(c).then(()=>{s(!0),setTimeout(()=>s(!1),1500)})},"aria-label":"Copy manifest JSON",className:"absolute top-2 right-2 py-0.5 px-2 text-[11px] rounded-[var(--radius-sm)] bg-[var(--fill-secondary)] text-[var(--text-secondary)] border border-[var(--separator)] cursor-pointer",children:n?"コピー済み":"コピー"}),(0,a.jsx)("pre",{className:"bg-[var(--fill-tertiary)] border border-[var(--separator)] rounded-[var(--radius-md)] py-[var(--space-3)] px-[var(--space-4)] overflow-x-auto text-[12px] leading-normal font-['SF_Mono',Menlo,monospace] text-[var(--text-primary)] max-h-[280px]",children:(0,a.jsx)("code",{children:c})})]})]})]})}e.s(["default",0,function(){(0,p.useBreadcrumbs)([{label:"Settings"}]);let{settings:e,setAccentColor:r,setPortalName:S,setPortalSubtitle:A,setOperatorName:I,setPortalEmoji:F,setLanguage:B,resetAll:D}=(0,d.useSettings)(),{theme:M,setTheme:P}=(0,x.useTheme)(),[O,_]=(0,t.useState)(e.portalName??""),[L,G]=(0,t.useState)(e.portalSubtitle??""),[R,$]=(0,t.useState)(e.operatorName??""),[W,H]=(0,t.useState)(e.portalEmoji??""),[U,z]=(0,t.useState)(e.language??"English"),[q,J]=(0,t.useState)(e.accentColor??""),[V,K]=(0,t.useState)(!1),[Y,Q]=(0,t.useState)({}),[X,Z]=(0,t.useState)(!0),[ee,ea]=(0,t.useState)(null),[et,er]=(0,t.useState)(!1),[en,es]=(0,t.useState)(null),[el,eo]=(0,t.useState)(null),[ec,ei]=(0,t.useState)("unknown"),[ed,ep]=(0,t.useState)([]),[ex,ev]=(0,t.useState)(null),[eh,eu]=(0,t.useState)(!1),[em,eg]=(0,t.useState)(null);(0,t.useEffect)(()=>{h.api.getOrg().then(e=>{e?.employees&&ep(e.employees.map(e=>"string"==typeof e?{name:e,displayName:e}:{name:e.name,displayName:e.displayName||e.name}))}).catch(()=>{})},[]);let eb=async()=>{eu(!0),eg(null);try{let e=await fetch("/api/connectors/slack/channels"),a=await e.json();if(a?.ok)ev(a.channels??[]);else{let t=a?.error||`HTTP ${e.status}`;"missing_scope"===t?eg("Bot に canvases / channels scope が足りません。上のSlack App Manifestを貼り直して再インストールしてください。"):"slack_not_configured"===t?eg("Slack コネクタが未起動です。先に Bot Token / App Token を保存して再起動してください。"):eg(`チャンネル取得失敗: ${t}`),ev(null)}}catch(e){eg(e instanceof Error?e.message:String(e)),ev(null)}finally{eu(!1)}};function ej(){Z(!0),h.api.getConfig().then(e=>{Q(e),ea(null)}).catch(e=>ea(e.message)).finally(()=>Z(!1))}function ey(e,a){Q(t=>{let r=structuredClone(t),n=r;for(let a=0;a<e.length-1;a++)n[e[a]]&&"object"==typeof n[e[a]]||(n[e[a]]={}),n=n[e[a]];return n[e[e.length-1]]=a,r})}return(0,t.useEffect)(()=>{_(e.portalName??""),G(e.portalSubtitle??""),$(e.operatorName??""),H(e.portalEmoji??""),z(e.language??"English"),J(e.accentColor??"")},[e.portalName,e.portalSubtitle,e.operatorName,e.portalEmoji,e.language,e.accentColor]),(0,t.useEffect)(()=>{ej()},[]),(0,t.useEffect)(()=>{if(!Y.connectors?.whatsapp)return;let e=!1;async function a(){try{let a=await fetch("/api/status"),t=await a.json(),r=t?.connectors?.whatsapp?.status;if(e||ei(r??"unknown"),"qr_pending"===r){let a=await fetch("/api/connectors/whatsapp/qr"),t=await a.json();e||eo(t.qr)}else e||eo(null)}catch{}}a();let t=setInterval(()=>{a()},1e4);return()=>{e=!0,clearInterval(t)}},[Y.connectors?.whatsapp]),(0,a.jsx)(i.PageLayout,{children:(0,a.jsx)("div",{className:"h-full overflow-y-auto bg-[var(--bg)]",children:(0,a.jsxs)("div",{className:"max-w-[640px] mx-auto px-[var(--space-4)] py-[var(--space-6)] pb-[var(--space-12)]",children:[(0,a.jsx)("h1",{className:"text-[length:var(--text-title1)] font-[var(--weight-bold)] tracking-[var(--tracking-tight)] text-[var(--text-primary)] mb-[var(--space-6)]",children:"Settings"}),(0,a.jsxs)(f,{title:"外観",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-footnote)] font-[var(--weight-medium)] text-[var(--text-secondary)] mb-[var(--space-2)]",children:"Theme"}),(0,a.jsx)("div",{className:"grid grid-cols-5 gap-[var(--space-2)] mb-[var(--space-4)]",children:v.THEMES.map(e=>{let t=M===e.id;return(0,a.jsxs)("button",{onClick:()=>P(e.id),className:"flex flex-col items-center gap-[var(--space-1)] px-[var(--space-2)] py-[var(--space-3)] rounded-[var(--radius-md)] bg-[var(--fill-quaternary)] cursor-pointer transition-all duration-150 ease-[var(--ease-smooth)]",style:{border:t?"2px solid var(--accent)":"2px solid var(--separator)"},children:[(0,a.jsx)("span",{className:"text-[24px]",children:e.emoji}),(0,a.jsx)("span",{className:"text-[length:var(--text-caption2)]",style:{fontWeight:t?"var(--weight-semibold)":"var(--weight-medium)",color:t?"var(--accent)":"var(--text-secondary)"},children:e.label})]},e.id)})}),(0,a.jsx)("div",{className:"text-[length:var(--text-footnote)] font-[var(--weight-medium)] text-[var(--text-secondary)] mb-[var(--space-2)]",children:"Accent Color"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-[var(--space-2)] mb-[var(--space-3)]",children:y.map(t=>{let n=e.accentColor===t.value;return(0,a.jsx)("button",{onClick:()=>r(t.value),"aria-label":t.label,title:t.label,className:"w-[32px] h-[32px] rounded-full cursor-pointer transition-all duration-100 ease-[var(--ease-smooth)] flex items-center justify-center",style:{background:t.value,border:n?"2px solid var(--text-primary)":"2px solid transparent",outline:n?`2px solid ${t.value}`:"none",outlineOffset:2},children:n&&(0,a.jsx)(l.Check,{size:14,color:"#fff",strokeWidth:3})},t.value)})}),(0,a.jsxs)("div",{className:"flex items-center gap-[var(--space-3)]",children:[(0,a.jsxs)("label",{className:"flex items-center gap-[var(--space-2)] text-[length:var(--text-footnote)] text-[var(--text-secondary)] cursor-pointer",children:["Custom:",(0,a.jsx)("input",{type:"color",value:e.accentColor??"#3B82F6",onChange:e=>r(e.target.value),className:"w-[28px] h-[28px] border-none rounded-full cursor-pointer bg-transparent p-0"})]}),(0,a.jsx)("input",{type:"text",placeholder:"#3B82F6",value:q,onChange:e=>{J(e.target.value),/^#[0-9a-fA-F]{6}$/.test(e.target.value)&&r(e.target.value)},className:"apple-input w-[90px] px-[8px] py-[4px] text-[length:var(--text-caption1)] bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] text-[var(--text-primary)] font-mono"}),e.accentColor&&(0,a.jsxs)("button",{onClick:()=>r(null),className:"text-[length:var(--text-footnote)] text-[var(--system-blue)] bg-none border-none cursor-pointer p-0 inline-flex items-center gap-[4px]",children:[(0,a.jsx)(n,{size:12}),"リセット"]})]})]}),(0,a.jsx)(f,{title:"COO絵文字",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-3)]",children:"サイドバーに表示される COO の絵文字を選択してください。"}),(0,a.jsxs)("div",{className:"relative flex items-center gap-[var(--space-4)]",children:[(0,a.jsx)("button",{onClick:()=>K(!V),className:"text-4xl cursor-pointer bg-transparent border-none p-0",children:e.portalEmoji??"🧞"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[length:var(--text-body)] font-[var(--weight-semibold)] text-[var(--text-primary)]",children:e.operatorName||"Jimbo"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--text-tertiary)]",children:"絵文字をクリックして変更"})]}),V&&(0,a.jsx)(u.EmojiPicker,{current:e.portalEmoji??"🧞",onSelect:e=>{F(e),K(!1)},onClose:()=>K(!1)})]})]})}),(0,a.jsx)(f,{title:"ブランディング",children:(0,a.jsxs)("div",{className:"flex flex-col gap-[var(--space-3)]",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Portal Name"}),(0,a.jsx)("input",{type:"text",className:"apple-input w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-[10px] py-[6px] text-[length:var(--text-footnote)] text-[var(--text-primary)]",placeholder:"Jinn",value:O,onChange:e=>_(e.target.value),onBlur:()=>{S(O||null),h.api.completeOnboarding({portalName:O||void 0}).catch(()=>{})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Portal Subtitle"}),(0,a.jsx)("input",{type:"text",className:"apple-input w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-[10px] py-[6px] text-[length:var(--text-footnote)] text-[var(--text-primary)]",placeholder:"Command Centre",value:L,onChange:e=>G(e.target.value),onBlur:()=>A(L||null)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Operator Name"}),(0,a.jsx)("input",{type:"text",className:"apple-input w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-[10px] py-[6px] text-[length:var(--text-footnote)] text-[var(--text-primary)]",placeholder:"Your Name",value:R,onChange:e=>$(e.target.value),onBlur:()=>{I(R||null),h.api.completeOnboarding({operatorName:R||void 0}).catch(()=>{})}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Portal Emoji"}),(0,a.jsx)("input",{type:"text",className:"apple-input w-[80px] text-center text-[length:var(--text-title2)] px-[8px] py-[6px] bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)]",placeholder:"\\ud83e\\uddde",value:W,onChange:e=>H(e.target.value),onBlur:()=>F(W||null)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[length:var(--text-caption1)] text-[var(--text-tertiary)] mb-[var(--space-1)]",children:"Language"}),(0,a.jsxs)("select",{value:U,onChange:e=>z(e.target.value),onBlur:()=>{B(U||"English"),h.api.completeOnboarding({language:U||void 0}).catch(()=>{})},className:"w-full bg-[var(--bg-secondary)] border border-[var(--separator)] rounded-[var(--radius-sm)] px-[10px] py-[6px] text-[length:var(--text-footnote)] text-[var(--text-primary)] cursor-pointer",children:[(0,a.jsx)("option",{value:"English",children:"English"}),(0,a.jsx)("option",{value:"Spanish",children:"Spanish"}),(0,a.jsx)("option",{value:"French",children:"French"}),(0,a.jsx)("option",{value:"German",children:"German"}),(0,a.jsx)("option",{value:"Portuguese",children:"Portuguese"}),(0,a.jsx)("option",{value:"Italian",children:"Italian"}),(0,a.jsx)("option",{value:"Dutch",children:"Dutch"}),(0,a.jsx)("option",{value:"Russian",children:"Russian"}),(0,a.jsx)("option",{value:"Chinese",children:"Chinese"}),(0,a.jsx)("option",{value:"Japanese",children:"Japanese"}),(0,a.jsx)("option",{value:"Korean",children:"Korean"}),(0,a.jsx)("option",{value:"Arabic",children:"Arabic"}),(0,a.jsx)("option",{value:"Hindi",children:"Hindi"}),(0,a.jsx)("option",{value:"Bulgarian",children:"Bulgarian"})]})]})]})}),en&&(0,a.jsx)("div",{className:"mb-[var(--space-4)] px-[var(--space-4)] py-[var(--space-3)] rounded-[var(--radius-md)] text-[length:var(--text-footnote)]",style:{background:"success"===en.type?"rgba(34,197,94,0.1)":"rgba(239,68,68,0.1)",border:`1px solid ${"success"===en.type?"rgba(34,197,94,0.3)":"rgba(239,68,68,0.3)"}`,color:"success"===en.type?"var(--system-green)":"var(--system-red)"},children:en.message}),X?(0,a.jsxs)("div",{className:"text-center p-[var(--space-8)] text-[var(--text-tertiary)] text-[length:var(--text-footnote)]",children:[(0,a.jsx)(c,{size:20,className:"mx-auto mb-[var(--space-2)] animate-spin"}),"Loading gateway config..."]}):ee?(0,a.jsxs)("div",{className:"mb-[var(--space-6)] px-[var(--space-4)] py-[var(--space-3)] rounded-[var(--radius-md)] text-[length:var(--text-footnote)] text-[var(--system-red)]",style:{background:"rgba(239,68,68,0.1)",border:"1px solid rgba(239,68,68,0.3)"},children:["Failed to load config: ",ee]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(f,{title:"ゲートウェイ設定",children:[(0,a.jsx)(k,{label:"Port",children:(0,a.jsx)(w,{type:"number",value:String(Y.gateway?.port??""),onChange:e=>ey(["gateway","port"],Number(e)||0),placeholder:"7777"})}),(0,a.jsx)(k,{label:"Host",children:(0,a.jsx)(w,{value:Y.gateway?.host??"",onChange:e=>ey(["gateway","host"],e),placeholder:"127.0.0.1"})}),(0,a.jsx)(k,{label:"Default Engine",children:(0,a.jsx)(C,{value:Y.engines?.default??"claude",onChange:e=>ey(["engines","default"],e),options:[{value:"claude",label:"Claude"},{value:"codex",label:"Codex"}]})})]}),(0,a.jsxs)(f,{title:"エンジン設定",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Claude"}),(0,a.jsx)(k,{label:"Binary Path",children:(0,a.jsx)(w,{value:Y.engines?.claude?.bin??"",onChange:e=>ey(["engines","claude","bin"],e),placeholder:"claude"})}),(0,a.jsx)(k,{label:"Model",children:(0,a.jsx)(C,{value:Y.engines?.claude?.model??"claude-opus-5",onChange:e=>ey(["engines","claude","model"],e),options:j(m,Y.engines?.claude?.model)})}),(0,a.jsx)(k,{label:"Effort Level",children:(0,a.jsx)(C,{value:Y.engines?.claude?.effortLevel??"default",onChange:e=>ey(["engines","claude","effortLevel"],e),options:[{value:"default",label:"Default"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra High"}]})}),(0,a.jsx)(k,{label:"インタラクティブPTY(Max定額)",children:(0,a.jsx)(N,{checked:Y.engines?.claude?.interactive??!1,onChange:e=>ey(["engines","claude","interactive"],e)})}),(0,a.jsxs)("div",{className:"text-[length:var(--text-caption1)] text-[var(--label-secondary)] mt-[4px]",children:["有効にすると Claude の作業ターンを PTY(cc_entrypoint=cli)で実行します。 Claude CLI が Max サブスクリプションでログイン済みなら、API 従量課金ではなく Max 側の利用枠で実行されます。 SSH リモート実行の従業員は headless ",(0,a.jsx)("code",{children:"claude -p"})," にフォールバックします。",(0,a.jsx)("strong",{children:"変更の反映にはゲートウェイの再起動が必要です"}),"(保存後に ",(0,a.jsx)("code",{children:"ryoko stop && ryoko start"})," など)。"]}),(0,a.jsx)("div",{className:"border-t border-[var(--separator)] mt-[var(--space-3)] pt-[var(--space-3)]"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Codex"}),(0,a.jsx)(k,{label:"Binary Path",children:(0,a.jsx)(w,{value:Y.engines?.codex?.bin??"",onChange:e=>ey(["engines","codex","bin"],e),placeholder:"codex"})}),(0,a.jsx)(k,{label:"Model",children:(0,a.jsx)(C,{value:Y.engines?.codex?.model??"gpt-5.6-sol",onChange:e=>ey(["engines","codex","model"],e),options:j(g,Y.engines?.codex?.model)})}),(0,a.jsx)(k,{label:"Effort Level",children:(0,a.jsx)(C,{value:Y.engines?.codex?.effortLevel??"default",onChange:e=>ey(["engines","codex","effortLevel"],e),options:[{value:"default",label:"Default"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra High"}]})})]}),(0,a.jsxs)(f,{title:"セッション",children:[(0,a.jsx)(k,{label:"新規メッセージで中断",children:(0,a.jsx)(N,{checked:Y.sessions?.interruptOnNewMessage??!0,onChange:e=>ey(["sessions","interruptOnNewMessage"],e)})}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--label-secondary)] mt-[4px]",children:"有効にすると、実行中のセッションに新しいメッセージを送ると現在のエージェントを停止し、 すぐに新しいメッセージの処理を開始します。無効時はメッセージはキューに入ります。"}),(0,a.jsx)("div",{className:"border-t border-[var(--separator)] mt-[var(--space-3)] pt-[var(--space-3)]"}),(0,a.jsx)(k,{label:"Claude が利用上限に達した時",children:(0,a.jsx)(C,{value:Y.sessions?.rateLimitStrategy??"fallback",onChange:e=>ey(["sessions","rateLimitStrategy"],e),options:[{value:"wait",label:"待機して自動再開"},{value:"fallback",label:"GPT (Codex) に切り替え"}]})}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] text-[var(--label-secondary)] mt-[4px]",children:"「待機」は Claude のリセットを待ってからセッションを自動再開します。 「切り替え」は即座に GPT で応答し、リセット後に Claude へ戻します。"})]}),(0,a.jsxs)(f,{title:"コネクタ",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Slack"}),(0,a.jsx)(E,{}),(0,a.jsx)(k,{label:"App Token",children:(0,a.jsx)(w,{type:"password",value:Y.connectors?.slack?.appToken??"",onChange:e=>ey(["connectors","slack","appToken"],e),placeholder:"xapp-..."})}),(0,a.jsxs)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-[-4px] mb-[var(--space-2)] pl-[var(--space-1)]",children:["Basic Information → App-Level Tokens で発行したトークン(",(0,a.jsx)("code",{children:"xapp-…"}),")。"]}),(0,a.jsx)(k,{label:"Bot Token",children:(0,a.jsx)(w,{type:"password",value:Y.connectors?.slack?.botToken??"",onChange:e=>ey(["connectors","slack","botToken"],e),placeholder:"xoxb-..."})}),(0,a.jsxs)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mt-[-4px] mb-[var(--space-2)] pl-[var(--space-1)]",children:["ワークスペースにインストール後の OAuth & Permissions → Bot User OAuth Token(",(0,a.jsx)("code",{children:"xoxb-…"}),")。"]}),(0,a.jsx)(k,{label:"チャンネルでセッションを共有",children:(0,a.jsx)(N,{checked:Y.connectors?.slack?.shareSessionInChannel??!1,onChange:e=>ey(["connectors","slack","shareSessionInChannel"],e)})}),(0,a.jsx)(k,{label:"許可ユーザー",children:(0,a.jsx)(w,{value:Array.isArray(Y.connectors?.slack?.allowFrom)?Y.connectors?.slack?.allowFrom?.join(", "):Y.connectors?.slack?.allowFrom??"",onChange:e=>ey(["connectors","slack","allowFrom"],e.trim()?e.split(",").map(e=>e.trim()).filter(Boolean):void 0),placeholder:"U123, U456"})}),(0,a.jsx)(k,{label:"起動時に古いメッセージを無視",children:(0,a.jsx)(N,{checked:Y.connectors?.slack?.ignoreOldMessagesOnBoot??!0,onChange:e=>ey(["connectors","slack","ignoreOldMessagesOnBoot"],e)})}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mt-[var(--space-3)] mb-[var(--space-2)]",children:"応答ゲート(respondTo)"}),["im","mpim","channel"].map(e=>(0,a.jsx)(k,{label:"im"===e?"DM(1対1)":"mpim"===e?"グループDM":"チャンネル",children:(0,a.jsx)(C,{value:Y.connectors?.slack?.respondTo?.[e]??"always",onChange:a=>ey(["connectors","slack","respondTo",e],a),options:[{value:"always",label:"常に応答"},{value:"mention",label:"@メンション時のみ"},{value:"never",label:"応答しない"}]})},e)),(0,a.jsx)(k,{label:"参加済みスレッドは再メンション不要",children:(0,a.jsx)(N,{checked:Y.connectors?.slack?.respondTo?.engagedThreads??!0,onChange:e=>ey(["connectors","slack","respondTo","engagedThreads"],e)})}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mt-[var(--space-3)] mb-[var(--space-2)]",children:"空気読みトリアージ"}),(0,a.jsx)(k,{label:"有効化",children:(0,a.jsx)(N,{checked:Y.connectors?.slack?.triage?.enabled??!1,onChange:e=>{ey(["connectors","slack","triage","enabled"],e),e&&!Y.connectors?.slack?.triage?.engine&&ey(["connectors","slack","triage","engine"],"codex"),e&&!Y.connectors?.slack?.triage?.model&&ey(["connectors","slack","triage","model"],"gpt-5-nano")}})}),(0,a.jsx)(k,{label:"Engine",children:(0,a.jsx)(C,{value:Y.connectors?.slack?.triage?.engine??"codex",onChange:e=>ey(["connectors","slack","triage","engine"],e),options:[{value:"codex",label:"Codex (lightweight)"},{value:"claude",label:"Claude"}]})}),(0,a.jsx)(k,{label:"Model",children:(0,a.jsx)(C,{value:Y.connectors?.slack?.triage?.model??"",onChange:e=>ey(["connectors","slack","triage","model"],e||void 0),options:[{value:"",label:"自動(エンジン既定)"},...j(b(Y.connectors?.slack?.triage?.engine??"codex"),Y.connectors?.slack?.triage?.model)]})}),(0,a.jsx)(k,{label:"タイムアウト (ms)",children:(0,a.jsx)(w,{type:"number",value:Y.connectors?.slack?.triage?.timeoutMs!==void 0?String(Y.connectors.slack.triage.timeoutMs):"",onChange:e=>ey(["connectors","slack","triage","timeoutMs"],e.trim()?Number(e):void 0),placeholder:"20000"})}),(0,a.jsx)(k,{label:"スレッド文脈の取得件数",children:(0,a.jsx)(w,{type:"number",value:Y.connectors?.slack?.triage?.threadContextLimit!==void 0?String(Y.connectors.slack.triage.threadContextLimit):"",onChange:e=>ey(["connectors","slack","triage","threadContextLimit"],e.trim()?Number(e):void 0),placeholder:"10"})}),(0,a.jsx)(k,{label:"ペルソナ(任意)",children:(0,a.jsx)(w,{value:Y.connectors?.slack?.triage?.persona??"",onChange:e=>ey(["connectors","slack","triage","persona"],e.trim()||void 0),placeholder:"Short description of what this bot is good at"})}),(0,a.jsx)(k,{label:"バイナリパス上書き(任意)",children:(0,a.jsx)(w,{value:Y.connectors?.slack?.triage?.bin??"",onChange:e=>ey(["connectors","slack","triage","bin"],e.trim()||void 0),placeholder:"codex"})}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mt-[var(--space-3)] mb-[var(--space-2)]",children:"Goal 判定"}),(0,a.jsx)(k,{label:"有効化",children:(0,a.jsx)(N,{checked:Y.connectors?.slack?.goalExtraction?.enabled??!1,onChange:e=>{ey(["connectors","slack","goalExtraction","enabled"],e),e&&!Y.connectors?.slack?.goalExtraction?.engine&&ey(["connectors","slack","goalExtraction","engine"],"codex"),e&&!Y.connectors?.slack?.goalExtraction?.model&&ey(["connectors","slack","goalExtraction","model"],"gpt-5-nano")}})}),(0,a.jsx)(k,{label:"Engine",children:(0,a.jsx)(C,{value:Y.connectors?.slack?.goalExtraction?.engine??"codex",onChange:e=>ey(["connectors","slack","goalExtraction","engine"],e),options:[{value:"codex",label:"Codex (lightweight)"},{value:"claude",label:"Claude"}]})}),(0,a.jsx)(k,{label:"Model",children:(0,a.jsx)(C,{value:Y.connectors?.slack?.goalExtraction?.model??"",onChange:e=>ey(["connectors","slack","goalExtraction","model"],e||void 0),options:[{value:"",label:"自動(エンジン既定)"},...j(b(Y.connectors?.slack?.goalExtraction?.engine??"codex"),Y.connectors?.slack?.goalExtraction?.model)]})}),(0,a.jsx)(k,{label:"タイムアウト (ms)",children:(0,a.jsx)(w,{type:"number",value:Y.connectors?.slack?.goalExtraction?.timeoutMs!==void 0?String(Y.connectors.slack.goalExtraction.timeoutMs):"",onChange:e=>ey(["connectors","slack","goalExtraction","timeoutMs"],e.trim()?Number(e):void 0),placeholder:"30000"})}),(0,a.jsx)(k,{label:"バイナリパス上書き(任意)",children:(0,a.jsx)(w,{value:Y.connectors?.slack?.goalExtraction?.bin??"",onChange:e=>ey(["connectors","slack","goalExtraction","bin"],e.trim()||void 0),placeholder:"codex"})}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mt-[var(--space-3)] mb-[var(--space-2)]",children:"Agents View Canvas"}),Y.connectors?.slack?.appToken&&Y.connectors?.slack?.botToken&&!Y.connectors?.slack?.agentsCanvas?.enabled&&(0,a.jsxs)("div",{className:"mx-[var(--space-2)] mb-[var(--space-3)] p-[var(--space-3)] rounded-[var(--radius-md)] border border-[var(--accent-fill)] bg-[color-mix(in_srgb,var(--accent-fill)_30%,transparent)]",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-subheadline)] font-[var(--weight-semibold)] text-[var(--text-primary)] mb-[var(--space-1)]",children:"💡 Slack 連携済みです — Canvas も有効化してみませんか?"}),(0,a.jsxs)("div",{className:"text-[length:var(--text-caption1)] text-[var(--text-secondary)]",children:["いま動いている全 Ryoko セッションが Slack の Canvas タブにライブ表示されます。 下の「有効化」を ON にしてチャンネルを選ぶだけで30秒以内に作成されます。 必要 scope は ",(0,a.jsx)("code",{className:"text-[var(--accent)]",children:"canvases:write"})," と",(0,a.jsx)("code",{className:"text-[var(--accent)] ml-1",children:"canvases:read"}),"(manifest を貼り直して reinstall すれば自動)。"]})]}),(0,a.jsxs)("p",{className:"text-[length:var(--text-caption1)] text-[var(--text-secondary)] mb-[var(--space-2)] px-[var(--space-2)]",children:["今動いている Ryoko のセッション一覧(running / waiting / errored / idle) を Slack の Canvas に自動同期します。指定したチャンネル直下のタブとして 常に最新状態が見えるようになります。Bot に",(0,a.jsx)("code",{className:"mx-1 text-[var(--accent)]",children:"canvases:write"}),"と",(0,a.jsx)("code",{className:"mx-1 text-[var(--accent)]",children:"canvases:read"}),"scope が必要です(上の Slack App Manifest を貼り直して reinstall すれば 自動で揃います)。"]}),(0,a.jsx)(k,{label:"有効化",children:(0,a.jsx)(N,{checked:Y.connectors?.slack?.agentsCanvas?.enabled??!1,onChange:e=>ey(["connectors","slack","agentsCanvas","enabled"],e)})}),(0,a.jsx)(k,{label:"表示先チャンネル",children:(0,a.jsxs)("div",{className:"flex w-full gap-[var(--space-2)] items-center",children:[ex&&ex.length>0?(0,a.jsxs)("select",{className:"flex-1 bg-[var(--surface-secondary)] border border-[var(--separator)] rounded-[var(--radius-control)] px-[var(--space-3)] py-[var(--space-2)] text-[length:var(--text-body)]",value:Y.connectors?.slack?.agentsCanvas?.channelId??"",onChange:e=>ey(["connectors","slack","agentsCanvas","channelId"],e.target.value||void 0),children:[(0,a.jsx)("option",{value:"",children:"— 選択してください —"}),ex.map(e=>(0,a.jsxs)("option",{value:e.id,children:[e.isPrivate?"🔒 ":"#",e.name]},e.id))]}):(0,a.jsx)(w,{value:Y.connectors?.slack?.agentsCanvas?.channelId??"",onChange:e=>ey(["connectors","slack","agentsCanvas","channelId"],e.trim()||void 0),placeholder:"C01234ABCDE — bot が member のチャンネル"}),(0,a.jsx)("button",{type:"button",onClick:eb,disabled:eh,className:"px-[var(--space-3)] py-[var(--space-2)] text-[length:var(--text-caption1)] bg-[var(--surface-secondary)] border border-[var(--separator)] rounded-[var(--radius-control)] hover:bg-[var(--surface-tertiary)] disabled:opacity-50",children:eh?(0,a.jsx)(c,{className:"h-4 w-4 animate-spin"}):ex?"更新":"読み込み"})]})}),em?(0,a.jsx)("p",{className:"text-[length:var(--text-caption1)] text-[var(--accent-red,#ef4444)] px-[var(--space-2)] -mt-[var(--space-1)] mb-[var(--space-2)]",children:em}):null,(0,a.jsx)(k,{label:"Canvas タイトル",children:(0,a.jsx)(w,{value:Y.connectors?.slack?.agentsCanvas?.title??"",onChange:e=>ey(["connectors","slack","agentsCanvas","title"],e.trim()||void 0),placeholder:"Ryoko Agents View"})}),(0,a.jsx)(k,{label:"更新間隔 (ms)",children:(0,a.jsx)(w,{type:"number",value:Y.connectors?.slack?.agentsCanvas?.pollIntervalMs!==void 0?String(Y.connectors.slack.agentsCanvas.pollIntervalMs):"",onChange:e=>ey(["connectors","slack","agentsCanvas","pollIntervalMs"],e.trim()?Number(e):void 0),placeholder:"30000(30秒, 最小 5000)"})}),(0,a.jsx)(k,{label:"グループ毎の最大表示件数",children:(0,a.jsx)(w,{type:"number",value:Y.connectors?.slack?.agentsCanvas?.maxPerGroup!==void 0?String(Y.connectors.slack.agentsCanvas.maxPerGroup):"",onChange:e=>ey(["connectors","slack","agentsCanvas","maxPerGroup"],e.trim()?Number(e):void 0),placeholder:"10"})}),(0,a.jsx)("div",{className:"border-t border-[var(--separator)] mt-[var(--space-3)] pt-[var(--space-3)]"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Discord"}),(0,a.jsx)(k,{label:"Bot Token",children:(0,a.jsx)(w,{type:"password",value:Y.connectors?.discord?.botToken??"",onChange:e=>ey(["connectors","discord","botToken"],e),placeholder:"Bot token..."})}),(0,a.jsx)(k,{label:"Allow From",children:(0,a.jsx)(w,{value:Array.isArray(Y.connectors?.discord?.allowFrom)?Y.connectors?.discord?.allowFrom?.join(", "):Y.connectors?.discord?.allowFrom??"",onChange:e=>ey(["connectors","discord","allowFrom"],e.trim()?e.split(",").map(e=>e.trim()).filter(Boolean):void 0),placeholder:"User IDs, comma-separated (optional)"})}),(0,a.jsx)(k,{label:"Guild ID",children:(0,a.jsx)(w,{value:Y.connectors?.discord?.guildId??"",onChange:e=>ey(["connectors","discord","guildId"],e.trim()||void 0),placeholder:"サーバー/Guild ID(任意)"})}),(0,a.jsx)(k,{label:"Channel ID",children:(0,a.jsx)(w,{value:Y.connectors?.discord?.channelId??"",onChange:e=>ey(["connectors","discord","channelId"],e.trim()||void 0),placeholder:"このチャンネルに限定(右クリック → Copy Channel ID)"})}),(0,a.jsx)("div",{className:"border-t border-[var(--separator)] mt-[var(--space-3)] pt-[var(--space-3)]"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Telegram"}),(0,a.jsx)(k,{label:"Bot Token",children:(0,a.jsx)(w,{type:"password",value:Y.connectors?.telegram?.botToken??"",onChange:e=>ey(["connectors","telegram","botToken"],e),placeholder:"123456:ABC-DEF..."})}),(0,a.jsx)(k,{label:"許可ユーザー (User ID)",children:(0,a.jsx)(w,{value:Array.isArray(Y.connectors?.telegram?.allowFrom)?Y.connectors?.telegram?.allowFrom?.join(", "):"",onChange:e=>ey(["connectors","telegram","allowFrom"],e.trim()?e.split(",").map(e=>Number(e.trim())).filter(e=>!isNaN(e)):void 0),placeholder:"Telegram の User ID をカンマ区切り(任意)"})}),(0,a.jsx)(k,{label:"起動時に古いメッセージを無視",children:(0,a.jsx)(N,{checked:Y.connectors?.telegram?.ignoreOldMessagesOnBoot??!0,onChange:e=>ey(["connectors","telegram","ignoreOldMessagesOnBoot"],e)})}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mt-[var(--space-4)] mb-[var(--space-2)]",children:"WhatsApp"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mb-[var(--space-3)]",children:"初回起動時、下のQRコードを WhatsApp アプリでスキャンして接続してください。認証情報は次回以降キャッシュされます。"}),(0,a.jsx)(k,{label:"認証ディレクトリ",children:(0,a.jsx)(w,{value:Y.connectors?.whatsapp?.authDir??"",onChange:e=>ey(["connectors","whatsapp","authDir"],e.trim()||void 0),placeholder:"デフォルト: ~/.ryoko/.whatsapp-auth"})}),(0,a.jsx)(k,{label:"許可送信元",children:(0,a.jsx)(w,{value:Array.isArray(Y.connectors?.whatsapp?.allowFrom)?Y.connectors?.whatsapp?.allowFrom?.join(", "):"",onChange:e=>ey(["connectors","whatsapp","allowFrom"],e.trim()?e.split(",").map(e=>e.trim()).filter(Boolean):void 0),placeholder:"447700900000@s.whatsapp.net, ...(任意)"})}),el&&(0,a.jsxs)("div",{className:"mt-[var(--space-3)] flex flex-col items-center gap-[var(--space-2)]",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-semibold text-[var(--text-secondary)]",children:"WhatsApp でスキャンして接続"}),(0,a.jsx)("img",{src:el,alt:"WhatsApp QRコード",className:"w-[200px] h-[200px] rounded-[var(--radius-md)] border border-[var(--separator)] bg-white p-[8px]"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)]",children:"WhatsApp → リンク済み端末 → 端末をリンク"})]}),Y.connectors?.whatsapp&&"ok"===ec&&(0,a.jsx)("div",{className:"mt-[var(--space-2)] text-[length:var(--text-caption1)] text-[var(--system-green)] font-semibold",children:"✓ 接続済み"}),(0,a.jsx)("div",{className:"border-t border-[var(--separator)] mt-[var(--space-3)] pt-[var(--space-3)]"}),(0,a.jsxs)("div",{className:"flex items-center justify-between mb-[var(--space-2)]",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)]",children:"コネクタインスタンス"}),(0,a.jsxs)("div",{className:"flex items-center gap-[var(--space-2)]",children:[(0,a.jsxs)("button",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-secondary)] hover:text-[var(--accent)] transition-colors flex items-center gap-1",onClick:async()=>{try{let e=await h.api.reloadConnectors(),a=[];e.stopped.length&&a.push(`Stopped: ${e.stopped.join(", ")}`),e.started.length&&a.push(`Started: ${e.started.join(", ")}`),e.errors.length&&a.push(`Errors: ${e.errors.join(", ")}`),alert(a.length?a.join("\n"):"No connector instances to reload")}catch{alert("Failed to reload connectors")}},children:[(0,a.jsx)(n,{size:12}),"Reload"]}),(0,a.jsx)("button",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--accent)] hover:opacity-80 transition-opacity",onClick:()=>{let e=[...Y.connectors?.instances||[]],a=`discord-${e.length+1}`;e.push({id:a,type:"discord"}),ey(["connectors","instances"],e)},children:"+ Add Instance"})]})]}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mb-[var(--space-3)]",children:"Add multiple connector instances of the same type, each bound to a specific employee."}),(Y.connectors?.instances||[]).map((e,t)=>(0,a.jsxs)("div",{className:"mb-[var(--space-4)] p-[var(--space-3)] rounded-[var(--radius-md)] border border-[var(--separator)] bg-[var(--bg-secondary)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-[var(--space-2)]",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-subheadline)] font-[var(--weight-semibold)] text-[var(--text-primary)]",children:e.id||`Instance ${t+1}`}),(0,a.jsx)("button",{className:"text-[var(--system-red)] hover:opacity-80 transition-opacity p-[var(--space-1)]",onClick:()=>{let e=[...Y.connectors?.instances||[]];e.splice(t,1),ey(["connectors","instances"],e.length>0?e:void 0)},children:(0,a.jsx)(s.Trash2,{size:14})})]}),(0,a.jsx)(k,{label:"Instance ID",children:(0,a.jsx)(w,{value:e.id??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],id:e},ey(["connectors","instances"],a)},placeholder:"e.g. discord-vox"})}),(0,a.jsx)(k,{label:"Type",children:(0,a.jsx)(C,{value:e.type??"discord",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],type:e},ey(["connectors","instances"],a)},options:[{value:"discord",label:"Discord"},{value:"slack",label:"Slack"},{value:"whatsapp",label:"WhatsApp"}]})}),(0,a.jsx)(k,{label:"Employee",children:(0,a.jsx)(C,{value:e.employee??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],employee:e||void 0},ey(["connectors","instances"],a)},options:[{value:"",label:"Default (COO)"},...ed.map(e=>({value:e.name,label:e.displayName}))]})}),("discord"===e.type||!e.type)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{label:"Bot Token",children:(0,a.jsx)(w,{type:"password",value:e.botToken??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],botToken:e},ey(["connectors","instances"],a)},placeholder:"Bot token..."})}),(0,a.jsx)(k,{label:"Guild ID",children:(0,a.jsx)(w,{value:e.guildId??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],guildId:e.trim()||void 0},ey(["connectors","instances"],a)},placeholder:"Server/Guild ID"})}),(0,a.jsx)(k,{label:"Channel ID",children:(0,a.jsx)(w,{value:e.channelId??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],channelId:e.trim()||void 0},ey(["connectors","instances"],a)},placeholder:"Restrict to channel (optional)"})}),(0,a.jsx)(k,{label:"Allow From",children:(0,a.jsx)(w,{value:Array.isArray(e.allowFrom)?e.allowFrom.join(", "):e.allowFrom??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],allowFrom:e.trim()?e.split(",").map(e=>e.trim()).filter(Boolean):void 0},ey(["connectors","instances"],a)},placeholder:"User IDs, comma-separated (optional)"})})]}),"slack"===e.type&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{label:"App Token",children:(0,a.jsx)(w,{type:"password",value:e.appToken??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],appToken:e},ey(["connectors","instances"],a)},placeholder:"xapp-..."})}),(0,a.jsx)(k,{label:"Bot Token",children:(0,a.jsx)(w,{type:"password",value:e.botToken??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],botToken:e},ey(["connectors","instances"],a)},placeholder:"xoxb-..."})})]}),"whatsapp"===e.type&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{label:"Auth Directory",children:(0,a.jsx)(w,{value:e.authDir??"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],authDir:e.trim()||void 0},ey(["connectors","instances"],a)},placeholder:"Default: ~/.jinn/.whatsapp-auth"})}),(0,a.jsx)(k,{label:"Allow From",children:(0,a.jsx)(w,{value:Array.isArray(e.allowFrom)?e.allowFrom.join(", "):"",onChange:e=>{let a=[...Y.connectors?.instances||[]];a[t]={...a[t],allowFrom:e.trim()?e.split(",").map(e=>e.trim()).filter(Boolean):void 0},ey(["connectors","instances"],a)},placeholder:"Phone JIDs, comma-separated"})})]})]},e.id||t)),(0,a.jsx)("div",{className:"border-t border-[var(--separator)] mt-[var(--space-3)] pt-[var(--space-3)]"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Web UI"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)]",children:"Web conversations use queued one-shot resume flow for both engines."})]}),(0,a.jsxs)(f,{title:"Cron",children:[(0,a.jsx)("div",{className:"text-[length:var(--text-caption1)] font-[var(--weight-semibold)] text-[var(--text-tertiary)] mb-[var(--space-2)]",children:"Default Delivery"}),(0,a.jsx)("div",{className:"text-[length:var(--text-caption2)] text-[var(--text-tertiary)] mb-[var(--space-3)]",children:"When a cron job has no delivery configured, results will be sent here."}),(0,a.jsx)(k,{label:"Connector",children:(0,a.jsx)(C,{value:Y.cron?.defaultDelivery?.connector??"",onChange:e=>ey(["cron","defaultDelivery","connector"],e||void 0),options:[{value:"",label:"None (fire & forget)"},{value:"web",label:"Web"},{value:"slack",label:"Slack"}]})}),Y.cron?.defaultDelivery?.connector&&(0,a.jsx)(k,{label:"Channel",children:(0,a.jsx)(w,{value:Y.cron?.defaultDelivery?.channel??"",onChange:e=>ey(["cron","defaultDelivery","channel"],e),placeholder:"#general"})})]}),(0,a.jsxs)(f,{title:"Logging",children:[(0,a.jsx)(k,{label:"Level",children:(0,a.jsx)(C,{value:Y.logging?.level??"info",onChange:e=>ey(["logging","level"],e),options:[{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}]})}),(0,a.jsx)(k,{label:"Stdout",children:(0,a.jsx)(N,{checked:Y.logging?.stdout??!0,onChange:e=>ey(["logging","stdout"],e)})}),(0,a.jsx)(k,{label:"File Logging",children:(0,a.jsx)(N,{checked:Y.logging?.file??!1,onChange:e=>ey(["logging","file"],e)})})]}),(0,a.jsx)(T,{}),(0,a.jsxs)("div",{className:"flex justify-end gap-[var(--space-3)] mb-[var(--space-6)]",children:[(0,a.jsxs)("button",{onClick:()=>ej(),className:"px-[var(--space-4)] py-[var(--space-2)] rounded-[var(--radius-md)] bg-[var(--fill-tertiary)] text-[var(--text-secondary)] border-none cursor-pointer text-[length:var(--text-footnote)] font-[var(--weight-medium)] inline-flex items-center gap-[6px]",children:[(0,a.jsx)(n,{size:14}),"再読み込み"]}),(0,a.jsxs)("button",{onClick:function(){er(!0),es(null),h.api.updateConfig(Y).then(e=>{if(e?.connectorsReloadError)return void es({type:"error",message:`Settings saved but connector reload failed: ${e.connectorsReloadError}`});let a=e?.connectorsReload?.errors??[];e?.status==="partial"||a.length>0?es({type:"error",message:`Settings saved but ${a.length} connector(s) failed: ${a.join("; ")}`}):es({type:"success",message:"Settings saved successfully"})}).catch(e=>es({type:"error",message:`Failed to save: ${e.message}`})).finally(()=>er(!1))},disabled:et,className:"px-[var(--space-5)] py-[var(--space-2)] rounded-[var(--radius-md)] bg-[var(--accent)] text-[var(--accent-contrast)] border-none text-[length:var(--text-footnote)] font-[var(--weight-semibold)] inline-flex items-center gap-[6px] transition-all duration-150 ease-[var(--ease-smooth)]",style:{cursor:et?"wait":"pointer",opacity:et?.7:1},children:[(0,a.jsx)(o,{size:14}),et?"保存中…":"設定を保存"]})]})]}),(0,a.jsx)(f,{title:"リセット",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-[var(--space-3)] flex-wrap",children:[(0,a.jsxs)("button",{onClick:()=>{localStorage.removeItem("jinn-onboarded"),window.location.reload()},className:"px-[var(--space-5)] py-[var(--space-2)] rounded-[var(--radius-md)] bg-[var(--accent)] text-[var(--accent-contrast)] border-none cursor-pointer text-[length:var(--text-footnote)] font-[var(--weight-semibold)] transition-all duration-150 ease-[var(--ease-spring)] inline-flex items-center gap-[var(--space-2)]",children:[(0,a.jsx)(n,{size:14}),"オンボーディングを再実行"]}),(0,a.jsxs)("button",{onClick:()=>{window.confirm("すべての設定を初期値に戻しますか?")&&(localStorage.removeItem("jinn-settings"),localStorage.removeItem("jinn-theme"),D(),window.location.reload())},className:"px-[var(--space-5)] py-[var(--space-2)] rounded-[var(--radius-md)] bg-[var(--system-red)] text-white border-none cursor-pointer text-[length:var(--text-footnote)] font-[var(--weight-semibold)] transition-all duration-150 ease-[var(--ease-spring)] inline-flex items-center gap-[var(--space-2)]",children:[(0,a.jsx)(s.Trash2,{size:14}),"すべての設定をリセット"]})]})})]})})})}],15857)}]);