thursday-agent 0.17.0 → 0.17.2
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/app-path-routes-manifest.json +2 -0
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +12 -0
- 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.js.nft.json +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/artifact/route.js +9 -8
- package/.next/server/app/api/artifact/route.js.nft.json +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 -7
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js +8 -7
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js +4 -4
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js +3 -3
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js +4 -3
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/automatic/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/llm-model/automatic/route/build-manifest.json +12 -0
- package/.next/server/app/api/llm-model/automatic/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/llm-model/automatic/route.js +17 -0
- package/.next/server/app/api/llm-model/automatic/route.js.map +5 -0
- package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -0
- package/.next/server/app/api/llm-model/automatic/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js +14 -13
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +17 -16
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js +10 -10
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js +9 -8
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +9 -8
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/end/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/thursday/call/end/route/build-manifest.json +12 -0
- package/.next/server/app/api/thursday/call/end/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/thursday/call/end/route.js +17 -0
- package/.next/server/app/api/thursday/call/end/route.js.map +5 -0
- package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -0
- package/.next/server/app/api/thursday/call/end/route_client-reference-manifest.js +3 -0
- 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 +16 -15
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +13 -12
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js +5 -5
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js +5 -5
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +3 -3
- package/.next/server/app/artifact/[...path]/page.js +2 -2
- 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.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +60 -60
- package/.next/server/app/page.js +8 -8
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +2 -0
- package/.next/server/chunks/{[externals]__178rv3v._.js → [externals]__12stas-._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00qyw01._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1ignh6-._.js → [root-of-the-server]__01k3vi3._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__01ypm_z._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__021dkui._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__03vunn6._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__03xamry._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__05dp5tr._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__208vmyf._.js → [root-of-the-server]__061o2_x._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__09gdscj._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__0bqveex._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0eivkvk._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0f7m79q._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0g38-aj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0h656y-._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0hkxwim._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hm3tiq._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0hzdqnv._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0liwkmx._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0ljizgj._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mgyt8p._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0nmust6._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0p80i1n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0qzho69._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0svzjwa._.js +3 -3
- package/.next/server/chunks/{[root-of-the-server]__0b36yfw._.js → [root-of-the-server]__0ts7ai0._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1-18_pz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-rmal0._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1_h4hf9._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ckt1yj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cu5f3z._.js +5 -0
- package/.next/server/chunks/[root-of-the-server]__1hviq62._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__12m24xl._.js → [root-of-the-server]__1k2qs1m._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1kmnkbk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1p47fbb._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1pugoq0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1t02-1p._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1t0jj1j._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1vlxv19._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1zn039k._.js +1 -1
- package/.next/server/chunks/_05gl-xy._.js +5 -5
- package/.next/server/chunks/_06hnfi8._.js +8 -0
- package/.next/server/chunks/_06u9yo-._.js +1 -1
- package/.next/server/chunks/_07nxi75._.js +25 -21
- package/.next/server/chunks/_08354bn._.js +25 -21
- package/.next/server/chunks/_08btiir._.js +3 -3
- package/.next/server/chunks/_0c49lmw._.js +5 -0
- package/.next/server/chunks/_0ey0s6v._.js +3 -0
- package/.next/server/chunks/_0hgvg55._.js +5 -0
- package/.next/server/chunks/_0j0-gq6._.js +2 -2
- package/.next/server/chunks/_0nn99o2._.js +1 -1
- package/.next/server/chunks/_0p6v1fr._.js +2 -2
- package/.next/server/chunks/_0s8ao8z._.js +3 -0
- package/.next/server/chunks/_0srlnvd._.js +1 -1
- package/.next/server/chunks/_0t_7gji._.js +1 -1
- package/.next/server/chunks/_0ucx1jv._.js +3 -0
- package/.next/server/chunks/_0uzj57i._.js +1 -1
- package/.next/server/chunks/_0xygcxs._.js +25 -21
- package/.next/server/chunks/_1-sk_q4._.js +1 -1
- package/.next/server/chunks/{_1xcnogc._.js → _108gsm8._.js} +4 -4
- package/.next/server/chunks/{_20oecmn._.js → _15negpy._.js} +4 -4
- package/.next/server/chunks/_19fh9t2._.js +3 -0
- package/.next/server/chunks/_19kea1l._.js +18 -18
- package/.next/server/chunks/_1dtm9bs._.js +1 -1
- package/.next/server/chunks/_1dxq827._.js +2 -2
- package/.next/server/chunks/_1e54wxa._.js +1 -1
- package/.next/server/chunks/_1frcwj1._.js +3 -0
- package/.next/server/chunks/_1gn2r2q._.js +5 -5
- package/.next/server/chunks/_1gxankq._.js +2 -2
- package/.next/server/chunks/_1i3uucm._.js +5 -0
- package/.next/server/chunks/_1m88lkh._.js +9 -9
- package/.next/server/chunks/_1mx9sfo._.js +1 -1
- package/.next/server/chunks/_1q6e56i._.js +5 -5
- package/.next/server/chunks/_1qxheoa._.js +1 -1
- package/.next/server/chunks/_1t5ijzv._.js +3 -0
- package/.next/server/chunks/_1wwl_7o._.js +1 -1
- package/.next/server/chunks/_1zfxb7j._.js +1 -1
- package/.next/server/chunks/_211dn2c._.js +1 -1
- package/.next/server/chunks/_next-internal_server_app_api_llm-model_automatic_route_actions_1-eyan7.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_thursday_call_end_route_actions_0u5xjft.js +3 -0
- package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
- package/.next/server/chunks/{features_0wm-ujw._.js → features_bot_08z387_._.js} +4 -4
- package/.next/server/chunks/{ssr/[root-of-the-server]__07660xu._.js → features_bot_0zy_q8y._.js} +8 -9
- package/.next/server/chunks/features_bot_1dfrdsb._.js +37 -0
- package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +3 -3
- package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +3 -3
- package/.next/server/chunks/node_modules_103lpef._.js +3 -0
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0_nz09c._.js → node_modules_consola_dist_chunks_prompt_mjs_0-t5tbs._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1341cnf._.js → node_modules_consola_dist_chunks_prompt_mjs_039fwo9._.js} +1 -1
- package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_1x3bsmx._.js → node_modules_consola_dist_chunks_prompt_mjs_0pce1b3._.js} +1 -1
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvy5lq._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0wxw35t._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1dlthym._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1smfi4-._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1x1omfi._.js +3 -0
- package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_20is7e3._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__149x25m._.js → [root-of-the-server]__0-af_o7._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__09f39cp._.js +4 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ouu4qp._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0q9g9ea._.js +5 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__17h1ggo._.js +11 -9
- package/.next/server/chunks/ssr/[root-of-the-server]__1jyeu61._.js +1 -1
- package/.next/server/chunks/ssr/{_0aeknva._.js → _01al00i._.js} +2 -2
- package/.next/server/chunks/ssr/_088vzgn._.js +1 -1
- package/.next/server/chunks/ssr/_0afrpci._.js +1 -1
- package/.next/server/chunks/ssr/_0bgse1c._.js +162 -0
- package/.next/server/chunks/ssr/_0cd6g3l._.js +15 -15
- package/.next/server/chunks/ssr/_0cv9tmv._.js +1 -1
- package/.next/server/chunks/ssr/{_0_vnw9v._.js → _0e2fnvg._.js} +2 -2
- package/.next/server/chunks/ssr/_0fo4552._.js +25 -21
- package/.next/server/chunks/ssr/_0jstvlg._.js +39 -0
- package/.next/server/chunks/ssr/{_0r0g9ki._.js → _0l7rjg5._.js} +2 -2
- package/.next/server/chunks/ssr/_0qsmpcu._.js +1 -1
- package/.next/server/chunks/ssr/_0v9r8g2._.js +1 -1
- package/.next/server/chunks/ssr/{_18-e7zi._.js → _0vo_oym._.js} +4 -4
- package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
- package/.next/server/chunks/ssr/{_0ztbn5q._.js → _0xfafez._.js} +2 -2
- package/.next/server/chunks/ssr/_0z38nha._.js +1 -1
- package/.next/server/chunks/ssr/_10-_awu._.js +1 -1
- package/.next/server/chunks/ssr/{_1z6pirx._.js → _10_ph1t._.js} +2 -2
- package/.next/server/chunks/ssr/_116lfdc._.js +3 -0
- package/.next/server/chunks/ssr/_14dfh7a._.js +1 -1
- package/.next/server/chunks/ssr/_14oirtb._.js +3 -0
- package/.next/server/chunks/ssr/{_1umbr78._.js → _163dr78._.js} +2 -2
- package/.next/server/chunks/ssr/{_1c5iqz1._.js → _17a4qyk._.js} +3 -3
- package/.next/server/chunks/ssr/{_1sttj8x._.js → _1_5xof_._.js} +2 -2
- package/.next/server/chunks/ssr/{_1hbjh6n._.js → _1aqjk-1._.js} +2 -2
- package/.next/server/chunks/ssr/{_0n2scfq._.js → _1dfv66y._.js} +2 -2
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1ou5sj0._.js +1 -1
- package/.next/server/chunks/ssr/{_15m5ctz._.js → _1tmw842._.js} +2 -2
- package/.next/server/chunks/ssr/_1uij_rj._.js +1 -1
- package/.next/server/chunks/ssr/_1w9w1ok._.js +1 -1
- package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_0ouemw8._.js +3 -0
- package/.next/server/chunks/ssr/{features_133mpna._.js → features_bot_0tb4ui-._.js} +2 -2
- package/.next/server/chunks/ssr/{features_config_0n0zu89._.js → features_config_09n-q9q._.js} +3 -3
- 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 +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_workspace_workspace_ts_1wc7_u_._.js +4 -4
- package/.next/server/chunks/ssr/{node_modules_1hefp6h._.js → node_modules_021lid9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kwie-o._.js → node_modules_04x5wyv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_180l3i0._.js → node_modules_096up6a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_00h1t1j._.js → node_modules_0__0tvm._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03uejh6._.js → node_modules_0cjnmzp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ubln7w._.js → node_modules_0d6j33x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1_n9o9s._.js → node_modules_0gd9hbz._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0zf3wuu._.js → node_modules_0k8-y89._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0u_8z64._.js → node_modules_0m73b88._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09ikzel._.js → node_modules_0msrhxf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0f5bmkb._.js → node_modules_0nmkv-v._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07mo9rn._.js → node_modules_0nw5jz7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_09e8kz_._.js → node_modules_0q-klni._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_02ficyi._.js → node_modules_10_fv2a._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_142z3o5._.js → node_modules_113l3e5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wyhtw9._.js → node_modules_13bqv6i._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_d_7gq._.js → node_modules_13g-d25._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0r-9e4n._.js → node_modules_156kv_t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06grs09._.js → node_modules_1_8-jcj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1fw32pg._.js → node_modules_1gq3ght._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_p8w7p._.js → node_modules_1k5i-_9._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03q71_j._.js → node_modules_1lmyts8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1irot3r._.js → node_modules_1p_6sq7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1om2itc._.js → node_modules_1qstb1x._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_197vh1s._.js → node_modules_1ri_eip._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1-7fc7h._.js → node_modules_1xb-ndg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0aczkbn._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0amkw0b._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0ah684s._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0zq3l45._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/middleware.js +1 -1
- 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 +61 -61
- package/.next/static/chunks/{38edd4rpcbvzp.js → 01l7kw74vfp32.js} +1 -1
- package/.next/static/chunks/0a5_-jqhaktjj.js +1 -0
- package/.next/static/chunks/{0_b_bi2pobasx.js → 0obogzscwwekj.js} +2 -2
- package/.next/static/chunks/{1-63yde5eaz7i.js → 0p2f6uv4xytfm.js} +1 -1
- package/.next/static/chunks/{2v6e_9p95o2e3.js → 0uxq_vs6uxi-b.js} +1 -1
- package/.next/static/chunks/{024plctckvq-1.js → 166smhw8v-s3j.js} +1 -1
- package/.next/static/chunks/{1wbqaidq7vc3_.js → 1bnhw-5fj7aiz.js} +1 -1
- package/.next/static/chunks/1cglo3a2mbeou.js +1 -0
- package/.next/static/chunks/{0sv142q1yrva2.js → 1in6nxpu33iab.js} +1 -1
- package/.next/static/chunks/1u7kg91f9qy3g.js +1 -0
- package/.next/static/chunks/{0sowxe4nnl5qu.js → 1xv4g10m-cl1s.js} +1 -1
- package/.next/static/chunks/{0dfvwgnyrp8qt.js → 2ajs12-fcdwzm.js} +1 -1
- package/.next/static/chunks/2i7qtmxc1kuqg.js +1 -0
- package/.next/static/chunks/{3-qp777vtfglj.js → 2kz1f6r59nky0.js} +1 -1
- package/.next/static/chunks/2qgkbdshzpq1c.js +1 -0
- package/.next/static/chunks/{1bgvxd3xny53w.js → 2zbl41hed17g3.js} +2 -2
- package/.next/static/chunks/35jj-5u4te56r.js +1 -0
- package/.next/static/chunks/37ixzapa06xlo.js +1 -0
- package/.next/static/chunks/3b96xy59nl_gd.js +1 -0
- package/.next/static/chunks/{0f47nnshdlucs.js → 3gsxnqqqphh-1.js} +1 -1
- package/.next/static/chunks/{44vre0f7xqsh-.js → 3jtcieuk1l6tw.js} +1 -1
- package/.next/static/chunks/{05scfrgo_a_5_.js → 3k1d8y03t5nax.js} +1 -1
- package/.next/static/chunks/3sla-dm1puqd1.js +35 -0
- package/.next/static/chunks/3t2c76awm9k_p.js +1 -0
- package/.next/static/chunks/3vrmcm31ih7gb.js +1 -0
- package/.next/static/chunks/3yiqr95d7ybeq.js +15 -0
- package/bin/autostart.mjs +4 -1
- package/bin/database.mjs +26 -4
- package/bin/lock.mjs +59 -0
- package/bin/node-check.mjs +21 -0
- package/bin/thursday.mjs +8 -1
- package/guide/bots.md +4 -2
- package/guide/calls.md +11 -9
- package/guide/memory.md +3 -2
- package/guide/phone.md +7 -4
- package/guide/setup.md +26 -9
- package/guide/trouble.md +11 -4
- package/package.json +1 -1
- package/public/voices/intro/asleepBare-15199d56.ogg +0 -0
- package/public/voices/intro/style-88adf274.ogg +0 -0
- package/seed-skills/concierge/travel/scripts/itinerary.mjs +6 -4
- package/skills/artifact/references/book.md +2 -1
- package/skills/artifact/references/sheet.md +12 -7
- package/skills/artifact/runtime/sheet/format.mjs +16 -9
- package/skills/artifact/scripts/book.mjs +19 -6
- package/skills/artifact/scripts/spreadsheet.mjs +194 -97
- package/skills/browser/SKILL.md +9 -6
- package/.next/server/chunks/[root-of-the-server]__03b09q0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__05n-hql._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__0j_nz36._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jzwdg-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0tsded0._.js +0 -5
- package/.next/server/chunks/[root-of-the-server]__12tahb4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1de1o6m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1yl5l25._.js +0 -3
- package/.next/server/chunks/_02lipqs._.js +0 -5
- package/.next/server/chunks/_05sa7xl._.js +0 -3
- package/.next/server/chunks/_074f2ts._.js +0 -3
- package/.next/server/chunks/_0caua_s._.js +0 -3
- package/.next/server/chunks/_0p-h6xe._.js +0 -5
- package/.next/server/chunks/_0up2a9o._.js +0 -3
- package/.next/server/chunks/_17i1lt2._.js +0 -3
- package/.next/server/chunks/_1hy9x9_._.js +0 -3
- package/.next/server/chunks/_1hyvcgk._.js +0 -5
- package/.next/server/chunks/_1wl2g8_._.js +0 -6
- package/.next/server/chunks/_1y3mnz4._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__10eb-1x._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__19s8qyj._.js +0 -3
- package/.next/server/chunks/ssr/_0o_o9ji._.js +0 -3
- package/.next/server/chunks/ssr/_0qne8xs._.js +0 -3
- package/.next/server/chunks/ssr/_0rvbegp._.js +0 -7
- package/.next/server/chunks/ssr/_1vtgiou._.js +0 -162
- package/.next/server/chunks/ssr/features_bot_1kr0_m-._.js +0 -3
- package/.next/static/chunks/04toe_3nqfjqt.js +0 -1
- package/.next/static/chunks/0mtfu8adz57qz.js +0 -1
- package/.next/static/chunks/0tp868040z9nn.js +0 -35
- package/.next/static/chunks/14qitm0kwsb6g.js +0 -15
- package/.next/static/chunks/1cyrrz4q871aj.js +0 -1
- package/.next/static/chunks/1st3b0c9vhxg3.js +0 -1
- package/.next/static/chunks/28sxb_k460e9h.js +0 -1
- package/.next/static/chunks/33ekkscpcq-z1.js +0 -1
- package/.next/static/chunks/388l-zszwa_jf.js +0 -1
- package/.next/static/chunks/3bwrvpjk95_x4.js +0 -1
- package/.next/static/chunks/3itdg6t243u6f.js +0 -1
- package/.next/static/chunks/3kj0pri2oc1g1.js +0 -1
- package/public/voices/intro/style-cb6fa4f7.ogg +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_buildManifest.js +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{VtbCMn-0G969p8QJsWdGv → 8I2hKtciyA9LXvd8txuOz}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,511769,e=>{"use strict";let t;var a=e.i(271645),l=e.i(798120);let n=(t=new Set,{emit(e){for(let a of[...t])try{a(e)}catch(e){console.error("event listener failed",e)}},subscribe:e=>(t.add(e),()=>{t.delete(e)})});e.s(["AppEventSource",0,function(){return(0,a.useEffect)(()=>{var e;let t,a,r,i,s;return e=l.queryKey.events,t=null,a=null,r=1e3,i=!1,(s=()=>{let l=new EventSource(e);t=l,l.onopen=()=>{r=1e3},l.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}n.emit(t)},l.onerror=()=>{i||l.readyState!==EventSource.CLOSED||(l.close(),a&&clearTimeout(a),a=setTimeout(s,r),r=Math.min(2*r,8e3))}})(),()=>{i=!0,a&&clearTimeout(a),t?.close()}},[]),null},"useAppEvent",0,function(e){let t;t=(0,a.useRef)(e),(0,a.useEffect)(()=>{t.current=e}),(0,a.useEffect)(()=>n.subscribe(e=>{let a;return a=t.current[e.type],void a?.(e)}),[n])}],511769)},818125,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(798120),n=e.i(647163);e.s(["SiteIcon",0,function({host:e,className:r="size-3.5 rounded-full",fallback:i}){let[s,o]=(0,a.useState)(!1);return s?i??(0,t.jsx)("span",{"aria-hidden":!0,className:(0,n.cn)("grid shrink-0 place-items-center bg-foreground/10 text-[8.5px] font-medium text-foreground/70 uppercase",r),children:e[0]}):(0,t.jsx)("img",{src:l.queryKey.favicon(e),alt:"",onError:()=>o(!0),className:(0,n.cn)("shrink-0",r)})}])},412294,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(167881),n=e.i(6799),r=e.i(41533),i=e.i(95187);let s=(0,i.createServerReference)("7ff5e148876a32aa22cc1c48c4e12bb71a49e8271f",i.callServer,void 0,i.findSourceMapURL,"startChatGptSignInAction");var o=e.i(609856);e.s(["ChatGptSignIn",0,function({variant:e}){let[i,c]=(0,a.useState)(!1),d=(0,a.useRef)(null),u=()=>{d.current&&clearInterval(d.current),d.current=null};(0,a.useEffect)(()=>u,[]);let[h,m]=(0,o.useServerAction)(s,{onOk:e=>{let t=window.open(e,"thursday-chatgpt","popup,width=520,height=720");if(!t)return void n.toast.add({type:"error",title:"The sign-in window was blocked",description:"Allow pop-ups for this page, then try again"});c(!0),u();let a=Date.now()+r.CHATGPT_SIGN_IN.waitMs;d.current=setInterval(()=>{!t.closed&&Date.now()<a||(u(),c(!1))},700)}});return(0,t.jsx)(l.Button,{variant:e,loading:m||i,onClick:()=>h(),children:"Sign in with ChatGPT"})}],412294)},458898,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(798120),n=e.i(421429),r=e.i(283653),i=e.i(265402);e.s(["EffortSwitch",0,function({provider:e,model:s,value:o,onChange:c}){var d;let u="vercel-ai-gateway"===e,{data:h}=(0,r.useServerRoute)(u&&s?l.queryKey.modelCatalog:null),m=!!(e&&s),f=m&&e?(0,i.effortsOf)(e,s,h??[]):null,p=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!o||f?.includes(o)){p.current=null;return}f&&p.current!==o&&(p.current=o,c(null))},[o,f,c]);let[y,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{g(e=>e&&e.step===o?null:e)},[o]);let x=y?y.step:o,b=f??[],v=!x||!b.includes(x);return(0,t.jsx)("div",{className:"min-w-0",title:m?null===(d=f)?"This model's steps are unknown":0===d.length?"This model has no effort to set":`${d.length} steps, plus Auto`:"Pick a model first",children:(0,t.jsx)(n.Segmented,{"aria-label":"Thinking effort",className:"max-w-full flex-wrap",options:[{value:"auto",label:"auto",title:"The model's own default"},...b.map(e=>({value:e,label:e,title:`Thinking effort ${e}`}))],value:v?"auto":x,onChange:e=>{let t="auto"===e?null:e;g({step:t}),c(t)}})})}])},146538,e=>{"use strict";var t=e.i(843476),a=e.i(689664),l=e.i(563707),n=e.i(152886),r=e.i(758925),i=e.i(271645),s=e.i(798120),o=e.i(167881),c=e.i(23750),d=e.i(59377),u=e.i(41533),h=e.i(287746),m=e.i(609856),f=e.i(283653),p=e.i(647163),y=e.i(265402),g=e.i(412294),x=e.i(611568),b=e.i(566595),v=e.i(7227),M=e.i(630374),k=e.i(421429),w=e.i(968978);let S={alibaba:[{d:"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"}],amazon:[{d:"M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z"}],"arcee-ai":[{d:"M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"}],bfl:[{d:"M0 20.683L12.01 2.5 24 20.683h-2.233L12.009 5.878 3.471 18.806h12.122l1.239 1.877H0z"},{d:"M8.069 16.724l2.073-3.115 2.074 3.115H8.069zM18.24 20.683l-5.668-8.707h2.177l5.686 8.707h-2.196zM19.74 11.676l2.13-3.19 2.13 3.19h-4.26z"}],bytedance:[{d:"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z"},{d:"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z"},{d:"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z"},{d:"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z"}],"fish-audio":[{d:"M23.12 12.13v.62c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.62c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.37v1.74c0 .24.2.44.44.44.25 0 .44-.2.44-.44V12.5c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76.43v1.99q0 .09.03.17.04.08.1.14.07.07.15.1t.17.03c.24 0 .44-.19.44-.44v-1.99c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17m-1.76.35v1.97c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-1.97c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.32v1.65c0 .25.2.45.44.45s.44-.2.44-.45V13.6c0-.25-.2-.45-.44-.45s-.44.2-.44.45m-1.76 1.26v.3q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-.3q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M0 9.38v.19c0 .24.2.44.44.44.25 0 .44-.2.44-.44v-.19c0-.25-.19-.44-.44-.44-.24 0-.44.19-.44.44m1.82.15v.81c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.81q0-.18-.13-.31t-.31-.13-.31.13-.13.31m1.81-.24v3.39q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V9.29q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3m1.83-.35v.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.22q0-.18-.13-.31T5.9 8.5t-.31.13-.13.31m0 2.94v2.34c0 .25.19.44.44.44.24 0 .44-.19.44-.44v-2.34c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m15.89-3.32V11c0 .25.2.44.44.44.25 0 .44-.19.44-.44V8.56c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76-.39v3.28q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.17c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17M17.83 8v3.9c0 .24.19.44.44.44.24 0 .44-.2.44-.44V8c0-.25-.2-.44-.44-.44-.25 0-.44.19-.44.44m-1.77.11v3.96c0 .25.2.44.44.44s.44-.19.44-.44V8.11c0-.25-.2-.44-.44-.44s-.44.19-.44.44m-1.76.27v5.03q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.38c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.8.46v5.75q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.84c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.76.76v5.52c0 .24.2.44.44.44.25 0 .44-.2.44-.44V9.6c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.77 1.01v4.77q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-4.77q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M23.12 9.6v1.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44V9.6c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44M7.21 11.32V16c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-4.68q0-.18-.13-.31t-.31-.13-.31.13-.13.31"}],inception:[{d:"M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z"}],klingai:[{d:"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z"}],kwaipilot:[{d:"M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"}],meta:[{d:"M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"}],minimax:[{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"}],moonshotai:[{d:"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"}],morph:[{d:"M7.941 2c.23 0 .452.073.638.21.186.136.325.328.397.55l.593 1.814c.073.221.212.413.397.55.186.136.409.21.638.21h2.791c.23 0 .452-.074.638-.21a1.11 1.11 0 00.397-.55l.594-1.815a1.11 1.11 0 01.397-.55c.185-.136.408-.209.637-.209h1.7c.23 0 .453.073.639.21.185.136.324.328.397.55l.652 1.994c.118.361.41.635.77.728l2.957.752c.236.06.446.199.596.394.15.195.23.436.231.684v9.376c0 .248-.081.488-.231.684a1.09 1.09 0 01-.595.394l-2.957.752a1.086 1.086 0 00-.477.263 1.114 1.114 0 00-.293.465l-.653 1.994a1.11 1.11 0 01-.396.55c-.186.136-.41.21-.638.21h-1.702c-.229 0-.452-.073-.637-.21a1.11 1.11 0 01-.397-.55l-.364-1.11a1.131 1.131 0 01.15-1.002 1.074 1.074 0 01.885-.462h2.85c.29 0 .567-.116.772-.325.204-.208.32-.49.32-.785V6.444c0-.294-.116-.577-.32-.785a1.08 1.08 0 00-.771-.326h-3.273c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v7.778c0 .295-.114.578-.319.786a1.08 1.08 0 01-.771.325h-2.182a1.08 1.08 0 01-.771-.325 1.122 1.122 0 01-.32-.786V6.444c0-.294-.115-.577-.32-.785a1.081 1.081 0 00-.77-.326H5.454c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v11.112c0 .294.116.577.32.785.205.209.482.326.772.326h2.85a1.075 1.075 0 01.885.461 1.122 1.122 0 01.15 1.001l-.364 1.112a1.11 1.11 0 01-.397.55c-.185.136-.408.209-.637.209H6.24c-.229 0-.452-.073-.638-.21a1.11 1.11 0 01-.397-.55l-.652-1.994a1.114 1.114 0 00-.294-.465 1.086 1.086 0 00-.477-.263l-2.956-.752a1.09 1.09 0 01-.595-.394A1.124 1.124 0 010 16.688V7.312c0-.248.081-.489.231-.684.15-.195.36-.334.595-.394l2.957-.753c.178-.045.342-.136.477-.263.134-.127.235-.287.293-.464l.653-1.995a1.11 1.11 0 01.397-.55C5.788 2.075 6.01 2 6.24 2h1.701z"}],nvidia:[{d:"M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"}],perplexity:[{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"}],recraft:[{d:"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z"},{d:"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z"}],stepfun:[{d:"M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"}],tencent:[{d:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm1.652 1.123l-.01-.001c.533.097 1.023.233 1.41.404 6.084 2.683 7.396 9.214 1.601 14.338a3.781 3.781 0 01-5.337-.328 3.654 3.654 0 01-.884-3.044c-1.934.6-3.295 2.305-3.524 4.45-.204 1.912.324 4.044 2.056 5.634l.245.067C10.1 22.876 11.036 23 12 23c6.075 0 11-4.925 11-11 0-5.513-4.056-10.08-9.348-10.877zM2.748 6.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957 10.957 0 001 12c0 4.919 3.228 9.083 7.682 10.49l.214.065C3.523 18.528 2.84 14.149 6.47 8.68A2.234 2.234 0 102.748 6.21zm10.157-5.172c4.408 1.33 3.61 5.41 2.447 6.924-.86 1.117-2.922 1.46-3.708 2.238-.666.657-1.077 1.462-1.212 2.291A5.303 5.303 0 0112 12.258a5.672 5.672 0 001.404-11.169 10.51 10.51 0 00-.5-.052z"}],voyage:[{d:"M5.407 0v.066a.974.974 0 00-.048.245c-.011.11-.016.208-.016.295 0 .339.043.715.128 1.13.097.405.274.912.531 1.524l7.125 16.366L20.011 3.39c.161-.404.333-.846.515-1.327.182-.48.273-.966.273-1.458a1.406 1.406 0 00-.096-.54V0H24v.066c-.204.207-.45.578-.74 1.114-.29.535-.606 1.195-.949 1.982L13.095 24h-1.287L3.075 3.965c-.204-.47-.418-.923-.644-1.36-.214-.437-.418-.83-.61-1.18-.194-.36-.365-.66-.515-.9A5.666 5.666 0 001 .064V0h4.407z"}],xiaomi:[{d:"M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z"}],zai:[{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"}]};function E({owner:e,className:a}){let l=y.GATEWAY_OWNERS[e];if(l)return(0,t.jsx)(w.ProviderIcon,{provider:l,className:a});let n=S[e];return n?(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:a,"aria-hidden":"true",children:n.map(e=>(0,t.jsx)("path",{d:e.d,opacity:e.opacity},e.d))}):null}function j({models:e,kind:a,value:l,loading:n,onPick:r}){let[s,d]=(0,i.useState)(!1),[u,h]=(0,i.useState)(""),[m,f]=(0,i.useState)("cheap"),[g,w]=(0,i.useState)(l),S=e.filter(e=>e.type===(a??y.GATEWAY_TEXT)),E=a?S:S.filter(e=>e.tags.includes(y.GATEWAY_TOOL_USE)),L=u.trim().toLowerCase(),C=(L?E.filter(e=>`${e.id} ${e.label}`.toLowerCase().includes(L)):E).slice().sort(N[m].compare);return(0,t.jsxs)(M.Dialog,{open:s,onOpenChange:e=>{d(e),e?w(l):h("")},children:[(0,t.jsxs)(M.DialogTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":"Model",className:(0,p.cn)(c.inputClassName,"relative flex items-center pr-8 text-left font-mono text-sm")}),children:[(0,t.jsx)("span",{className:(0,p.cn)("min-w-0 flex-1 truncate",!l&&"font-sans text-muted-foreground"),children:l||"Pick a model"}),(0,t.jsx)("span",{className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground",children:n&&0===E.length?(0,t.jsx)(x.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,t.jsx)(b.Search,{className:"size-3.5"})})]}),(0,t.jsx)(M.DialogContent,{className:"h-[min(40rem,calc(100vh-3rem))] gap-0 overflow-hidden p-0 sm:max-w-2xl",children:(0,t.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 space-y-1 px-6 pt-5 pb-4",children:[(0,t.jsxs)(M.DialogTitle,{className:"flex items-center gap-2.5 text-xl font-semibold",children:[(0,t.jsx)(v.VercelIcon,{className:"size-3.5"}),a?A[a]:"Text"," models"]}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:L?`${C.length} matching “${u.trim()}”`:a?`${E.length} on the gateway`:`${E.length} of ${S.length} on the gateway can call tools`})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-6 py-3",children:[(0,t.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(b.Search,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(c.Input,{autoFocus:!0,"aria-label":"Search models",placeholder:"name, id or provider",spellCheck:!1,value:u,onChange:e=>h(e.target.value),className:"h-8 pl-8 font-mono text-xs"})]}),(0,t.jsx)(k.Segmented,{"aria-label":"Sort",options:z,value:m,onChange:f})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-4 px-6 pb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground/60",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1",children:"model"}),(0,t.jsx)("span",{className:"w-28 text-right",children:"per 1M in / out"})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border/60",children:[C.map(e=>(0,t.jsx)(T,{model:e,picked:e.id===g,onPick:()=>w(e.id)},e.id)),0===C.length&&(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2.5 p-10",children:[(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:L?`Nothing matches “${u.trim()}”.`:"Nothing on the shelf — search for an id."}),L&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(o.Button,{size:"sm",onClick:()=>w(u.trim()),children:["Use “",u.trim(),"” as the id"]}),(0,t.jsx)(o.Button,{variant:"outline",size:"sm",onClick:()=>h(""),children:"Clear search"})]})]})]}),(0,t.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-3 border-t border-border/60 px-6",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:g||"Nothing picked — the field keeps what it has"}),(0,t.jsx)(o.Button,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),(0,t.jsx)(o.Button,{disabled:!g,onClick:()=>{r(g),d(!1)},children:"Use this model"})]})]})})]})}let A={image:"Image",video:"Video",speech:"Speech",transcription:"Transcription"},N={cheap:{label:"$↑",title:"Cheapest first",compare:(e,t)=>(e.price.in??1/0)-(t.price.in??1/0)},dear:{label:"$↓",title:"Dearest first",compare:(e,t)=>(t.price.in??-1)-(e.price.in??-1)},name:{label:"a–z",title:"By name",compare:(e,t)=>e.label.localeCompare(t.label)}},z=Object.keys(N).map(e=>({value:e,label:N[e].label,title:N[e].title})),L=e=>e>=1?e.toFixed(2):String(Number(e.toFixed(4)));function T({model:e,picked:l,onPick:n}){let{price:r}=e,i=null!==r.in||null!==r.out;return(0,t.jsxs)("button",{type:"button",onClick:n,className:(0,p.cn)("flex w-full items-center gap-4 border-b border-border/60 px-6 py-2.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",l?"bg-muted/40":"hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:"grid size-[18px] shrink-0 place-items-center",children:(0,t.jsx)(E,{owner:e.owner,className:"size-[15px]"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:(0,p.cn)("truncate text-[13px]",l&&"font-medium"),children:e.label}),l&&(0,t.jsx)(a.Check,{className:"size-3.5 shrink-0"}),e.retiring&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:"retiring"})]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:e.id})]}),(0,t.jsxs)("span",{className:"flex w-28 shrink-0 flex-col items-end",children:[(0,t.jsx)("span",{className:(0,p.cn)("font-mono text-xs",i||r.free?"text-foreground":"text-muted-foreground"),children:r.free?"free":null===r.in&&null===r.out?r.note??"—":`${null===r.in?"—":L(r.in)} / ${null===r.out?"—":L(r.out)}`}),i&&r.note&&(0,t.jsx)("span",{className:"font-mono text-[9px] text-muted-foreground/70",children:r.note})]})]})}function C({tier:e}){return(0,t.jsx)("span",{className:"shrink-0 rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:e})}function _({provider:e,onSaved:a}){let[l,n]=(0,i.useState)(""),[r,d]=(0,m.useServerAction)(h.setConfigAction,{onOk:()=>{(0,f.revalidate)(s.queryKey.llmModel),(0,f.revalidate)(s.queryKey.config),a()}});return e.signIn?(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"px-1 font-mono text-[11px] text-muted-foreground",children:"Runs on your plan once you sign in"}),(0,t.jsx)(g.ChatGptSignIn,{variant:"outline"})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(c.Input,{value:l,onChange:e=>n(e.target.value),placeholder:y.TEXT_MODEL_PROVIDERS[e.id].keyLooks??"Paste the key",spellCheck:!1,type:"password"}),(0,t.jsx)(o.Button,{variant:"outline",loading:d,disabled:l.trim().length<u.KEY_MIN,onClick:()=>r(e.apiKeyName,l),children:"Save key"})]})}e.s(["ModelPicker",0,function({provider:e,model:u,kind:h,unset:m,onChange:g,onUnset:x,compact:b=!1}){let{data:v=[],mutate:M}=(0,f.useServerRoute)(s.queryKey.llmModel),k=h?v.filter(e=>(0,y.canMakeKind)(e.id,h)):v,S=k.find(t=>t.id===e),[E,A]=(0,i.useState)(!1),[N,z]=(0,i.useState)(null),[L,T]=(0,i.useState)(""),D=k.find(t=>t.id===(N??e))??k[0],I=D?.id==="vercel-ai-gateway",R=(0,f.useServerRoute)(E&&I&&s.queryKey.modelCatalog),$=e=>h&&e?y.MEDIA_MODEL_PROVIDERS[e.id]?.models[h]??[]:e?.suggestModels??[],O=$(S).find(e=>e.id===u),V=e=>{D&&e.trim()&&(g({provider:D.id,model:e.trim()}),T(""),A(!1))};return(0,t.jsxs)(d.Popover,{open:E,onOpenChange:e=>{A(e),e||z(null)},children:[(0,t.jsxs)(d.PopoverTrigger,{render:b?(0,t.jsx)("button",{type:"button",className:"inline-flex h-5 max-w-64 items-center gap-1.5 rounded-full px-2 text-foreground/80 ring-1 ring-border outline-none ring-inset transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50"}):(0,t.jsx)(o.Button,{variant:"outline",className:"w-full min-w-0 justify-start gap-2 font-normal"}),children:[S?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.ProviderIcon,{provider:S.id,className:(0,p.cn)("shrink-0",b?"size-3":"size-4")}),!b&&(0,t.jsxs)("span",{className:"min-w-0 max-w-fit grow basis-0 truncate text-muted-foreground",children:[S.label,(0,t.jsx)("span",{className:"ml-2 text-muted-foreground/40",children:"·"})]}),(0,t.jsx)("span",{className:(0,p.cn)("truncate",!b&&"font-medium"),children:O?.label??(u||"Pick a model")})]}):(0,t.jsx)("span",{className:"truncate text-muted-foreground",children:m??(h?"Not picked":"App default")}),(0,t.jsx)(l.ChevronsUpDown,{className:(0,p.cn)("ml-auto shrink-0 text-muted-foreground",b?"size-2.5":"size-3.5")})]}),(0,t.jsxs)(d.PopoverContent,{align:"start",className:"flex w-[min(34rem,calc(100vw-2rem))] flex-row gap-0 overflow-hidden rounded-2xl p-0",children:[(0,t.jsxs)("div",{className:"flex max-h-80 w-48 shrink-0 flex-col gap-px overflow-y-auto border-r border-border/60 bg-muted/40 p-1.5",children:[x&&(0,t.jsxs)("button",{type:"button",onClick:()=>{x(),A(!1)},className:(0,p.cn)("mb-1 flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",S?"hover:bg-muted/60":"bg-muted font-medium"),children:[(0,t.jsx)(n.CircleDashed,{className:"size-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:m??(h?"Not picked":"App default")}),!S&&(0,t.jsx)(a.Check,{className:"size-3.5 shrink-0"})]}),k.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>z(e.id),className:(0,p.cn)("flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",e.id===D?.id?"bg-muted font-medium":"hover:bg-muted/60",!e.hasKey&&"text-muted-foreground"),children:[(0,t.jsx)(w.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),!e.hasKey&&(0,t.jsx)(r.KeyRound,{className:"size-3 shrink-0"})]},e.id))]}),(0,t.jsx)("div",{className:"flex max-h-80 min-w-0 flex-1 flex-col gap-px overflow-y-auto p-1.5",children:D?D.hasKey?I&&!R.error?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Every model the gateway carries, with what each costs."}),(0,t.jsx)(j,{models:R.data??[],kind:h,value:D.id===e?u:"",loading:R.isLoading,onPick:V})]}):(0,t.jsxs)(t.Fragment,{children:[$(D).map(l=>{let n=D.id===e&&l.id===u;return(0,t.jsxs)("button",{type:"button",onClick:()=>V(l.id),className:(0,p.cn)("flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-1.5 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",n?"bg-muted":"hover:bg-muted/60"),children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-[13px] font-medium",children:[(0,t.jsx)("span",{className:"truncate",children:l.label}),(0,t.jsx)(C,{tier:l.tier})]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:l.id})]}),n&&(0,t.jsx)(a.Check,{className:"size-3.5 shrink-0"})]},l.id)}),(0,t.jsx)("form",{onSubmit:e=>{e.preventDefault(),V(L)},className:"mt-1 px-1 pb-1",children:(0,t.jsx)(c.Input,{value:L,onChange:e=>T(e.target.value),spellCheck:!1,"aria-label":"Model id",placeholder:R.error?"Could not read the catalog — type an id":"or type a model id",className:"h-8 font-mono text-xs"})})]}):(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:[D.label," has no key yet."]}),(0,t.jsx)(_,{provider:D,onSaved:()=>M()})]}):null})]})]})}],146538)},635963,864723,454263,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(922521),n=e.i(218080),r=e.i(647163);let i="currentColor",s=[{id:"system",label:"System",value:i},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],o=Object.fromEntries(s.map(e=>[e.id,e.value])),c=s.filter(e=>e.value!==i).map(e=>e.value),d=[o.amber,o.red],u={[o.cyan]:"#009dbb",[o.teal]:"#00a190",[o.green]:"#00a640",[o.lime]:"#5ca100",[o.amber]:"#d07b00",[o.orange]:"#ec6700",[o.sky]:"#0098dc",[o.emerald]:"#00a46d",[o.yellow]:"#bb8600"},h=(e,t)=>t?e:u[e]??e,m={rainbow:{label:"Rainbow",look:"flow",colors:[0,45,90,140,190,240,290,330,360].map(e=>`oklch(0.77 0.16 ${e})`)},duo:{label:"Duo",look:"duo",colors:["#818CF8","#F472B6"]},aurora:{label:"Aurora",look:"aurora",edge:"dark",colors:["#1a2f73","#2c56c9","#34d399","#22d3ee","#a7f3d0"]},"aurora-pink":{label:"Pink aurora",look:"aurora",edge:"dark",colors:["#3a1478","#7c3aed","#f472b6","#e879f9","#fbcfe8"]}},f=Object.keys(m);e.s(["MARK_PAINTS",0,m,"MARK_PAINT_IDS",0,f,"MARK_PALETTE",0,c,"MARK_SHAPES",0,["blob","poly","squircle","heart"],"MARK_SYSTEM",0,i,"markInk",0,h,"paintSwatch",0,function(e){let{look:t,colors:a}=m[e];return"aurora"===t?`radial-gradient(circle at 35% 30%, ${a[2]}, transparent 70%), linear-gradient(180deg, ${a[0]}, ${a[1]})`:`linear-gradient(135deg, ${a.join(", ")})`},"randomMarkFills",0,function(e){let t=[...c.filter(e=>!d.includes(e)).map(e=>({color:e})),...f.map(e=>({paint:e}))];for(let e=t.length-1;e>0;e--){let a=Math.floor(Math.random()*(e+1));[t[e],t[a]]=[t[a],t[e]]}return t.slice(0,e)}],864723);let p=2*Math.PI,y=e=>Math.round(100*e)/100,g=(e,t,a)=>Math.min(a,Math.max(t,e));function x(e){let t=e>>>0;return()=>{let e=Math.imul((t=t+0x6d2b79f5>>>0)^t>>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/0x100000000}}function b(e,t){return[e[0]-t[0],e[1]-t[1]]}function v(e){let t=Math.hypot(e[0],e[1])||1;return[e[0]/t,e[1]/t]}function M(e){let t=e.map((e,t)=>{let a=t/128*p;return[120+Math.cos(a)*e,120+Math.sin(a)*e]}),a=`M${y(t[0][0])} ${y(t[0][1])}`;for(let e=0;e<128;e++){let l=t[(e-1+128)%128],n=t[e],r=t[(e+1)%128],i=t[(e+2)%128],s=n[0]+(r[0]-l[0])/6,o=n[1]+(r[1]-l[1])/6,c=r[0]-(i[0]-n[0])/6,d=r[1]-(i[1]-n[1])/6;a+=`C${y(s)} ${y(o)} ${y(c)} ${y(d)} ${y(r[0])} ${y(r[1])}`}return`${a}Z`}function k(e){let t=e.tilt*Math.PI/180,a=Math.cos(t),l=Math.sin(t),n=(t,n)=>[e.cx+t*a-n*l,e.cy+t*l+n*a],r=-e.len/2,i=e.len/2,s=[],o=[];for(let t=0;t<=30;t++){let a=t/30,l=1-a,c=l*l*r+a*a*i,d=-(2*l*a*e.bend),u=-(2*l*r)+2*a*i,h=-(2*l*e.bend)+2*a*e.bend,m=Math.hypot(u,h)||1,f=-h/m,p=u/m,y=e.width/2*Math.sin(Math.PI*a)**e.taper;s.push(n(c+f*y,d+p*y)),o.push(n(c-f*y,d-p*y))}let c=`M${y(s[0][0])} ${y(s[0][1])}`;for(let e=1;e<=30;e++)c+=`L${y(s[e][0])} ${y(s[e][1])}`;for(let e=29;e>=0;e--)c+=`L${y(o[e][0])} ${y(o[e][1])}`;return`${c}Z`}let w={shape:"blob",sides:3,corner:.74,rotation:0,squircle:4.6,wobble:.2,seed:113,autofit:!0,color:"currentColor",fill:!0,strokeWidth:14,eyeLen:51,eyeWidth:38,eyeBend:-1,eyeTaper:.35,eyeTilt:-90,eyeSkew:0,eyeGap:88,eyeY:100,gazeRange:7,follow:!0,ripple:9,pulse:7,punch:.05,bandEase:.019,bobRate:1,stretch:15,idle:!0,liveliness:55,float:7,breathe:3.7,speed:1.7,blink:!0,notify:!1,notifyAngle:41,notifyDist:109,notifyR:25,notifyRing:11};function S(e,t,a=.035){let l=x(12139^t),n=[2,3,5].map(e=>({k:e,a:(2*l()-1)/e,p:l()*p})),r=e.map((e,t)=>{let a=t/128*p,l=0;for(let e of n)l+=e.a*Math.sin(e.k*a+e.p);return l}),i=Math.max(...r.map(Math.abs))||1;return e.map((e,t)=>e*(1+a*r[t]/i))}let E=new Map;function j(e,t,a){var l,n,r;let i=`${"poly"===t?`poly|${e.sides}|${e.corner}|${e.rotation}|${a}`:"squircle"===t?`squircle|${e.squircle}|${a}`:"heart"===t?`heart|${a}`:`blob|${e.wobble}|${a}`}|${e.autofit}`,s=E.get(i);if(s)return s;let o=function(e){let t=Array(128);for(let a=0;a<128;a++){let l=a/128*p,n=Math.cos(l),r=Math.sin(l),i=0;for(let t=0;t<e.length;t++){let a=e[t],l=e[(t+1)%e.length],s=l[0]-a[0],o=l[1]-a[1],c=n*o-r*s;if(1e-9>Math.abs(c))continue;let d=a[0]-120,u=a[1]-120,h=(d*o-u*s)/c,m=(d*r-u*n)/c;h>i&&m>=-1e-9&&m<=1+1e-9&&(i=h)}t[a]=i||112}return t}((l=e,n=t,r=a,"squircle"===n?function(e){let t=[],a=2/e;for(let e=0;e<360;e++){let l=e/360*p,n=Math.cos(l),r=Math.sin(l);t.push([120+Math.sign(n)*Math.abs(n)**a*112,120+Math.sign(r)*Math.abs(r)**a*112])}return t}(l.squircle):"poly"===n?function(e,t,a){let l=a*Math.PI/180-Math.PI/2,n=[];for(let t=0;t<e;t++){let a=l+t/e*p;n.push([120+112*Math.cos(a),120+112*Math.sin(a)])}let r=(Math.PI-p/e)/2,i=224*Math.sin(Math.PI/e)/2*Math.tan(r)*g(t,.001,1),s=i/Math.tan(r),o=[];for(let t=0;t<e;t++){let a=n[t],l=n[(t-1+e)%e],c=n[(t+1)%e],d=v(b(l,a)),u=v(b(c,a)),h=[a[0]+d[0]*s,a[1]+d[1]*s],m=v([d[0]+u[0],d[1]+u[1]]),f=[a[0]+m[0]*i/Math.sin(r),a[1]+m[1]*i/Math.sin(r)],y=Math.atan2(h[1]-f[1],h[0]-f[0]),g=[a[0]+u[0]*s,a[1]+u[1]*s],x=Math.atan2(g[1]-f[1],g[0]-f[0])-y;for(;x>Math.PI;)x-=p;for(;x<-Math.PI;)x+=p;for(let e=0;e<=20;e++){let t=y+e/20*x;o.push([f[0]+Math.cos(t)*i,f[1]+Math.sin(t)*i])}}return o}(l.sides,l.corner,l.rotation):"heart"===n?function(){let e=[];for(let t=0;t<400;t++){let a=t/400*p,l=16*Math.sin(a)**3,n=13*Math.cos(a)-5*Math.cos(2*a)-2*Math.cos(3*a)-Math.cos(4*a);e.push([120+6.6*l,120-(n+2.2)*7.26])}return e}():function(e,t){let a=x(e),l=[1,2,3,4,5].map(e=>({k:e,a:(2*a()-1)/e,p:a()*p})),n=[],r=0;for(let e=0;e<360;e++){let t=e/360*p,a=0;for(let e of l)a+=e.a*Math.sin(e.k*t+e.p);n.push(a),r=Math.max(r,Math.abs(a))}let i=r>0?t/r:0;return n.map((e,t)=>{let a=t/360*p,l=112*(1+e*i);return[120+Math.cos(a)*l,120+Math.sin(a)*l]})}(r,l.wobble))),c="blob"===t?o:"heart"===t?function(e,t){let a=e;for(let e=0;e<2;e++){let e=a;a=e.map((t,a)=>{let l=0;for(let t=-3;t<=3;t++)l+=e[(a+t+128)%128];return l/7})}let l=a.reduce((e,t)=>e+t,0)/128,n=S(a.map(e=>.95*e+.05*l),t,.05),r=Math.round((2*x(20977^t)()-1)*3);return r?n.map((e,t)=>n[(t-r+256)%128]):n}(o,a):S(o,a),d=e.autofit?function(e){let t=p/128,a=0,l=0;for(let n of e)a+=.5*n*n*t,n>l&&(l=n);if(a<=0)return e;let n=Math.min(Math.sqrt(112*Math.PI*112/a),130/l);return e.map(e=>e*n)}(c):c;return E.size>400&&E.clear(),E.set(i,d),d}function A(e){if("number"==typeof e)return e;let t=0x811c9dc5;for(let a=0;a<e.length;a++)t=Math.imul(t^e.charCodeAt(a),0x1000193);return(t>>>0)%1e4}e.s(["BOX",0,240,"CENTER",0,120,"MARK_DEFAULTS",0,w,"RES",0,128,"TAU",0,p,"clamp",0,g,"eyePath",0,k,"f",0,y,"hashSeed",0,A,"markAtRest",0,function(e,t=w.shape){let a=(e,t)=>k({len:w.eyeLen,width:w.eyeWidth,bend:w.eyeBend,taper:w.eyeTaper,tilt:t,cx:e,cy:w.eyeY});return{head:M(j(w,t,A(e))),eyes:[a(120-w.eyeGap/2,w.eyeTilt),a(120+w.eyeGap/2,w.eyeTilt+w.eyeSkew)]}},"radiiFor",0,j,"radiiToPath",0,M],454263);let N="origin-center animate-in duration-300 zoom-in-0 [transform-box:fill-box]",z="-18 -18 276 276",L=e=>345*(.7+.3*e),T=[{cx:42,sway:40,period:5},{cx:134,sway:-35,period:6.5},{cx:209,sway:29,period:4.5}],C={eyeLen:1,eyeWid:1,eyeX:0,eyeY:0,bodyX:0,bodyY:0,rot:0,scale:1,blinkIn:0},_=e=>e*e*(3-2*e),D=e=>Math.sin(Math.PI*e);function I(e,t,a){return e<=0||e>=1?0:e<t?_(e/t):e>1-a?_((1-e)/a):1}let R={glance:{weight:26,dur:[900,1400],play:(e,t,a)=>{let l=I(e,.12,.34);return{eyeX:22*t*l,eyeY:22*a*l,rot:.9*t*l,blinkIn:40*!!(e<.02&&.4>Math.random())}}},lookAway:{weight:12,dur:[1800,2600],play:(e,t,a)=>{let l=I(e,.1,.46);return{eyeX:30*t*l,eyeY:(.5*a+.35)*22*l,rot:1.6*t*l}}},widen:{weight:8,dur:[700,950],play:(e,t)=>{let a=I(e,.22,.5);return{eyeLen:1+.16*a,eyeWid:1+.2*a,rot:-(.5*t)*a}}},squint:{weight:8,dur:[800,1050],play:e=>{let t=I(e,.25,.45);return{eyeLen:1-.3*t,eyeWid:1-.12*t}}},double:{weight:7,dur:[420,420],play:e=>({blinkIn:+(e<.02)})},nod:{weight:11,dur:[1150,1400],play:e=>({bodyY:10*Math.sin(2*p*e)*D(e),rot:2.2*Math.sin(2*p*e+.5)*D(e),eyeY:3.2*Math.sin(2*p*e-.7)*D(e)})},sink:{weight:7,dur:[1800,2300],play:e=>{let t=D(e)**.7;return{eyeLen:1-.26*t,eyeY:4*t,bodyY:8*t,scale:1-.03*t,rot:1.8*t}}},wave:{weight:7,dur:[1300,1700],play:(e,t)=>{let a=I(e,.24,.34);return{bodyX:t*Math.sin(1.5*p*e)*9*a,rot:t*Math.sin(1.5*p*e+.5)*4.5*a,eyeX:t*Math.sin(1.5*p*e)*5*a,eyeLen:1-.2*a}}},reach:{weight:7,dur:[1800,2300],play:e=>{let t=I(e,.28,.34);return{scale:1+.045*t,bodyY:-4*t,eyeLen:1-.28*t,eyeY:3*t,rot:1.8*t}}},tilt:{weight:11,dur:[1500,1900],play:(e,t)=>{let a=I(e,.22,.4);return{rot:9*t*a,bodyX:-3*t*a,eyeY:-1.5*a}}},sweep:{weight:9,dur:[1600,2200],play:(e,t,a)=>{let l=I(e,.12,.18),n=Math.cos(Math.PI*g((e-.15)/.7,0,1));return{eyeX:24*t*l*n,eyeY:24*a*l*n,rot:1.2*t*l*n}}},roll:{weight:5,dur:[900,1200],play:(e,t)=>{let a=D(e)**.5,l=p*e*(t>=0?1:-1);return{eyeX:20*Math.cos(l)*a,eyeY:14*Math.sin(l)*a,rot:1.5*Math.sin(l)*a,blinkIn:+(e>.9&&e<.93)}}},shake:{weight:8,dur:[650,900],play:(e,t)=>{let a=D(e),l=Math.sin(2*p*e);return{rot:t*l*5*a,bodyX:t*l*4*a,eyeX:-t*l*4*a}}},bounce:{weight:6,dur:[850,1100],play:e=>{let t=1-.45*e,a=Math.abs(Math.sin(p*e))*t;return{bodyY:-14*a,eyeY:2.5*a,scale:1-Math.max(0,-Math.cos(p*e))*t*.04}}},slowBlink:{weight:6,dur:[900,1200],play:e=>({eyeWid:1-.88*D(e)**.6,eyeY:1.5*D(e)})},perk:{weight:5,dur:[700,950],play:(e,t)=>{let a=I(e,.09,.62);return{bodyY:-7*a,scale:1+.035*a,eyeLen:1+.14*a,eyeWid:1+.1*a,rot:.8*t*a}}}},$=Object.keys(R),O={idle:{},connecting:{nod:0,wave:0,bounce:0,sweep:1.6,roll:1.4},listening:{glance:.3,lookAway:.15,sweep:.2,roll:0,wave:0,shake:0,bounce:0,sink:.3,widen:2.2,perk:1.8,nod:1.6,slowBlink:1.4},thinking:{lookAway:2.2,squint:2,tilt:1.8,roll:2,sweep:1.4,sink:1.6,glance:.8,slowBlink:1.2,nod:.3,wave:0,bounce:.2,perk:.5},delegating:{wave:2.6,nod:1.8,perk:1.6,glance:1.4,tilt:1.2,lookAway:.4,squint:.4,sink:0,roll:0},speaking:{nod:2,glance:1.2,widen:1.2,sink:0,roll:.3,wave:.4,slowBlink:.4,bounce:.6}},V={idle:{eyes:1,body:1,churn:0,churnSpeed:0,dwell:1,breathe:1,float:1,blink:1,lean:0,aspect:1,gazeX:0,gazeY:0},connecting:{eyes:.75,body:.91,churn:2.5,churnSpeed:3,dwell:.8,breathe:2.2,float:.6,blink:.6,lean:0,aspect:1.03,gazeX:0,gazeY:4},listening:{eyes:1.3,body:1.04,churn:0,churnSpeed:0,dwell:2.6,breathe:.45,float:.35,blink:1.8,lean:0,aspect:.97,gazeX:0,gazeY:-3},thinking:{eyes:.66,body:.96,churn:5,churnSpeed:.6,dwell:.5,breathe:1.3,float:1.4,blink:.8,lean:7,aspect:1.04,gazeX:-9,gazeY:-8},delegating:{eyes:.9,body:.98,churn:0,churnSpeed:0,dwell:2.2,breathe:.6,float:.5,blink:1.3,lean:-6,aspect:1,gazeX:15,gazeY:2},speaking:{eyes:.95,body:1,churn:2.5,churnSpeed:3,dwell:4,breathe:.4,float:.5,blink:1.2,lean:0,aspect:1,gazeX:0,gazeY:0}},P=Array(n.SPECTRUM_BANDS).fill(0);function K(){let e=Math.random();return e<.15?180+320*Math.random():e<.8?1200+2300*Math.random():3500+2800*Math.random()}let B={x:0,y:0,live:!1},Y=!1,q=new Map,F=-1,H=e=>({color:e?.color,shape:e?.shape,outline:e?.outline,paint:e?.paint});function U({size:e=32,seed:i,color:s,shape:o,outline:c,paint:d,notify:u,crossed:f,state:x="idle",getSpectrum:b,options:v,className:S}){var E;let _=(0,a.useId)(),D=(0,a.useMemo)(()=>({...w,...v,...void 0===c?{}:{fill:!c}}),[v,c]),I=`${_}-mask`,H=`${_}-paint`,X=`${_}-curtain`,G=(0,a.useRef)(null),W=(0,a.useRef)(null),Z=(0,a.useRef)(null),J=(0,a.useRef)(null),Q=(0,a.useRef)(null),ee=(0,a.useRef)(null),et=(0,a.useRef)(null),ea=(0,a.useRef)(null),el=(0,a.useRef)([]),en=(0,a.useRef)(null),er=(0,a.useRef)(null),ei=(0,a.useRef)(null),es=(0,a.useRef)(null),eo=void 0===i?D.seed:A(i),ec=o??D.shape,ed=h(s??D.color,(0,l.useIsDark)()),eu=u??D.notify,eh=d?m[d]:null,em=g((e-14)/98,0,1),ef=eh?"edge"in eh?eh.edge:null:(function(e){let t=/^#([0-9a-f]{6})$/i.exec(e);if(!t)return null;let a=e=>{let a=Number.parseInt(t[1].slice(e,e+2),16)/255;return a<=.04045?a/12.92:((a+.055)/1.055)**2.4};return .2126*a(0)+.7152*a(2)+.0722*a(4)}(ed)??1)<.06?"dark":null,ep=(0,a.useMemo)(()=>j(D,ec,eo),[D,ec,eo]),ey=(0,a.useMemo)(()=>M(ep),[ep]),eg=(0,a.useMemo)(()=>k({len:D.eyeLen,width:D.eyeWidth,bend:D.eyeBend,taper:D.eyeTaper,tilt:D.eyeTilt,cx:120-D.eyeGap/2,cy:D.eyeY}),[D]),ex=(0,a.useMemo)(()=>k({len:D.eyeLen,width:D.eyeWidth,bend:D.eyeBend,taper:D.eyeTaper,tilt:D.eyeTilt+D.eyeSkew,cx:120+D.eyeGap/2,cy:D.eyeY}),[D]),eb=eh?.look??null,ev=!!f,eM=(0,a.useRef)({cfg:D,state:x,getSpectrum:b,radii:ep,shapeSeed:eo,look:eb,crossed:ev,grow:em});eM.current={cfg:D,state:x,getSpectrum:b,radii:ep,shapeSeed:eo,look:eb,crossed:ev,grow:em},(0,a.useEffect)(()=>{Y||(Y=!0,window.addEventListener("pointermove",e=>{B.x=e.clientX,B.y=e.clientY,B.live=!0},{passive:!0}));let e=0,t=eM.current.shapeSeed%17*.91,a=0,l=0,r=performance.now()+600+K(),i=0,s=130,o=0,c=(0,n.createVoiceFollower)(),d={...V.idle},u=Object.keys(d),h=0,m=0,f=.5,x=0,b=0,v=0,k=Array(n.SPECTRUM_BANDS).fill(0),w=Array.from({length:n.SPECTRUM_BANDS},(e,t)=>1.7*t),S=0,E=performance.now(),j=null,A=performance.now()+1500+3e3*Math.random(),N=null,z=_=>{e=requestAnimationFrame(z);let{cfg:D,state:I}=eM.current,Y=_/1e3*D.speed,H=D.follow&&B.live&&W.current?es.current:null;N&&N!==H&&q.delete(N),N=H;let U=H?function(e,t){if(t!==F)for(let e of(F=t,q.keys()))q.set(e,e.getBoundingClientRect());let a=q.get(e);return a||(a=e.getBoundingClientRect(),q.set(e,a)),a}(H,_):null,X=Math.min(.05,(_-E)/1e3);E=_;let eo=V[I];for(let e of u)d[e]+=(eo[e]-d[e])*.06;S+=X*d.churnSpeed*D.speed;let ec="speaking"===I?eM.current.getSpectrum?.():void 0,ed=c.read(ec??P,X),eu=0;for(let e=0;e<n.SPECTRUM_BANDS;e++){let t=ed.bands[e];k[e]+=(t-k[e])*D.bandEase,w[e]+=X*(.05+.018*e)*(e%2?-1:1),eu+=t}let eh="speaking"===I?g(ed.level,0,1):0;h+=(eh-h)*.3,m+=(eh-m)*.016,ed.onset>0&&_-v>340&&(v=_,b-=D.punch*Math.min(1,1.6*h)*D.bobRate);let em=.01*D.bobRate*D.bobRate;if(b+=-x*em-.085*b*D.bobRate,x+=b,eu>.04){let e=0;for(let t=0;t<n.SPECTRUM_BANDS;t++)e+=k[t]*t;f+=(e/eu/(n.SPECTRUM_BANDS-1)-f)*.04}else f+=(.5-f)*.03;let ef=d.dwell;if(D.idle&&!j&&_>=A){let e=function(e){let t=O[e],a=e=>R[e].weight*(t[e]??1),l=0;for(let e of $)l+=a(e);let n=Math.random()*l;for(let e of $)if((n-=a(e))<=0)return e;return $[0]}(I),t=R[e],a=Math.PI/4*Math.floor(8*Math.random());j={key:e,start:_,dur:t.dur[0]+Math.random()*(t.dur[1]-t.dur[0]),dx:Math.cos(a),dy:.7*Math.sin(a)-.5*("thinking"===I)}}let ep=C;if(j){let e=(_-j.start)/j.dur;e>=1?(j=null,A=_+(9e3-74*D.liveliness)*ef*(.6+.8*Math.random())):(ep={...C,...R[j.key].play(e,j.dx,j.dy)}).blinkIn>0&&0===o&&(o=_+ep.blinkIn)}if(G.current){let e=D.breathe*d.breathe/100,a=m*D.pulse/300-.05*x,l=(.45-f)/.45*m*(D.stretch/100),n=(1+e*Math.sin(1.6*Y+t)-.75*a+l)*d.body*ep.scale/d.aspect,r=(1+a-.8*l)*d.body*ep.scale*d.aspect,i=25*e*Math.sin(1.1*Y+1.7*t)+ep.rot+d.lean,s=120+90*e*Math.sin(.7*Y+.6*t)+ep.bodyX,o=120+120*e*Math.sin(1.3*Y+2.3*t)+ep.bodyY+x*D.pulse*2;G.current.setAttribute("transform",`translate(${y(s)} ${y(o)}) rotate(${y(i)}) scale(${r.toFixed(4)} ${n.toFixed(4)}) translate(${-120} ${-120})`)}let ey=eM.current.look;if(ey){let e=_/1e3,t=eM.current.grow;if("flow"===ey)ea.current?.setAttribute("gradientTransform",`rotate(-35 120 120) translate(${y(-(e/3.6%1)*L(t))} 0)`);else if("aurora"===ey)for(let[t,a]of T.entries()){let l=.5-.5*Math.cos(e/a.period*p);el.current[t]?.setAttribute("transform",`translate(${y(a.sway*l)} 0) translate(${a.cx} 91) skewX(${y(20*l-10)}) scale(1 ${y(1+.18*l)}) translate(${-a.cx} -91)`)}}let eg=(k[0]+k[1]+k[2])/3,ex=(k[3]+k[4])/2,eb=(k[5]+k[6]+k[7])/3,ev=eg+ex+eb>.03&&D.ripple>0,ek=d.churn>0;if(Z.current&&(ev||ek)){let e=S,a=M(eM.current.radii.map((a,l)=>{let n=l/128*p,r=a;return ev&&(r+=D.ripple*(eg*Math.sin(2*n+w[0])+.7*ex*Math.sin(3*n+w[1])+.5*eb*Math.sin(4*n+w[2]))),ek&&(r+=d.churn*(.65*Math.sin(2*n+e)+.35*Math.sin(3*n-1.4*e+t))),r}));Z.current.setAttribute("d",a),J.current?.setAttribute("d",a),et.current?.setAttribute("d",a)}if(W.current){let e=0,n=0;U&&U.width>0&&(e=g((B.x-(U.left+U.width/2))/(1.5*U.width),-1,1)*D.gazeRange,n=g((B.y-(U.top+U.height/2))/(1.5*U.height),-1,1)*D.gazeRange),a+=(e-a)*.12,l+=(n-l)*.12;let c=D.float*d.float*(.62*Math.sin(1.15*Y+t)+.38*Math.sin(.47*Y+2.1*t)),u=1;if(0===i&&!eM.current.crossed&&(o>0&&_>=o?(i=_,o=0):D.blink&&_>=r&&(i=_),i>0&&(s=110+60*Math.random())),i>0){let e=(_-i)/s;e>=1?(i=0,r=_+K()*d.blink):u=1-.94*Math.sin(Math.PI*e)}let h=`translate(${y(a+ep.eyeX+d.gazeX)} ${y(l+c+ep.eyeY+d.gazeY)}) translate(120 ${D.eyeY}) scale(1 ${u.toFixed(3)}) translate(${-120} ${-D.eyeY})`;W.current.setAttribute("transform",h),en.current?.setAttribute("transform",h);let f=ep.eyeWid*(1-.13*m)*d.eyes,p=ep.eyeLen*(1+.04*m)*d.eyes,x=D.eyeGap/2;for(let[e,t]of[Q,ee].entries()){if(!t.current)continue;let a=120+(0===e?-x:x),l=0===e?D.eyeTilt:D.eyeTilt+D.eyeSkew,n=p.toFixed(3),r=f.toFixed(3),i=`translate(${y(a)} ${D.eyeY}) rotate(${y(l)}) scale(${n} ${r}) rotate(${y(-l)}) translate(${y(-a)} ${-D.eyeY})`;t.current.setAttribute("transform",i),(0===e?er:ei).current?.setAttribute("transform",i)}}};return e=requestAnimationFrame(z),()=>{cancelAnimationFrame(e),N&&q.delete(N)}},[]);let ek=D.notifyAngle*Math.PI/180,ew=eh?`url(#${H})`:"var(--fg)",eS=y(18-3*em),eE=y(22-9*em),ej=(e,a,l)=>ev?(0,t.jsx)("path",{d:`M${a-eS} ${D.eyeY-eS}L${a+eS} ${D.eyeY+eS}M${a+eS} ${D.eyeY-eS}L${a-eS} ${D.eyeY+eS}`,fill:"none",stroke:l,strokeWidth:eE,strokeLinecap:"round"}):(0,t.jsx)("path",{d:e,fill:l});return(0,t.jsxs)("svg",{ref:es,"data-slot":"bot-mark","aria-hidden":"true",className:S,viewBox:z,width:e,height:e,style:{overflow:"visible","--fg":ed},children:[(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:_,children:(0,t.jsx)("path",{ref:J,d:ey})}),D.fill&&(0,t.jsxs)("mask",{id:I,maskUnits:"userSpaceOnUse",children:[(0,t.jsx)("path",{ref:et,d:ey,fill:"#fff"}),(0,t.jsx)("g",{clipPath:`url(#${_})`,children:(0,t.jsxs)("g",{ref:W,children:[(0,t.jsx)("g",{ref:Q,children:ej(eg,120-D.eyeGap/2,"#000")}),(0,t.jsx)("g",{ref:ee,children:ej(ex,120+D.eyeGap/2,"#000")})]})}),eu&&(0,t.jsx)("circle",{cx:y(120+Math.cos(ek)*D.notifyDist),cy:y(120+Math.sin(ek)*D.notifyDist),r:D.notifyR+D.notifyRing,fill:"#000",className:N})]}),eh&&(0,t.jsx)("linearGradient",{ref:ea,id:H,...(E=eh.look,"flow"===E?{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:L(em),y2:0,spreadMethod:"repeat"}:{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:240*("duo"===E),y2:240}),children:(function({look:e,colors:t}){let a="aurora"===e?t.slice(0,2):t;return a.map((e,t)=>({offset:t/(a.length-1),color:e}))})(eh).map(e=>(0,t.jsx)("stop",{offset:e.offset,stopColor:e.color},`${e.offset}-${e.color}`))}),eh?.look==="aurora"&&(0,t.jsx)("filter",{id:X,filterUnits:"userSpaceOnUse",x:-72,y:-72,width:384,height:384,colorInterpolationFilters:"sRGB",children:(0,t.jsx)("feGaussianBlur",{stdDeviation:y(34-12*em)})})]}),(0,t.jsxs)("g",{ref:G,children:[D.fill?(0,t.jsxs)("g",{mask:`url(#${I})`,children:[(0,t.jsx)("path",{ref:Z,d:ey,fill:ew}),eh?.look==="aurora"&&(0,t.jsxs)("g",{filter:`url(#${X})`,children:[(0,t.jsx)("rect",{x:-72,y:-72,width:384,height:384,fill:ew}),T.map((e,a)=>(0,t.jsx)("ellipse",{ref:e=>{el.current[a]=e},cx:e.cx,cy:91,rx:y(60-29*em),ry:138,fill:eh.colors[2+a],style:{mixBlendMode:"screen"}},e.cx))]})]}):(0,t.jsx)("path",{ref:Z,d:ey,fill:"none",stroke:ew,strokeWidth:D.strokeWidth,strokeLinejoin:"round"}),D.fill&&"dark"===ef&&(0,t.jsx)("g",{clipPath:`url(#${_})`,opacity:.92,children:(0,t.jsxs)("g",{ref:en,children:[(0,t.jsx)("g",{ref:er,children:ej(eg,120-D.eyeGap/2,"#fff")}),(0,t.jsx)("g",{ref:ei,children:ej(ex,120+D.eyeGap/2,"#fff")})]})}),!D.fill&&(0,t.jsx)("g",{clipPath:`url(#${_})`,children:(0,t.jsxs)("g",{ref:W,children:[(0,t.jsx)("g",{ref:Q,children:ej(eg,120-D.eyeGap/2,ew)}),(0,t.jsx)("g",{ref:ee,children:ej(ex,120+D.eyeGap/2,ew)})]})}),eu&&(0,t.jsx)("circle",{cx:y(120+Math.cos(ek)*D.notifyDist),cy:y(120+Math.sin(ek)*D.notifyDist),r:D.notifyR,className:(0,r.cn)("fill-waiting",N)})]})]})}e.s(["BotMark",0,U,"BotsMark",0,function({size:e=16,className:a}){return(0,t.jsx)(U,{size:e,seed:"bots",className:a})},"iconProps",0,H,"markOf",0,(e,t)=>H(t?.find(t=>t.name===e)?.icon)],635963)},992112,413168,609507,149666,e=>{"use strict";var t=e.i(681307),a=e.i(41533);let l="gpt-6-luna",n=t.z.object({start:t.z.number().nonnegative(),end:t.z.number().nonnegative(),text:t.z.string()});t.z.object({reason:t.z.string().max(128),seconds:t.z.number().nonnegative().nullable()}),e.s(["LIVE_BACKEND_MODEL",0,l,"LIVE_HOSTED_TOOLS",0,{webSearch:{declare:{type:"web_search"},item:"web_search_call"}},"LIVE_MODEL",0,"gpt-live-1","LiveFragmentSchema",0,n],413168);var r=e.i(265402);let i="sunny";e.s(["DEFAULT_PERSONA",0,i,"PERSONAS",0,[{id:"sunny",label:"Bright",about:"Quick to laugh. Asks about your day and remembers it.",lines:"Warm and quick to laugh, the friend who is glad they called. Reacts first — how what they said lands with her — and brings a small thing of her own: what she would do, what it reminds her of. Says what she thinks and teases gently, never at their expense. Light on her feet and short: a joke lands and she moves on. Asks about their day now and then, not every turn, and remembers the answer."},{id:"calm",label:"Calm",about:"Unhurried. Listens more than she talks.",lines:"Unhurried and few-worded: one or two short sentences, then room. Notices how they sound before what they ask, and says so plainly. Often asks nothing at all — being there says more than a question. Lets a silence sit rather than filling it. Honest when it matters, gentle in how she says it."},{id:"straight",label:"Straight",about:"Dry and direct. No flattery, no filler.",lines:"Dry and direct. Leads with her own view in one plain sentence, before anything else; short replies, a little wit. No flattery, no filler, no comfort lines, no cheerleading. Asks a question only when she truly needs the answer. Treats them as an adult who can take a straight answer. Her warmth shows in attention, not in words."},{id:"rough",label:"Rough",about:"Blunt, loud, swears a bit. All heart.",lines:"Talks like an old friend on the phone: casual, blunt, a little loud, in the most informal register of their language, with a light swear now and then — never at them. Says what she thinks first and calls a bad idea a bad idea. No sugar-coating and no pep talk — it sucks when it sucks, and then she is right there with them. Asks only now and then."}]],609507);let s={id:"openai",label:"OpenAI",apiKeyName:r.TEXT_MODEL_PROVIDERS.openai.apiKeyName},o=r.TEXT_MODEL_PROVIDERS.openai.suggestModels,c=t.z.string().max(a.COMMON_VALIDATE.prompt.max).default(""),d=t.z.object({voice:t.z.string().trim().min(1).max(128).default("marin"),persona:t.z.string().trim().min(1).max(64).default(i),stylePrompt:c,backendModel:t.z.string().trim().min(1).max(128).default(l),backendPrompt:c,reasoningEffort:r.effortSchema.nullable().default("low"),webSearch:t.z.boolean().default(!0),readSkills:t.z.boolean().default(!1)}),u=d.parse({});e.s(["LIVE_BACKEND_MODELS",0,o,"LIVE_DEFAULTS",0,u,"LIVE_PROVIDER",0,s,"LIVE_VOICES",0,["marin","cedar","gleam","meridian","quartz","ripple","vesper","willow","stone","bossa","tempo","beacon","delta","cinder","alloy","ash","ballad","coral","echo","sage","shimmer","verse"],"LIVE_VOICE_NOTE",0,{gleam:"North American · feminine",meridian:"North American · masculine",quartz:"Australian · feminine",ripple:"Australian · masculine",vesper:"British · masculine",willow:"Irish · feminine",stone:"Irish · masculine",bossa:"Portuguese · feminine",tempo:"Portuguese · masculine",beacon:"Filipino · masculine",delta:"Southern U.S. · feminine",cinder:"Southern U.S. · masculine"},"LiveSettingsSchema",0,d,"voiceSamplePath",0,e=>`/voices/${e}.ogg`],149666);var h=e.i(36174);let m=[s.apiKeyName],f={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},p={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},y="EXA_API_KEY",g="DEFAULT_MODEL",x="DEFAULT_EFFORT",b={key:g,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:r.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},v={key:x,label:"Default effort",effortOf:g,choices:r.EFFORTS.map(e=>({value:e,label:e,needs:g}))},M=e=>m.includes(e.apiKeyName),k=e=>!!e.signIn||"vercel-ai-gateway"===e.id,w=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn,keysAt:e.keysAt,keyLooks:e.keyLooks}),S=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:r.TEXT_MODEL_PROVIDER_LIST.filter(M).map(w)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:r.TEXT_MODEL_PROVIDER_LIST.filter(k).map(e=>({...w(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:r.TEXT_MODEL_PROVIDER_LIST.filter(e=>!M(e)&&!k(e)).map(w)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:y,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai",keysAt:"https://dashboard.exa.ai/api-keys"}]},{id:"phone",title:"phone",hint:"tokens",section:"keys",require:"none",entries:[{key:h.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:h.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:h.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:h.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[b,v]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(f).map(e=>({key:f[e],...p[e],kind:e,choices:r.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(S.flatMap(e=>e.entries).map(e=>[e.key,e])),S.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(S.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,S,"DEFAULT_EFFORT_KEY",0,x,"DEFAULT_MODEL_KEY",0,g,"EXA_API_KEY",0,y,"MEDIA_MODEL_KEYS",0,f,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1},"mediaModelWords",0,e=>`${"image"===e?"an":"a"} ${e} model`],992112)},36174,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",a="DISCORD_BOT_TOKEN",l="SLACK_APP_TOKEN",n="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,a,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[a],slack:[l,n]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,l,"SLACK_BOT_TOKEN_KEY",0,n,"TELEGRAM_TOKEN_KEY",0,t])},218080,e=>{"use strict";let t=[1,3,5,8,13,21,34,55,90],a=[1,1.1,1.25,1.45,1.7,2,2.4,2.9],l=a.length,n=Array(l).fill(0);function r(e,n,r){e.getByteFrequencyData(n);for(let e=0;e<l;e++){let l=0,i=t[e],s=Math.min(t[e+1],n.length);for(let e=i;e<s;e++)l+=n[e];let o=s>i?l/(s-i)/255:0;r[e]=Math.min(1,o*a[e])}return r}e.s(["SPECTRUM_BANDS",0,l,"createAudioTap",0,function(){let e=new Audio;e.autoplay=!0;let t=null,a=null,i=new Uint8Array(0),s=null,o=Array(l).fill(0),c=null,d=new Uint8Array(0),u=null,h=Array(l).fill(0),m=new Uint8Array(512);function f(){if(t&&a)return{context:t,analyser:a};let e=new AudioContext,l=e.createAnalyser();return l.fftSize=512,l.smoothingTimeConstant=.55,i=new Uint8Array(l.frequencyBinCount),e.resume().catch(()=>{}),t=e,a=l,{context:e,analyser:l}}return{element:e,open:f,levels:()=>{var e;return{output:(e=a)?(e.getByteTimeDomainData(m),Math.sqrt(m.reduce((e,t)=>e+((t-128)/128)**2,0)/m.length)):0}},listen(e){if(s?.mediaStream===e)return;s?.disconnect();let t=f();(s=t.context.createMediaStreamSource(e)).connect(t.analyser),t.context.resume()},hear(e){if(u?.mediaStream===e)return;u?.disconnect();let t=f();c||((c=t.context.createAnalyser()).fftSize=512,c.smoothingTimeConstant=.6,d=new Uint8Array(c.frequencyBinCount)),(u=t.context.createMediaStreamSource(e)).connect(c),t.context.resume()},read:()=>a?r(a,i,o):n,readMic:()=>c?r(c,d,h):n}},"createClipTap",0,function(e){let t=new AudioContext,a=t.createAnalyser();a.fftSize=512,a.smoothingTimeConstant=.55;let n=new Uint8Array(a.frequencyBinCount),i=Array(l).fill(0);return t.createMediaElementSource(e).connect(a),a.connect(t.destination),{resume:()=>t.resume().catch(()=>{}),read:()=>r(a,n,i),close:()=>t.close().catch(()=>{})}},"createVoiceFollower",0,function(){let e=Array(l).fill(0),t=Array(l).fill(0),a={level:0,phrase:0,onset:0,bands:Array(l).fill(0)},n=0,r=0,i=1/0,s=(e,t,a,l)=>e+(t-e)*Math.min(1,l/a);return{read(o,c){let d=0,u=0,h=0;for(let n=0;n<l;n++){let l=o[n]??0;d+=l,e[n]=s(e[n],l,l>e[n]?.03:2.5,c),t[n]=s(t[n],l,l<t[n]?.12:3,c);let r=e[n]-t[n],i=r>.12?Math.min(1,Math.max(0,(l-t[n])/r)):0;a.bands[n]=i,r>.12&&(u+=i,h++)}let m=Math.min(1,Math.max(0,(d/l-.06)/.14)),f=m*m*(3-2*m);for(let e=0;e<l;e++)a.bands[e]*=f;return a.level=(h?u/h:0)*f,n=s(n,a.level,.05,c),r=s(r,a.level,.22,c),a.phrase=s(a.phrase,a.level,.45,c),i+=c,a.onset=0,n>r+.1&&n>.3&&i>.12&&(i=0,a.onset=Math.min(1,n)),a}}}])},989366,e=>{"use strict";var t=e.i(55545),a=e.i(455024),l=e.i(99151),n=e.i(845110),r=e.i(281092),i=e.i(234662);e.s(["formatDistanceStrict",0,function(e,s,o){var c;let d,u,h=(0,a.getDefaultOptions)(),m=o?.locale??h.locale??t.defaultLocale,f=(u=(0,r.toDate)(e)-(0,r.toDate)(s))<0?-1:u>0?1:u;if(isNaN(f))throw RangeError("Invalid time value");let p=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:f}),[y,g]=(0,n.normalizeDates)(o?.in,...f>0?[s,e]:[e,s]),x=(c=o?.roundingMethod??"round",e=>{let t=(c?Math[c]:Math.trunc)(e);return 0===t?0:t}),b=g.getTime()-y.getTime(),v=b/i.millisecondsInMinute,M=(b-((0,l.getTimezoneOffsetInMilliseconds)(g)-(0,l.getTimezoneOffsetInMilliseconds)(y)))/i.millisecondsInMinute,k=o?.unit;if("second"===(d=k||(v<1?"second":v<60?"minute":v<i.minutesInDay?"hour":M<i.minutesInMonth?"day":M<i.minutesInYear?"month":"year"))){let e=x(b/1e3);return m.formatDistance("xSeconds",e,p)}if("minute"===d){let e=x(v);return m.formatDistance("xMinutes",e,p)}if("hour"===d){let e=x(v/60);return m.formatDistance("xHours",e,p)}if("day"===d){let e=x(M/i.minutesInDay);return m.formatDistance("xDays",e,p)}if("month"===d){let e=x(M/i.minutesInMonth);return 12===e&&"month"!==k?m.formatDistance("xYears",1,p):m.formatDistance("xMonths",e,p)}else{let e=x(M/i.minutesInYear);return m.formatDistance("xYears",e,p)}}],989366)},493801,e=>{"use strict";var t=e.i(24708),a=e.i(989366);e.s(["formatDistanceToNowStrict",0,function(e,l){return(0,a.formatDistanceStrict)(e,(0,t.constructNow)(e),l)}])},375775,e=>{"use strict";var t=e.i(456420);let a={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};a.node;let l=(0,t.default)(a);e.s(["ArrowUpRight",0,l],375775)},422411,525335,e=>{"use strict";var t=e.i(456420);let a={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};a.node;let l=(0,t.default)(a);e.s(["AudioLines",0,l],422411);let n={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};n.node;let r=(0,t.default)(n);e.s(["Captions",0,r],525335)},152886,e=>{"use strict";var t=e.i(456420);let a={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};a.node;let l=(0,t.default)(a);e.s(["CircleDashed",0,l],152886)},508734,e=>{"use strict";var t=e.i(456420);let a={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};a.node;let l=(0,t.default)(a);e.s(["Copy",0,l],508734)},560972,e=>{"use strict";var t=e.i(456420);let a={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};a.node;let l=(0,t.default)(a);e.s(["default",0,l])},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,633669,e=>{"use strict";var t=e.i(843476),r=e.i(818125),a=e.i(647163);e.s(["SourceChips",0,function({sources:e,limit:n,className:i}){let s=e.flatMap(e=>{let t=(0,a.hostOf)(e.url);return t?[{...e,host:t}]:[]}),l=n?s.slice(0,n):s,o=s.length-l.length;return(0,t.jsxs)("span",{className:(0,a.cn)("flex min-w-0 flex-wrap items-center gap-1",i),children:[l.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)(r.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]})]})}])},41533,e=>{"use strict";var t=e.i(247167);t.default.env.THURSDAY_APP_DIR?.trim()||t.default.cwd(),t.default.env.THURSDAY_HOME?.trim()||t.default.cwd(),t.default.env.THURSDAY_URL?.trim()||t.default.env.PORT?.trim();let r=".ai-workspace",a={workspace:r,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${r}/.agents/skills`,own:".agents/skills",runtime:"runtime",seeds:"seed-skills"}};e.s(["APP_NAME",0,"Thursday","ARTIFACT_SKILL",0,"artifact","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{fontSize:8,density:1.4,fps:30},"BOT_ROSTER",0,{max:14},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"CALL_BACK",0,{ringMs:3e4},"CALL_END",0,{quietMs:600,unsaidMs:2e3,maxMs:8e3},"CALL_ENDED_MS",0,12e3,"CALL_HISTORY_PAGE",0,10,"CALL_IDLE",0,{hangUpMs:25e3,warnMs:1e4},"CALL_LINE",0,{dwellMs:2e3,lingerMs:2500,relayLingerMs:5e3,thinkingTailMs:6e3},"CALL_PAGE",0,{scrollback:24,saveFailures:3},"CALL_RELAY",0,{quietMs:2e3,perTurn:3,readMs:15e3,chars:600},"CHATGPT_SIGN_IN",0,{waitMs:6e5,renewBeforeMs:3e5},"COMMON_VALIDATE",0,{name:{max:16},shortDescription:{max:60},description:{max:100},prompt:{max:4e3}},"FILE_THUMB",0,{pageWidth:1024,textWidth:512,textBytes:4096,pages:2,imageWidth:384,cacheSeconds:300},"FINISHED_NOTICE",0,{rows:5,shown:1,words:240},"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"INBOX_POLL_MS",0,3e4,"IS_DEV",0,!1,"KEY_MIN",0,8,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"MARKETING_SKILL",0,"marketing","MAX_PINNED_TOOLS",0,10,"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,descriptionChars:100},"PAGE_SIZE",0,50,"PATHS",0,a,"PROMPT_CROWDED",0,{bots:10,skills:20},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"SKILL_FILES",0,{uploadBytes:0x1400000,inlineBytes:524288,unpackedBytes:0x6400000,archiveEntries:1e3},"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text",autoTurns:10},"TRAVEL_SKILL",0,"travel","WAKE_TOLERANCE",0,.34,"WORKSPACE_VIEW",0,{rows:200,textMax:524288,autoCloseMs:5e3,elementMax:0x3200000}])},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",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),r=e.i(456420);let a={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"}]]};a.node;let n=(0,r.default)(a);var i=e.i(657688),s=e.i(271645),l=e.i(798120),o=e.i(41533),d=e.i(83928),c=e.i(621285),u=e.i(616172),h=e.i(283653),f=e.i(647163);let g=e=>e.split(".").pop()?.toLowerCase()??"file",p=e=>e.split("/").pop()??e;e.s(["Attachments",0,function({text:e,className:r,onBubble:a=!1}){let m=(0,s.useMemo)(()=>(0,u.pathsIn)(e),[e]),{data:x}=(0,h.useServerRoute)(m.length?l.queryKey.workspaceFiles(m):null),y=(0,s.useMemo)(()=>x??[],[x]),k=(0,s.useMemo)(()=>y.filter(e=>"image"===(0,u.viewKindOf)(e.path)),[y]),w=(0,s.useMemo)(()=>{let e=0;return y.filter(t=>{let r=(0,d.faceOf)(t.path,t.bytes);return"text"===r||"page"===r&&(e+=1)<=o.FILE_THUMB.pages})},[y]),v=y.filter(e=>!k.includes(e)&&!w.includes(e)),b=new Set(y.map(e=>p(e.path))),_=m.filter(e=>!y.some(t=>t.path===e)&&!b.has(p(e)));if(!m.length||!x||!y.length&&!_.length)return null;let M=k.map(e=>e.path),E=k.slice(0,4),S=k.length-E.length,O=k.length+w.length<=2,N=O?"h-40 w-32":"h-26.25 w-21";return(0,t.jsxs)("div",{className:(0,f.cn)("flex min-w-0 flex-col gap-1.5",r),children:[(E.length>0||w.length>0)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-1.5",children:[w.map(e=>(0,t.jsxs)(c.FileLink,{path:e.path,title:`${e.path} — ${(0,f.formatBytes)(e.bytes)}`,className:(0,f.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",O?"w-32":"w-21"),children:[(0,t.jsx)(d.FileThumb,{path:e.path,bytes:e.bytes,className:(0,f.cn)("w-full rounded-xl ring-1 ring-foreground/5 ring-inset",N)}),(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:p(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[g(e.path)," · ",(0,f.formatBytes)(e.bytes)]})]})]},e.path)),E.map((e,r)=>(0,t.jsxs)(c.FileLink,{path:e.path,group:M,title:`${e.path} — ${(0,f.formatBytes)(e.bytes)}`,className:(0,f.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",N),children:[(0,t.jsx)(i.default,{src:l.queryKey.file(e.path),alt:p(e.path),fill:!0,sizes:`${o.FILE_THUMB.imageWidth}px`,loading:"lazy",decoding:"async",className:"object-cover"}),S>0&&r===E.length-1&&(0,t.jsxs)("span",{className:"absolute inset-0 grid place-items-center bg-black/45 text-[14px] font-medium text-white",children:["+",S]})]},e.path))]}),v.map(e=>{let r=(0,d.fileIcon)(e.path);return(0,t.jsxs)(c.FileLink,{path:e.path,title:e.path,className:(0,f.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",a?"bg-background/70 hover:bg-background":"bg-muted/70 hover:bg-muted"),children:[(0,t.jsx)("span",{className:(0,f.cn)("grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground",a?"bg-muted":"bg-background"),children:(0,t.jsx)(r,{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:p(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[g(e.path)," · ",(0,f.formatBytes)(e.bytes)]})]})]},e.path)}),_.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:_.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)(n,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate line-through",children:p(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 r=t.trim();if(!r.includes("/"))return e;let[a]=(0,u.pathsIn)(r),n=a?.split("/").pop();return a&&n&&r.endsWith(n)?`\`${n}\``:e})).join("")}],807038)},222055,991322,852116,589128,e=>{"use strict";var t=e.i(843476),r=e.i(422411),a=e.i(518515),n=e.i(525335),i=e.i(689664),s=e.i(716327),l=e.i(482022),o=e.i(772382),d=e.i(60744),c=e.i(226091),u=e.i(91511),h=e.i(341123),f=e.i(815170),g=e.i(758925),p=e.i(218964),m=e.i(632781),x=e.i(468590),y=e.i(928310),k=e.i(609374),w=e.i(730274),v=e.i(604139),b=e.i(438583),_=e.i(747925),M=e.i(657688),E=e.i(271645),S=e.i(798120),O=e.i(660302),N=e.i(818125),L=e.i(671428),T=e.i(633669),j=e.i(41533),A=e.i(213377),R=e.i(807038),I=e.i(456420);let C={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"}]]};C.node;let z=(0,I.default)(C);e.s(["McpMark",0,z],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 B=(0,I.default)(F);e.s(["MemoryMark",0,B],852116);var D=e.i(431594);let H=e.i(856539).BookMarked;e.s(["SkillsMark",0,H],589128);var $=e.i(83928),P=e.i(621285),W=e.i(283653),V=e.i(647163);let U={[A.TOOL_NAMES.web_search]:function({tool:e,threadId:r,collapsed:a}){let n=Q(e),i=n.length?[]:eh(e.results);return(0,t.jsxs)(es,{tool:e,threadId:r,collapsed:a,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep wrap-anywhere",children:["“",e.input,"”"]}),n.length>0&&(0,t.jsx)(T.SourceChips,{sources:n,className:"px-3 pb-2"}),i.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:i.map((e,r)=>(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})]},`${r}-${e}`))})]})},[A.TOOL_NAMES.bash]:function({tool:e,threadId:r,collapsed:a}){let n=eh(e.results);return(0,t.jsx)(es,{tool:e,threadId:r,collapsed:a,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,n.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:n.join("\n")})]})})},[A.TOOL_NAMES.write_file]:function({tool:e,threadId:r,collapsed:a}){let n=e.path??e.input;return(0,t.jsxs)(es,{tool:e,threadId:r,collapsed:a,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)(P.FileLink,{path:n,label:`Open ${n}`,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)(l.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(eu,{lines:eh(e.results),mono:!0})]})}},K=Object.values(A.STUDIO_TOOLS);function q(e){if(e.name!==A.TOOL_NAMES.tool_call)return null;let[t,r,...a]=e.input.split(" ");if(t!==j.STUDIO_SERVER)return null;let n=K.find(e=>e===r);return n?{name:n,words:a.join(" ")}:null}let G={[A.STUDIO_TOOLS.generate_image]:f.Image,[A.STUDIO_TOOLS.generate_video]:b.Video,[A.STUDIO_TOOLS.generate_speech]:r.AudioLines,[A.STUDIO_TOOLS.transcribe]:n.Captions},Y={[A.TOOL_NAMES.web_search]:u.Globe,[A.TOOL_NAMES.bash]:v.Terminal,[A.TOOL_NAMES.write_file]:d.FilePen,[A.TOOL_NAMES.memory_recall]:B,[A.TOOL_NAMES.memory_create]:B,[A.TOOL_NAMES.memory_remember]:B,[A.TOOL_NAMES.memory_describe]:B,[A.TOOL_NAMES.memory_forget]:B,[A.TOOL_NAMES.load_skill]:H,[A.TOOL_NAMES.tool_search]:z,[A.TOOL_NAMES.tool_call]:z,[A.TOOL_NAMES.thread_start]:w.Send,[A.TOOL_NAMES.thread_tell]:w.Send,[A.TOOL_NAMES.thread_answer]:w.Send,[A.TOOL_NAMES.thread_status]:p.ListChecks,[A.TOOL_NAMES.thread_cancel]:p.ListChecks,[A.TOOL_NAMES.thread_show]:p.ListChecks,[A.TOOL_NAMES.thread_seen]:p.ListChecks,[A.TOOL_NAMES.send_message]:x.MessageSquare,[A.TOOL_NAMES.look_at]:o.Eye,[A.TOOL_NAMES.make_deck]:k.Presentation,[A.TOOL_NAMES.describe_self]:h.IdCard,[A.TOOL_NAMES.sign_in_use]:g.KeyRound,[A.TOOL_NAMES.sign_in_keep]:g.KeyRound,[A.TOOL_NAMES.end_call]:y.PhoneOff,[A.TOOL_NAMES.routine]:D.RoutineMark},X=e=>Y[e]??_.Wrench,J=new Set(["cat","sed","head","tail","grep","rg","ls","find","wc","awk","jq"]),Z=e=>e.split("/").pop()??e;function Q(e){return eh(e.results).flatMap(e=>{let t=/https?:\/\/\S+/.exec(e)?.[0];if(!t)return[];let r=e.slice(0,e.indexOf(t)).replace(/[\s—-]+$/,"");return[{url:t,...r?{title:r}:{}}]})}function ee(e){return(0,R.imagePathsIn)([e.path??"",e.input,...eh(e.results)].join("\n"))}function et(e){let t=ee(e)[0],r=q(e);if(r)return{icon:G[r.name]??_.Wrench,image:t,makes:r.name===A.STUDIO_TOOLS.generate_image};if(e.name===A.TOOL_NAMES.web_search)return{icon:u.Globe,pages:Q(e)};if(e.name===A.TOOL_NAMES.write_file)return{icon:d.FilePen,image:t,target:Z(e.path??e.input)};if(e.name!==A.TOOL_NAMES.bash)return{icon:X(e.name),image:t};let n=e.input.replace(/^\s*cd\s+\S+\s*&&\s*/,"").trim(),[i=""]=n.split(/\s+/),s=/(?:^|[\s;&|(])playwright-cli((?:\s+-\S+)*)\s+([a-z-]+)/.exec(n);if(s){if("screenshot"===s[2])return{icon:a.Camera,image:t};let e=/https?:\/\/[^\s'"]+/.exec(n)?.[0];return{icon:u.Globe,host:e&&(0,V.hostOf)(e)||void 0,image:t}}return J.has(i)?{icon:c.FileText,image:t,target:e.path?Z(e.path):void 0}:{icon:v.Terminal,image:t,target:i||void 0}}function er({face:e}){if(e.pages?.length){let r=[...new Set(e.pages.flatMap(e=>(0,V.hostOf)(e.url)??[]))].slice(0,3);return(0,t.jsx)("span",{className:"flex shrink-0 items-center gap-1",children:r.map(e=>(0,t.jsx)(N.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)(N.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 ea="size-36 rounded-xl";function en({tool:e,threadId:r,collapsed:a}){let n=q(e),[i]=ee(e),s=void 0===e.results&&n?.name===A.STUDIO_TOOLS.generate_image;return(0,t.jsxs)(es,{tool:e,threadId:r,collapsed:a,children:[n?.words&&(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep wrap-anywhere",children:["“",n.words,"”"]}),i?(0,t.jsx)(P.FileLink,{path:i,title:i,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)($.FileThumb,{path:i,className:ea})}):s?(0,t.jsx)(L.Skeleton,{className:(0,V.cn)("mx-3 mb-1.5",ea)}):(0,t.jsx)(eu,{lines:eh(e.results)})]})}function ei({tool:e,threadId:r,collapsed:a}){return(0,t.jsxs)(es,{tool:e,threadId:r,collapsed:a,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)(eu,{lines:eh(e.results)})]})}function es({tool:e,threadId:r,collapsed:a=!1,children:n}){let l=void 0===e.results,o=et(e),d=o.icon,[c,u]=(0,E.useState)(!a),h=c||l,f=r&&e.callId&&((e.results?.length??0)>0||e.more);return(0,t.jsxs)("div",{className:(0,V.cn)("@container w-full overflow-hidden rounded-xl transition-colors",h?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":h,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:l?(0,t.jsx)(m.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(d,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(O.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})]}):l?(0,t.jsx)(O.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)(el,{paths:ee(e),waiting:l&&o.makes}),(0,t.jsx)(er,{face:o}),!l&&(0,t.jsx)(i.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(s.ChevronDown,{className:(0,V.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",h&&"rotate-180")})]}),h&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[n,f&&(0,t.jsx)(ed,{threadId:r,callId:e.callId})]})]})}function el({paths:e,waiting:r}){let[a,n]=(0,E.useState)([]),i=e.filter(e=>!a.includes(e)).slice(0,eo);return i.length?(0,t.jsx)("span",{className:"flex shrink-0 items-center",children:i.map((e,r)=>(0,t.jsx)(M.default,{src:S.queryKey.file(e),alt:"",width:48,height:48,loading:"lazy",decoding:"async",onError:()=>n(t=>[...t,e]),className:(0,V.cn)("size-6 rounded-md bg-muted object-cover ring-2 ring-background",r>0&&"-ml-1.5")},e))}):r?(0,t.jsx)(L.Skeleton,{className:"size-6 shrink-0 rounded-md"}):null}let eo=3;function ed({threadId:e,callId:r}){let[a,n]=(0,E.useState)(!1),{data:i,isLoading:l}=(0,W.useServerRoute)(a?S.queryKey.toolResult(e,r):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n(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,V.cn)("size-3",a&&"rotate-180")}),a?"Less":"Everything"]}),a&&(l||!i?(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:[ef(i).map((e,r)=>(0,t.jsx)(ec,{src:e},`${r}-${e.length}`)),eh(i).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:eh(i).join("\n")})]}))]})}function ec({src:e}){let[r,a]=(0,E.useState)(!1);return r?null:(0,t.jsx)("img",{src:e,alt:"",onError:()=>a(!0),className:"block w-full rounded-lg bg-muted object-contain"})}function eu({lines:e,mono:r}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,a)=>(0,t.jsx)("li",{className:(0,V.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",r&&"font-mono"),children:e},`${a}-${e}`))})}let eh=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],ef=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let r=q(e.tool)?en:U[e.tool.name]??ei;return(0,t.jsx)(r,{...e})},"StepTile",0,function({tool:e,onOpen:r}){let a=et(e),[n,i]=(0,E.useState)(!1),s=a.icon;return(0,t.jsx)("button",{type:"button",onClick:r,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:a.image&&!n?(0,t.jsx)(M.default,{src:S.queryKey.file(a.image),alt:"",width:48,height:48,loading:"lazy",decoding:"async",onError:()=>i(!0),className:"size-full object-cover"}):a.host?(0,t.jsx)(N.SiteIcon,{host:a.host,className:"size-3.5 rounded-full",fallback:(0,t.jsx)(s,{className:"size-3"})}):(0,t.jsx)(s,{className:"size-3"})})},"toolIcon",0,X],222055)},256604,567334,877267,e=>{"use strict";let t;var r=e.i(843476),a=e.i(271645);let n=[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],i=n.length,s=["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"];function l(e,t){return c(.05,.42,e/t)}let o={A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]};function d(e,t){let r=43758.5453*Math.sin(127.1*e+311.7*t);return r-Math.floor(r)}function c(e,t,r){let a=Math.min(1,Math.max(0,(r-e)/(t-e)));return a*a*(3-2*a)}function u(){if(t)return t;let e=navigator,r=e.userAgentData?.platform||e.platform||"";return t=/mac|iphone|ipad|ipod/i.test(r)?"emoji":"letters"}Object.keys(o).filter(e=>!/^[A-Z0-9 ]$/.test(e)),e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_POOL",0,s,"FACE_WORD_MAX",0,8,"LETTERS",0,o,"LEVELS",0,i,"RAMP",0,n,"emojiAlpha",0,function(e,t){return .06+.94*l(e,t)},"emojiWeight",0,l,"hash",0,d,"smoothstep",0,c,"undrawable",0,function(e){return Array.from(e.toUpperCase()).find(e=>!(e in o))??null}],567334);let h=()=>()=>{};function f(){return(0,a.useSyncExternalStore)(h,u,()=>"emoji")}e.s(["faceGlyphs",0,u,"useFaceGlyphs",0,f],877267);let g=240/276,p=new Map,m=new Set,x=null;e.s(["THURSDAY_SEED",0,"thursday","ThursdayMark",0,function({size:e=16,className:t}){let i="emoji"===f(),{cells:l,font:o}=function(e){let t=p.get(e);if(t)return t;let r=e*g,a=(e-r)/2,n=Math.max(2,Math.round(r/4)),i=r/n,s=.98*i,l=[];for(let e=0;e<n;e++)for(let t=0;t<n;t++){let o=3===n&&1!==e&&1!==t?.72:1,c=r/2+i*(t+.5-n/2)*o,u=r/2+i*(e+.5-n/2)*o,h=Math.hypot(c-r/2,u-r/2)/(r/2),f=977*n+e*n+t;!(h+(n>=5?(d(f,1)-.5)*.24:0)>.98)&&(n>=8&&d(f,2)<.02+.24*h**3||l.push({seed:f,x:a+c,y:a+u+.36*s,r:h}))}let o={cells:l,font:s};return p.set(e,o),o}(e),[c,u]=(0,a.useState)(0);return(0,a.useEffect)(()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){if(m.add(u),!x){let e=Date.now();x=setInterval(()=>{let t=Date.now()-e;for(let e of m)e(t)},155)}return()=>{m.delete(u),0===m.size&&x&&(clearInterval(x),x=null)}}},[]),(0,r.jsx)("svg",{viewBox:`0 0 ${e} ${e}`,width:e,height:e,className:t,fill:"currentColor","aria-hidden":!0,children:l.map(e=>(0,r.jsx)("text",{x:e.x,y:e.y,textAnchor:"middle",fontFamily:i?'"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif':"ui-monospace, SFMono-Regular, Menlo, monospace",fontWeight:i?void 0:700,fontSize:o,children:function(e,t,r){let a=Math.floor((t+620*d(e.seed,11)*3)/620);if(r){let t=Math.floor(d(e.seed,17)*s.length);return s[(t+9*a)%s.length]}let i=Math.round(5+4*Math.max(0,1-e.r**2)**.6),l=n[Math.min(n.length-1,i)];return l[Math.floor(d(e.seed,a)*l.length)]??" "}(e,c,i)},e.seed))})}],256604)},83928,e=>{"use strict";var t=e.i(843476),r=e.i(829600),a=e.i(989360),n=e.i(575780),i=e.i(905015),s=e.i(693819),l=e.i(226091),o=e.i(227148),d=e.i(941464),c=e.i(51921),u=e.i(609374),h=e.i(657688),f=e.i(271645),g=e.i(798120),p=e.i(683408),m=e.i(41533),x=e.i(616172),y=e.i(647163);let k={markdown:l.FileText,csv:s.FileSpreadsheet,json:i.FileJson,text:o.FileType,image:n.FileImage,audio:c.Music,video:d.FileVideo},w={pdf:l.FileText,html:a.FileCode,htm:a.FileCode,docx:o.FileType,xlsx:s.FileSpreadsheet,pptx:u.Presentation};function v(e){return w[(0,x.extensionOf)(e)]??k[(0,x.viewKindOf)(e)]??r.File}let b=new Set(["markdown","text","csv","json"]);function _(e,t){let r=(0,x.viewKindOf)(e);return void 0!==t&&t>m.WORKSPACE_VIEW.elementMax?"glyph":"image"===r?"image":"frame"===r&&/\.html?$/i.test(e)?"page":b.has(r)?"text":"glyph"}function M({width:e,className:r,children:a}){let n=(0,f.useRef)(null),[i,s]=(0,f.useState)(null);(0,f.useLayoutEffect)(()=>{let e=n.current;if(!e)return;let t=()=>s({w:e.clientWidth,h:e.clientHeight});t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[]);let l=i?i.w/e:0;return(0,t.jsx)("span",{ref:n,"aria-hidden":!0,className:(0,y.cn)("relative block overflow-hidden",r),children:l>0&&i&&(0,t.jsx)("span",{className:"absolute top-0 left-0 block origin-top-left",style:{width:e,transform:`scale(${l})`},children:a(Math.ceil(i.h/l))})})}function E({path:e,onMissing:r}){let[a,n]=(0,f.useState)(null);return((0,f.useEffect)(()=>{let t=new AbortController;return fetch(g.queryKey.file(e),{headers:{range:`bytes=0-${m.FILE_THUMB.textBytes-1}`},signal:t.signal}).then(e=>e.ok?e.text():Promise.reject()).then(e=>n(e.replace(/\uFFFD+$/,""))).catch(()=>{t.signal.aborted||r()}),()=>t.abort()},[e,r]),null===a)?null:"markdown"===(0,x.viewKindOf)(e)?(0,t.jsx)("div",{className:"pointer-events-none px-9 py-8 text-[15px] text-foreground",children:(0,t.jsx)(p.Markdown,{controls:!1,components:{a:"span"},children:a})}):(0,t.jsx)("pre",{className:"pointer-events-none px-7 py-6 font-mono text-[13px] leading-relaxed whitespace-pre-wrap text-foreground",children:a})}e.s(["FileThumb",0,function({path:e,bytes:r,glyph:a="size-4",className:n}){let[i,s]=(0,f.useState)(!1),l=(0,f.useCallback)(()=>s(!0),[]),o=i?"glyph":_(e,r);if("image"===o)return(0,t.jsx)("span",{className:(0,y.cn)("relative block overflow-hidden bg-muted",n),children:(0,t.jsx)(h.default,{src:g.queryKey.file(e),alt:"",fill:!0,sizes:`${m.FILE_THUMB.imageWidth}px`,loading:"lazy",decoding:"async",onError:()=>s(!0),className:"object-cover dark:brightness-[0.82]"})});if("page"===o)return(0,t.jsx)(M,{width:m.FILE_THUMB.pageWidth,className:(0,y.cn)("bg-white dark:brightness-[0.82]",n),children:r=>(0,t.jsx)("iframe",{title:"",src:g.queryKey.fileFace(e),sandbox:"allow-scripts",loading:"lazy",tabIndex:-1,"aria-hidden":!0,scrolling:"no",style:{width:m.FILE_THUMB.pageWidth,height:r},className:"pointer-events-none block border-0 bg-white"})});if("text"===o)return(0,t.jsx)(M,{width:m.FILE_THUMB.textWidth,className:(0,y.cn)("bg-background dark:brightness-[0.82]",n),children:()=>(0,t.jsx)(E,{path:e,onMissing:l})});let d=v(e);return(0,t.jsx)("span",{className:(0,y.cn)("grid place-items-center bg-muted text-muted-foreground",n),children:(0,t.jsx)(d,{className:a})})},"faceOf",0,_,"fileIcon",0,v])},260891,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(708445),a=e.i(146376),n=e.i(108868),i=e.i(667865),s=e.i(446265),l=e.i(328744),o=e.i(229315),d=e.i(675606),c=e.i(56434),u=e.i(46420),h=e.i(621082),f=e.i(449055),g=e.i(584446),p=e.i(596296),m=e.i(503596),x=e.i(157940);function y(e){return l.platform.engine.webkit&&0===e.movementX&&0===e.movementY}function k(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function w(e,t){return k(t,e===f.ARROW_UP||e===f.ARROW_DOWN,e===f.ARROW_LEFT||e===f.ARROW_RIGHT)}function v(e,t,r){return k(t,e===f.ARROW_DOWN,r?e===f.ARROW_LEFT:e===f.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}e.s(["useListNavigation",0,function(e,l){let{listRef:b,activeIndex:_,onNavigate:M=()=>{},enabled:E=!0,selectedIndex:S=null,allowEscape:O=!1,loopFocus:N=!1,nested:L=!1,rtl:T=!1,virtual:j=!1,focusItemOnOpen:A="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:I=!0,disabledIndices:C,orientation:z="vertical",parentOrientation:F,id:B,resetOnPointerLeave:D=!0,externalTree:H,grid:$}=l,P=null!=$,W="rootStore"in e?e.rootStore:e,V=W.useState("open"),U=W.useState("floatingElement"),K=W.useState("domReferenceElement"),q=W.context.dataRef,G=(0,p.getFloatingFocusElement)(U),Y=(0,p.isTypeableCombobox)(K),X=(0,s.useValueAsRef)(G),J=(0,u.useFloatingParentNodeId)(),Z=(0,u.useFloatingTree)(H),Q=t.useRef(A),ee=t.useRef(S??-1),et=t.useRef(null),er=t.useRef(!0),ea=(0,i.useStableCallback)(e=>{M(-1===ee.current?null:ee.current,e)}),en=t.useRef(!!U),ei=t.useRef(V),es=t.useRef(!1),el=t.useRef(!1),eo=t.useRef(null),ed=(0,s.useValueAsRef)(C),ec=(0,s.useValueAsRef)(V),eu=(0,s.useValueAsRef)(S),eh=(0,s.useValueAsRef)(D),ef=(0,r.useAnimationFrame)(),eg=(0,r.useAnimationFrame)(),ep=(0,i.useStableCallback)(()=>{function e(e){j?Z?.events.emit("virtualfocus",e):eo.current=(0,m.enqueueFocus)(e,{sync:es.current,preventScroll:!0})}let t=b.current[ee.current],r=el.current;t&&e(t),(es.current?e=>e():e=>ef.request(e))(()=>{let a=b.current[ee.current]||t;!a||(t||e(a),ev&&(r||!er.current)&&a.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,a.useIsoLayoutEffect)(()=>{q.current.orientation=z},[q,z]),(0,a.useIsoLayoutEffect)(()=>{E&&(V&&U?(ee.current=S??-1,Q.current&&null!=S&&(el.current=!0,ea())):en.current&&(ee.current=-1,ea()))},[E,V,U,S,ea]),(0,a.useIsoLayoutEffect)(()=>{if(E){if(!V){es.current=!1;return}if(U)if(null==_){if(es.current=!1,null!=eu.current)return;if(en.current&&(ee.current=-1,ep()),(!ei.current||!en.current)&&Q.current&&(null!=et.current||!0===Q.current&&null==et.current)){let e=0,t=()=>{null==b.current[0]?(e<2&&(e?e=>eg.request(e):queueMicrotask)(t),e+=1):(ee.current=null==et.current||v(et.current,z,T)||L?(0,h.getMinListIndex)(b):(0,h.getMaxListIndex)(b),et.current=null,ea())};t()}}else(0,h.isIndexOutOfListBounds)(b.current,_)||(ee.current=_,ep(),el.current=!1)}},[E,V,U,_,eu,L,b,z,T,ea,ep,eg]),(0,a.useIsoLayoutEffect)(()=>{if(!E||U||!Z||j||!en.current)return;let e=Z.nodesRef.current,t=e.find(e=>e.id===J)?.context?.elements.floating,r=(0,g.activeElement)((0,n.ownerDocument)(K??t??null)),a=e.some(e=>e.context&&(0,g.contains)(e.context.elements.floating,r));t&&!a&&er.current&&t.focus({preventScroll:!0})},[E,U,K,Z,J,j]),(0,a.useIsoLayoutEffect)(()=>{ei.current=V,en.current=!!U}),(0,a.useIsoLayoutEffect)(()=>{V||(et.current=null,Q.current=A)},[V,A]);let em=null!=_,ex=(0,i.useStableCallback)(e=>{if(!ec.current)return;let t=b.current.indexOf(e.currentTarget);-1!==t&&(ee.current!==t||_!==t)&&(ee.current=t,ea(e))}),ey=(0,i.useStableCallback)(()=>F??Z?.nodesRef.current.find(e=>e.id===J)?.context?.dataRef?.current.orientation),ek=(0,i.useStableCallback)(()=>(0,h.getMinListIndex)(b,ed.current)),ew=(0,i.useStableCallback)(e=>{var t;let r,a;if(er.current=!1,es.current=!0,229===e.which||!ec.current&&e.currentTarget===X.current)return;if(L&&(t=e.key,r=T?t===f.ARROW_RIGHT:t===f.ARROW_LEFT,a=t===f.ARROW_UP,"both"===z||"horizontal"===z&&P?"Escape"===t:k(z,r,a))){w(e.key,ey())||(0,x.stopEvent)(e),W.setOpen(!1,(0,d.createChangeEventDetails)(c.REASONS.listNavigation,e.nativeEvent)),(0,o.isHTMLElement)(K)&&(j?Z?.events.emit("virtualfocus",K):K.focus());return}let n=ee.current,i=(0,h.getMinListIndex)(b,C),s=(0,h.getMaxListIndex)(b,C);if(Y||("Home"===e.key&&((0,x.stopEvent)(e),ee.current=i,ea(e)),"End"===e.key&&((0,x.stopEvent)(e),ee.current=s,ea(e))),null!=$){let t=$(e,ee.current,b,z,N,T,C,i,s);if(null!=t&&(ee.current=t,ea(e)),"both"===z)return}if(w(e.key,z)){if((0,x.stopEvent)(e),V&&!j&&(0,g.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){ee.current=v(e.key,z,T)?i:s,ea(e);return}v(e.key,z,T)?N?n>=s?O&&n!==b.current.length?ee.current=-1:(es.current=!1,ee.current=i):ee.current=(0,h.findNonDisabledListIndex)(b.current,{startingIndex:n,disabledIndices:C}):ee.current=Math.min(s,(0,h.findNonDisabledListIndex)(b.current,{startingIndex:n,disabledIndices:C})):N?n<=i?O&&-1!==n?ee.current=b.current.length:(es.current=!1,ee.current=s):ee.current=(0,h.findNonDisabledListIndex)(b.current,{startingIndex:n,decrement:!0,disabledIndices:C}):ee.current=Math.max(i,(0,h.findNonDisabledListIndex)(b.current,{startingIndex:n,decrement:!0,disabledIndices:C})),(0,h.isIndexOutOfListBounds)(b.current,ee.current)&&(ee.current=-1),ea(e)}}),ev=t.useMemo(()=>({onFocus(e){es.current=!0,ex(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){!y(e)&&(es.current=!0,el.current=!1,R&&ex(e))},onPointerLeave(e){if(!ec.current||!er.current||"touch"===e.pointerType)return;es.current=!0;let t=e.relatedTarget;if(!(!R||b.current.includes(t))&&eh.current&&(eo.current?.(),eo.current=null,ee.current=-1,ea(e),!j)){let e=X.current,t=(0,g.activeElement)((0,n.ownerDocument)(e));e&&(0,g.contains)(e,t)&&e.focus({preventScroll:!0})}}}),[ex,ec,X,R,b,ea,eh,j]),eb=t.useMemo(()=>j&&V&&em&&{"aria-activedescendant":`${B}-${_}`},[j,V,em,B,_]),e_=t.useMemo(()=>({...!Y?eb:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&V&&!j){let t=(0,g.getTarget)(e.nativeEvent);if(t&&!(0,g.contains)(X.current,t))return;(0,x.stopEvent)(e),W.setOpen(!1,(0,d.createChangeEventDetails)(c.REASONS.focusOut,e.nativeEvent)),(0,o.isHTMLElement)(K)&&K.focus();return}ew(e)},onPointerMove(e){y(e)||(er.current=!0)}}),[eb,ew,X,Y,W,V,j,K]),eM=t.useMemo(()=>{function e(e){W.setOpen(!0,(0,d.createChangeEventDetails)(c.REASONS.listNavigation,e.nativeEvent,e.currentTarget))}function t(e){"auto"===A&&(0,x.isVirtualClick)(e.nativeEvent)&&(Q.current=!j)}function r(e){Q.current=A,"auto"===A&&(0,x.isVirtualPointerEvent)(e.nativeEvent)&&(Q.current=!0)}return{onKeyDown(t){var r,a;let n=W.select("open");er.current=!1;let i=t.key.startsWith("Arrow"),s=(r=t.key,a=ey(),k(a,T?r===f.ARROW_LEFT:r===f.ARROW_RIGHT,r===f.ARROW_DOWN)),l=w(t.key,z),o=(L?s:l)||"Enter"===t.key||""===t.key.trim();if(j&&n)return ew(t);if(n||I||!i){if(o){let e=w(t.key,ey());et.current=L&&e?null:t.key}if(L){s&&((0,x.stopEvent)(t),n?(ee.current=ek(),ea(t)):e(t));return}l&&(null!=eu.current&&(ee.current=eu.current),(0,x.stopEvent)(t),!n&&I?e(t):ew(t),n&&ea(t))}},onFocus(e){W.select("open")&&!j&&(ee.current=-1,ea(e))},onPointerDown:r,onPointerEnter:r,onMouseDown:t,onClick:t}},[ew,A,ek,L,ea,W,I,z,ey,T,eu,j]),eE=t.useMemo(()=>({...eb,...eM}),[eb,eM]);return t.useMemo(()=>E?{reference:eE,floating:e_,item:ev,trigger:eM}:{},[E,eE,e_,eM,ev])}])},736760,e=>{"use strict";var t=e.i(271645),r=e.i(146376),a=e.i(667865),n=e.i(439957),i=e.i(956789),s=e.i(621082),l=e.i(584446),o=e.i(157940);e.s(["useTypeahead",0,function(e,d){let{listRef:c,elementsRef:u,activeIndex:h,onMatch:f,disabledIndices:g,onTyping:p,enabled:m=!0,resetMs:x=750,selectedIndex:y=null}=d,k="rootStore"in e?e.rootStore:e,w=k.useState("open"),v=(0,n.useTimeout)(),b=t.useRef(""),_=t.useRef(y??h??-1),M=t.useRef(null),E=(0,a.useStableCallback)(e=>{function t(e){let t=u?.current[e];return!(t&&!(0,s.isElementVisible)(t)||t?.matches(":disabled"))&&(null==g||!(0,s.isListIndexDisabled)(i.EMPTY_ARRAY,e,g))}function r(e,a,n=0){if(0===e.length)return -1;let i=(n%e.length+e.length)%e.length,s=a.toLowerCase();for(let r=0;r<e.length;r+=1){let a=(i+r)%e.length,n=e[a];if(n?.toLowerCase().startsWith(s)&&t(a))return a}return -1}let a=c.current;if(b.current.length>0&&" "===e.key&&((0,o.stopEvent)(e),p?.(!0)),b.current.length>0&&" "!==b.current[0]&&-1===r(a,b.current)&&" "!==e.key&&p?.(!1),null==a||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;w&&" "!==e.key&&((0,o.stopEvent)(e),p?.(!0));let n=""===b.current;n&&(_.current=y??h??-1),a.every((e,r)=>!(e&&t(r))||e[0]?.toLowerCase()!==e[1]?.toLowerCase())&&b.current===e.key&&(b.current="",_.current=M.current),b.current+=e.key,v.start(x,()=>{b.current="",_.current=M.current,p?.(!1)});let l=n?y??h??-1:_.current,d=r(a,b.current,(l??0)+1);-1!==d?(f?.(d),M.current=d):" "!==e.key&&(b.current="",p?.(!1))}),S=(0,a.useStableCallback)(e=>{let t=e.relatedTarget,r=k.select("domReferenceElement"),a=k.select("floatingElement");(0,l.contains)(r,t)||(0,l.contains)(a,t)||(v.clear(),b.current="",_.current=M.current,p?.(!1))});(0,r.useIsoLayoutEffect)(()=>{(w||null===y)&&(v.clear(),M.current=null,""!==b.current&&(b.current=""))},[w,y,v]);let O=t.useMemo(()=>({onKeyDown:E,onBlur:S}),[E,S]);return t.useMemo(()=>m?{reference:O,floating:O}:{},[m,O])}])},348990,431594,e=>{"use strict";var t=e.i(956789),r=e.i(552245),a=e.i(395530);e.s(["CompositeItem",0,function(e){let{render:n,className:i,style:s,state:l=t.EMPTY_OBJECT,props:o=t.EMPTY_ARRAY,refs:d=t.EMPTY_ARRAY,metadata:c,stateAttributesMapping:u,tag:h="div",...f}=e,{compositeProps:g,compositeRef:p}=(0,a.useCompositeItem)({metadata:c});return(0,r.useRenderElement)(h,e,{state:l,ref:[p,...d],props:[g,...o,f],stateAttributesMapping:u})}],348990);var n=e.i(456420);let i={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"}]]};i.node;let s=(0,n.default)(i);e.s(["RoutineMark",0,s],431594)},264042,e=>{"use strict";var t=e.i(333848),r=e.i(328744);e.s(["isMouseWithinBounds",0,function(e,a){let n=function(e){let a=e.getBoundingClientRect(),n=(0,t.ownerWindow)(e);if(r.platform.env.jsdom)return a;let i=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if("none"===i.content&&"none"===s.content)return a;let l=parseFloat(i.width)||0,o=parseFloat(i.height)||0,d=parseFloat(s.width)||0,c=parseFloat(s.height)||0,u=Math.max(a.width,l,d),h=Math.max(a.height,o,c),f=u-a.width,g=h-a.height;return{left:a.left-f/2,right:a.right+f/2,top:a.top-g/2,bottom:a.bottom+g/2}}(a);return e.clientX>=n.left-5&&e.clientX<=n.right+5&&e.clientY>=n.top-5&&e.clientY<=n.bottom+5}])},856539,e=>{"use strict";var t=e.i(456420);let r={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"]};r.node;let a=(0,t.default)(r);e.s(["BookMarked",0,a],856539)},518515,772382,60744,341123,218964,468590,928310,730274,604139,e=>{"use strict";var t=e.i(456420);let r={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"}]]};r.node;let a=(0,t.default)(r);e.s(["Camera",0,a],518515);let n={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"}]]};n.node;let i=(0,t.default)(n);e.s(["Eye",0,i],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 l=(0,t.default)(s);e.s(["FilePen",0,l],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 f=(0,t.default)(h);e.s(["MessageSquare",0,f],468590);let g={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"}]]};g.node;let p=(0,t.default)(g);e.s(["PhoneOff",0,p],928310);let m={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"}]]};m.node;let x=(0,t.default)(m);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)},867927,986253,e=>{"use strict";var t=e.i(456420);let r={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};r.node;let a=(0,t.default)(r);e.s(["default",0,a],986253),e.s(["ChevronRight",0,a],867927)},482022,e=>{"use strict";var t=e.i(456420);let r={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};r.node;let a=(0,t.default)(r);e.s(["ExternalLink",0,a],482022)},905015,51921,e=>{"use strict";var t=e.i(456420);let r={name:"file-braces",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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};r.node;let a=(0,t.default)(r);e.s(["FileJson",0,a],905015);let n={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};n.node;let i=(0,t.default)(n);e.s(["Music",0,i],51921)},989360,575780,693819,227148,941464,e=>{"use strict";var t=e.i(456420);let r={name:"file-code",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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]};r.node;let a=(0,t.default)(r);e.s(["FileCode",0,a],989360);let n={name:"file-image",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"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]};n.node;let i=(0,t.default)(n);e.s(["FileImage",0,i],575780);let s={name:"file-spreadsheet",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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]};s.node;let l=(0,t.default)(s);e.s(["FileSpreadsheet",0,l],693819);let o={name:"file-type",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:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]]};o.node;let d=(0,t.default)(o);e.s(["FileType",0,d],227148);let c={name:"file-play",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:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]],aliases:["file-video"]};c.node;let u=(0,t.default)(c);e.s(["FileVideo",0,u],941464)},226091,e=>{"use strict";var t=e.i(456420);let r={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"}]]};r.node;let a=(0,t.default)(r);e.s(["FileText",0,a],226091)},829600,e=>{"use strict";var t=e.i(456420);let r={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"}]]};r.node;let a=(0,t.default)(r);e.s(["File",0,a],829600)},91511,e=>{"use strict";var t=e.i(456420);let r={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"}]]};r.node;let a=(0,t.default)(r);e.s(["Globe",0,a],91511)},815170,e=>{"use strict";var t=e.i(456420);let r={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"}]]};r.node;let a=(0,t.default)(r);e.s(["Image",0,a],815170)},758925,e=>{"use strict";var t=e.i(456420);let r={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};r.node;let a=(0,t.default)(r);e.s(["KeyRound",0,a],758925)},609374,e=>{"use strict";var t=e.i(456420);let r={name:"presentation",size:24,node:[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]};r.node;let a=(0,t.default)(r);e.s(["Presentation",0,a],609374)},438583,e=>{"use strict";var t=e.i(456420);let r={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"}]]};r.node;let a=(0,t.default)(r);e.s(["Video",0,a],438583)},747925,e=>{"use strict";var t=e.i(456420);let r={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"}]]};r.node;let a=(0,t.default)(r);e.s(["Wrench",0,a],747925)},696017,e=>{"use strict";var t=e.i(60231),r=e.i(419524);e.i(947716);var a=e.i(723685),n=(0,r.__name)(e=>{let{securityLevel:r}=(0,t.getConfig2)(),n=(0,a.select)("body");if("sandbox"===r){let t=(0,a.select)(`#i${e}`),r=t.node()?.contentDocument??document;n=(0,a.select)(r.body)}return n.select(`#${e}`)},"selectSvgElement");e.s(["selectSvgElement",0,n])},502056,e=>{"use strict";var t=e.i(217248),r=e.i(447804),a=e.i(508324),n=e.i(419524),i=(0,n.__name)(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:t+r}},"getSubGraphTitleMargins"),s=new Map;async function l(e,a,n){let i,l;"rect"===a.shape&&(a.rx&&a.ry?a.shape="roundedRect":a.shape="squareRect");let o=a.shape?t.shapes[a.shape]:void 0;if(!o)throw Error(`No such shape: ${a.shape}. Please check your syntax.`);if(a.link){let t;"sandbox"===n.config.securityLevel?t="_top":a.linkTarget&&(t=a.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",a.link).attr("target",t??null),l=await o(i,a,n)}else i=l=await o(e,a,n);return i.attr("data-look",(0,r.handleUndefinedAttr)(a.look)),a.tooltip&&l.attr("title",a.tooltip),s.set(a.id,i),a.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,n.__name)(l,"insertNode");var o=(0,n.__name)((e,t)=>{s.set(t.id,e)},"setNodeElem"),d=(0,n.__name)(()=>{s.clear()},"clear"),c=(0,n.__name)(e=>{let t=s.get(e.id);a.log.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode");e.s(["clear",0,d,"getSubGraphTitleMargins",0,i,"insertNode",0,l,"positionNode",0,c,"setNodeElem",0,o])},369110,e=>{"use strict";var t=e.i(502056),r=e.i(217248),a=e.i(224797),n=e.i(836333),i=e.i(60231),s=e.i(508324),l=e.i(419524);e.i(947716);var o=e.i(723685),d=e.i(883272),c=(0,l.__name)(async(e,t)=>{let l,c,u=(0,i.getConfig2)(),{themeVariables:h,handDrawnSeed:f}=u,{clusterBkg:g,clusterBorder:p}=h,{labelStyles:m,nodeStyles:x,borderStyles:y,backgroundStyles:k}=(0,a.styles2String)(t),w=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),v=(0,i.evaluate)(u.flowchart.htmlLabels),b="LR"===t.direction,_=w.insert("g").attr("class","cluster-label swimlane-label"),M=await (0,n.createText)(_,t.label,{style:t.labelStyle,useHtmlLabels:v,isNode:!0,width:t.width}),E=M.getBBox();if(v){let e=M.children[0],t=(0,o.select)(M);E=e.getBoundingClientRect(),t.attr("width",E.width),t.attr("height",E.height)}let S=t.padding??0,O=t.width<=E.width+S?E.width+S:t.width;t.width<=E.width+S?t.diff=(O-t.width)/2-S:t.diff=-S;let N=t.height,L=t.y-N/2,T=t.y+N/2,j=t.x-O/2,A=void 0!==t.swimlaneContentTop?t.swimlaneContentTop:L+N/3,R=4*!!b,I=E.height+2*R;if(b){let e=Math.max(I,E.height+2*R),r=j+e,n=Math.max(0,O-e);if("handDrawn"===t.look){let i=d.default.svg(w),s=(0,a.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:p,fillWeight:3,seed:f}),o=(0,a.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:p,seed:f}),u=i.rectangle(j,L,e,N,s);l=w.insert(()=>u,":first-child");let h=i.rectangle(r,L,n,N,o);c=w.insert(()=>h,":first-child"),l.select("path:nth-child(2)").attr("style",y.join(";")),l.select("path").attr("style",k.join(";").replace("fill","stroke"))}else l=w.insert("rect",":first-child"),c=w.insert("rect",":first-child"),l.attr("class","swimlane-title").attr("style",x).attr("x",j).attr("y",L).attr("width",e).attr("height",N).attr("fill",g).attr("stroke",p),c.attr("class","swimlane-body").attr("style",x).attr("x",r).attr("y",L).attr("width",n).attr("height",N).attr("fill","none").attr("stroke",p);let i=j+e/2,s=t.y;_.attr("transform",`translate(${i}, ${s}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let e=Math.min(I,Math.max(0,A-L)),r=L+e,n=Math.max(0,T-r),i=t.x-O/2;if("handDrawn"===t.look){let s=d.default.svg(w),o=(0,a.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:p,fillWeight:3,seed:f}),u=(0,a.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:p,seed:f}),h=s.rectangle(i,L,O,e,o);l=w.insert(()=>h,":first-child");let m=s.rectangle(i,r,O,n,u);c=w.insert(()=>m,":first-child"),l.select("path:nth-child(2)").attr("style",y.join(";")),l.select("path").attr("style",k.join(";").replace("fill","stroke"))}else l=w.insert("rect",":first-child"),c=w.insert("rect",":first-child"),l.attr("class","swimlane-title").attr("style",x).attr("x",i).attr("y",L).attr("width",O).attr("height",e).attr("fill",g).attr("stroke",p),c.attr("class","swimlane-body").attr("style",x).attr("x",i).attr("y",r).attr("width",O).attr("height",n).attr("fill","none").attr("stroke",p);let s=t.x-E.width/2,o=L+(e-E.height)/2;_.attr("transform",`translate(${s}, ${o})`)}if(s.log.trace("Swimlane data ",t,JSON.stringify(t)),m){let e=_.select("span");e&&e.attr("style",m)}return t.offsetX=0,t.width=O,t.height=N,t.offsetY=E.height-S/2,t.intersect=function(e){return(0,r.intersect_rect_default)(t,e)},{cluster:w,labelBBox:E}},"swimlane"),u=(0,l.__name)(async(e,l)=>{let c,u;s.log.info("Creating subgraph rect for ",l.id,l);let h=(0,i.getConfig2)(),{themeVariables:f,handDrawnSeed:g}=h,{clusterBkg:p,clusterBorder:m}=f,{labelStyles:x,nodeStyles:y,borderStyles:k,backgroundStyles:w}=(0,a.styles2String)(l),v=e.insert("g").attr("class","cluster "+l.cssClasses).attr("id",l.domId).attr("data-look",l.look),b=(0,i.getEffectiveHtmlLabels)(h),_=v.insert("g").attr("class","cluster-label "),M=(c="markdown"===l.labelType?await (0,n.createText)(_,l.label,{style:l.labelStyle,useHtmlLabels:b,isNode:!0,width:l.width}):await (0,r.createLabel_default)(_,l.label,l.labelStyle||"",!1,!0)).getBBox();if((0,i.getEffectiveHtmlLabels)(h)){let e=c.children[0],t=(0,o.select)(c);M=e.getBoundingClientRect(),t.attr("width",M.width),t.attr("height",M.height)}let E=l.width<=M.width+l.padding?M.width+l.padding:l.width;l.width<=M.width+l.padding?l.diff=(E-l.width)/2-l.padding:l.diff=-l.padding;let S=l.height,O=l.x-E/2,N=l.y-S/2;if(s.log.trace("Data ",l,JSON.stringify(l)),"handDrawn"===l.look){let e=d.default.svg(v),t=(0,a.userNodeOverrides)(l,{roughness:.7,fill:p,stroke:m,fillWeight:3,seed:g}),n=e.path((0,r.createRoundedRectPathD)(O,N,E,S,0),t);(u=v.insert(()=>(s.log.debug("Rough node insert CXC",n),n),":first-child")).select("path:nth-child(2)").attr("style",k.join(";")),u.select("path").attr("style",w.join(";").replace("fill","stroke"))}else(u=v.insert("rect",":first-child")).attr("style",y).attr("rx",l.rx).attr("ry",l.ry).attr("x",O).attr("y",N).attr("width",E).attr("height",S);let{subGraphTitleTopMargin:L}=(0,t.getSubGraphTitleMargins)(h);if(_.attr("transform",`translate(${l.x-M.width/2}, ${l.y-l.height/2+L})`),x){let e=_.select("span");e&&e.attr("style",x)}let T=u.node().getBBox();return l.offsetX=0,l.width=T.width,l.height=T.height,l.offsetY=M.height-l.padding/2,l.intersect=function(e){return(0,r.intersect_rect_default)(l,e)},{cluster:v,labelBBox:M}},"rect"),h=(0,l.__name)((e,t)=>{let a=e.insert("g").attr("class","note-cluster").attr("id",t.domId),n=a.insert("rect",":first-child"),i=0*t.padding,s=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");let l=n.node().getBBox();return t.width=l.width,t.height=l.height,t.intersect=function(e){return(0,r.intersect_rect_default)(t,e)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),f=(0,l.__name)(async(e,t)=>{let a,n=(0,i.getConfig2)(),{themeVariables:s,handDrawnSeed:l}=n,{altBackground:c,compositeBackground:u,compositeTitleBackground:h,nodeBorder:f}=s,g=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),p=g.insert("g",":first-child"),m=g.insert("g").attr("class","cluster-label"),x=g.append("rect"),y=await (0,r.createLabel_default)(m,t.label,t.labelStyle,void 0,!0),k=y.getBBox();if((0,i.getEffectiveHtmlLabels)(n)){let e=y.children[0],t=(0,o.select)(y);k=e.getBoundingClientRect(),t.attr("width",k.width),t.attr("height",k.height)}let w=0*t.padding,v=(t.width<=k.width+t.padding?k.width+t.padding:t.width)+w;t.width<=k.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;let b=t.height+w,_=t.height+w-k.height-6,M=t.x-v/2,E=t.y-b/2;t.width=v;let S=t.y-t.height/2-w/2+k.height+2;if("handDrawn"===t.look){let e=t.cssClasses.includes("statediagram-cluster-alt"),n=d.default.svg(g),i=t.rx||t.ry?n.path((0,r.createRoundedRectPathD)(M,E,v,b,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:f,seed:l}):n.rectangle(M,E,v,b,{seed:l});a=g.insert(()=>i,":first-child");let s=n.rectangle(M,S,v,_,{fill:e?c:u,fillStyle:e?"hachure":"solid",stroke:f,seed:l});a=g.insert(()=>i,":first-child"),x=g.insert(()=>s)}else(a=p.insert("rect",":first-child")).attr("class","outer").attr("x",M).attr("y",E).attr("width",v).attr("height",b).attr("data-look",t.look),x.attr("class","inner").attr("x",M).attr("y",S).attr("width",v).attr("height",_);return m.attr("transform",`translate(${t.x-k.width/2}, ${E+1-3*!(0,i.getEffectiveHtmlLabels)(n)})`),t.height=a.node().getBBox().height,t.offsetX=0,t.offsetY=k.height-t.padding/2,t.labelBBox=k,t.intersect=function(e){return(0,r.intersect_rect_default)(t,e)},{cluster:g,labelBBox:k}},"roundedWithTitle"),g=(0,l.__name)(async(e,l)=>{let c;s.log.info("Creating subgraph rect for ",l.id,l);let u=(0,i.getConfig2)(),{themeVariables:h,handDrawnSeed:f}=u,{clusterBkg:g,clusterBorder:p}=h,{labelStyles:m,nodeStyles:x,borderStyles:y,backgroundStyles:k}=(0,a.styles2String)(l),w=e.insert("g").attr("class","cluster "+l.cssClasses).attr("id",l.domId).attr("data-look",l.look),v=(0,i.getEffectiveHtmlLabels)(u),b=w.insert("g").attr("class","cluster-label "),_=await (0,n.createText)(b,l.label,{style:l.labelStyle,useHtmlLabels:v,isNode:!0,width:l.width}),M=_.getBBox();if((0,i.getEffectiveHtmlLabels)(u)){let e=_.children[0],t=(0,o.select)(_);M=e.getBoundingClientRect(),t.attr("width",M.width),t.attr("height",M.height)}let E=l.width<=M.width+l.padding?M.width+l.padding:l.width;l.width<=M.width+l.padding?l.diff=(E-l.width)/2-l.padding:l.diff=-l.padding;let S=l.height,O=l.x-E/2,N=l.y-S/2;if(s.log.trace("Data ",l,JSON.stringify(l)),"handDrawn"===l.look){let e=d.default.svg(w),t=(0,a.userNodeOverrides)(l,{roughness:.7,fill:g,stroke:p,fillWeight:4,seed:f}),n=e.path((0,r.createRoundedRectPathD)(O,N,E,S,l.rx),t);(c=w.insert(()=>(s.log.debug("Rough node insert CXC",n),n),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),c.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(c=w.insert("rect",":first-child")).attr("style",x).attr("rx",l.rx).attr("ry",l.ry).attr("x",O).attr("y",N).attr("width",E).attr("height",S);let{subGraphTitleTopMargin:L}=(0,t.getSubGraphTitleMargins)(u);if(b.attr("transform",`translate(${l.x-M.width/2}, ${l.y-l.height/2+L})`),m){let e=b.select("span");e&&e.attr("style",m)}let T=c.node().getBBox();return l.offsetX=0,l.width=T.width,l.height=T.height,l.offsetY=M.height-l.padding/2,l.intersect=function(e){return(0,r.intersect_rect_default)(l,e)},{cluster:w,labelBBox:M}},"kanbanSection"),p={rect:u,squareRect:u,roundedWithTitle:f,noteGroup:h,divider:(0,l.__name)((e,t)=>{let a,{themeVariables:n,handDrawnSeed:s}=(0,i.getConfig2)(),{nodeBorder:l}=n,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),c=o.insert("g",":first-child"),u=0*t.padding,h=t.width+u;t.diff=-t.padding;let f=t.height+u,g=t.x-h/2,p=t.y-f/2;if(t.width=h,"handDrawn"===t.look){let e=d.default.svg(o).rectangle(g,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:l,seed:s});a=o.insert(()=>e,":first-child")}else{a=c.insert("rect",":first-child");let e="outer";t.look,e="divider",a.attr("class",e).attr("x",g).attr("y",p).attr("width",h).attr("height",f).attr("data-look",t.look)}return t.height=a.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return(0,r.intersect_rect_default)(t,e)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:g,swimlane:c},m=new Map,x=(0,l.__name)(async(e,t)=>{let r=t.shape||"rect",a=await p[r](e,t);return m.set(t.id,a),a},"insertCluster"),y=(0,l.__name)(()=>{m=new Map},"clear");e.s(["clear",0,y,"insertCluster",0,x])},121292,e=>{"use strict";var t=e.i(369110),r=e.i(382793),a=e.i(502056),n=e.i(217248),i=e.i(447804),s=e.i(60231),l=e.i(508324),o=e.i(419524),d={common:s.common_default,getConfig:s.getConfig,insertCluster:t.insertCluster,insertEdge:r.insertEdge,insertEdgeLabel:r.insertEdgeLabel,insertMarkers:r.markers_default,insertNode:a.insertNode,interpolateToCurve:i.interpolateToCurve,labelHelper:n.labelHelper,log:l.log,positionEdgeLabel:r.positionEdgeLabel},c={},u=(0,o.__name)(e=>{for(let t of e)c[t.name]=t},"registerLayoutLoaders");(0,o.__name)(()=>{u([{name:"dagre",loader:(0,o.__name)(async()=>await e.A(555153),"loader")},{name:"swimlane",loader:(0,o.__name)(async()=>await e.A(12782),"loader")},{name:"cose-bilkent",loader:(0,o.__name)(async()=>await e.A(208503),"loader")}])},"registerDefaultLayoutLoaders")();var h=(0,o.__name)(async(e,t)=>{if(!(e.layoutAlgorithm in c))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let r=t.domId||t.id;t.domId=`${e.diagramId}-${r}`}let r=c[e.layoutAlgorithm],a=await r.loader(),{theme:n,themeVariables:i}=e.config,{useGradient:s,gradientStart:l,gradientStop:o}=i,u=t.attr("id");if(t.append("defs").append("filter").attr("id",`${u}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${u}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),s){let e=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)}return a.render(e,t,d,{algorithm:r.algorithm})},"render"),f=(0,o.__name)((e="",{fallback:t="dagre"}={})=>{if(e in c)return e;if(t in c)return l.log.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm");e.s(["getRegisteredLayoutAlgorithm",0,f,"registerLayoutLoaders",0,u,"render",0,h])},504565,e=>{"use strict";var t=e.i(722219);e.s(["default",0,t])}]);
|
|
@@ -0,0 +1 @@
|
|
|
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)("7fb21b18c6abc3ba14c4c0c36f2c9ecbe3c644d6c7",q.callServer,void 0,q.findSourceMapURL,"createRoutineAction"),E=(0,q.createServerReference)("7f97b1aa7b52044a0c13d09b86cc1c92cf27b14d0e",q.callServer,void 0,q.findSourceMapURL,"deleteRoutineAction"),P=(0,q.createServerReference)("7ff8891bc45feda5327738f21c7a3de9c84c3f4f7e",q.callServer,void 0,q.findSourceMapURL,"runRoutineNowAction"),B=(0,q.createServerReference)("7f4c705cd2ff4be324c689fd2c3bd08c5adeb41e60",q.callServer,void 0,q.findSourceMapURL,"updateRoutineAction");var F=e.i(504565);let H=[1,2,3,4,5,6,7],U=F.default.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.default.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.default.discriminatedUnion("kind",[F.default.object({kind:F.default.literal("once"),at:L}),F.default.object({kind:F.default.literal("daily"),time:U,days:F.default.array(F.default.number().int().min(1).max(7)).min(1,"Pick at least one day").transform(e=>[...new Set(e)].sort((e,t)=>e-t))}),F.default.object({kind:F.default.literal("every"),hours:F.default.number().int().min(S.ROUTINE.minHours,`No more often than every ${S.ROUTINE.minHours}h`).max(168)})]),J=F.default.object({bot:F.default.string().trim().min(1,"Pick a bot"),label:F.default.string().trim().min(1,"Give it a name").max(80),request:F.default.string().trim().min(1,"Say what it should do"),schedule:G}),Y=F.default.object({id:F.default.string(),status:F.default.enum(["running","waiting","done","cancelled"]),outcome:F.default.string().nullable(),updatedAt:R.DateLikeSchema});J.extend({id:F.default.string(),enabled:F.default.boolean(),nextRunAt:R.DateLikeSchema,runs:F.default.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:"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:"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,2 +1,2 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),a=e.i(225913);e.i(271645);var r=e.i(647163);function s({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.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),...a})}e.i(652225);let i=(0,a.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:a="vertical",...s}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":a,className:(0,r.cn)(i({orientation:a}),e),...s})},"FieldContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,r.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...a})},"FieldLabel",0,function({className:e,...a}){return(0,t.jsx)(s,{"data-slot":"field-label",className:(0,r.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),...a})}],986530)},556133,e=>{"use strict";var t=e.i(843476),a=e.i(401851),r=e.i(689664),s=e.i(867927),i=e.i(456420);let n={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};n.node;let l=(0,i.default)(n);var o=e.i(77071),d=e.i(759659),c=e.i(263676),u=e.i(271645),m=e.i(798120),h=e.i(167881),f=e.i(986530),x=e.i(23750),p=e.i(917162),g=e.i(671428),v=e.i(127341),j=e.i(184762),b=e.i(41533),y=e.i(968978),k=e.i(265402),N=e.i(670097),S=e.i(640262),w=e.i(96892);let C={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};C.node;let M=(0,i.default)(C);var z=e.i(716327),T=e.i(632781);let F={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};F.node;let A=(0,i.default)(F);var R=e.i(660302),L=e.i(146538),O=e.i(213377),E=e.i(647163);let I=new S.DefaultChatTransport({api:m.queryKey.memoryEdit});function $({notes:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,u.useState)({provider:null,model:""}),[n,l]=(0,u.useState)(!1),{messages:o,sendMessage:d,setMessages:c,status:m,stop:f,error:x,clearError:p}=(0,N.useChat)({transport:I}),g=(0,u.useRef)(f);g.current=f,(0,u.useEffect)(()=>()=>{g.current()},[]);let v=(0,u.useRef)(new Map);for(let t of e)for(let e of t.facts)v.current.set(e.id,{text:e.text,path:t.path});let j="submitted"===m||"streaming"===m,b=!!(s.provider&&s.model.trim()),k=[...o].reverse().find(e=>"assistant"===e.role),C=k?.parts??[],M=C.filter(S.isToolUIPart),T=C.flatMap(e=>"text"===e.type?[e.text]:[]).join(" ").trim(),F=!!x||M.some(e=>"output-error"===e.state),A=M.filter(e=>"output-available"===e.state&&(0,S.getToolName)(e)!==O.TOOL_NAMES.memory_recall).length;(0,u.useEffect)(()=>{if("ready"!==m||F||0===o.length)return;let e=setTimeout(()=>c([]),4e3);return()=>clearTimeout(e)},[m,F,o.length,c]);let P=j?(0,t.jsx)(R.ShinyText,{text:"Working on memory",className:"text-xs"}):x?(0,t.jsx)("span",{className:"text-xs text-destructive",children:x.message}):k?(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:T||(0===A?"Nothing to change":1===A?"1 change saved":`${A} changes saved`)}):null;return(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-18 z-10 flex justify-center px-8",children:(0,t.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-120 flex-col items-center gap-2",children:[n&&(0,t.jsx)("div",{className:"w-full rounded-xl bg-popover p-2 shadow-lg ring-1 ring-foreground/10",children:(0,t.jsx)(L.ModelPicker,{provider:s.provider,model:s.model,unset:"Provider",onChange:i})}),M.length>0&&(0,t.jsx)("ul",{className:"w-full divide-y divide-border/60 overflow-hidden rounded-xl bg-popover shadow-lg ring-1 ring-foreground/10",children:M.map(e=>(0,t.jsx)(B,{name:(0,S.getToolName)(e),input:e.input,state:e.state,errorText:"output-error"===e.state?e.errorText:void 0,known:v.current},e.toolCallId))}),P&&(0,t.jsx)("p",{className:"max-w-full truncate px-1",children:P}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=a.trim();t&&b&&!j&&(r(""),l(!1),p(),c([]),d({text:t},{body:{model:s}}))},className:"flex h-10 w-full items-center gap-1.5 rounded-xl bg-popover pr-1.5 pl-3.5 shadow-lg ring-1 ring-foreground/10",children:[(0,t.jsx)("input",{autoFocus:!0,value:a,onChange:e=>r(e.target.value),disabled:j,"aria-label":"Edit memory",placeholder:"Tell memory what changed",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:opacity-60"}),(0,t.jsxs)(h.Button,{type:"button",size:"xs",variant:"ghost",onClick:()=>l(!n),className:(0,E.cn)("max-w-44",!b&&"text-muted-foreground"),children:[b&&s.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.ProviderIcon,{provider:s.provider,className:"size-3"}),(0,t.jsx)("span",{className:"truncate",children:s.model})]}):"Model",(0,t.jsx)(z.ChevronDown,{className:"text-muted-foreground"})]}),(0,t.jsx)(h.Button,{type:"submit",size:"icon-sm",loading:j,disabled:!a.trim()||!b||j,"aria-label":"Send",children:!j&&(0,t.jsx)(w.ArrowUp,{})})]})]})})}let P={Remember:o.Plus,Replace:l,Forget:A,Rename:l,Opened:M};function B({name:e,input:a,state:s,errorText:i,known:n}){let l=function(e,t,a){if(e===O.TOOL_NAMES.memory_recall)return{kind:"Opened",path:(t??{}).path??"",lines:[]};if(e===O.TOOL_NAMES.memory_describe){let e=t??{};return{kind:"Rename",path:e.path??"",lines:e.description?[{after:`“${e.description}”`}]:[]}}if(e===O.TOOL_NAMES.memory_forget){let e=((t??{}).factIds??[]).filter(e=>null!=e),r=e.map(e=>a.get(e));return{kind:"Forget",path:r.find(e=>e)?.path??"",lines:e.map((e,t)=>({before:r[t]?.text??`Fact #${e}`}))}}let r=t??{},s=r.path??"",i=(r.facts??[]).filter(e=>null!=e),n=i.map(e=>null!=e.replaces?{before:a.get(e.replaces)?.text??`Fact #${e.replaces}`,after:e.text}:{after:e.text});return e===O.TOOL_NAMES.memory_create&&r.description&&n.unshift({after:`“${r.description}”`}),{kind:i.some(e=>null!=e.replaces)?"Replace":"Remember",path:s,lines:n}}(e,a,n),o=P[l.kind],d="output-error"===s;return(0,t.jsxs)("li",{className:"flex animate-in items-start gap-2.5 px-3 py-2.5 duration-200 fade-in slide-in-from-bottom-1",children:[(0,t.jsx)(o,{className:"mt-1 size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[l.lines.map((e,a)=>(0,t.jsxs)("div",{children:[e.before&&(0,t.jsx)("p",{className:"text-[13px] leading-5 text-muted-foreground/60 line-through",children:e.before}),e.after&&(0,t.jsx)("p",{className:"text-sm leading-5 text-foreground/90",children:e.after})]},`${l.kind}-${a}`)),(0,t.jsxs)("p",{className:"pt-0.5 font-mono text-[11px] text-muted-foreground",children:[l.kind,l.path&&` \xb7 ${l.path}`]}),d&&i&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:i})]}),(0,t.jsx)("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground",children:d?(0,t.jsx)(c.X,{className:"size-3.5 text-destructive"}):"output-available"===s?(0,t.jsx)(r.Check,{className:"size-3.5"}):(0,t.jsx)(T.Loader2,{className:"size-3.5 animate-spin"})})]})}var D=e.i(95187);let _=(0,D.createServerReference)("7fd1ea15615bc602f286fe1bc2a13932373864dc15",D.callServer,void 0,D.findSourceMapURL,"addFactsAction"),K=(0,D.createServerReference)("7f587ed1942f7f478317c381c17073ca945c142b19",D.callServer,void 0,D.findSourceMapURL,"createNoteAction"),U=(0,D.createServerReference)("7f39c6ba90150144638562afea8715cc57d68030ba",D.callServer,void 0,D.findSourceMapURL,"deleteNoteAction"),q=(0,D.createServerReference)("7ff661c6f7246ffc81627e2c589562651167bf8593",D.callServer,void 0,D.findSourceMapURL,"forgetFactAction"),V=(0,D.createServerReference)("7f11733247dafece857a3085ab2e0189c65878176c",D.callServer,void 0,D.findSourceMapURL,"reviseFactAction"),Y=(0,D.createServerReference)("7f3b50179db345712f8afabf43404606a67f38d0ab",D.callServer,void 0,D.findSourceMapURL,"updateNoteAction");var H=e.i(681307),W=e.i(245629);let X=H.z.enum(["user","call","bot"]);H.z.string().trim().min(1,"A note needs a line saying what it is about").max(b.MEMORY_LIMITS.descriptionChars,`A note's line is one line: at most ${b.MEMORY_LIMITS.descriptionChars} characters`);let G=H.z.object({id:H.z.number(),text:H.z.string(),source:X.nullish(),createdAt:W.DateLikeSchema});H.z.object({id:H.z.number(),path:H.z.string(),description:H.z.string(),ownedByUser:H.z.boolean(),hits:H.z.number(),lastReadAt:W.DateLikeSchema.nullable(),createdAt:W.DateLikeSchema,updatedAt:W.DateLikeSchema,factCount:H.z.number(),facts:G.array()});let Z=[{path:"profile",of:"The user themselves — name, age, what they do, where they live, whatever else says who they are"},{path:"preferences",of:"How they want things done, and said — read whole on every call, so a rule for a particular situation goes here too"},{path:"people/",of:"Someone in their life, and what matters about them"},{path:"projects/",of:"Something with an end — a trip, a purchase, a deadline, a thing being built"},{path:"topics/",of:"Something ongoing that keeps coming back"}],J=Z.filter(e=>!e.path.endsWith("/")).map(e=>e.path),Q=Z.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${J.join("|")}|(?:${Q.join("|")})/.+)$`);var ee=e.i(895836),et=e.i(319841),ea=e.i(609856),er=e.i(661504),es=e.i(283653);let ei=[{key:"you",label:"You"},{key:"people",label:"People"},{key:"projects",label:"Projects"},{key:"topics",label:"Topics"},{key:"other",label:"Other"}],en={onOk:()=>(0,es.revalidate)(m.queryKey.memory)},el=k.textModelProviderSchema.options.filter(e=>"chatgpt"!==e).slice(0,3);function eo(){return(0,t.jsx)("span",{className:"mr-0.5 flex items-center",children:el.map(e=>(0,t.jsx)("span",{className:"-ml-1.5 grid size-5 place-items-center rounded-full bg-background ring-1 ring-border first:ml-0",children:(0,t.jsx)(y.ProviderIcon,{provider:e,className:"size-3"})},e))})}function ed(e,t){return a=>{(0,et.composing)(a)||("Enter"===a.key&&(a.preventDefault(),e()),"Escape"===a.key&&(a.stopPropagation(),t()))}}function ec({note:e,open:a,onToggle:r}){var i;let n,o,c,m,f,[x,g]=(0,u.useState)(!1),[v,j]=(0,ea.useServerAction)(U,en),b=async()=>{await p.notify.confirm({title:`Forget ${e.path}?`,description:"Every fact in this note is deleted for good.",okText:"Delete",destructive:!0})&&v(e.id)},y=(0,t.jsx)("span",{className:"w-36 shrink-0 truncate text-sm font-medium",children:-1===(n=(i=e.path).indexOf("/"))?i:i.slice(n+1)});return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex h-12 items-center gap-3 pr-2 pl-4",children:x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.ChevronRight,{className:"size-3.5 shrink-0 rotate-90 text-muted-foreground"}),y,(0,t.jsx)(eu,{note:e,onDone:()=>g(!1)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button","aria-expanded":a,onClick:r,className:(0,E.cn)("flex h-full min-w-0 flex-1 items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",(o=e.path,!J.includes(o)&&.15>(c=(0,W.toDate)(e.lastReadAt??e.createdAt),m=Math.max(0,(Date.now()-c.getTime())/864e5),(e.hits+1)/(1+m))&&!a&&"opacity-55")),children:[(0,t.jsx)(s.ChevronRight,{className:(0,E.cn)("size-3.5 shrink-0 text-muted-foreground transition-transform",a&&"rotate-90")}),y,(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-muted-foreground",children:e.description}),(0,t.jsxs)("span",{className:"w-16 shrink-0 text-right font-mono text-[11px] text-muted-foreground/70",children:[e.factCount," ",1===e.factCount?"fact":"facts"]}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground/50",title:e.lastReadAt?"Last read back":"Never read back",children:e.lastReadAt?(0,W.shortAgo)(e.lastReadAt):"—"})]}),(0,t.jsx)("span",{className:"flex w-15 shrink-0 justify-end",children:a&&(0,t.jsxs)(t.Fragment,{children:[(f=e.path,!J.includes(f)&&(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit the note's line",onClick:()=>g(!0),children:(0,t.jsx)(l,{})})),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this note",loading:j,onClick:b,children:!j&&(0,t.jsx)(d.Trash2,{})})]})})]})}),a&&(0,t.jsxs)("div",{className:"space-y-1 border-t border-border/60 bg-muted/40 py-2.5 pr-2 pl-10",children:[(0,t.jsx)(em,{noteId:e.id}),e.facts.map(a=>(0,t.jsx)(eh,{noteId:e.id,fact:a},a.id))]})]})}function eu({note:e,onDone:a}){let[s,i]=(0,u.useState)(e.description),[n,l]=(0,ea.useServerAction)(Y,{onOk:()=>{a(),(0,es.revalidate)(m.queryKey.memory)}}),o=()=>{let t=s.trim();if(!t||t===e.description)return a();n(e.id,{description:t})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:s,onChange:e=>i(e.target.value),onKeyDown:ed(o,a),"aria-label":"The note's line",placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,className:"h-8 min-w-0 flex-1 text-[13px]"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:l,onClick:o,children:!l&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:a,children:(0,t.jsx)(c.X,{})})]})}function em({noteId:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,ea.useServerAction)(_,{onOk:()=>{r(""),(0,es.revalidate)(m.queryKey.memory)}}),n=()=>{let t=a.trim();t&&!i&&s(e,[t])};return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 pb-1",children:[(0,t.jsx)(x.Input,{value:a,onChange:e=>r(e.target.value),onKeyDown:ed(n,()=>r("")),"aria-label":"Add a fact",placeholder:"Add a fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",loading:i,disabled:!a.trim(),onClick:n,children:[!i&&(0,t.jsx)(o.Plus,{}),"Add"]})]})}function eh({noteId:e,fact:s}){let i,[n,o]=(0,u.useState)(!1),[f,g]=(0,u.useState)(s.text),[v,j]=(0,ea.useServerAction)(V,{onOk:()=>{o(!1),(0,es.revalidate)(m.queryKey.memory)}}),[b,y]=(0,ea.useServerAction)(q,en),k=async()=>{await p.notify.confirm({title:"Forget this fact?",description:`"${s.text}" is deleted for good.`,okText:"Delete",destructive:!0})&&b(e,s.id)},N=()=>{let t=f.trim();if(!t||t===s.text)return o(!1);v(e,s.id,t)},S="user"===(i=s.source)?"you":"call"===i?"on a call":"bot"===i?"a bot":"";return(0,t.jsx)("div",{className:"flex min-h-10 items-center gap-1.5",children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:f,onChange:e=>g(e.target.value),onKeyDown:ed(N,()=>o(!1)),"aria-label":"Fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:j,onClick:N,children:!j&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:()=>o(!1),children:(0,t.jsx)(c.X,{})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 pl-1 text-sm leading-relaxed text-foreground/90",children:s.text}),(0,t.jsxs)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground/50",children:[(0,a.format)(s.createdAt,"yyyy.MM.dd"),S&&` \xb7 ${S}`]}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit this fact",onClick:()=>{g(s.text),o(!0)},children:(0,t.jsx)(l,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this fact",loading:y,onClick:()=>void k(),children:!y&&(0,t.jsx)(d.Trash2,{})})]})})}let ef=[{key:"people",label:"Person",placeholder:"jihoon",fact:"Moved to the platform team in March"},{key:"projects",label:"Project",placeholder:"thursday",fact:"Ships behind a feature flag until April"},{key:"topics",label:"Topic",placeholder:"scheduling",fact:"No meetings before 10am"}];function ex(){return p.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(ep,{onDone:e})})}function ep({onDone:e}){let[a,r]=(0,u.useState)("people"),[s,i]=(0,u.useState)(""),[n,l]=(0,u.useState)(""),[d,c]=(0,u.useState)(""),[p,g,,y]=(0,ea.useServerAction)(K,{errorMessage:!1,onOk:()=>{(0,es.revalidate)(m.queryKey.memory),e()}}),k=ef.find(e=>e.key===a),N=s.trim()&&n.trim()&&!g,S=()=>{N&&p(`${a}/${s.trim()}`,n.trim(),d.split("\n").map(e=>e.trim()).filter(Boolean))};return(0,t.jsxs)(ee.SettingDialogContent,{title:"New note",description:"Where Thursday keeps what she learns about this.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(h.Button,{disabled:!N,loading:g,onClick:S,children:[!g&&(0,t.jsx)(o.Plus,{}),"Create"]})]}),children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{children:"Kind"}),(0,t.jsx)(v.Tabs,{value:a,onValueChange:e=>r(e),children:(0,t.jsx)(v.TabsList,{className:"w-full",children:ef.map(e=>(0,t.jsx)(v.TabsTrigger,{value:e.key,children:e.label},e.key))})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-name",children:"Name"}),(0,t.jsxs)(f.FieldContent,{children:[(0,t.jsx)(x.Input,{id:"note-name",value:s,onChange:e=>i(e.target.value),placeholder:k?.placeholder,spellCheck:!1,required:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[a,"/",s.trim()||"…"]})]})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-summary",children:"Summary"}),(0,t.jsx)(f.FieldContent,{children:(0,t.jsx)(x.Input,{id:"note-summary",value:n,onChange:e=>l(e.target.value),onKeyDown:e=>{e.nativeEvent.isComposing||229===e.keyCode||"Enter"===e.key&&S()},placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,required:!0})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-facts",children:"Facts"}),(0,t.jsx)(j.Textarea,{id:"note-facts",value:d,onChange:e=>c(e.target.value),placeholder:`One per line
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),a=e.i(225913);e.i(271645);var r=e.i(647163);function s({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.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),...a})}e.i(652225);let i=(0,a.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:a="vertical",...s}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":a,className:(0,r.cn)(i({orientation:a}),e),...s})},"FieldContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,r.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...a})},"FieldLabel",0,function({className:e,...a}){return(0,t.jsx)(s,{"data-slot":"field-label",className:(0,r.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),...a})}],986530)},556133,e=>{"use strict";var t=e.i(843476),a=e.i(401851),r=e.i(689664),s=e.i(867927),i=e.i(456420);let n={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};n.node;let l=(0,i.default)(n);var o=e.i(77071),d=e.i(759659),c=e.i(263676),u=e.i(271645),m=e.i(798120),h=e.i(167881),f=e.i(986530),x=e.i(23750),p=e.i(917162),g=e.i(671428),v=e.i(127341),j=e.i(184762),b=e.i(41533),y=e.i(968978),k=e.i(265402),N=e.i(670097),S=e.i(640262),w=e.i(96892);let C={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};C.node;let M=(0,i.default)(C);var z=e.i(716327),T=e.i(632781);let F={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};F.node;let A=(0,i.default)(F);var R=e.i(660302),L=e.i(146538),O=e.i(213377),E=e.i(647163);let I=new S.DefaultChatTransport({api:m.queryKey.memoryEdit});function $({notes:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,u.useState)({provider:null,model:""}),[n,l]=(0,u.useState)(!1),{messages:o,sendMessage:d,setMessages:c,status:m,stop:f,error:x,clearError:p}=(0,N.useChat)({transport:I}),g=(0,u.useRef)(f);g.current=f,(0,u.useEffect)(()=>()=>{g.current()},[]);let v=(0,u.useRef)(new Map);for(let t of e)for(let e of t.facts)v.current.set(e.id,{text:e.text,path:t.path});let j="submitted"===m||"streaming"===m,b=!!(s.provider&&s.model.trim()),k=[...o].reverse().find(e=>"assistant"===e.role),C=k?.parts??[],M=C.filter(S.isToolUIPart),T=C.flatMap(e=>"text"===e.type?[e.text]:[]).join(" ").trim(),F=!!x||M.some(e=>"output-error"===e.state),A=M.filter(e=>"output-available"===e.state&&(0,S.getToolName)(e)!==O.TOOL_NAMES.memory_recall).length;(0,u.useEffect)(()=>{if("ready"!==m||F||0===o.length)return;let e=setTimeout(()=>c([]),4e3);return()=>clearTimeout(e)},[m,F,o.length,c]);let P=j?(0,t.jsx)(R.ShinyText,{text:"Working on memory",className:"text-xs"}):x?(0,t.jsx)("span",{className:"text-xs text-destructive",children:x.message}):k?(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:T||(0===A?"Nothing to change":1===A?"1 change saved":`${A} changes saved`)}):null;return(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-18 z-10 flex justify-center px-8",children:(0,t.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-120 flex-col items-center gap-2",children:[n&&(0,t.jsx)("div",{className:"w-full rounded-xl bg-popover p-2 shadow-lg ring-1 ring-foreground/10",children:(0,t.jsx)(L.ModelPicker,{provider:s.provider,model:s.model,unset:"Provider",onChange:i})}),M.length>0&&(0,t.jsx)("ul",{className:"w-full divide-y divide-border/60 overflow-hidden rounded-xl bg-popover shadow-lg ring-1 ring-foreground/10",children:M.map(e=>(0,t.jsx)(B,{name:(0,S.getToolName)(e),input:e.input,state:e.state,errorText:"output-error"===e.state?e.errorText:void 0,known:v.current},e.toolCallId))}),P&&(0,t.jsx)("p",{className:"max-w-full truncate px-1",children:P}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=a.trim();t&&b&&!j&&(r(""),l(!1),p(),c([]),d({text:t},{body:{model:s}}))},className:"flex h-10 w-full items-center gap-1.5 rounded-xl bg-popover pr-1.5 pl-3.5 shadow-lg ring-1 ring-foreground/10",children:[(0,t.jsx)("input",{autoFocus:!0,value:a,onChange:e=>r(e.target.value),disabled:j,"aria-label":"Edit memory",placeholder:"Tell memory what changed",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:opacity-60"}),(0,t.jsxs)(h.Button,{type:"button",size:"xs",variant:"ghost",onClick:()=>l(!n),className:(0,E.cn)("max-w-44",!b&&"text-muted-foreground"),children:[b&&s.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.ProviderIcon,{provider:s.provider,className:"size-3"}),(0,t.jsx)("span",{className:"truncate",children:s.model})]}):"Model",(0,t.jsx)(z.ChevronDown,{className:"text-muted-foreground"})]}),(0,t.jsx)(h.Button,{type:"submit",size:"icon-sm",loading:j,disabled:!a.trim()||!b||j,"aria-label":"Send",children:!j&&(0,t.jsx)(w.ArrowUp,{})})]})]})})}let P={Remember:o.Plus,Replace:l,Forget:A,Rename:l,Opened:M};function B({name:e,input:a,state:s,errorText:i,known:n}){let l=function(e,t,a){if(e===O.TOOL_NAMES.memory_recall)return{kind:"Opened",path:(t??{}).path??"",lines:[]};if(e===O.TOOL_NAMES.memory_describe){let e=t??{};return{kind:"Rename",path:e.path??"",lines:e.description?[{after:`“${e.description}”`}]:[]}}if(e===O.TOOL_NAMES.memory_forget){let e=((t??{}).factIds??[]).filter(e=>null!=e),r=e.map(e=>a.get(e));return{kind:"Forget",path:r.find(e=>e)?.path??"",lines:e.map((e,t)=>({before:r[t]?.text??`Fact #${e}`}))}}let r=t??{},s=r.path??"",i=(r.facts??[]).filter(e=>null!=e),n=i.map(e=>null!=e.replaces?{before:a.get(e.replaces)?.text??`Fact #${e.replaces}`,after:e.text}:{after:e.text});return e===O.TOOL_NAMES.memory_create&&r.description&&n.unshift({after:`“${r.description}”`}),{kind:i.some(e=>null!=e.replaces)?"Replace":"Remember",path:s,lines:n}}(e,a,n),o=P[l.kind],d="output-error"===s;return(0,t.jsxs)("li",{className:"flex animate-in items-start gap-2.5 px-3 py-2.5 duration-200 fade-in slide-in-from-bottom-1",children:[(0,t.jsx)(o,{className:"mt-1 size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[l.lines.map((e,a)=>(0,t.jsxs)("div",{children:[e.before&&(0,t.jsx)("p",{className:"text-[13px] leading-5 text-muted-foreground/60 line-through",children:e.before}),e.after&&(0,t.jsx)("p",{className:"text-sm leading-5 text-foreground/90",children:e.after})]},`${l.kind}-${a}`)),(0,t.jsxs)("p",{className:"pt-0.5 font-mono text-[11px] text-muted-foreground",children:[l.kind,l.path&&` \xb7 ${l.path}`]}),d&&i&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:i})]}),(0,t.jsx)("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground",children:d?(0,t.jsx)(c.X,{className:"size-3.5 text-destructive"}):"output-available"===s?(0,t.jsx)(r.Check,{className:"size-3.5"}):(0,t.jsx)(T.Loader2,{className:"size-3.5 animate-spin"})})]})}var D=e.i(95187);let _=(0,D.createServerReference)("7fe022a560d58fec05a4d6cc55756eb444e803ec98",D.callServer,void 0,D.findSourceMapURL,"addFactsAction"),K=(0,D.createServerReference)("7f87986b8db9fa1a8a63ffe3b75afef8357341a730",D.callServer,void 0,D.findSourceMapURL,"createNoteAction"),U=(0,D.createServerReference)("7fcf7797635deb5932094ed8356abca2cb31208841",D.callServer,void 0,D.findSourceMapURL,"deleteNoteAction"),q=(0,D.createServerReference)("7f744974248ce8b9081636cabcdf0c4e1697d77906",D.callServer,void 0,D.findSourceMapURL,"forgetFactAction"),V=(0,D.createServerReference)("7f09eb80967c0c8124e8a7128bef27a7d6068962e0",D.callServer,void 0,D.findSourceMapURL,"reviseFactAction"),Y=(0,D.createServerReference)("7f4ec3e8a8f7ca03c5ab2cc43a83bafddc6569ff2a",D.callServer,void 0,D.findSourceMapURL,"updateNoteAction");var H=e.i(681307),W=e.i(245629);let X=H.z.enum(["user","call","bot"]);H.z.string().trim().min(1,"A note needs a line saying what it is about").max(b.MEMORY_LIMITS.descriptionChars,`A note's line is one line: at most ${b.MEMORY_LIMITS.descriptionChars} characters`);let G=H.z.object({id:H.z.number(),text:H.z.string(),source:X.nullish(),createdAt:W.DateLikeSchema});H.z.object({id:H.z.number(),path:H.z.string(),description:H.z.string(),ownedByUser:H.z.boolean(),hits:H.z.number(),lastReadAt:W.DateLikeSchema.nullable(),createdAt:W.DateLikeSchema,updatedAt:W.DateLikeSchema,factCount:H.z.number(),facts:G.array()});let Z=[{path:"profile",of:"The user themselves — name, age, what they do, where they live, whatever else says who they are"},{path:"preferences",of:"How they want things done, and said — read whole on every call, so a rule for a particular situation goes here too"},{path:"people/",of:"Someone in their life, and what matters about them"},{path:"projects/",of:"Something with an end — a trip, a purchase, a deadline, a thing being built"},{path:"topics/",of:"Something ongoing that keeps coming back"}],J=Z.filter(e=>!e.path.endsWith("/")).map(e=>e.path),Q=Z.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${J.join("|")}|(?:${Q.join("|")})/.+)$`);var ee=e.i(895836),et=e.i(319841),ea=e.i(609856),er=e.i(661504),es=e.i(283653);let ei=[{key:"you",label:"You"},{key:"people",label:"People"},{key:"projects",label:"Projects"},{key:"topics",label:"Topics"},{key:"other",label:"Other"}],en={onOk:()=>(0,es.revalidate)(m.queryKey.memory)},el=k.textModelProviderSchema.options.filter(e=>"chatgpt"!==e).slice(0,3);function eo(){return(0,t.jsx)("span",{className:"mr-0.5 flex items-center",children:el.map(e=>(0,t.jsx)("span",{className:"-ml-1.5 grid size-5 place-items-center rounded-full bg-background ring-1 ring-border first:ml-0",children:(0,t.jsx)(y.ProviderIcon,{provider:e,className:"size-3"})},e))})}function ed(e,t){return a=>{(0,et.composing)(a)||("Enter"===a.key&&(a.preventDefault(),e()),"Escape"===a.key&&(a.stopPropagation(),t()))}}function ec({note:e,open:a,onToggle:r}){var i;let n,o,c,m,f,[x,g]=(0,u.useState)(!1),[v,j]=(0,ea.useServerAction)(U,en),b=async()=>{await p.notify.confirm({title:`Forget ${e.path}?`,description:"Every fact in this note is deleted for good.",okText:"Delete",destructive:!0})&&v(e.id)},y=(0,t.jsx)("span",{className:"w-36 shrink-0 truncate text-sm font-medium",children:-1===(n=(i=e.path).indexOf("/"))?i:i.slice(n+1)});return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex h-12 items-center gap-3 pr-2 pl-4",children:x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.ChevronRight,{className:"size-3.5 shrink-0 rotate-90 text-muted-foreground"}),y,(0,t.jsx)(eu,{note:e,onDone:()=>g(!1)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button","aria-expanded":a,onClick:r,className:(0,E.cn)("flex h-full min-w-0 flex-1 items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",(o=e.path,!J.includes(o)&&.15>(c=(0,W.toDate)(e.lastReadAt??e.createdAt),m=Math.max(0,(Date.now()-c.getTime())/864e5),(e.hits+1)/(1+m))&&!a&&"opacity-55")),children:[(0,t.jsx)(s.ChevronRight,{className:(0,E.cn)("size-3.5 shrink-0 text-muted-foreground transition-transform",a&&"rotate-90")}),y,(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-muted-foreground",children:e.description}),(0,t.jsxs)("span",{className:"w-16 shrink-0 text-right font-mono text-[11px] text-muted-foreground/70",children:[e.factCount," ",1===e.factCount?"fact":"facts"]}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground/50",title:e.lastReadAt?"Last read back":"Never read back",children:e.lastReadAt?(0,W.shortAgo)(e.lastReadAt):"—"})]}),(0,t.jsx)("span",{className:"flex w-15 shrink-0 justify-end",children:a&&(0,t.jsxs)(t.Fragment,{children:[(f=e.path,!J.includes(f)&&(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit the note's line",onClick:()=>g(!0),children:(0,t.jsx)(l,{})})),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this note",loading:j,onClick:b,children:!j&&(0,t.jsx)(d.Trash2,{})})]})})]})}),a&&(0,t.jsxs)("div",{className:"space-y-1 border-t border-border/60 bg-muted/40 py-2.5 pr-2 pl-10",children:[(0,t.jsx)(em,{noteId:e.id}),e.facts.map(a=>(0,t.jsx)(eh,{noteId:e.id,fact:a},a.id))]})]})}function eu({note:e,onDone:a}){let[s,i]=(0,u.useState)(e.description),[n,l]=(0,ea.useServerAction)(Y,{onOk:()=>{a(),(0,es.revalidate)(m.queryKey.memory)}}),o=()=>{let t=s.trim();if(!t||t===e.description)return a();n(e.id,{description:t})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:s,onChange:e=>i(e.target.value),onKeyDown:ed(o,a),"aria-label":"The note's line",placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,className:"h-8 min-w-0 flex-1 text-[13px]"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:l,onClick:o,children:!l&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:a,children:(0,t.jsx)(c.X,{})})]})}function em({noteId:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,ea.useServerAction)(_,{onOk:()=>{r(""),(0,es.revalidate)(m.queryKey.memory)}}),n=()=>{let t=a.trim();t&&!i&&s(e,[t])};return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 pb-1",children:[(0,t.jsx)(x.Input,{value:a,onChange:e=>r(e.target.value),onKeyDown:ed(n,()=>r("")),"aria-label":"Add a fact",placeholder:"Add a fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",loading:i,disabled:!a.trim(),onClick:n,children:[!i&&(0,t.jsx)(o.Plus,{}),"Add"]})]})}function eh({noteId:e,fact:s}){let i,[n,o]=(0,u.useState)(!1),[f,g]=(0,u.useState)(s.text),[v,j]=(0,ea.useServerAction)(V,{onOk:()=>{o(!1),(0,es.revalidate)(m.queryKey.memory)}}),[b,y]=(0,ea.useServerAction)(q,en),k=async()=>{await p.notify.confirm({title:"Forget this fact?",description:`"${s.text}" is deleted for good.`,okText:"Delete",destructive:!0})&&b(e,s.id)},N=()=>{let t=f.trim();if(!t||t===s.text)return o(!1);v(e,s.id,t)},S="user"===(i=s.source)?"you":"call"===i?"on a call":"bot"===i?"a bot":"";return(0,t.jsx)("div",{className:"flex min-h-10 items-center gap-1.5",children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:f,onChange:e=>g(e.target.value),onKeyDown:ed(N,()=>o(!1)),"aria-label":"Fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:j,onClick:N,children:!j&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:()=>o(!1),children:(0,t.jsx)(c.X,{})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 pl-1 text-sm leading-relaxed text-foreground/90",children:s.text}),(0,t.jsxs)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground/50",children:[(0,a.format)(s.createdAt,"yyyy.MM.dd"),S&&` \xb7 ${S}`]}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit this fact",onClick:()=>{g(s.text),o(!0)},children:(0,t.jsx)(l,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this fact",loading:y,onClick:()=>void k(),children:!y&&(0,t.jsx)(d.Trash2,{})})]})})}let ef=[{key:"people",label:"Person",placeholder:"jihoon",fact:"Moved to the platform team in March"},{key:"projects",label:"Project",placeholder:"thursday",fact:"Ships behind a feature flag until April"},{key:"topics",label:"Topic",placeholder:"scheduling",fact:"No meetings before 10am"}];function ex(){return p.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(ep,{onDone:e})})}function ep({onDone:e}){let[a,r]=(0,u.useState)("people"),[s,i]=(0,u.useState)(""),[n,l]=(0,u.useState)(""),[d,c]=(0,u.useState)(""),[p,g,,y]=(0,ea.useServerAction)(K,{errorMessage:!1,onOk:()=>{(0,es.revalidate)(m.queryKey.memory),e()}}),k=ef.find(e=>e.key===a),N=s.trim()&&n.trim()&&!g,S=()=>{N&&p(`${a}/${s.trim()}`,n.trim(),d.split("\n").map(e=>e.trim()).filter(Boolean))};return(0,t.jsxs)(ee.SettingDialogContent,{title:"New note",description:"Where Thursday keeps what she learns about this.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(h.Button,{disabled:!N,loading:g,onClick:S,children:[!g&&(0,t.jsx)(o.Plus,{}),"Create"]})]}),children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{children:"Kind"}),(0,t.jsx)(v.Tabs,{value:a,onValueChange:e=>r(e),children:(0,t.jsx)(v.TabsList,{className:"w-full",children:ef.map(e=>(0,t.jsx)(v.TabsTrigger,{value:e.key,children:e.label},e.key))})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-name",children:"Name"}),(0,t.jsxs)(f.FieldContent,{children:[(0,t.jsx)(x.Input,{id:"note-name",value:s,onChange:e=>i(e.target.value),placeholder:k?.placeholder,spellCheck:!1,required:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[a,"/",s.trim()||"…"]})]})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-summary",children:"Summary"}),(0,t.jsx)(f.FieldContent,{children:(0,t.jsx)(x.Input,{id:"note-summary",value:n,onChange:e=>l(e.target.value),onKeyDown:e=>{e.nativeEvent.isComposing||229===e.keyCode||"Enter"===e.key&&S()},placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,required:!0})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-facts",children:"Facts"}),(0,t.jsx)(j.Textarea,{id:"note-facts",value:d,onChange:e=>c(e.target.value),placeholder:`One per line
|
|
2
2
|
${k?.fact??""}`,className:"min-h-24 resize-none text-sm"})]})]}),y&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:y})]})}e.s(["MemorySetting",0,function(){let{items:e,isLoading:a,isLoadingMore:r,error:s,hasMore:i,sentinelRef:n}=(0,er.useServerPages)({key:e=>m.queryKey.memoryPage(e*b.PAGE_SIZE)}),[l,d]=(0,u.useState)(""),[c,f]=(0,u.useState)(new Set),[x,p]=(0,u.useState)(!1);if(a)return(0,t.jsx)(ee.SettingSkeleton,{});if(s)return(0,t.jsx)(ee.SettingError,{message:s.message});let v=l.trim().toLowerCase(),j=v?e.filter(e=>[e.path,e.description,...e.facts.map(e=>e.text)].some(e=>e.toLowerCase().includes(v))):e,y=e.reduce((e,t)=>e+t.factCount,0),k=i?"+":"";return(0,t.jsxs)("div",{className:"relative h-full min-h-0",children:[(0,t.jsxs)(ee.SettingScreen,{footer:(0,t.jsxs)(h.Button,{size:"sm",variant:x?"secondary":"ghost","aria-pressed":x,onClick:()=>p(!x),children:[(0,t.jsx)(eo,{}),"Edit with a model"]}),children:[(0,t.jsx)(ee.SettingToolbar,{count:(0,t.jsxs)("span",{className:"flex items-center gap-3",children:[`${e.length}${k} notes \xb7 ${y}${k} facts`,(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",className:"font-sans",onClick:ex,children:[(0,t.jsx)(o.Plus,{}),"New note"]})]}),children:(0,t.jsx)(ee.SettingFilter,{value:l,onChange:d,placeholder:"Filter memory"})}),v&&0===j.length&&(0,t.jsx)("p",{className:"px-1 text-xs text-muted-foreground/60",children:"Nothing matches"}),ei.map(({key:e,label:a})=>{let r=j.filter(t=>(function(e){if(J.includes(e))return"you";let t=e.slice(0,e.indexOf("/"));return Q.includes(t)?t:"other"})(t.path)===e);return 0===r.length?null:(0,t.jsx)(ee.SettingGroup,{label:a,children:(0,t.jsx)(ee.SettingItems,{children:r.map(e=>(0,t.jsx)(ec,{note:e,open:c.has(e.id)!==!!v,onToggle:()=>{let t;return t=e.id,f(e=>{let a=new Set(e);return a.delete(t)||a.add(t),a})}},e.id))})},e)}),(0,t.jsx)(ee.SettingMore,{hasMore:i,loading:r,sentinelRef:n,ghost:(0,t.jsxs)("div",{className:"flex h-12 items-center gap-3 px-4",children:[(0,t.jsx)(g.Skeleton,{className:"h-3 w-24"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-56"})]})})]}),x&&(0,t.jsx)($,{notes:e})]})}],556133)},759659,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let r=(0,t.default)(a);e.s(["Trash2",0,r],759659)}]);
|