thursday-agent 0.30.0 → 0.31.0

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 (197) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +1 -1
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found.html +1 -1
  11. package/.next/server/app/_not-found.rsc +1 -1
  12. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  16. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  17. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  18. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  19. package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/thread/lessons/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/tool-result/[id]/route.js.nft.json +1 -1
  23. package/.next/server/app/api/config/route.js.nft.json +1 -1
  24. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
  26. package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/llm-model/credits/[provider]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  29. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  30. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  31. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  32. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  33. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  34. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  35. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  36. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  37. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  38. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  39. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  40. package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
  41. package/.next/server/app/api/thursday/call/plan/route.js.nft.json +1 -1
  42. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  43. package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
  44. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  45. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  46. package/.next/server/app/api/update/route.js.nft.json +1 -1
  47. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  48. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  49. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
  50. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  51. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/page/server-reference-manifest.json +71 -71
  53. package/.next/server/app/page.js.nft.json +1 -1
  54. package/.next/server/app/page_client-reference-manifest.js +1 -1
  55. package/.next/server/chunks/[root-of-the-server]__0sg3_9d._.js +1 -1
  56. package/.next/server/chunks/[root-of-the-server]__0wnd1ac._.js +1 -1
  57. package/.next/server/chunks/[root-of-the-server]__10x2qg8._.js +2 -2
  58. package/.next/server/chunks/[root-of-the-server]__1bk734v._.js +1 -1
  59. package/.next/server/chunks/[root-of-the-server]__1rs2v4h._.js +1 -1
  60. package/.next/server/chunks/_0jzv71c._.js +2 -2
  61. package/.next/server/chunks/ssr/[root-of-the-server]__0auk-ke._.js +1 -1
  62. package/.next/server/chunks/ssr/{[root-of-the-server]__0rpm20m._.js → [root-of-the-server]__0k7utnr._.js} +2 -2
  63. package/.next/server/chunks/ssr/{[root-of-the-server]__0x2--_p._.js → [root-of-the-server]__0q3gl-j._.js} +2 -2
  64. package/.next/server/chunks/ssr/{[root-of-the-server]__0ama9d0._.js → [root-of-the-server]__0w1mcuc._.js} +2 -2
  65. package/.next/server/chunks/ssr/{[root-of-the-server]__145268e._.js → [root-of-the-server]__188x-0h._.js} +2 -2
  66. package/.next/server/chunks/ssr/{[root-of-the-server]__0p0cgo1._.js → [root-of-the-server]__1e4oxhz._.js} +2 -2
  67. package/.next/server/chunks/ssr/[root-of-the-server]__1j-bkt7._.js +1 -1
  68. package/.next/server/chunks/ssr/{[root-of-the-server]__153-ebp._.js → [root-of-the-server]__20dnr0-._.js} +2 -2
  69. package/.next/server/chunks/ssr/{_1fua8fv._.js → _058z7m3._.js} +2 -2
  70. package/.next/server/chunks/ssr/{_0rm-9aj._.js → _0a6m-4f._.js} +2 -2
  71. package/.next/server/chunks/ssr/_0akma_h._.js +1 -1
  72. package/.next/server/chunks/ssr/{_1q30h74._.js → _0bapnk-._.js} +2 -2
  73. package/.next/server/chunks/ssr/_0e7c-z3._.js +3 -0
  74. package/.next/server/chunks/ssr/_0gx6qzr._.js +1 -1
  75. package/.next/server/chunks/ssr/{_0k06tdw._.js → _0mwfawz._.js} +3 -3
  76. package/.next/server/chunks/ssr/_0pg2mgq._.js +1 -1
  77. package/.next/server/chunks/ssr/{_18cjc9o._.js → _0r-q97k._.js} +2 -2
  78. package/.next/server/chunks/ssr/{_1x_6jyh._.js → _0xs4a-f._.js} +2 -2
  79. package/.next/server/chunks/ssr/{_0732nef._.js → _0zajldg._.js} +2 -2
  80. package/.next/server/chunks/ssr/_14f64h2._.js +1 -1
  81. package/.next/server/chunks/ssr/_16_7zeo._.js +1 -1
  82. package/.next/server/chunks/ssr/_17fa2ns._.js +5 -5
  83. package/.next/server/chunks/ssr/{_0p18b0z._.js → _18dem-7._.js} +2 -2
  84. package/.next/server/chunks/ssr/_1_px1o-._.js +1 -1
  85. package/.next/server/chunks/ssr/_1e_9qjr._.js +1 -1
  86. package/.next/server/chunks/ssr/_1ehd80b._.js +1 -1
  87. package/.next/server/chunks/ssr/_1f59vze._.js +1 -1
  88. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  89. package/.next/server/chunks/ssr/{_0l_qakv._.js → _1p5s8eb._.js} +2 -2
  90. package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
  91. package/.next/server/chunks/ssr/{components_ui_markdown-body_tsx_0ywzjrl._.js → components_ui_markdown-body_tsx_0qqkcnl._.js} +2 -2
  92. package/.next/server/chunks/ssr/features_0rrgq_t._.js +1 -1
  93. package/.next/server/chunks/ssr/features_ai_components_model-picker_tsx_0ucb1y9._.js +1 -1
  94. package/.next/server/chunks/ssr/features_bot_components_01ye2wp._.js +1 -1
  95. package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +1 -1
  96. package/.next/server/chunks/ssr/features_bot_components_thread-setting_tsx_0yae7zy._.js +1 -1
  97. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  98. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  99. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  100. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  101. package/.next/server/chunks/ssr/features_skills_components_skills-setting_tsx_1wtuuip._.js +1 -1
  102. package/.next/server/chunks/ssr/features_thursday_components_thursday-setting_tsx_1_6ydrc._.js +1 -1
  103. package/.next/server/chunks/ssr/{node_modules_0er1nmg._.js → node_modules_0-1vgbg._.js} +2 -2
  104. package/.next/server/chunks/ssr/{node_modules_0a1kt26._.js → node_modules_0-ckar9._.js} +1 -1
  105. package/.next/server/chunks/ssr/{node_modules_0ze7604._.js → node_modules_00k__rl._.js} +1 -1
  106. package/.next/server/chunks/ssr/{node_modules_1bjctcm._.js → node_modules_00pm_md._.js} +1 -1
  107. package/.next/server/chunks/ssr/{node_modules_1axn4aw._.js → node_modules_01awxzc._.js} +2 -2
  108. package/.next/server/chunks/ssr/{node_modules_0ahwwc6._.js → node_modules_02r5cr9._.js} +2 -2
  109. package/.next/server/chunks/ssr/{node_modules_1vmqt-a._.js → node_modules_02y56-t._.js} +1 -1
  110. package/.next/server/chunks/ssr/{node_modules_060s01j._.js → node_modules_03qy_-5._.js} +2 -2
  111. package/.next/server/chunks/ssr/{node_modules_116k0n3._.js → node_modules_04-wxwz._.js} +1 -1
  112. package/.next/server/chunks/ssr/{node_modules_0u78wn3._.js → node_modules_062omwz._.js} +1 -1
  113. package/.next/server/chunks/ssr/{node_modules_0ntw_qg._.js → node_modules_06bncpv._.js} +1 -1
  114. package/.next/server/chunks/ssr/{node_modules_1mwxdhp._.js → node_modules_06c813r._.js} +1 -1
  115. package/.next/server/chunks/ssr/{node_modules_08xo4p2._.js → node_modules_0bnvlu3._.js} +2 -2
  116. package/.next/server/chunks/ssr/{node_modules_1d7evv9._.js → node_modules_0bo8_3v._.js} +1 -1
  117. package/.next/server/chunks/ssr/{node_modules_1le-lim._.js → node_modules_0cmpor-._.js} +2 -2
  118. package/.next/server/chunks/ssr/{node_modules_0py4_6y._.js → node_modules_0dmey3c._.js} +1 -1
  119. package/.next/server/chunks/ssr/{node_modules_0mujceo._.js → node_modules_0e82d9d._.js} +1 -1
  120. package/.next/server/chunks/ssr/{node_modules_03gt5eg._.js → node_modules_0fv219v._.js} +1 -1
  121. package/.next/server/chunks/ssr/{node_modules_09e0lw8._.js → node_modules_0i60h5u._.js} +1 -1
  122. package/.next/server/chunks/ssr/{node_modules_1ih7lxu._.js → node_modules_0p6fpim._.js} +2 -2
  123. package/.next/server/chunks/ssr/{node_modules_1dm5c-u._.js → node_modules_0qfnopf._.js} +1 -1
  124. package/.next/server/chunks/ssr/{node_modules_1tfn213._.js → node_modules_0upd5np._.js} +2 -2
  125. package/.next/server/chunks/ssr/{node_modules_1lnx_h4._.js → node_modules_0uqdbkl._.js} +1 -1
  126. package/.next/server/chunks/ssr/{node_modules_1cxx8tm._.js → node_modules_0v_sl8f._.js} +1 -1
  127. package/.next/server/chunks/ssr/{node_modules_1_c3zat._.js → node_modules_0vz0i7n._.js} +2 -2
  128. package/.next/server/chunks/ssr/{node_modules_1fdivhl._.js → node_modules_0wuqamc._.js} +1 -1
  129. package/.next/server/chunks/ssr/{node_modules_1depc7o._.js → node_modules_0ww0cj5._.js} +1 -1
  130. package/.next/server/chunks/ssr/{node_modules_16hmz5b._.js → node_modules_0xyg93a._.js} +1 -1
  131. package/.next/server/chunks/ssr/{node_modules_1kpg87p._.js → node_modules_0yt7v4_._.js} +1 -1
  132. package/.next/server/chunks/ssr/{node_modules_1q2a30m._.js → node_modules_10d_dh1._.js} +2 -2
  133. package/.next/server/chunks/ssr/{node_modules_03ytewb._.js → node_modules_12mf6-b._.js} +1 -1
  134. package/.next/server/chunks/ssr/{node_modules_0i2j6g6._.js → node_modules_16gjro8._.js} +1 -1
  135. package/.next/server/chunks/ssr/{node_modules_05yikon._.js → node_modules_16n2qm5._.js} +1 -1
  136. package/.next/server/chunks/ssr/{node_modules_1soi3y1._.js → node_modules_17cgr9d._.js} +2 -2
  137. package/.next/server/chunks/ssr/{node_modules_208s6_i._.js → node_modules_18-rz5f._.js} +1 -1
  138. package/.next/server/chunks/ssr/{node_modules_0ka66-h._.js → node_modules_1_sver8._.js} +1 -1
  139. package/.next/server/chunks/ssr/{node_modules_15_65ve._.js → node_modules_1_w2wh5._.js} +1 -1
  140. package/.next/server/chunks/ssr/{node_modules_0f3769j._.js → node_modules_1aa913r._.js} +1 -1
  141. package/.next/server/chunks/ssr/{node_modules_19xrd6b._.js → node_modules_1aptu5w._.js} +2 -2
  142. package/.next/server/chunks/ssr/{node_modules_0fi5we8._.js → node_modules_1cu3h7h._.js} +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_0sk7kv9._.js → node_modules_1d3101y._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_0mihldg._.js → node_modules_1d3tnng._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_07k-xj6._.js → node_modules_1dd8593._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_0c2vpni._.js → node_modules_1evm05k._.js} +2 -2
  147. package/.next/server/chunks/ssr/{node_modules_1sphzx9._.js → node_modules_1fs4p56._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_0qu8a5o._.js → node_modules_1jsmkvt._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_0ted14c._.js → node_modules_1lj69na._.js} +2 -2
  150. package/.next/server/chunks/ssr/{node_modules_02p2t58._.js → node_modules_1p53mn1._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_1gxpcyd._.js → node_modules_1tecvpz._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_1w8ljz0._.js → node_modules_1voere2._.js} +2 -2
  153. package/.next/server/chunks/ssr/{node_modules_16ki2uq._.js → node_modules_1wa6ii9._.js} +1 -1
  154. package/.next/server/chunks/ssr/{node_modules_0e7nwfw._.js → node_modules_1wvsdzr._.js} +1 -1
  155. package/.next/server/chunks/ssr/{node_modules_0umtxxj._.js → node_modules_1x6dj-b._.js} +1 -1
  156. package/.next/server/chunks/ssr/{node_modules_1k-0av-._.js → node_modules_1yr3qqm._.js} +1 -1
  157. package/.next/server/chunks/ssr/{node_modules_0-s3xam._.js → node_modules_1z14x_s._.js} +1 -1
  158. package/.next/server/chunks/ssr/{node_modules_0keiwh2._.js → node_modules_1zjjxof._.js} +2 -2
  159. package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_0jhievg._.js → node_modules_katex_dist_katex_mjs_0lovye-._.js} +1 -1
  160. package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_1zcod1m._.js → node_modules_katex_dist_katex_mjs_1zzajtz._.js} +1 -1
  161. package/.next/server/middleware-build-manifest.js +3 -3
  162. package/.next/server/pages/404.html +1 -1
  163. package/.next/server/pages/500.html +1 -1
  164. package/.next/server/server-reference-manifest.js +1 -1
  165. package/.next/server/server-reference-manifest.json +72 -72
  166. package/.next/static/chunks/{38rbtwatw658l.js → 02p1qzv-y8ojn.js} +1 -1
  167. package/.next/static/chunks/{21wm184xoke98.js → 0c8kcm5bf10hs.js} +5 -5
  168. package/.next/static/chunks/{0piazplcpaho6.js → 0msqr7mircvg3.js} +1 -1
  169. package/.next/static/chunks/{3da8rr3q6pt0b.js → 0tal1quf58fcp.js} +1 -1
  170. package/.next/static/chunks/{3iwdx3_gikxbg.js → 0tbosthr28whk.js} +2 -2
  171. package/.next/static/chunks/{0ocx6nt76fc71.js → 0yqy8h5u32vok.js} +1 -1
  172. package/.next/static/chunks/{3odtl00mfb4u7.js → 0zc0u62q44d6f.js} +1 -1
  173. package/.next/static/chunks/{0u_wx1-lmoae2.js → 17gy2mvd8ek83.js} +1 -1
  174. package/.next/static/chunks/{3x2goglbfw5t7.js → 1_8pwrnp1_qvs.js} +1 -1
  175. package/.next/static/chunks/{2v486bh_6kl11.js → 1ck5wi_ba02gc.js} +1 -1
  176. package/.next/static/chunks/{3i12sqqp1v8a8.js → 1hqsq7opotb1d.js} +1 -1
  177. package/.next/static/chunks/{29p2mdrn-z1oz.js → 1ih5j-j1he9w6.js} +1 -1
  178. package/.next/static/chunks/1jreuiyyp97su.js +1 -0
  179. package/.next/static/chunks/{2biit-egkb-xl.js → 1nt0py_w8q-id.js} +2 -2
  180. package/.next/static/chunks/{0oo3vqzbrckzw.js → 2ay3fjagqli-o.js} +1 -1
  181. package/.next/static/chunks/{25-zh-0nfxqyg.js → 2p7lpzd59ius6.js} +1 -1
  182. package/.next/static/chunks/{1fignuuc030t2.js → 2rzym-27bm4t_.js} +1 -1
  183. package/.next/static/chunks/2sg43yk9jd5-z.js +4 -0
  184. package/.next/static/chunks/{2cciu1ow-svbf.js → 2twk4sgtkwgxo.js} +1 -1
  185. package/.next/static/chunks/{0totfwrzgu9zy.js → 3jpa6ycdis1fh.js} +2 -2
  186. package/.next/static/chunks/{0nev6q2iq077s.js → 3mc-k-4e4apqr.js} +1 -1
  187. package/.next/static/chunks/{3k_xm_e4grb9u.js → 3o8wxqca38o3_.js} +1 -1
  188. package/.next/static/chunks/{3wblbyhomh9va.js → 3t1sluk82tekr.js} +1 -1
  189. package/.next/static/chunks/{078xraafllix3.js → 42zzm744prmio.js} +1 -1
  190. package/.next/static/chunks/{152u4p6c_6spk.js → 43tcpam1sdo85.js} +1 -1
  191. package/package.json +1 -1
  192. package/.next/server/chunks/ssr/_0lqzdd0._.js +0 -3
  193. package/.next/static/chunks/03m85vcsjg0qk.js +0 -1
  194. package/.next/static/chunks/2kt0nc5m372ie.js +0 -4
  195. /package/.next/static/{nXUvWsiGKRvNRk8kqeJ-u → UR_YhoU23yPaytwfmeAS2}/_buildManifest.js +0 -0
  196. /package/.next/static/{nXUvWsiGKRvNRk8kqeJ-u → UR_YhoU23yPaytwfmeAS2}/_clientMiddlewareManifest.js +0 -0
  197. /package/.next/static/{nXUvWsiGKRvNRk8kqeJ-u → UR_YhoU23yPaytwfmeAS2}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,798120,e=>{"use strict";let l=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,l,a)=>({url:"/api/skills",pathVariable:[e,l],query:{path:a}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:(e,l)=>({url:"/api/bot/thread",query:{history:1,before:e,q:l||void 0}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),lessons:e=>({url:"/api/bot/thread/lessons",query:e}),fileNotes:"/api/bot/thread/file",fileNote:(e,l)=>({url:"/api/bot/thread/file",query:{path:e,from:l}}),toolResult:(e,l)=>({url:"/api/bot/tool-result",pathVariable:[e],query:{call:l}}),workspace:"/api/workspace",workspaceFolder:(e,l)=>({url:"/api/workspace",query:{path:e||null,rows:l}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,l)=>({url:"/api/artifact",query:{set:e,rows:l}}),file:e=>`/api/file/${l(e)}`,fileFace:e=>`/api/file/${l(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${l(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:e=>`/api/llm-model/catalog/${e}`,keyCredits:e=>`/api/llm-model/credits/${e}`,subscriptionUsage:"/api/llm-model/subscription",running:"/api/running",update:"/api/update"}])},421429,e=>{"use strict";var l=e.i(843476),a=e.i(271645),t=e.i(647163);e.s(["Segmented",0,function({options:e,value:i,onChange:s,view:n=!1,size:r="default",className:c,...o}){let d=(0,a.useRef)([]),m=e.findIndex(e=>e.value===i);return(0,l.jsx)("div",{role:"radiogroup",onKeyDown:l=>{let a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[l.key];if(a&&!(e.length<2)){let t;l.preventDefault(),l.stopPropagation(),t=(Math.max(0,m)+a+e.length)%e.length,s(e[t].value),d.current[t]?.focus()}},className:(0,t.cn)("flex w-fit gap-0.5 rounded-full bg-muted","sm"===r?"p-0.5":"p-0.75",c),...o,children:e.map((e,a)=>{let c=e.value===i;return(0,l.jsx)("button",{ref:e=>{d.current[a]=e},type:"button",role:"radio","aria-checked":c,tabIndex:c||m<0&&0===a?0:-1,title:e.title,onClick:()=>s(e.value),className:(0,t.cn)("flex items-center justify-center gap-1.5 rounded-full whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50","sm"===r?"h-6 px-2.5 text-[12px]":"h-7 px-3 text-[12.5px]",!c&&"text-muted-foreground hover:text-foreground",c&&(n?"bg-background font-medium text-foreground shadow-sm dark:bg-input/60":"bg-brand font-medium text-brand-foreground")),children:e.label},e.value)})})}])},146538,e=>{"use strict";var l=e.i(843476),a=e.i(689664),t=e.i(563707),i=e.i(456420);let s={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};s.node;let n=(0,i.default)(s);var r=e.i(758925),c=e.i(271645),o=e.i(798120),d=e.i(167881),m=e.i(23750),u=e.i(59377),p=e.i(41533),h=e.i(449682),x=e.i(992112),f=e.i(609856),v=e.i(283653),g=e.i(647163),b=e.i(265402),y=e.i(412294),j=e.i(611568),N=e.i(566595),z=e.i(630374),k=e.i(421429),M=e.i(968978);let V={alibaba:[{d:"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"}],amazon:[{d:"M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z"}],"arcee-ai":[{d:"M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"}],bfl:[{d:"M0 20.683L12.01 2.5 24 20.683h-2.233L12.009 5.878 3.471 18.806h12.122l1.239 1.877H0z"},{d:"M8.069 16.724l2.073-3.115 2.074 3.115H8.069zM18.24 20.683l-5.668-8.707h2.177l5.686 8.707h-2.196zM19.74 11.676l2.13-3.19 2.13 3.19h-4.26z"}],bytedance:[{d:"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z"},{d:"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z"},{d:"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z"},{d:"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z"}],"fish-audio":[{d:"M23.12 12.13v.62c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.62c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.37v1.74c0 .24.2.44.44.44.25 0 .44-.2.44-.44V12.5c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76.43v1.99q0 .09.03.17.04.08.1.14.07.07.15.1t.17.03c.24 0 .44-.19.44-.44v-1.99c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17m-1.76.35v1.97c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-1.97c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.32v1.65c0 .25.2.45.44.45s.44-.2.44-.45V13.6c0-.25-.2-.45-.44-.45s-.44.2-.44.45m-1.76 1.26v.3q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-.3q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M0 9.38v.19c0 .24.2.44.44.44.25 0 .44-.2.44-.44v-.19c0-.25-.19-.44-.44-.44-.24 0-.44.19-.44.44m1.82.15v.81c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.81q0-.18-.13-.31t-.31-.13-.31.13-.13.31m1.81-.24v3.39q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V9.29q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3m1.83-.35v.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.22q0-.18-.13-.31T5.9 8.5t-.31.13-.13.31m0 2.94v2.34c0 .25.19.44.44.44.24 0 .44-.19.44-.44v-2.34c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m15.89-3.32V11c0 .25.2.44.44.44.25 0 .44-.19.44-.44V8.56c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76-.39v3.28q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.17c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17M17.83 8v3.9c0 .24.19.44.44.44.24 0 .44-.2.44-.44V8c0-.25-.2-.44-.44-.44-.25 0-.44.19-.44.44m-1.77.11v3.96c0 .25.2.44.44.44s.44-.19.44-.44V8.11c0-.25-.2-.44-.44-.44s-.44.19-.44.44m-1.76.27v5.03q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.38c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.8.46v5.75q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.84c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.76.76v5.52c0 .24.2.44.44.44.25 0 .44-.2.44-.44V9.6c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.77 1.01v4.77q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-4.77q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M23.12 9.6v1.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44V9.6c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44M7.21 11.32V16c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-4.68q0-.18-.13-.31t-.31-.13-.31.13-.13.31"}],inception:[{d:"M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z"}],klingai:[{d:"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z"}],kwaipilot:[{d:"M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"}],meta:[{d:"M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"}],minimax:[{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"}],moonshotai:[{d:"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"}],morph:[{d:"M7.941 2c.23 0 .452.073.638.21.186.136.325.328.397.55l.593 1.814c.073.221.212.413.397.55.186.136.409.21.638.21h2.791c.23 0 .452-.074.638-.21a1.11 1.11 0 00.397-.55l.594-1.815a1.11 1.11 0 01.397-.55c.185-.136.408-.209.637-.209h1.7c.23 0 .453.073.639.21.185.136.324.328.397.55l.652 1.994c.118.361.41.635.77.728l2.957.752c.236.06.446.199.596.394.15.195.23.436.231.684v9.376c0 .248-.081.488-.231.684a1.09 1.09 0 01-.595.394l-2.957.752a1.086 1.086 0 00-.477.263 1.114 1.114 0 00-.293.465l-.653 1.994a1.11 1.11 0 01-.396.55c-.186.136-.41.21-.638.21h-1.702c-.229 0-.452-.073-.637-.21a1.11 1.11 0 01-.397-.55l-.364-1.11a1.131 1.131 0 01.15-1.002 1.074 1.074 0 01.885-.462h2.85c.29 0 .567-.116.772-.325.204-.208.32-.49.32-.785V6.444c0-.294-.116-.577-.32-.785a1.08 1.08 0 00-.771-.326h-3.273c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v7.778c0 .295-.114.578-.319.786a1.08 1.08 0 01-.771.325h-2.182a1.08 1.08 0 01-.771-.325 1.122 1.122 0 01-.32-.786V6.444c0-.294-.115-.577-.32-.785a1.081 1.081 0 00-.77-.326H5.454c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v11.112c0 .294.116.577.32.785.205.209.482.326.772.326h2.85a1.075 1.075 0 01.885.461 1.122 1.122 0 01.15 1.001l-.364 1.112a1.11 1.11 0 01-.397.55c-.185.136-.408.209-.637.209H6.24c-.229 0-.452-.073-.638-.21a1.11 1.11 0 01-.397-.55l-.652-1.994a1.114 1.114 0 00-.294-.465 1.086 1.086 0 00-.477-.263l-2.956-.752a1.09 1.09 0 01-.595-.394A1.124 1.124 0 010 16.688V7.312c0-.248.081-.489.231-.684.15-.195.36-.334.595-.394l2.957-.753c.178-.045.342-.136.477-.263.134-.127.235-.287.293-.464l.653-1.995a1.11 1.11 0 01.397-.55C5.788 2.075 6.01 2 6.24 2h1.701z"}],nvidia:[{d:"M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"}],perplexity:[{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"}],recraft:[{d:"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z"},{d:"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z"}],stepfun:[{d:"M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"}],tencent:[{d:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm1.652 1.123l-.01-.001c.533.097 1.023.233 1.41.404 6.084 2.683 7.396 9.214 1.601 14.338a3.781 3.781 0 01-5.337-.328 3.654 3.654 0 01-.884-3.044c-1.934.6-3.295 2.305-3.524 4.45-.204 1.912.324 4.044 2.056 5.634l.245.067C10.1 22.876 11.036 23 12 23c6.075 0 11-4.925 11-11 0-5.513-4.056-10.08-9.348-10.877zM2.748 6.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957 10.957 0 001 12c0 4.919 3.228 9.083 7.682 10.49l.214.065C3.523 18.528 2.84 14.149 6.47 8.68A2.234 2.234 0 102.748 6.21zm10.157-5.172c4.408 1.33 3.61 5.41 2.447 6.924-.86 1.117-2.922 1.46-3.708 2.238-.666.657-1.077 1.462-1.212 2.291A5.303 5.303 0 0112 12.258a5.672 5.672 0 001.404-11.169 10.51 10.51 0 00-.5-.052z"}],voyage:[{d:"M5.407 0v.066a.974.974 0 00-.048.245c-.011.11-.016.208-.016.295 0 .339.043.715.128 1.13.097.405.274.912.531 1.524l7.125 16.366L20.011 3.39c.161-.404.333-.846.515-1.327.182-.48.273-.966.273-1.458a1.406 1.406 0 00-.096-.54V0H24v.066c-.204.207-.45.578-.74 1.114-.29.535-.606 1.195-.949 1.982L13.095 24h-1.287L3.075 3.965c-.204-.47-.418-.923-.644-1.36-.214-.437-.418-.83-.61-1.18-.194-.36-.365-.66-.515-.9A5.666 5.666 0 001 .064V0h4.407z"}],xiaomi:[{d:"M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z"}],zai:[{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"}]};function C({owner:e,className:a}){let t=b.VENDOR_PROVIDERS[e];if(t)return(0,l.jsx)(M.ProviderIcon,{provider:t,className:a});let i=V[e];return i?(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:a,"aria-hidden":"true",children:i.map(e=>(0,l.jsx)("path",{d:e.d,opacity:e.opacity},e.d))}):null}function w({provider:e,models:a,kind:t,value:i,loading:s,onPick:n}){let[r,o]=(0,c.useState)(!1),[u,p]=(0,c.useState)(""),[h,x]=(0,c.useState)("cheap"),[f,v]=(0,c.useState)(i),{label:y}=b.TEXT_MODEL_PROVIDERS[e],V=a.filter(e=>e.type===(t??b.CATALOG_TEXT)),C=t?V:V.filter(e=>e.tags.includes(b.CATALOG_TOOL_USE)),H=u.trim().toLowerCase(),I=(H?C.filter(e=>`${e.id} ${e.label}`.toLowerCase().includes(H)):C).slice().sort(q[h].compare);return(0,l.jsxs)(z.Dialog,{open:r,onOpenChange:e=>{o(e),e?v(i):p("")},children:[(0,l.jsxs)(z.DialogTrigger,{render:(0,l.jsx)("button",{type:"button","aria-label":"Model",className:(0,g.cn)(m.inputClassName,"relative flex items-center pr-8 text-left font-mono text-sm")}),children:[(0,l.jsx)("span",{className:(0,g.cn)("min-w-0 flex-1 truncate",!i&&"font-sans text-muted-foreground"),children:i||"Pick a model"}),(0,l.jsx)("span",{className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground",children:s&&0===C.length?(0,l.jsx)(j.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,l.jsx)(N.Search,{className:"size-3.5"})})]}),(0,l.jsx)(z.DialogContent,{className:"h-[min(40rem,calc(100vh-3rem))] gap-0 overflow-hidden p-0 sm:max-w-2xl",children:(0,l.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,l.jsxs)("div",{className:"shrink-0 space-y-1 px-6 pt-5 pb-4",children:[(0,l.jsxs)(z.DialogTitle,{className:"flex items-center gap-2.5 text-xl font-semibold",children:[(0,l.jsx)(M.ProviderIcon,{provider:e,className:"size-3.5"}),t?L[t]:"Text"," models"]}),(0,l.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:H?`${I.length} matching “${u.trim()}”`:t?`${C.length} on ${y}`:`${C.length} of ${V.length} on ${y} can call tools`})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-6 py-3",children:[(0,l.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,l.jsx)(N.Search,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,l.jsx)(m.Input,{autoFocus:!0,"aria-label":"Search models",placeholder:"name, id or provider",spellCheck:!1,value:u,onChange:e=>p(e.target.value),className:"h-8 pl-8 font-mono text-xs"})]}),(0,l.jsx)(k.Segmented,{"aria-label":"Sort",options:S,value:h,onChange:x})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-4 px-6 pb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground",children:[(0,l.jsx)("span",{className:"min-w-0 flex-1",children:"model"}),(0,l.jsx)("span",{className:"w-28 text-right",children:"per 1M in / out"})]}),(0,l.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border/60",children:[I.map(e=>(0,l.jsx)(A,{model:e,picked:e.id===f,onPick:()=>v(e.id)},e.id)),0===I.length&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2.5 p-10",children:[(0,l.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:H?`Nothing matches “${u.trim()}”.`:"Nothing on the shelf — search for an id."}),H&&(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsxs)(d.Button,{size:"sm",onClick:()=>v(u.trim()),children:["Use “",u.trim(),"” as the id"]}),(0,l.jsx)(d.Button,{variant:"outline",size:"sm",onClick:()=>p(""),children:"Clear search"})]})]})]}),(0,l.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-3 border-t border-border/60 px-6",children:[(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f||"Nothing picked — the field keeps what it has"}),(0,l.jsx)(d.Button,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,l.jsx)(d.Button,{disabled:!f,onClick:()=>{n(f),o(!1)},children:"Use this model"})]})]})})]})}let L={image:"Image",video:"Video",speech:"Speech",transcription:"Transcription"},q={cheap:{label:"$↑",title:"Cheapest first",compare:(e,l)=>(e.price.in??1/0)-(l.price.in??1/0)},dear:{label:"$↓",title:"Dearest first",compare:(e,l)=>(l.price.in??-1)-(e.price.in??-1)},name:{label:"a–z",title:"By name",compare:(e,l)=>e.label.localeCompare(l.label)}},S=Object.keys(q).map(e=>({value:e,label:q[e].label,title:q[e].title})),H=e=>e>=1?e.toFixed(2):String(Number(e.toFixed(4)));function A({model:e,picked:t,onPick:i}){let{price:s}=e,n=null!==s.in||null!==s.out;return(0,l.jsxs)("button",{type:"button",onClick:i,className:(0,g.cn)("flex w-full items-center gap-4 border-b border-border/60 px-6 py-2.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",t?"bg-muted/40":"hover:bg-muted/50"),children:[(0,l.jsx)("span",{className:"grid size-[18px] shrink-0 place-items-center",children:(0,l.jsx)(C,{owner:e.owner,className:"size-[15px]"})}),(0,l.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,l.jsx)("span",{className:(0,g.cn)("truncate text-[13px]",t&&"font-medium"),children:e.label}),t&&(0,l.jsx)(a.Check,{className:"size-3.5 shrink-0"}),e.retiring&&(0,l.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:"retiring"})]}),(0,l.jsx)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:e.id})]}),(0,l.jsxs)("span",{className:"flex w-28 shrink-0 flex-col items-end",children:[(0,l.jsx)("span",{className:(0,g.cn)("font-mono text-xs",n||s.free?"text-foreground":"text-muted-foreground"),children:s.free?"free":null===s.in&&null===s.out?s.note??"—":`${null===s.in?"—":H(s.in)} / ${null===s.out?"—":H(s.out)}`}),n&&s.note&&(0,l.jsx)("span",{className:"font-mono text-[9px] text-muted-foreground",children:s.note})]})]})}function I({tier:e}){return(0,l.jsx)("span",{className:"shrink-0 rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:e})}function P({provider:e,onSaved:a}){let[t,i]=(0,c.useState)(""),[s,n]=(0,f.useServerAction)(h.setConfigAction,{onOk:()=>{(0,v.revalidate)(o.queryKey.llmModel),(0,v.revalidate)(o.queryKey.config),a()}});return e.signIn?(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("p",{className:"px-1 font-mono text-[11px] text-muted-foreground",children:"Runs on your plan once you sign in"}),(0,l.jsx)(y.ChatGptSignIn,{variant:"outline"})]}):(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(m.Input,{value:t,onChange:e=>i(e.target.value),placeholder:b.TEXT_MODEL_PROVIDERS[e.id].keyLooks??"Paste the key",spellCheck:!1,type:"password"}),(0,l.jsx)(d.Button,{variant:"outline",loading:n,disabled:t.trim().length<p.KEY_MIN,onClick:()=>s(e.apiKeyName,t),children:"Save key"})]})}e.s(["ModelPicker",0,function({provider:e,model:i,kind:s,unset:p,onChange:h,onUnset:f,compact:y=!1}){let{data:j=[],mutate:N}=(0,v.useServerRoute)(o.queryKey.llmModel),z=s?j.filter(e=>(0,b.canMakeKind)(e.id,s)):j,k=z.find(l=>l.id===e),[V,C]=(0,c.useState)(!1),[L,q]=(0,c.useState)(null),[S,H]=(0,c.useState)(""),A=z.find(l=>l.id===(L??e))??z[0],T=A&&(0,b.isCatalogProvider)(A.id)?A.id:null,$=(0,v.useServerRoute)(V&&T&&o.queryKey.modelCatalog(T)),R=e=>s&&e?b.MEDIA_MODEL_PROVIDERS[e.id]?.models[s]??[]:e?.suggestModels??[],D=R(k).find(e=>e.id===i),O=e=>{A&&e.trim()&&(h({provider:A.id,model:e.trim()}),H(""),C(!1))};return(0,l.jsxs)(u.Popover,{open:V,onOpenChange:e=>{C(e),e||q(null)},children:[(0,l.jsxs)(u.PopoverTrigger,{render:y?(0,l.jsx)("button",{type:"button",className:"inline-flex h-5 max-w-64 items-center gap-1.5 rounded-full px-2 text-foreground/80 ring-1 ring-border outline-none ring-inset transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50"}):(0,l.jsx)(d.Button,{variant:"outline",className:"w-full min-w-0 justify-start gap-2 font-normal"}),children:[k?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(M.ProviderIcon,{provider:k.id,className:(0,g.cn)("shrink-0",y?"size-3":"size-4")}),!y&&(0,l.jsxs)("span",{className:"min-w-0 max-w-fit grow basis-0 truncate text-muted-foreground",children:[k.label,(0,l.jsx)("span",{className:"ml-2 text-muted-foreground/40",children:"·"})]}),(0,l.jsx)("span",{className:(0,g.cn)("truncate",!y&&"font-medium"),children:D?.label??(i||"Pick a model")})]}):(0,l.jsx)("span",{className:"truncate text-muted-foreground",children:p??(s?"Not picked":"App default")}),(0,l.jsx)(t.ChevronsUpDown,{className:(0,g.cn)("ml-auto shrink-0 text-muted-foreground",y?"size-2.5":"size-3.5")})]}),(0,l.jsxs)(u.PopoverContent,{align:"start",className:"flex w-[min(34rem,calc(100vw-2rem))] flex-row gap-0 overflow-hidden rounded-2xl p-0",children:[(0,l.jsxs)("div",{className:"flex max-h-80 w-48 shrink-0 flex-col gap-px overflow-y-auto border-r border-border/60 bg-muted/40 p-1.5",children:[f&&(0,l.jsxs)("button",{type:"button",onClick:()=>{f(),C(!1)},className:(0,g.cn)("mb-1 flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",k?"hover:bg-muted/60":"bg-muted font-medium"),children:[(0,l.jsx)(n,{className:"size-4 shrink-0 text-muted-foreground"}),(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate",children:p??(s?"Not picked":"App default")}),!k&&(0,l.jsx)(a.Check,{className:"size-3.5 shrink-0"})]}),z.map(e=>(0,l.jsxs)("button",{type:"button",onClick:()=>q(e.id),className:(0,g.cn)("flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",e.id===A?.id?"bg-muted font-medium":"hover:bg-muted/60",!e.hasKey&&"text-muted-foreground"),children:[(0,l.jsx)(M.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),!e.hasKey&&(0,l.jsx)(r.KeyRound,{className:"size-3 shrink-0"})]},e.id))]}),(0,l.jsx)("div",{className:"flex max-h-80 min-w-0 flex-1 flex-col gap-px overflow-y-auto p-1.5",children:A?A.hasKey?T&&!$.error?(0,l.jsxs)("div",{className:"space-y-2 p-2",children:[(0,l.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Every model ",A.label," carries, with what each costs."]}),(0,l.jsx)(w,{provider:T,models:$.data??[],kind:s,value:A.id===e?i:"",loading:$.isLoading,onPick:O})]}):(0,l.jsxs)(l.Fragment,{children:[R(A).map(t=>{let s=A.id===e&&t.id===i;return(0,l.jsxs)("button",{type:"button",onClick:()=>O(t.id),className:(0,g.cn)("flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-1.5 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",s?"bg-muted":"hover:bg-muted/60"),children:[(0,l.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1.5 text-[13px] font-medium",children:[(0,l.jsx)("span",{className:"truncate",children:t.label}),(0,l.jsx)(I,{tier:t.tier})]}),(0,l.jsx)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:t.id})]}),s&&(0,l.jsx)(a.Check,{className:"size-3.5 shrink-0"})]},t.id)}),(0,l.jsx)("form",{onSubmit:e=>{e.preventDefault(),O(S)},className:"mt-1 px-1 pb-1",children:(0,l.jsx)(m.Input,{value:S,onChange:e=>H(e.target.value),spellCheck:!1,"aria-label":"Model id",placeholder:$.error?"Could not read the catalog — type an id":"or type a model id",className:"h-8 font-mono text-xs"})})]}):(0,l.jsxs)("div",{className:"space-y-2 p-2",children:[(0,l.jsx)("p",{className:(0,g.cn)("text-xs leading-relaxed",A.lostKey?g.WAITING_INK:"text-muted-foreground"),children:A.lostKey?A.signIn?(0,x.lostWords)(`The ${A.label} sign-in saved before`,"Sign in again."):(0,x.lostWords)(`The ${A.label} key saved before`,"Paste it again."):`${A.label} has no key yet.`}),(0,l.jsx)(P,{provider:A,onSaved:()=>N()})]}):null})]})]})}],146538)},689664,e=>{"use strict";var l=e.i(643957);e.s(["Check",()=>l.default])},77071,e=>{"use strict";var l=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let t=(0,l.default)(a);e.s(["Plus",0,t],77071)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,798120,e=>{"use strict";let l=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,l,a)=>({url:"/api/skills",pathVariable:[e,l],query:{path:a}}),bot:"/api/bot",botMemory:"/api/bot/memory",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:(e,l)=>({url:"/api/bot/thread",query:{history:1,before:e,q:l||void 0}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),lessons:e=>({url:"/api/bot/thread/lessons",query:e}),fileNotes:"/api/bot/thread/file",fileNote:(e,l)=>({url:"/api/bot/thread/file",query:{path:e,from:l}}),toolResult:(e,l)=>({url:"/api/bot/tool-result",pathVariable:[e],query:{call:l}}),workspace:"/api/workspace",workspaceFolder:(e,l)=>({url:"/api/workspace",query:{path:e||null,rows:l}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,l)=>({url:"/api/artifact",query:{set:e,rows:l}}),file:e=>`/api/file/${l(e)}`,fileFace:e=>`/api/file/${l(e)}?face`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${l(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),thursdaySettings:"/api/thursday/settings",toolCall:"/api/thursday/tool-call",callEnd:"/api/thursday/call/end",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",automaticModel:"/api/llm-model/automatic",modelCatalog:e=>`/api/llm-model/catalog/${e}`,keyCredits:e=>`/api/llm-model/credits/${e}`,subscriptionUsage:"/api/llm-model/subscription",running:"/api/running",update:"/api/update"}])},421429,e=>{"use strict";var l=e.i(843476),a=e.i(271645),t=e.i(647163);e.s(["Segmented",0,function({options:e,value:i,onChange:s,view:n=!1,size:r="default",className:c,...o}){let d=(0,a.useRef)([]),m=e.findIndex(e=>e.value===i);return(0,l.jsx)("div",{role:"radiogroup",onKeyDown:l=>{let a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[l.key];if(a&&!(e.length<2)){let t;l.preventDefault(),l.stopPropagation(),t=(Math.max(0,m)+a+e.length)%e.length,s(e[t].value),d.current[t]?.focus()}},className:(0,t.cn)("flex w-fit gap-0.5 rounded-full bg-muted","sm"===r?"p-0.5":"p-0.75",c),...o,children:e.map((e,a)=>{let c=e.value===i;return(0,l.jsx)("button",{ref:e=>{d.current[a]=e},type:"button",role:"radio","aria-checked":c,tabIndex:c||m<0&&0===a?0:-1,title:e.title,onClick:()=>s(e.value),className:(0,t.cn)("flex items-center justify-center gap-1.5 rounded-full whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50","sm"===r?"h-6 px-2.5 text-[12px]":"h-7 px-3 text-[12.5px]",!c&&"text-muted-foreground hover:text-foreground",c&&(n?"bg-background font-medium text-foreground shadow-sm dark:bg-input/60":"bg-brand font-medium text-brand-foreground")),children:e.label},e.value)})})}])},146538,e=>{"use strict";var l=e.i(843476),a=e.i(689664),t=e.i(563707),i=e.i(456420);let s={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};s.node;let n=(0,i.default)(s);var r=e.i(758925),c=e.i(271645),o=e.i(798120),d=e.i(167881),m=e.i(23750),u=e.i(59377),p=e.i(41533),h=e.i(462326),x=e.i(992112),f=e.i(609856),v=e.i(283653),g=e.i(647163),b=e.i(265402),y=e.i(412294),j=e.i(611568),N=e.i(566595),z=e.i(630374),k=e.i(421429),M=e.i(968978);let V={alibaba:[{d:"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"}],amazon:[{d:"M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z"}],"arcee-ai":[{d:"M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"}],bfl:[{d:"M0 20.683L12.01 2.5 24 20.683h-2.233L12.009 5.878 3.471 18.806h12.122l1.239 1.877H0z"},{d:"M8.069 16.724l2.073-3.115 2.074 3.115H8.069zM18.24 20.683l-5.668-8.707h2.177l5.686 8.707h-2.196zM19.74 11.676l2.13-3.19 2.13 3.19h-4.26z"}],bytedance:[{d:"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z"},{d:"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z"},{d:"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z"},{d:"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z"}],"fish-audio":[{d:"M23.12 12.13v.62c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.62c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.37v1.74c0 .24.2.44.44.44.25 0 .44-.2.44-.44V12.5c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76.43v1.99q0 .09.03.17.04.08.1.14.07.07.15.1t.17.03c.24 0 .44-.19.44-.44v-1.99c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17m-1.76.35v1.97c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-1.97c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.32v1.65c0 .25.2.45.44.45s.44-.2.44-.45V13.6c0-.25-.2-.45-.44-.45s-.44.2-.44.45m-1.76 1.26v.3q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-.3q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M0 9.38v.19c0 .24.2.44.44.44.25 0 .44-.2.44-.44v-.19c0-.25-.19-.44-.44-.44-.24 0-.44.19-.44.44m1.82.15v.81c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.81q0-.18-.13-.31t-.31-.13-.31.13-.13.31m1.81-.24v3.39q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V9.29q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3m1.83-.35v.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.22q0-.18-.13-.31T5.9 8.5t-.31.13-.13.31m0 2.94v2.34c0 .25.19.44.44.44.24 0 .44-.19.44-.44v-2.34c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m15.89-3.32V11c0 .25.2.44.44.44.25 0 .44-.19.44-.44V8.56c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76-.39v3.28q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.17c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17M17.83 8v3.9c0 .24.19.44.44.44.24 0 .44-.2.44-.44V8c0-.25-.2-.44-.44-.44-.25 0-.44.19-.44.44m-1.77.11v3.96c0 .25.2.44.44.44s.44-.19.44-.44V8.11c0-.25-.2-.44-.44-.44s-.44.19-.44.44m-1.76.27v5.03q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.38c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.8.46v5.75q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.84c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.76.76v5.52c0 .24.2.44.44.44.25 0 .44-.2.44-.44V9.6c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.77 1.01v4.77q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-4.77q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M23.12 9.6v1.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44V9.6c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44M7.21 11.32V16c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-4.68q0-.18-.13-.31t-.31-.13-.31.13-.13.31"}],inception:[{d:"M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z"}],klingai:[{d:"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z"}],kwaipilot:[{d:"M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"}],meta:[{d:"M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"}],minimax:[{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"}],moonshotai:[{d:"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"}],morph:[{d:"M7.941 2c.23 0 .452.073.638.21.186.136.325.328.397.55l.593 1.814c.073.221.212.413.397.55.186.136.409.21.638.21h2.791c.23 0 .452-.074.638-.21a1.11 1.11 0 00.397-.55l.594-1.815a1.11 1.11 0 01.397-.55c.185-.136.408-.209.637-.209h1.7c.23 0 .453.073.639.21.185.136.324.328.397.55l.652 1.994c.118.361.41.635.77.728l2.957.752c.236.06.446.199.596.394.15.195.23.436.231.684v9.376c0 .248-.081.488-.231.684a1.09 1.09 0 01-.595.394l-2.957.752a1.086 1.086 0 00-.477.263 1.114 1.114 0 00-.293.465l-.653 1.994a1.11 1.11 0 01-.396.55c-.186.136-.41.21-.638.21h-1.702c-.229 0-.452-.073-.637-.21a1.11 1.11 0 01-.397-.55l-.364-1.11a1.131 1.131 0 01.15-1.002 1.074 1.074 0 01.885-.462h2.85c.29 0 .567-.116.772-.325.204-.208.32-.49.32-.785V6.444c0-.294-.116-.577-.32-.785a1.08 1.08 0 00-.771-.326h-3.273c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v7.778c0 .295-.114.578-.319.786a1.08 1.08 0 01-.771.325h-2.182a1.08 1.08 0 01-.771-.325 1.122 1.122 0 01-.32-.786V6.444c0-.294-.115-.577-.32-.785a1.081 1.081 0 00-.77-.326H5.454c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v11.112c0 .294.116.577.32.785.205.209.482.326.772.326h2.85a1.075 1.075 0 01.885.461 1.122 1.122 0 01.15 1.001l-.364 1.112a1.11 1.11 0 01-.397.55c-.185.136-.408.209-.637.209H6.24c-.229 0-.452-.073-.638-.21a1.11 1.11 0 01-.397-.55l-.652-1.994a1.114 1.114 0 00-.294-.465 1.086 1.086 0 00-.477-.263l-2.956-.752a1.09 1.09 0 01-.595-.394A1.124 1.124 0 010 16.688V7.312c0-.248.081-.489.231-.684.15-.195.36-.334.595-.394l2.957-.753c.178-.045.342-.136.477-.263.134-.127.235-.287.293-.464l.653-1.995a1.11 1.11 0 01.397-.55C5.788 2.075 6.01 2 6.24 2h1.701z"}],nvidia:[{d:"M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"}],perplexity:[{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"}],recraft:[{d:"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z"},{d:"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z"}],stepfun:[{d:"M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"}],tencent:[{d:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm1.652 1.123l-.01-.001c.533.097 1.023.233 1.41.404 6.084 2.683 7.396 9.214 1.601 14.338a3.781 3.781 0 01-5.337-.328 3.654 3.654 0 01-.884-3.044c-1.934.6-3.295 2.305-3.524 4.45-.204 1.912.324 4.044 2.056 5.634l.245.067C10.1 22.876 11.036 23 12 23c6.075 0 11-4.925 11-11 0-5.513-4.056-10.08-9.348-10.877zM2.748 6.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957 10.957 0 001 12c0 4.919 3.228 9.083 7.682 10.49l.214.065C3.523 18.528 2.84 14.149 6.47 8.68A2.234 2.234 0 102.748 6.21zm10.157-5.172c4.408 1.33 3.61 5.41 2.447 6.924-.86 1.117-2.922 1.46-3.708 2.238-.666.657-1.077 1.462-1.212 2.291A5.303 5.303 0 0112 12.258a5.672 5.672 0 001.404-11.169 10.51 10.51 0 00-.5-.052z"}],voyage:[{d:"M5.407 0v.066a.974.974 0 00-.048.245c-.011.11-.016.208-.016.295 0 .339.043.715.128 1.13.097.405.274.912.531 1.524l7.125 16.366L20.011 3.39c.161-.404.333-.846.515-1.327.182-.48.273-.966.273-1.458a1.406 1.406 0 00-.096-.54V0H24v.066c-.204.207-.45.578-.74 1.114-.29.535-.606 1.195-.949 1.982L13.095 24h-1.287L3.075 3.965c-.204-.47-.418-.923-.644-1.36-.214-.437-.418-.83-.61-1.18-.194-.36-.365-.66-.515-.9A5.666 5.666 0 001 .064V0h4.407z"}],xiaomi:[{d:"M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z"}],zai:[{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"}]};function C({owner:e,className:a}){let t=b.VENDOR_PROVIDERS[e];if(t)return(0,l.jsx)(M.ProviderIcon,{provider:t,className:a});let i=V[e];return i?(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:a,"aria-hidden":"true",children:i.map(e=>(0,l.jsx)("path",{d:e.d,opacity:e.opacity},e.d))}):null}function w({provider:e,models:a,kind:t,value:i,loading:s,onPick:n}){let[r,o]=(0,c.useState)(!1),[u,p]=(0,c.useState)(""),[h,x]=(0,c.useState)("cheap"),[f,v]=(0,c.useState)(i),{label:y}=b.TEXT_MODEL_PROVIDERS[e],V=a.filter(e=>e.type===(t??b.CATALOG_TEXT)),C=t?V:V.filter(e=>e.tags.includes(b.CATALOG_TOOL_USE)),H=u.trim().toLowerCase(),I=(H?C.filter(e=>`${e.id} ${e.label}`.toLowerCase().includes(H)):C).slice().sort(q[h].compare);return(0,l.jsxs)(z.Dialog,{open:r,onOpenChange:e=>{o(e),e?v(i):p("")},children:[(0,l.jsxs)(z.DialogTrigger,{render:(0,l.jsx)("button",{type:"button","aria-label":"Model",className:(0,g.cn)(m.inputClassName,"relative flex items-center pr-8 text-left font-mono text-sm")}),children:[(0,l.jsx)("span",{className:(0,g.cn)("min-w-0 flex-1 truncate",!i&&"font-sans text-muted-foreground"),children:i||"Pick a model"}),(0,l.jsx)("span",{className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground",children:s&&0===C.length?(0,l.jsx)(j.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,l.jsx)(N.Search,{className:"size-3.5"})})]}),(0,l.jsx)(z.DialogContent,{className:"h-[min(40rem,calc(100vh-3rem))] gap-0 overflow-hidden p-0 sm:max-w-2xl",children:(0,l.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,l.jsxs)("div",{className:"shrink-0 space-y-1 px-6 pt-5 pb-4",children:[(0,l.jsxs)(z.DialogTitle,{className:"flex items-center gap-2.5 text-xl font-semibold",children:[(0,l.jsx)(M.ProviderIcon,{provider:e,className:"size-3.5"}),t?L[t]:"Text"," models"]}),(0,l.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:H?`${I.length} matching “${u.trim()}”`:t?`${C.length} on ${y}`:`${C.length} of ${V.length} on ${y} can call tools`})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-6 py-3",children:[(0,l.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,l.jsx)(N.Search,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,l.jsx)(m.Input,{autoFocus:!0,"aria-label":"Search models",placeholder:"name, id or provider",spellCheck:!1,value:u,onChange:e=>p(e.target.value),className:"h-8 pl-8 font-mono text-xs"})]}),(0,l.jsx)(k.Segmented,{"aria-label":"Sort",options:S,value:h,onChange:x})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-4 px-6 pb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground",children:[(0,l.jsx)("span",{className:"min-w-0 flex-1",children:"model"}),(0,l.jsx)("span",{className:"w-28 text-right",children:"per 1M in / out"})]}),(0,l.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border/60",children:[I.map(e=>(0,l.jsx)(A,{model:e,picked:e.id===f,onPick:()=>v(e.id)},e.id)),0===I.length&&(0,l.jsxs)("div",{className:"flex flex-col items-start gap-2.5 p-10",children:[(0,l.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:H?`Nothing matches “${u.trim()}”.`:"Nothing on the shelf — search for an id."}),H&&(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsxs)(d.Button,{size:"sm",onClick:()=>v(u.trim()),children:["Use “",u.trim(),"” as the id"]}),(0,l.jsx)(d.Button,{variant:"outline",size:"sm",onClick:()=>p(""),children:"Clear search"})]})]})]}),(0,l.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-3 border-t border-border/60 px-6",children:[(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f||"Nothing picked — the field keeps what it has"}),(0,l.jsx)(d.Button,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,l.jsx)(d.Button,{disabled:!f,onClick:()=>{n(f),o(!1)},children:"Use this model"})]})]})})]})}let L={image:"Image",video:"Video",speech:"Speech",transcription:"Transcription"},q={cheap:{label:"$↑",title:"Cheapest first",compare:(e,l)=>(e.price.in??1/0)-(l.price.in??1/0)},dear:{label:"$↓",title:"Dearest first",compare:(e,l)=>(l.price.in??-1)-(e.price.in??-1)},name:{label:"a–z",title:"By name",compare:(e,l)=>e.label.localeCompare(l.label)}},S=Object.keys(q).map(e=>({value:e,label:q[e].label,title:q[e].title})),H=e=>e>=1?e.toFixed(2):String(Number(e.toFixed(4)));function A({model:e,picked:t,onPick:i}){let{price:s}=e,n=null!==s.in||null!==s.out;return(0,l.jsxs)("button",{type:"button",onClick:i,className:(0,g.cn)("flex w-full items-center gap-4 border-b border-border/60 px-6 py-2.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",t?"bg-muted/40":"hover:bg-muted/50"),children:[(0,l.jsx)("span",{className:"grid size-[18px] shrink-0 place-items-center",children:(0,l.jsx)(C,{owner:e.owner,className:"size-[15px]"})}),(0,l.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,l.jsx)("span",{className:(0,g.cn)("truncate text-[13px]",t&&"font-medium"),children:e.label}),t&&(0,l.jsx)(a.Check,{className:"size-3.5 shrink-0"}),e.retiring&&(0,l.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:"retiring"})]}),(0,l.jsx)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:e.id})]}),(0,l.jsxs)("span",{className:"flex w-28 shrink-0 flex-col items-end",children:[(0,l.jsx)("span",{className:(0,g.cn)("font-mono text-xs",n||s.free?"text-foreground":"text-muted-foreground"),children:s.free?"free":null===s.in&&null===s.out?s.note??"—":`${null===s.in?"—":H(s.in)} / ${null===s.out?"—":H(s.out)}`}),n&&s.note&&(0,l.jsx)("span",{className:"font-mono text-[9px] text-muted-foreground",children:s.note})]})]})}function I({tier:e}){return(0,l.jsx)("span",{className:"shrink-0 rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:e})}function P({provider:e,onSaved:a}){let[t,i]=(0,c.useState)(""),[s,n]=(0,f.useServerAction)(h.setConfigAction,{onOk:()=>{(0,v.revalidate)(o.queryKey.llmModel),(0,v.revalidate)(o.queryKey.config),a()}});return e.signIn?(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("p",{className:"px-1 font-mono text-[11px] text-muted-foreground",children:"Runs on your plan once you sign in"}),(0,l.jsx)(y.ChatGptSignIn,{variant:"outline"})]}):(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(m.Input,{value:t,onChange:e=>i(e.target.value),placeholder:b.TEXT_MODEL_PROVIDERS[e.id].keyLooks??"Paste the key",spellCheck:!1,type:"password"}),(0,l.jsx)(d.Button,{variant:"outline",loading:n,disabled:t.trim().length<p.KEY_MIN,onClick:()=>s(e.apiKeyName,t),children:"Save key"})]})}e.s(["ModelPicker",0,function({provider:e,model:i,kind:s,unset:p,onChange:h,onUnset:f,compact:y=!1}){let{data:j=[],mutate:N}=(0,v.useServerRoute)(o.queryKey.llmModel),z=s?j.filter(e=>(0,b.canMakeKind)(e.id,s)):j,k=z.find(l=>l.id===e),[V,C]=(0,c.useState)(!1),[L,q]=(0,c.useState)(null),[S,H]=(0,c.useState)(""),A=z.find(l=>l.id===(L??e))??z[0],T=A&&(0,b.isCatalogProvider)(A.id)?A.id:null,$=(0,v.useServerRoute)(V&&T&&o.queryKey.modelCatalog(T)),R=e=>s&&e?b.MEDIA_MODEL_PROVIDERS[e.id]?.models[s]??[]:e?.suggestModels??[],D=R(k).find(e=>e.id===i),O=e=>{A&&e.trim()&&(h({provider:A.id,model:e.trim()}),H(""),C(!1))};return(0,l.jsxs)(u.Popover,{open:V,onOpenChange:e=>{C(e),e||q(null)},children:[(0,l.jsxs)(u.PopoverTrigger,{render:y?(0,l.jsx)("button",{type:"button",className:"inline-flex h-5 max-w-64 items-center gap-1.5 rounded-full px-2 text-foreground/80 ring-1 ring-border outline-none ring-inset transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50"}):(0,l.jsx)(d.Button,{variant:"outline",className:"w-full min-w-0 justify-start gap-2 font-normal"}),children:[k?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(M.ProviderIcon,{provider:k.id,className:(0,g.cn)("shrink-0",y?"size-3":"size-4")}),!y&&(0,l.jsxs)("span",{className:"min-w-0 max-w-fit grow basis-0 truncate text-muted-foreground",children:[k.label,(0,l.jsx)("span",{className:"ml-2 text-muted-foreground/40",children:"·"})]}),(0,l.jsx)("span",{className:(0,g.cn)("truncate",!y&&"font-medium"),children:D?.label??(i||"Pick a model")})]}):(0,l.jsx)("span",{className:"truncate text-muted-foreground",children:p??(s?"Not picked":"App default")}),(0,l.jsx)(t.ChevronsUpDown,{className:(0,g.cn)("ml-auto shrink-0 text-muted-foreground",y?"size-2.5":"size-3.5")})]}),(0,l.jsxs)(u.PopoverContent,{align:"start",className:"flex w-[min(34rem,calc(100vw-2rem))] flex-row gap-0 overflow-hidden rounded-2xl p-0",children:[(0,l.jsxs)("div",{className:"flex max-h-80 w-48 shrink-0 flex-col gap-px overflow-y-auto border-r border-border/60 bg-muted/40 p-1.5",children:[f&&(0,l.jsxs)("button",{type:"button",onClick:()=>{f(),C(!1)},className:(0,g.cn)("mb-1 flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",k?"hover:bg-muted/60":"bg-muted font-medium"),children:[(0,l.jsx)(n,{className:"size-4 shrink-0 text-muted-foreground"}),(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate",children:p??(s?"Not picked":"App default")}),!k&&(0,l.jsx)(a.Check,{className:"size-3.5 shrink-0"})]}),z.map(e=>(0,l.jsxs)("button",{type:"button",onClick:()=>q(e.id),className:(0,g.cn)("flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",e.id===A?.id?"bg-muted font-medium":"hover:bg-muted/60",!e.hasKey&&"text-muted-foreground"),children:[(0,l.jsx)(M.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),!e.hasKey&&(0,l.jsx)(r.KeyRound,{className:"size-3 shrink-0"})]},e.id))]}),(0,l.jsx)("div",{className:"flex max-h-80 min-w-0 flex-1 flex-col gap-px overflow-y-auto p-1.5",children:A?A.hasKey?T&&!$.error?(0,l.jsxs)("div",{className:"space-y-2 p-2",children:[(0,l.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Every model ",A.label," carries, with what each costs."]}),(0,l.jsx)(w,{provider:T,models:$.data??[],kind:s,value:A.id===e?i:"",loading:$.isLoading,onPick:O})]}):(0,l.jsxs)(l.Fragment,{children:[R(A).map(t=>{let s=A.id===e&&t.id===i;return(0,l.jsxs)("button",{type:"button",onClick:()=>O(t.id),className:(0,g.cn)("flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-1.5 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",s?"bg-muted":"hover:bg-muted/60"),children:[(0,l.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1.5 text-[13px] font-medium",children:[(0,l.jsx)("span",{className:"truncate",children:t.label}),(0,l.jsx)(I,{tier:t.tier})]}),(0,l.jsx)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:t.id})]}),s&&(0,l.jsx)(a.Check,{className:"size-3.5 shrink-0"})]},t.id)}),(0,l.jsx)("form",{onSubmit:e=>{e.preventDefault(),O(S)},className:"mt-1 px-1 pb-1",children:(0,l.jsx)(m.Input,{value:S,onChange:e=>H(e.target.value),spellCheck:!1,"aria-label":"Model id",placeholder:$.error?"Could not read the catalog — type an id":"or type a model id",className:"h-8 font-mono text-xs"})})]}):(0,l.jsxs)("div",{className:"space-y-2 p-2",children:[(0,l.jsx)("p",{className:(0,g.cn)("text-xs leading-relaxed",A.lostKey?g.WAITING_INK:"text-muted-foreground"),children:A.lostKey?A.signIn?(0,x.lostWords)(`The ${A.label} sign-in saved before`,"Sign in again."):(0,x.lostWords)(`The ${A.label} key saved before`,"Paste it again."):`${A.label} has no key yet.`}),(0,l.jsx)(P,{provider:A,onSaved:()=>N()})]}):null})]})]})}],146538)},689664,e=>{"use strict";var l=e.i(643957);e.s(["Check",()=>l.default])},77071,e=>{"use strict";var l=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let t=(0,l.default)(a);e.s(["Plus",0,t],77071)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,458898,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(798120),s=e.i(421429),i=e.i(283653),r=e.i(265402);e.s(["EffortSwitch",0,function({provider:e,model:u,value:n,onChange:o}){var c;let{data:d}=(0,i.useServerRoute)((0,r.isCatalogProvider)(e)&&u?a.queryKey.modelCatalog(e):null),f=!!(e&&u),h=f&&e?(0,r.effortsOf)(e,u,d??[]):null,v=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!n||h?.includes(n)){v.current=null;return}h&&v.current!==n&&(v.current=n,o(null))},[n,h,o]);let[p,m]=(0,l.useState)(null);(0,l.useEffect)(()=>{m(e=>e&&e.step===n?null:e)},[n]);let k=p?p.step:n,b=h??[],g=!k||!b.includes(k);return(0,t.jsx)("div",{className:"min-w-0",title:f?null===(c=h)?"This model's steps are unknown":0===c.length?"This model has no effort to set":`${c.length} steps, plus Auto`:"Pick a model first",children:(0,t.jsx)(s.Segmented,{"aria-label":"Thinking effort",className:"max-w-full flex-wrap",options:[{value:"auto",label:"auto",title:"The model's own default"},...b.map(e=>({value:e,label:e,title:`Thinking effort ${e}`}))],value:g?"auto":k,onChange:e=>{let t="auto"===e?null:e;m({step:t}),o(t)}})})}])},476769,e=>{"use strict";var t=e.i(95187);let l=(0,t.createServerReference)("7f61757932a8cad5a6c7a745c182dfdf0c56414989",t.callServer,void 0,t.findSourceMapURL,"deleteWorkspaceFileAction");e.s(["deleteWorkspaceFileAction",0,l])},333999,e=>{"use strict";var t=e.i(271645),l=e.i(647163);e.s(["useObjectState",0,e=>{let[a,s]=(0,t.useState)(e);return[a,(0,t.useCallback)(e=>{s(t=>{let a=(0,l.isFunction)(e)?e(t):e;return Object.keys(a).some(e=>!Object.is(t[e],a[e]))?{...t,...a}:t})},[])]}])},759659,e=>{"use strict";var t=e.i(456420);let l={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};l.node;let a=(0,t.default)(l);e.s(["Trash2",0,a],759659)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,458898,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(798120),s=e.i(421429),i=e.i(283653),r=e.i(265402);e.s(["EffortSwitch",0,function({provider:e,model:u,value:n,onChange:o}){var c;let{data:d}=(0,i.useServerRoute)((0,r.isCatalogProvider)(e)&&u?a.queryKey.modelCatalog(e):null),f=!!(e&&u),h=f&&e?(0,r.effortsOf)(e,u,d??[]):null,v=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!n||h?.includes(n)){v.current=null;return}h&&v.current!==n&&(v.current=n,o(null))},[n,h,o]);let[p,m]=(0,l.useState)(null);(0,l.useEffect)(()=>{m(e=>e&&e.step===n?null:e)},[n]);let b=p?p.step:n,k=h??[],g=!b||!k.includes(b);return(0,t.jsx)("div",{className:"min-w-0",title:f?null===(c=h)?"This model's steps are unknown":0===c.length?"This model has no effort to set":`${c.length} steps, plus Auto`:"Pick a model first",children:(0,t.jsx)(s.Segmented,{"aria-label":"Thinking effort",className:"max-w-full flex-wrap",options:[{value:"auto",label:"auto",title:"The model's own default"},...k.map(e=>({value:e,label:e,title:`Thinking effort ${e}`}))],value:g?"auto":b,onChange:e=>{let t="auto"===e?null:e;m({step:t}),o(t)}})})}])},122552,e=>{"use strict";var t=e.i(95187);let l=(0,t.createServerReference)("7f2569c942512cbda5681690c4b95480b8a9217259",t.callServer,void 0,t.findSourceMapURL,"deleteWorkspaceFileAction");e.s(["deleteWorkspaceFileAction",0,l])},333999,e=>{"use strict";var t=e.i(271645),l=e.i(647163);e.s(["useObjectState",0,e=>{let[a,s]=(0,t.useState)(e);return[a,(0,t.useCallback)(e=>{s(t=>{let a=(0,l.isFunction)(e)?e(t):e;return Object.keys(a).some(e=>!Object.is(t[e],a[e]))?{...t,...a}:t})},[])]}])},759659,e=>{"use strict";var t=e.i(456420);let l={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};l.node;let a=(0,t.default)(l);e.s(["Trash2",0,a],759659)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,835878,e=>{"use strict";var t=e.i(843476),n=e.i(635963);e.s(["BotRoster",0,function({bots:e}){return e.length<2?null:(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:e.map(e=>e.name).join(", "),children:[(0,t.jsx)("span",{className:"flex items-center gap-0.5",children:e.slice(0,3).map(e=>(0,t.jsx)(n.BotMark,{size:18,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"},e.name))}),(0,t.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[e.length," bots"]})]})}])},351866,51481,825398,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(689664),s=e.i(716327),o=e.i(24071),r=e.i(456420);let i={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};i.node;let l=(0,r.default)(i);e.s(["CircleQuestionMark",0,l],51481);var d=e.i(508734),c=e.i(919191),u=e.i(632781);let m={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};m.node;let x=(0,r.default)(m);e.s(["RotateCw",0,x],825398);var b=e.i(263676),p=e.i(271645),f=e.i(176782),h=e.i(552245),g=e.i(225913),k=e.i(647163);let j=(0,g.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",{variants:{variant:{default:"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",secondary:"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",muted:"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",tinted:"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",outline:"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",ghost:"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",destructive:"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"}},defaultVariants:{variant:"default"}});function v({variant:e="default",align:n="start",className:a,...s}){return(0,t.jsx)("div",{"data-slot":"bubble","data-variant":e,"data-align":n,className:(0,k.cn)(j({variant:e}),a),...s})}function w({className:e,render:t,...n}){var a;return a={defaultTagName:"div",props:(0,f.mergeProps)({className:(0,k.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",e)},n),render:t,state:{slot:"bubble-content"}},(0,h.useRenderElement)(a.defaultTagName??"div",a,a)}(0,g.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",{variants:{side:{top:"top-0 -translate-y-3/4",bottom:"bottom-0 translate-y-3/4"},align:{start:"left-3",end:"right-3"}},defaultVariants:{side:"bottom",align:"end"}});var N=e.i(496336),y=e.i(683408),_=e.i(660302),T=e.i(127341),z=e.i(6799),C=e.i(95187);let M=(0,C.createServerReference)("7fefc73d3f42859c434661e6221256ee5d3c795d0b",C.callServer,void 0,C.findSourceMapURL,"compactThreadAction");var S=e.i(807038),B=e.i(635963),R=e.i(540921),$=e.i(256604),I=e.i(621285),O=e.i(245629),L=e.i(609856),P=e.i(553429),F=e.i(978411),A=e.i(222055);function q({onClick:e}){return(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Fold the room away",className:"grid size-7 shrink-0 place-items-center rounded-full bg-muted text-foreground outline-none transition-colors hover:bg-muted-foreground/20 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(b.X,{className:"size-3.5"})})}function H({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E,{thread:e}),(0,t.jsx)(D,{thread:e}),(0,t.jsx)(V,{thread:e})]})}function E({thread:e}){let{contextTokens:n,tokens:a}=e;return n?(0,t.jsx)("span",{title:`Last step ${(0,k.formatCount)(n)} tokens \xb7 in total in ${(0,k.formatCount)(a.input)} \xb7 out ${(0,k.formatCount)(a.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground tabular-nums",children:(0,k.formatCount)(n)}):null}function D({thread:e}){let{contextTokens:n,contextBudget:a}=e,[s,o]=(0,p.useState)(!1),[r,i]=(0,L.useServerAction)(M,{onOk:()=>o(!0)}),[l,d]=(0,p.useState)(n);if(l!==n&&(d(n),o(!1)),!n||!a)return null;let c=Math.min(1,n/a);return(0,t.jsx)("button",{type:"button",disabled:i||s,onClick:()=>void r(e.id,e.bot.name),title:s?"It summarizes itself at its next step":`Context ${(0,k.formatCount)(n)} of ${(0,k.formatCount)(a)} — it summarizes itself at the end of the bar. Press to have it do so at its next step`,"aria-label":"Summarize this thread's context at its next step",className:"-my-2 flex h-6 shrink-0 items-center rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:(0,t.jsx)("span",{className:"block h-[3px] w-9 overflow-hidden rounded-full bg-muted",children:(0,t.jsx)("span",{className:(0,k.cn)("block h-full rounded-full",s?"animate-pulse bg-muted-foreground/40":c>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*c))}%`}})})})}let U={working:"text-muted-foreground",waiting:k.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"},Y={working:"working",waiting:"waiting",done:"done",cancelled:"stopped"};function V({thread:e}){let n="done"===e.status&&e.seen?"text-muted-foreground":U[e.status];return"working"===e.status?(0,t.jsx)(_.ShinyText,{text:Y.working,speed:2.2,className:"shrink-0 font-mono text-[10px]"}):(0,t.jsx)("span",{className:(0,k.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",n),children:Y[e.status]})}function K({thread:e,roster:n,side:a,onPick:s,className:o}){let r=(0,F.useOfficePointed)();return(0,p.useEffect)(()=>()=>F.officePointed.set(null),[]),(0,t.jsx)(T.Tabs,{value:a??e.bot.name,onValueChange:t=>s(t===e.bot.name?null:String(t)),className:(0,k.cn)("shrink-0 gap-0 px-3 pt-1 pb-0.5",o),children:(0,t.jsx)(T.TabsList,{className:"relative w-full justify-start gap-1 overflow-x-auto rounded-none bg-transparent p-0 scrollbar-none group-data-horizontal/tabs:h-auto",children:n.map(n=>{let a=J(e,n.name);return(0,t.jsxs)(T.TabsTrigger,{value:n.name,onPointerEnter:()=>F.officePointed.set(n.name),onPointerLeave:()=>F.officePointed.set(null),className:(0,k.cn)(Q,"pl-1.5",r===n.name&&"bg-muted/60 text-foreground"),children:[(0,t.jsx)(B.BotMark,{size:16,seed:n.name,color:n.icon?.color,shape:n.icon?.shape,outline:n.icon?.outline,paint:n.icon?.paint,notify:"asking"===a,crossed:G(e,n.name),className:"shrink-0"}),(0,t.jsx)("span",{className:"max-w-28 truncate",children:n.name}),"running"===a&&(0,t.jsx)(u.Loader2,{className:"size-3 animate-spin text-muted-foreground/70"})]},n.name)})})})}let Q="h-7 flex-none rounded-full px-3 py-0 text-[12px] text-muted-foreground hover:bg-muted/60 data-active:bg-muted data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-none dark:data-active:border-transparent dark:data-active:bg-muted",G=(e,t)=>e.room.participants.some(e=>e.bot===t&&("cancelled"===e.state||"paused"===e.state));function J(e,t){let{room:n}=e;return n.questions.some(e=>e.bot===t)?"asking":"working"===e.status&&n.participants.some(e=>e.bot===t&&"running"===e.state)?"running":null}function W({turn:e,thread:n,self:a}){let s=e.speaker.name===a,o=s?"none":ei(e.speaker)?"dark":"secondary",r=null;return(0,t.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,t.jsx)(ex,{side:s?"start":"end",name:el(e.speaker),mark:(0,t.jsx)(eu,{bot:e.speaker}),children:e.entries.map(i=>{if("work"===i.kind)return s?(0,t.jsx)(Z,{lines:i.lines,trailing:i.open,bot:e.speaker,thread:n},i.key):(0,t.jsx)(X,{lines:i.lines,trailing:i.open,bot:e.speaker,thread:n},i.key);let l=(0,F.heardBy)(i.line),d=l&&l.name!==e.speaker.name&&l.name!==a&&!ei(l)&&l.name!==r?l:null;return l&&(r=l.name),(0,t.jsx)(eb,{line:i.line,surface:o,mention:d,threadId:n.id},i.key)})})})}function X({lines:e,trailing:n,bot:a,thread:s}){var o;let[r,i]=(0,p.useState)(!1),[l,d]=(0,p.useState)(null),c=n?J(s,a.name):null,m=(o=e,[["tool","step"],["say","note"],["stop","stop"],["note","compaction"]].map(([e,t])=>[o.filter(t=>t.kind===e).length,t]).filter(([e])=>e>0).map(([e,t])=>`${e} ${t}${1===e?"":"s"}`).join(" · ")),x=e.filter(e=>e.tool?.results!==void 0);if(!c&&!m)return null;let b=e.findLast(e=>"tool"===e.kind||"say"===e.kind),f=r&&e.length>0;return(0,t.jsxs)("div",{className:(0,k.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 p-1",f?"w-full":"w-fit max-w-full"),children:[(0,t.jsxs)("button",{type:"button",disabled:!e.length,"aria-expanded":f,onClick:()=>{i(e=>!e),d(null)},className:"flex min-w-0 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none transition-colors enabled:hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:["running"===c&&(0,t.jsx)(u.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/60"}),c?(0,t.jsx)(_.ShinyText,{text:"asking"===c?"waiting on you":b?ea(b):"working",tone:"asking"===c?"waiting":"muted",speed:2.4,className:(0,k.cn)("min-w-0 truncate text-[12px] leading-4",f&&"flex-1")}):(0,t.jsx)(et,{words:b?ea(b):"",facts:[m,function(e){let t=e.flatMap(e=>e.at?[(0,O.toDate)(e.at).getTime()]:[]);if(t.length<2)return"";let n=Math.round((Math.max(...t)-Math.min(...t))/1e3);if(n<1)return"";if(n<60)return`${n}s`;let a=Math.round(n/60);return a<60?`${a} min`:`${Math.floor(a/60)}h ${a%60}m`}(e)].filter(Boolean).join(" · "),grow:f}),e.length>0&&(0,t.jsx)(en,{open:f})]}),!f&&x.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1 px-2 pt-0.5 pb-1.5",children:x.map(e=>e.tool&&(0,t.jsx)(A.StepTile,{tool:e.tool,onOpen:()=>{d(e.id),i(!0)}},e.id))}),f&&(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-0.5 pt-0.5",children:eN(e).map(e=>"tools"===e.kind?e.lines.map(e=>e.tool&&(0,t.jsx)(A.BotTool,{tool:e.tool,threadId:s.id,collapsed:e.id!==l},e.id)):"stops"===e.kind?(0,t.jsx)("div",{className:"px-1.5 py-1",children:(0,t.jsx)(ev,{lines:e.lines})},e.key):e.lines.map(e=>(0,t.jsx)(ek,{line:e,inset:!0},e.id)))})]})}function Z({lines:e,trailing:n,bot:a,thread:s}){let o=n?J(s,a.name):null,r=e.some(e=>e.tool&&void 0===e.tool.results);return(0,t.jsxs)(t.Fragment,{children:[eN(e).map(e=>"tools"===e.kind?(0,t.jsx)(ee,{lines:e.lines,threadId:s.id},e.key):"stops"===e.kind?(0,t.jsx)(ev,{lines:e.lines},e.key):e.lines.map(e=>(0,t.jsx)(ek,{line:e},e.id))),o&&(0,t.jsx)(_.ShinyText,{text:"asking"===o?"waiting on you":"on the next step…",tone:"asking"===o?"waiting":"muted",speed:2.2,className:(0,k.cn)("block px-1 font-mono text-[10px]",r&&"invisible")})]})}function ee({lines:e,threadId:n}){return(0,t.jsx)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:e.map(e=>e.tool&&(0,t.jsx)(A.BotTool,{tool:e.tool,threadId:n,collapsed:!0},e.id))})}function et({words:e,facts:n,grow:a=!1}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:(0,k.cn)("min-w-0 truncate text-[12.5px] leading-5 text-foreground/80",a&&"flex-1"),children:e}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] leading-4 text-muted-foreground",children:n})]})}function en({open:e}){return(0,t.jsx)("span",{className:"grid size-5.5 shrink-0 place-items-center rounded-md bg-background text-muted-foreground ring-1 ring-border/60",children:(0,t.jsx)(s.ChevronDown,{className:(0,k.cn)("size-3.5 transition-transform",e&&"rotate-180")})})}function ea(e){return"tool"===e.kind&&e.tool?e.tool.note??`${e.tool.name} \xb7 ${e.tool.input}`:(0,k.plainText)(e.text).replace(/\s+/g," ").trim()}function es({thread:e}){let n="user"===e.startedBy?er:eo;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ed,{from:n,to:e.bot}),(0,t.jsx)(ex,{side:"end",name:el(n),mark:(0,t.jsx)(eu,{bot:n}),children:(0,t.jsx)(em,{dark:!0,className:"py-2 pr-2 pl-3.5",children:(0,t.jsx)(N.FoldedText,{text:e.request,subject:"request",className:"wrap-anywhere"})})})]})}let eo={name:P.ROOM_THURSDAY},er={name:P.ROOM_USER},ei=e=>e.name===eo.name||e.name===er.name,el=e=>e.name===er.name?"You":e.name;function ed({from:e,to:n}){return(0,t.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(ec,{bot:e}),(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground",children:e.name===er.name?"asked":"invited"}),(0,t.jsx)(ec,{bot:n})]})})}function ec({bot:e}){return e.name===er.name?(0,t.jsx)("span",{className:"shrink-0",children:"You"}):(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.name===eo.name?(0,t.jsx)($.ThursdayMark,{size:15,className:"shrink-0"}):(0,t.jsx)(B.BotMark,{size:15,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function eu({bot:e}){return e.name===er.name?null:e.name===eo.name?(0,t.jsx)($.ThursdayMark,{size:26,className:"mt-1 shrink-0"}):(0,t.jsx)(B.BotMark,{size:26,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"mt-1 shrink-0"})}function em({dark:e=!1,children:n,className:a}){return(0,t.jsx)(v,{align:"end",variant:e?"default":"secondary",className:"max-w-full",children:(0,t.jsx)(w,{className:(0,k.cn)("rounded-tr-md px-3.5",a),children:(0,t.jsx)("div",{className:(0,k.cn)("min-w-0",e&&"inverse"),children:n})})})}function ex({side:e,mark:n,name:a,children:s}){return(0,t.jsxs)("div",{className:(0,k.cn)("flex gap-2.5","end"===e&&"flex-row-reverse"),children:[n,(0,t.jsxs)("div",{className:(0,k.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===e&&"items-end"),children:[(0,t.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:a}),s]})]})}function eb({line:e,surface:n,mention:a,threadId:s=null}){let o=!!e.question,r="result"===e.kind,i="none"!==n,l=(0,S.shortenPaths)(e.text),d=(0,t.jsxs)(t.Fragment,{children:[o&&(0,t.jsx)(eg,{}),a?(0,t.jsx)(eh,{bot:a,bubble:i,children:l}):(0,t.jsx)(ep,{bubble:i,className:(0,k.cn)(!r&&"leading-snug"),children:l}),(0,t.jsx)(S.Attachments,{text:e.text,from:s,onBubble:i,className:"mt-2"})]});return(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)(em,{dark:"dark"===n,children:d}):(0,t.jsx)("div",{className:"min-w-0 max-w-full px-1",children:d}),e.steppedIn&&(0,t.jsxs)("p",{className:"flex items-center gap-1 px-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(c.CornerDownLeft,{className:"size-2.5"}),"stepped in"]}),r&&(0,t.jsx)("div",{className:"flex px-1",children:(0,t.jsx)(ej,{text:e.text})})]})}function ep({children:e,bubble:n=!1,className:a}){return(0,t.jsx)(y.Markdown,{className:(0,k.cn)("min-w-0 max-w-full text-[13px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&_table]:wrap-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",n&&"[&_[data-streamdown=inline-code]]:text-[12px] [&_[data-streamdown=code-block]]:my-2 [&_[data-streamdown=code-block]]:gap-0 [&_[data-streamdown=code-block]]:rounded-[10px] [&_[data-streamdown=code-block]]:border-0 [&_[data-streamdown=code-block]]:bg-background [&_[data-streamdown=code-block]]:p-0 [&_[data-streamdown=code-block-header]]:h-7 [&_[data-streamdown=code-block-header]]:px-2.5 [&_[data-streamdown=code-block-header]]:text-[11px] [&_[data-streamdown=code-block-body]]:border-0 [&_[data-streamdown=code-block-body]]:bg-transparent! [&_[data-streamdown=code-block-body]]:px-2.5 [&_[data-streamdown=code-block-body]]:pt-0 [&_[data-streamdown=code-block-body]]:pb-2.5 [&_[data-streamdown=code-block-body]]:text-[12.5px] [&_[data-streamdown=code-block]_div:has(>[data-streamdown=code-block-actions])]:-mt-7 [&_[data-streamdown=code-block-actions]]:mr-1 [&_[data-streamdown=code-block-actions]]:border-0 [&_[data-streamdown=code-block-actions]]:bg-transparent!",a),children:e})}function ef({bot:e,bubble:n}){return(0,t.jsxs)("span",{className:(0,k.cn)("mr-1.5 inline-flex h-5 max-w-full items-center gap-1 rounded-full pr-2 pl-[3px] align-[-4px] text-[12px] leading-none font-medium whitespace-nowrap text-foreground",n?"bg-background":"bg-muted"),children:[(0,t.jsx)(B.BotMark,{size:14,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function eh({bot:e,bubble:n,children:a}){return(0,t.jsxs)("div",{className:"min-w-0 max-w-full text-[13px] leading-snug",children:[(0,t.jsx)(ef,{bot:e,bubble:n}),(0,t.jsx)(ep,{bubble:n,className:"contents leading-snug [&>p:first-child]:inline",children:a})]})}function eg(){return(0,t.jsxs)("p",{className:"mb-1 flex items-center gap-1.5 text-[12px] leading-4 font-medium text-muted-foreground",children:[(0,t.jsx)(l,{className:"size-3.5 shrink-0"}),"Question"]})}function ek({line:e,inset:n=!1}){return"note"===e.kind?(0,t.jsxs)("details",{className:"w-full px-2 py-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"min-w-0 text-center font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,t.jsx)(ep,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:e.text})]}):(0,t.jsx)(ep,{className:(0,k.cn)("text-[12.5px] text-muted-foreground",n?"px-2.5 py-1":"px-1"),children:e.text})}function ej({text:e}){let[n,s]=(0,p.useState)(!1),o=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,t.jsx)("button",{type:"button","aria-label":"Copy the answer",onClick:async()=>{try{await navigator.clipboard.writeText(e),s(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>s(!1),1400)}catch(e){z.toast.add({type:"error",title:"Could not copy the answer",description:(0,k.errorToString)(e)})}},className:"grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:n?(0,t.jsx)(a.Check,{className:"size-3"}):(0,t.jsx)(d.Copy,{className:"size-3"})})}function ev({lines:e}){return(0,t.jsxs)("details",{className:"group min-w-0 px-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-[12.5px] leading-relaxed outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(x,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:ew(e[0].text)}),e.length>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:["×",e.length]}),(0,t.jsx)(s.ChevronDown,{className:"size-2.5 shrink-0 text-muted-foreground/70 transition-transform group-open:rotate-180"})]}),(0,t.jsx)("div",{className:"mt-1 space-y-1 pl-4.5 text-[11px] leading-relaxed",children:e.map(e=>(0,t.jsxs)("p",{className:"flex gap-2 break-keep wrap-anywhere",children:[e.at&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground tabular-nums",children:(0,n.format)((0,O.toDate)(e.at),"HH:mm:ss")}),(0,t.jsx)("span",{className:"min-w-0",children:e.text})]},e.id))})]})}let ew=e=>e.split(" (")[0].replace(/\.$/,"");function eN(e){let t=[];for(let n of e){let e="tool"===n.kind&&n.tool?"tools":"stop"===n.kind?"stops":"said",a=t.at(-1),s=a?.kind===e&&("stops"!==e||ew(a.lines[0].text)===ew(n.text));a&&s?a.lines.push(n):t.push({kind:e,key:n.id,lines:[n]})}return t}e.s(["Conversation",0,function({thread:e,tab:n=null,onTab:a,className:s,tabsClassName:o}){let r,i=(0,p.useRef)(null),l=(0,p.useRef)(!0),d=e.roster,c=a&&n!==e.bot.name&&d.some(e=>e.name===n)?n:null,u=c??e.bot.name,m=d.filter(t=>(!c||t.name===c)&&J(e,t.name)),x=(0,F.threadItems)((r=new Set(e.room.questions.map(e=>e.id))).size?{...e,lines:e.lines.filter(e=>!("ask"===e.kind&&void 0!==e.questionId&&r.has(e.questionId)))}:e,u,m);return(0,p.useEffect)(()=>{l.current=!0},[e.id,c]),(0,p.useEffect)(()=>{let e=i.current;e&&l.current&&(e.scrollTop=e.scrollHeight)},[e.lines,e.status,c]),(0,p.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>{l.current&&(e.scrollTop=e.scrollHeight)});for(let n of(t.observe(e),Array.from(e.children)))t.observe(n);return()=>t.disconnect()},[x.length,e.lines,c]),(0,t.jsxs)(I.FileViewer,{children:[a&&(0,t.jsx)(K,{thread:e,roster:d,side:c,onPick:a,className:o}),(0,t.jsxs)("div",{ref:i,onScroll:e=>{let t=e.currentTarget;l.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},className:(0,k.cn)("min-w-0 max-h-[64vh] space-y-3 overflow-y-auto px-4 pt-6 pb-4 mask-[linear-gradient(to_bottom,transparent,black_2rem)] scrollbar-none",s),children:[!c&&(0,t.jsx)(es,{thread:e}),x.map(n=>"invite"===n.kind?(0,t.jsx)(ed,{from:n.from,to:n.to},n.key):(0,t.jsx)(W,{turn:n,thread:e,self:u},n.key)),!c&&(0,t.jsx)(R.JobLessons,{threadId:e.id,faces:d})]})]})},"FoldButton",0,q,"TAB",0,Q,"THURSDAY",0,eo,"ThreadFacts",0,H,"ThreadHeader",0,function({thread:e,onBack:n,onClose:a,titled:s=!0,children:r}){return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Back to the list",className:"shrink-0 rounded-md p-1 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(o.ChevronLeft,{className:"size-4"})}),(0,t.jsx)(B.BotMark,{size:22,seed:e.bot.name,color:e.bot.icon?.color,shape:e.bot.icon?.shape,outline:e.bot.icon?.outline,paint:e.bot.icon?.paint,notify:!1,crossed:"cancelled"===e.status||G(e,e.bot.name)}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:e.label}),(0,t.jsx)(H,{thread:e}),r,(0,t.jsx)(q,{onClick:a})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:n,"aria-label":"Back to the list",className:"flex shrink-0 items-center gap-1 rounded-md p-1 pr-2 text-[12.5px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(o.ChevronLeft,{className:"size-4"}),"Threads"]}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)(H,{thread:e}),r,(0,t.jsx)(q,{onClick:a})]})},"YOU",0,er,"leadOf",0,ew,"stepOf",0,ea],351866)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,835878,e=>{"use strict";var t=e.i(843476),n=e.i(635963);e.s(["BotRoster",0,function({bots:e}){return e.length<2?null:(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:e.map(e=>e.name).join(", "),children:[(0,t.jsx)("span",{className:"flex items-center gap-0.5",children:e.slice(0,3).map(e=>(0,t.jsx)(n.BotMark,{size:18,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"},e.name))}),(0,t.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[e.length," bots"]})]})}])},351866,51481,825398,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(689664),s=e.i(716327),o=e.i(24071),r=e.i(456420);let i={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};i.node;let l=(0,r.default)(i);e.s(["CircleQuestionMark",0,l],51481);var d=e.i(508734),c=e.i(919191),u=e.i(632781);let m={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};m.node;let x=(0,r.default)(m);e.s(["RotateCw",0,x],825398);var b=e.i(263676),p=e.i(271645),f=e.i(176782),h=e.i(552245),g=e.i(225913),k=e.i(647163);let j=(0,g.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",{variants:{variant:{default:"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",secondary:"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",muted:"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",tinted:"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",outline:"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",ghost:"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",destructive:"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"}},defaultVariants:{variant:"default"}});function v({variant:e="default",align:n="start",className:a,...s}){return(0,t.jsx)("div",{"data-slot":"bubble","data-variant":e,"data-align":n,className:(0,k.cn)(j({variant:e}),a),...s})}function w({className:e,render:t,...n}){var a;return a={defaultTagName:"div",props:(0,f.mergeProps)({className:(0,k.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",e)},n),render:t,state:{slot:"bubble-content"}},(0,h.useRenderElement)(a.defaultTagName??"div",a,a)}(0,g.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",{variants:{side:{top:"top-0 -translate-y-3/4",bottom:"bottom-0 translate-y-3/4"},align:{start:"left-3",end:"right-3"}},defaultVariants:{side:"bottom",align:"end"}});var N=e.i(496336),y=e.i(683408),_=e.i(660302),T=e.i(127341),z=e.i(6799),C=e.i(95187);let M=(0,C.createServerReference)("7ff66c27a70dc7227a20bd3820d28be70946e32187",C.callServer,void 0,C.findSourceMapURL,"compactThreadAction");var S=e.i(807038),B=e.i(635963),R=e.i(540921),$=e.i(256604),I=e.i(621285),O=e.i(245629),L=e.i(609856),P=e.i(553429),F=e.i(978411),A=e.i(222055);function q({onClick:e}){return(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Fold the room away",className:"grid size-7 shrink-0 place-items-center rounded-full bg-muted text-foreground outline-none transition-colors hover:bg-muted-foreground/20 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(b.X,{className:"size-3.5"})})}function H({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E,{thread:e}),(0,t.jsx)(D,{thread:e}),(0,t.jsx)(V,{thread:e})]})}function E({thread:e}){let{contextTokens:n,tokens:a}=e;return n?(0,t.jsx)("span",{title:`Last step ${(0,k.formatCount)(n)} tokens \xb7 in total in ${(0,k.formatCount)(a.input)} \xb7 out ${(0,k.formatCount)(a.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground tabular-nums",children:(0,k.formatCount)(n)}):null}function D({thread:e}){let{contextTokens:n,contextBudget:a}=e,[s,o]=(0,p.useState)(!1),[r,i]=(0,L.useServerAction)(M,{onOk:()=>o(!0)}),[l,d]=(0,p.useState)(n);if(l!==n&&(d(n),o(!1)),!n||!a)return null;let c=Math.min(1,n/a);return(0,t.jsx)("button",{type:"button",disabled:i||s,onClick:()=>void r(e.id,e.bot.name),title:s?"It summarizes itself at its next step":`Context ${(0,k.formatCount)(n)} of ${(0,k.formatCount)(a)} — it summarizes itself at the end of the bar. Press to have it do so at its next step`,"aria-label":"Summarize this thread's context at its next step",className:"-my-2 flex h-6 shrink-0 items-center rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:(0,t.jsx)("span",{className:"block h-[3px] w-9 overflow-hidden rounded-full bg-muted",children:(0,t.jsx)("span",{className:(0,k.cn)("block h-full rounded-full",s?"animate-pulse bg-muted-foreground/40":c>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*c))}%`}})})})}let U={working:"text-muted-foreground",waiting:k.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"},Y={working:"working",waiting:"waiting",done:"done",cancelled:"stopped"};function V({thread:e}){let n="done"===e.status&&e.seen?"text-muted-foreground":U[e.status];return"working"===e.status?(0,t.jsx)(_.ShinyText,{text:Y.working,speed:2.2,className:"shrink-0 font-mono text-[10px]"}):(0,t.jsx)("span",{className:(0,k.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",n),children:Y[e.status]})}function K({thread:e,roster:n,side:a,onPick:s,className:o}){let r=(0,F.useOfficePointed)();return(0,p.useEffect)(()=>()=>F.officePointed.set(null),[]),(0,t.jsx)(T.Tabs,{value:a??e.bot.name,onValueChange:t=>s(t===e.bot.name?null:String(t)),className:(0,k.cn)("shrink-0 gap-0 px-3 pt-1 pb-0.5",o),children:(0,t.jsx)(T.TabsList,{className:"relative w-full justify-start gap-1 overflow-x-auto rounded-none bg-transparent p-0 scrollbar-none group-data-horizontal/tabs:h-auto",children:n.map(n=>{let a=J(e,n.name);return(0,t.jsxs)(T.TabsTrigger,{value:n.name,onPointerEnter:()=>F.officePointed.set(n.name),onPointerLeave:()=>F.officePointed.set(null),className:(0,k.cn)(Q,"pl-1.5",r===n.name&&"bg-muted/60 text-foreground"),children:[(0,t.jsx)(B.BotMark,{size:16,seed:n.name,color:n.icon?.color,shape:n.icon?.shape,outline:n.icon?.outline,paint:n.icon?.paint,notify:"asking"===a,crossed:G(e,n.name),className:"shrink-0"}),(0,t.jsx)("span",{className:"max-w-28 truncate",children:n.name}),"running"===a&&(0,t.jsx)(u.Loader2,{className:"size-3 animate-spin text-muted-foreground/70"})]},n.name)})})})}let Q="h-7 flex-none rounded-full px-3 py-0 text-[12px] text-muted-foreground hover:bg-muted/60 data-active:bg-muted data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-none dark:data-active:border-transparent dark:data-active:bg-muted",G=(e,t)=>e.room.participants.some(e=>e.bot===t&&("cancelled"===e.state||"paused"===e.state));function J(e,t){let{room:n}=e;return n.questions.some(e=>e.bot===t)?"asking":"working"===e.status&&n.participants.some(e=>e.bot===t&&"running"===e.state)?"running":null}function W({turn:e,thread:n,self:a}){let s=e.speaker.name===a,o=s?"none":ei(e.speaker)?"dark":"secondary",r=null;return(0,t.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,t.jsx)(ex,{side:s?"start":"end",name:el(e.speaker),mark:(0,t.jsx)(eu,{bot:e.speaker}),children:e.entries.map(i=>{if("work"===i.kind)return s?(0,t.jsx)(Z,{lines:i.lines,trailing:i.open,bot:e.speaker,thread:n},i.key):(0,t.jsx)(X,{lines:i.lines,trailing:i.open,bot:e.speaker,thread:n},i.key);let l=(0,F.heardBy)(i.line),d=l&&l.name!==e.speaker.name&&l.name!==a&&!ei(l)&&l.name!==r?l:null;return l&&(r=l.name),(0,t.jsx)(eb,{line:i.line,surface:o,mention:d,threadId:n.id},i.key)})})})}function X({lines:e,trailing:n,bot:a,thread:s}){var o;let[r,i]=(0,p.useState)(!1),[l,d]=(0,p.useState)(null),c=n?J(s,a.name):null,m=(o=e,[["tool","step"],["say","note"],["stop","stop"],["note","compaction"]].map(([e,t])=>[o.filter(t=>t.kind===e).length,t]).filter(([e])=>e>0).map(([e,t])=>`${e} ${t}${1===e?"":"s"}`).join(" · ")),x=e.filter(e=>e.tool?.results!==void 0);if(!c&&!m)return null;let b=e.findLast(e=>"tool"===e.kind||"say"===e.kind),f=r&&e.length>0;return(0,t.jsxs)("div",{className:(0,k.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 p-1",f?"w-full":"w-fit max-w-full"),children:[(0,t.jsxs)("button",{type:"button",disabled:!e.length,"aria-expanded":f,onClick:()=>{i(e=>!e),d(null)},className:"flex min-w-0 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none transition-colors enabled:hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:["running"===c&&(0,t.jsx)(u.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/60"}),c?(0,t.jsx)(_.ShinyText,{text:"asking"===c?"waiting on you":b?ea(b):"working",tone:"asking"===c?"waiting":"muted",speed:2.4,className:(0,k.cn)("min-w-0 truncate text-[12px] leading-4",f&&"flex-1")}):(0,t.jsx)(et,{words:b?ea(b):"",facts:[m,function(e){let t=e.flatMap(e=>e.at?[(0,O.toDate)(e.at).getTime()]:[]);if(t.length<2)return"";let n=Math.round((Math.max(...t)-Math.min(...t))/1e3);if(n<1)return"";if(n<60)return`${n}s`;let a=Math.round(n/60);return a<60?`${a} min`:`${Math.floor(a/60)}h ${a%60}m`}(e)].filter(Boolean).join(" · "),grow:f}),e.length>0&&(0,t.jsx)(en,{open:f})]}),!f&&x.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1 px-2 pt-0.5 pb-1.5",children:x.map(e=>e.tool&&(0,t.jsx)(A.StepTile,{tool:e.tool,onOpen:()=>{d(e.id),i(!0)}},e.id))}),f&&(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-0.5 pt-0.5",children:eN(e).map(e=>"tools"===e.kind?e.lines.map(e=>e.tool&&(0,t.jsx)(A.BotTool,{tool:e.tool,threadId:s.id,collapsed:e.id!==l},e.id)):"stops"===e.kind?(0,t.jsx)("div",{className:"px-1.5 py-1",children:(0,t.jsx)(ev,{lines:e.lines})},e.key):e.lines.map(e=>(0,t.jsx)(ek,{line:e,inset:!0},e.id)))})]})}function Z({lines:e,trailing:n,bot:a,thread:s}){let o=n?J(s,a.name):null,r=e.some(e=>e.tool&&void 0===e.tool.results);return(0,t.jsxs)(t.Fragment,{children:[eN(e).map(e=>"tools"===e.kind?(0,t.jsx)(ee,{lines:e.lines,threadId:s.id},e.key):"stops"===e.kind?(0,t.jsx)(ev,{lines:e.lines},e.key):e.lines.map(e=>(0,t.jsx)(ek,{line:e},e.id))),o&&(0,t.jsx)(_.ShinyText,{text:"asking"===o?"waiting on you":"on the next step…",tone:"asking"===o?"waiting":"muted",speed:2.2,className:(0,k.cn)("block px-1 font-mono text-[10px]",r&&"invisible")})]})}function ee({lines:e,threadId:n}){return(0,t.jsx)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:e.map(e=>e.tool&&(0,t.jsx)(A.BotTool,{tool:e.tool,threadId:n,collapsed:!0},e.id))})}function et({words:e,facts:n,grow:a=!1}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:(0,k.cn)("min-w-0 truncate text-[12.5px] leading-5 text-foreground/80",a&&"flex-1"),children:e}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] leading-4 text-muted-foreground",children:n})]})}function en({open:e}){return(0,t.jsx)("span",{className:"grid size-5.5 shrink-0 place-items-center rounded-md bg-background text-muted-foreground ring-1 ring-border/60",children:(0,t.jsx)(s.ChevronDown,{className:(0,k.cn)("size-3.5 transition-transform",e&&"rotate-180")})})}function ea(e){return"tool"===e.kind&&e.tool?e.tool.note??`${e.tool.name} \xb7 ${e.tool.input}`:(0,k.plainText)(e.text).replace(/\s+/g," ").trim()}function es({thread:e}){let n="user"===e.startedBy?er:eo;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ed,{from:n,to:e.bot}),(0,t.jsx)(ex,{side:"end",name:el(n),mark:(0,t.jsx)(eu,{bot:n}),children:(0,t.jsx)(em,{dark:!0,className:"py-2 pr-2 pl-3.5",children:(0,t.jsx)(N.FoldedText,{text:e.request,subject:"request",className:"wrap-anywhere"})})})]})}let eo={name:P.ROOM_THURSDAY},er={name:P.ROOM_USER},ei=e=>e.name===eo.name||e.name===er.name,el=e=>e.name===er.name?"You":e.name;function ed({from:e,to:n}){return(0,t.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(ec,{bot:e}),(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground",children:e.name===er.name?"asked":"invited"}),(0,t.jsx)(ec,{bot:n})]})})}function ec({bot:e}){return e.name===er.name?(0,t.jsx)("span",{className:"shrink-0",children:"You"}):(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.name===eo.name?(0,t.jsx)($.ThursdayMark,{size:15,className:"shrink-0"}):(0,t.jsx)(B.BotMark,{size:15,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function eu({bot:e}){return e.name===er.name?null:e.name===eo.name?(0,t.jsx)($.ThursdayMark,{size:26,className:"mt-1 shrink-0"}):(0,t.jsx)(B.BotMark,{size:26,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"mt-1 shrink-0"})}function em({dark:e=!1,children:n,className:a}){return(0,t.jsx)(v,{align:"end",variant:e?"default":"secondary",className:"max-w-full",children:(0,t.jsx)(w,{className:(0,k.cn)("rounded-tr-md px-3.5",a),children:(0,t.jsx)("div",{className:(0,k.cn)("min-w-0",e&&"inverse"),children:n})})})}function ex({side:e,mark:n,name:a,children:s}){return(0,t.jsxs)("div",{className:(0,k.cn)("flex gap-2.5","end"===e&&"flex-row-reverse"),children:[n,(0,t.jsxs)("div",{className:(0,k.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===e&&"items-end"),children:[(0,t.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:a}),s]})]})}function eb({line:e,surface:n,mention:a,threadId:s=null}){let o=!!e.question,r="result"===e.kind,i="none"!==n,l=(0,S.shortenPaths)(e.text),d=(0,t.jsxs)(t.Fragment,{children:[o&&(0,t.jsx)(eg,{}),a?(0,t.jsx)(eh,{bot:a,bubble:i,children:l}):(0,t.jsx)(ep,{bubble:i,className:(0,k.cn)(!r&&"leading-snug"),children:l}),(0,t.jsx)(S.Attachments,{text:e.text,from:s,onBubble:i,className:"mt-2"})]});return(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)(em,{dark:"dark"===n,children:d}):(0,t.jsx)("div",{className:"min-w-0 max-w-full px-1",children:d}),e.steppedIn&&(0,t.jsxs)("p",{className:"flex items-center gap-1 px-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(c.CornerDownLeft,{className:"size-2.5"}),"stepped in"]}),r&&(0,t.jsx)("div",{className:"flex px-1",children:(0,t.jsx)(ej,{text:e.text})})]})}function ep({children:e,bubble:n=!1,className:a}){return(0,t.jsx)(y.Markdown,{className:(0,k.cn)("min-w-0 max-w-full text-[13px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&_table]:wrap-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",n&&"[&_[data-streamdown=inline-code]]:text-[12px] [&_[data-streamdown=code-block]]:my-2 [&_[data-streamdown=code-block]]:gap-0 [&_[data-streamdown=code-block]]:rounded-[10px] [&_[data-streamdown=code-block]]:border-0 [&_[data-streamdown=code-block]]:bg-background [&_[data-streamdown=code-block]]:p-0 [&_[data-streamdown=code-block-header]]:h-7 [&_[data-streamdown=code-block-header]]:px-2.5 [&_[data-streamdown=code-block-header]]:text-[11px] [&_[data-streamdown=code-block-body]]:border-0 [&_[data-streamdown=code-block-body]]:bg-transparent! [&_[data-streamdown=code-block-body]]:px-2.5 [&_[data-streamdown=code-block-body]]:pt-0 [&_[data-streamdown=code-block-body]]:pb-2.5 [&_[data-streamdown=code-block-body]]:text-[12.5px] [&_[data-streamdown=code-block]_div:has(>[data-streamdown=code-block-actions])]:-mt-7 [&_[data-streamdown=code-block-actions]]:mr-1 [&_[data-streamdown=code-block-actions]]:border-0 [&_[data-streamdown=code-block-actions]]:bg-transparent!",a),children:e})}function ef({bot:e,bubble:n}){return(0,t.jsxs)("span",{className:(0,k.cn)("mr-1.5 inline-flex h-5 max-w-full items-center gap-1 rounded-full pr-2 pl-[3px] align-[-4px] text-[12px] leading-none font-medium whitespace-nowrap text-foreground",n?"bg-background":"bg-muted"),children:[(0,t.jsx)(B.BotMark,{size:14,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function eh({bot:e,bubble:n,children:a}){return(0,t.jsxs)("div",{className:"min-w-0 max-w-full text-[13px] leading-snug",children:[(0,t.jsx)(ef,{bot:e,bubble:n}),(0,t.jsx)(ep,{bubble:n,className:"contents leading-snug [&>p:first-child]:inline",children:a})]})}function eg(){return(0,t.jsxs)("p",{className:"mb-1 flex items-center gap-1.5 text-[12px] leading-4 font-medium text-muted-foreground",children:[(0,t.jsx)(l,{className:"size-3.5 shrink-0"}),"Question"]})}function ek({line:e,inset:n=!1}){return"note"===e.kind?(0,t.jsxs)("details",{className:"w-full px-2 py-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"min-w-0 text-center font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,t.jsx)(ep,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:e.text})]}):(0,t.jsx)(ep,{className:(0,k.cn)("text-[12.5px] text-muted-foreground",n?"px-2.5 py-1":"px-1"),children:e.text})}function ej({text:e}){let[n,s]=(0,p.useState)(!1),o=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,t.jsx)("button",{type:"button","aria-label":"Copy the answer",onClick:async()=>{try{await navigator.clipboard.writeText(e),s(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>s(!1),1400)}catch(e){z.toast.add({type:"error",title:"Could not copy the answer",description:(0,k.errorToString)(e)})}},className:"grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:n?(0,t.jsx)(a.Check,{className:"size-3"}):(0,t.jsx)(d.Copy,{className:"size-3"})})}function ev({lines:e}){return(0,t.jsxs)("details",{className:"group min-w-0 px-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-[12.5px] leading-relaxed outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(x,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:ew(e[0].text)}),e.length>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:["×",e.length]}),(0,t.jsx)(s.ChevronDown,{className:"size-2.5 shrink-0 text-muted-foreground/70 transition-transform group-open:rotate-180"})]}),(0,t.jsx)("div",{className:"mt-1 space-y-1 pl-4.5 text-[11px] leading-relaxed",children:e.map(e=>(0,t.jsxs)("p",{className:"flex gap-2 break-keep wrap-anywhere",children:[e.at&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground tabular-nums",children:(0,n.format)((0,O.toDate)(e.at),"HH:mm:ss")}),(0,t.jsx)("span",{className:"min-w-0",children:e.text})]},e.id))})]})}let ew=e=>e.split(" (")[0].replace(/\.$/,"");function eN(e){let t=[];for(let n of e){let e="tool"===n.kind&&n.tool?"tools":"stop"===n.kind?"stops":"said",a=t.at(-1),s=a?.kind===e&&("stops"!==e||ew(a.lines[0].text)===ew(n.text));a&&s?a.lines.push(n):t.push({kind:e,key:n.id,lines:[n]})}return t}e.s(["Conversation",0,function({thread:e,tab:n=null,onTab:a,className:s,tabsClassName:o}){let r,i=(0,p.useRef)(null),l=(0,p.useRef)(!0),d=e.roster,c=a&&n!==e.bot.name&&d.some(e=>e.name===n)?n:null,u=c??e.bot.name,m=d.filter(t=>(!c||t.name===c)&&J(e,t.name)),x=(0,F.threadItems)((r=new Set(e.room.questions.map(e=>e.id))).size?{...e,lines:e.lines.filter(e=>!("ask"===e.kind&&void 0!==e.questionId&&r.has(e.questionId)))}:e,u,m);return(0,p.useEffect)(()=>{l.current=!0},[e.id,c]),(0,p.useEffect)(()=>{let e=i.current;e&&l.current&&(e.scrollTop=e.scrollHeight)},[e.lines,e.status,c]),(0,p.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>{l.current&&(e.scrollTop=e.scrollHeight)});for(let n of(t.observe(e),Array.from(e.children)))t.observe(n);return()=>t.disconnect()},[x.length,e.lines,c]),(0,t.jsxs)(I.FileViewer,{children:[a&&(0,t.jsx)(K,{thread:e,roster:d,side:c,onPick:a,className:o}),(0,t.jsxs)("div",{ref:i,onScroll:e=>{let t=e.currentTarget;l.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},className:(0,k.cn)("min-w-0 max-h-[64vh] space-y-3 overflow-y-auto px-4 pt-6 pb-4 mask-[linear-gradient(to_bottom,transparent,black_2rem)] scrollbar-none",s),children:[!c&&(0,t.jsx)(es,{thread:e}),x.map(n=>"invite"===n.kind?(0,t.jsx)(ed,{from:n.from,to:n.to},n.key):(0,t.jsx)(W,{turn:n,thread:e,self:u},n.key)),!c&&(0,t.jsx)(R.JobLessons,{threadId:e.id,faces:d})]})]})},"FoldButton",0,q,"TAB",0,Q,"THURSDAY",0,eo,"ThreadFacts",0,H,"ThreadHeader",0,function({thread:e,onBack:n,onClose:a,titled:s=!0,children:r}){return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Back to the list",className:"shrink-0 rounded-md p-1 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(o.ChevronLeft,{className:"size-4"})}),(0,t.jsx)(B.BotMark,{size:22,seed:e.bot.name,color:e.bot.icon?.color,shape:e.bot.icon?.shape,outline:e.bot.icon?.outline,paint:e.bot.icon?.paint,notify:!1,crossed:"cancelled"===e.status||G(e,e.bot.name)}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:e.label}),(0,t.jsx)(H,{thread:e}),r,(0,t.jsx)(q,{onClick:a})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:n,"aria-label":"Back to the list",className:"flex shrink-0 items-center gap-1 rounded-md p-1 pr-2 text-[12.5px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(o.ChevronLeft,{className:"size-4"}),"Threads"]}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)(H,{thread:e}),r,(0,t.jsx)(q,{onClick:a})]})},"YOU",0,er,"leadOf",0,ew,"stepOf",0,ea],351866)}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thursday-agent",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "A voice agent that runs on your own machine — talk to her, she hands the slow work to bots with a shell, a browser and skills.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -1,3 +0,0 @@
1
- module.exports=[901729,a=>{"use strict";var b=a.i(187924),c=a.i(707963),d=a.i(141146),e=a.i(168370),f=a.i(998697),g=a.i(164831);let h={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};h.node;let i=(0,g.default)(h);var j=a.i(707938),k=a.i(483138),l=a.i(69095),m=a.i(844561),n=a.i(71215),o=a.i(649268);let p={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};p.node;let q=(0,g.default)(p);var r=a.i(951675),s=a.i(586446),t=a.i(572131),u=a.i(767561),v=a.i(340695),w=a.i(446181),x=a.i(287702),y=a.i(619477),z=a.i(369768),A=a.i(495581),B=a.i(405050);let C=(0,B.createServerReference)("7fe9cda7e190f932392ef0ad209543eb30a6dae467",B.callServer,void 0,B.findSourceMapURL,"emptyScratchAction");var D=a.i(5835),E=a.i(199169),F=a.i(313237),G=a.i(759497),H=a.i(497895);let I={markdown:k.FileText,csv:q,json:j.FileJson,text:k.FileText,frame:i,image:n.Image,audio:o.Music,video:s.Video,none:f.File};function J({label:a,rows:c,children:d}){return 0===c.length?null:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"px-3 pt-3 pb-1 font-mono text-[10px] text-muted-foreground",children:a}),d]})}function K({entry:a,active:c,onPick:e}){let f="dir"===a.kind?l.Folder:I[a.view];return(0,b.jsxs)("button",{type:"button",onClick:e,title:"file"===a.kind?`${a.name} \xb7 ${(0,E.shortAgo)(a.at)}`:a.name,className:(0,H.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",c?(0,H.cn)(y.PICKED_ROW,"font-medium"):"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,b.jsx)(f,{className:"size-3.5 shrink-0 opacity-70"}),(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.name}),"file"===a.kind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:(0,H.formatBytes)(a.bytes)}),(0,b.jsx)("span",{className:"w-3.5 shrink-0"})]}):(0,b.jsx)(d.ChevronRight,{className:"size-3.5 shrink-0 text-muted-foreground/50"})]})}function L({empty:a}){return(0,b.jsx)("div",{className:"space-y-4 p-8",children:a?(0,b.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:["Nothing here yet. What a bot writes during a call lands in"," ",(0,b.jsxs)("span",{className:"font-mono text-[13px] text-foreground",children:[x.PATHS.artifacts,"/"]})," ","— a page, a table, a picture — and shows up here to open."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"Pick a file on the left."}),(0,b.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:"Only what the app can open is listed — a page, a table, a picture, a note. Installed packages and tool leftovers are left out, and no folder is measured, so a folder opens as fast as it lists. Reveal folder, at the foot, opens everything else."})]})})}function M({file:a,onGone:c}){let d=a.path,[f]=(0,F.useServerAction)(D.revealFileAction),[g,h]=(0,F.useServerAction)(A.deleteWorkspaceFileAction,{okMessage:"File deleted",onOk:()=>{(0,G.revalidate)(u.queryKey.workspace),c()}}),i=async()=>{await w.notify.confirm({title:`Delete ${d.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&g(d)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border/60 px-6 py-2",children:[(0,b.jsx)(N,{path:d}),(0,b.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:[(0,H.formatBytes)(a.bytes)," · ",(0,E.shortAgo)(a.at)]}),(0,b.jsx)("a",{href:u.queryKey.fileView(d),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(e.ExternalLink,{className:"size-4"})}),(0,b.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>f(d),children:(0,b.jsx)(m.FolderOpen,{})}),(0,b.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:h,className:"text-muted-foreground",onClick:i,children:(0,b.jsx)(r.Trash2,{})})]}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,b.jsx)(z.FilePreview,{path:d,bytes:a.bytes})})]})}function N({path:a}){let c=["workspace",...a.split("/").filter(Boolean)];return(0,b.jsx)("span",{className:"flex min-w-0 flex-1 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:c.map((a,e)=>(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[e>0&&(0,b.jsx)(d.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,b.jsx)("span",{className:(0,H.cn)("truncate",e===c.length-1&&"text-foreground"),children:a})]},`${e}-${a}`))})}a.s(["WorkspaceSetting",0,function(){let[a,d]=(0,t.useState)(""),[e,f]=(0,t.useState)(x.WORKSPACE_VIEW.rows),[g,h]=(0,t.useState)(null),[i,j]=(0,t.useState)(""),{data:k,isLoading:l,error:n}=(0,G.useServerRoute)(u.queryKey.workspaceFolder(a,e),{keepPreviousData:!0}),o=a=>{d(a),f(x.WORKSPACE_VIEW.rows)},[p,q]=(0,F.useServerAction)(C,{okMessage:"Scratch emptied",onOk:()=>(0,G.revalidate)(u.queryKey.workspace)}),[r]=(0,F.useServerAction)(D.revealFileAction),s=async()=>{await w.notify.confirm({title:"Empty scratch?",description:`Everything under ${x.PATHS.scratch}/ is deleted for good. ${x.PATHS.artifacts}/ and ${x.PATHS.projects}/ are untouched.`,okText:"Empty",destructive:!0})&&p()};if(l)return(0,b.jsx)(y.SettingPanesSkeleton,{});if(n)return(0,b.jsx)(y.SettingError,{message:n.message});let z=k?.entries??[],A=k?.total??0,B=i.trim().toLowerCase(),E=B?z.filter(a=>a.name.toLowerCase().includes(B)):z,H=E.filter(a=>"dir"===a.kind),I=E.filter(a=>"file"===a.kind),N=""!==a||z.some(a=>"dir"===a.kind&&a.name===x.PATHS.scratch),O=z.find(a=>"file"===a.kind&&a.path===g?.path)??g;return(0,b.jsx)(y.SettingPanes,{footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(y.SettingRailNote,{children:(0,b.jsxs)("span",{className:"font-mono",children:[(0,b.jsx)("span",{className:"font-medium text-foreground",children:`${x.PATHS.workspace}${a?`/${a}`:""}`}),` \xb7 ${function(a,b){let c=a.filter(a=>"dir"===a.kind).length,d=a.length-c,e=[c&&`${c} ${1===c?"folder":"folders"}`,d&&`${d} ${1===d?"file":"files"}`].filter(Boolean);if(!e.length)return"empty";let f=e.join(" · ");return b>a.length?`${f} of ${b.toLocaleString("en")}`:f}(z,A)}`]})}),(0,b.jsxs)(v.Button,{variant:"outline",size:"sm",onClick:()=>r(a||"."),children:[(0,b.jsx)(m.FolderOpen,{}),"Reveal folder"]}),N&&(0,b.jsx)(v.Button,{variant:"outline",size:"sm",loading:q,onClick:s,className:"text-destructive hover:text-destructive",children:"Empty scratch"})]}),left:(0,b.jsxs)("div",{className:"flex flex-col py-2",children:[(0,b.jsx)(y.SettingFilter,{value:i,onChange:j,placeholder:"Filter this folder",className:"mx-2 mb-1.5 w-auto"}),a&&(0,b.jsxs)("button",{type:"button",onClick:()=>o(a.split("/").slice(0,-1).join("/")),className:"mx-2 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,b.jsx)(c.ChevronLeft,{className:"size-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a.split("/").slice(0,-1).pop()??"workspace"})]}),0===E.length?(0,b.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:B?"Nothing matches":"Empty folder"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(J,{label:"folders",rows:H,children:H.map(a=>(0,b.jsx)(K,{entry:a,onPick:()=>o(a.path)},a.path))}),(0,b.jsx)(J,{label:"files",rows:I,children:I.map(a=>(0,b.jsx)(K,{entry:a,active:a.path===g?.path,onPick:()=>"file"===a.kind&&h(a)},a.path))})]}),A>z.length&&(0,b.jsx)("button",{type:"button",onClick:()=>f(e+x.WORKSPACE_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(x.WORKSPACE_VIEW.rows,A-z.length)} more of ${A.toLocaleString("en")}`})]}),right:O?.kind==="file"?(0,b.jsx)(M,{file:O,onGone:()=>h(null)},O.path):(0,b.jsx)(L,{empty:!a&&0===z.length})})}],901729)},495581,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f61757932a8cad5a6c7a745c182dfdf0c56414989",b.callServer,void 0,b.findSourceMapURL,"deleteWorkspaceFileAction");a.s(["deleteWorkspaceFileAction",0,c])},69095,a=>{"use strict";var b=a.i(164831);let c={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};c.node;let d=(0,b.default)(c);a.s(["Folder",0,d],69095)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)}];
2
-
3
- //# sourceMappingURL=_0lqzdd0._.js.map
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,660302,e=>{"use strict";var t=e.i(843476),i=e.i(647163);let n={muted:{under:"text-muted-foreground/60 dark:text-muted-foreground",band:"text-foreground"},waiting:{under:"text-waiting/70",band:"text-waiting/30"},reading:{under:"text-foreground",band:"text-waiting/80"}};e.s(["ShinyText",0,function({text:e,tone:r="muted",speed:l=2.4,className:o}){let{under:a,band:s}=n[r];return(0,t.jsxs)("span",{"data-slot":"shiny-text",className:(0,i.cn)("relative inline-block max-w-full",a,o),children:[e,(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 overflow-hidden p-[inherit] select-none [text-overflow:inherit] motion-reduce:hidden",children:(0,t.jsx)("span",{style:{animationDuration:`${l}s`},className:"absolute inset-0 animate-shine overflow-hidden p-[inherit] [mask-image:linear-gradient(120deg,transparent_20%,#000_50%,transparent_80%)] [mask-repeat:no-repeat] [text-overflow:inherit]",children:(0,t.jsx)("span",{style:{animationDuration:`${l}s`},className:(0,i.cn)("absolute inset-0 animate-shine-back overflow-hidden p-[inherit] [text-overflow:inherit]",s),children:e})})})]})}])},265402,e=>{"use strict";var t=e.i(362201),i=e.i(41533);let n=t.enum(["openai","chatgpt","anthropic","google","xai","vercel-ai-gateway","openrouter","mistral","deepseek","groq","cerebras","togetherai","fireworks","deepinfra","cohere"]),r=t.object({provider:n,model:t.string().trim().min(1,"Model name is required").max(80)}),l=["none","minimal","low","medium","high","xhigh"],o=t.enum(l),a=["vercel-ai-gateway","openrouter"],s=e=>a.includes(e),u=t.enum(["openai","chatgpt","google","xai","vercel-ai-gateway"]),c=t.object({provider:u,model:t.string().trim().min(1,"Model name is required").max(120)}),d={openai:{label:"OpenAI",apiKeyName:"OPENAI_API_KEY",models:{image:[{id:"gpt-image-1-mini",label:"GPT Image 1 mini",tier:"small"},{id:"gpt-image-2.5-flare",label:"GPT Image 2.5 Flare",tier:"mid"},{id:"gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[],speech:[{id:"tts-1",label:"TTS 1",tier:"small"},{id:"gpt-4o-mini-tts",label:"4o mini TTS",tier:"mid"},{id:"tts-1-hd",label:"TTS 1 HD",tier:"large"}],transcription:[{id:"gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"gpt-transcribe",label:"GPT Transcribe",tier:"mid"}]}},chatgpt:{label:"GPT Subscription",apiKeyName:"CHATGPT_SIGN_IN",models:{image:[{id:"gpt-image-2",label:"GPT Image 2",tier:"mid"}],video:[],speech:[],transcription:[]}},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",models:{image:[{id:"gemini-3.1-flash-lite-image",label:"3.1 Flash Lite Image",tier:"small"},{id:"gemini-3.1-flash-image",label:"3.1 Flash Image",tier:"mid"},{id:"gemini-3-pro-image",label:"3 Pro Image",tier:"large"}],video:[{id:"veo-3.1-lite-generate-preview",label:"Veo 3.1 Lite",tier:"small"},{id:"veo-3.1-fast-generate-preview",label:"Veo 3.1 Fast",tier:"mid"},{id:"veo-3.1-generate-preview",label:"Veo 3.1",tier:"large"}],speech:[{id:"gemini-2.5-flash-preview-tts",label:"2.5 Flash TTS",tier:"small"},{id:"gemini-3.1-flash-tts-preview",label:"3.1 Flash TTS",tier:"mid"},{id:"gemini-2.5-pro-preview-tts",label:"2.5 Pro TTS",tier:"large"}],transcription:[{id:"gemini-3.5-transcribe",label:"3.5 Transcribe",tier:"mid"}]}},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",models:{image:[{id:"grok-imagine-image",label:"Grok Imagine",tier:"small"},{id:"grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"mid"}],video:[{id:"grok-imagine-video",label:"Grok Imagine Video",tier:"small"},{id:"grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"}],speech:[{id:"grok-tts",label:"Grok TTS",tier:"mid"}],transcription:[{id:"grok-stt",label:"Grok STT",tier:"mid"}]}},"vercel-ai-gateway":{label:"Vercel AI Gateway",apiKeyName:"AI_GATEWAY_API_KEY",models:{image:[{id:"bytedance/seedream-5.0-lite",label:"Seedream 5.0 Lite",tier:"small"},{id:"bfl/flux-2-klein-9b",label:"FLUX 2 Klein 9B",tier:"small"},{id:"spacexai/grok-imagine-image-2.0",label:"Grok Imagine 2.0",tier:"small"},{id:"bfl/flux-2-pro",label:"FLUX 2 Pro",tier:"mid"},{id:"bytedance/seedream-5.0-pro",label:"Seedream 5.0 Pro",tier:"mid"},{id:"recraft/recraft-v4.1",label:"Recraft V4.1",tier:"mid"},{id:"openai/gpt-image-2.5-sunburst",label:"GPT Image 2.5 Sunburst",tier:"large"}],video:[{id:"bytedance/seedance-2.0-mini",label:"Seedance 2.0 Mini",tier:"small"},{id:"google/veo-3.1-lite-generate-001",label:"Veo 3.1 Lite",tier:"small"},{id:"alibaba/wan-v2.6-t2v",label:"Wan 2.6",tier:"small"},{id:"google/veo-3.1-fast-generate-001",label:"Veo 3.1 Fast",tier:"mid"},{id:"bytedance/seedance-2.5",label:"Seedance 2.5",tier:"mid"},{id:"spacexai/grok-imagine-video-1.5",label:"Grok Imagine Video 1.5",tier:"mid"},{id:"klingai/kling-v3.0-t2v",label:"Kling 3.0",tier:"large"},{id:"google/veo-3.1-generate-001",label:"Veo 3.1",tier:"large"}],speech:[{id:"fish-audio/s1",label:"Fish Audio S1",tier:"small"},{id:"openai/tts-1",label:"OpenAI TTS 1",tier:"small"},{id:"spacexai/grok-tts",label:"Grok TTS",tier:"mid"},{id:"fish-audio/s2.1-pro",label:"Fish Audio S2.1 Pro",tier:"mid"},{id:"openai/tts-1-hd",label:"OpenAI TTS 1 HD",tier:"large"}],transcription:[{id:"spacexai/grok-stt",label:"Grok STT",tier:"small"},{id:"fish-audio/transcribe-1",label:"Fish Transcribe 1",tier:"small"},{id:"openai/gpt-4o-mini-transcribe",label:"4o mini Transcribe",tier:"small"},{id:"openai/gpt-4o-transcribe",label:"4o Transcribe",tier:"mid"},{id:"google/gemini-3.5-transcribe",label:"Gemini 3.5 Transcribe",tier:"mid"}]}}},m=Object.keys(d).map(e=>({id:e,...d[e]})),g={openai:{label:"OpenAI",apiKeyName:"OPENAI_API_KEY",keysAt:"https://platform.openai.com/api-keys",keyLooks:"sk-…",defaultTier:"small",suggestModels:[{id:"gpt-6-luna",label:"6 Luna",tier:"small",context:105e4,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6.1-sol",label:"6.1 Sol",tier:"mid",context:105e4,efforts:["low","medium","high","xhigh"]},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:105e4,efforts:["low","medium","high","xhigh"]}]},chatgpt:{label:"GPT Subscription",apiKeyName:"CHATGPT_SIGN_IN",signIn:!0,suggestModels:[{id:"gpt-6-luna",label:"6 Luna",tier:"small",context:272e3,efforts:["none","low","medium","high","xhigh"]},{id:"gpt-6.1-sol",label:"6.1 Sol",tier:"mid",context:272e3,efforts:["low","medium","high","xhigh"]},{id:"gpt-6-astra",label:"6 Astra",tier:"large",context:272e3,efforts:["low","medium","high","xhigh"]}]},anthropic:{label:"Claude",apiKeyName:"ANTHROPIC_API_KEY",keysAt:"https://platform.claude.com/settings/keys",keyLooks:"sk-ant-…",suggestModels:[{id:"claude-haiku-4-5",label:"Haiku 4.5",tier:"small",efforts:["none","minimal","low","medium","high","xhigh"]},{id:"claude-sonnet-5-5",label:"Sonnet 5.5",tier:"mid",context:1e6,efforts:["none","low","medium","high","xhigh"]},{id:"claude-opus-5-5",label:"Opus 5.5",tier:"large",context:1e6,efforts:["low","medium","high","xhigh"]},{id:"claude-fable-5-1",label:"Fable 5.1",tier:"large",efforts:["none","low","medium","high","xhigh"]}]},google:{label:"Gemini",apiKeyName:"GOOGLE_GENERATIVE_AI_API_KEY",keysAt:"https://aistudio.google.com/apikey",keyLooks:"AIza…",suggestModels:[{id:"gemini-3.5-flash-lite",label:"3.5 Flash Lite",tier:"small",context:1e6,efforts:["minimal","low","medium","high"]},{id:"gemini-3.8-flash",label:"3.8 Flash",tier:"mid",context:1e6,efforts:["low","medium","high"]}]},xai:{label:"xAI",apiKeyName:"XAI_API_KEY",keysAt:"https://console.x.ai",keyLooks:"xai-…",suggestModels:[{id:"grok-4.7",label:"Grok 4.7",tier:"large",context:5e5,efforts:["none","low","medium","high","xhigh"]}]},"vercel-ai-gateway":{label:"Vercel AI Gateway",apiKeyName:"AI_GATEWAY_API_KEY",keysAt:"https://vercel.com/docs/ai-gateway/authentication-and-byok/authentication",suggestModels:[{id:"zai/glm-5.3-flash",label:"GLM 5.3 Flash",tier:"small"},{id:"google/gemini-3.8-flash",label:"Gemini 3.8 Flash",tier:"small"},{id:"openai/gpt-6-luna",label:"GPT 6 Luna",tier:"small",context:105e4},{id:"zai/glm-5.3",label:"GLM 5.3",tier:"mid"},{id:"spacexai/grok-4.7",label:"Grok 4.7",tier:"mid",context:5e5},{id:"anthropic/claude-sonnet-5.5",label:"Claude Sonnet 5.5",tier:"mid"},{id:"openai/gpt-6.1-sol",label:"GPT 6.1 Sol",tier:"mid",context:105e4},{id:"moonshotai/kimi-k3",label:"Kimi K3",tier:"mid"},{id:"anthropic/claude-opus-5.5",label:"Claude Opus 5.5",tier:"large",context:1e6},{id:"openai/gpt-6-astra",label:"GPT 6 Astra",tier:"large",context:105e4}]},openrouter:{label:"OpenRouter",apiKeyName:"OPENROUTER_API_KEY",keysAt:"https://openrouter.ai/settings/keys",keyLooks:"sk-or-…",suggestModels:[{id:"z-ai/glm-5.3-flash",label:"GLM 5.3 Flash",tier:"small",context:1310720},{id:"google/gemini-3.8-flash",label:"Gemini 3.8 Flash",tier:"small",context:1048576},{id:"openai/gpt-6-luna",label:"GPT 6 Luna",tier:"small",context:105e4},{id:"z-ai/glm-5.3",label:"GLM 5.3",tier:"mid",context:1310720},{id:"x-ai/grok-4.7",label:"Grok 4.7",tier:"mid",context:5e5},{id:"anthropic/claude-sonnet-5.5",label:"Claude Sonnet 5.5",tier:"mid",context:1e6},{id:"openai/gpt-6.1-sol",label:"GPT 6.1 Sol",tier:"mid",context:105e4},{id:"moonshotai/kimi-k3",label:"Kimi K3",tier:"mid",context:1048576},{id:"anthropic/claude-opus-5.5",label:"Claude Opus 5.5",tier:"large",context:1e6},{id:"openai/gpt-6-astra",label:"GPT 6 Astra",tier:"large",context:105e4}]},mistral:{label:"Mistral",apiKeyName:"MISTRAL_API_KEY",keysAt:"https://console.mistral.ai/api-keys",suggestModels:[{id:"ministral-8b-latest",label:"Ministral 8B",tier:"small",efforts:[]},{id:"mistral-small-latest",label:"Small",tier:"mid",efforts:["none","high"]},{id:"mistral-medium-latest",label:"Medium",tier:"large",efforts:["none","high"]},{id:"mistral-large-latest",label:"Large",tier:"large",efforts:[]}]},deepseek:{label:"DeepSeek",apiKeyName:"DEEPSEEK_API_KEY",keysAt:"https://platform.deepseek.com/api_keys",keyLooks:"sk-…",suggestModels:[{id:"deepseek-flash",label:"V4.1 Flash",tier:"small",context:1e6,efforts:["none","low","high","xhigh"]},{id:"deepseek-v4-pro",label:"V4 Pro",tier:"large",context:1e6,efforts:["none","low","high","xhigh"]}]},groq:{label:"Groq",apiKeyName:"GROQ_API_KEY",keysAt:"https://console.groq.com/keys",keyLooks:"gsk_…",suggestModels:[{id:"openai/gpt-oss-20b",label:"GPT OSS 20B",tier:"small",context:131072,efforts:["low","medium","high"]},{id:"openai/gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:131072,efforts:["low","medium","high"]},{id:"llama-3.3-70b-versatile",label:"Llama 3.3 70B",tier:"mid",context:131072,efforts:[]}]},cerebras:{label:"Cerebras",apiKeyName:"CEREBRAS_API_KEY",keysAt:"https://cloud.cerebras.ai",keyLooks:"csk-…",suggestModels:[{id:"qwen-3.8-27b",label:"Qwen 3.8 27B",tier:"small",context:64e3},{id:"gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:65536}]},togetherai:{label:"Together",apiKeyName:"TOGETHER_AI_API_KEY",keysAt:"https://api.together.ai/settings/api-keys",suggestModels:[{id:"Qwen/Qwen3.5-9B",label:"Qwen 3.5 9B",tier:"small",context:262144},{id:"zai-org/GLM-5.3-Flash",label:"GLM 5.3 Flash",tier:"small",context:1048575},{id:"openai/gpt-oss-120b",label:"GPT OSS 120B",tier:"mid",context:131072},{id:"deepseek-ai/DeepSeek-V4.1-Flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1e6},{id:"zai-org/GLM-5.3",label:"GLM 5.3",tier:"large",context:1048575},{id:"moonshotai/Kimi-K3",label:"Kimi K3",tier:"large",context:1048576}]},fireworks:{label:"Fireworks",apiKeyName:"FIREWORKS_API_KEY",keysAt:"https://app.fireworks.ai/account/api-keys",keyLooks:"fw_…",suggestModels:[{id:"accounts/fireworks/models/glm-5p3-flash",label:"GLM 5.3 Flash",tier:"small",context:1048576},{id:"accounts/fireworks/models/deepseek-v4p1-flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1048576},{id:"accounts/fireworks/models/minimax-m3",label:"MiniMax M3",tier:"mid",context:512e3},{id:"accounts/fireworks/models/glm-5p3",label:"GLM 5.3",tier:"large",context:1048576},{id:"accounts/fireworks/models/kimi-k3",label:"Kimi K3",tier:"large",context:1048576}]},deepinfra:{label:"DeepInfra",apiKeyName:"DEEPINFRA_API_KEY",keysAt:"https://deepinfra.com/dash/api_keys",suggestModels:[{id:"deepseek-ai/DeepSeek-V4-Flash-0731",label:"DeepSeek V4 Flash",tier:"small",context:1048576},{id:"deepseek-ai/DeepSeek-V4.1-Flash",label:"DeepSeek V4.1 Flash",tier:"mid",context:1048576},{id:"zai-org/GLM-5.2",label:"GLM 5.2",tier:"mid",context:1048576},{id:"zai-org/GLM-5.3",label:"GLM 5.3",tier:"large",context:1048576},{id:"moonshotai/Kimi-K3",label:"Kimi K3",tier:"large",context:1048576}]},cohere:{label:"Cohere",apiKeyName:"COHERE_API_KEY",keysAt:"https://dashboard.cohere.com/api-keys",suggestModels:[{id:"command-r7b-12-2024",label:"Command R7B",tier:"small",context:128e3},{id:"command-a-03-2025",label:"Command A",tier:"mid",context:256e3},{id:"command-a-plus-05-2026",label:"Command A+",tier:"large",context:128e3}]}},p=Object.keys(g).map(e=>({id:e,...g[e]}));e.s(["CATALOG_TEXT",0,"language","CATALOG_TOOL_USE",0,"tool-use","EFFORTS",0,l,"MEDIA_MODEL_PROVIDERS",0,d,"MEDIA_MODEL_PROVIDER_LIST",0,m,"TEXT_MODEL_PROVIDERS",0,g,"TEXT_MODEL_PROVIDER_LIST",0,p,"VENDOR_PROVIDERS",0,{anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",openrouter:"openrouter"},"canMakeKind",0,(e,t)=>(d[e]?.models[t]?.length??0)>0,"compactAtFor",0,e=>e&&e>0?Math.round(e*i.BOT_RUN.compactHeadroom):i.BOT_RUN.compactAt,"contextWindowOf",0,function(e,t,i=[]){if(s(e))return i.find(e=>e.id===t)?.contextWindow??null;let n=g[e].suggestModels;return n.find(e=>e.id===t)?.context??null},"effortSchema",0,o,"effortsOf",0,function(e,t,i=[]){if(s(e))return i.find(e=>e.id===t)?.efforts??null;let n=g[e].suggestModels;return n.find(e=>e.id===t)?.efforts??null},"isCatalogProvider",0,s,"parseMediaModel",0,function(e){let[t,...i]=(e??"").trim().split("/"),n=c.safeParse({provider:t,model:i.join("/")});return n.success?n.data:null},"parseTextModel",0,function(e){let[t,...i]=(e??"").trim().split("/"),n=r.safeParse({provider:t,model:i.join("/")});return n.success?n.data:null},"planCallsOf",0,function(e){return!!e&&e?.plan?.toLowerCase()!=="free"},"planMediaOf",0,function(e,t){if(!t||t.plan?.toLowerCase()==="free")return null;let[i]=d.chatgpt.models[e];return i?{provider:"chatgpt",model:i.id}:null},"planName",0,e=>e?e.charAt(0).toUpperCase()+e.slice(1):null,"refusedWords",0,e=>{let{label:t,signIn:i}=g[e];return`${t} refused the ${i?"sign-in":"key"} it runs on`},"textModelProviderSchema",0,n,"textModelRefSchema",0,r])},431157,e=>{"use strict";var t=e.i(271645),i=e.i(574735),n=e.i(365420),r=e.i(146376),l=e.i(108868),o=e.i(667865),a=e.i(439957),s=e.i(229315),u=e.i(675606),c=e.i(56434),d=e.i(46420),m=e.i(584446),g=e.i(958408),p=e.i(673752),f=e.i(596296),h=e.i(944681),b=e.i(994814);e.s(["useHoverFloatingInteraction",0,function(e,E={}){let{enabled:v=!0,closeDelay:y=0,nodeId:k}=E,T="rootStore"in e?e.rootStore:e,S=T.useState("open"),x=T.useState("floatingElement"),P=T.useState("domReferenceElement"),{dataRef:w}=T.context,A=(0,d.useFloatingTree)(),I=(0,d.useFloatingParentNodeId)(),O=(0,p.useHoverInteractionSharedState)(T),M=(0,a.useTimeout)(),C=(0,o.useStableCallback)(()=>(0,h.isClickLikeOpenEvent)(w.current.openEvent?.type,O.interactedInside)),R=(0,o.useStableCallback)(()=>(0,h.isHoverOpenEvent)(w.current.openEvent?.type)),L=(0,o.useStableCallback)(()=>{(0,p.clearSafePolygonPointerEventsMutation)(O)});(0,r.useIsoLayoutEffect)(()=>{S||(O.pointerType=void 0,O.restTimeoutPending=!1,O.interactedInside=!1,L())},[S,O,L]),t.useEffect(()=>L,[L]),(0,r.useIsoLayoutEffect)(()=>{if(v&&S&&O.handleCloseOptions?.blockPointerEvents&&R()&&(0,s.isElement)(P)&&x){let e=(0,l.ownerDocument)(x),t=A?.nodesRef.current.find(e=>e.id===I)?.context?.elements.floating;t&&(t.style.pointerEvents="");let i=O.pointerEventsScopeElement!==x?O.pointerEventsScopeElement:null,n=t!==x?t:null,r=O.handleCloseOptions?.getScope?.()??i??n??P.closest("[data-rootownerid]")??e.body;return(0,p.applySafePolygonPointerEventsMutation)(O,{scopeElement:r,referenceElement:P,floatingElement:x}),()=>{L()}}},[v,S,P,x,O,R,A,I,L]),t.useEffect(()=>{if(v)return(0,n.mergeCleanups)(x&&(0,i.addEventListener)(x,"mouseenter",function(){O.openChangeTimeout.clear(),M.clear(),A?.events.off("floating.closed",t),L()}),x&&(0,i.addEventListener)(x,"mouseleave",function(i){if(e()&&A)return void A.events.on("floating.closed",t);if((0,b.isInsideEnabledTrigger)(i.relatedTarget,T.context.triggerElements))return;let n=w.current.floatingContext?.nodeId??k,r=i.relatedTarget;if(!(A&&n&&(0,s.isElement)(r)&&(0,g.getNodeChildren)(A.nodesRef.current,n,!1).some(e=>(0,m.contains)(e.context?.elements.floating,r)))){let e,t;if(O.handler)return void O.handler(i);L(),R()&&!C()&&(e=(0,h.getDelay)(y,"close",O.pointerType),t=()=>{T.setOpen(!1,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,i)),A?.events.emit("floating.closed",i)},e?O.openChangeTimeout.start(e,t):(O.openChangeTimeout.clear(),t()))}}),x&&(0,i.addEventListener)(x,"pointerdown",function(e){let t=(0,m.getTarget)(e);if(!(0,f.isInteractiveElement)(t)){O.interactedInside=!1;return}O.interactedInside=t?.closest("[aria-haspopup]")!=null},!0),()=>{A?.events.off("floating.closed",t)});function e(){return!!(A&&I&&(0,g.getNodeChildren)(A.nodesRef.current,I).length>0)}function t(i){!A||!I||e()||M.start(0,()=>{A.events.off("floating.closed",t),T.setOpen(!1,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,i)),A.events.emit("floating.closed",i)})}},[v,x,T,w,y,k,R,C,L,O,A,I,M])}])},673752,e=>{"use strict";var t=e.i(626300),i=e.i(388940),n=e.i(439957);e.i(596296);class r{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new n.Timeout,this.restTimeout=new n.Timeout,this.handleCloseOptions=void 0}static create(){return new r}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}let l=new WeakMap;function o(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&l.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),l.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}e.s(["applySafePolygonPointerEventsMutation",0,function(e,t){let{scopeElement:i,referenceElement:n,floatingElement:r}=t,a=l.get(i);a&&a!==e&&o(a),o(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=i,e.pointerEventsReferenceElement=n,e.pointerEventsFloatingElement=r,l.set(i,e),i.style.pointerEvents="none",n.style.pointerEvents="auto",r.style.pointerEvents="auto"},"clearSafePolygonPointerEventsMutation",0,o,"useHoverInteractionSharedState",0,function(e){let n=e.context.dataRef.current,l=(0,i.useRefWithInit)(()=>n.hoverInteractionState??r.create()).current;return n.hoverInteractionState||(n.hoverInteractionState=l),(0,t.useOnMount)(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}])},872135,e=>{"use strict";var t=e.i(271645),i=e.i(174080),n=e.i(574735),r=e.i(365420),l=e.i(108868),o=e.i(667865),a=e.i(446265),s=e.i(229315),u=e.i(675606),c=e.i(56434),d=e.i(46420),m=e.i(584446),g=e.i(157940),p=e.i(673752),f=e.i(944681),h=e.i(994814);let b={current:null};e.s(["useHoverReferenceInteraction",0,function(e,E={}){let{enabled:v=!0,delay:y=0,handleClose:k=null,mouseOnly:T=!1,restMs:S=0,move:x=!0,triggerElementRef:P=b,externalTree:w,isActiveTrigger:A=!0,getHandleCloseContext:I,isClosing:O,shouldOpen:M,guardStaleOpen:C=!1}=E,R="rootStore"in e?e.rootStore:e,{dataRef:L,events:_}=R.context,G=(0,d.useFloatingTree)(w),D=(0,p.useHoverInteractionSharedState)(R),N=t.useRef(!1),F=(0,a.useValueAsRef)(k),K=(0,a.useValueAsRef)(y),V=(0,a.useValueAsRef)(S),H=(0,a.useValueAsRef)(v),Y=(0,a.useValueAsRef)(M),B=(0,a.useValueAsRef)(O),j=(0,o.useStableCallback)(()=>(0,f.isClickLikeOpenEvent)(L.current.openEvent?.type,D.interactedInside)),W=(0,o.useStableCallback)(()=>Y.current?.()!==!1),$=(0,o.useStableCallback)((e,t,i)=>{let n=R.context.triggerElements;return n.hasElement(t)?!e||!(0,m.contains)(e,t):!!(0,s.isElement)(i)&&n.hasMatchingElement(e=>(0,m.contains)(e,i))&&(!e||!(0,m.contains)(e,i))}),U=(0,o.useStableCallback)(()=>{D.handler&&((0,l.ownerDocument)(R.select("domReferenceElement")).removeEventListener("mousemove",D.handler),D.handler=void 0)}),z=(0,o.useStableCallback)(()=>{(0,p.clearSafePolygonPointerEventsMutation)(D)});return A&&(D.handleCloseOptions=k?.__options),t.useEffect(()=>U,[U]),t.useEffect(()=>{if(v)return _.on("openchange",e),()=>{_.off("openchange",e)};function e(e){e.open?N.current=!1:(N.current=e.reason===c.REASONS.triggerHover,U(),D.openChangeTimeout.clear(),D.restTimeout.clear(),D.blockMouseMove=!0,D.restTimeoutPending=!1)}},[v,_,D,U]),t.useEffect(()=>{if(!v)return;function e(t,i=!0){let n=(0,f.getDelay)(K.current,"close",D.pointerType);n?D.openChangeTimeout.start(n,()=>{R.setOpen(!1,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,t)),G?.events.emit("floating.closed",t)}):i&&(D.openChangeTimeout.clear(),R.setOpen(!1,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,t)),G?.events.emit("floating.closed",t))}let t=P.current??(A?R.select("domReferenceElement"):null);if(!(0,s.isElement)(t))return;function i(e){if(D.openChangeTimeout.clear(),D.blockMouseMove=!1,T&&!(0,g.isMouseLikePointerType)(D.pointerType))return;let t=(0,f.getRestMs)(V.current),i=(0,f.getDelay)(K.current,"open",D.pointerType),n=(0,m.getTarget)(e),r=e.currentTarget??null,l=R.select("domReferenceElement"),o=r;if((0,s.isElement)(n)&&!R.context.triggerElements.hasElement(n)){for(let e of R.context.triggerElements.elements())if((0,m.contains)(e,n)){o=e;break}}(0,s.isElement)(r)&&(0,s.isElement)(l)&&!R.context.triggerElements.hasElement(r)&&(0,m.contains)(r,l)&&(o=l);let a=null!=o&&$(l,o,n),d=R.select("open"),p=B.current?.()??"ending"===R.select("transitionStatus"),h=!d&&p&&N.current,b=!a&&(0,s.isElement)(o)&&(0,s.isElement)(l)&&(0,m.contains)(l,o)&&h,E=t>0&&!i,v=!d||a;if(a&&(d||h)||b){W()&&R.setOpen(!0,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,e,o));return}!E&&(i?D.openChangeTimeout.start(i,()=>{v&&W()&&R.setOpen(!0,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,e,o))}):v&&W()&&R.setOpen(!0,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,e,o)))}function o(t){if(j())return void z();U();let i=R.select("domReferenceElement"),n=(0,l.ownerDocument)(i);D.restTimeout.clear(),D.restTimeoutPending=!1;let r=L.current.floatingContext??I?.();if(!(0,h.isInsideEnabledTrigger)(t.relatedTarget,R.context.triggerElements)){if(F.current&&r){R.select("open")||D.openChangeTimeout.clear();let i=P.current;D.handler=F.current({...r,tree:G,x:t.clientX,y:t.clientY,onClose(){z(),U(),H.current&&!j()&&i===R.select("domReferenceElement")&&e(t,!0)}}),n.addEventListener("mousemove",D.handler),D.handler(t);return}"touch"===D.pointerType&&(0,m.contains)(R.select("floatingElement"),t.relatedTarget)||e(t)}}let a=C?(0,n.addEventListener)(t,"mouseout",function(e){(0,m.contains)(t,e.relatedTarget)||(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1)}):void 0;return x?(0,r.mergeCleanups)((0,n.addEventListener)(t,"mousemove",i,{once:!0}),(0,n.addEventListener)(t,"mouseenter",i),(0,n.addEventListener)(t,"mouseleave",o),a):(0,r.mergeCleanups)((0,n.addEventListener)(t,"mouseenter",i),(0,n.addEventListener)(t,"mouseleave",o),a)},[U,z,L,K,R,v,F,D,A,$,j,T,x,V,P,G,H,I,B,W,C]),t.useMemo(()=>{if(v)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=R.select("domReferenceElement"),l=R.select("open"),o=$(r,n,e.target);if(T&&!(0,g.isMouseLikePointerType)(D.pointerType))return;if(l&&o&&D.handleCloseOptions?.blockPointerEvents){let e=R.select("floatingElement");if(e){let t=D.handleCloseOptions?.getScope?.()??n.ownerDocument.body;(0,p.applySafePolygonPointerEventsMutation)(D,{scopeElement:t,referenceElement:n,floatingElement:e})}}let a=(0,f.getRestMs)(V.current);function s(){if(D.restTimeoutPending=!1,j())return;let e=R.select("open");!D.blockMouseMove&&(!e||o)&&W()&&R.setOpen(!0,(0,u.createChangeEventDetails)(c.REASONS.triggerHover,t,n))}(!l||o)&&0!==a&&(!o&&D.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(D.restTimeout.clear(),"touch"===D.pointerType?i.flushSync(()=>{s()}):o&&l?s():(D.restTimeoutPending=!0,D.restTimeout.start(a,s))))}};function e(e){D.pointerType=e.pointerType}},[v,D,j,$,T,R,V,W])}])},944681,e=>{"use strict";var t=e.i(157940);e.s(["getDelay",0,function(e,i,n){let r=null==n||(0,t.isMouseLikePointerType)(n)?"function"==typeof e?e():e:0;return"number"==typeof r?r:r?.[i]},"getRestMs",0,function(e){return"function"==typeof e?e():e},"isClickLikeOpenEvent",0,function(e,t){return t||"click"===e||"mousedown"===e},"isHoverOpenEvent",0,function(e){return e?.includes("mouse")&&"mousedown"!==e}])},650316,e=>{"use strict";var t=e.i(229315),i=e.i(439957),n=e.i(584446),r=e.i(958408);let l=.1*.1;function o(e,t,i,n,r,l){return n>=t!=l>=t&&e<=(r-i)*(t-n)/(l-n)+i}function a(e,t,i,n,r,l,a,s,u,c){let d=!1;return o(e,t,i,n,r,l)&&(d=!d),o(e,t,r,l,a,s)&&(d=!d),o(e,t,a,s,u,c)&&(d=!d),o(e,t,u,c,i,n)&&(d=!d),d}function s(e,t,i,n,r,l){let o=Math.min(i,r),a=Math.max(i,r),s=Math.min(n,l),u=Math.max(n,l);return e>=o&&e<=a&&t>=s&&t<=u}e.s(["safePolygon",0,function(e={}){let{blockPointerEvents:o=!1}=e,u=new i.Timeout,c=({x:e,y:i,placement:o,elements:c,onClose:d,nodeId:m,tree:g})=>{let p=o?.split("-")[0],f=!1,h=null,b=null,E="u">typeof performance?performance.now():0;return function(o){u.clear();let v=c.domReference,y=c.floating;if(!v||!y||null==p||null==e||null==i)return;let{clientX:k,clientY:T}=o,S=(0,n.getTarget)(o),x="mouseleave"===o.type,P=(0,n.contains)(y,S),w=(0,n.contains)(v,S);if(P&&(f=!0,!x))return;if(w&&(f=!1,!x)){f=!0;return}if(x&&(0,t.isElement)(o.relatedTarget)&&(0,n.contains)(y,o.relatedTarget))return;function A(){return!!(g&&(0,r.getNodeChildren)(g.nodesRef.current,m).length>0)}function I(){A()||(u.clear(),d())}if(A())return;let O=v.getBoundingClientRect(),M=y.getBoundingClientRect(),C=e>M.right-M.width/2,R=i>M.bottom-M.height/2,L=M.width>O.width,_=M.height>O.height,G=(L?O:M).left,D=(L?O:M).right,N=(_?O:M).top,F=(_?O:M).bottom;if("top"===p&&i>=O.bottom-1||"bottom"===p&&i<=O.top+1||"left"===p&&e>=O.right-1||"right"===p&&e<=O.left+1)return void I();let K=!1;switch(p){case"top":K=s(k,T,G,O.top+1,D,M.bottom-1);break;case"bottom":K=s(k,T,G,M.top+1,D,O.bottom-1);break;case"left":K=s(k,T,M.right-1,F,O.left+1,N);break;case"right":K=s(k,T,O.right-1,F,M.left+1,N)}if(K)return;if(f&&(!(k>=O.x)||!(k<=O.x+O.width)||!(T>=O.y)||!(T<=O.y+O.height))||!x&&function(e,t){let i=performance.now(),n=i-E;if(null===h||null===b||0===n)return h=e,b=t,E=i,!1;let r=e-h,o=t-b;return h=e,b=t,E=i,r*r+o*o<n*n*l}(k,T))return void I();let V=!1;switch(p){case"top":{let t=L?.25:2,n=i+.5+1,r=C||L?M.bottom-.5:M.top,l=C?L?M.bottom-.5:M.top:M.bottom-.5;V=a(k,T,L||C?e+t:e-t,n,L?e-t:C?e+t:e-t,n,M.left,r,M.right,l);break}case"bottom":{let t=L?.25:2,n=i-.5,r=C||L?M.top+.5:M.bottom,l=C?L?M.top+.5:M.bottom:M.top+.5;V=a(k,T,L||C?e+t:e-t,n,L?e-t:C?e+t:e-t,n,M.left,r,M.right,l);break}case"left":{let t=_?.25:2,n=e+.5+1,r=R||_?M.right-.5:M.left,l=R?_?M.right-.5:M.left:M.right-.5;V=a(k,T,r,M.top,l,M.bottom,n,_||R?i+t:i-t,n,_?i-t:R?i+t:i-t);break}case"right":{let t=_?.25:2,n=e-.5,r=R||_?M.left+.5:M.right,l=R?_?M.left+.5:M.right:M.left+.5;V=a(k,T,n,_||R?i+t:i-t,n,_?i-t:R?i+t:i-t,r,M.top,l,M.bottom)}}V?f||u.start(40,I):I()}};return c.__options={...e,blockPointerEvents:o},c}])},994814,e=>{"use strict";var t=e.i(596296);e.s(["isInsideEnabledTrigger",()=>t.isTargetInsideEnabledTrigger])},96533,e=>{"use strict";e.i(247167);var t=e.i(733332),i=e.i(271645);let n=i.createContext(void 0);e.s(["useToolbarRootContext",0,function(e){let r=i.useContext(n);if(void 0===r&&!e)throw Error((0,t.default)(69));return r}])},346570,e=>{"use strict";var t=e.i(271645),i=e.i(174080),n=e.i(584446),r=e.i(383976),l=e.i(675606),o=e.i(56434);e.s(["useTriggerFocusGuards",0,function(e,a){let s=t.useRef(null);return{preFocusGuardRef:s,handlePreFocusGuardFocus:function(t){i.flushSync(()=>{e.setOpen(!1,(0,l.createChangeEventDetails)(o.REASONS.focusOut,t.nativeEvent,t.currentTarget))});let n=(0,r.getTabbableBeforeElement)(s.current);n?.focus()},handleFocusTargetFocus:function(t){let s=e.select("positionerElement");if(s&&(0,r.isOutsideEvent)(t,s))e.context.beforeContentFocusGuardRef.current?.focus();else{i.flushSync(()=>{e.setOpen(!1,(0,l.createChangeEventDetails)(o.REASONS.focusOut,t.nativeEvent,t.currentTarget))});let u=(0,r.getTabbableAfterElement)(e.context.triggerFocusTargetRef.current||a.current);for(;null!==u&&(0,n.contains)(s,u);){let e=u;if((u=(0,r.getNextTabbable)(u))===e)break}u?.focus()}}}}])},33383,e=>{"use strict";var t=e.i(271645),i=e.i(108868),n=e.i(145484),r=e.i(146376);e.s(["useAnchoredPopupScrollLock",0,function(e,l,o,a){let[s,u]=t.useState(!1);(0,r.useIsoLayoutEffect)(()=>{if(!e||!l||null==o)return void u(!1);let t=(0,i.ownerDocument)(o).documentElement.clientWidth,n=o.offsetWidth;u(t>0&&n>0&&n>=t-20)},[e,l,o]),(0,n.useScrollLock)(e&&(!l||s),a)}])},818390,e=>{"use strict";var t=e.i(271645),i=e.i(174080),n=e.i(144394),r=e.i(708445),l=e.i(146376),o=e.i(667865),a=e.i(108868),s=e.i(222640),u=e.i(956789),c=e.i(73364);let d="--popup-width",m="--popup-height";var g=e.i(667387);function p(e,t,i){let n=e.style.getPropertyValue(t);return e.style.setProperty(t,i),()=>{e.style.setProperty(t,n)}}function f(e,t){let i=[];for(let[n,r]of Object.entries(t))i.push(p(e,n,r));return i.length?()=>{i.forEach(e=>e())}:u.NOOP}function h(e,t){let i="auto"===t?"auto":`${t.width}px`,n="auto"===t?"auto":`${t.height}px`;e.style.setProperty(d,i),e.style.setProperty(m,n)}function b(e,t){let i="max-content"===t?"max-content":`${t.width}px`,n="max-content"===t?"max-content":`${t.height}px`;e.style.setProperty(g.positionerWidth,i),e.style.setProperty(g.positionerHeight,n)}var E=e.i(872855),v=e.i(333848),y=e.i(343084),k=e.i(909091);let T={name:"adaptiveOrigin",async fn(e){let{x:t,y:i,rects:{floating:n},elements:{floating:r},platform:l,strategy:o,placement:s}=e,u=(0,v.ownerWindow)(r),c=u.getComputedStyle(r);if("0s"===c.transitionDuration||""===c.transitionDuration)return{x:t,y:i,data:k.DEFAULT_SIDES};let d=await l.getOffsetParent?.(r),m={width:0,height:0};if("fixed"===o&&u?.visualViewport)m={width:u.visualViewport.width,height:u.visualViewport.height};else if(d===u){let e=(0,a.ownerDocument)(r);m={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await l.isElement?.(d)&&(m=await l.getDimensions(d));let g=(0,y.getSide)(s),p=t,f=i;return"left"===g&&(p=m.width-(t+n.width)),"top"===g&&(f=m.height-(i+n.height)),{x:p,y:f,data:{sideX:"left"===g?"right":k.DEFAULT_SIDES.sideX,sideY:"top"===g?"bottom":k.DEFAULT_SIDES.sideY}}}};var S=e.i(843476);e.s(["popupViewportStateMapping",0,{activationDirection:e=>e?{"data-activation-direction":e}:null},"usePopupViewport",0,function(e){let v,{store:y,side:k,children:x}=e,P=(0,E.useDirection)(),w=y.useState("activeTriggerElement"),A=y.useState("activeTriggerId"),I=y.useState("open"),O=y.useState("payload"),M=y.useState("mounted"),C=y.useState("popupElement"),R=y.useState("positionerElement"),L=function(e){let[i,n]=t.useState({current:e,previous:null});return Object.is(e,i.current)||n({current:e,previous:i.current}),i.previous}(I?w:null),_=function(e,i){let[n,r]=t.useState(0),o=t.useRef(e),a=t.useRef(i),s=t.useRef(!1);return(0,l.useIsoLayoutEffect)(()=>{let t=o.current,n=i!==a.current;e!==t?(r(e=>e+1),s.current=!n):s.current&&n&&(r(e=>e+1),s.current=!1),o.current=e,a.current=i},[e,i]),`${e??"current"}-${n}`}(A,O),G=t.useRef(null),[D,N]=t.useState(null),[F,K]=t.useState(null),V=t.useRef(null),H=t.useRef(null),Y=(0,s.useAnimationsFinished)(V,!0),B=(0,r.useAnimationFrame)(),j=t.useRef(null),[W,$]=t.useState(null),[U,z]=t.useState(!1);(0,l.useIsoLayoutEffect)(()=>(y.set("adaptiveOrigin",T),()=>{y.set("adaptiveOrigin",void 0)}),[y]);let X=(0,o.useStableCallback)(()=>{V.current?.style.setProperty("animation","none"),V.current?.style.setProperty("transition","none"),H.current?.style.setProperty("display","none")}),q=(0,o.useStableCallback)(e=>{V.current?.style.removeProperty("animation"),V.current?.style.removeProperty("transition"),H.current?.style.removeProperty("display"),e&&$(e)}),Q=(0,o.useStableCallback)(()=>{j.current?.abort();let e=new AbortController;j.current=e,Y(()=>{N(null),$(null),G.current=null},e.signal)}),J=t.useRef(null);(0,l.useIsoLayoutEffect)(()=>{I&&M||(J.current=null)},[I,M]),(0,l.useIsoLayoutEffect)(()=>{var e,t;let i,n,r,l;w&&L&&w!==L&&J.current!==w&&G.current&&(N(G.current),z(!0),K((e=L,t=w,i=e.getBoundingClientRect(),n=t.getBoundingClientRect(),r={x:i.left+i.width/2,y:i.top+i.height/2},{horizontal:(l={x:n.left+n.width/2,y:n.top+n.height/2}).x-r.x,vertical:l.y-r.y})),J.current=w)},[w,L]),(0,l.useIsoLayoutEffect)(()=>{null!=D&&(j.current?.abort(),z(!0),B.request(()=>{i.flushSync(()=>{z(!1)}),Q()}))},[_,D,Q,B]),(0,l.useIsoLayoutEffect)(()=>{let e=V.current;if(!e)return;let t=(0,a.ownerDocument)(e).createElement("div");for(let i of Array.from(e.childNodes))t.appendChild(i.cloneNode(!0));G.current=t});let Z=null!=D;return v=Z?(0,S.jsxs)(t.Fragment,{children:[(0,S.jsx)("div",{"data-previous":!0,inert:(0,n.inertValue)(!0),ref:H,style:{...W?{[d]:`${W.width}px`,[m]:`${W.height}px`}:null,position:"absolute"},"data-ending-style":U?void 0:""},"previous"),(0,S.jsx)("div",{"data-current":!0,ref:V,"data-starting-style":U?"":void 0,children:x},_)]}):(0,S.jsx)("div",{"data-current":!0,ref:V,children:x},_),(0,l.useIsoLayoutEffect)(()=>{let e=H.current;e&&D&&e.replaceChildren(...Array.from(D.childNodes))},[D]),!function(e){let{popupElement:i,positionerElement:n,content:a,mounted:E,onMeasureLayout:v,onMeasureLayoutComplete:y,side:k,direction:T}=e,S=(0,s.useAnimationsFinished)(i,!0),x=(0,r.useAnimationFrame)(),P=t.useRef(null),w=t.useRef(!0),A=t.useRef(u.NOOP),I=(0,o.useStableCallback)(v),O=(0,o.useStableCallback)(y),M=t.useMemo(()=>{var e,t;let i,n;return e=k,t=T,i="top"===e,n="left"===e||e===("rtl"===t?"inline-end":"inline-start"),i||n?{position:"absolute",[i?"bottom":"top"]:"0",[n?"right":"left"]:"0"}:u.EMPTY_OBJECT},[k,T]);(0,l.useIsoLayoutEffect)(()=>{if(!E){A.current=u.NOOP,w.current=!0,P.current=null;return}if(!i||!n)return;A.current=f(i,M),h(i,"auto");let e=p(i,"position","static"),t=p(i,"transform","none"),r=p(i,"scale","1"),l=f(n,{[g.availableWidth]:"max-content",[g.availableHeight]:"max-content"});function o(){e(),t(),l(),r()}if(I?.(),w.current||null===P.current){b(n,"max-content");let e=(0,c.getCssDimensions)(i);return P.current=e,b(n,e),o(),O?.(null,e),w.current=!1,()=>{A.current(),A.current=u.NOOP}}b(n,"max-content");let a=P.current,s=(0,c.getCssDimensions)(i);P.current=s,h(i,a),o(),O?.(a,s),b(n,s);let v=new AbortController;return x.request(()=>{h(i,s),S(()=>{i.style.setProperty(d,"auto"),i.style.setProperty(m,"auto")},v.signal)}),()=>{v.abort(),x.cancel(),A.current(),A.current=u.NOOP}},[a,i,n,S,x,E,I,O,M])}({popupElement:C,positionerElement:R,mounted:M,content:O,onMeasureLayout:X,onMeasureLayoutComplete:q,side:k,direction:P}),{children:v,state:{activationDirection:function(e){if(e){var t,i;return`${(t=e.horizontal)>5?"right":t<-5?"left":""} ${(i=e.vertical)>5?"down":i<-5?"up":""}`}}(F),transitioning:Z}}}],818390)}]);