thursday-agent 0.26.0 → 0.27.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.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.json +5 -5
- package/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js +10 -10
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js +8 -8
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +8 -8
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/file/route.js +15 -15
- package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +5 -5
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/tool-result/[id]/route.js +6 -6
- package/.next/server/app/api/bot/tool-result/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +3 -3
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js +4 -4
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js +4 -4
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/automatic/route.js +5 -5
- package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/[provider]/route.js +5 -5
- package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/[provider]/route.js +5 -5
- package/.next/server/app/api/llm-model/credits/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js +6 -6
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js +6 -6
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js +5 -5
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js +6 -6
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js +5 -5
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js +5 -5
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js +15 -15
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js +4 -4
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +18 -18
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +8 -8
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/running/route.js +2 -2
- package/.next/server/app/api/running/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js +3 -3
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +6 -6
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +6 -6
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/end/route.js +5 -5
- package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/plan/route.js +14 -14
- package/.next/server/app/api/thursday/call/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js +6 -6
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/settings/route.js +5 -5
- package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js +14 -14
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +15 -15
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/update/route.js +7 -7
- package/.next/server/app/api/update/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +6 -6
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +6 -6
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/build-manifest.json +2 -2
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js +2 -2
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/build-manifest.json +2 -2
- package/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +184 -184
- package/.next/server/app/page.js +10 -10
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__01jpmcj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__03bjojd._.js +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0wosonh._.js → [root-of-the-server]__05u-9a3._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1dyse-1._.js → [root-of-the-server]__0_qe8iq._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0d-dfqm._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0jqidnu._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0mmynvy._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0qhf60h._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0sea36s._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0zezbds._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__12hkdpz._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__14inehv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17kdjf6._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__17yv6lg._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0b3_rzi._.js → [root-of-the-server]__1hjb8wf._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1jcu_e9._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1jmr2ed._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1o7z93z._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1onvx8x._.js +2 -2
- package/.next/server/chunks/_0-mqt2w._.js +1 -1
- package/.next/server/chunks/_04s1gb9._.js +30 -27
- package/.next/server/chunks/_06u9yo-._.js +1 -1
- package/.next/server/chunks/_08354bn._.js +33 -30
- package/.next/server/chunks/_083t_nr._.js +1 -1
- package/.next/server/chunks/_0c-s0ei._.js +1 -1
- package/.next/server/chunks/_0gifi_2._.js +2 -2
- package/.next/server/chunks/_0m3sdq8._.js +1 -1
- package/.next/server/chunks/_0pljp-1._.js +1 -1
- package/.next/server/chunks/_0wjia9n._.js +1 -1
- package/.next/server/chunks/_0wyh244._.js +33 -30
- package/.next/server/chunks/_0x2mdif._.js +1 -1
- package/.next/server/chunks/_1-sk_q4._.js +1 -1
- package/.next/server/chunks/_12a_gfz._.js +1 -1
- package/.next/server/chunks/_14-kmob._.js +1 -1
- package/.next/server/chunks/_16zct7w._.js +30 -27
- package/.next/server/chunks/_1823_7a._.js +4 -4
- package/.next/server/chunks/_1f_x75d._.js +1 -1
- package/.next/server/chunks/_1o2r4ja._.js +1 -1
- package/.next/server/chunks/_1q42187._.js +3 -3
- package/.next/server/chunks/_1ufbxe1._.js +1 -1
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/features_14kex_m._.js +11 -11
- package/.next/server/chunks/features_bot_08z387_._.js +4 -4
- package/.next/server/chunks/features_memory_0__61kl._.js +1 -1
- package/.next/server/chunks/features_memory_1uqvksn._.js +1 -1
- package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +1 -1
- package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +3 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__0x297x3._.js → [root-of-the-server]__03_9u5q._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0653diy._.js → [root-of-the-server]__04ky8w1._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__1zlzs9j._.js → [root-of-the-server]__0crm8gr._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__02936mh._.js → [root-of-the-server]__0d3n8i_._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0s8q44q._.js → [root-of-the-server]__0d4o9hs._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0id2dqb._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__1s0etwd._.js → [root-of-the-server]__0q2c15o._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0t_oz3-._.js +6 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__16x99f1._.js → [root-of-the-server]__12r70jm._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1867koj._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0glkz9k._.js → [root-of-the-server]__1fvh0zn._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1t38-p_._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__1c1xyyb._.js → [root-of-the-server]__1uy0zqr._.js} +2 -2
- package/.next/server/chunks/ssr/_02uubus._.js +3 -0
- package/.next/server/chunks/ssr/_0692i-a._.js +3 -0
- package/.next/server/chunks/ssr/_079xt7h._.js +32 -29
- package/.next/server/chunks/ssr/_07g7ojr._.js +3 -0
- package/.next/server/chunks/ssr/_0ewhz_x._.js +3 -0
- package/.next/server/chunks/ssr/_0f3t9pm._.js +2 -2
- package/.next/server/chunks/ssr/_0gx6qzr._.js +57 -0
- package/.next/server/chunks/ssr/_0pjwmak._.js +6 -0
- package/.next/server/chunks/ssr/_0pnzfq1._.js +1 -1
- package/.next/server/chunks/ssr/_0px9eat._.js +3 -0
- package/.next/server/chunks/ssr/_0r2_l__._.js +3 -0
- package/.next/server/chunks/ssr/{_20_wc-g._.js → _0rcuovx._.js} +2 -2
- package/.next/server/chunks/ssr/_0uwhhcs._.js +3 -0
- package/.next/server/chunks/ssr/{_1wct0tm._.js → _128r03g._.js} +1 -1
- package/.next/server/chunks/ssr/_12c2n7f._.js +3 -0
- package/.next/server/chunks/ssr/{_12_ail7._.js → _14f64h2._.js} +1 -1
- package/.next/server/chunks/ssr/_17fa2ns._.js +162 -0
- package/.next/server/chunks/ssr/_1_px1o-._.js +3 -0
- package/.next/server/chunks/ssr/_1a_w_du._.js +1 -1
- package/.next/server/chunks/ssr/_1e_9qjr._.js +1 -1
- package/.next/server/chunks/ssr/_1f59vze._.js +57 -0
- package/.next/server/chunks/ssr/_1j5ohq5._.js +3 -0
- package/.next/server/chunks/ssr/{_0ingto_._.js → _1kj3d2q._.js} +2 -2
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1ocl7u0._.js +3 -0
- package/.next/server/chunks/ssr/_1q9r6u6._.js +3 -0
- package/.next/server/chunks/ssr/{_0fvctar._.js → _1qqusa-._.js} +2 -2
- package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
- package/.next/server/chunks/ssr/_1uok0wt._.js +3 -0
- package/.next/server/chunks/ssr/_1v1pcoh._.js +1 -1
- package/.next/server/chunks/ssr/_1xw9imq._.js +3 -0
- package/.next/server/chunks/ssr/{components_ui_markdown-body_tsx_0h7bkrz._.js → components_ui_markdown-body_tsx_08i96c6._.js} +2 -2
- package/.next/server/chunks/ssr/features_0rrgq_t._.js +1 -1
- package/.next/server/chunks/ssr/features_ai_components_model-picker_tsx_0ucb1y9._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_0tb4ui-._.js +2 -2
- package/.next/server/chunks/ssr/features_bot_components_01ye2wp._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +2 -2
- package/.next/server/chunks/ssr/features_bot_components_thread-setting_tsx_0yae7zy._.js +1 -1
- package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +2 -2
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +2 -2
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_skills_components_skills-setting_tsx_1wtuuip._.js +1 -1
- package/.next/server/chunks/ssr/features_thursday_components_thursday-setting_tsx_1_6ydrc._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_193w7l8._.js → node_modules_02djdfa._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1bwlhwa._.js → node_modules_03ybg-h._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01xoz64._.js → node_modules_066eqdg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20ifwl6._.js → node_modules_09605b3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1yilsx4._.js → node_modules_0_c17cv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_080f5gu._.js → node_modules_0a1-9-h._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_17c047f._.js → node_modules_0bfpl_c._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1pav8g4._.js → node_modules_0brchjo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0gwiuga._.js → node_modules_0c0pgdi._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_02-zrtu._.js → node_modules_0ep265x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kqej10._.js → node_modules_0gzvt6a._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0i18max._.js → node_modules_0h4gjw5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1m2_gxv._.js → node_modules_0iso-he._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0cda8i6._.js → node_modules_0jvqmb4._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_0kzgugm._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_0uvoegq._.js → node_modules_0l8gpkg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12ajdg8._.js → node_modules_0mlrvds._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules_0nvqvnw._.js +7 -7
- package/.next/server/chunks/ssr/{node_modules_1s3j8gb._.js → node_modules_0ogtyfm._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1_xiwxs._.js → node_modules_0os_-0h._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1abjhxx._.js → node_modules_0p05zru._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1o-m6_3._.js → node_modules_0pf8124._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0eqvt2l._.js → node_modules_0pp3v4f._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0rzz90e._.js → node_modules_0r1vv13._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1kum1yu._.js → node_modules_0r9yw6x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1yw5fq4._.js → node_modules_0rk1a3e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1es3wjv._.js → node_modules_0sq1pa3._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1-cv1_p._.js → node_modules_0w-pjyz._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0g_yuwn._.js → node_modules_0yoh66_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1s9agqr._.js → node_modules_10kn3ni._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1yajzrd._.js → node_modules_124ipg-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0svoyrb._.js → node_modules_12_p7d0._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_203yqqb._.js → node_modules_12w12wr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_17ks351._.js → node_modules_16kmp_v._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_05qs8r_._.js → node_modules_16m_yhd._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07dc1cr._.js → node_modules_171uvar._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0qsi9t2._.js → node_modules_19pn2ti._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0k9_jdk._.js → node_modules_1_ly5yy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0o_gq58._.js → node_modules_1_wsn9q._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1u7wlaq._.js → node_modules_1djak6n._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_08cq8i-._.js → node_modules_1e-oxmh._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_15x7int._.js → node_modules_1ed4zep._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1pkpq6d._.js → node_modules_1f2qlxm._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1aw7c9f._.js → node_modules_1fn72fs._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules_1h9p77x._.js +7 -7
- package/.next/server/chunks/ssr/{node_modules_1ucf2fi._.js → node_modules_1hj0rvo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12pvysk._.js → node_modules_1jvkoqj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0tq4-57._.js → node_modules_1jzofr8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_08hfp3a._.js → node_modules_1maqy-g._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_071fb26._.js → node_modules_1oox5h1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_jxnnn._.js → node_modules_1p56fwh._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01yukzc._.js → node_modules_1prbr1-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hrbceb._.js → node_modules_1qfou69._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_11f1w-3._.js → node_modules_1qnosqe._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1kd_hpx._.js → node_modules_1rdpn6v._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_079iwnx._.js → node_modules_1v6m9sp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1iapzqf._.js → node_modules_1z8ywx9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1dim95c._.js → node_modules_1zzudo-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1_71wv3._.js → node_modules_2157u1j._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_1c5gb92._.js → node_modules_katex_dist_katex_mjs_12lynt6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_1ocxq2z._.js → node_modules_katex_dist_katex_mjs_1vjoadq._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1v93o68._.js +1 -1
- package/.next/server/middleware-build-manifest.js +5 -5
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +185 -185
- package/.next/static/chunks/051z85h3ofmif.js +1 -0
- package/.next/static/chunks/05722zc-sohb_.js +4 -0
- package/.next/static/chunks/07jo959manleh.js +1 -0
- package/.next/static/chunks/0_5a18_y41-_4.js +1 -0
- package/.next/static/chunks/0be7dgti95u_2.js +1 -0
- package/.next/static/chunks/0c28x0q2aqsbj.js +1 -0
- package/.next/static/chunks/0o_rabv5are-o.js +2 -0
- package/.next/static/chunks/{0776-hu4_eek7.js → 0wwq57j09skhy.js} +2 -2
- package/.next/static/chunks/0zm3urd75-zw5.js +1 -0
- package/.next/static/chunks/16hfi69t-6a4t.js +2 -0
- package/.next/static/chunks/1g58g8-daiwu5.js +3 -0
- package/.next/static/chunks/1i1u85j-_yb1n.js +15 -0
- package/.next/static/chunks/1kd2sxkkrae8e.js +1 -0
- package/.next/static/chunks/{3xloayc4c096r.js → 1n3a07w81jbc-.js} +1 -1
- package/.next/static/chunks/1nncyxatu7une.js +1 -0
- package/.next/static/chunks/1s5t41jiomssd.css +1 -0
- package/.next/static/chunks/1yl4mlpsw8e7h.js +1 -0
- package/.next/static/chunks/{33qtnlc00c9gq.js → 2gl-fo_rmmmq0.js} +1 -1
- package/.next/static/chunks/2h_sak2oi70qs.js +1 -0
- package/.next/static/chunks/2isg5redeg2bc.js +1 -0
- package/.next/static/chunks/{2fxn-xltgy2un.js → 2of2-kggzp-fk.js} +1 -1
- package/.next/static/chunks/2vmran3sacktz.js +1 -0
- package/.next/static/chunks/2w02v9g8o9-rz.js +1 -0
- package/.next/static/chunks/2wi2pcbjrqm86.js +1 -0
- package/.next/static/chunks/2xk8otp3gnzml.js +1 -0
- package/.next/static/chunks/2ym1hrikoit8p.js +1 -0
- package/.next/static/chunks/34d1f980dv5c6.js +18 -0
- package/.next/static/chunks/34zhr71217o1-.js +2 -0
- package/.next/static/chunks/{0o1r15rfncytn.js → 37r4l2878vybp.js} +1 -1
- package/.next/static/chunks/{2cz5734j90h5b.js → 3a-2z23puvz2z.js} +1 -1
- package/.next/static/chunks/3d55-y263hup9.js +1 -0
- package/.next/static/chunks/3dzrveotr82eu.js +39 -0
- package/.next/static/chunks/3fensfht8pxhl.js +55 -0
- package/.next/static/chunks/3k7fum0yljmyr.js +1 -0
- package/.next/static/chunks/3sawwm4vucnzn.js +1 -0
- package/.next/static/chunks/{0z0-g4k1hnpw2.js → 3u208m--8u1iq.js} +1 -1
- package/.next/static/chunks/{turbopack-1kym6rf88i5i0.js → turbopack-0ekrsq98buh0j.js} +1 -1
- package/README.md +18 -18
- package/bin/background.mjs +60 -32
- package/bin/print.mjs +82 -0
- package/bin/thursday.mjs +44 -13
- package/guide/bots.md +19 -3
- package/guide/calls.md +5 -2
- package/guide/memory.md +2 -1
- package/guide/setup.md +8 -6
- package/guide/trouble.md +4 -0
- package/package.json +11 -5
- package/public/voices/intro/awake-f4e02fad.ogg +0 -0
- package/seed-skills/concierge/travel/scripts/itinerary.mjs +2 -1
- package/server.js +1 -1
- package/skills/artifact/references/document.md +5 -2
- package/skills/artifact/runtime/document/markdown.mjs +14 -1
- package/skills/artifact/runtime/shell/head.html +1 -1
- package/skills/artifact/scripts/document.mjs +9 -3
- package/skills/browser/SKILL.md +17 -13
- package/.next/server/chunks/[root-of-the-server]__0ald4vb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0srfj96._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1kos36s._.js +0 -6
- package/.next/server/chunks/ssr/_024j8bs._.js +0 -3
- package/.next/server/chunks/ssr/_04jb10a._.js +0 -3
- package/.next/server/chunks/ssr/_059oyhd._.js +0 -3
- package/.next/server/chunks/ssr/_0d0uyl3._.js +0 -3
- package/.next/server/chunks/ssr/_0fk7dbp._.js +0 -88
- package/.next/server/chunks/ssr/_0gfa_rb._.js +0 -3
- package/.next/server/chunks/ssr/_0i7zd74._.js +0 -3
- package/.next/server/chunks/ssr/_0sp2z94._.js +0 -3
- package/.next/server/chunks/ssr/_1avnw03._.js +0 -57
- package/.next/server/chunks/ssr/_1bfrntd._.js +0 -6
- package/.next/server/chunks/ssr/_1cpvfkg._.js +0 -3
- package/.next/server/chunks/ssr/_1cqjpyq._.js +0 -3
- package/.next/server/chunks/ssr/_1khngyc._.js +0 -72
- package/.next/server/chunks/ssr/_1kyjimg._.js +0 -162
- package/.next/server/chunks/ssr/_1sw4r4m._.js +0 -6
- package/.next/server/chunks/ssr/_20004tu._.js +0 -57
- package/.next/server/chunks/ssr/node_modules_01alue6._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_02n9-pb._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0zxr5sz._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_trash_mjs_0px2gzr._.js +0 -3
- package/.next/static/chunks/02d9vhnz5mwvu.js +0 -1
- package/.next/static/chunks/06ff4fq0z4das.js +0 -1
- package/.next/static/chunks/09q9n7jrkm4c9.js +0 -39
- package/.next/static/chunks/0b3wt5kqs-mk2.js +0 -2
- package/.next/static/chunks/0blrj_tg1yur0.js +0 -1
- package/.next/static/chunks/0dn1ptom1ahgg.js +0 -18
- package/.next/static/chunks/0dq7uppta9s--.js +0 -1
- package/.next/static/chunks/0hoz2b--nhn4y.js +0 -1
- package/.next/static/chunks/0kfjtkez2xze2.js +0 -1
- package/.next/static/chunks/0mv2zywfzt83k.js +0 -4
- package/.next/static/chunks/0txtrhykehsd_.js +0 -55
- package/.next/static/chunks/17vs1vz7_4l4p.css +0 -1
- package/.next/static/chunks/1dnvf_117h4k3.js +0 -2
- package/.next/static/chunks/1irynso77np9t.js +0 -1
- package/.next/static/chunks/1sh_-w_keseat.js +0 -1
- package/.next/static/chunks/1z2_9pl3nezly.js +0 -3
- package/.next/static/chunks/23ty4edkuxirx.js +0 -1
- package/.next/static/chunks/2f1cnfz4h1e2x.js +0 -1
- package/.next/static/chunks/2jepcbdewlwlg.js +0 -1
- package/.next/static/chunks/2r_zq_knm0hph.js +0 -15
- package/.next/static/chunks/2yfmmo4qr_f-m.js +0 -1
- package/.next/static/chunks/3-xnkknav7azp.js +0 -1
- package/.next/static/chunks/38q31td1ecuay.js +0 -1
- package/.next/static/chunks/3n75-7grldc6f.js +0 -1
- package/.next/static/chunks/3ofr4htw4wpj3.js +0 -1
- package/.next/static/chunks/40bkw3zfenss4.js +0 -2
- package/public/voices/intro/awake-17dbafbf.ogg +0 -0
- package/public/voices/intro/models-d09ddc74.ogg +0 -0
- /package/.next/static/{YIQV0_9FZPTFUe9TCiVSF → 3_9hbwcAuWTSWCJSufp3d}/_buildManifest.js +0 -0
- /package/.next/static/{YIQV0_9FZPTFUe9TCiVSF → 3_9hbwcAuWTSWCJSufp3d}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{YIQV0_9FZPTFUe9TCiVSF → 3_9hbwcAuWTSWCJSufp3d}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,480869,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(493801),i=e.i(456420);let s={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};s.node;let r=(0,i.default)(s);var l=e.i(689664),o=e.i(716327),d=e.i(867927),u=e.i(632781),c=e.i(648119),m=e.i(21357),h=e.i(759659),x=e.i(263676),f=e.i(271645),p=e.i(798120),g=e.i(167881),b=e.i(630374),y=e.i(463415),j=e.i(23750),k=e.i(917162),v=e.i(421429),w=e.i(660302),N=e.i(319036),M=e.i(184762),S=e.i(41533),D=e.i(635963),T=e.i(978411),C=e.i(895836),$=e.i(989409),R=e.i(245629),O=e.i(609856),A=e.i(283653),z=e.i(647163),q=e.i(95187);let I=(0,q.createServerReference)("7fabe86e547bfb8470741bd4e4fb46143b4dbd1384",q.callServer,void 0,q.findSourceMapURL,"createRoutineAction"),E=(0,q.createServerReference)("7f607df1a42d9eeb8d244a7d6a8ff1c91334f46870",q.callServer,void 0,q.findSourceMapURL,"deleteRoutineAction"),P=(0,q.createServerReference)("7fc3679d73e980c1fbb797a33639f10e1a7817cc27",q.callServer,void 0,q.findSourceMapURL,"runRoutineNowAction"),B=(0,q.createServerReference)("7f0cc6cdd3bb4b023bd90b93707f3251f5ceaa45eb",q.callServer,void 0,q.findSourceMapURL,"updateRoutineAction");var F=e.i(362201);let H=[1,2,3,4,5,6,7],U=F.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"A time is HH:MM, 00:00 to 23:59");function K(e){let[t,n]=e.split(" "),[a,i,s]=t.split("-").map(Number),[r,l]=n.split(":").map(Number);return new Date(a,i-1,s,r,l)}let W=/^\d{4}-\d\d-\d\d ([01]\d|2[0-3]):[0-5]\d$/,L=F.string().regex(W,'A moment is "YYYY-MM-DD HH:MM"').refine(e=>{if(!W.test(e))return!0;let t=K(e);return t.getMonth()===Number(e.slice(5,7))-1&&t.getDate()===Number(e.slice(8,10))},"There is no such day"),G=F.discriminatedUnion("kind",[F.object({kind:F.literal("once"),at:L}),F.object({kind:F.literal("daily"),time:U,days:F.array(F.number().int().min(1).max(7)).min(1,"Pick at least one day").transform(e=>[...new Set(e)].sort((e,t)=>e-t))}),F.object({kind:F.literal("every"),hours:F.number().int().min(S.ROUTINE.minHours,`No more often than every ${S.ROUTINE.minHours}h`).max(168)})]),J=F.object({bot:F.string().trim().min(1,"Pick a bot"),label:F.string().trim().min(1,"Give it a name").max(80),request:F.string().trim().min(1,"Say what it should do"),schedule:G}),Y=F.object({id:F.string(),status:F.enum(["running","waiting","done","cancelled"]),outcome:F.string().nullable(),updatedAt:R.DateLikeSchema});J.extend({id:F.string(),enabled:F.boolean(),nextRunAt:R.DateLikeSchema,runs:F.array(Y)});let _=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(e){if("once"===e.kind){let[t,n]=e.at.split(" "),[,a,i]=t.split("-").map(Number);return`Once \xb7 ${V[a-1]} ${i} ${n}`}if("every"===e.kind)return 1===e.hours?"Every hour":`Every ${e.hours} hours`;let{days:t,time:n}=e;if(7===t.length)return`Daily ${n}`;if(1===t.length)return`${_[t[0]-1]} ${n}`;let a=t.every((e,n)=>0===n||e===t[n-1]+1)?`${_[t[0]-1]}–${_[t.at(-1)-1]}`:t.map(e=>_[e-1]).join(" ");return`Daily ${n} \xb7 ${a}`}var Q=e.i(431594);function Z({routine:e,bots:n,open:a,onOpen:i,onSwitch:s}){let r=function(e,t){let n=e.runs[0],a=n?.outcome?(0,z.plainText)(n.outcome):"",i=n?`${(0,R.whenOf)(n.updatedAt)}${a?` — ${a}`:""}`:"Not run yet";if(!e.enabled)return{text:`Off \xb7 ${i}`,tone:"text-muted-foreground"};let s=t?.find(t=>t.name===e.bot);return t&&(!s||s.disabled)?{text:s?`${e.bot} is switched off`:`${e.bot} is gone — pick another bot`,tone:z.WAITING_INK,waits:!0}:n?.status==="running"?{text:"Running now",tone:"",shine:!0}:n?.status==="waiting"?{text:`The last run waits on you${a?`: ${a}`:""}`,tone:z.WAITING_INK,waits:!0}:{text:i,tone:"text-muted-foreground"}}(e,n),l=e.runs[0]?.status==="running";return(0,t.jsxs)("div",{className:(0,z.cn)("flex items-center gap-3 p-4 transition-colors",a?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("button",{type:"button",onClick:i,className:(0,z.cn)("flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",!e.enabled&&"opacity-70"),children:[(0,t.jsx)(D.BotMark,{size:40,seed:e.bot,...(0,D.markOf)(e.bot,n),state:l?"thinking":"idle",notify:!!r.waits,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),l&&(0,t.jsx)(u.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),(0,t.jsx)("span",{className:"flex min-w-0 text-[13px] leading-snug",children:r.shine?(0,t.jsx)(w.ShinyText,{text:r.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,z.cn)("min-w-0 truncate",r.tone),children:r.text})})]}),(0,t.jsxs)("span",{className:"flex w-44 shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",children:[(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 text-foreground",children:[(0,t.jsx)(Q.RoutineMark,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate",children:X(e.schedule)})]}),(0,t.jsx)("span",{className:"max-w-full truncate text-muted-foreground/70",children:e.enabled?`next ${(0,R.whenOf)(e.nextRunAt)}`:"off"})]})]}),(0,t.jsx)(N.Switch,{checked:e.enabled,onCheckedChange:s,"aria-label":`${e.label} on or off`,className:"shrink-0"}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":`Open ${e.label}`,className:"shrink-0 rounded-md text-muted-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(d.ChevronRight,{className:"size-4"})})]})}let ee=e=>String(e).padStart(2,"0");function et(e,t=new Date){let a=new Date(t);return a.setDate(a.getDate()+e),(0,n.format)(a,"yyyy-MM-dd")}let en=(e,t)=>{let n=e?.schedule;return{label:e?.label??"",bot:e?.bot??t.find(e=>!e.disabled)?.name??"",request:e?.request??"",kind:n?.kind??"daily",time:n?.kind==="daily"?n.time:n?.kind==="once"?n.at.slice(11):"09:00",days:n?.kind==="daily"?n.days:[...H],hours:n?.kind==="every"?n.hours:6,date:n?.kind==="once"?n.at.slice(0,10):et(1)}};function ea(e){let t=/^\d\d:\d\d$/.test(e.time);return"once"===e.kind?t&&e.date?{kind:"once",at:`${e.date} ${e.time}`}:null:"daily"===e.kind?e.days.length&&t?{kind:"daily",time:e.time,days:e.days}:null:{kind:"every",hours:e.hours}}let ei=e=>e?.kind==="once"&&K(e.at)<=new Date,es=[{label:"Every day",days:[...H]},{label:"Weekdays",days:[1,2,3,4,5]},{label:"Weekends",days:[6,7]}],er=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],el=[1,2,3,6,12,24].filter(e=>e>=S.ROUTINE.minHours);function eo({routine:e,bots:n,onClose:a,onMade:i}){var s,r;let l,[u,w]=(0,f.useState)(null),S=(0,f.useCallback)(e=>{w(e?.closest("[data-slot=dialog-content]")??null)},[]),C="new"===e?null:e,q="new"===e?"new":e?.id??"",[F,U]=(0,f.useState)(()=>en(C,n));(0,f.useEffect)(()=>U(en(C,n)),[q]);let K=e=>U(t=>({...t,...e})),W=()=>(0,A.revalidate)(p.queryKey.routines),[L,G]=(0,O.useServerAction)(I,{onOk:e=>{W(),i(e.id)}}),[J]=(0,O.useServerAction)(B,{onOk:W}),[Y]=(0,O.useServerAction)(E,{onOk:W}),[V,Z]=(0,O.useServerAction)(P,{onOk:()=>{W(),(0,A.revalidate)(p.queryKey.threads)}}),em=ea(F),eg=em&&!ei(em)&&F.label.trim()&&F.bot&&F.request.trim()?{label:F.label.trim(),bot:F.bot,request:F.request.trim(),schedule:em}:null,eb=e=>{C&&J(C.id,e)},ey=e=>{K(e);let t=ea({...F,...e});!t||ei(t)||C&&function(e,t){if("once"===e.kind)return"once"===t.kind&&e.at===t.at;if("every"===e.kind)return"every"===t.kind&&e.hours===t.hours;let n=e=>[...e].sort((e,t)=>e-t).join();return"daily"===t.kind&&e.time===t.time&&n(e.days)===n(t.days)}(t,C.schedule)||eb({schedule:t,..."once"===t.kind?{enabled:!0}:{}})},ej=!!(C&&(F.label.trim()&&F.label.trim()!==C.label||F.request.trim()&&F.request.trim()!==C.request)),ek=C?ej:!!(F.label.trim()||F.request.trim()),ev=(0,f.useRef)(ek);ev.current=ek;let ew=(0,$.useSettingsStore)(e=>e.holdUnsaved);(0,f.useEffect)(()=>(ew(()=>ev.current),()=>ew(null)),[ew]);let eN=async()=>{(!ev.current||await k.notify.discard())&&a()},eM=async()=>{!C||await k.notify.confirm({title:`Delete "${C.label}"?`,description:"It starts no more. The jobs it already opened stay.",okText:"Delete",destructive:!0})&&(await Y(C.id).catch(()=>{}),a())},eS=n.find(e=>e.name===F.bot),eD=C?.runs[0]?.status==="running"||C?.runs[0]?.status==="waiting";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:S,hidden:!0}),(0,t.jsx)(b.Dialog,{open:!!(e&&u),onOpenChange:e=>!e&&void eN(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(b.DialogPortal,{container:u,children:(0,t.jsx)(b.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[eS?(0,t.jsx)(D.BotMark,{size:28,seed:eS.name,...(0,D.markOf)(eS.name,n),notify:!1,className:"shrink-0"}):(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,t.jsx)(Q.RoutineMark,{className:"size-3.5"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(b.DialogTitle,{className:"sr-only",children:C?C.label:"New routine"}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:C?C.label:"New routine"}),C&&(0,t.jsxs)("p",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(Q.RoutineMark,{className:"size-3 shrink-0"}),(0,t.jsxs)("span",{className:"truncate",children:[C.bot," · ",X(C.schedule),C.enabled&&` \xb7 next ${(0,R.whenOf)(C.nextRunAt)}`]})]})]}),C&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.Switch,{checked:C.enabled,onCheckedChange:e=>void J(C.id,{enabled:e}),"aria-label":`${C.label} on or off`,className:"mr-1 shrink-0"}),(0,t.jsxs)(y.DropdownMenu,{children:[(0,t.jsx)(y.DropdownMenuTrigger,{render:(0,t.jsx)(g.Button,{size:"icon-sm",variant:"ghost","aria-label":"More",className:"text-muted-foreground"}),children:(0,t.jsx)(c.MoreHorizontal,{})}),(0,t.jsx)(y.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(y.DropdownMenuItem,{variant:"destructive",onClick:eM,children:[(0,t.jsx)(h.Trash2,{}),"Delete"]})})]})]}),(0,t.jsx)(b.DialogClose,{render:(0,t.jsx)(g.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the routine"}),children:(0,t.jsx)(x.X,{})})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto px-5 pt-3 pb-5",children:[(0,t.jsxs)(ep,{label:"Name",htmlFor:"routine-name",children:[(0,t.jsx)(j.Input,{id:"routine-name",value:F.label,onChange:e=>K({label:e.target.value}),placeholder:"e.g. Morning mail",maxLength:80,autoFocus:!C}),(0,t.jsx)(ed,{children:"What it is called in this list, and what she calls it on a call."})]}),(0,t.jsxs)(ep,{label:"Bot",children:[(0,t.jsxs)(y.DropdownMenu,{children:[(0,t.jsxs)(y.DropdownMenuTrigger,{render:(0,t.jsx)(g.Button,{variant:"outline",className:"justify-start gap-2 pl-1.5 font-normal"}),children:[eS?(0,t.jsx)(D.BotMark,{size:20,seed:eS.name,...(0,D.markOf)(eS.name,n),notify:!1,className:"shrink-0"}):null,(0,t.jsx)("span",{className:(0,z.cn)(!eS&&"pl-1.5 text-muted-foreground"),children:eS?.name??(F.bot||"Pick a bot")}),(0,t.jsx)(o.ChevronDown,{className:"ml-1 size-3.5 text-muted-foreground"})]}),(0,t.jsx)(y.DropdownMenuContent,{align:"start",children:(0,t.jsx)(y.DropdownMenuGroup,{children:n.filter(e=>!e.disabled).map(e=>(0,t.jsxs)(y.DropdownMenuItem,{onClick:()=>{K({bot:e.name}),e.name!==C?.bot&&eb({bot:e.name})},children:[(0,t.jsx)(D.BotMark,{size:16,seed:e.name,...(0,D.markOf)(e.name,n),notify:!1,className:"shrink-0"}),e.name]},e.name))})})]}),(0,t.jsx)(ed,{children:"Who does the job each time it starts."})]}),(0,t.jsx)(ep,{label:"When",children:(0,t.jsxs)("div",{className:"space-y-3.5",children:[(0,t.jsx)(v.Segmented,{"aria-label":"How it starts",value:F.kind,onChange:e=>ey({kind:e}),options:[{value:"once",label:"Once"},{value:"daily",label:"On set days"},{value:"every",label:"Every few hours"}]}),(0,t.jsx)("div",{className:"space-y-2.5",children:"once"===F.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ec,{word:"On",children:(0,t.jsx)(eh,{value:F.date,onPick:e=>ey({date:e})})}),(0,t.jsxs)(ec,{word:"At",children:[(0,t.jsx)(ex,{value:F.time,onChange:e=>K({time:e}),onDone:()=>ey({})}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"or"}),(0,t.jsx)(eu,{picked:!1,onClick:()=>{let e;return ey(((e=new Date(Date.now()+36e5)).setMinutes(5*Math.ceil(e.getMinutes()/5),0,0),{date:et(0,e),time:`${ee(e.getHours())}:${ee(e.getMinutes())}`}))},children:"In an hour"})]})]}):"daily"===F.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ec,{word:"On",children:H.map(e=>{let n=F.days.includes(e);return(0,t.jsx)(eu,{picked:n,several:!0,"aria-label":er[e-1],onClick:()=>ey({days:n?F.days.filter(t=>t!==e):[...F.days,e].sort((e,t)=>e-t)}),children:_[e-1]},e)})}),(0,t.jsx)(ec,{children:es.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>ey({days:[...e.days]}),className:"h-6.5 rounded-full bg-muted px-2.5 text-xs text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:e.label},e.label))}),(0,t.jsx)(ec,{word:"At",children:(0,t.jsx)(ex,{value:F.time,onChange:e=>K({time:e}),onDone:()=>ey({})})})]}):(0,t.jsxs)(ec,{word:"Every",children:[(el.includes(F.hours)?el:[...el,F.hours].sort((e,t)=>e-t)).map(e=>(0,t.jsx)(eu,{picked:e===F.hours,onClick:()=>ey({hours:e}),className:"min-w-10 px-3",children:e},e)),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"hours"})]})}),(0,t.jsx)(ef,{schedule:em,kind:F.kind})]})}),(0,t.jsxs)(ep,{label:"Job",htmlFor:"routine-request",children:[(0,t.jsx)(M.Textarea,{id:"routine-request",value:F.request,onChange:e=>K({request:e.target.value}),placeholder:"e.g. Go through the mail that came since the last run and draft replies to what needs one. Send nothing.",className:"min-h-28"}),(0,t.jsx)(ed,{children:"Handed to the bot as a new thread each time, with a line on how the last run ended. Nobody is there to ask, so say everything it needs."})]}),C&&(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsx)("div",{className:"flex h-6 items-center",children:(0,t.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Runs"})}),0===C.runs.length?(0,t.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Not run yet."}):C.runs.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.id,void($.useSettingsStore.getState().hide(),T.roomOpens.open(t))},className:"flex h-9 w-full items-center gap-3 border-t border-border/60 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"w-28 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,R.whenOf)(e.updatedAt)}),(0,t.jsx)("span",{className:(0,z.cn)("min-w-0 flex-1 truncate","waiting"===e.status?z.WAITING_INK:"text-muted-foreground"),children:"running"===e.status?"Running now":e.outcome?(0,z.plainText)(e.outcome):"cancelled"===e.status?"Stopped":"No words"}),(0,t.jsx)(d.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground"})]},e.id))]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-5 py-3",children:[(0,t.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-4 text-muted-foreground",children:C||eg?"Starts while Thursday is running on this computer, whether or not a tab is open. A time that passed meanwhile starts once, not once for each.":`Still needs ${s=F,r=em,(l=[s.label.trim()?null:"a name",s.bot?null:"a bot",!r?"a time":ei(r)?"a time still ahead":null,s.request.trim()?null:"a job"].filter(e=>null!==e)).length>1?`${l.slice(0,-1).join(", ")} and ${l.at(-1)}`:l[0]??"nothing"}.`}),ej&&(0,t.jsx)(g.Button,{size:"sm",onClick:()=>{if(!C)return;let e={};F.label.trim()&&F.label.trim()!==C.label&&(e.label=F.label.trim()),F.request.trim()&&F.request.trim()!==C.request&&(e.request=F.request.trim()),Object.keys(e).length&&eb(e)},children:"Save"}),C?(0,t.jsxs)(g.Button,{variant:"outline",size:"sm",loading:Z,disabled:eD,title:eD?"Its last run is still open":void 0,onClick:()=>void V(C.id),children:[(0,t.jsx)(m.Play,{}),"Run now"]}):(0,t.jsx)(g.Button,{size:"sm",loading:G,disabled:!eg,onClick:()=>eg&&void L(eg),children:"Create"})]})]})})})})]})}let ed=({children:e})=>(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e});function eu({picked:e,several:n=!1,className:a,children:i,...s}){return(0,t.jsxs)("button",{type:"button","aria-pressed":e,className:(0,z.cn)("inline-flex h-8 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] whitespace-nowrap outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",!e&&"text-foreground ring-1 ring-border ring-inset hover:bg-muted",e&&(n?"bg-brand/10 pl-2.5 font-medium text-brand ring-1 ring-brand/30 ring-inset":"bg-brand font-medium text-brand-foreground"),a),...s,children:[e&&n&&(0,t.jsx)(l.Check,{className:"size-3.5"}),i]})}function ec({word:e,children:n}){return(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)("span",{className:"flex h-8 w-9 shrink-0 items-center text-[13px] text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:n})]})}function em(e){let t=K(`${e} 00:00`),a=(t.getTime()-K(`${et(0)} 00:00`).getTime())/864e5;return(0,n.format)(t,a<7?"EEE d":"EEE, MMM d")}function eh({value:e,onPick:n}){let a=(0,f.useRef)(null),i=[0,1,2,3].map(e=>et(e)),s=()=>a.current?.showPicker();return(0,t.jsxs)(t.Fragment,{children:[i.map((a,i)=>(0,t.jsx)(eu,{picked:a===e,onClick:()=>n(a),children:0===i?"Today":1===i?"Tomorrow":em(a)},a)),!i.includes(e)&&(0,t.jsx)(eu,{picked:!0,onClick:s,children:em(e)}),(0,t.jsxs)("span",{className:"relative",children:[(0,t.jsx)(eu,{picked:!1,"aria-label":"Another day",onClick:s,className:"w-8 px-0",children:(0,t.jsx)(r,{className:"size-3.5"})}),(0,t.jsx)("input",{ref:a,type:"date",tabIndex:-1,"aria-hidden":!0,min:i[0],value:e,onChange:e=>e.target.value&&n(e.target.value),className:"pointer-events-none absolute inset-0 opacity-0"})]})]})}function ex({value:e,onChange:n,onDone:a}){return(0,t.jsx)(j.Input,{type:"time","aria-label":"Time of day",value:e,onChange:e=>n(e.target.value),onBlur:a,onClick:e=>e.currentTarget.showPicker?.(),className:"h-8.5 w-28 px-3 text-[15px] tabular-nums md:text-[15px] [&::-webkit-calendar-picker-indicator]:hidden"})}function ef({schedule:e,kind:n}){if(!e||ei(e))return(0,t.jsx)("p",{className:"text-xs text-destructive",children:e?"That time has passed. Pick a later one.":"daily"===n?"Pick a time and at least one day.":"Pick a time."});let i=function(e,t){if("once"===e.kind)return K(e.at);if("every"===e.kind)return new Date(t.getTime()+36e5*e.hours);let[n,a]=e.time.split(":").map(Number);for(let i=0;i<=7;i++){let s=new Date(t);s.setDate(s.getDate()+i),s.setHours(n,a,0,0);let r=0===s.getDay()?7:s.getDay();if(s>t&&e.days.includes(r))return s}return new Date(t.getTime()+864e5)}(e,new Date);return(0,t.jsxs)("p",{className:"flex items-start gap-2 text-[13px] leading-5",children:[(0,t.jsx)(Q.RoutineMark,{className:"mt-0.75 size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"min-w-0",children:[X(e),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" · ","once"===e.kind?`${(0,a.formatDistanceToNowStrict)(i,{addSuffix:!0})}, then it switches itself off`:`first start ${(0,R.whenOf)(i)}`]})]})]})}function ep({label:e,htmlFor:n,children:a}){return(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("label",{htmlFor:n,className:"w-14 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:a})]})}e.s(["RoutineSetting",0,function(){let[e,n]=(0,f.useState)(null),{data:a,isLoading:i,error:s}=(0,A.useServerRoute)(p.queryKey.routines),{data:r}=(0,A.useServerRoute)(p.queryKey.bot),[l]=(0,O.useServerAction)(B,{onOk:()=>(0,A.revalidate)(p.queryKey.routines)});if(i)return(0,t.jsx)(C.SettingSkeleton,{rows:3});if(s)return(0,t.jsx)(C.SettingError,{message:s.message});let o=a??[],d=o.filter(e=>e.enabled).length,u=o.find(t=>t.id===e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.SettingScreen,{footer:(0,t.jsxs)(C.SettingRailNote,{children:[o.length," set up · ",d," on",o.length>=S.ROUTINE.max&&` \xb7 ${S.ROUTINE.max} is the most`]}),children:(0,t.jsx)(C.SettingItems,{addRow:o.length<S.ROUTINE.max?{label:"New routine",onClick:()=>n("new")}:void 0,children:0===o.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:'Nothing starts by itself yet. Tell Thursday what should — "every weekday at nine, go through my mail" — or make one here.'}):o.map(a=>(0,t.jsx)(Z,{routine:a,bots:r,open:a.id===e,onOpen:()=>n(a.id),onSwitch:e=>l(a.id,{enabled:e})},a.id))})}),(0,t.jsx)(eo,{routine:"new"===e?"new":u??null,bots:r??[],onClose:()=>n(null),onMade:e=>n(e)})]})}],480869)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},21357,e=>{"use strict";var t=e.i(456420);let n={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};n.node;let a=(0,t.default)(n);e.s(["Play",0,a],21357)},759659,e=>{"use strict";var t=e.i(456420);let n={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"]};n.node;let a=(0,t.default)(n);e.s(["Trash2",0,a],759659)}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,532965,e=>{"use strict";var t=e.i(843476),n=e.i(271645),a=e.i(456420);let r={name:"maximize",size:24,node:[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]};r.node;let s=(0,a.default)(r);var o=e.i(935829),i=e.i(77071),l=e.i(798120),d=e.i(683408),c=e.i(660302),u=e.i(635963),f=e.i(454263),p=e.i(213377),h=e.i(616172),x=e.i(245629),m=e.i(553429),y=e.i(978411);let g=e=>e.waitsFor.length>0&&"cancelled"!==e.state,b=e=>"waiting"===e.state&&e.waitsFor.length>0;function k(e,t,n){let a=null===e,r=new Map(e?.read);for(let e of t.events)r.has(e.id)||r.set(e.id,a?e.at:Math.max(e.at,n));let s=new Map(e?.seats);for(let[e,r]of t.seats){let t=`${r.key}:${r.waits.join(",")}`;s.get(e)?.state!==t&&s.set(e,{state:t,since:a?r.since:n})}let o=new Map(e?.owed);for(let[e,n]of t.owed)o.set(e,{waits:n,out:null});for(let[e,a]of o)null!==a.out||t.owed.has(e)||("cancelled"===t.states.get(e)?o.delete(e):o.set(e,{...a,out:n}));let i=new Map(e?.asked);for(let e of t.asking)i.has(e)||i.set(e,null);for(let[e,a]of i)null!==a||t.asking.has(e)||i.set(e,n);let l=new Map(e?.reports);for(let e of t.events)"report"===e.kind&&l.set(e.id,{event:e,gone:null});for(let[e,a]of l)null!==a.gone||t.events.some(t=>t.id===e)||l.set(e,{...a,gone:n});return{read:r,seats:s,owed:o,asked:i,reports:l,ended:"done"===t.status||"cancelled"===t.status?e?.ended??(a?t.span:n):null,opened:e?.opened??n,fresh:e?.fresh??("done"===t.status&&!t.seen)}}let v=e=>"you"===e?"you":e,w=e=>e.length>2?`${e.length} bots`:e.map(v).join(" and "),j={key:"none",waits:[],since:null};function M(e,t){let{key:n,waits:a,since:r}=e.seats.get(t)??j,s=t===e.office.coord;return{key:n,label:({run:"Working",asking:"Waiting on you",paused:"Paused",held:`Held \xb7 after ${w(a)}`,ended:a.length?`Waiting on ${w(a)}`:"Waiting",done:s?"Reported":"Answered",stopped:"Stopped",none:"Not called yet"})[n],since:r,waits:a}}let $=(e,t)=>e.events.find(e=>"report"===e.kind&&e.at<=t&&(null===e.closed||e.closed>t))??null;function N(e){let{bots:t,status:n}=e.office;if("done"===n)return"done";if("cancelled"===n)return"stopped";let a=t.map(t=>M(e,t).key);return a.includes("asking")?"you":a.includes("paused")?"paused":"work"}let z=[26,55,84],S={yaw:45,pitch:30},A=.894/Math.SQRT1_2,O=e=>Math.round(10*e)/10,C=e=>Math.round(100*e)/100,P=(e,t,n)=>Math.min(n,Math.max(t,e)),D=e=>e<=0?0:e>=1?1:1-(1-e)**3,F="color-mix(in oklab, var(--ink) 72%, transparent)",L="color-mix(in oklab, var(--ink) 30%, transparent)";function q(e,t,n,a=4.5,r="color-mix(in oklab, var(--ink) 56%, transparent)",s=0,o=1){let[i,l]=e.at(t[0],t[1],t[2]),[d,c]=e.at(n[0],n[1],n[2]),u=Math.hypot(d-i,c-l)||1,f=(d-i)/u*a,p=(c-l)/u*a;return{id:"",x1:O(i-f),y1:O(l-p),x2:O(d+f),y2:O(c+p),length:O(u+2*a),color:r,width:o,delay:s}}let R=["var(--gray-0)","var(--gray-75)","var(--gray-100)"];function T(e,[t,n,a,r,s,o],i={}){let l=i.fills??R,d=i.over,c=i.color;return{faces:[{points:e.points([[t,r,s],[a,r,s],[a,r,o],[t,r,o]]),fill:l[1],hatch:!1},{points:e.points([[a,n,s],[a,r,s],[a,r,o],[a,n,o]]),fill:l[2],hatch:!1!==i.hatch},{points:e.points([[t,n,o],[a,n,o],[a,r,o],[t,r,o]]),fill:l[0],hatch:!1}],edges:[q(e,[t,n,o],[a,n,o],d,c),q(e,[t,n,o],[t,r,o],d,c),q(e,[t,r,o],[a,r,o],d,c),q(e,[a,n,o],[a,r,o],d,c),q(e,[t,r,s],[t,r,o],d,c),q(e,[a,r,s],[a,r,o],d,c),q(e,[a,n,s],[a,n,o],d,c),q(e,[t,r,s],[a,r,s],d,c),q(e,[a,n,s],[a,r,s],d,c)]}}let I=(...e)=>({faces:e.flatMap(e=>e.faces),edges:e.flatMap(e=>e.edges)}),_=e=>{let t=0;for(let n=1;n<e.length;n++)t+=Math.hypot(e[n][0]-e[n-1][0],e[n][1]-e[n-1][1]);return t};function W(e,t){let n=_(e),a=P(t,0,1)*n;for(let t=1;t<e.length;t++){let[r,s]=e[t-1],[o,i]=e[t],l=Math.hypot(o-r,i-s);if(a<=l||t===e.length-1){let e=l?Math.min(1,a/l):0;return{x:r+(o-r)*e,y:s+(i-s)*e,total:n}}a-=l}return{x:e[0][0],y:e[0][1],total:n}}function E(e){if(e.length<3)return e;let t=[e[0]];for(let n=1;n<e.length-1;n++){let[a,r]=e[n-1],[s,o]=e[n],[i,l]=e[n+1],d=Math.hypot(s-a,o-r),c=Math.hypot(i-s,l-o),u=Math.min(3.5,d/2,c/2);if(u<.3){t.push(e[n]);continue}let f=[s-(s-a)/d*u,o-(o-r)/d*u],p=[s+(i-s)/c*u,o+(l-o)/c*u];for(let e=0;e<=6;e++){let n=e/6;t.push([(1-n)**2*f[0]+2*(1-n)*n*s+n*n*p[0],(1-n)**2*f[1]+2*(1-n)*n*o+n*n*p[1]])}}return t.push(e[e.length-1]),t}function B(e,t){let n=P(e,0,1)*t,a=1/(t-.175);return n<.15?a*n*n/.3:n>t-.2?1-a*(t-n)**2/.4:.15*a/2+a*(n-.15)}function U(e,t,n){for(let a of e){if(a.who!==t||n<a.leave||n>=a.back)continue;if(n<a.arrive){let e=(n-a.leave)/(a.arrive-a.leave);return{trip:a,phase:"out",u:B(e,a.arrive-a.leave),p:e,carry:a.out}}if(n<a.stay)return{trip:a,phase:"at",u:1,p:0,carry:null};let e=(n-a.stay)/(a.back-a.stay);return{trip:a,phase:"back",u:Number.isFinite(a.back)?1-B(e,a.back-a.stay):1,p:e,carry:a.home}}return null}let Y={hop:.58,flip:.92,cheer:.76},H={hop:.3,flip:.8,cheer:.58},G=[0,1,2,3],K=(e,t)=>{let n=Math.imul(0x811c9dc5^t,0x1000193);for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),0x1000193);return(((n=Math.imul((n=Math.imul(n^n>>>15,0x85ebca6b))^n>>>13,0xc2b2ae35))^n>>>16)>>>0)/0x100000000};function X(e,t){let n=n=>K(e,7919*(t+1)+n),a=2.45+.7*n(3),r=1.15*(.85+.3*n(4));return{rise:.4+.1*n(6),fall:a/r+.15,top:a,sink:r}}var Q=e.i(83928),V=e.i(621285),Z=e.i(283653),J=e.i(647163);let ee=[.3,.4,.5,.7,.75,.8,.9,1,1.1,1.25,1.5,1.75,2,2.5,3,4],et=(e,t,n,a)=>{let r=Math.min(ee[ee.length-1],Math.max(ee[0],a));return{z:r,x:t-r/e.z*(t-e.x),y:n-r/e.z*(n-e.y)}},en=(e,t)=>t?ee.find(t=>t>e+.001)??e:ee.findLast(t=>t<e-.001)??e,ea=e=>`color-mix(in oklab, var(--ink) ${e}%, transparent)`;function er({scene:e,start:a,label:r,faces:d,from:c,onBot:u,onAnswer:f,camera:p=S,className:x}){let m=(0,n.useRef)(null),g=function(e){let[t,a]=(0,n.useState)(null);return(0,n.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let n=()=>{let e=Math.round(t.clientWidth),n=Math.round(t.clientHeight);a(t=>t&&t.w===e&&t.h===n?t:{w:e,h:n})};n();let r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()},[e]),t}(m),[b]=(0,n.useState)(()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches),k=(0,n.useMemo)(()=>g&&g.w>0&&g.h>0?function(e,t,n=S){let{helpers:a,at:r}=function(e){let t=new Map;for(let n of e.events)"give"!==n.kind&&"release"!==n.kind||t.has(n.to)||t.set(n.to,n.at);let n=e.office.bots.filter(t=>t!==e.office.coord);return n.sort((e,n)=>(t.get(e)??1/0)-(t.get(n)??1/0)),{helpers:n,at:t}}(e),s=function(e,t){let n=Math.ceil(t.length/3),a=t.length?58+30*n:48,r=t.map((e,t)=>{let n=Math.floor(t/3),a=t%3,r=58+30*n,s=10+29*a;return{bot:e,x0:r,y0:s,x1:r+20,y1:s+8,seat:[r+6.5,s-1.6],lane:z[a],spot:[r+7,z[a]],tray:[r+1.2,s+1.4,r+6.8,s+6.6],laptop:[r+16.8,s+1.2]}}),s={bot:e,x0:16,y0:15,x1:40,y1:23,seat:[23.5,13.4],spot:[27,30],lane:30,tray:[0,0,0,0],laptop:[36.6,16.2]},o=[42,78],i=[24,45],l=[s.seat,[44,13.4]],d={lobby:[...l,[44,34],[24,40],[24,54],[42,62],o],door:[...l,[44,34],[24,40],i]};for(let e of r)d[`to:${e.bot}`]=[...l,[44,26],[53,26],[53,e.lane],e.spot],d[`from:${e.bot}`]=[e.seat,[e.x0-2.5,e.seat[1]],[e.x0-2.5,e.lane],[53,e.lane],[53,26],[44,26],[44,30],s.spot];return{width:a,desks:r,byBot:new Map(r.map(e=>[e.bot,e])),own:s,lobby:o,door:i,routes:d}}(e.office.coord,a),o=s.width,i=70,l=80,d=function(e,t,n,a){let r=function({yaw:e,pitch:t}){let n=e*Math.PI/180,a=t*Math.PI/180;return{x:[A*Math.cos(n),A*Math.sin(n)*Math.sin(a)],y:[-A*Math.sin(n),A*Math.cos(n)*Math.sin(a)],z:[0,-.94*Math.cos(a)/Math.cos(Math.PI/6)]}}(a),s=1/0,o=-1/0,i=1/0,l=-1/0,d=(e,t,n)=>{let a=e*r.x[0]+t*r.y[0]+n*r.z[0],d=e*r.x[1]+t*r.y[1]+n*r.z[1];s=Math.min(s,a),o=Math.max(o,a),i=Math.min(i,d),l=Math.max(l,d)};for(let t of[-4,e+3])for(let e of[-4,103])for(let n of[-6,18])d(t,e,n);for(let e of[n.x0,n.x1])for(let t of[n.y0,n.y1])d(e,t,-5);let c=Math.max(1,t.w-40),u=Math.max(1,t.h-96-16),f=Math.min(c/(o-s),u/(l-i),7.4),p=20+(c-(o-s)*f)/2-s*f,h=96+(u-(l-i)*f)/2-i*f,x=(e,t,n=0)=>[O(p+(e*r.x[0]+t*r.y[0]+n*r.z[0])*f),O(h+(e*r.x[1]+t*r.y[1]+n*r.z[1])*f)];return{s:f,axes:r,at:x,points:e=>e.map(([e,t,n])=>x(e,t,n).join(",")).join(" ")}}(s.width,t,{x0:o+9,x1:o+9+28,y0:l,y1:l-i},n),c=[],u=[],f=[],p=[],h=0,x=(e,t,n=!1)=>c.push({id:`f${c.length}`,points:d.points(e),fill:t,hatch:n,delay:h}),m=(e,t,n,a=F)=>u.push({...q(d,e,t,n,a,0,a===L?.75:1.3),id:`l${u.length}`,delay:h}),y=[...[0,o].map(e=>({...q(d,[e,-2,-5],[e,102,-5],340,"url(#office-fade-y)",0,.75),id:`gx${e}`})),...[0,100].map(e=>({...q(d,[-2,e,-5],[o+2,e,-5],340,"url(#office-fade-x)",0,.75),id:`gy${e}`}))];for(let[e,t,n]of(x([[0,100,0],[o,100,0],[o,100,-5],[0,100,-5]],"var(--gray-100)"),x([[o,0,0],[o,100,0],[o,100,-5],[o,0,-5]],"var(--gray-150)",!0),m([0,100,-5],[o,100,-5],64),m([o,0,-5],[o,100,-5],64),m([0,100,0],[0,100,-5],8),m([o,100,0],[o,100,-5],8),m([o,0,0],[o,0,-5],8),h=70,x([[0,48,0],[48,48,0],[48,100,0],[0,100,0]],"url(#office-floor-lobby)"),h=110,x([[0,0,0],[48,0,0],[48,48,0],[0,48,0]],"url(#office-floor-own)"),h=150,a.length&&x([[48,0,0],[o,0,0],[o,100,0],[48,100,0]],"url(#office-floor-work)"),x([[0,0,0],[o,0,0],[o,2.6,0],[2.6,2.6,0],[2.6,100,0],[0,100,0]],"url(#office-hatch-soft)"),m([0,100,0],[o,100,0],22),m([o,0,0],[o,100,0],22),h=210,x([[0,0,0],[o,0,0],[o,0,16],[0,0,16]],"var(--gray-25)"),x([[0,0,0],[0,100,0],[0,100,16],[0,0,16]],"var(--gray-75)",!0),x([[-2,-2,16],[o,-2,16],[o,0,16],[0,0,16],[0,100,16],[-2,100,16]],"var(--gray-100)"),x([[o,-2,0],[o,0,0],[o,0,16],[o,-2,16]],"var(--gray-150)",!0),x([[-2,100,0],[0,100,0],[0,100,16],[-2,100,16]],"var(--gray-100)"),[[[-2,-2,16],[o,-2,16],10],[[0,0,16],[o,0,16],10],[[-2,-2,16],[-2,100,16],10],[[0,0,16],[0,100,16],10],[[o,-2,0],[o,-2,16],10],[[o,0,0],[o,0,16],10],[[o,-2,16],[o,0,16],5],[[-2,100,0],[-2,100,16],10],[[0,100,0],[0,100,16],10],[[-2,100,16],[0,100,16],5],[[0,0,0],[o,0,0],0],[[0,0,0],[0,100,0],0],[[0,0,0],[0,0,16],10]]))m(e,t,n);m([0,.05,1.1],[o,.05,1.1],0,L),m([.05,0,1.1],[.05,100,1.1],0,L),h=260,x([[2.5,.12,4],[21.5,.12,4],[21.5,.12,13],[2.5,.12,13]],"var(--gray-0)"),m([2.5,.12,4],[21.5,.12,4],3),m([2.5,.12,13],[21.5,.12,13],3),m([2.5,.12,4],[2.5,.12,13],3),m([21.5,.12,4],[21.5,.12,13],3);let g=0,b=(e,t,n={})=>{let a=`p${g++}`;p.push({id:a,depth:e,faces:t.faces.map((e,t)=>({...e,id:`${a}f${t}`})),edges:t.edges.map((e,t)=>({...e,id:`${a}e${t}`})),mugs:[],delay:h,appear:null,...n})},k=(e,t,n,a,r,s)=>f.push({points:d.points([[e+.3,t+.5,0],[n+r,t+.5,0],[n+r,a+.7*r,0],[e+.3,a+.7*r,0]]),delay:h,of:s,depth:(e+n)/2+(t+a)/2}),v=["var(--gray-75)","var(--gray-50)","var(--gray-150)"],w=(e,t,n)=>{for(let a=t;a<n;a+=4){let r=Math.min(n,a+4),s=T(d,[e-.9,a,e+.9,r,0,7],{fills:v}),o=s.edges,i=[o[1],o[3],o[8]].concat(a===t?[o[0],o[6]]:[]).concat(r===n?[o[2],o[4],o[5],o[7]]:[]);h+=16,b(e+(a+r)/2+.9,{faces:s.faces,edges:i})}},j=(e,t,n)=>{for(let a=t;a<n;a+=4){let r=Math.min(n,a+4),s=T(d,[a,e-.9,r,e+.9,0,7],{fills:v,hatch:!1}),o=s.edges,i=[o[0],o[2],o[7]].concat(a===t?[o[1],o[4]]:[]).concat(r===n?[o[3],o[5],o[6],o[8]]:[]);h+=16,b((a+r)/2+e+.9,{faces:s.faces,edges:i})}};a.length&&(w(48,0,18),w(48,30,100)),j(48,0,18),j(48,30,48);let $=["var(--office-lid-top)","var(--office-lid)","var(--office-lid-side)"],N="color-mix(in oklab, var(--ink) 80%, transparent)",D=([e,t])=>T(d,[e-3.4,t+.4,e+3.4,t+4.4,6.1,6.45],{fills:["var(--gray-100)","var(--gray-150)","var(--gray-200)"],over:2}),R=[],_=(t,n,a)=>{let r,s;h+=60;let o=(t.x0+t.x1)/2+(t.y0+t.y1)/2,i=`p${g}`;k(t.x0,t.y0,t.x1,t.y1,2.6,null===n?null:i),b(o,(r=T(d,[t.x0-.4,t.y0-.4,t.x1+.4,t.y1+.4,5.2,5.2+.9]),s=[[t.x0,t.y1-.9],[t.x1-.9,t.y1-.9],[t.x1-.9,t.y0]].map(([e,t])=>T(d,[e,t,e+.9,t+.9,0,5.2],{fills:["var(--gray-50)","var(--gray-100)","var(--gray-150)"],over:2.5})),I({faces:[],edges:[q(d,[t.x0+.45,t.y0+.45,0],[t.x0+.45,t.y0+.45,5.2],2.5)]},...s,r)),{appear:n}),h+=40;let l=((t,n)=>{let a=M(e,n).key,[r,s]=t;if("done"===a||"none"===a)return{part:I(D(t),T(d,[r-3.4,s+.4,r+3.4,s+4.4,6.45,6.85],{fills:["var(--gray-200)","var(--gray-300)","var(--gray-250)"],hatch:!1,over:2,color:N}))};let[o,i]=d.at(r-3.4+.45,s+.46,10.2-.4),{axes:l,s:c}=d;return{part:I(D(t),T(d,[r-3.4,s,r+3.4,s+.45,6.1,10.2],{fills:$,hatch:!1,over:2,color:N})),screen:{id:`screen-${n}`,bot:n,matrix:`matrix(${[l.x[0]*c,l.x[1]*c,-l.z[0]*c,-l.z[1]*c,o,i].map(C).join(",")})`,w:6.8-.9,h:4.1-.75,mode:"run"===a?"lit":"paused"===a?"paused":"asking"===a?"asking":"stopped"===a?"dark":"dim"}}})(t.laptop,t.bot);if(b(t.laptop[0]+t.laptop[1]+3.3,l.part,{appear:n,screen:l.screen}),"run"===M(e,t.bot).key&&R.push({id:`pool-${t.bot}`,bot:t.bot,cx:(t.x0+t.x1)/2+1,cy:(t.y0+t.y1)/2-1,r:15}),h+=40,b(o+5.2,{faces:[],edges:[]},{mugs:[((e,t)=>{let n=1.05*d.s,[a,r]=d.at(e,t,8.2),[s,o]=d.at(e,t,6.1);return{cx:a,cy:r,bx:s,by:o,rx:O(n),ry:O(.5*n)}})(a?31:t.x0+11,a?20.5:t.y1-1.5)],appear:n}),h+=40,a)b(o+.6,I(...[0,1,2].map(e=>T(d,[17.2+.3*e,16.2-.2*e,22.2+.3*e,19.6-.2*e,6.1+.7*e,6.1+(e+1)*.7],{over:1.5}))));else{let[a,r,s,o]=t.tray;b((a+s)/2+(r+o)/2+.3,I(T(d,[a,r,s,o,6.1,7.4],{fills:["var(--gray-50)","var(--gray-150)","var(--gray-200)"],over:2}),{faces:[{points:d.points([[a+.5,r+.5,7.4],[s-.5,r+.5,7.4],[s-.5,o-.5,7.4],[a+.5,o-.5,7.4]]),fill:"var(--gray-100)",hatch:!1}],edges:[]}),{appear:n,check:"done"===M(e,t.bot).key?d.points([[(a+s)/2-1.6,(r+o)/2-.2,7.45],[(a+s)/2-.4,(r+o)/2+1.1,7.45],[(a+s)/2+1.9,(r+o)/2-1.6,7.45]]):void 0})}};for(let e of(h+=60,k(12,74,36,80,3,null),b(101,I(T(d,[12,74,36,80,0,7.2]),T(d,[11.4,73.4,36.6,80.6,7.2,8.1]))),_(s.own,null,!0),s.desks))_(e,r.get(e.bot)??0,!1);let{axes:W}=d,E=([e,t,n],a,r,s)=>{let[o,i]=d.at(e,t,n),l=d.s/a;return`matrix(${[r[0]*l,r[1]*l,s[0]*l,s[1]*l,o,i].map(C).join(",")})`},B=[-W.y[0],-W.y[1]],U=[-W.z[0],-W.z[1]],Y=([e,t,n])=>{let[a,r]=d.at(e,t,n);return`matrix(${[W.x[0]*d.s,W.x[1]*d.s,W.y[0]*d.s,W.y[1]*d.s,a,r].map(C).join(",")})`},H=e=>e<=150?Math.round(1.2*e):e<=210?170:250;for(let e of c)e.delay=H(e.delay);for(let e of u)e.delay=H(e.delay);let G=p.filter(e=>null===e.appear).map(e=>e.depth),K=Math.min(...G),X=Math.max(...G),Q=e=>Math.round(300+300*P((e-K)/Math.max(1,X-K),0,1));for(let e of p)e.delay=Q(e.depth);for(let e of f)e.delay=Q(e.depth);return{plan:s,fit:d,guides:y,faces:c,lines:u,shades:f,pieces:p,sign:{matrix:E([o+9,l,-5],10,B,W.x)},board:{matrix:E([-18,99,50],10,B,U),w:1e3,h:500},floor:Y([0,0,0]),pools:R,ground:{matrix:Y([0,0,-5]),w:o,d:100},botSize:Math.round(P(13.5*d.s,28,96)),popAt:700,built:1e3}}(e,g,p):null,[e,g,p]),v=(0,n.useMemo)(()=>k?function(e,t){let n=[],a=new Map,r=e.office.coord,s=e=>_(e)/46+.175,o=(e,r,o,i,l,d={})=>{let c=t.routes[r];if(!c)return;let u=E(c),f=n.findLast(t=>t.who===e);f&&f.back===1/0&&(f.stay=Math.max(f.arrive+.35,o),f.back=f.stay+s(f.route),a.set(e,f.back));let p=Math.max(o,a.get(e)??-1/0),h=s(u),x=p+h,m=void 0!==d.until?Math.max(x+.35,d.until):x+(d.hold??.35),y=d.forever?1/0:m+h;n.push({who:e,route:u,leave:p,arrive:x,stay:m,back:y,out:l,home:d.home??null,event:i,answer:d.answer}),a.set(e,y)};for(let i of e.events)switch(i.kind){case"job":{let e=E(t.routes.lobby),o=s(e);n.push({who:r,route:e,leave:-2,arrive:-1,stay:.8,back:.8+o,out:null,home:"start",event:i}),a.set(r,.8+o);break}case"give":i.from===r&&o(r,`to:${i.to}`,i.at,i,i.extra?"extra":i.after.length?"held":"order");break;case"release":i.from===r&&o(r,`to:${i.to}`,i.at,i,"copy");break;case"refused":i.from===r&&"you"===i.to&&o(r,"door",i.at,i,"note",{home:"noted",hold:.65});break;case"question":{if(i.from!==r)break;let t=e.events.slice(e.events.indexOf(i)+1).find(e=>"answer"===e.kind&&e.to===i.from),n=Math.min(t?.at??1/0,i.closed??1/0);o(r,"lobby",i.at,i,"question",t?{home:"answer",until:n+.35,answer:t}:Number.isFinite(n)?{until:n}:{forever:!0});break}case"report":o(r,"lobby",i.at,i,"report",null===i.closed?{forever:!0}:{until:i.closed,home:"report"});break;case"return":i.to===r&&o(i.from,`from:${i.from}`,i.at,i,"result")}return n}(e,k.plan):[],[e,k]),[w,j]=(0,n.useState)(null),R=null!==w,B=k?.built??null;(0,n.useEffect)(()=>{if(null===B||R)return;let e=window.setTimeout(()=>j((Date.now()-a)/1e3),B);return()=>window.clearTimeout(e)},[null===B,R,a]);let Q=(0,n.useMemo)(()=>b?[]:function(e,t,n){let a=e.office.coord,r=e.opened,s=[],o=(e,t,n)=>{n>=r&&s.push({bot:e,kind:t,at:n})},i=new Map;for(let e of t){if(e.who!==a)continue;("start"===e.home||"answer"===e.home)&&o(a,"hop",e.back);let t=e.event.to;"you"!==t&&"job"!==e.event.kind&&(i.has(t)?("order"===e.out||"extra"===e.out||"copy"===e.out)&&o(t,"hop",e.arrive+.11):(i.set(t,e.arrive),o(t,"flip",e.arrive+.11)))}let l=t.findLast(e=>"report"===e.out),d=l&&"done"===e.office.status&&null===l.event.closed?l.arrive>=r?l.arrive:e.fresh&&null!==n?n:null:null;l&&null!==d&&e.office.bots.forEach((e,n)=>{if(e!==a&&(i.get(e)??1/0)>l.arrive)return;let r=d+.15+.07*n,s=U(t,e,r),c=Number.isFinite(s?.trip.back);s&&("out"===s.phase||"back"===s.phase&&c)&&(r=(c?s.trip.back:s.trip.arrive)+.1),o(e,"cheer",r),o(e,"hop",r+Y.cheer+.06)});let c=N(e);if("paused"===c||"stopped"===c)return s;let u=[...s],f=(e,n)=>{let a=U(t,e,n);return!a||"at"===a.phase||"back"===a.phase&&!Number.isFinite(a.trip.back)};for(let t of e.office.bots)if("none"!==M(e,t).key)for(let e=0;;e++){let n=r+4+150*(e+K(t,e));if(n>r+3600)break;if(.35>K(t,-1-e))continue;let o=.25>K(t,1e3+e)?"flip":"hop",l=n+Y[o];t!==a&&(i.get(t)??1/0)>n||!f(t,n)||!f(t,l)||u.some(e=>e.bot===t&&e.at<l+1.5&&n<e.at+2.5)||s.push({bot:t,kind:o,at:n})}return s}(e,v,w),[b,e,v,w]),V=(0,n.useMemo)(()=>k?function(e,t,n,a){let r=[];for(let e of a)if(r.push([e.at,e.at+Y[e.kind]]),"cheer"===e.kind)for(let t of G){let{rise:n,fall:a}=X(e.bot,t),s=e.at+.1;r.push([s,s+n+a]),r.push([s+n+a+5,s+n+a+5+.8])}for(let e of n)r.push([e.leave,e.arrive+.8]),Number.isFinite(e.back)&&r.push([e.stay,e.back+.8]);for(let e of t.pieces)null!==e.appear&&r.push([e.appear,e.appear+.8]);for(let t of e.events)"refused"===t.kind&&r.push([t.at,t.at+2.4+.1]);return r}(e,k,v,Q):null,[e,k,v,Q]),ee=function(e,t){let[a,r]=(0,n.useState)(()=>(Date.now()-e)/1e3);return(0,n.useEffect)(()=>{let n;if(!t)return;let a=0,s=()=>{let o=(Date.now()-e)/1e3;r(o);let i=function(e,t){let n=1/0;for(let[a,r]of e){if(t>=a&&t<r)return 0;a>t&&(n=Math.min(n,a-t))}return n}(t,o);0===i?a=requestAnimationFrame(s):Number.isFinite(i)&&(n=window.setTimeout(s,1e3*i))};return s(),()=>{cancelAnimationFrame(a),window.clearTimeout(n)}},[e,t]),a}(a,R?V:null),ea=k?function(e,t,n,a,r){let{plan:s,fit:o}=t,i=e.office.coord,l=(e,t=.35)=>C(D(P((r-e)/t,0,1))),d=t.botSize,c=new Map;for(let e of n)e.who!==i||"you"===e.event.to||c.has(e.event.to)||"job"===e.event.kind||c.set(e.event.to,e.arrive);let u=[],f=[],p=[],h=e=>e===i?s.own.seat:s.byBot.get(e)?.seat;for(let t of e.office.bots){let s=t===i,l=s?-1/0:c.get(t);if(!s&&(void 0===l||r<l))continue;let x=h(t);if(!x)continue;let m=U(n,t,r),y=M(e,t),g=x[0],b=x[1],k=0,v=0,w=0,j=[0,0],$=null,N=!!m&&"at"!==m.phase&&!("back"===m.phase&&!Number.isFinite(m.trip.back));if(m){let e=W(m.trip.route,m.u);if(g=e.x,b=e.y,N){let a=Math.abs(Math.sin(Math.PI*m.u*e.total/13.799999999999999));k=3.5*a,w=.03*(1-a)**4;let s=W(m.trip.route,Math.min(1,m.u+.02)),i=W(m.trip.route,Math.max(0,m.u-.02)),[l,d]=o.at(s.x,s.y,0),[c,u]=o.at(i.x,i.y,0),[p,h]=o.at(g,b,0),x=Math.atan2(d-h,l-p)-Math.atan2(h-u,p-c),y=Math.atan2(Math.sin(x),Math.cos(x)),M="back"===m.phase?-1:1;v=P(180*y/Math.PI,-5,5)*M;let N=(l-c)*M,z=(d-u)*M,S=18/(Math.hypot(N,z)||1);j=[Math.round(N*S),Math.round(z*S*.7)];let A=U(n,t,r-.06);if(A&&A.phase===m.phase){let e=W(m.trip.route,A.u),[t,n]=o.at(e.x,e.y,0);$=[O(t-p),O(n-h),O(P((p-t)*1.2,-12,12))]}for(let e=1;e<=6;e++){let n="back"===m.phase?m.u+.045*e:m.u-.045*e;if(n<0||n>1)continue;let a=W(m.trip.route,n),r=e%2?.7:-.7,[s,i]=o.at(a.x+r,a.y-r,0);f.push({id:`${t}${e}`,x:s,y:i,opacity:C(.22-.03*e)})}}}let z=a.find(e=>e.bot===t&&r>=e.at&&r<e.at+Y[e.kind]),S=z?function(e,t,n){let a=Y[e]-.1-.13;if(t<.1)return{lift:0,spin:0,squash:.16*Math.sin(t/.1*Math.PI)};if(t<.1+a){let r=(t-.1)/a;return{lift:H[e]*n*4*r*(1-r),spin:"flip"===e?360*(r<=0?0:r>=1?1:r<.5?4*r*r*r:1-(-2*r+2)**3/2):0,squash:-.1*Math.max(0,1-3*r)}}return{lift:0,spin:0,squash:.14*Math.sin(Math.min(1,(t-.1-a)/.13)*Math.PI)}}(z.kind,r-z.at,d):{lift:0,spin:0,squash:0};k+=S.lift;let[A,F]=o.at(g,b,0),L=N?m?.carry??null:null,q=s?1:P((r-(l??0))/.35,0,1);u.push({bot:t,depth:g+b+.25,x:A,y:F,hop:O(k),tilt:O(v),spin:O(S.spin),squash:C(S.squash+w),scale:C(.6+.4*D(q)),opacity:C(q),size:d,carry:L?{dark:"result"===L||"report"===L||"copy"===L,ember:"question"===L||"answer"===L,stamp:"noted"===L}:null,lag:L?$:null,gaze:j,working:"run"===y.key&&!N,crossed:"stopped"===y.key||"paused"===y.key}),p.push({bot:t,x:A,head:O(F-k-d),foot:F,carrying:!!L,walking:N})}let x=[],m=[],y=(e,t,n,a,r,s,i,l,d=1,c=!1)=>{let u=Math.cos(l),f=Math.sin(l),p=(e,r)=>[t+e*u-r*f,n+e*f+r*u,a];x.push({id:e,depth:t+n+.6,points:o.points([p(-r/2,-s/2),p(r/2,-s/2),p(r/2,s/2),p(-r/2,s/2)]),lines:[.3,.5,.7].map(e=>o.points([p(-r/2+.2*r,-s/2+s*e),p(r/2-r*(e>.6?.45:.2),-s/2+s*e)])),dark:i,ember:c,opacity:d})},g=(e,t,n)=>{let a=e<8?e:1+(e-1)%7,r=e<8?0:Math.floor((e-1)/7),s=Math.floor(a/4),i=3.6+a%4*4.5+.5*r,l=i+3.7,d=12.2-3.9*s-.5*r,c=d-3.2;m.push({id:`pin${e}`,depth:-1,points:o.points([[i,.3,c],[l,.3,c],[l,.3,d],[i,.3,d]]),lines:[.72,.52,.32].map(e=>o.points([[i+.7,.3,c+(d-c)*e],[l-(e<.4?1.8:.7),.3,c+(d-c)*e]])),dark:t,ember:!1,opacity:n})},b=n.find(e=>"start"===e.home);b&&r>=b.back&&g(0,!1,l(b.back));let k=1;for(let e of n)"result"===e.out&&(r>=e.arrive+.31&&g(k,!0,l(e.arrive+.31,.2)),k+=1);for(let e of s.desks){let t=n.filter(t=>t.who===i&&t.event.to===e.bot&&t.leave<=r),a=t.findLast(e=>"held"===e.out),s=a?t.find(e=>"copy"===e.out&&e.event.exchange===a.event.exchange):t.findLast(e=>"copy"===e.out),o=t.findLast(e=>"order"===e.out),d=t.filter(e=>"extra"===e.out).slice(-3),c=(e.tray[0]+e.tray[2])/2,u=(e.tray[1]+e.tray[3])/2;a&&r>=a.arrive+.22&&(!s||r<s.arrive+.4)&&y(`hold-${e.bot}`,c,u,7.5,3.6,4.2,!1,-.12),s&&r>=s.arrive&&r<s.arrive+.4&&y(`copy-${e.bot}`,c+.5,u-.5,7.8,2.8,2.8,!0,.2);let f=s&&(!o||s.leave>o.leave)?s.arrive+.4:o?o.arrive+.22:null;null!==f&&r>=f&&y(`order-${e.bot}`,e.x0+9.5,e.y0+4.2,6.15,4.6,3.6,!1,.08,l(f)),s&&r>=s.arrive+.4&&y(`answers-${e.bot}`,e.x0+11.2,e.y0+3.4,6.2,2.8,2.6,!0,.25,l(s.arrive+.4)),d.forEach((t,n)=>{r>=t.arrive&&y(`more-${e.bot}-${t.event.id}`,e.x0+6.8+1.2*n,e.y0+5.4,6.25,2.6,2.2,!1,-.2,l(t.arrive))})}let v=n.find(e=>"question"===e.out&&r>=e.arrive&&r<Math.min(e.answer?e.answer.at+.3:1/0,e.event.closed??1/0));v&&r>=v.arrive+.22&&y("question",29,77,8.2,4.4,3.4,!1,-.2,1,!0);let w=n.findLast(e=>"report"===e.out&&r>=e.arrive&&(!Number.isFinite(e.back)||r<e.stay));w&&r>=w.arrive+.22&&y("report",29,77,8.2,4.4,3.4,!0,-.2,l(w.arrive+.22,.15));let j=n.find(e=>"answer"===e.home&&r>=e.back);j&&y("answer",23.5,19.8,6.15,3.4,2.6,!1,-.15,l(j.back));let $=n.find(e=>"note"===e.out&&r>=e.arrive&&r<e.stay),N=[];for(let e of n){let t=e.out;if(!t||"note"===t)continue;let n="result"===t?.31:.22;if(r<e.arrive||r>=e.arrive+n)continue;let a=D((r-e.arrive)/n),i=e.route[e.route.length-1],[l,c]=o.at(i[0],i[1],0),u={x:l+.1*d,y:c-d-16},f=s.byBot.get(e.event.to),p="question"===t||"report"===t?[29,77,8.2]:"result"===t?[12,.3,9.5]:f?[(f.tray[0]+f.tray[2])/2,(f.tray[1]+f.tray[3])/2,7.6]:[i[0],i[1],6],[h,x]=o.at(p[0],p[1],p[2]);N.push({id:`fly-${e.event.id}`,x:O(u.x+(h-u.x)*a),y:O(u.y+(x-u.y)*a-72*a*(1-a)),turn:O(-4+16*a),scale:C(1-.45*a),dark:"result"===t||"report"===t||"copy"===t,ember:"question"===t})}let z=[],S=new Map;for(let e of t.pieces){if(null===e.appear){z.push({kind:"piece",piece:e,draw:1});continue}if(r<e.appear)continue;let t=C(P((r-e.appear)/.8,0,1));S.set(e.id,t),z.push({kind:"piece",piece:e,draw:t})}let A=[...z,...u.map(e=>({kind:"bot",walker:e})),...x.map(e=>({kind:"paper",paper:e}))],F=e=>"piece"===e.kind?e.piece.depth:"bot"===e.kind?e.walker.depth:e.paper.depth;A.sort((e,t)=>F(e)-F(t));let L=t.shades.filter(e=>{if(!e.of)return!0;let t=S.get(e.of);return void 0!==t&&t>=.6}),q=[],R=new Map(u.map(e=>[e.bot,e]));for(let t of e.office.bots){let n=M(e,t),a=R.get(t);if("held"===n.key&&a)for(let e of n.waits){let n=R.get(e);n&&q.push({id:`${e}>${t}`,x1:n.x,y1:n.y,x2:a.x,y2:a.y,opacity:Math.min(n.opacity,a.opacity)})}}let T=e.events.findLast(e=>"refused"===e.kind&&"you"!==e.to&&r>=e.at&&r<e.at+2.4),I=(e,t,n,a)=>{let[s,i]=o.at(e,t,0);return{x:s,y:i-d,scale:C(P((r-n)/.18,0,1)),text:a.text}},_=T?h(T.from):void 0,E=$?I(s.door[0],s.door[1],$.arrive,$.event):T&&_?I(_[0],_[1],T.at,T):null,B=[],Q=!1;for(let e of a){if("cheer"!==e.kind)continue;let t=r-e.at-.1,a=h(e.bot);if(t<0||!R.has(e.bot)||!a)continue;let i=U(n,e.bot,e.at+.1),l=i?W(i.trip.route,i.u):{x:a[0],y:a[1]};for(let n of G){let{rise:a,fall:r}=X(e.bot,n);t>=a+r+5+.8||(t<a+r&&(Q=!0),B.push(function(e,t,n,a,r,s,o){let i=n=>K(e,7919*(t+1)+n),{rise:l,fall:d,top:c,sink:u}=X(e,t),f=r/s.s,p=i(1)*Math.PI*2,h=f*(.5+1.1*i(2)),x=4.2+1.4*i(5),m=i(7)*Math.PI*2,y=1+Math.round(i(9)),g=(.5>i(11)?-1:1)*(40+60*i(10)),b=P(a-l,0,d),k=b/d,v=a<l?a/l*.3:.3+.7*k,w=a<l?0:Math.sin(b*x+m)*f*.35,j=P(n.x+Math.cos(p)*h*v-Math.sin(p)*w,1.5,o-1.5),M=P(n.y+Math.sin(p)*h*v+Math.cos(p)*w,1.5,98.5),$=a<l?.95+(c-.95)*(1-(1-a/l)**2):c-u*(b<.3?b*b/.6:b-.15),[N,z]=s.at(j,M,-(Math.max(0,$)*f/s.axes.z[1])),S=a<l?a/l*y*Math.PI:y*Math.PI+.9*Math.cos(b*x+m)*(1-k),A=.62*r/18,D=P((l+d+5+.8-a)/.8,0,1);return{id:`${e}-sheet${t}`,plane:`matrix(${[s.axes.x[0]*A,s.axes.x[1]*A,s.axes.y[0]*A,s.axes.y[1]*A,N,z].map(C).join(",")})`,turn:O(360*i(8)+(a<l?a/l*160:160+g*b)),face:C(Math.cos(S)),landed:a>=l+d,dark:t%4==1,opacity:C(D)}}(e.bot,n,l,t,d,o,s.width)))}}return{sprites:A,pins:m,tossed:B,hush:Q,here:new Set(u.map(e=>e.bot)),flying:N,trail:f,shades:L,links:q,stamp:E,tags:p}}(e,k,v,Q,ee):null,ei=N(e),el=(0,n.useMemo)(()=>(function(e){let t=new Set;for(let n of e.events)if("return"===n.kind||"report"===n.kind)for(let e of(0,h.pathsIn)(n.text))t.add(e);return[...t]})(e),[e]),{data:ed}=(0,Z.useServerRoute)(el.length?l.queryKey.workspaceFiles(el):null),ec=(0,n.useCallback)(e=>ed?.some(t=>t.path===e)??!1,[ed]),[eu,ef]=(0,n.useState)(null),eh=g?et({z:1,x:0,y:0},g.w/2,g.h/2,.7):{z:.7,x:0,y:0},ex=eu??eh,ek=(0,n.useRef)(eh);ek.current=eh;let ew=(0,n.useRef)(0),eM=(0,n.useRef)(null),e$=(0,n.useRef)(null),[ez,eF]=(0,n.useState)(!1),eL=$(e,ee)?.id??null,[eq,eR]=(0,n.useState)({bot:null,report:eL}),eT=eq.report===eL?eq.bot:null;(0,n.useEffect)(()=>{let e=m.current;if(!e)return;let t=t=>{if(t.target.closest("[data-reads]"))return;t.preventDefault(),cancelAnimationFrame(ew.current),eM.current=null;let n=e.getBoundingClientRect(),a=t.clientX-n.left,r=t.clientY-n.top;ef(e=>{let n=e??ek.current;return et(n,a,r,n.z*Math.exp(-t.deltaY*(t.ctrlKey?.01:.0022)))})};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);let eI=()=>{let e=e$.current;e$.current=null,eF(!1),e&&!e.moved&&!e.onPlate&&eT&&eR({bot:null,report:eL})},e_=e=>{cancelAnimationFrame(ew.current);let t=e??ek.current;eM.current=t;let n=performance.now(),a=()=>{let r=Math.min(1,(performance.now()-n)/300),s=1-(1-r)**3;ef(r>=1?e:{z:ex.z+(t.z-ex.z)*s,x:ex.x+(t.x-ex.x)*s,y:ex.y+(t.y-ex.y)*s}),r<1?ew.current=requestAnimationFrame(a):eM.current=null};ew.current=requestAnimationFrame(a)};(0,n.useEffect)(()=>()=>{cancelAnimationFrame(ew.current),y.officePointed.set(null)},[]);let eW=`translate(${ex.x}px, ${ex.y}px) scale(${ex.z})`,eB=(e,t)=>({x:ex.x+ex.z*e,y:ex.y+ex.z*t}),eU=(0,y.useOfficePointed)(),eY=Math.min(1,Math.max(20/26,ex.z/.9)),eH=(ea?.tags??[]).map(t=>({tag:t,plate:function(e,t,n){switch(M(e,t).key){case"run":return{tone:"work",words:"working"};case"asking":case"paused":return{tone:"you",words:"needs you"};default:return t===e.office.coord&&$(e,n)?{tone:"report",words:"report ready"}:null}}(e,t.bot,ee)})),{crowded:eG,onRoom:eK}=function(e,t){let a=(0,n.useRef)(new Map),r=(0,n.useCallback)((e,t)=>{a.current.set(e,t)},[]),[s,o]=(0,n.useState)([]),i=JSON.stringify([t,...e.map(e=>[e.bot,Math.round(e.home.x),Math.round(e.home.y),e.open,e.words])]);return(0,n.useLayoutEffect)(()=>{let n=(e,n,a,r)=>({bot:e,l:n-r*t/2,r:n+r*t/2,t:a-26*t,b:a}),r=(e,t)=>e.l<t.r+4&&t.l<e.r+4&&e.t<t.b+4&&t.t<e.b+4,s=e.filter(e=>e.open),i=s.flatMap(e=>{let t=a.current.get(e.bot);return t?[n(e.bot,e.home.x,e.home.y,t.mark)]:[]}),l=[],d=[];for(let e of s.sort((e,t)=>Number(t.first)-Number(e.first))){let t=a.current.get(e.bot);if(!t)continue;let s=n(e.bot,e.home.x,e.home.y,t.mark+t.rest);if(e.first){l.push(s);continue}[...i,...l].some(t=>t.bot!==e.bot&&r(s,t))?d.push(e.bot):l.push(s)}o(e=>e.length===d.length&&e.every(e=>d.includes(e))?e:d)},[i]),{crowded:s,onRoom:r}}(eH.flatMap(({tag:t,plate:n})=>{let a=t.walking?(t=>{let n=t===e.office.coord?k?.plan.own.seat:k?.plan.byBot.get(t)?.seat;if(!k||!n)return null;let[a,r]=k.fit.at(n[0],n[1],0);return eB(a,r-k.botSize-6)})(t.bot):eB(t.x,t.foot-(k?.botSize??0)-6);return a?[{bot:t.bot,home:a,open:null!==n,first:n?.tone==="you",words:n?.words??""}]:[]}),eY);return(0,t.jsx)("div",{ref:m,"data-room":!0,"data-building":R?void 0:"",onPointerDown:e=>{let t=e.target;0!==e.button||t.closest("button, a, [data-reads]")||(cancelAnimationFrame(ew.current),eM.current=null,e$.current={x:e.clientX,y:e.clientY,from:ex,moved:!1,onPlate:!!t.closest("[data-plate]")},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=e$.current;if(!t)return;let n=e.clientX-t.x,a=e.clientY-t.y;!t.moved&&3>Math.hypot(n,a)||(t.moved=!0,eF(!0),ef({...t.from,x:t.from.x+n,y:t.from.y+a}))},onPointerUp:eI,onPointerCancel:eI,className:(0,J.cn)("relative touch-none select-none overflow-hidden",ez?"cursor-grabbing":"cursor-grab",x),children:k&&ea&&g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"office-fade pointer-events-none absolute inset-0 [mask-composite:intersect] [mask-image:linear-gradient(to_right,transparent,#000_80px,#000_calc(100%-80px),transparent),linear-gradient(to_bottom,transparent,#000_60px,#000_calc(100%-60px),transparent)]",children:(0,t.jsx)("div",{className:"absolute top-0 left-0 origin-top-left",style:{width:g.w,height:g.h,transform:eW},children:(0,t.jsxs)("svg",{width:g.w,height:g.h,className:"overflow-visible","aria-hidden":!0,children:[(0,t.jsx)(ey,{}),(0,t.jsx)(em,{stage:k,on:R&&"paused"===ei}),k.guides.map(e=>(0,t.jsx)("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,style:{stroke:e.color,strokeWidth:e.width,strokeLinecap:"round"}},e.id))]})})}),(0,t.jsxs)("div",{className:"absolute top-0 left-0 origin-top-left",style:{width:g.w,height:g.h,transform:eW},children:[(0,t.jsx)(eE,{stage:k,scene:e,sign:ei,start:a,label:r,faces:d}),(0,t.jsxs)("svg",{width:g.w,height:g.h,className:"overflow-visible",role:"img","aria-label":`The office for ${r}`,children:[(0,t.jsx)(eg,{}),(0,t.jsx)(eb,{stage:k}),(0,t.jsx)(eN,{stage:k,here:ea.here}),ea.shades.map(e=>(0,t.jsx)("polygon",{className:"office-drop",points:e.points,fill:"url(#office-hatch-shade)",style:{animationDelay:`${e.delay}ms`}},e.points)),(0,t.jsxs)("g",{className:"office-fade",style:{animationDelay:`${k.popAt}ms`},children:[(0,t.jsx)(ev,{links:ea.links}),ea.pins.map(e=>(0,t.jsx)(eS,{paper:e},e.id))]}),ea.tossed.map(e=>e.landed&&(0,t.jsx)(eA,{sheet:e},e.id)),ea.trail.map(e=>(0,t.jsx)("ellipse",{cx:e.x,cy:e.y,rx:3,ry:1.5,style:{fill:"var(--ink)",opacity:e.opacity}},e.id)),ea.sprites.map(e=>{let n;return"piece"===e.kind?(0,t.jsx)(ej,{piece:e.piece,draw:e.draw,awake:!e.piece.screen||ea.here.has(e.piece.screen.bot)},e.piece.id):"bot"===e.kind?(0,t.jsx)(eO,{walker:e.walker,face:(n=e.walker.bot,d.find(e=>e.name===n)),popAt:k.popAt},`bot-${e.walker.bot}`):(0,t.jsx)(eS,{paper:e.paper,land:k.popAt},e.paper.id)}),ea.tossed.map(e=>!e.landed&&(0,t.jsx)(eA,{sheet:e},e.id)),ea.flying.map(e=>(0,t.jsx)("g",{transform:`translate(${e.x} ${e.y}) rotate(${e.turn}) scale(${e.scale})`,children:(0,t.jsx)(eC,{dark:e.dark,ember:e.ember})},e.id))]}),(0,t.jsx)(ep,{stage:k,sign:ei,land:R?0:k.popAt+250})]}),(0,t.jsxs)("div",{className:"office-fade pointer-events-none absolute inset-0",style:{animationDelay:`${k.popAt}ms`},children:[ea.stamp&&(0,t.jsx)(eP,{spot:eB(ea.stamp.x,ea.stamp.y),scale:ea.stamp.scale,text:ea.stamp.text}),eH.map(({tag:n,plate:a})=>(0,t.jsx)(eD,{plate:a,state:M(e,n.bot),crowded:eG.includes(n.bot),onRoom:eK,bot:n.bot,head:eB(n.x,n.head),foot:eB(n.x,n.foot).y,lift:n.carrying?32*ex.z:0,size:k.botSize*ex.z,width:g.w,hush:ea.hush,pointed:eU===n.bot,scale:eY,words:eT===n.bot?function(e,t,n){if(t===e.office.coord){let t=$(e,n);if(t)return{kind:"report",text:t.text}}let a=e.events.findLast(a=>a.from===t&&a.at<=n&&("return"===a.kind||"question"===a.kind&&"asking"===M(e,t).key));return a?{kind:"question"===a.kind?"question":"answer",text:a.text}:null}(e,n.bot,ee):void 0,onPick:()=>{var e;eR({bot:eT===(e=n.bot)?null:e,report:eL}),u?.(e)}},n.bot))]}),(0,t.jsx)(eo,{label:r,bots:e.office.bots.length,files:"done"===e.office.status?el.filter(ec):[],from:c,scene:e,sign:ei,onAnswer:f}),(0,t.jsxs)("div",{className:"absolute bottom-3.5 left-4 flex items-center gap-0.5 rounded-full bg-background p-0.75 shadow-sm ring-1 ring-border",children:[(0,t.jsx)(es,{label:"Zoom out",onClick:()=>{let e=eM.current??ex;e_(et(e,g.w/2,g.h/2,en(e.z,!1)))},children:(0,t.jsx)(o.Minus,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"min-w-11 text-center font-mono text-[11.5px] text-foreground/80 tabular-nums",children:[Math.round(100*ex.z),"%"]}),(0,t.jsx)(es,{label:"Zoom in",onClick:()=>{let e=eM.current??ex;e_(et(e,g.w/2,g.h/2,en(e.z,!0)))},children:(0,t.jsx)(i.Plus,{className:"size-3.5"})}),(0,t.jsx)("span",{className:"mx-0.5 h-4 w-px bg-border"}),(0,t.jsx)(es,{label:"Fit the office",onClick:()=>e_(null),children:(0,t.jsx)(s,{className:"size-3.5"})})]})]})})}function es({label:e,onClick:n,children:a}){return(0,t.jsx)("button",{type:"button","aria-label":e,title:e,onClick:n,className:"grid size-7.5 place-items-center rounded-full outline-none transition-colors hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50",children:a})}function eo({label:e,bots:a,files:r,from:s,scene:o,sign:i,onAnswer:l}){let d=(0,y.useOfficeCaption)(),[c,u]=(0,n.useState)(!1),f=r.length>4,p=c&&f,h=f&&!p?r.slice(0,3):r;return(0,t.jsxs)("div",{className:(0,J.cn)("pointer-events-none absolute left-6 flex max-w-[min(34rem,calc(100%-3rem))] animate-in flex-col gap-3 fade-in transition-[top] duration-300",d?"top-24":"top-5"),children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,t.jsx)("h2",{className:"line-clamp-2 max-w-[28rem] text-balance font-semibold text-[22px] leading-tight tracking-tight",children:e}),(0,t.jsx)(eI,{scene:o,sign:i,onAnswer:l})]}),r.length>0&&(0,t.jsxs)("div",{className:"flex animate-in flex-col gap-2 fade-in slide-in-from-top-1 duration-300",children:[(0,t.jsxs)("span",{className:"font-mono text-[11.5px] text-muted-foreground tabular-nums",children:[a," ",1===a?"bot":"bots"," · ",r.length," ",1===r.length?"file":"files"]}),(0,t.jsxs)("div",{className:(0,J.cn)("pointer-events-auto flex flex-wrap gap-1.5",p&&"max-h-60 overflow-y-auto rounded-2xl bg-background/80 p-1.5 ring-1 ring-border scrollbar-none"),children:[h.map(e=>{let n=(0,Q.fileIcon)(e);return(0,t.jsxs)(V.FileLink,{path:e,from:s,className:"flex h-7 min-w-0 max-w-full items-center gap-1.5 rounded-full bg-background pr-3 pl-2.5 text-[12.5px] shadow-sm outline-none ring-1 ring-border transition-colors hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:e.split("/").pop()})]},e)}),f&&(0,t.jsx)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":p,className:"flex h-7 items-center rounded-full bg-foreground/7 px-3 text-[12.5px] outline-none transition-colors hover:bg-foreground/12 focus-visible:ring-3 focus-visible:ring-ring/50",children:p?"Fewer":`+${r.length-3} more`})]})]})]})}let ei={a:"2.3,1.7 4,0 16,0 17.7,1.7 16,3.4 4,3.4",g:"2.3,18 4,16.3 16,16.3 17.7,18 16,19.7 4,19.7",d:"2.3,34.3 4,32.6 16,32.6 17.7,34.3 16,36 4,36",f:"1.7,2.3 3.4,4 3.4,15.7 1.7,17.4 0,15.7 0,4",e:"1.7,18.6 3.4,20.3 3.4,32 1.7,33.7 0,32 0,20.3",b:"18.3,2.3 20,4 20,15.7 18.3,17.4 16.6,15.7 16.6,4",c:"18.3,18.6 20,20.3 20,32 18.3,33.7 16.6,32 16.6,20.3"},el=["abcdef","bc","abdeg","abcdg","bcfg","acdfg","acdefg","abc","abcdefg","abcdfg"];function ed({value:e,tall:n=41,lit:a="var(--ink)",unlit:r=ea(5.5)}){return(0,t.jsx)("svg",{width:23*n/41,height:n,viewBox:"-0.5 -0.5 21 37",className:"-skew-x-[7deg] overflow-visible","aria-hidden":!0,children:Object.keys(ei).map(n=>(0,t.jsx)("polygon",{points:ei[n],style:{fill:el[e].includes(n)?a:r}},n))})}let ec=["first","second","third"],eu={done:150,paused:150,stopped:132,you:106},ef={work:"AT WORK",you:"YOUR TURN",paused:"PAUSED",stopped:"STOPPED",done:"DONE"};function ep({stage:e,sign:n,land:a}){return(0,t.jsx)("div",{className:"office-fade pointer-events-none absolute top-0 left-0 origin-top-left",style:{width:700,height:280,transform:e.sign.matrix,animationDelay:`${e.popAt}ms`},children:(0,t.jsx)(eh,{sign:n,land:a})})}function eh({sign:e,land:a}){let[r,s]=(0,n.useState)(null),[o,i]=(0,n.useState)(e);return o!==e&&(s(o),i(e)),(0,n.useEffect)(()=>{if(null===r)return;let e=window.setTimeout(()=>s(null),800);return()=>window.clearTimeout(e)},[r]),(0,t.jsxs)(t.Fragment,{children:[null!==r&&(0,t.jsx)("div",{className:(0,J.cn)("absolute inset-0","work"===r?"origin-right animate-office-tape-out":"animate-office-sign-out"),children:(0,t.jsx)(ex,{sign:r,land:0})}),(0,t.jsx)("div",{className:(0,J.cn)("absolute inset-0",null!==r&&("done"===e?"animate-office-paint":"animate-in fade-in delay-200 duration-300 fill-mode-backwards")),children:(0,t.jsx)(ex,{sign:e,land:null!==r?0:a})},e)]})}function ex({sign:e,land:a}){let[r]=(0,n.useState)(a);return"work"===e?(0,t.jsxs)("div",{className:"absolute inset-x-0 top-5 flex h-27 items-center overflow-hidden pl-7 font-bold text-[64px] text-foreground/45 tracking-[0.2em]",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute inset-y-0 right-0 -left-[51px] animate-office-tape bg-[repeating-linear-gradient(-45deg,color-mix(in_oklab,var(--ink)_14%,transparent)_0_18px,transparent_18px_36px)] motion-reduce:animate-none"}),(0,t.jsx)("span",{className:"relative",children:ef.work})]}):(0,t.jsx)("div",{className:(0,J.cn)("absolute top-4.5 left-6 flex animate-office-sign flex-col gap-2.5 whitespace-nowrap motion-reduce:animate-none","done"===e&&"text-foreground/82",("you"===e||"paused"===e)&&"text-waiting/85","stopped"===e&&"text-foreground/40"),style:{animationDelay:`${r}ms`},children:(0,t.jsx)("span",{className:"font-extrabold leading-[0.9] tracking-[0.02em]",style:{fontSize:eu[e]},children:ef[e]})})}function em({stage:e,on:n}){let{matrix:a,w:r,d:s}=e.ground;return(0,t.jsxs)("g",{transform:a,style:{opacity:+!!n,transition:"opacity 1.2s ease"},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("radialGradient",{id:"office-alarm",children:[(0,t.jsx)("stop",{offset:"0",style:{stopColor:"var(--destructive)",stopOpacity:.12}}),(0,t.jsx)("stop",{offset:"0.55",style:{stopColor:"var(--destructive)",stopOpacity:.07}}),(0,t.jsx)("stop",{offset:"1",style:{stopColor:"var(--destructive)",stopOpacity:0}})]})}),(0,t.jsx)("ellipse",{cx:r/2,cy:s/2,rx:r/2+100,ry:s/2+100,fill:"url(#office-alarm)"})]})}function ey(){let e=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("stop",{offset:"0",style:{stopColor:"var(--ink)",stopOpacity:0}}),(0,t.jsx)("stop",{offset:"0.3",style:{stopColor:"var(--ink)",stopOpacity:.2}}),(0,t.jsx)("stop",{offset:"0.7",style:{stopColor:"var(--ink)",stopOpacity:.2}}),(0,t.jsx)("stop",{offset:"1",style:{stopColor:"var(--ink)",stopOpacity:0}})]});return(0,t.jsxs)("defs",{children:[(0,t.jsx)("linearGradient",{id:"office-fade-x",x1:"0",y1:"0",x2:"1",y2:"1",children:e}),(0,t.jsx)("linearGradient",{id:"office-fade-y",x1:"1",y1:"0",x2:"0",y2:"1",children:e})]})}function eg(){let e=(e,n,a,r)=>(0,t.jsx)("pattern",{id:e,width:n,height:n,patternUnits:"userSpaceOnUse",patternTransform:`rotate(${a})`,children:(0,t.jsx)("line",{x1:"0",y1:"0",x2:"0",y2:n,style:{stroke:ea(r),strokeWidth:.8}})}),n=(e,n,a)=>(0,t.jsxs)("linearGradient",{id:e,x1:"0.1",y1:"0",x2:"0.9",y2:"1",children:[(0,t.jsx)("stop",{offset:"0",style:{stopColor:n}}),(0,t.jsx)("stop",{offset:"1",style:{stopColor:a}})]});return(0,t.jsxs)("defs",{children:[e("office-hatch-side",3.4,-38,20),e("office-hatch-shade",3,28,30),e("office-hatch-soft",3.2,28,14),n("office-floor-own","var(--gray-25)","var(--gray-100)"),n("office-floor-lobby","var(--gray-50)","var(--gray-150)"),n("office-floor-work","var(--gray-0)","var(--gray-75)")]})}let eb=(0,n.memo)(function({stage:e}){return(0,t.jsxs)(t.Fragment,{children:[e.faces.map(e=>(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)("polygon",{className:"office-drop",points:e.points,style:{fill:e.fill,animationDelay:`${e.delay}ms`}}),e.hatch&&(0,t.jsx)("polygon",{className:"office-drop",points:e.points,fill:"url(#office-hatch-side)",style:{animationDelay:`${e.delay}ms`}})]},e.id)),e.lines.map(e=>(0,t.jsx)(ek,{line:e,className:"office-drop",style:{animationDelay:`${e.delay}ms`}},e.id))]})});function ek({line:e,className:n,style:a}){return(0,t.jsx)("line",{className:n,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,style:{stroke:e.color,strokeWidth:e.width,strokeLinecap:"round",...a}})}function ev({links:e}){return(0,t.jsx)(t.Fragment,{children:e.map(e=>{let n=(e.x1+e.x2)/2,a=(e.y1+e.y2)/2+.12*Math.abs(e.x2-e.x1)+6;return(0,t.jsxs)("g",{opacity:e.opacity,children:[(0,t.jsx)("path",{d:`M${e.x1} ${e.y1} Q${n} ${a} ${e.x2} ${e.y2}`,style:{fill:"none",stroke:ea(42),strokeWidth:1.3,strokeDasharray:"3 3.5",strokeLinecap:"round"}}),(0,t.jsx)("circle",{cx:e.x2,cy:e.y2,r:2.6,style:{fill:ea(55)}})]},e.id)})})}let ew=e=>e<=0?0:e>=1?1:1-(1-e)**3,ej=(0,n.memo)(function({piece:e,draw:a,awake:r=!0}){let s=a<1;return(0,t.jsxs)("g",{className:"office-drop",style:{animationDelay:`${e.delay}ms`},children:[(0,t.jsx)("g",{opacity:s?ew((a-.35)/.65):1,children:e.faces.map(e=>(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)("polygon",{points:e.points,style:{fill:e.fill}}),e.hatch&&(0,t.jsx)("polygon",{points:e.points,fill:"url(#office-hatch-side)"})]},e.id))}),e.edges.map(e=>(0,t.jsx)(ek,{line:e,style:s?{strokeDasharray:`${e.length} ${e.length}`,strokeDashoffset:e.length*(1-ew(a))}:void 0},e.id)),(!s||a>.7)&&(0,t.jsxs)(t.Fragment,{children:[e.mugs.map(e=>(0,t.jsx)(ez,{mug:e},`${e.cx},${e.cy}`)),e.screen&&(0,t.jsx)(e$,{screen:e.screen,awake:r}),e.check&&(0,t.jsx)("polyline",{points:e.check,style:{fill:"none",stroke:"var(--ink)",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}})]})]})}),eM=[.5,.95,1.4,1.85,2.3,2.75,3.2,3.65,4.1,4.55];function e$({screen:e,awake:a}){let{w:r,h:s}=e,o=a||"lit"!==e.mode?e.mode:"dim",i=(0,n.useId)();return(0,t.jsxs)("g",{transform:e.matrix,children:[(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:i,clipPathUnits:"userSpaceOnUse",children:(0,t.jsx)("rect",{x:0,y:0,width:r,height:s})})}),(0,t.jsx)("rect",{x:0,y:0,width:r,height:s,rx:.15,style:{fill:"lit"===o?"var(--office-screen-lit)":"dim"===o||"asking"===o?"var(--office-screen-dim)":"var(--office-screen-dark)"}}),"lit"===o&&(0,t.jsx)("g",{clipPath:`url(#${i})`,children:(0,t.jsx)("g",{className:"animate-office-screen",children:eM.map((e,n)=>(0,t.jsx)("line",{x1:.55,y1:e,x2:r*(n%3==2?.45:n%2?.7:.85),y2:e,style:{stroke:"var(--office-screen-line)",strokeWidth:.26,strokeLinecap:"round"}},e))})}),"dim"===o&&[.7,1.2].map((e,n)=>(0,t.jsx)("line",{x1:.55,y1:e,x2:r*(n?.4:.65),y2:e,style:{stroke:"color-mix(in oklab, var(--office-screen-lit) 35%, transparent)",strokeWidth:.2,strokeLinecap:"round"}},e)),"paused"===o&&(0,t.jsxs)("g",{style:{fill:"var(--waiting)"},children:[(0,t.jsx)("rect",{x:r/2-.55,y:s/2-.7,width:.36,height:1.4,rx:.12}),(0,t.jsx)("rect",{x:r/2+.19,y:s/2-.7,width:.36,height:1.4,rx:.12})]}),"asking"===o&&(0,t.jsx)("circle",{cx:r/2,cy:s/2,r:.55,style:{fill:"var(--waiting)"}})]})}function eN({stage:e,here:a}){let r=(0,n.useId)(),s=e.pools.filter(e=>a.has(e.bot));return s.length?(0,t.jsxs)("g",{transform:e.floor,children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("radialGradient",{id:r,children:[(0,t.jsx)("stop",{offset:"0",style:{stopColor:"var(--ink)",stopOpacity:.16}}),(0,t.jsx)("stop",{offset:"0.6",style:{stopColor:"var(--ink)",stopOpacity:.08}}),(0,t.jsx)("stop",{offset:"1",style:{stopColor:"var(--ink)",stopOpacity:0}})]})}),s.map(n=>(0,t.jsx)("ellipse",{className:"office-fade",cx:n.cx,cy:n.cy,rx:n.r,ry:n.r,fill:`url(#${r})`,style:{animationDelay:`${e.popAt}ms`}},n.id))]}):null}function ez({mug:e}){let n={stroke:ea(60),strokeWidth:1};return(0,t.jsxs)("g",{children:[(0,t.jsx)("ellipse",{cx:e.bx,cy:e.by,rx:e.rx,ry:e.ry,style:{fill:"var(--gray-50)",...n}}),(0,t.jsx)("rect",{x:e.cx-e.rx,y:e.cy,width:2*e.rx,height:Math.max(0,e.by-e.cy),style:{fill:"var(--gray-50)"}}),(0,t.jsx)("line",{x1:e.cx-e.rx,y1:e.cy,x2:e.bx-e.rx,y2:e.by,style:n}),(0,t.jsx)("line",{x1:e.cx+e.rx,y1:e.cy,x2:e.bx+e.rx,y2:e.by,style:n}),(0,t.jsx)("ellipse",{cx:e.cx,cy:e.cy,rx:e.rx,ry:e.ry,style:{fill:"var(--gray-0)",...n}})]})}function eS({paper:e,land:n}){return(0,t.jsxs)("g",{opacity:e.opacity,className:void 0===n?void 0:"office-fade",style:void 0===n?void 0:{animationDelay:`${n}ms`},children:[(0,t.jsx)("polygon",{points:e.points,style:{fill:e.dark?"var(--ink)":"var(--gray-0)",stroke:e.ember?"var(--waiting)":e.dark?"var(--ink)":ea(50),strokeWidth:e.ember?1.6:1,strokeLinejoin:"round"}}),e.lines.map(n=>(0,t.jsx)("polyline",{points:n,style:{fill:"none",stroke:e.dark?"color-mix(in oklab, var(--gray-0) 55%, transparent)":ea(32),strokeWidth:1.2,strokeLinecap:"round"}},n))]})}function eA({sheet:e}){return(0,t.jsxs)("g",{transform:`${e.plane} rotate(${e.turn}) scale(${e.face} 1)`,opacity:e.opacity,children:[(0,t.jsx)("rect",{x:-7,y:-9,width:14,height:18,rx:1.6,style:{fill:e.dark?"var(--ink)":"var(--gray-0)",stroke:e.dark?"var(--ink)":ea(45),strokeWidth:.8}}),e.face>0&&[-5,-2,1].map((n,a)=>(0,t.jsx)("rect",{x:-4.5,y:n,width:2===a?5:9,height:1.4,style:{fill:e.dark?"color-mix(in oklab, var(--gray-0) 55%, transparent)":ea(32)}},n))]})}function eO({walker:e,face:n,popAt:a}){let{x:r,y:s,hop:o,tilt:i,spin:l,squash:d,scale:c,size:f,opacity:p}=e;return(0,t.jsxs)("g",{className:"office-fade",style:{animationDelay:`${a}ms`},children:[(0,t.jsx)("ellipse",{cx:r,cy:s,rx:Math.max(1,.27*f-Math.min(.5*o,.15*f)),ry:Math.max(1,.1*f-Math.min(.2*o,.05*f)),fill:"url(#office-hatch-shade)",opacity:p}),(0,t.jsx)("g",{transform:`translate(${r} ${s-o}) rotate(${i}) scale(${c*(1+.6*d)} ${c*(1-d)}) translate(0 ${-f/2}) rotate(${l}) translate(${-f/2} ${-f/2})`,opacity:p,children:(0,t.jsx)("g",{className:"office-pop",style:{animationDelay:`${a}ms`},children:(0,t.jsx)("g",{className:(0,J.cn)("origin-bottom [transform-box:fill-box]",e.working&&"animate-office-work motion-reduce:animate-none"),children:(0,t.jsx)(u.BotMark,{size:f,seed:e.bot,...(0,u.iconProps)(n?.icon),state:e.working?"thinking":"idle",gazeX:e.gaze[0],gazeY:e.gaze[1],crossed:e.crossed,notify:!1})})})}),e.carry&&(0,t.jsx)("g",{transform:e.lag?`translate(${r+.1*f+.8*e.lag[0]} ${s-.6*o-f-16+.4*e.lag[1]}) rotate(${e.lag[2]-4})`:`translate(${r+.1*f} ${s-o-f-16}) rotate(${-(1.4*i)-4})`,children:(0,t.jsx)(eC,{...e.carry})})]})}function eC({dark:e,ember:n,stamp:a=!1}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("rect",{x:-11,y:-14,width:22,height:28,rx:2.5,style:{fill:e?"var(--ink)":"var(--gray-0)",stroke:n?"var(--waiting)":e?"var(--ink)":ea(45),strokeWidth:1.3}}),[-8,-3.5,1].map((n,a)=>(0,t.jsx)("rect",{x:-6.5,y:n,width:2===a?7.5:13,height:2,style:{fill:e?"color-mix(in oklab, var(--gray-0) 55%, transparent)":ea(32)}},n)),a&&(0,t.jsx)("rect",{x:-8.5,y:3.5,width:15,height:7,rx:1.5,transform:"rotate(-14)",style:{fill:"none",stroke:"var(--destructive)",strokeWidth:1.5}})]})}function eP({spot:e,scale:n,text:a}){return(0,t.jsxs)("div",{className:"absolute flex items-center gap-2",style:{left:e.x+30,top:e.y-8},children:[(0,t.jsx)("div",{className:"relative h-9.5 w-7.5 shrink-0 -rotate-5 rounded-[3px] border border-foreground/30 bg-background",children:(0,t.jsx)("span",{className:"absolute top-3.5 -left-0.5 rounded-[3px] border-2 border-destructive bg-background/90 px-0.75 font-semibold text-[10.5px] text-destructive",style:{transform:`rotate(-14deg) scale(${n})`},children:"Refused"})}),(0,t.jsx)("span",{className:"line-clamp-3 w-48 rounded-lg border border-border bg-background/95 px-2 py-1 text-[11.5px] text-foreground/80 leading-snug",children:a})]})}function eD({plate:e,state:a,crowded:r,onRoom:s,bot:o,head:i,foot:l,lift:d,size:u,width:f,hush:p,words:h,pointed:x,scale:m,onPick:g}){let b=i.y-6-d,k=(null===e||r)&&!x,v=(0,n.useRef)(null),w=(0,n.useRef)(null),[j,M]=(0,n.useState)(null),$=`${a.key} ${e?.tone??""} ${e?.words??""}`,N=void 0!==h;(0,n.useLayoutEffect)(()=>{if(!v.current||!w.current)return;let e=0;for(let t of v.current.querySelectorAll("[data-unfold]"))e+=t.scrollWidth;let t={mark:w.current.offsetWidth+17,rest:e};s(o,t),M(e=>e&&e.mark===t.mark&&e.rest===t.rest?e:t)},[o,$,N,s]);let z=j?j.mark+j.rest:0,S=j?i.x+z/2>f-12?{right:-j.mark/2}:i.x-z/2<12?{left:-j.mark/2}:null:null;return(0,t.jsxs)("div",{"data-plate":!0,onPointerEnter:()=>y.officePointed.set(o),onPointerLeave:()=>y.officePointed.set(null),className:(0,J.cn)("group/plate absolute size-0 transition-opacity duration-500",void 0!==h?"z-40":e?.tone==="you"?"z-31":x?"z-30":k?"z-10 hover:z-30 has-[:focus-visible]:z-30":"z-20 hover:z-30 has-[:focus-visible]:z-30",p&&"opacity-15"),style:{left:i.x,top:b},children:[(0,t.jsx)("button",{type:"button",tabIndex:-1,"aria-hidden":!0,onClick:g,className:"pointer-events-auto absolute top-1 cursor-pointer",style:{left:-(.4*u),width:.8*u,height:Math.max(12,l-b-4)}}),void 0!==h&&(0,t.jsx)(eL,{words:h,state:a,bot:o,top:b,x:i.x,width:f,below:l-b,size:u,onPick:g}),(0,t.jsxs)("div",{ref:v,hidden:N,style:{...S,scale:1===m?void 0:String(m),transformOrigin:`${S?.right!==void 0?"100%":S?.left!==void 0?"0%":"50%"} 100%`},className:(0,J.cn)("pointer-events-auto absolute bottom-0 flex h-6.5 items-center whitespace-nowrap rounded-full bg-background pr-2.25 text-[12px] transition-opacity duration-120",!S&&"left-0 -translate-x-1/2",e?.tone==="you"?"ring-[1.5px] ring-waiting":"ring-[0.75px] ring-foreground/25",e&&"animate-office-plate",null===e&&!x&&"opacity-0 group-hover/plate:opacity-100 group-has-[:focus-visible]/plate:opacity-100"),children:[e?.tone==="you"&&(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 animate-office-ask rounded-full"}),(0,t.jsxs)("button",{type:"button",onClick:g,"aria-label":`${o} \xb7 ${a.label}`,className:"flex h-full items-center rounded-full pl-2 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{ref:w,className:"flex shrink-0 items-center",children:(0,t.jsx)(eR,{state:a.key})}),(0,t.jsx)(eq,{open:!k,children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),e&&(0,t.jsx)(eq,{open:!k,children:"work"===e.tone?(0,t.jsx)(c.ShinyText,{text:e.words}):(0,t.jsx)("span",{className:"you"===e.tone?"text-waiting":"text-muted-foreground",children:e.words})})]})]},e?.tone??"none")]})}let eF={report:"Report",question:"Asks you",answer:"Answer"};function eL({words:e,state:a,bot:r,top:s,x:o,width:i,below:l,size:c,onPick:u}){let f=(0,n.useRef)(null),[p,h]=(0,n.useState)(0),x=`${a.label} ${e?.kind??""} ${e?.text??""}`;(0,n.useLayoutEffect)(()=>{let e=f.current?.offsetHeight??0;h(t=>t===e?t:e)},[x]);let m=e?.kind==="report",y=m||p>0&&s-p<8,g=e?.kind==="question";return(0,t.jsxs)("div",{ref:f,"data-reads":!0,style:m?{left:Math.min(Math.max(-300+.35*c,12-o),i-12-300-o),top:l+10,width:300}:{left:Math.min(Math.max(-150,12-o),i-12-300-o),width:300,...y?{top:-26}:{bottom:0}},className:(0,J.cn)("pointer-events-auto absolute flex cursor-auto select-text flex-col rounded-2xl bg-background shadow-lg",y?"animate-office-card-down":"animate-office-card-up",g?"ring-[1.5px] ring-waiting":"ring-1 ring-border"),children:[(0,t.jsxs)("button",{type:"button",onClick:u,"aria-expanded":!0,"aria-label":`${r} \xb7 ${a.label}`,className:"flex h-8 shrink-0 items-center gap-1.5 rounded-t-2xl px-3 text-left text-[12px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(eR,{state:a.key}),(0,t.jsx)("span",{className:"font-semibold",children:r}),(0,t.jsx)("span",{className:g?"text-waiting":"text-muted-foreground",children:e?eF[e.kind]:a.label})]}),e&&(0,t.jsx)("div",{className:"max-h-56 overflow-y-auto overscroll-contain px-3 pb-4 [mask-image:linear-gradient(to_bottom,#000_calc(100%-14px),transparent)]",children:(0,t.jsx)(d.Markdown,{className:"min-w-0 text-[12.5px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[14px] [&_h2]:text-[13.5px] [&_h3]:text-[13px] [&_li]:my-0.5 [&_table]:text-[11.5px] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:e.text})})]})}function eq({open:e,children:n}){return(0,t.jsx)("span",{className:(0,J.cn)("flex overflow-hidden transition-[max-width,opacity] duration-200 ease-out motion-reduce:transition-none",e?"max-w-80 opacity-100":"max-w-0 opacity-0 group-hover/plate:max-w-80 group-hover/plate:opacity-100 group-has-[:focus-visible]/plate:max-w-80 group-has-[:focus-visible]/plate:opacity-100"),children:(0,t.jsx)("span",{"data-unfold":!0,className:"flex shrink-0 items-center pl-1.5",children:n})})}function eR({state:e}){switch(e){case"run":return(0,t.jsx)("span",{className:"size-1.75 shrink-0 animate-pulse rounded-full bg-foreground motion-reduce:animate-none"});case"asking":return(0,t.jsx)("span",{className:"size-1.75 shrink-0 rounded-full bg-waiting"});case"paused":return(0,t.jsxs)("span",{className:"flex h-2 shrink-0 gap-0.5","aria-hidden":!0,children:[(0,t.jsx)("span",{className:"w-0.5 rounded-full bg-waiting"}),(0,t.jsx)("span",{className:"w-0.5 rounded-full bg-waiting"})]});case"ended":return(0,t.jsx)("span",{className:"size-1.5 shrink-0 rounded-full border-[1.5px] border-muted-foreground"});case"held":return(0,t.jsx)("svg",{width:8,height:11,viewBox:"0 0 12 14","aria-hidden":!0,className:"shrink-0",children:(0,t.jsx)("path",{d:"M1.5 1h9M1.5 13h9M2.5 1c0 3.5 3.5 4.5 3.5 6S2.5 9.5 2.5 13M9.5 1c0 3.5-3.5 4.5-3.5 6s3.5 2.5 3.5 6",style:{fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"}})});case"done":return(0,t.jsx)("svg",{width:10,height:8,viewBox:"0 0 11 9","aria-hidden":!0,className:"office-check shrink-0",children:(0,t.jsx)("path",{d:"M1 4.5l3 3L10 1.5",style:{fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round"}})});case"stopped":return(0,t.jsx)("span",{className:"size-1.75 shrink-0 rounded-xs bg-muted-foreground"});case"none":return(0,t.jsx)("span",{className:"size-1.5 shrink-0 rounded-full bg-muted-foreground"})}}let eT={work:"run",you:"asking",paused:"paused",stopped:"stopped",done:"done"};function eI({scene:e,sign:n,onAnswer:a}){let r,{called:s,back:o}={called:(r=e.office.bots.filter(t=>t!==e.office.coord&&"none"!==M(e,t).key)).length,back:r.filter(t=>"done"===M(e,t).key).length},i=e.office.bots.find(t=>"asking"===M(e,t).key),l={work:s?`At work \xb7 ${o} of ${s} back`:"At work",you:`Your turn — ${i??"a bot"} asks`,paused:"Paused — waiting on Continue",stopped:"Stopped",done:"Done"}[n],d="you"===n||"paused"===n,c=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:(0,J.cn)("flex w-3 justify-center",!d&&"text-muted-foreground"),children:(0,t.jsx)(eR,{state:eT[n]})}),l]});return d&&a?(0,t.jsx)("button",{type:"button",onClick:a,className:"pointer-events-auto flex items-center gap-1.5 text-[15px] text-waiting underline-offset-4 outline-none hover:underline focus-visible:underline",children:c}):(0,t.jsx)("span",{className:(0,J.cn)("flex items-center gap-1.5 text-[15px]",d?"text-waiting":"stopped"===n?"text-muted-foreground":"text-foreground/70"),children:c})}function e_({seconds:e,tall:a}){let r,s,o,i=Math.min(359999,Math.max(0,Math.floor(e))),l=Math.floor(i/3600),d=[...l?[l]:[],Math.floor(i/60)%(l?60:100),i%60],c=Math.max(3,Math.round(a/10));return(0,t.jsx)("div",{role:"img","aria-label":`Running for ${(r=Math.max(0,Math.floor(e)),s=e=>String(e).padStart(2,"0"),(o=Math.floor(r/3600))?`${o}:${s(Math.floor(r/60)%60)}:${s(r%60)}`:`${Math.floor(r/60)}:${s(r%60)}`)}`,className:"flex items-center",style:{gap:a/8},children:d.map((e,r)=>(0,t.jsxs)(n.Fragment,{children:[r>0&&(0,t.jsxs)("span",{className:"flex flex-col",style:{gap:a/3.2},children:[(0,t.jsx)("span",{className:"rounded-[1px] bg-current",style:{width:c,height:c}}),(0,t.jsx)("span",{className:"rounded-[1px] bg-current",style:{width:c,height:c}})]}),(r>0||e>=10)&&(0,t.jsx)(ed,{value:Math.floor(e/10),tall:a,lit:"currentColor",unlit:ea(4)}),(0,t.jsx)(ed,{value:e%10,tall:a,lit:"currentColor",unlit:ea(4)})]},ec[r]))})}function eW({bot:e,icon:a,size:r}){let s=(0,n.useMemo)(()=>(0,f.markStill)(e,a??null),[e,a]),o=(0,n.useId)(),i=s.paint?`url(#${o})`:s.ink;return(0,t.jsxs)("svg",{width:r,height:r,viewBox:"0 0 240 240","aria-hidden":!0,className:"shrink-0",children:[s.paint&&(0,t.jsx)("defs",{children:(0,t.jsx)("linearGradient",{id:o,x1:"0",y1:"0",x2:"0",y2:"1",children:s.paint.map((e,n,a)=>(0,t.jsx)("stop",{offset:n/Math.max(1,a.length-1),style:{stopColor:e}},`${e}-${n/Math.max(1,a.length-1)}`))})}),(0,t.jsx)("path",{d:s.head,style:s.outline?{fill:"none",stroke:i,strokeWidth:14}:{fill:i}}),s.eyes.map(e=>(0,t.jsx)("path",{d:e,style:{fill:s.outline?i:"var(--background)"}},e))]})}function eE({stage:e,scene:a,sign:r,start:s,label:o,faces:i}){let l=function(e,t){let[a,r]=(0,n.useState)(()=>Date.now());return(0,n.useEffect)(()=>{if(null!==t)return;let e=window.setInterval(()=>r(Date.now()),1e3);return()=>window.clearInterval(e)},[t]),t??(a-e)/1e3}(s,a.ended),d=a.office.bots.map((e,t)=>({bot:e,order:t,steps:a.office.steps.get(e)??0})).sort((e,t)=>t.steps-e.steps||e.order-t.order).slice(0,8);return(0,t.jsxs)("div",{className:"office-fade pointer-events-none absolute top-0 left-0 origin-top-left",style:{width:e.board.w,height:e.board.h,transform:e.board.matrix,animationDelay:`${e.popAt}ms`},children:[(0,t.jsxs)("div",{className:"absolute inset-x-0 top-0 flex h-85 border-2 border-foreground/30 bg-background/70 text-foreground/40",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col justify-between px-9 pt-7 pb-8",children:[(0,t.jsxs)("div",{"aria-hidden":!0,className:"flex items-baseline justify-between gap-6 font-semibold text-[26px] uppercase tracking-[0.18em]",children:[(0,t.jsx)("span",{className:"truncate",children:o}),(0,t.jsx)("span",{className:"shrink-0",children:ef[r]})]}),(0,t.jsx)("div",{className:"text-foreground/85",children:(0,t.jsx)(e_,{seconds:l,tall:170})})]}),(0,t.jsxs)("div",{"aria-hidden":!0,className:"flex w-105 shrink-0 flex-col gap-1 border-foreground/30 border-l-2 px-7 pt-6",children:[(0,t.jsxs)("span",{className:"mb-1 flex justify-between font-mono text-[19px] uppercase tracking-[0.2em]",children:[(0,t.jsx)("span",{children:"Crew"}),(0,t.jsx)("span",{children:"Steps"})]}),d.map(({bot:e,steps:n},r)=>(0,t.jsxs)("div",{className:"flex h-7 items-center gap-3 text-[22px]",children:[(0,t.jsx)("span",{className:"w-5 font-mono text-[18px]",children:r+1}),(0,t.jsx)(eW,{bot:e,icon:i.find(t=>t.name===e)?.icon,size:24}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground/65",children:e}),(0,t.jsx)("span",{className:"flex w-3 justify-center",children:(0,t.jsx)(eR,{state:M(a,e).key})}),(0,t.jsx)("span",{className:"w-10 text-right font-mono text-foreground/65 tabular-nums",children:n})]},e))]})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-85 left-24 h-40 w-0.5 bg-foreground/30"}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-85 right-24 h-40 w-0.5 bg-foreground/30"})]})}function eB({thread:e,onBot:a,onAnswer:r,camera:s}){let o=(0,x.toDate)(e.createdAt).getTime(),i=(0,n.useMemo)(()=>(function(e){let t=(0,x.toDate)(e.createdAt).getTime(),n=e=>e.at?Math.max(0,((0,x.toDate)(e.at).getTime()-t)/1e3):0,a=e.bot.name,r=e.lines,s=e.room.exchanges,o=new Map(s.map(e=>[e.id,e])),i=[a,...e.room.participants.map(e=>e.bot),...s.map(e=>e.bot)],l=e=>i.find(t=>t.toLowerCase()===e.toLowerCase())??e,d=new Set(r.filter(e=>"tool"===e.kind||"ask"===e.kind).map(y.messageOf)),c=e=>("say"===e.kind||"result"===e.kind)&&!d.has((0,y.messageOf)(e)),u=e=>"user"!==e.kind&&"note"!==e.kind&&"stop"!==e.kind,f=new Map,h=new Map,k=new Map;for(let[e,t]of r.entries())t.parent&&(u(t)&&h.set(t.parent,e),u(t)&&!k.has(t.parent)&&k.set(t.parent,e),c(t)&&f.set(t.parent,(0,y.messageOf)(t)));let v=[{id:"job",kind:"job",order:-1,from:"you",to:a,text:e.request,at:0,after:[],extra:!1,exchange:"",closed:null}],w=[a],j=e=>{e&&e!==m.ROOM_THURSDAY&&!w.includes(e)&&w.push(e)},M=new Set,$=null,N=e=>{let t={after:[],extra:!1,exchange:"",...e,closed:null};return v.push(t),$=null,t},z=(e,t,n,r)=>{let s={id:e.id,order:t,at:n};if("tool"===e.kind){if(e.tool?.name===p.TOOL_NAMES.send_message){let t=e.meant?l(e.meant.name):"";N({...s,kind:"refused",from:r,to:t===m.ROOM_THURSDAY?"you":t,text:(e.tool?.results??[]).flatMap(e=>"text"===e.type?[e.text]:[]).join(" ").trim()})}return}if("ask"===e.kind){let t=l(e.to?.name??"");if(t===m.ROOM_THURSDAY){let t=e.questionId??"";o.get(t)?.state==="done"&&M.add(r),N({...s,kind:"question",from:r,to:"you",text:e.text,exchange:t});return}j(t);let n=e.exchange?o.get(e.exchange):void 0;N({...s,kind:"give",from:r,to:t,text:e.text,after:n&&g(n)?n.waitsFor:[],extra:!n,exchange:n?.id??""});return}if("user"===e.kind)return void N({...s,kind:M.delete(r)?"answer":"tell",from:"you",to:r,text:e.text});if("say"!==e.kind&&"result"!==e.kind||!c(e))return;let i=(0,y.messageOf)(e),d=$;if(d?.message===i){d.event.text=`${d.event.text}
|
|
2
|
-
|
|
3
|
-
${e.text}`;return}if(r===a){"result"===e.kind&&($={message:i,event:N({...s,kind:"report",from:r,to:"you",text:e.text})});return}let u=e.parent?o.get(e.parent):void 0;if(u?.state==="done"&&f.get(u.id)===i){$={message:i,event:N({...s,kind:"return",from:r,to:l(u.caller),text:e.text,exchange:u.id})};return}};for(let[e,t]of r.entries()){let r=n(t),s=l(t.bot.name);j(s),z(t,e,r,s);let i=t.parent?o.get(t.parent):void 0;i?.state!=="done"||s===a||h.get(i.id)!==e||f.has(i.id)||N({id:`silent:${t.id}`,kind:"return",order:e,from:s,to:l(i.caller),text:"This turn ended without a message.",at:r,exchange:i.id})}let S=e=>e<0?null:n(r[e]),A=e=>r.findLastIndex(t=>l(t.bot.name)===e&&u(t));for(let e of s)j(e.bot);return{coord:a,bots:w,events:v,seats:new Map(w.map(t=>[t,(t=>{let n=s.filter(e=>e.bot===t),o=e.room.questions.filter(e=>l(e.bot)===t);if(o.length)return{key:"asking",waits:["you"],since:S(r.findIndex(e=>e.questionId===o[0].id))};if(n.some(e=>"running"===e.state||"queued"===e.state))return{key:"run",waits:[],since:null};let i=n.filter(e=>"paused"===e.state);if(i.length)return{key:"paused",waits:["you"],since:S(r.findLastIndex(e=>"stop"===e.kind&&i.some(t=>t.id===e.parent)))};let d=n.find(b);if(d)return{key:"held",waits:d.waitsFor,since:S(r.findIndex(e=>"ask"===e.kind&&e.exchange===d.id))};if(n.some(e=>"waiting"===e.state)){let e=s.filter(e=>{let n;return l(e.caller)===t&&e.bot!==m.ROOM_THURSDAY&&"done"!==(n=e.state)&&"cancelled"!==n});return{key:"ended",waits:w.filter(t=>e.some(e=>e.bot===t)),since:S(A(t))}}let c=n.at(-1);return c?"cancelled"===c.state?{key:"stopped",waits:[],since:null}:t===a&&"done"!==e.status?"cancelled"===e.status?{key:"stopped",waits:[],since:null}:{key:"ended",waits:[],since:S(A(t))}:{key:"done",waits:[],since:S(A(t))}:{key:"none",waits:[],since:null}})(t)])),owed:new Map(s.filter(g).map(e=>[e.id,e.waitsFor])),states:new Map(s.map(e=>[e.id,e.state])),starts:k,asking:new Set(e.room.questions.map(e=>e.id)),span:r.reduce((e,t)=>Math.max(e,n(t)),0),steps:r.reduce((e,t)=>{if("tool"!==t.kind&&"ask"!==t.kind)return e;let n=l(t.bot.name);return e.set(n,(e.get(n)??0)+1),e},new Map),status:e.status,seen:e.seen}})(e),[e]),l=function(e,t){let[a,r]=(0,n.useState)(()=>({office:e,memory:k(null,e,(Date.now()-t)/1e3)}));if(a.office===e)return a.memory;let s={office:e,memory:k(a.memory,e,(Date.now()-t)/1e3)};return r(s),s.memory}(i,o),d=(0,n.useMemo)(()=>(function(e,t){let n=e.events.map(n=>{let a=t.read.get(n.id)??n.at,r=t.owed.get(n.exchange);return"give"===n.kind&&!n.extra&&r?{...n,at:a,after:r.waits}:"question"===n.kind?{...n,at:a,closed:t.asked.get(n.exchange)??(e.asking.has(n.exchange)?null:a)}:{...n,at:a}});for(let[a,r]of t.owed){if(null===r.out)continue;let t=n.find(e=>"give"===e.kind&&e.exchange===a);t&&n.push({...t,id:`release:${a}`,kind:"release",order:(e.starts.get(a)??1/0)-.5,at:Math.max(r.out,t.at)})}for(let[e,a]of t.reports)null!==a.gone&&n.push({...a.event,at:t.read.get(e)??a.event.at,closed:a.gone});n.sort((e,t)=>e.at-t.at||e.order-t.order);let a=new Map([...e.seats].map(([e,n])=>[e,{...n,since:t.seats.get(e)?.since??n.since}]));return{office:e,events:n,seats:a,ended:t.ended,opened:t.opened,fresh:t.fresh}})(i,l),[i,l]);return(0,t.jsx)(V.FileViewer,{children:(0,t.jsx)(er,{scene:d,start:o,label:e.label,faces:e.roster,from:e.id,onBot:a,onAnswer:r,camera:s,className:"min-h-0 min-w-0 flex-1"})})}e.s(["OfficeBackdrop",0,function({thread:e,leaving:a=!1,onBot:r,onAnswer:s,camera:o,className:i}){let[l,d]=(0,n.useState)(null),[c,u]=(0,n.useState)(e);return c.id!==e.id?(d(c),u(e)):c!==e&&u(e),(0,n.useEffect)(()=>{if(!l)return;let e=window.setTimeout(()=>d(null),440);return()=>window.clearTimeout(e)},[l]),(0,t.jsx)("div",{inert:a,className:(0,J.cn)("flex animate-in fade-in duration-300",i,a&&"pointer-events-none opacity-0 transition-opacity duration-250 ease-in"),children:(0,t.jsx)("div",{className:"relative flex min-h-0 min-w-0 flex-1",children:(l?[l,e]:[e]).map(e=>e===l?(0,t.jsx)("div",{inert:!0,className:"pointer-events-none absolute inset-0 flex animate-office-sink",children:(0,t.jsx)(eB,{thread:e,camera:o})},e.id):(0,t.jsx)("div",{className:(0,J.cn)("flex min-h-0 min-w-0 flex-1",l&&"animate-office-rise"),children:(0,t.jsx)(eB,{thread:e,onBot:r,onAnswer:s,camera:o})},e.id))})})}],532965)},590714,function(e){e.n(e.i(532965))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,683408,e=>{"use strict";var t=e.i(843476),a=e.i(271645);let n=null,r=()=>e.A(195730).then(e=>(n=e.MarkdownBody,e)),l=(0,a.lazy)(()=>r().then(e=>({default:e.MarkdownBody})));{let e=()=>void r().catch(()=>{}),t=()=>{"requestIdleCallback"in window?requestIdleCallback(e):setTimeout(e)};"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0})}let s=(0,a.memo)(function(e){if(n){let a=n;return(0,t.jsx)(a,{...e})}return(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)("div",{className:e.className,style:{whiteSpace:"pre-wrap"},children:e.children}),children:(0,t.jsx)(l,{...e})})});e.s(["Markdown",0,s])},633669,e=>{"use strict";var t=e.i(843476),a=e.i(818125),n=e.i(647163);e.s(["SourceChips",0,function({sources:e,limit:r,className:l}){let s=e.flatMap(e=>{let t=(0,n.hostOf)(e.url);return t?[{...e,host:t}]:[]}),i=r?s.slice(0,r):s,o=s.length-i.length;return(0,t.jsxs)("span",{className:(0,n.cn)("flex min-w-0 flex-wrap items-center gap-1",l),children:[i.map(e=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title??e.url,className:"flex h-[22px] min-w-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11.5px] leading-4 text-foreground/80 outline-none transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(a.SiteIcon,{host:e.host}),(0,t.jsx)("span",{className:"truncate",children:e.host})]},e.url)),o>0&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["+",o]})]})}])},213377,e=>{"use strict";e.s(["STUDIO_TOOLS",0,{generate_image:"generate_image",generate_speech:"generate_speech",transcribe:"transcribe",generate_video:"generate_video"},"TOOL_NAMES",0,{memory_recall:"memory_recall",memory_create:"memory_create",memory_remember:"memory_remember",memory_describe:"memory_describe",memory_forget:"memory_forget",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",thread_start:"thread_start",thread_tell:"thread_tell",thread_answer:"thread_answer",thread_status:"thread_status",thread_cancel:"thread_cancel",thread_show:"thread_show",thread_seen:"thread_seen",routine:"routine",send_message:"send_message",thread_recall:"thread_recall",sign_in_use:"sign_in_use",sign_in_keep:"sign_in_keep",check_mail:"check_mail",look_at:"look_at",make_deck:"make_deck",describe_self:"describe_self",end_call:"end_call",emote:"emote"}])},807038,e=>{"use strict";var t=e.i(843476),a=e.i(456420);let n={name:"file-x",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]]};n.node;let r=(0,a.default)(n);var l=e.i(657688),s=e.i(271645),i=e.i(798120),o=e.i(41533),d=e.i(83928),c=e.i(621285),u=e.i(616172),h=e.i(283653),p=e.i(647163);let m=e=>e.split(".").pop()?.toLowerCase()??"file",f=e=>e.split("/").pop()??e;e.s(["Attachments",0,function({text:e,from:a=null,className:n,onBubble:g=!1}){let x=(0,s.useMemo)(()=>(0,u.pathsIn)(e),[e]),{data:y}=(0,h.useServerRoute)(x.length?i.queryKey.workspaceFiles(x):null),k=(0,s.useMemo)(()=>y??[],[y]),_=(0,s.useMemo)(()=>k.filter(e=>"image"===(0,u.viewKindOf)(e.path)),[k]),v=(0,s.useMemo)(()=>{let e=0;return k.filter(t=>{let a=(0,d.faceOf)(t.path,t.bytes);return"text"===a||"page"===a&&(e+=1)<=o.FILE_THUMB.pages})},[k]),b=k.filter(e=>!_.includes(e)&&!v.includes(e)),M=new Set(k.map(e=>f(e.path))),w=x.filter(e=>!k.some(t=>t.path===e)&&!M.has(f(e)));if(!x.length||!y||!k.length&&!w.length)return null;let j=_.map(e=>e.path),O=_.slice(0,4),N=_.length-O.length,S=_.length+v.length<=2,E=S?"h-40 w-32":"h-26.25 w-21";return(0,t.jsxs)("div",{className:(0,p.cn)("flex min-w-0 flex-col gap-1.5",n),children:[(O.length>0||v.length>0)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-1.5",children:[v.map(e=>(0,t.jsxs)(c.FileLink,{from:a,path:e.path,title:`${e.path} — ${(0,p.formatBytes)(e.bytes)}`,className:(0,p.cn)("flex shrink-0 flex-col gap-1 rounded-xl outline-none transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",S?"w-32":"w-21"),children:[(0,t.jsx)(d.FileThumb,{path:e.path,bytes:e.bytes,className:(0,p.cn)("w-full rounded-xl ring-1 ring-foreground/5 ring-inset",E)}),(0,t.jsxs)("span",{className:"flex flex-col items-start px-0.5",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[11.5px] leading-4",children:f(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[m(e.path)," · ",(0,p.formatBytes)(e.bytes)]})]})]},e.path)),O.map((e,n)=>(0,t.jsxs)(c.FileLink,{from:a,path:e.path,group:j,title:`${e.path} — ${(0,p.formatBytes)(e.bytes)}`,className:(0,p.cn)("relative shrink-0 overflow-hidden rounded-xl bg-muted outline-none ring-1 ring-foreground/5 ring-inset transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",E),children:[(0,t.jsx)(l.default,{src:i.queryKey.file(e.path),alt:f(e.path),fill:!0,sizes:`${o.FILE_THUMB.imageWidth}px`,loading:"lazy",decoding:"async",className:"object-cover"}),N>0&&n===O.length-1&&(0,t.jsxs)("span",{className:"absolute inset-0 grid place-items-center bg-black/45 text-[14px] font-medium text-white",children:["+",N]})]},e.path))]}),b.map(e=>{let n=(0,d.fileIcon)(e.path);return(0,t.jsxs)(c.FileLink,{from:a,path:e.path,title:e.path,className:(0,p.cn)("flex w-fit max-w-full items-center gap-2.5 rounded-xl py-1.5 pr-3 pl-1.5 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",g?"bg-background/70 hover:bg-background":"bg-muted/70 hover:bg-muted"),children:[(0,t.jsx)("span",{className:(0,p.cn)("grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground",g?"bg-muted":"bg-background"),children:(0,t.jsx)(n,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col items-start",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[12.5px] leading-4.25",children:f(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[m(e.path)," · ",(0,p.formatBytes)(e.bytes)]})]})]},e.path)}),w.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.map(e=>(0,t.jsxs)("span",{title:`${e} — not on disk`,className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted/70 py-1 pr-2.5 pl-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(r,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate line-through",children:f(e)})]},e))})]})},"imagePathsIn",0,function(e){return(0,u.pathsIn)(e).filter(e=>"image"===(0,u.viewKindOf)(e))},"shortenPaths",0,function(e){return e.split(/(```[\s\S]*?```)/).map((e,t)=>t%2==1?e:e.replace(/`([^`\n]+)`/g,(e,t)=>{let a=t.trim();if(!a.includes("/"))return e;let[n]=(0,u.pathsIn)(a),r=n?.split("/").pop();return n&&r&&a.endsWith(r)?`\`${r}\``:e})).join("")}],807038)},222055,991322,852116,589128,e=>{"use strict";var t=e.i(843476),a=e.i(422411),n=e.i(518515),r=e.i(525335),l=e.i(689664),s=e.i(716327),i=e.i(482022),o=e.i(772382),d=e.i(60744),c=e.i(226091),u=e.i(91511),h=e.i(341123),p=e.i(815170),m=e.i(758925),f=e.i(218964),g=e.i(632781),x=e.i(96315),y=e.i(468590),k=e.i(928310),_=e.i(609374),v=e.i(730274),b=e.i(604139),M=e.i(438583),w=e.i(747925),j=e.i(657688),O=e.i(271645),N=e.i(798120),S=e.i(660302),E=e.i(818125),L=e.i(671428),z=e.i(633669),T=e.i(41533),A=e.i(213377),I=e.i(807038),C=e.i(456420);let R={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};R.node;let P=(0,C.default)(R);e.s(["McpMark",0,P],991322);let F={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};F.node;let $=(0,C.default)(F);e.s(["MemoryMark",0,$],852116);var U=e.i(431594);let D=e.i(856539).BookMarked;e.s(["SkillsMark",0,D],589128);var H=e.i(83928),K=e.i(621285),V=e.i(283653),q=e.i(647163);let B={[A.TOOL_NAMES.web_search]:function({tool:e,threadId:a,collapsed:n}){let r=ee(e),l=r.length?[]:ep(e.results);return(0,t.jsxs)(ei,{tool:e,threadId:a,collapsed:n,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep wrap-anywhere",children:["“",e.input,"”"]}),r.length>0&&(0,t.jsx)(z.SourceChips,{sources:r,className:"px-3 pb-2"}),l.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:l.map((e,a)=>(0,t.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,t.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,t.jsx)("span",{className:"truncate",children:e})]},`${a}-${e}`))})]})},[A.TOOL_NAMES.bash]:function({tool:e,threadId:a,collapsed:n}){let r=ep(e.results);return(0,t.jsx)(ei,{tool:e,threadId:a,collapsed:n,children:(0,t.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),e.input,r.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:r.join("\n")})]})})},[A.TOOL_NAMES.write_file]:function({tool:e,threadId:a,collapsed:n}){let r=e.path??e.input;return(0,t.jsxs)(ei,{tool:e,threadId:a,collapsed:n,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:e.input}),(0,t.jsxs)(K.FileLink,{path:r,from:a,label:`Open ${r}`,className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:[(0,t.jsx)(i.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(eh,{lines:ep(e.results),mono:!0})]})}},G=Object.values(A.STUDIO_TOOLS);function W(e){if(e.name!==A.TOOL_NAMES.tool_call)return null;let[t,a,...n]=e.input.split(" ");if(t!==T.STUDIO_SERVER)return null;let r=G.find(e=>e===a);return r?{name:r,words:n.join(" ")}:null}let J={[A.STUDIO_TOOLS.generate_image]:p.Image,[A.STUDIO_TOOLS.generate_video]:M.Video,[A.STUDIO_TOOLS.generate_speech]:a.AudioLines,[A.STUDIO_TOOLS.transcribe]:r.Captions},Y={[A.TOOL_NAMES.web_search]:u.Globe,[A.TOOL_NAMES.bash]:b.Terminal,[A.TOOL_NAMES.write_file]:d.FilePen,[A.TOOL_NAMES.memory_recall]:$,[A.TOOL_NAMES.memory_create]:$,[A.TOOL_NAMES.memory_remember]:$,[A.TOOL_NAMES.memory_describe]:$,[A.TOOL_NAMES.memory_forget]:$,[A.TOOL_NAMES.load_skill]:D,[A.TOOL_NAMES.tool_search]:P,[A.TOOL_NAMES.tool_call]:P,[A.TOOL_NAMES.thread_start]:v.Send,[A.TOOL_NAMES.thread_tell]:v.Send,[A.TOOL_NAMES.thread_answer]:v.Send,[A.TOOL_NAMES.thread_status]:f.ListChecks,[A.TOOL_NAMES.thread_cancel]:f.ListChecks,[A.TOOL_NAMES.thread_show]:f.ListChecks,[A.TOOL_NAMES.thread_seen]:f.ListChecks,[A.TOOL_NAMES.send_message]:y.MessageSquare,[A.TOOL_NAMES.look_at]:o.Eye,[A.TOOL_NAMES.make_deck]:_.Presentation,[A.TOOL_NAMES.describe_self]:h.IdCard,[A.TOOL_NAMES.sign_in_use]:m.KeyRound,[A.TOOL_NAMES.sign_in_keep]:m.KeyRound,[A.TOOL_NAMES.check_mail]:x.Mail,[A.TOOL_NAMES.end_call]:k.PhoneOff,[A.TOOL_NAMES.routine]:U.RoutineMark},Z=e=>Y[e]??w.Wrench,X=new Set(["cat","sed","head","tail","grep","rg","ls","find","wc","awk","jq"]),Q=e=>e.split("/").pop()??e;function ee(e){return ep(e.results).flatMap(e=>{let t=/https?:\/\/\S+/.exec(e)?.[0];if(!t)return[];let a=e.slice(0,e.indexOf(t)).replace(/[\s—-]+$/,"");return[{url:t,...a?{title:a}:{}}]})}function et(e){return(0,I.imagePathsIn)([e.path??"",e.input,...ep(e.results)].join("\n"))}function ea(e){let t=et(e)[0],a=W(e);if(a)return{icon:J[a.name]??w.Wrench,image:t,makes:a.name===A.STUDIO_TOOLS.generate_image};if(e.name===A.TOOL_NAMES.web_search)return{icon:u.Globe,pages:ee(e)};if(e.name===A.TOOL_NAMES.write_file)return{icon:d.FilePen,image:t,target:Q(e.path??e.input)};if(e.name!==A.TOOL_NAMES.bash)return{icon:Z(e.name),image:t};let r=e.input.replace(/^\s*cd\s+\S+\s*&&\s*/,"").trim(),[l=""]=r.split(/\s+/),s=/(?:^|[\s;&|(])playwright-cli((?:\s+-\S+)*)\s+([a-z-]+)/.exec(r);if(s){if("screenshot"===s[2])return{icon:n.Camera,image:t};let e=/https?:\/\/[^\s'"]+/.exec(r)?.[0];return{icon:u.Globe,host:e&&(0,q.hostOf)(e)||void 0,image:t}}return X.has(l)?{icon:c.FileText,image:t,target:e.path?Q(e.path):void 0}:{icon:b.Terminal,image:t,target:l||void 0}}function en({face:e}){if(e.pages?.length){let a=[...new Set(e.pages.flatMap(e=>(0,q.hostOf)(e.url)??[]))].slice(0,3);return(0,t.jsx)("span",{className:"flex shrink-0 items-center gap-1",children:a.map(e=>(0,t.jsx)(E.SiteIcon,{host:e},e))})}return e.host?(0,t.jsxs)("span",{className:"flex h-5 shrink-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11px] text-foreground/80",children:[(0,t.jsx)(E.SiteIcon,{host:e.host}),e.host]}):e.target&&!e.image?(0,t.jsx)("span",{className:"max-w-40 shrink truncate font-mono text-[10.5px] text-muted-foreground",children:e.target}):null}let er="size-36 rounded-xl";function el({tool:e,threadId:a,collapsed:n}){let r=W(e),[l]=et(e),s=void 0===e.results&&r?.name===A.STUDIO_TOOLS.generate_image;return(0,t.jsxs)(ei,{tool:e,threadId:a,collapsed:n,children:[r?.words&&(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep wrap-anywhere",children:["“",r.words,"”"]}),l?(0,t.jsx)(K.FileLink,{path:l,from:a,title:l,className:"mx-3 mb-1.5 block w-fit overflow-hidden rounded-xl outline-none ring-1 ring-foreground/5 transition-opacity ring-inset hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(H.FileThumb,{path:l,className:er})}):s?(0,t.jsx)(L.Skeleton,{className:(0,q.cn)("mx-3 mb-1.5",er)}):(0,t.jsx)(eh,{lines:ep(e.results)})]})}function es({tool:e,threadId:a,collapsed:n}){return(0,t.jsxs)(ei,{tool:e,threadId:a,collapsed:n,children:[(0,t.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep wrap-anywhere",children:e.input}),(0,t.jsx)(eh,{lines:ep(e.results)})]})}function ei({tool:e,threadId:a,collapsed:n=!1,children:r}){let i=void 0===e.results,o=ea(e),d=o.icon,[c,u]=(0,O.useState)(!n),h=a&&e.callId&&((e.results?.length??0)>0||e.more);return(0,t.jsxs)("div",{className:(0,q.cn)("@container w-full overflow-hidden rounded-xl transition-colors",c?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":c,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:i?(0,t.jsx)(g.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(d,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)(S.ShinyText,{text:e.note,speed:2.4,className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:e.note}),(0,t.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:e.input})]}):i?(0,t.jsx)(S.ShinyText,{text:e.input,speed:2.4,className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:e.input}),(0,t.jsx)(eo,{paths:et(e),waiting:i&&o.makes}),(0,t.jsx)(en,{face:o}),!i&&(0,t.jsx)(l.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(s.ChevronDown,{className:(0,q.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",c&&"rotate-180")})]}),c&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[r,h&&(0,t.jsx)(ec,{threadId:a,callId:e.callId})]})]})}function eo({paths:e,waiting:a}){let[n,r]=(0,O.useState)([]),l=e.filter(e=>!n.includes(e)).slice(0,ed);return l.length?(0,t.jsx)("span",{className:"flex shrink-0 items-center",children:l.map((e,a)=>(0,t.jsx)(j.default,{src:N.queryKey.file(e),alt:"",width:48,height:48,loading:"lazy",decoding:"async",onError:()=>r(t=>[...t,e]),className:(0,q.cn)("size-6 rounded-md bg-muted object-cover ring-2 ring-background",a>0&&"-ml-1.5")},e))}):a?(0,t.jsx)(L.Skeleton,{className:"size-6 shrink-0 rounded-md"}):null}let ed=3;function ec({threadId:e,callId:a}){let[n,r]=(0,O.useState)(!1),{data:l,isLoading:i}=(0,V.useServerRoute)(n?N.queryKey.toolResult(e,a):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(s.ChevronDown,{className:(0,q.cn)("size-3",n&&"rotate-180")}),n?"Less":"Everything"]}),n&&(i||!l?(0,t.jsx)(L.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[em(l).map((e,a)=>(0,t.jsx)(eu,{src:e},`${a}-${e.length}`)),ep(l).length>0&&(0,t.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:ep(l).join("\n")})]}))]})}function eu({src:e}){let[a,n]=(0,O.useState)(!1);return a?null:(0,t.jsx)("img",{src:e,alt:"",onError:()=>n(!0),className:"block w-full rounded-lg bg-muted object-contain"})}function eh({lines:e,mono:a}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,n)=>(0,t.jsx)("li",{className:(0,q.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",a&&"font-mono"),children:e},`${n}-${e}`))})}let ep=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],em=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let a=W(e.tool)?el:B[e.tool.name]??es;return(0,t.jsx)(a,{...e})},"StepTile",0,function({tool:e,onOpen:a}){let n=ea(e),[r,l]=(0,O.useState)(!1),s=n.icon;return(0,t.jsx)("button",{type:"button",onClick:a,title:e.note??e.input,"aria-label":e.note??e.input,className:"grid size-6 shrink-0 place-items-center overflow-hidden rounded-full bg-background text-muted-foreground outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",children:n.image&&!r?(0,t.jsx)(j.default,{src:N.queryKey.file(n.image),alt:"",width:48,height:48,loading:"lazy",decoding:"async",onError:()=>l(!0),className:"size-full object-cover"}):n.host?(0,t.jsx)(E.SiteIcon,{host:n.host,className:"size-3.5 rounded-full",fallback:(0,t.jsx)(s,{className:"size-3"})}):(0,t.jsx)(s,{className:"size-3"})})},"toolIcon",0,Z],222055)},431594,e=>{"use strict";var t=e.i(456420);let a={name:"repeat",size:24,node:[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]};a.node;let n=(0,t.default)(a);e.s(["RoutineMark",0,n],431594)},681789,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("7fda58d26d03381b1da3391ef9c794f80ad78d3a47",t.callServer,void 0,t.findSourceMapURL,"setSignInBotAction");e.s(["setSignInBotAction",0,a])},256604,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(467580),r=e.i(567334),l=e.i(877267);let s=240/276,i=new Map,o=new Set,d=null;e.s(["THURSDAY_SEED",0,"thursday","ThursdayMark",0,function({size:e=16,className:c}){let u="emoji"===(0,l.useFaceGlyphs)(),{cells:h,font:p}=function(e){let t=i.get(e);if(t)return t;let a=e*s,n=(e-a)/2,l=Math.max(2,Math.round(a/4)),o=a/l,d=.98*o,c=[];for(let e=0;e<l;e++)for(let t=0;t<l;t++){let s=3===l&&1!==e&&1!==t?.72:1,i=a/2+o*(t+.5-l/2)*s,u=a/2+o*(e+.5-l/2)*s,h=Math.hypot(i-a/2,u-a/2)/(a/2),p=977*l+e*l+t;!(h+(l>=5?((0,r.hash)(p,1)-.5)*.24:0)>.98)&&(l>=8&&(0,r.hash)(p,2)<.02+.24*h**3||c.push({seed:p,x:n+i,y:n+u+.36*d,r:h}))}let u={cells:c,font:d};return i.set(e,u),u}(e),[m,f]=(0,a.useState)(0),g=(0,a.useRef)(null),x=(0,n.useOnScreen)(g);return(0,a.useEffect)(()=>{if(x&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches){if(o.add(f),!d){let e=Date.now();d=setInterval(()=>{let t=Date.now()-e;for(let e of o)e(t)},155)}return()=>{o.delete(f),0===o.size&&d&&(clearInterval(d),d=null)}}},[x]),(0,t.jsx)("svg",{ref:g,viewBox:`0 0 ${e} ${e}`,width:e,height:e,className:c,fill:"currentColor","aria-hidden":!0,children:h.map(e=>(0,t.jsx)("text",{x:e.x,y:e.y,textAnchor:"middle",fontFamily:u?'"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif':"ui-monospace, SFMono-Regular, Menlo, monospace",fontWeight:u?void 0:700,fontSize:p,children:function(e,t,a){let n=Math.floor((t+620*(0,r.hash)(e.seed,11)*3)/620);if(a){let t=Math.floor((0,r.hash)(e.seed,17)*r.EMOJI_POOL.length);return r.EMOJI_POOL[(t+9*n)%r.EMOJI_POOL.length]}let l=Math.round(5+4*Math.max(0,1-e.r**2)**.6),s=r.RAMP[Math.min(r.RAMP.length-1,l)];return s[Math.floor((0,r.hash)(e.seed,n)*s.length)]??" "}(e,m,u)},e.seed))})}])},661504,e=>{"use strict";var t=e.i(271645),a=e.i(699018),n=e.i(677309),r=e.i(271235),l=e.i(802239),s=e.i(646192);let i=Promise.resolve(),o=(0,r.withMiddleware)(a.u,e=>(a,r,o)=>{let d,c=(0,t.useRef)(!1),{cache:u,initialSize:h=1,revalidateAll:p=!1,persistSize:m=!1,revalidateFirstPage:f=!0,revalidateOnMount:g=!1,parallel:x=!1}=o,[,,,y]=n.a.get(n.o);try{(d=(0,n.s)(a?a(0,null):null)[0])&&(d=s.INFINITE_PREFIX+d)}catch(e){}let[k,_,v]=(0,n.c)(u,d),b=(0,t.useCallback)(()=>(0,n.i)(k()._l)?h:k()._l,[u,d,h]);(0,l.useSyncExternalStore)((0,t.useCallback)(e=>d?v(d,()=>{e()}):()=>{},[u,d]),b,b);let M=(0,t.useCallback)(()=>{let e=k()._l;return(0,n.i)(e)?h:e},[d,h]),w=(0,t.useRef)(M());(0,n.u)(()=>{if(!c.current){c.current=!0;return}d&&_({_l:m?w.current:M()})},[d,u]);let j=g&&!c.current,O=e(d,async e=>{let t=k()._i,l=k()._r,s=n.a.get(u),i=s[8],d=()=>s[8]!==i;_({_r:n.U});let c=[],h=M(),[m]=(0,n.c)(u,e),g=m().data,v=[],b=null;for(let e=0;e<h;++e){let[s,i]=(0,n.s)(a(e,x?null:b));if(!s)break;let[h,m]=(0,n.c)(u,s),k=h().data,_=p||t||(0,n.i)(k)||f&&!e&&!(0,n.i)(g)||j||g&&!(0,n.i)(g[e])&&!o.compare(g[e],k);if(r&&("function"==typeof l?l(k,i):_)){let t=async()=>{if(s in y){let e=y[s];delete y[s],k=await e}else k=await r(i);d()||m({data:k,_k:i}),c[e]=k};x?v.push(t):await t()}else c[e]=k;x||(b=k)}return x&&await Promise.all(v.map(e=>e())),d()||_({_i:n.U}),c},o),N=(0,t.useCallback)(function(e,t){let a="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==a.revalidate;return d?(r&&((0,n.i)(e)?_({_i:!0,_r:a.revalidate}):_({_i:!1,_r:a.revalidate})),arguments.length?O.mutate(e,{...a,revalidate:r}):O.mutate()):i},[d,u]),S=(0,t.useCallback)(e=>{let t;if(!d)return i;let[,r]=(0,n.c)(u,d);if((0,n.e)(e)?t=e(M()):"number"==typeof e&&(t=e),"number"!=typeof t)return i;r({_l:t}),w.current=t;let l=[],[s]=(0,n.c)(u,d),o=null;for(let e=0;e<t;++e){let[t]=(0,n.s)(a(e,o)),[r]=(0,n.c)(u,t),i=t?r().data:n.U;if((0,n.i)(i))return N(s().data);l.push(i),o=i}return N(l)},[d,u,N,M]);return{size:M(),setSize:S,mutate:N,get data(){return O.data},get error(){return O.error},get isValidating(){return O.isValidating},get isLoading(){return O.isLoading}}});var d=e.i(41533),c=e.i(283653);e.s(["useServerPages",0,function(e){let a=e.size??d.PAGE_SIZE,{key:n}=e,{data:r,error:l,isLoading:s,isValidating:i,setSize:u,mutate:h}=o((e,t)=>(0,c.resolveKey)(n(e,t)),c.fetchRoute,{...c.READ_DEFAULTS,revalidateFirstPage:!1,...e.swr}),p=r??[],m=(0,t.useMemo)(()=>(r??[]).flat(),[r]),f=p.at(-1),g=void 0!==f&&f.length>=a,x=(0,t.useRef)(0),y=i&&p.length>0&&x.current>p.length,k=(0,t.useRef)({isValidating:i,setSize:u,pages:p.length});(0,t.useEffect)(()=>{k.current={isValidating:i,setSize:u,pages:p.length}});let _=(0,t.useCallback)(()=>h(),[h]),v=(0,c.resolveKey)(n(0,null)),b="string"==typeof v?v:v?.url;(0,t.useEffect)(()=>{if(b)return(0,c.registerPagedReader)({url:b,refresh:_})},[b,_]);let M=function(e,a={}){let{enabled:n=!0,margin:r="600px",revision:l}=a,s=(0,t.useRef)(e);s.current=e;let i=(0,t.useRef)(null),o=(0,t.useRef)(null),d=(0,t.useCallback)(e=>{i.current=e},[]);return(0,t.useEffect)(()=>{o.current?.disconnect();let e=i.current;if(e&&n)return o.current=new IntersectionObserver(([e])=>{e.isIntersecting&&s.current()},{root:function(e){let t=e.parentElement;for(;t;){let{overflowY:e}=getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}(e),rootMargin:r}),o.current.observe(e),()=>o.current?.disconnect()},[n,r,l]),d}(()=>{let e=k.current;e.isValidating||(x.current=e.pages+1,e.setSize(e.pages+1))},{enabled:g,revision:`${p.length}:${i}`});return{items:m,isLoading:s,isLoadingMore:y,error:l,hasMore:g,sentinelRef:M,refresh:_}}],661504)},96892,319841,e=>{"use strict";var t=e.i(456420);let a={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};a.node;let n=(0,t.default)(a);e.s(["ArrowUp",0,n],96892);var r=e.i(271645);let l=["ctrl","alt","meta"],s=/^(Control|Alt|Shift|Meta|OS)/,i=/^(input|textarea|select)$/i,o=e=>!!e&&!!(i.test(e.tagName)||e.isContentEditable||e.closest?.("[data-hotkey-capture]")),d=e=>{let t="nativeEvent"in e?e.nativeEvent:e;return t.isComposing||229===t.keyCode},c=[],u=e=>{if("Escape"!==e.key||e.defaultPrevented||d(e))return;let t=c.at(-1);t&&(e.preventDefault(),t.current())};function h(e){let{code:t,ctrlKey:a,altKey:n,shiftKey:r,metaKey:l}=e;if(!t||s.test(t)||!a&&!n&&!l)return null;let i=[];return a&&i.push("ctrl"),n&&i.push("alt"),r&&i.push("shift"),l&&i.push("meta"),[...i,t].join("+")}let p={ctrl:["Ctrl","⌃"],alt:["Alt","⌥"],shift:["Shift","⇧"],meta:["Meta","⌘"]};function m(e,t=!1){let a=e.split("+"),n=a.at(-1)??"",r=a.slice(0,-1).map(e=>p[e]?.[+!!t]??e),l=n.replace(/^(Key|Digit|Numpad)/,"").replace(/([a-z])([A-Z])/g,"$1 $2")||n;return t?[...r,l].join(""):[...r,l].join(" + ")}e.s(["HOTKEY_CAPTURE",0,{"data-hotkey-capture":""},"capturesKeys",0,o,"comboOf",0,h,"composing",0,d,"isCombo",0,e=>{let t=e.split("+"),a=t.at(-1);return!!(a&&!s.test(a)&&t.slice(0,-1).some(e=>l.includes(e)))},"typed",0,(e,t)=>e.key===t&&!e.metaKey&&(e.altKey||!e.ctrlKey),"useCommandLabel",0,function(e,t=!1){let[a,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>n(/mac/i.test(navigator.userAgent)),[]),m([...(a?["shift","meta"]:["ctrl","shift"]).filter(e=>t||"shift"!==e),e].join("+"),a)},"useEscape",0,function(e,t){let a=(0,r.useRef)(t);a.current=t,(0,r.useEffect)(()=>{if(e)return c.push(a),1===c.length&&window.addEventListener("keydown",u),()=>{c.splice(c.indexOf(a),1),c.length||window.removeEventListener("keydown",u)}},[e])},"useHotkey",0,function({enabled:e,combo:t,onPress:a}){let n=(0,r.useRef)(a);n.current=a,(0,r.useEffect)(()=>{if(!e||!t)return;let a=e=>{e.repeat||o(e.target)||h(e)===t&&(e.preventDefault(),n.current())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e,t])},"useHotkeyLabel",0,function(e){let[t,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>a(/mac/i.test(navigator.userAgent)),[]),e?m(e,t):null},"windowKey",0,e=>!e.defaultPrevented&&!d(e)&&!o(e.target)&&!e.target?.closest?.('[role="dialog"]')],319841)},856539,e=>{"use strict";var t=e.i(456420);let a={name:"book-bookmark",size:24,node:[["path",{d:"M10 2v7.751a.25.25 0 00.407.195l2.28-1.834a.5.5 0 01.627 0l2.28 1.834A.25.25 0 0016 9.751V2",key:"x9x4jl"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 016.5 2H19a1 1 0 011 1v18a1 1 0 01-1 1H6.5a1 1 0 010-5H20",key:"1889un"}]],aliases:["book-marked"]};a.node;let n=(0,t.default)(a);e.s(["BookMarked",0,n],856539)},518515,772382,60744,341123,218964,468590,928310,730274,604139,e=>{"use strict";var t=e.i(456420);let a={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};a.node;let n=(0,t.default)(a);e.s(["Camera",0,n],518515);let r={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};r.node;let l=(0,t.default)(r);e.s(["Eye",0,l],772382);let s={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};s.node;let i=(0,t.default)(s);e.s(["FilePen",0,i],60744);let o={name:"id-card",size:24,node:[["path",{d:"M13 19a4 4 0 00-8 0",key:"cugzd5"}],["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]]};o.node;let d=(0,t.default)(o);e.s(["IdCard",0,d],341123);let c={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};c.node;let u=(0,t.default)(c);e.s(["ListChecks",0,u],218964);let h={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};h.node;let p=(0,t.default)(h);e.s(["MessageSquare",0,p],468590);let m={name:"phone-off",size:24,node:[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]};m.node;let f=(0,t.default)(m);e.s(["PhoneOff",0,f],928310);let g={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};g.node;let x=(0,t.default)(g);e.s(["Send",0,x],730274);let y={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};y.node;let k=(0,t.default)(y);e.s(["Terminal",0,k],604139)},24071,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronLeft",0,n],24071)},226091,e=>{"use strict";var t=e.i(456420);let a={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};a.node;let n=(0,t.default)(a);e.s(["FileText",0,n],226091)},829600,e=>{"use strict";var t=e.i(456420);let a={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};a.node;let n=(0,t.default)(a);e.s(["File",0,n],829600)},91511,e=>{"use strict";var t=e.i(456420);let a={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};a.node;let n=(0,t.default)(a);e.s(["Globe",0,n],91511)},815170,e=>{"use strict";var t=e.i(456420);let a={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};a.node;let n=(0,t.default)(a);e.s(["Image",0,n],815170)},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])},438583,e=>{"use strict";var t=e.i(456420);let a={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};a.node;let n=(0,t.default)(a);e.s(["Video",0,n],438583)},747925,e=>{"use strict";var t=e.i(456420);let a={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};a.node;let n=(0,t.default)(a);e.s(["Wrench",0,n],747925)}]);
|
|
@@ -1 +0,0 @@
|
|
|
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)("7fe8e372b43142ad52dbeb3c16c431664c588a67a0",C.callServer,void 0,C.findSourceMapURL,"compactThreadAction");var S=e.i(807038),B=e.i(635963),R=e.i(256604),$=e.i(621285),O=e.i(245629),I=e.i(609856),P=e.i(553429),F=e.i(978411),L=e.i(222055);function A({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 q({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{thread:e}),(0,t.jsx)(E,{thread:e}),(0,t.jsx)(Y,{thread:e})]})}function H({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/70 tabular-nums",children:(0,k.formatCount)(n)}):null}function E({thread:e}){let{contextTokens:n,contextBudget:a}=e,[s,o]=(0,p.useState)(!1),[r,i]=(0,I.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 D={working:"text-muted-foreground",waiting:k.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"},U={working:"working",waiting:"waiting",done:"done",cancelled:"stopped"};function Y({thread:e}){let n="done"===e.status&&e.seen?"text-muted-foreground":D[e.status];return"working"===e.status?(0,t.jsx)(_.ShinyText,{text:U.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:U[e.status]})}function V({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=G(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)(K,"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:Q(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 K="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",Q=(e,t)=>e.room.participants.some(e=>e.bot===t&&("cancelled"===e.state||"paused"===e.state));function G(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":er(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)(em,{side:s?"start":"end",name:ei(e.speaker),mark:(0,t.jsx)(ec,{bot:e.speaker}),children:e.entries.map(i=>{if("work"===i.kind)return s?(0,t.jsx)(J,{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&&!er(l)&&l.name!==r?l:null;return l&&(r=l.name),(0,t.jsx)(ex,{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?G(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?en(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)(ee,{words:b?en(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)(et,{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)(L.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:ew(e).map(e=>"tools"===e.kind?e.lines.map(e=>e.tool&&(0,t.jsx)(L.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)(ej,{lines:e.lines})},e.key):e.lines.map(e=>(0,t.jsx)(eg,{line:e,inset:!0},e.id)))})]})}function J({lines:e,trailing:n,bot:a,thread:s}){let o=n?G(s,a.name):null,r=e.some(e=>e.tool&&void 0===e.tool.results);return(0,t.jsxs)(t.Fragment,{children:[ew(e).map(e=>"tools"===e.kind?(0,t.jsx)(Z,{lines:e.lines,threadId:s.id},e.key):"stops"===e.kind?(0,t.jsx)(ej,{lines:e.lines},e.key):e.lines.map(e=>(0,t.jsx)(eg,{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 Z({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)(L.BotTool,{tool:e.tool,threadId:n,collapsed:!0},e.id))})}function ee({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 et({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 en(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 ea({thread:e}){let n="user"===e.startedBy?eo:es;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(el,{from:n,to:e.bot}),(0,t.jsx)(em,{side:"end",name:ei(n),mark:(0,t.jsx)(ec,{bot:n}),children:(0,t.jsx)(eu,{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 es={name:P.ROOM_THURSDAY},eo={name:P.ROOM_USER},er=e=>e.name===es.name||e.name===eo.name,ei=e=>e.name===eo.name?"You":e.name;function el({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)(ed,{bot:e}),(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70",children:e.name===eo.name?"asked":"invited"}),(0,t.jsx)(ed,{bot:n})]})})}function ed({bot:e}){return e.name===eo.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===es.name?(0,t.jsx)(R.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 ec({bot:e}){return e.name===eo.name?null:e.name===es.name?(0,t.jsx)(R.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 eu({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 em({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 ex({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)(eh,{}),a?(0,t.jsx)(ef,{bot:a,bubble:i,children:l}):(0,t.jsx)(eb,{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)(eu,{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)(ek,{text:e.text})})]})}function eb({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 ep({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 ef({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)(ep,{bot:e,bubble:n}),(0,t.jsx)(eb,{bubble:n,className:"contents leading-snug [&>p:first-child]:inline",children:a})]})}function eh(){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 eg({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)(eb,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:e.text})]}):(0,t.jsx)(eb,{className:(0,k.cn)("text-[12.5px] text-muted-foreground",n?"px-2.5 py-1":"px-1"),children:e.text})}function ek({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 ej({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:ev(e[0].text)}),e.length>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",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/70 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 ev=e=>e.split(" (")[0].replace(/\.$/,"");function ew(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||ev(a.lines[0].text)===ev(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)&&G(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)($.FileViewer,{children:[a&&(0,t.jsx)(V,{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)(ea,{thread:e}),x.map(n=>"invite"===n.kind?(0,t.jsx)(el,{from:n.from,to:n.to},n.key):(0,t.jsx)(W,{turn:n,thread:e,self:u},n.key))]})]})},"FoldButton",0,A,"TAB",0,K,"THURSDAY",0,es,"ThreadFacts",0,q,"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||Q(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)(q,{thread:e}),r,(0,t.jsx)(A,{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)(q,{thread:e}),r,(0,t.jsx)(A,{onClick:a})]})},"YOU",0,eo,"leadOf",0,ev,"stepOf",0,en],351866)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),s=e.i(225913);e.i(271645);var i=e.i(647163);function n({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}e.i(652225);let l=(0,s.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:s="vertical",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":s,className:(0,i.cn)(l({orientation:s}),e),...n})},"FieldContent",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,i.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...s})},"FieldLabel",0,function({className:e,...s}){return(0,t.jsx)(n,{"data-slot":"field-label",className:(0,i.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...s})}],986530)},833959,e=>{"use strict";var t=e.i(843476),s=e.i(437750),i=e.i(856539),n=e.i(24071),l=e.i(867927),r=e.i(829600),a=e.i(226091),o=e.i(726067),d=e.i(456420);let c={name:"frame",size:24,node:[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]]};c.node;let u=(0,d.default)(c);var m=e.i(91511),x=e.i(77071),f=e.i(566595);let h={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};h.node;let p=(0,d.default)(h);var g=e.i(759659);let v={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};v.node;let b=(0,d.default)(v);var k=e.i(271645),j=e.i(798120),y=e.i(167881),w=e.i(986530),N=e.i(23750),S=e.i(683408),C=e.i(917162),L=e.i(671428),z=e.i(319036),F=e.i(127341),M=e.i(184762),R=e.i(41533),T=e.i(895836),$=e.i(95187);let D=(0,$.createServerReference)("7f9c1ccb5f0167d50068f333fe81e30d40ca28400a",$.callServer,void 0,$.findSourceMapURL,"createSkillAction"),A=(0,$.createServerReference)("7f5038060b22c44e14ecd8bbd559e82fc273937344",$.callServer,void 0,$.findSourceMapURL,"deleteSkillAction"),B=(0,$.createServerReference)("7f8075f36d932a8b71d0ab7b738cf35cedd6ffa73a",$.callServer,void 0,$.findSourceMapURL,"setSkillDisabledAction"),q=(0,$.createServerReference)("7f4d556e93220ee9757636285716a370b169d4fad2",$.callServer,void 0,$.findSourceMapURL,"uploadSkillAction"),I=(0,$.createServerReference)("7ffa71f3aef2f5c2aa55a28bc887480ee7033be867",$.callServer,void 0,$.findSourceMapURL,"writeSkillFileAction");var K=e.i(362201);K.union([K.enum(["custom","default"]),K.templateLiteral(["kit:",K.string().regex(/^[\p{L}\p{N}_-]+$/u)]),K.templateLiteral(["own:",K.string().regex(/^[\p{L}\p{N}_-]+$/u)])]);let E=e=>"custom"===e||e.startsWith("own:"),U=K.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long").regex(/^[a-z0-9][a-z0-9_-]*$/i,"Use letters, numbers, dashes and underscores only"),O=K.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long");K.object({name:O,description:K.string().trim().min(1,"Description is required"),metadata:K.record(K.string(),K.unknown()).optional(),disabled:K.boolean().optional(),platforms:K.array(K.string()).optional()}).extend({name:U,content:K.string().trim().min(1,"Content is required")});var P=e.i(609856),W=e.i(283653),_=e.i(647163);let H={artifact:u,browser:m.Globe,computer:s.AppWindow,"find-skills":f.Search,"skill-creator":p};function V({skill:e}){let[s,n]=(0,P.useServerAction)(A,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),[r]=(0,P.useServerAction)(B,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),a=async()=>{await C.notify.confirm({title:`Delete ${e.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&s(e.source,e.dir)},o="default"===e.source&&H[e.dir]||i.BookMarked;return(0,t.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{var s;return s=e,C.notify.component({className:"sm:max-w-4xl",renderer:({guard:e})=>(0,t.jsx)(G,{skill:s,guard:e})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:(0,_.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",e.disabled&&"opacity-45"),children:(0,t.jsx)(o,{className:"size-4"})}),(0,t.jsxs)("span",{className:(0,_.cn)("min-w-0 flex-1 space-y-0.5",e.disabled&&"opacity-45"),children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description.trim().split(/(?<=[.。])\s|\n/)[0].trim()})]}),(0,t.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,t.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,t.jsx)(z.Switch,{checked:!e.disabled,onCheckedChange:t=>r(e.source,e.dir,!t),"aria-label":`${e.name} on or off`,className:"shrink-0"}),E(e.source)?(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost",loading:n,onClick:a,"aria-label":`Delete ${e.name}`,className:"shrink-0 text-muted-foreground",children:(0,t.jsx)(g.Trash2,{})}):(0,t.jsx)("span",{className:"size-7 shrink-0"})]})]})}function G({skill:e,guard:s}){let[i,l]=(0,k.useState)(""),[r,a]=(0,k.useState)("SKILL.md"),o=(0,k.useRef)(!1);(0,k.useEffect)(()=>s(()=>o.current),[s]);let d=async e=>{let t=i?`${i}/${e.name}`:e.name;"dir"===e.kind?l(t):t===r||(!o.current||await C.notify.confirm({title:"Discard your changes?",description:`What you wrote in ${r?.split("/").pop()} is not saved.`,okText:"Discard",destructive:!0}))&&(o.current=!1,a(t))};return(0,t.jsx)(T.SettingDialogContent,{title:e.name,description:(0,t.jsx)(Y,{skill:e,path:r??i}),children:(0,t.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,t.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[i&&(0,t.jsxs)("button",{type:"button",onClick:()=>l(i.split("/").slice(0,-1).join("/")),className:"mx-1 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/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:i.split("/").pop()})]}),(0,t.jsx)(J,{source:e.source,dir:e.dir,path:i,current:r,onPick:d})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r?(0,t.jsx)(X,{source:e.source,dir:e.dir,path:r,editable:E(e.source),onUnsaved:e=>{o.current=e}},r):(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function Y({skill:e,path:s}){if(!e)return(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let i=[e.name,...s.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:i.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,_.cn)("truncate",s===i.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}function Z({icon:e,label:s,active:i,hasChildren:n,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,_.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",i?T.PICKED_ROW:"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:e}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s}),n&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function J({source:e,dir:s,path:i,current:n,onPick:l}){let{data:d,isLoading:c,error:u}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i));return u?(0,t.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:u.message}):c||!d?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)(L.Skeleton,{className:"h-5 w-full"}),(0,t.jsx)(L.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==d.kind?null:(0,t.jsxs)(t.Fragment,{children:[d.entries.map(e=>(0,t.jsx)(Z,{icon:"dir"===e.kind?(0,t.jsx)(o.Folder,{}):e.name.endsWith(".md")?(0,t.jsx)(a.FileText,{}):(0,t.jsx)(r.File,{}),label:e.name,hasChildren:"dir"===e.kind,active:(i?`${i}/${e.name}`:e.name)===n,onClick:()=>l(e)},e.name)),0===d.entries.length&&(0,t.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function Q({content:e,description:s}){let i=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e),n=s?.trim(),l=i?e.slice(i[0].length):e;return(0,t.jsxs)("div",{className:"min-w-0",children:[n&&(0,t.jsx)("p",{className:"border-b border-border/60 px-5 py-3 text-[13px] leading-relaxed text-muted-foreground",children:n}),(0,t.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,t.jsx)(S.Markdown,{children:l})})]})}function X({source:e,dir:s,path:i,editable:n,onUnsaved:l}){let[r,a]=(0,k.useState)(null),{data:o,isLoading:d,error:c}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i)),u=null!==r&&(o?.kind!=="file"||r!==o.content);(0,k.useEffect)(()=>l?.(u),[u,l]);let[m,x]=(0,P.useServerAction)(I,{okMessage:"Saved",onOk:()=>{a(null),(0,W.revalidate)(j.queryKey.skills)}});if(c)return(0,t.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:c.message});if(d||!o)return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(L.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(L.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(L.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==o.kind)return null;let f=i.split("/").pop()??"";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,t.jsx)("span",{className:"truncate",children:f}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("span",{children:(0,_.formatBytes)(o.size)}),n&&null!==o.content&&null===r&&(0,t.jsxs)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(o.content??""),children:[(0,t.jsx)(p,{}),"Edit"]}),null!==r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(null),children:"Cancel"}),(0,t.jsx)(y.Button,{size:"xs",className:"font-mono",loading:x,disabled:r===o.content,onClick:()=>m(e,s,i,r),children:"Save"})]})]})]}),null!==r?(0,t.jsx)(M.Textarea,{value:r,onChange:e=>a(e.target.value),spellCheck:!1,"aria-label":`${f} contents`,className:"min-h-120 resize-none rounded-none border-0 font-mono text-[13px] leading-relaxed shadow-none focus-visible:ring-0"}):null===o.content?(0,t.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:o.size>R.SKILL_FILES.inlineBytes?"Too long to show here — a bot still reads it from disk.":"Not a text file — a bot can still read it from disk."}):f.toLowerCase().endsWith(".md")?(0,t.jsx)(Q,{content:o.content,description:o.description}):(0,t.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:o.content})]})}function ee(){return C.notify.component({className:"sm:max-w-lg",renderer:({close:e,guard:s})=>(0,t.jsx)(et,{onDone:e,guard:s})})}function et({onDone:e,guard:s}){let[i,n]=(0,k.useState)("write"),[l,r]=(0,k.useState)(""),[a,o]=(0,k.useState)(""),[d,c]=(0,k.useState)(""),[u,m]=(0,k.useState)(null),[f,h]=(0,k.useState)(!1),p=(0,k.useRef)(null),g=(0,k.useRef)(!1);g.current=!!(l.trim()||a.trim()||d.trim()||u),(0,k.useEffect)(()=>s(()=>g.current),[s]);let v={errorMessage:!1,onOk:()=>{(0,W.revalidate)(j.queryKey.skills),e()}},[S,C,,L]=(0,P.useServerAction)(D,v),[z,$,,A]=(0,P.useServerAction)(q,v),B=C||$,I="write"===i?L:A,K=null!==u&&u.size>R.SKILL_FILES.uploadBytes,E=Math.round(R.SKILL_FILES.uploadBytes/1024/1024),U=!B&&("write"===i?l.trim()&&a.trim()&&d.trim():null!==u&&!K),O=async()=>{if(!U)return;if("write"===i)return void S({name:l.trim(),description:a.trim(),content:d});if(!u)return;let e=new FormData;e.append("file",u),z(e)},H=e=>{let t=e?.[0]??null;t&&m(t)};return(0,t.jsxs)(T.SettingDialogContent,{title:"New skill",description:"Instructions a bot reads when a job calls for them.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(y.Button,{disabled:!U,loading:B,onClick:O,children:[!B&&("write"===i?(0,t.jsx)(x.Plus,{}):(0,t.jsx)(b,{})),"write"===i?"Create":"Upload"]})]}),children:[(0,t.jsxs)(F.Tabs,{value:i,onValueChange:e=>n(e),children:[(0,t.jsxs)(F.TabsList,{className:"w-full",children:[(0,t.jsx)(F.TabsTrigger,{value:"write",children:"Write"}),(0,t.jsx)(F.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,t.jsxs)(F.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,t.jsxs)(w.FieldContent,{children:[(0,t.jsx)(N.Input,{id:"skill-name",value:l,onChange:e=>r(e.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[R.PATHS.skills.custom,"/",l.trim()||"…","/SKILL.md"]})]})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,t.jsx)(w.FieldContent,{children:(0,t.jsx)(N.Input,{id:"skill-description",value:a,onChange:e=>o(e.target.value),placeholder:"What it does, then when to use it — a bot reads this to decide"})})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,t.jsx)(M.Textarea,{id:"skill-content",value:d,onChange:e=>c(e.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,t.jsxs)(F.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>p.current?.click(),onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),H(e.dataTransfer.files)},className:(0,_.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",f?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,t.jsx)(b,{className:"size-5 text-muted-foreground"}),u?(0,t.jsxs)("span",{className:"text-sm",children:[u.name,(0,t.jsxs)("span",{className:(0,_.cn)("ml-2 font-mono text-[11px]",K?"text-destructive":"text-muted-foreground"),children:[(0,_.formatBytes)(u.size),K&&` \xb7 over ${E} MB`]})]}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,t.jsx)("input",{ref:p,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:e=>H(e.target.files)}),(0,t.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,t.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,t.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]}),(0,t.jsxs)("p",{children:["Up to ",E," MB."]})]})]})]}),I&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:I})]})}e.s(["SkillsSetting",0,function(){let[e,s]=(0,k.useState)(""),{data:i,isLoading:n,error:l}=(0,W.useServerRoute)(j.queryKey.skills),r=i??[];if(n)return(0,t.jsx)(T.SettingSkeleton,{rows:4});if(l)return(0,t.jsx)(T.SettingError,{message:l.message});let a=e.trim().toLowerCase(),o=r.filter(e=>!a||`${e.name} ${e.description}`.toLowerCase().includes(a)),d=r.filter(e=>!e.disabled).length,c=r.filter(e=>!e.disabled&&("default"===e.source||"custom"===e.source)).length,u=new Map;for(let e of o)e.bot&&u.set(e.bot,[...u.get(e.bot)??[],e]);return(0,t.jsxs)(T.SettingScreen,{footer:(0,t.jsxs)(T.SettingRailNote,{children:[r.filter(e=>!E(e.source)).length," ","shipped ·"," ",r.filter(e=>E(e.source)).length," ","installed"]}),children:[(0,t.jsx)(T.SettingToolbar,{count:`${d} on \xb7 ${r.length-d} off`,children:(0,t.jsx)(T.SettingFilter,{value:e,onChange:s,placeholder:"Filter skills"})}),(0,t.jsx)(T.SettingGroup,{label:"Custom",hint:"yours — added here · a Default skill of the same name wins",children:(0,t.jsx)(T.SettingItems,{addRow:{label:"Add skill",onClick:ee},children:o.filter(e=>"custom"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`custom/${e.dir}`))})}),[...u].map(([e,s])=>(0,t.jsx)(T.SettingGroup,{label:`${e}'s own`,hint:`only ${e} reads these \xb7 what it found or wrote can be edited or deleted`,children:(0,t.jsx)(T.SettingItems,{children:s.map(e=>(0,t.jsx)(V,{skill:e},`${e.source}/${e.dir}`))})},e)),(0,t.jsx)(T.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,t.jsx)(T.SettingItems,{children:o.filter(e=>"default"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`default/${e.dir}`))})}),c>R.PROMPT_CROWDED.skills&&(0,t.jsxs)(T.SettingNote,{children:[c," skills are on for every bot. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}],833959)},437750,e=>{"use strict";var t=e.i(456420);let s={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};s.node;let i=(0,t.default)(s);e.s(["AppWindow",0,i],437750)},726067,e=>{"use strict";var t=e.i(456420);let s={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"}]]};s.node;let i=(0,t.default)(s);e.s(["Folder",0,i],726067)},759659,e=>{"use strict";var t=e.i(456420);let s={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"]};s.node;let i=(0,t.default)(s);e.s(["Trash2",0,i],759659)}]);
|